NSX|V3: Update router name on NSX
If users change router name on OpenStack, also update the corresponding name on NSX backend. Fixes-Bug: #1542443 Change-Id: I6c24f722c26ffa3af11470f6550def9a5131dd52
This commit is contained in:
parent
0363b9a601
commit
01ad2eb932
@ -1239,6 +1239,12 @@ class NsxV3Plugin(addr_pair_db.AllowedAddressPairsMixin,
|
||||
self._routerlib.delete_static_routes(nsx_router_id, route)
|
||||
for route in routes_added:
|
||||
self._routerlib.add_static_routes(nsx_router_id, route)
|
||||
if 'name' in router_data:
|
||||
name = utils.get_name_and_uuid(router_data['name'] or 'router',
|
||||
router_id)
|
||||
nsx_router_id = nsx_router_id or nsx_db.get_nsx_router_id(
|
||||
context.session, router_id)
|
||||
self._router_client.update(nsx_router_id, display_name=name)
|
||||
return super(NsxV3Plugin, self).update_router(
|
||||
context, router_id, router)
|
||||
except nsx_exc.ResourceNotFound:
|
||||
|
Loading…
x
Reference in New Issue
Block a user