Merge "NSX|V3: allow VLAN router interfaces if nsx supports it"

This commit is contained in:
Zuul 2017-11-06 12:21:49 +00:00 committed by Gerrit Code Review
commit 018a2f7f8f

View File

@ -3542,7 +3542,10 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
def _validate_multiple_subnets_routers(self, context, router_id, net_id):
network = self.get_network(context, net_id)
net_type = network.get(pnet.NETWORK_TYPE)
if (net_type and not self._is_overlay_network(context, net_id)):
if (net_type and
not self.nsxlib.feature_supported(
nsxlib_consts.FEATURE_VLAN_ROUTER_INTERFACE) and
not self._is_overlay_network(context, net_id)):
err_msg = (_("Only overlay networks can be attached to a logical "
"router. Network %(net_id)s is a %(net_type)s based "
"network") % {'net_id': net_id, 'net_type': net_type})