Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mharding-hpe committed Sep 17, 2024
1 parent 1646731 commit 5be1cca
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions cray/modules/bos/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,7 @@ def _decorator(clear_pending_state, **kwargs):
def modify_component_patch():
""" Modifies update command for components """
source_command = cli.commands['v2'].commands['components'].commands['update']
command_type = type(source_command)
new_command = command_type("update")
for key, value in source_command.__dict__.items():
setattr(new_command, key, value)
cli.commands['v2'].commands['components'].commands['update'] = new_command
new_command.params = []
default_params = [param for param in source_command.params if
not param.expose_value]
option(
source_command.params.append(option(
'--clear-pending-state',
is_flag=True,
help='Shortcut for --staged-state-session "" --staged-state-configuration "" '
Expand All @@ -253,9 +245,8 @@ def modify_component_patch():
'--desired-state-configuration "" --desired-state-boot-artifacts-initrd "" '
'--desired-state-boot-artifacts-kernel-parameters "" '
'--desired-state-boot-artifacts-kernel ""'
)(new_command)
new_command.params += default_params
new_command.callback = create_patch_compnent_shim(new_command.callback)
))
source_command.callback = create_patch_compnent_shim(source_command.callback)


def setup_v2_template_create():
Expand Down

0 comments on commit 5be1cca

Please sign in to comment.