diff --git a/cray/modules/bos/cli.py b/cray/modules/bos/cli.py index 7cb9c2e..81763a3 100644 --- a/cray/modules/bos/cli.py +++ b/cray/modules/bos/cli.py @@ -155,32 +155,15 @@ def _decorator(filter_ids, filter_session, patch, enabled, retry_policy, clear_p def setup_components_patch(): """ Sets up an updatemany command for components """ - source_command = cli.commands['v2'].commands['components'].commands['list'] + source_command = cli.commands['v2'].commands['components'].commands.pop('create') command_type = type(source_command) new_command = command_type("updatemany") for key, value in source_command.__dict__.items(): setattr(new_command, key, value) - cli.commands['v2'].commands['components'].commands[ - 'updatemany'] = new_command + cli.commands['v2'].commands['components'].commands['updatemany'] = new_command new_command.params = [] default_params = [param for param in source_command.params if not param.expose_value] - option( - '--filter-ids', - callback=_opt_callback, - type=str, - default='', - metavar='TEXT', - help="A comma-separated list of nodes to patch" - )(new_command) - option( - '--filter-session', - callback=_opt_callback, - type=str, - default='', - metavar='TEXT', - help="Patch all components owned by this session" - )(new_command) option( '--patch', callback=_opt_callback,