Skip to content

Commit

Permalink
Merge pull request #562 from sudorandom/Neetuj-issue550
Browse files Browse the repository at this point in the history
Resolves issue with slcli loadbal service-add
  • Loading branch information
sudorandom committed Jun 15, 2015
2 parents c600edd + b4484ef commit 04adfcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions SoftLayer/CLI/loadbal/service_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
@click.option('--healthcheck-type',
required=True,
help="The health check type")
@click.option('--ip-address', '--ip',
@click.option('--ip-address',
required=True,
help="The IP of the service")
help="The IP address of the service")
@environment.pass_env
def cli(env, identifier, enabled, port, weight, healthcheck_type, ip_address):
"""Adds a new load balancer service."""
Expand All @@ -40,7 +40,8 @@ def cli(env, identifier, enabled, port, weight, healthcheck_type, ip_address):
if ip_address:
ip_service = env.client['Network_Subnet_IpAddress']
ip_record = ip_service.getByIpAddress(ip_address)
ip_address_id = ip_record['id']
if len(ip_record) > 0:
ip_address_id = ip_record['id']

mgr.add_service(loadbal_id,
group_id,
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/testing/xmlrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ def create_test_server(transport, host='localhost', port=0):
"""Create a test XML-RPC server in a new thread."""
server = TestServer(transport, (host, port), TestHandler)
thread = threading.Thread(target=server.serve_forever,
kwargs={'poll_interval': 0.05})
kwargs={'poll_interval': 0.01})
thread.start()
return server

0 comments on commit 04adfcd

Please sign in to comment.