Skip to content

Commit f57683d

Browse files
Merge pull request softlayer#668 from picocandy/fix-cli-loadbal-service-edit
Fixed Load Balancer Service Edit for CLI to support --disabled
2 parents 6f92eaa + 15e95c6 commit f57683d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

SoftLayer/CLI/loadbal/service_edit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
type=click.INT,
2121
help="Change the weight of the service")
2222
@click.option('--healthcheck-type', help="Change the health check type")
23-
@click.option('--ip-address', '--ip', help="Change the IP of the service")
23+
@click.option('--ip-address', help="Change the IP address of the service")
2424
@environment.pass_env
2525
def cli(env, identifier, enabled, port, weight, healthcheck_type, ip_address):
2626
"""Edit the properties of a service group."""
@@ -30,7 +30,8 @@ def cli(env, identifier, enabled, port, weight, healthcheck_type, ip_address):
3030
loadbal_id, service_id = loadbal.parse_id(identifier)
3131

3232
# check if any input is provided
33-
if not any([ip_address, enabled, weight, port, healthcheck_type]):
33+
if ((not any([ip_address, weight, port, healthcheck_type])) and
34+
enabled is None):
3435
raise exceptions.CLIAbort(
3536
'At least one property is required to be changed!')
3637

0 commit comments

Comments
 (0)