Fix history list sub command when not using the default log dir
The 'history list' sub command is always getting the log files from the default directory ('~/validations') even if the user decided to write them in one other directory. $ validation run --validation 512e \ --validation-log-dir /var/log/validations \ --inventory /etc/ansible/hosts $ validation -vvv --debug history list \ --validation-log-dir /var/log/validations ... FileNotFoundError: [Errno 2] No such file or directory: '/home/validations/validations' This patch fixes this wrong behavior by passing the --validation-log-dir argument value to the show_history actions. Moreover, the ValidationActions class is taken validation_path and group as parameters. Passing --validation-log-dir argument value is wrong and useless. Change-Id: I9962d449ee507ee64d0c884199d02cd9ce786c9b Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
This commit is contained in:
parent
85947ee8e0
commit
bf95674c5f
|
@ -62,10 +62,11 @@ class ListHistory(BaseLister):
|
|||
"{} last validations.").format(
|
||||
parsed_args.history_limit))
|
||||
|
||||
actions = ValidationActions(parsed_args.validation_log_dir)
|
||||
actions = ValidationActions()
|
||||
|
||||
return actions.show_history(
|
||||
validation_ids=parsed_args.validation,
|
||||
log_path=parsed_args.validation_log_dir,
|
||||
history_limit=parsed_args.history_limit)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue