From cdde1ae2705c02ffaf1a5fc8167f420502050e79 Mon Sep 17 00:00:00 2001 From: Shih-Hao Li Date: Thu, 15 Sep 2016 08:46:49 -0700 Subject: [PATCH] NSX|V3: Add retry logic for deleting logical router port Change-Id: Ib765015cf545ffc117785b9eee9484479e502048 --- vmware_nsx/nsxlib/v3/resources.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vmware_nsx/nsxlib/v3/resources.py b/vmware_nsx/nsxlib/v3/resources.py index 270e483d72..05a01637e2 100644 --- a/vmware_nsx/nsxlib/v3/resources.py +++ b/vmware_nsx/nsxlib/v3/resources.py @@ -397,6 +397,9 @@ class LogicalRouterPort(AbstractRESTResource): # new revision_id return self._client.update(logical_port_id, body=logical_router_port) + @utils.retry_upon_exception_nsxv3( + exceptions.StaleRevision, + max_attempts=cfg.CONF.nsx_v3.retries) def delete(self, logical_port_id): return self._client.url_delete(logical_port_id)