From 3f1a1aa75fb5a6cf9856e5185e0e512ac129b6f4 Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Thu, 16 Nov 2017 09:52:56 +0200 Subject: [PATCH] NSX|V: Ignore empty gw info on router creation No need to process all GW information on router creation if it is empty Change-Id: Ic11d31ebef4e944d5ed08c1e9c941fbd17fa0821 --- vmware_nsx/plugins/nsx_v/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmware_nsx/plugins/nsx_v/plugin.py b/vmware_nsx/plugins/nsx_v/plugin.py index ee6462f093..07a0499787 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -3054,7 +3054,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin, context, lrouter, allow_metadata=(allow_metadata and self.metadata_proxy_handler)) - if gw_info != constants.ATTR_NOT_SPECIFIED and gw_info is not None: + if gw_info != constants.ATTR_NOT_SPECIFIED and gw_info: self._update_router_gw_info( context, lrouter['id'], gw_info) except Exception: