Jira-Issue:OPENSTACK-545
fix order of hosts in json inventory generator - new filtering was reordering hosts in groups. change will preserve the order in the inventory. - also small update to destroy test to use --includedata to avoid test failure.
This commit is contained in:
parent
8f6dd908b3
commit
6225da73c6
@ -757,8 +757,8 @@ class Inventory(object):
|
||||
def _filter_hosts(self, initial_hostnames, deploy_hostnames):
|
||||
"""filter out hosts not in deploy hosts"""
|
||||
filtered_hostnames = []
|
||||
for hostname in deploy_hostnames:
|
||||
if hostname in initial_hostnames:
|
||||
for hostname in initial_hostnames:
|
||||
if hostname in deploy_hostnames:
|
||||
filtered_hostnames.append(hostname)
|
||||
return filtered_hostnames
|
||||
|
||||
|
@ -66,7 +66,7 @@ class TestFunctional(KollaCliTest):
|
||||
|
||||
# destroy services, initialize server
|
||||
try:
|
||||
self.run_cli_cmd('host destroy %s' % hostname)
|
||||
self.run_cli_cmd('host destroy %s --includedata' % hostname)
|
||||
except Exception as e:
|
||||
self.assertFalse(is_physical_host, '1st destroy exception: %s' % e)
|
||||
self.assertIn(UNKNOWN_HOST, '%s' % e,
|
||||
@ -109,7 +109,7 @@ class TestFunctional(KollaCliTest):
|
||||
|
||||
# destroy services (via --stop flag)
|
||||
try:
|
||||
self.run_cli_cmd('host destroy %s --stop' % hostname)
|
||||
self.run_cli_cmd('host destroy %s --stop --includedata' % hostname)
|
||||
except Exception as e:
|
||||
self.assertFalse(is_physical_host, '2nd destroy exception: %s' % e)
|
||||
self.assertIn(UNKNOWN_HOST, '%s' % e,
|
||||
|
Loading…
Reference in New Issue
Block a user