Fix example for simulator to work with the HPE ilorestfulapiexplorer
Change-Id: Ifc1a284e1a2f8fb727627edb1b026dfdfaeebf0c
This commit is contained in:
parent
95301e3d0c
commit
2e51f7b4b6
@ -1,6 +1,10 @@
|
||||
# coding=utf-8
|
||||
|
||||
""" Simple example to use python-redfish with DMTF simulator """
|
||||
""" Simple example to use python-redfish with HPE simulator """
|
||||
# Works fine after the declaration of the default server with
|
||||
# redfish-client config add default \
|
||||
# https://ilorestfulapiexplorer.ext.hpe.com/redfish/v1
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import print_function
|
||||
from __future__ import division
|
||||
@ -39,6 +43,7 @@ try:
|
||||
USER_NAME,
|
||||
PASSWORD,
|
||||
simulator=True,
|
||||
verify_cert=False,
|
||||
enforceSSL=False)
|
||||
except redfish.exception.RedfishException as e:
|
||||
sys.stderr.write(e.message)
|
||||
@ -52,5 +57,5 @@ print("System 1 :\n")
|
||||
print("Bios version : {}\n".format(
|
||||
remote_mgmt.Systems.systems_dict["1"].get_bios_version()))
|
||||
print("System 2 :\n")
|
||||
print("Bios version : {}\n".format(
|
||||
remote_mgmt.Systems.systems_dict["2"].get_parameter("SerialNumber")))
|
||||
print("Serial Number : {}\n".format(
|
||||
remote_mgmt.Systems.systems_dict["1"].get_parameter("SerialNumber")))
|
||||
|
Loading…
Reference in New Issue
Block a user