From cbf2cdcdc5b1173a24090a4f8330ec771e6b338f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 1 Aug 2023 16:08:51 -0400 Subject: [PATCH] Scale timeout with number of outlets Delta PDUs seem to serialize outlet operation. --- .../confluent/plugins/hardwaremanagement/deltapdu.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/deltapdu.py b/confluent_server/confluent/plugins/hardwaremanagement/deltapdu.py index 7a607545..220945b7 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/deltapdu.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/deltapdu.py @@ -199,11 +199,13 @@ def update(nodes, element, configmanager, inputdata): if 'outlets' not in element: yield msg.ConfluentResourceUnavailable(node, 'Not implemented') return + timeout = 1 for node in nodes: gc = PDUClient(node, configmanager) newstate = inputdata.powerstate(node) gc.set_outlet(element[-1], newstate) + timeout += 1 gc.logout() - eventlet.sleep(2) + eventlet.sleep(timeout) for res in retrieve(nodes, element, configmanager, inputdata): yield res