1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 12:06:08 +00:00

commands/list: add "augmentations" and "all"

Allow specifying "augmentations" and "all" as the plugin kind to lost.
In the case of of the former, instruments and output processors get
listed. In the case of the latter, every plugin kind gets listed.
This commit is contained in:
Sergei Trofimov 2018-06-15 12:04:12 +01:00 committed by setrofim
parent bab5f89283
commit dfa55c1322

View File

@ -27,6 +27,7 @@ class ListCommand(Command):
def initialize(self, context):
kinds = get_kinds()
kinds.extend(['augmentations', 'all'])
self.parser.add_argument('kind', metavar='KIND',
help=('Specify the kind of plugin to list. Must be '
'one of: {}'.format(', '.join(sorted(kinds)))),
@ -52,6 +53,21 @@ class ListCommand(Command):
if args.kind == 'targets':
list_targets()
elif args.kind == 'augmentations':
print('instruments:')
args.kind = 'instruments'
list_plugins(args, filters)
print('\noutput processors:')
args.kind = 'output_processors'
list_plugins(args, filters)
elif args.kind == 'all':
for kind in sorted(get_kinds()):
print('\n{}:'.format(kind))
if kind == 'targets':
list_targets()
else:
args.kind = kind
list_plugins(args, filters)
else:
list_plugins(args, filters)