NSX-v3: Fix add router interface for VLAN downlinks
In NSX, a service router is required when attaching a VLAN interface to a router. This change ensures the service router is set before attaching the interface. This allow for the interface to be attached even before setting a gateway for the router. Change-Id: Ia070aed9c97f3c87615b9c7e0b084f2edb26e0a9
This commit is contained in:
parent
acd8a2797a
commit
31c2b87b9a
@ -2571,6 +2571,13 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
|
||||
resource_type = (None if overlay_net else
|
||||
nsxlib_consts.LROUTERPORT_CENTRALIZED)
|
||||
|
||||
# Centralized router port require a service router
|
||||
if resource_type == nsxlib_consts.LROUTERPORT_CENTRALIZED:
|
||||
if not self.verify_sr_at_backend(
|
||||
context, router_id):
|
||||
self.create_service_router(
|
||||
context, router_id, router=router_db)
|
||||
|
||||
# Validate the TZ of the new subnet match the one of the router
|
||||
tier0_uuid = self._get_tier0_uuid_by_router(context.elevated(),
|
||||
router_db)
|
||||
|
Loading…
Reference in New Issue
Block a user