Skip checking of Devstack hosts

Screen is not used in Devstack anymore.

Change-Id: I7baf1af1d2951afe0fc0927e3f14b0c21b38ea4c
This commit is contained in:
Kyrylo Romanenko 2017-05-29 15:01:48 +03:00
parent 3beb80e0af
commit 07a8afaf55
2 changed files with 3 additions and 14 deletions

View File

@ -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.

View File

@ -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)