Browse Source

Fix validations listing when filtering by group(s)

When running `openstack tripleo validator list --group pre-update`
command, it returns all the validations catalog and the filtering by
group(s) doesn't work.

This patch fixes this behavior by actually filtering.

Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Change-Id: I5152ad37c7e47a46eb23c3c792b31b2bf3298368
changes/54/790854/2
Gael Chamoulaud (Strider) 5 months ago
committed by Gael Chamoulaud
parent
commit
2bff6e43a9
  1. 7
      tripleoclient/v1/tripleo_validator.py

7
tripleoclient/v1/tripleo_validator.py

@ -212,9 +212,10 @@ class TripleOValidatorList(command.Lister):
try:
v_consts.DEFAULT_VALIDATIONS_BASEDIR = constants.\
DEFAULT_VALIDATIONS_BASEDIR
actions = ValidationActions(constants.ANSIBLE_VALIDATION_DIR,
parsed_args.group)
return actions.list_validations()
actions = ValidationActions(
validation_path=constants.ANSIBLE_VALIDATION_DIR
)
return actions.list_validations(parsed_args.group)
except Exception as e:
raise RuntimeError(_("Validations listing finished with errors\n"
"Output: {}").format(e))

Loading…
Cancel
Save