Skip to content

Commit

Permalink
Closes-Bug: #1597190 - Default gateway was mandatory for new params, …
Browse files Browse the repository at this point in the history
…made optional

For any interface, either default_gateway can be given or single gateway for the server as in old params

Change-Id: I6e8e4e4dcb0434cd8fc50b44cb4a0f8999546cef
  • Loading branch information
nitishkrishna committed Jul 14, 2016
1 parent aeb3aec commit 65213d5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/server_mgr_main.py
Expand Up @@ -3277,8 +3277,12 @@ 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():
return str(IPNetwork(value['gateway']).ip)
return ''
if 'gateway' in value:
return str(IPNetwork(value['gateway']).ip)
if 'gateway' in server:
return str(IPNetwork(server['gateway']).ip)
else:
return ''
# end def get_control_gateway

#Function to get control section for all servers
Expand Down

0 comments on commit 65213d5

Please sign in to comment.