Merge "Run nova service-list only for online controllers"

This commit is contained in:
Jenkins 2016-04-21 15:05:55 +00:00 committed by Gerrit Code Review
commit 93f6e0db56

View File

@ -37,6 +37,7 @@ class SanityInfrastructureTest(nmanager.SanityChecksTest):
def setUpClass(cls): def setUpClass(cls):
super(SanityInfrastructureTest, cls).setUpClass() super(SanityInfrastructureTest, cls).setUpClass()
cls.controllers = cls.config.compute.online_controllers cls.controllers = cls.config.compute.online_controllers
cls.controller_names = cls.config.compute.online_controller_names
cls.computes = cls.config.compute.online_computes cls.computes = cls.config.compute.online_computes
cls.usr = cls.config.compute.controller_node_ssh_user cls.usr = cls.config.compute.controller_node_ssh_user
cls.pwd = cls.config.compute.controller_node_ssh_password cls.pwd = cls.config.compute.controller_node_ssh_password
@ -58,7 +59,10 @@ class SanityInfrastructureTest(nmanager.SanityChecksTest):
Duration: 180 s. Duration: 180 s.
""" """
downstate = u'down' downstate = u'down'
cmd = 'source /root/openrc; nova service-list' cmd = "source /root/openrc"
for controller in self.controller_names:
cmd += '; nova service-list --host {0}'.format(controller)
if not self.controllers: if not self.controllers:
self.skipTest('Step 1 failed: there are no controller nodes.') self.skipTest('Step 1 failed: there are no controller nodes.')
ssh_client = SSHClient(self.controllers[0], ssh_client = SSHClient(self.controllers[0],