Handle single default v4 gateway

If we are given a single v4 gateway, make sure we use it.
Otherwise assume the current gateway is OK, and do not
look at the gateways of the v4 subnets we are given.

Change-Id: Id85bda590367bf6772e2ae451e44bb0608987e26
This commit is contained in:
Doug Hellmann
2014-05-28 14:46:48 -07:00
parent aaa943cc84
commit 21596fc67b
4 changed files with 56 additions and 1 deletions

View File

@@ -542,6 +542,8 @@ class Network(ModelBase):
class Configuration(ModelBase):
def __init__(self, conf_dict={}):
gw = conf_dict.get('default_v4_gateway')
self.default_v4_gateway = netaddr.IPAddress(gw) if gw else None
self.asn = conf_dict.get('asn', DEFAULT_AS)
self.neighbor_asn = conf_dict.get('neighbor_asn', self.asn)
self.networks = [