Skip to content

Commit b773b59

Browse files
author
Yingchao Huang
committed
Dedicatedhost#Cancel: cli bug with --immediate flag
We found weird behavior with cancellation if we set `--immediate default=True` in decorator. `slcli dedicatedhost cancel ID` => will create immediate cancellation ticket `slcli dedicatedhost cancel ID --immediate` => will create non-immediate cancellation ticket Have no idea what is the root cause, fix is to enforce `immediate = True` in function body.
1 parent cbe0ca3 commit b773b59

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

SoftLayer/CLI/dedicatedhost/cancel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
@click.option('--reason',
2222
help="An optional cancellation reason. See cancel-reasons for a list of available options")
2323
@environment.pass_env
24-
def cli(env, identifier, comment, reason, immediate=True):
24+
def cli(env, identifier, immediate, comment, reason):
2525
"""Cancel a dedicated server."""
26-
26+
immediate = True # Enforce immediate cancellation
2727
mgr = SoftLayer.DedicatedHostManager(env.client)
2828
mgr.cancel_host(identifier, reason, comment, immediate)

0 commit comments

Comments
 (0)