Search all nodes except master on TcpCloud driver
Change-Id: I4adc391a54987cbdead415073eb9207e40f05593
This commit is contained in:
parent
40baf41373
commit
048687f983
|
@ -219,7 +219,8 @@ class TCPCloudManagement(cloud_management.CloudManagement):
|
|||
|
||||
def _get_cloud_hosts(self):
|
||||
if not self.cached_cloud_hosts:
|
||||
cmd = "salt -E '(ctl*|cmp*)' network.interfaces --out=yaml"
|
||||
# get all nodes except salt master (that has cfg* hostname)
|
||||
cmd = "salt -E '^(?!cfg)' network.interfaces --out=yaml"
|
||||
result = self.execute_on_master_node({'command': cmd})
|
||||
stdout = result[0].payload['stdout']
|
||||
for fqdn, net_data in yaml.load(stdout).items():
|
||||
|
|
|
@ -44,7 +44,7 @@ class TCPCloudManagementTestCase(test.TestCase):
|
|||
'username': 'root',
|
||||
}
|
||||
self.get_nodes_cmd = (
|
||||
"salt -E '(ctl*|cmp*)' network.interfaces --out=yaml")
|
||||
"salt -E '^(?!cfg)' network.interfaces --out=yaml")
|
||||
|
||||
@mock.patch('os_faults.ansible.executor.AnsibleRunner', autospec=True)
|
||||
@ddt.data((
|
||||
|
@ -207,7 +207,7 @@ class TcpServiceTestCase(test.TestCase):
|
|||
'username': 'root',
|
||||
}
|
||||
self.get_nodes_cmd = (
|
||||
"salt -E '(ctl*|cmp*)' network.interfaces --out=yaml")
|
||||
"salt -E '^(?!cfg)' network.interfaces --out=yaml")
|
||||
|
||||
@mock.patch('os_faults.ansible.executor.AnsibleRunner', autospec=True)
|
||||
@ddt.data(*tcpcloud.TCPCloudManagement.SERVICE_NAME_TO_CLASS.items())
|
||||
|
|
Loading…
Reference in New Issue