NSX|V rename distributed router plr edge when router is renamed

When renaming a distributed router, we should rename the plr edge
too, if it exists

Change-Id: I1639ec143510a9a4416b46c19713b669fff18071
This commit is contained in:
Adit Sarfaty 2016-05-19 11:51:48 +03:00
parent c48cccebb8
commit dc6bb74134

View File

@ -119,6 +119,11 @@ class RouterDistributedDriver(router_driver.RouterBaseDriver):
context, router_id, self.get_type(), r['admin_state_up'])
if 'name' in r:
self.edge_manager.rename_lrouter(context, router_id, r['name'])
# if we have a plr router - rename it too
plr_id = self.edge_manager.get_plr_by_tlr_id(context, router_id)
if plr_id:
self.edge_manager.rename_lrouter(context, plr_id, r['name'])
return self.plugin.get_router(context, router_id)
def delete_router(self, context, router_id):