diff --git a/confluent_server/aiohmi/ipmi/oem/lenovo/config.py b/confluent_server/aiohmi/ipmi/oem/lenovo/config.py index ebf5f7e9..12304f19 100644 --- a/confluent_server/aiohmi/ipmi/oem/lenovo/config.py +++ b/confluent_server/aiohmi/ipmi/oem/lenovo/config.py @@ -74,7 +74,7 @@ async def run_command_with_retry(connection, data): except pygexc.IpmiException as e: if e.ipmicode != 0xa or not tries: raise - connection.ipmi_session.pause(1) + await connection.ipmi_session.pause(1) def _convert_syntax(raw): @@ -198,7 +198,7 @@ class LenovoFirmwareConfig(object): break except KeyError: pass - self.connection.ipmi_session.pause(5) + await self.connection.ipmi_session.pause(5) filehandle = response['data'][3:7] filehandle = struct.unpack(" 99.0: initpct = 99.0 @@ -1039,7 +1039,7 @@ class SMMClient(object): complete = False tries = 0 while not complete: - ipmisession.Session.pause(3) + await ipmisession.Session.pause(3) wc.request('POST', '/data', 'get=fwProgress,fwUpdate') try: rsp = wc.getresponse() diff --git a/confluent_server/aiohmi/redfish/command.py b/confluent_server/aiohmi/redfish/command.py index adc7288d..e602393f 100644 --- a/confluent_server/aiohmi/redfish/command.py +++ b/confluent_server/aiohmi/redfish/command.py @@ -1586,6 +1586,10 @@ class Command(object): return await oem.apply_license(filename, self, progress, data) if __name__ == '__main__': - print(repr( - Command(sys.argv[1], os.environ['BMCUSER'], os.environ['BMCPASS'], - verifycallback=lambda x: True).get_power())) + async def main(): + cmd = await Command.create( + sys.argv[1], os.environ['BMCUSER'], os.environ['BMCPASS'], + verifycallback=lambda x: True) + print(repr(await cmd.get_power())) + + asyncio.run(main())