From: Zack Cerza Date: Mon, 29 Aug 2016 23:02:15 +0000 (-0600) Subject: Console: rename has_credentials X-Git-Tag: 1.1.0~541^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F944%2Fhead;p=teuthology.git Console: rename has_credentials ... to has_ipmi_credentials Signed-off-by: Zack Cerza --- diff --git a/teuthology/orchestra/console.py b/teuthology/orchestra/console.py index e32acd6ec..306f8fb32 100644 --- a/teuthology/orchestra/console.py +++ b/teuthology/orchestra/console.py @@ -32,13 +32,13 @@ class PhysicalConsole(): self.ipmiuser = ipmiuser or config.ipmi_user self.ipmipass = ipmipass or config.ipmi_password self.ipmidomain = ipmidomain or config.ipmi_domain - self.has_credentials = all(map( + self.has_ipmi_credentials = all(map( lambda x: x is not None, [self.ipmiuser, self.ipmipass, self.ipmidomain] )) def _check_credentials(self): - if not self.has_credentials: + if not self.has_ipmi_credentials: log.error( "Must set ipmi_user, ipmi_password, and ipmi_domain in " \ ".teuthology.yaml" diff --git a/teuthology/task/console_log.py b/teuthology/task/console_log.py index 2624aed2e..c8ace9cc4 100644 --- a/teuthology/task/console_log.py +++ b/teuthology/task/console_log.py @@ -28,7 +28,7 @@ class ConsoleLog(Task): if not hasattr(remote.console, 'spawn_sol_log'): log.debug("%s does not support IPMI; excluding", remote.shortname) - elif not remote.console.has_credentials: + elif not remote.console.has_ipmi_credentials: log.debug("IPMI credentials not found for %s; excluding", remote.shortname) else: diff --git a/teuthology/test/task/test_console_log.py b/teuthology/test/task/test_console_log.py index e16eec269..e96dee9e2 100644 --- a/teuthology/test/task/test_console_log.py +++ b/teuthology/test/task/test_console_log.py @@ -49,9 +49,9 @@ class TestConsoleLog(TestTask): task = self.klass(self.ctx, self.task_config) assert task.enabled is False - def test_has_credentials(self): + def test_has_ipmi_credentials(self): for remote in self.ctx.cluster.remotes.keys(): - remote.console.has_credentials = False + remote.console.has_ipmi_credentials = False task = self.klass(self.ctx, self.task_config) assert len(task.cluster.remotes.keys()) == 0