community.general icon indicating copy to clipboard operation
community.general copied to clipboard

Add resource_id field to redfish_info

Open AvinashJalumuru opened this issue 9 months ago • 5 comments

Summary

resource_id parameter is accepted in redfish_command and redfish_config which is very much useful to pass the ID of the System, Manager or Chassis. This feature is missing in redfish_info.

Adding resource_id field in community.general.redfish_info would benefit all users (along with me) using redfish to manage/configure multi-systems.

Issue Type

Feature Idea

Component Name

redfish_info

Additional Information

  - name: Get default system inventory and user information of resource 437XR1138R2
    community.general.redfish_info:
      category: Systems,Accounts
      baseuri: "{{ baseuri }}"
      username: "{{ username }}"
      password: "{{ password }}"
      resource_id: 437XR1138R2

Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

AvinashJalumuru avatar May 08 '24 21:05 AvinashJalumuru

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar May 08 '24 22:05 ansibullbot

cc @TSKushal @bhavya06 @jyundt @mraineri @rajeevkallur @renxulei @tomasg2012 @xmadsen click here for bot help

ansibullbot avatar May 08 '24 22:05 ansibullbot

The existing utilities in redfish_info (with some exceptions I'll point out later) are returning all instances regardless of the number of chassis or system instances. So, if you invoke "GetSystemInventory", it calls "get_multi_system_inventory" to collect information from each member of the systems collection. Likewise, "GetCpuInventory" will call "get_multi_cpu_inventory", which collects the CPU inventory from each system in the systems collection. With this behavior in place today, is there a need to call out specific resources?

Specifically for the GetLogs and GetNetworkProtocols commands under Manager, these two do not handle multi-manager designs. There is an open issue (#6764) and pull request (#8178) for this.

mraineri avatar May 17 '24 16:05 mraineri

Thanks @mraineri for sharing the details and background.

Just a thought, if there are many systems/managers, would it not be nicer to have a resource_id flag to fetch details of single instance instead of querying the list of systems or managers and using ansible task to filter the needed resource.

AvinashJalumuru avatar May 24 '24 19:05 AvinashJalumuru

I had a chat with a few others, and we're thinking it's reasonable to add this capability for all redfish_info commands. Will need to plan this change out.

mraineri avatar May 31 '24 19:05 mraineri