Browse Source

Add UUID to System object in python-dracclient

Change-Id: I322d07f425470c585db950ef27cd4b9364eff71c
changes/37/605637/1
digambar 3 years ago
parent
commit
1baaadf7f2
3 changed files with 4 additions and 1 deletions
  1. +2
    -1
      dracclient/resources/inventory.py
  2. +1
    -0
      dracclient/tests/test_inventory.py
  3. +1
    -0
      dracclient/tests/wsman_mocks/system_view-enum-ok.xml

+ 2
- 1
dracclient/resources/inventory.py View File

@ -59,7 +59,7 @@ NIC = collections.namedtuple(
System = collections.namedtuple(
'System',
['id', 'lcc_version', 'model', 'service_tag'])
['id', 'lcc_version', 'model', 'service_tag', 'uuid'])
class InventoryManagement(object):
@ -206,6 +206,7 @@ class InventoryManagement(object):
def _parse_drac_system(self, drac_system):
return System(
id=self._get_system_attr(drac_system, 'InstanceID'),
uuid=self._get_system_attr(drac_system, 'UUID'),
service_tag=self._get_system_attr(drac_system, 'ServiceTag'),
model=self._get_system_attr(drac_system, 'Model'),
lcc_version=self._get_system_attr(drac_system,


+ 1
- 0
dracclient/tests/test_inventory.py View File

@ -135,6 +135,7 @@ class ClientInventoryManagementTestCase(base.BaseTest):
def test_get_system(self, mock_requests, mock_wait_until_idrac_is_ready):
expected_system = inventory.System(
id='System.Embedded.1',
uuid='ebd4edd3-dfd7-4c7d-a2c8-562b3c23b811',
service_tag='A1B2C3D',
model='PowerEdge R630',
lcc_version='2.1.0')


+ 1
- 0
dracclient/tests/wsman_mocks/system_view-enum-ok.xml View File

@ -17,6 +17,7 @@
<n1:LifecycleControllerVersion>2.1.0</n1:LifecycleControllerVersion>
<n1:Model>PowerEdge R630</n1:Model>
<n1:ServiceTag>A1B2C3D</n1:ServiceTag>
<n1:UUID>ebd4edd3-dfd7-4c7d-a2c8-562b3c23b811</n1:UUID>
</n1:DCIM_SystemView>
</wsman:Items>
<wsman:EndOfSequence/>


Loading…
Cancel
Save