Skip checking of Devstack hosts
Screen is not used in Devstack anymore. Change-Id: I7baf1af1d2951afe0fc0927e3f14b0c21b38ea4c
This commit is contained in:
parent
3beb80e0af
commit
07a8afaf55
|
@ -247,11 +247,9 @@ class DevStackManagement(cloud_management.CloudManagement,
|
|||
def verify(self):
|
||||
"""Verify connection to the cloud."""
|
||||
nodes = self.get_nodes()
|
||||
task = {'shell': 'screen -ls | grep -P "\\d+\\.stack"'}
|
||||
results = self.execute_on_cloud(nodes.hosts, task)
|
||||
hostnames = [result.host for result in results]
|
||||
LOG.debug('DevStack hostnames: %s', hostnames)
|
||||
LOG.info('Connected to cloud successfully')
|
||||
if nodes:
|
||||
LOG.debug('DevStack nodes: %s', nodes)
|
||||
LOG.info('Connected to cloud successfully')
|
||||
|
||||
def execute_on_cloud(self, hosts, task, raise_on_error=True):
|
||||
"""Execute task on specified hosts within the cloud.
|
||||
|
|
|
@ -68,8 +68,6 @@ class DevStackManagementTestCase(test.TestCase):
|
|||
ansible_runner_inst.execute.assert_has_calls([
|
||||
mock.call([self.host],
|
||||
{'command': 'cat /sys/class/net/eth0/address'}),
|
||||
mock.call([self.discoverd_host],
|
||||
{'shell': 'screen -ls | grep -P "\\d+\\.stack"'})
|
||||
])
|
||||
|
||||
@mock.patch('os_faults.ansible.executor.AnsibleRunner', autospec=True)
|
||||
|
@ -98,16 +96,9 @@ class DevStackManagementTestCase(test.TestCase):
|
|||
node_collection.Host('10.0.0.3'),
|
||||
node_collection.Host('10.0.0.4')
|
||||
]
|
||||
discoverd_hosts = [
|
||||
node_collection.Host('10.0.0.2', mac='mac1', fqdn=''),
|
||||
node_collection.Host('10.0.0.3', mac='mac2', fqdn=''),
|
||||
node_collection.Host('10.0.0.4', mac='mac3', fqdn='')
|
||||
]
|
||||
|
||||
ansible_runner_inst.execute.assert_has_calls([
|
||||
mock.call(hosts, {'command': 'cat /sys/class/net/eth0/address'}),
|
||||
mock.call(discoverd_hosts,
|
||||
{'shell': 'screen -ls | grep -P "\\d+\\.stack"'})
|
||||
])
|
||||
|
||||
@mock.patch('os_faults.ansible.executor.AnsibleRunner', autospec=True)
|
||||
|
|
Loading…
Reference in New Issue