From: Loic Dachary Date: Sun, 29 Nov 2015 19:36:56 +0000 (+0100) Subject: openstack: display reminders before running the suite X-Git-Tag: 1.1.0~722^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d32fc847de2ac91db08da415df667071ce35bfaa;p=teuthology.git openstack: display reminders before running the suite If --wait, it is useful to display the URL/ssh reminders before waiting for the suite to complete. Signed-off-by: Loic Dachary --- diff --git a/teuthology/openstack/__init__.py b/teuthology/openstack/__init__.py index 009a1d1a3..1eb5066d7 100644 --- a/teuthology/openstack/__init__.py +++ b/teuthology/openstack/__init__.py @@ -444,24 +444,16 @@ class TeuthologyOpenStack(OpenStack): self.verify_openstack() self.setup() if self.args.suite: + if self.args.wait: + self.reminders() self.run_suite() - if self.args.key_filename: - identity = '-i ' + self.args.key_filename + ' ' - else: - identity = '' - if self.args.upload: - upload = 'upload to : ' + self.args.archive_upload - else: - upload = '' - log.info(""" -pulpito web interface: http://{ip}:8081/ -ssh access : ssh {identity}{username}@{ip} # logs in /usr/share/nginx/html -{upload}""".format(ip=self.instance.get_floating_ip_or_ip(), - username=self.username, - identity=identity, - upload=upload)) + self.reminders() if self.args.teardown: - self.teardown() + if self.args.suite and not self.args.wait: + log.error("it does not make sense to teardown a cluster" + " right after a suite is scheduled") + else: + self.teardown() def run_suite(self): """ @@ -491,6 +483,23 @@ ssh access : ssh {identity}{username}@{ip} # logs in /usr/share/nginx/ ) print self.ssh(command) + def reminders(self): + if self.args.key_filename: + identity = '-i ' + self.args.key_filename + ' ' + else: + identity = '' + if self.args.upload: + upload = 'upload to : ' + self.args.archive_upload + else: + upload = '' + log.info(""" +pulpito web interface: http://{ip}:8081/ +ssh access : ssh {identity}{username}@{ip} # logs in /usr/share/nginx/html +{upload}""".format(ip=self.instance.get_floating_ip_or_ip(), + username=self.username, + identity=identity, + upload=upload)) + def setup(self): self.instance = OpenStackInstance(self.args.name) if not self.instance.exists():