From 146ad050905636f536e4ab55e4ccf5b1e8ef99af Mon Sep 17 00:00:00 2001 From: asarfaty Date: Wed, 27 Jan 2021 10:44:33 +0200 Subject: [PATCH] NSX|P: Allow removing segment port address bindings Change-Id: Ic648f25850266a5e8d9e81f5857e2322692acd1e --- vmware_nsx/plugins/nsx_p/plugin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vmware_nsx/plugins/nsx_p/plugin.py b/vmware_nsx/plugins/nsx_p/plugin.py index c1b421de10..a12f02dea3 100644 --- a/vmware_nsx/plugins/nsx_p/plugin.py +++ b/vmware_nsx/plugins/nsx_p/plugin.py @@ -600,10 +600,8 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): def _net_nsx_name(self, network): name = utils.get_name_and_uuid(network.get('name') or 'network', network['id']) - LOG.error("DEBUG ADIT orig name = %s", name) # remove illegal characters in segment names: ;|=,~@' name = re.sub("[;|=,~@\']", '', name) - LOG.error("DEBUG ADIT fixed name = %s", name) return name def _create_network_on_backend(self, context, net_data, @@ -1601,7 +1599,8 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): psec_on, has_ip = self._determine_port_security_and_has_ip(context, port_data) if not psec_on: - return None + # returning an empty list will delete all existing bindings + return [] address_bindings = [] for fixed_ip in port_data['fixed_ips']: