From 5c67a5c25aeeb3249859cba56fc3e45632a9659f Mon Sep 17 00:00:00 2001 From: Shih-Hao Li Date: Mon, 21 Nov 2016 09:04:25 -0800 Subject: [PATCH] NSXv3: Fix a router port name update issue When updating the name of a router, the name of associated router ports should also be updated. The current code has a bug that also tries to update the attachment at the same time. This patch fixes that problem. Change-Id: Ifdd58a0e9cd5a35fd3ab68617a07a25c3630a8fa --- vmware_nsxlib/v3/resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmware_nsxlib/v3/resources.py b/vmware_nsxlib/v3/resources.py index f20074aa..fbd03b27 100644 --- a/vmware_nsxlib/v3/resources.py +++ b/vmware_nsxlib/v3/resources.py @@ -254,7 +254,7 @@ class LogicalPort(AbstractRESTResource): 'resource_type': nsx_constants.CIF_RESOURCE_TYPE} attachment['context'] = context return attachment - elif attachment_type is None or vif_uuid is None: + elif attachment_type is None and vif_uuid is None: return None # reset attachment else: return False # no attachment change