DMTF/python-redfish-library

KeyError: 'Links'

Closed this issue · 5 comments

Info

Huawei server
redfish v1

Exception result

Traceback (most recent call last):
File "/home/chao/PycharmProjects/texx/rfish.py", line 7, in
REDFISH_OBJ = redfish.redfish_client(base_url=login_host, username=login_account, password=login_password, default_prefix=default_prefix)
File "/home/chao/Desktop/python-redfish-library/src/redfish/rest/v1.py", line 954, in redfish_client
default_prefix=default_prefix, sessionkey=sessionkey)
File "/home/chao/Desktop/python-redfish-library/src/redfish/rest/v1.py", line 894, in init
self.login_url = self.root.Links.Sessions['@odata.id']
KeyError: 'Links'

Description

login_host = https://x.x.x.x
i'm sure username and password correctly
default_prefix = /redfish/v1

@lichao0x7cc can you please provide the JSON body of the Service Root resource? It looks like there is no "Links" object from what I can gather from the exception trace.

Discussion 12/14: This appears to be an error on the service; the tool needs to log into the service, and in order to do so, it needs to find the Sessions collection link via the "Links" object in the service root.

I've been in contact with Huawei, and they are now going to add Links in the next firmware release.

I've been in contact with Huawei, and they are now going to add Links in the next firmware release.

cool!