From 35faafc3a249233de3b3af8ad455495dfcf14dbb Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Sun, 21 Aug 2016 06:42:41 -0700 Subject: [PATCH] NSX|V: do not rename edge if not necessary Do not rename the edge if it already has the name. Change-Id: I8d1b71777ad29c11e8e19b462981fe02a23bba77 --- vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py b/vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py index 2d40aa95a3..114010ffd4 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py +++ b/vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py @@ -512,6 +512,9 @@ class EdgeApplianceDriver(object): # First get the current edge structure # [0] is the status, [1] is the body edge = self.vcns.get_edge(edge_id)[1] + if edge['name'] == name: + LOG.debug('Edge %s is already named %s', edge_id, name) + return # remove some data that will make the update fail edge_utils.remove_irrelevant_keys_from_edge_request(edge) # set the new name in the request