DMTF/python-redfish-library

python2.7 import redfish On failure!!

swq499809608 opened this issue · 4 comments

my env :
-- redfish.version
'2.0.8'


my code:

library/blob/master/LICENSE.md
import sys
import redfish

login_host = "https://1.2.2.2"
login_account = "xxxt"
login_password = "xxx5"

REDFISH_OBJ = redfish.redfish_client(base_url=login_host, username=login_account,password=login_password)
REDFISH_OBJ.login(auth="session")
response = REDFISH_OBJ.get("/redfish/v1/systems/1", None)
sys.stdout.write("%s\n" % response)
REDFISH_OBJ.logout()


my error

Traceback (most recent call last):
File "get_power_state.py", line 48, in get_power_state
password=login_password, default_prefix='/redfish/v1')
File "/usr/lib/python2.7/site-packages/redfish/rest/v1.py", line 1058, in redfish_client
max_retry=max_retry)
File "/usr/lib/python2.7/site-packages/redfish/rest/v1.py", line 983, in init
max_retry=max_retry)
File "/usr/lib/python2.7/site-packages/redfish/rest/v1.py", line 453, in init
self.get_root_object()
File "/usr/lib/python2.7/site-packages/redfish/rest/v1.py", line 584, in get_root_object
raise excp
RetriesExhaustedError

Since it's raising "RetriesExhaustedError" when attempting to connect, that leads me to believe that you cannot access your Redfish service. Can you try opening "https://1.2.2.2/redfish/v1/" in a browser?

@swq499809608 did you get your issue resolved?

@swq499809608 any updates on the request?

Closing; no updates from submitter