]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Rename _build_command() to _ipmi_command()
authorZack Cerza <zack@redhat.com>
Wed, 24 Aug 2016 14:35:11 +0000 (08:35 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 30 Aug 2016 16:47:33 +0000 (10:47 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/orchestra/console.py
teuthology/orchestra/test/test_console.py

index e2dcd0096daad1d05c8d3c4d02a2302b743ed496..29ed6cf181a005dd554c101ad51bb861a5d5b753 100644 (file)
@@ -60,7 +60,7 @@ class PhysicalConsole():
         Run the cmd specified using ipmitool.
         """
         self._check_credentials()
-        full_command = self._build_command(cmd)
+        full_command = self._ipmi_command(cmd)
         log.debug('pexpect command: %s', full_command)
         child = pexpect.spawn(
             full_command,
@@ -76,9 +76,9 @@ class PhysicalConsole():
                 host=self.shortname,
             )
         else:
-            return self._build_command('sol activate')
+            return self._ipmi_command('sol activate')
 
-    def _build_command(self, subcommand):
+    def _ipmi_command(self, subcommand):
         template = \
             'ipmitool -H {s}.{dn} -I lanplus -U {ipmiuser} -P {ipmipass} {cmd}'
         return template.format(
@@ -247,7 +247,7 @@ class PhysicalConsole():
         :returns: a subprocess.Popen object
         """
         self._check_credentials()
-        ipmi_cmd = self._build_command('sol activate')
+        ipmi_cmd = self._ipmi_command('sol activate')
         pexpect_templ = \
             "import pexpect; " \
             "pexpect.run('{cmd}', logfile=file('{log}', 'w'), timeout=None)"
index 0782d13391f44b5183c27548df6271f7a25fa5c7..3e24e07852ead18818b51102748c4531f06bd2e6 100644 (file)
@@ -52,14 +52,14 @@ class TestPhysicalConsole(TestConsole):
             c='sol activate',
         )
 
-    def test_build_command_ipmi(self):
+    def test_ipmi_command_ipmi(self):
         cons = self.klass(
             self.hostname,
             teuth_config.ipmi_user,
             teuth_config.ipmi_password,
             teuth_config.ipmi_domain,
         )
-        pc_cmd = cons._build_command('power cycle')
+        pc_cmd = cons._ipmi_command('power cycle')
         assert pc_cmd == self.ipmi_cmd_templ.format(
             h=self.hostname,
             d=teuth_config.ipmi_domain,