Merge "Fix help texts of inventory options"

This commit is contained in:
Zuul 2021-04-12 19:58:22 +00:00 committed by Gerrit Code Review
commit 7d5d374120
2 changed files with 4 additions and 5 deletions

View File

@ -58,8 +58,7 @@ def add_args(parser):
parser.add_argument("-i", "--inventory", metavar="INVENTORY",
action="append",
help="specify inventory host path "
"(default=$%s/inventory or %s/inventory) or "
"comma-separated host list" %
"(default=$%s/inventory or %s/inventory) " %
(CONFIG_PATH_ENV, DEFAULT_CONFIG_PATH))
parser.add_argument("-l", "--limit", metavar="SUBSET",
help="further limit selected hosts to an additional "

View File

@ -50,8 +50,8 @@ def add_args(parser):
"YAML/JSON for Kolla Ansible")
parser.add_argument("-ki", "--kolla-inventory", metavar="INVENTORY",
help="specify inventory host path "
"(default=$%s/inventory or %s/inventory) or "
"comma-separated host list for Kolla Ansible" %
"(default=$%s/inventory or %s/inventory) for "
"Kolla Ansible" %
(CONFIG_PATH_ENV, DEFAULT_CONFIG_PATH))
parser.add_argument("-kl", "--kolla-limit", metavar="SUBSET",
help="further limit selected hosts to an additional "
@ -87,7 +87,7 @@ def _validate_args(parsed_args, inventory_filename):
sys.exit(1)
inventory = _get_inventory_path(parsed_args, inventory_filename)
result = utils.is_readable_dir(parsed_args.kolla_venv)
result = utils.is_readable_dir(inventory)
if not result["result"]:
# NOTE(mgoddard): Previously the inventory was a file, now it is a
# directory to allow us to support inventory host_vars. Support both