Create new function: get_serialnumber. Tested with Simulator (v1) + Proliant v0.9.5 + Proliant v1.0
This commit is contained in:
parent
d3506f6a2e
commit
c48f239792
@ -42,4 +42,6 @@ print ("Redfish API version : %s \n" % remote_mgmt.get_api_version())
|
||||
|
||||
print("Bios version : {}\n".format(remote_mgmt.Systems.systems_list[0].get_bios_version()))
|
||||
|
||||
print("Serial Number : {}\n".format(remote_mgmt.Systems.systems_list[0].get_serialnumber()))
|
||||
|
||||
remote_mgmt.logout()
|
||||
|
@ -186,6 +186,15 @@ class Systems(Base):
|
||||
# Hopefully this kind of discrepencies will be fixed with Redfish 1.0 (August)
|
||||
return self.data.BiosVersion
|
||||
|
||||
def get_serialnumber(self):
|
||||
try:
|
||||
# Returned by proliant
|
||||
return self.data.SerialNumber
|
||||
except:
|
||||
# Returned by mockup.
|
||||
# Hopefully this kind of discrepencies will be fixed with Redfish 1.0 (August)
|
||||
return ""
|
||||
|
||||
|
||||
class SystemsCollection(BaseCollection):
|
||||
"""Class to manage redfish ManagersCollection data."""
|
||||
|
Loading…
Reference in New Issue
Block a user