NSX|V3: ensure 'exclude' tag is correctly set

An port update with no port security delta resulted in the
exclude tag being dropped from the port.

This ensures that the tag is not dropped.

Change-Id: I98b1e63da82e81d4314a469149f928ae12032998
This commit is contained in:
Gary Kotton 2017-06-08 02:15:39 -07:00
parent e0102ba2c9
commit 632831a82e

View File

@ -2381,6 +2381,12 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
if not updated_excluded:
tags_update.append({'scope': security.PORT_SG_SCOPE,
'tag': NSX_V3_DEFAULT_SECTION})
else:
# Ensure that the 'exclude' tag is set
if self.nsxlib.feature_supported(
nsxlib_consts.FEATURE_EXCLUDE_PORT_BY_TAG):
tags_update.append({'scope': security.PORT_SG_SCOPE,
'tag': nsxlib_consts.EXCLUDE_PORT})
else:
self._update_lport_with_security_groups(
context, lport_id,