From: Zack Cerza Date: Wed, 23 Aug 2017 19:10:41 +0000 (-0600) Subject: PhysicalConsole: Add timeout arg to power_cycle() X-Git-Tag: 1.1.0~375^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6906da1ffc7b98564ac2008dcd338752a701d6d0;p=teuthology.git PhysicalConsole: Add timeout arg to power_cycle() Signed-off-by: Zack Cerza --- diff --git a/teuthology/orchestra/console.py b/teuthology/orchestra/console.py index c59c36653..e10c08c80 100644 --- a/teuthology/orchestra/console.py +++ b/teuthology/orchestra/console.py @@ -194,14 +194,16 @@ class PhysicalConsole(): s=self.shortname, e=e)) return False - def power_cycle(self): + def power_cycle(self, timeout=300): """ Power cycle and wait for login. + + :param timeout: How long to wait for login """ log.info('Power cycling {s}'.format(s=self.shortname)) child = self._pexpect_spawn_ipmi('power cycle') child.expect('Chassis Power Control: Cycle', timeout=self.timeout) - self._wait_for_login(timeout=300) + self._wait_for_login(timeout=timeout) log.info('Power cycle for {s} completed'.format(s=self.shortname)) def hard_reset(self):