From dc6bb74134707dc49f83dfa213e8acb0685c308b Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Thu, 19 May 2016 11:51:48 +0300 Subject: [PATCH] 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 --- .../plugins/nsx_v/drivers/distributed_router_driver.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py b/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py index 036a2d1436..a79959f8ec 100644 --- a/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py +++ b/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py @@ -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):