1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add Name and/or Id properties to resource inventory output (#1691) (#1697)

* add Name and/or Id properties to resource inventory output

* add changelog fragment

(cherry picked from commit 00f5f7dfe7)

Co-authored-by: Bill Dodd <billdodd@gmail.com>
This commit is contained in:
patchback[bot] 2021-01-29 07:40:25 +01:00 committed by GitHub
parent 30622754a9
commit 8f0f6ffc43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- redfish_info module, redfish_utils module utils - add ``Name`` and ``Id`` properties to output of Redfish inventory commands (https://github.com/ansible-collections/community.general/issues/1650).

View file

@ -469,7 +469,7 @@ class RedfishUtils(object):
controller_results = [] controller_results = []
# Get these entries, but does not fail if not found # Get these entries, but does not fail if not found
properties = ['CacheSummary', 'FirmwareVersion', 'Identifiers', properties = ['CacheSummary', 'FirmwareVersion', 'Identifiers',
'Location', 'Manufacturer', 'Model', 'Name', 'Location', 'Manufacturer', 'Model', 'Name', 'Id',
'PartNumber', 'SerialNumber', 'SpeedGbps', 'Status'] 'PartNumber', 'SerialNumber', 'SpeedGbps', 'Status']
key = "StorageControllers" key = "StorageControllers"
@ -1700,7 +1700,7 @@ class RedfishUtils(object):
chassis_results = [] chassis_results = []
# Get these entries, but does not fail if not found # Get these entries, but does not fail if not found
properties = ['ChassisType', 'PartNumber', 'AssetTag', properties = ['Name', 'Id', 'ChassisType', 'PartNumber', 'AssetTag',
'Manufacturer', 'IndicatorLED', 'SerialNumber', 'Model'] 'Manufacturer', 'IndicatorLED', 'SerialNumber', 'Model']
# Go through list # Go through list
@ -1724,7 +1724,7 @@ class RedfishUtils(object):
fan_results = [] fan_results = []
key = "Thermal" key = "Thermal"
# Get these entries, but does not fail if not found # Get these entries, but does not fail if not found
properties = ['FanName', 'Reading', 'ReadingUnits', 'Status'] properties = ['Name', 'FanName', 'Reading', 'ReadingUnits', 'Status']
# Go through list # Go through list
for chassis_uri in self.chassis_uris: for chassis_uri in self.chassis_uris:
@ -1836,8 +1836,8 @@ class RedfishUtils(object):
cpu_results = [] cpu_results = []
key = "Processors" key = "Processors"
# Get these entries, but does not fail if not found # Get these entries, but does not fail if not found
properties = ['Id', 'Manufacturer', 'Model', 'MaxSpeedMHz', 'TotalCores', properties = ['Id', 'Name', 'Manufacturer', 'Model', 'MaxSpeedMHz',
'TotalThreads', 'Status'] 'TotalCores', 'TotalThreads', 'Status']
# Search for 'key' entry and extract URI from it # Search for 'key' entry and extract URI from it
response = self.get_request(self.root_uri + systems_uri) response = self.get_request(self.root_uri + systems_uri)
@ -1886,7 +1886,7 @@ class RedfishUtils(object):
memory_results = [] memory_results = []
key = "Memory" key = "Memory"
# Get these entries, but does not fail if not found # Get these entries, but does not fail if not found
properties = ['SerialNumber', 'MemoryDeviceType', 'PartNumber', properties = ['Id', 'SerialNumber', 'MemoryDeviceType', 'PartNumber',
'MemoryLocation', 'RankCount', 'CapacityMiB', 'OperatingMemoryModes', 'Status', 'Manufacturer', 'Name'] 'MemoryLocation', 'RankCount', 'CapacityMiB', 'OperatingMemoryModes', 'Status', 'Manufacturer', 'Name']
# Search for 'key' entry and extract URI from it # Search for 'key' entry and extract URI from it
@ -1943,7 +1943,7 @@ class RedfishUtils(object):
nic_results = [] nic_results = []
key = "EthernetInterfaces" key = "EthernetInterfaces"
# Get these entries, but does not fail if not found # Get these entries, but does not fail if not found
properties = ['Description', 'FQDN', 'IPv4Addresses', 'IPv6Addresses', properties = ['Name', 'Id', 'Description', 'FQDN', 'IPv4Addresses', 'IPv6Addresses',
'NameServers', 'MACAddress', 'PermanentMACAddress', 'NameServers', 'MACAddress', 'PermanentMACAddress',
'SpeedMbps', 'MTUSize', 'AutoNeg', 'Status'] 'SpeedMbps', 'MTUSize', 'AutoNeg', 'Status']
@ -2368,7 +2368,7 @@ class RedfishUtils(object):
properties = ['Status', 'HostName', 'PowerState', 'Model', 'Manufacturer', properties = ['Status', 'HostName', 'PowerState', 'Model', 'Manufacturer',
'PartNumber', 'SystemType', 'AssetTag', 'ServiceTag', 'PartNumber', 'SystemType', 'AssetTag', 'ServiceTag',
'SerialNumber', 'SKU', 'BiosVersion', 'MemorySummary', 'SerialNumber', 'SKU', 'BiosVersion', 'MemorySummary',
'ProcessorSummary', 'TrustedModules'] 'ProcessorSummary', 'TrustedModules', 'Name', 'Id']
response = self.get_request(self.root_uri + systems_uri) response = self.get_request(self.root_uri + systems_uri)
if response['ret'] is False: if response['ret'] is False: