[Validator Show Run] Display simplified results by default

This patch is displaying the content of the validation_output dictionary
which is a simplified output content (the former validation_output)
instead of dumping the entire log file in the stdout.

It also fixes the --full argument which was True forever!

Change-Id: Id94132d23d272d383b65a839a75b08f855fb6be3
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
(cherry picked from commit 4229bee940)
This commit is contained in:
Gael Chamoulaud (Strider) 2020-10-20 15:21:54 +02:00
parent 73d2439c98
commit 7873e6d800
No known key found for this signature in database
GPG Key ID: 4119D0305C651D66
1 changed files with 4 additions and 3 deletions

View File

@ -408,7 +408,6 @@ class TripleOValidatorShowRun(command.Command):
parser.add_argument('--full',
action='store_true',
default=True,
help='Show Full Details for the run')
return parser
@ -422,8 +421,10 @@ class TripleOValidatorShowRun(command.Command):
print(json.dumps(d, indent=4, sort_keys=True))
else:
for d in data:
for p in d['plays']:
print(json.dumps(p['tasks'], indent=4, sort_keys=True))
for p in d.get('validation_output', []):
print(json.dumps(p['tasks'],
indent=4,
sort_keys=True))
else:
raise exceptions.CommandError(
"Could not find the log file linked to this UUID: %s" %