Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mharding-hpe committed Sep 18, 2024
1 parent 7df01ae commit 49654ee
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions cray/modules/bos/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 49654ee

Please sign in to comment.