# Pastebin UP8HY1NL import logging import sushy import time LOG = logging.getLogger('nanokvm-sushy-test') LOG.setLevel(logging.DEBUG) LOG.addHandler(logging.StreamHandler()) a = sushy.auth.BasicAuth(username='x', password='x') s = sushy.Sushy('http://hyper-kvm:8080/redfish/v1', auth=a) #sys_col = s.get_system_collection() #print(sys_col.members_identities) # Get a list of systems objects available in the collection #sys_col_insts = sys_col.get_members() # Instantiate a system object, same as getting it directly # from the s.get_system() #sys_inst = sys_col.get_member(sys_col.members_identities[0]) sys_inst = s.get_system('/redfish/v1/Systems/System.1') print(sys_inst.power_state) sys_inst.reset_system(sushy.ResetType.ON) time.sleep(10) print(sys_inst.power_state)