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
This commit is contained in:
Adit Sarfaty 2017-11-16 09:52:56 +02:00 committed by garyk
parent 60c44020eb
commit 3f1a1aa75f
1 changed files with 1 additions and 1 deletions

View File

@ -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: