Fix extra_env_files option and type in format string
extra_env_files option was broken since we refactor and
use the new VF.
Also a type in the format string is now fixed
Change-Id: I0f06d93183b566e9a3dc500dcbd00db39f8f090d
(cherry picked from commit 7b75187afb
)
This commit is contained in:
parent
c48385e5a3
commit
b0494327f7
|
@ -16,6 +16,7 @@
|
|||
import argparse
|
||||
import json
|
||||
import logging
|
||||
import yaml
|
||||
|
||||
from osc_lib import exceptions
|
||||
from osc_lib.i18n import _
|
||||
|
@ -164,8 +165,8 @@ class TripleOValidatorShowParameter(command.Command):
|
|||
parsed_args.format,
|
||||
parsed_args.download)
|
||||
if parsed_args.download:
|
||||
print("The file {} has been created successfully").format(
|
||||
parsed_args.download)
|
||||
print("The file {} has been created successfully".format(
|
||||
parsed_args.download))
|
||||
else:
|
||||
print(params)
|
||||
|
||||
|
@ -314,6 +315,13 @@ class TripleOValidatorRun(command.Command):
|
|||
LOG = logging.getLogger(__name__ + ".ValidationsRunAnsible")
|
||||
limit = parsed_args.limit
|
||||
playbook = parsed_args.playbook
|
||||
extra_vars = parsed_args.extra_vars
|
||||
if parsed_args.extra_vars_file:
|
||||
with open(parsed_args.extra_vars_file, 'r') as env_file:
|
||||
if '.json' in parsed_args.extra_vars_file:
|
||||
extra_vars.update(json.load(env_file))
|
||||
else:
|
||||
extra_vars.update(yaml.load(env_file))
|
||||
|
||||
static_inventory = oooutils.get_tripleo_ansible_inventory(
|
||||
ssh_user='heat-admin',
|
||||
|
@ -329,7 +337,7 @@ class TripleOValidatorRun(command.Command):
|
|||
inventory=static_inventory,
|
||||
limit_hosts=limit,
|
||||
group=parsed_args.group,
|
||||
extra_vars=parsed_args.extra_vars,
|
||||
extra_vars=extra_vars,
|
||||
validations_dir=constants.ANSIBLE_VALIDATION_DIR,
|
||||
validation_name=parsed_args.validation_name,
|
||||
extra_env_vars=parsed_args.extra_env_vars,
|
||||
|
|
Loading…
Reference in New Issue