Skip to content

Commit

Permalink
Closes-Bug: #1597190 - Default gateway is being set as empty in SM Li…
Browse files Browse the repository at this point in the history
…te by default

Previously we were handling case where default gateway key in missing from JSON
But SM Lite generated server JSONS have this key but have value as empty
This scenario needs to be handled

Change-Id: Ibd77c9fcc4fe5361b1ce6138754977dffc329573
  • Loading branch information
nitishkrishna committed Jul 20, 2016
1 parent 0a6999f commit c4e3a29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server_mgr_main.py
Expand Up @@ -3283,9 +3283,9 @@ def get_control_ip(self, server):
def get_control_gateway(self, server):
control_intf = eval(self.get_control_interface(server))
for key, value in control_intf.iteritems():
if 'gateway' in value:
if 'gateway' in value and len(value['gateway']):
return str(IPNetwork(value['gateway']).ip)
if 'gateway' in server:
if 'gateway' in server and len(server['gateway']):
return str(IPNetwork(server['gateway']).ip)
else:
return ''
Expand Down

0 comments on commit c4e3a29

Please sign in to comment.