From fb409edeb76c9d21ee05424cf8c72994679107f7 Mon Sep 17 00:00:00 2001 From: matbu Date: Tue, 30 Mar 2021 15:20:02 +0200 Subject: [PATCH] Move static-inventory option into parser group Static-inventory should not be in extra_vars_group, this patch move this option into parser. It's faling when we want to provide both: --static-inventory and --extra-vars option since the extra_vars_group is mutually exclusive. Change-Id: I973ea8c210db477b735a99755332346a646bea19 (cherry picked from commit 986f9261119f64fcbfe1c3957ee1c721eed370df) --- tripleoclient/v1/tripleo_validator.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tripleoclient/v1/tripleo_validator.py b/tripleoclient/v1/tripleo_validator.py index ad99e84f4..9d996d13a 100644 --- a/tripleoclient/v1/tripleo_validator.py +++ b/tripleoclient/v1/tripleo_validator.py @@ -254,6 +254,18 @@ class TripleOValidatorRun(command.Command): " run invocation. For example: --limit \"compute-0," " compute-1, compute-5\".") ) + + parser.add_argument( + '--static-inventory', + action='store', + default='', + help=_( + "Provide your own static inventory file. You can generate " + "such an inventory calling tripleo-ansible-inventory command. " + "Especially useful when heat service isn't available." + ) + ) + extra_vars_group = parser.add_mutually_exclusive_group(required=False) extra_vars_group.add_argument( @@ -292,17 +304,6 @@ class TripleOValidatorRun(command.Command): "will override the other(s)") ) - extra_vars_group.add_argument( - '--static-inventory', - action='store', - default='', - help=_( - "Provide your own static inventory file. You can generate " - "such an inventory calling tripleo-ansible-inventory command. " - "Especially useful when heat service isn't available." - ) - ) - ex_group = parser.add_mutually_exclusive_group(required=True) ex_group.add_argument(