Browse Source

Merge "Fix set by merging two list without duplicate" into stable/ussuri

changes/41/787841/1
Zuul 4 weeks ago
committed by Gerrit Code Review
parent
commit
2deee29ca6
2 changed files with 6 additions and 5 deletions
  1. +5
    -4
      scripts/tripleo-ansible-inventory
  2. +1
    -1
      tripleo_validations/utils.py

+ 5
- 4
scripts/tripleo-ansible-inventory View File

@ -130,8 +130,9 @@ def write_static_inventory(inventory_file_path, inventory):
def main():
configs = _parse_config()
auth_variables = {}
if configs.auth_url:
auth_variables = {
auth_variables.update({
'auth_url': configs.auth_url,
'username': configs.username,
'project_name': configs.project_name,
@ -139,13 +140,13 @@ def main():
'password': configs.password,
'cacert': configs.cacert,
'timeout': 30
}
})
elif configs.os_cloud:
config = os_client_config.OpenStackConfig()
for cloud in config.get_all_clouds():
if cloud.name == configs.os_cloud:
try:
auth_variables = {
auth_variables.update({
'auth_url': cloud.config['auth'].get('auth_url'),
'username': cloud.config['auth'].get('username'),
'project_name':
@ -155,7 +156,7 @@ def main():
'password': cloud.config['auth'].get('password'),
'cacert': cloud.config.get('cacert'),
'timeout': cloud.config.get('api_timeout')
}
})
except KeyError:
raise KeyError("Missing values in clouds.yaml format")
else:


+ 1
- 1
tripleo_validations/utils.py View File

@ -101,7 +101,7 @@ def list_plan_and_stack(hclient, swiftclient):
plan_list.append(ac['name'])
except swiftexceptions.ClientException:
return None
return list(set(stacks).intersection(list(plan_list)))
return list(set(stacks).union(plan_list))
def filtered(obj):


Loading…
Cancel
Save