Skip to content

Commit 04adfcd

Browse files
committed
Merge pull request softlayer#562 from sudorandom/Neetuj-issue550
Resolves issue with slcli loadbal service-add
2 parents c600edd + b4484ef commit 04adfcd

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

SoftLayer/CLI/loadbal/service_add.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
@click.option('--healthcheck-type',
2525
required=True,
2626
help="The health check type")
27-
@click.option('--ip-address', '--ip',
27+
@click.option('--ip-address',
2828
required=True,
29-
help="The IP of the service")
29+
help="The IP address of the service")
3030
@environment.pass_env
3131
def cli(env, identifier, enabled, port, weight, healthcheck_type, ip_address):
3232
"""Adds a new load balancer service."""
@@ -40,7 +40,8 @@ def cli(env, identifier, enabled, port, weight, healthcheck_type, ip_address):
4040
if ip_address:
4141
ip_service = env.client['Network_Subnet_IpAddress']
4242
ip_record = ip_service.getByIpAddress(ip_address)
43-
ip_address_id = ip_record['id']
43+
if len(ip_record) > 0:
44+
ip_address_id = ip_record['id']
4445

4546
mgr.add_service(loadbal_id,
4647
group_id,

SoftLayer/testing/xmlrpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ def create_test_server(transport, host='localhost', port=0):
9292
"""Create a test XML-RPC server in a new thread."""
9393
server = TestServer(transport, (host, port), TestHandler)
9494
thread = threading.Thread(target=server.serve_forever,
95-
kwargs={'poll_interval': 0.05})
95+
kwargs={'poll_interval': 0.01})
9696
thread.start()
9797
return server

0 commit comments

Comments
 (0)