mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 12:06:08 +00:00
commands/create: Use class name rather than user supplied name
Use the actual name of the plugin instead of the user supplied value, for consistency and ensure that duplicate entries cannot be specified.
This commit is contained in:
parent
a7d0b6fdbd
commit
a1213cf84e
@ -225,7 +225,7 @@ class CreateAgendaSubcommand(SubCommand):
|
||||
energy_config = pluginloader.get_default_config('energy_measurement')
|
||||
agenda['config']['augmentations'].append('energy_measurement')
|
||||
agenda['config']['energy_measurement'] = energy_config
|
||||
agenda['config']['energy_measurement']['instrument'] = name
|
||||
agenda['config']['energy_measurement']['instrument'] = extcls.name
|
||||
agenda['config']['energy_measurement']['instrument_parameters'] = config
|
||||
elif extcls.kind == 'workload':
|
||||
entry = OrderedDict()
|
||||
@ -236,11 +236,11 @@ class CreateAgendaSubcommand(SubCommand):
|
||||
agenda['workloads'].append(entry)
|
||||
else:
|
||||
if extcls.kind in ('instrument', 'output_processor'):
|
||||
if name not in agenda['config']['augmentations']:
|
||||
agenda['config']['augmentations'].append(name)
|
||||
if extcls.name not in agenda['config']['augmentations']:
|
||||
agenda['config']['augmentations'].append(extcls.name)
|
||||
|
||||
if name not in agenda['config']:
|
||||
agenda['config'][name] = config
|
||||
if extcls.name not in agenda['config']:
|
||||
agenda['config'][extcls.name] = config
|
||||
|
||||
if args.output:
|
||||
wfh = open(args.output, 'w')
|
||||
|
Loading…
x
Reference in New Issue
Block a user