ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
834 stars 1.54k forks source link

Add resource_id field to redfish_info #8331

Open AvinashJalumuru opened 6 months ago

AvinashJalumuru commented 6 months ago

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

ansibullbot commented 6 months ago

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 commented 6 months ago

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

mraineri commented 6 months ago

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.

AvinashJalumuru commented 6 months ago

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.

mraineri commented 5 months ago

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.