Fixes bug 2008058 * from pyhondracclient getting last time SystemInventory Collection On Reboot
Change-Id: If8abd2a43066f2b29d27900418f2a5b7c31e2687
This commit is contained in:
parent
3e52db0511
commit
703547acc0
|
@ -94,6 +94,18 @@ class DRACClient(object):
|
|||
"""
|
||||
return self._power_mgmt.get_power_state()
|
||||
|
||||
def get_last_system_inventory_time(self):
|
||||
"""Returns This property provides the last time System Inventory
|
||||
Collection On Reboot(CSIOR) was performed. The value is represented
|
||||
as yyyymmddHHMMSS.
|
||||
:returns: value is represented as yyyymmddHHMMSS
|
||||
:raises: WSManRequestFailure on request failures
|
||||
:raises: WSManInvalidResponse when receiving invalid response
|
||||
:raises: DRACOperationFailed on error reported back by the DRAC
|
||||
interface
|
||||
"""
|
||||
return self._system_cfg.last_system_inventory_time()
|
||||
|
||||
def set_power_state(self, target_state):
|
||||
"""Turns the server power on/off or do a reboot
|
||||
|
||||
|
@ -682,7 +694,7 @@ class DRACClient(object):
|
|||
target=self.BIOS_DEVICE_FQDD,
|
||||
reboot=reboot,
|
||||
start_time=start_time)
|
||||
|
||||
|
||||
def abandon_pending_bios_changes(self):
|
||||
"""Deletes all pending changes on the BIOS
|
||||
|
||||
|
|
|
@ -57,6 +57,24 @@ class SystemConfiguration(object):
|
|||
attribute = attr_cls.parse(item)
|
||||
result[attribute.instance_id] = attribute
|
||||
return result
|
||||
|
||||
def last_system_inventory_time(self):
|
||||
""""This property provides the last time SystemInventory Collection
|
||||
On Reboot(CSIOR)was performed. The value is rep/resented as yyyymmddHHMMSS.
|
||||
|
||||
:returns: the time when the machine is last rebooted
|
||||
:raises: WSManRequestFailure on request failures
|
||||
:raises: WSManInvalidResponse when receiving invalid response
|
||||
:raises: DRACOperationFailed on error reported back by the DRAC
|
||||
interface
|
||||
"""
|
||||
|
||||
filter_query = ('select LastSystemInventoryTime from DCIM_SystemView')
|
||||
doc = self.client.enumerate(uris.DCIM_SystemView,
|
||||
filter_query=filter_query)
|
||||
inventorytime = utils.find_xml(doc, 'LastSystemInventoryTime',
|
||||
uris.DCIM_SystemView)
|
||||
return inventorytime.text
|
||||
|
||||
|
||||
class SystemAttribute(object):
|
||||
|
|
Loading…
Reference in New Issue