]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
PhysicalConsole: Add timeout arg to power_cycle()
authorZack Cerza <zack@redhat.com>
Wed, 23 Aug 2017 19:10:41 +0000 (13:10 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 30 Nov 2017 00:06:18 +0000 (17:06 -0700)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/orchestra/console.py

index c59c366531464d9a7d820f5e2c57f3c4fb74b5d3..e10c08c8039a25a5ef3ad279baf02f44caffdabb 100644 (file)
@@ -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):