Skip to content

Commit

Permalink
Merge pull request #1154 from Bastian-Krause/bst/pdudaemon-delays
Browse files Browse the repository at this point in the history
PDUDaemonDriver improvements
  • Loading branch information
Emantor committed May 3, 2023
2 parents 6977ba3 + 01480af commit 573550e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions labgrid/driver/powerdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,22 +396,19 @@ def on_activate(self):
def on(self):
r = self._requests.get(self._build_url('on'))
r.raise_for_status()
time.sleep(1) # give pdudaemon some time to execute the request

@Driver.check_active
@step()
def off(self):
r = self._requests.get(self._build_url('off'))
r.raise_for_status()
time.sleep(1) # give pdudaemon some time to execute the request

@Driver.check_active
@step()
def cycle(self):
r = self._requests.get(self._build_url('reboot'))
r.raise_for_status()
time.sleep(self.delay + 1) # give pdudaemon some time to execute the request

@Driver.check_active
def get(self):
return None
raise NotImplementedError("pdudaemon does not support retrieving the port's state")

0 comments on commit 573550e

Please sign in to comment.