From 21f68bb21220f49d5d7f55fa8b40e529273e76e8 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 13 Aug 2024 15:29:15 -0400 Subject: [PATCH] Apply formatting changes --- .../plugins/hardwaremanagement/ipmi.py | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 36aa2fc9..3f7e3ef0 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -421,38 +421,38 @@ async def perform_requests(operator, nodes, element, cfg, inputdata, realop): pass - async def perform_request(operator, node, element, - configdata, inputdata, cfg, results, realop): - try: - ih = await IpmiHandler.create(operator, node, element, configdata, inputdata, - cfg, results, realop) - return await ih.handle_request() - except pygexc.IpmiException as ipmiexc: - excmsg = str(ipmiexc) - if excmsg in ('Session no longer connected', 'timeout'): - await results.put(msg.ConfluentTargetTimeout(node)) - else: - await results.put(msg.ConfluentNodeError(node, excmsg)) - #raise - except exc.TargetEndpointUnreachable as tu: - await results.put(msg.ConfluentTargetTimeout(node, str(tu))) - except ssl.SSLEOFError: - await results.put(msg.ConfluentNodeError( - node, 'Unable to communicate with the https server on ' - 'the target BMC')) - except exc.PubkeyInvalid: - await results.put(msg.ConfluentNodeError( - node, - 'Mismatch detected between target certificate fingerprint ' - 'and pubkeys.tls_hardwaremanager attribute')) - except pygexc.InvalidParameterValue as e: - await results.put(msg.ConfluentNodeError(node, str(e))) - except Exception as e: - await results.put(msg.ConfluentNodeError(node, 'Unexpected Error: {0}'.format(str(e)))) - traceback.print_exc() - finally: - await results.put('Done') + configdata, inputdata, cfg, results, realop): + try: + ih = await IpmiHandler.create( + operator, node, element, configdata, inputdata, cfg, results, + realop) + return await ih.handle_request() + except pygexc.IpmiException as ipmiexc: + excmsg = str(ipmiexc) + if excmsg in ('Session no longer connected', 'timeout'): + await results.put(msg.ConfluentTargetTimeout(node)) + else: + await results.put(msg.ConfluentNodeError(node, excmsg)) + #raise + except exc.TargetEndpointUnreachable as tu: + await results.put(msg.ConfluentTargetTimeout(node, str(tu))) + except ssl.SSLEOFError: + await results.put(msg.ConfluentNodeError( + node, 'Unable to communicate with the https server on ' + 'the target BMC')) + except exc.PubkeyInvalid: + await results.put(msg.ConfluentNodeError( + node, + 'Mismatch detected between target certificate fingerprint ' + 'and pubkeys.tls_hardwaremanager attribute')) + except pygexc.InvalidParameterValue as e: + await results.put(msg.ConfluentNodeError(node, str(e))) + except Exception as e: + await results.put(msg.ConfluentNodeError(node, 'Unexpected Error: {0}'.format(str(e)))) + traceback.print_exc() + finally: + await results.put('Done') persistent_ipmicmds = {}