Merge "Fail if the Overcloud inventory is empty"

This commit is contained in:
Zuul 2018-05-08 11:11:25 +00:00 committed by Gerrit Code Review
commit ac6f7b92f9
1 changed files with 7 additions and 0 deletions

View File

@ -138,6 +138,13 @@ def main():
ansible_ssh_user=configs.ansible_ssh_user,
plan_name=configs.stack or configs.plan)
if inventory.get_overcloud_environment() == {}:
print("Error, the environment data can not "
"be empty '{}', please check that the --stack "
"or the --plan options are configured correctly "
"and if they correspond to the stack name.")
sys.exit(1)
if configs.list:
try:
inventory_list = inventory.list()