NSX|P: Delete mdproxy port upon network deletion

Even when policy MDProxy is supported, the plugin should try to
delete the mdproxy port, since mp mdproxy might have been used
in the creation of this network.
In case it didn't - the port will not be found, which is ok.

Change-Id: I367a706e9f3a18b14209c1fba214cd114ef20631
This commit is contained in:
asarfaty 2019-12-04 11:57:22 +02:00 committed by Adit Sarfaty
parent 4e7d4894d1
commit 3c1443a83e
1 changed files with 1 additions and 3 deletions

View File

@ -810,9 +810,7 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
# MP MD proxy when this network is created.
# If not - the port will not be found, and it is ok.
# Note(asarfaty): In the future this code can be removed.
if (not is_external_net and cfg.CONF.nsx_p.allow_passthrough and
not self.nsxpolicy.feature_supported(
nsxlib_consts.FEATURE_NSX_POLICY_MDPROXY)):
if not is_external_net and cfg.CONF.nsx_p.allow_passthrough:
self._delete_nsx_port_by_network(network_id)
# Delete the network segment from the backend