几天有人问我redfish操作。有个客户说在浏览器输入redfish api无法打开。一般是用postman软件进行操作,记得在setting中关闭ssl。其实可以通过python也可以相关操作,这样更贴近上层应用

 

import redfish

login_host="https://10.93.20.10"
login_account="ADMIN"
login_password="ADMIN"
REDFISH_OBJ = redfish.redfish_client(base_url=login_host, username=login_account, password=login_password, default_prefix='/redfish/v1')
REDFISH_OBJ.login(auth="session")
response = REDFISH_OBJ.get("/redfish/v1/Systems/1", None)
print(response)
REDFISH_OBJ.logout()

  

 

 

posted on 2018-12-27 15:33  uxiuxi  阅读(4584)  评论(1)    收藏  举报