Merge "NSX|V3: Configure tier0 transit networks"
This commit is contained in:
commit
9e3533db93
@ -479,7 +479,11 @@ nsx_v3_opts = nsx_v3_and_p + [
|
||||
cfg.BoolOpt('housekeeping_readonly',
|
||||
default=True,
|
||||
help=_("Housekeeping will only warn about breakage.")),
|
||||
|
||||
cfg.ListOpt('transit_networks',
|
||||
default=['100.64.0.0/16'],
|
||||
help=_("List of transit networks used by NSX tier0 routers. "
|
||||
"Neutron subnets will not be allowed to use those "
|
||||
"cidrs")),
|
||||
]
|
||||
|
||||
nsx_p_opts = nsx_v3_and_p + [
|
||||
|
@ -1618,13 +1618,14 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
|
||||
|
||||
# Check if subnet overlaps with shared address space.
|
||||
# This is checked on the backend when attaching subnet to a router.
|
||||
shared_ips = '100.64.0.0/10'
|
||||
shared_ips_cidrs = cfg.CONF.nsx_v3.transit_networks
|
||||
for subnet_net in subnet_networks:
|
||||
if netaddr.IPSet(subnet_net) & netaddr.IPSet([shared_ips]):
|
||||
msg = _("Subnet overlaps with shared address space "
|
||||
"%s") % shared_ips
|
||||
LOG.error(msg)
|
||||
raise n_exc.InvalidInput(error_message=msg)
|
||||
for shared_ips in shared_ips_cidrs:
|
||||
if netaddr.IPSet(subnet_net) & netaddr.IPSet([shared_ips]):
|
||||
msg = _("Subnet overlaps with shared address space "
|
||||
"%s") % shared_ips
|
||||
LOG.error(msg)
|
||||
raise n_exc.InvalidInput(error_message=msg)
|
||||
|
||||
# Ensure that the NSX uplink does not lie on the same subnet as
|
||||
# the external subnet
|
||||
|
Loading…
x
Reference in New Issue
Block a user