NSX|V3: ensure that the mac learning profile exists
NSX 1.0.0 does not wupport mac learning profiles. The commit c12d8f88cb59b9048e642ee623fed0fdc310ab08 requires that address pairs have the mac learning set. We should only do this if the mac learning profile exists. Change-Id: I586c10d9c12fdc64703fdf48bd479c74ba841b6e
This commit is contained in:
parent
bf2ec7bbea
commit
455bb910d2
@ -1383,10 +1383,10 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
|
|||||||
profiles.append(qos_profile_id)
|
profiles.append(qos_profile_id)
|
||||||
|
|
||||||
# Add mac_learning profile if it exists and is configured
|
# Add mac_learning profile if it exists and is configured
|
||||||
if (mac_learning_profile_set or
|
if (self._mac_learning_profile and
|
||||||
(self._mac_learning_profile and
|
(mac_learning_profile_set or
|
||||||
validators.is_attr_set(port_data.get(mac_ext.MAC_LEARNING)) and
|
(validators.is_attr_set(port_data.get(mac_ext.MAC_LEARNING)) and
|
||||||
port_data.get(mac_ext.MAC_LEARNING) is True)):
|
port_data.get(mac_ext.MAC_LEARNING) is True))):
|
||||||
profiles.append(self._mac_learning_profile)
|
profiles.append(self._mac_learning_profile)
|
||||||
|
|
||||||
name = self._get_port_name(context, port_data)
|
name = self._get_port_name(context, port_data)
|
||||||
@ -2001,8 +2001,8 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
|
|||||||
mac_learning_profile_set = (
|
mac_learning_profile_set = (
|
||||||
self._get_port_security_profile_id() in switch_profile_ids)
|
self._get_port_security_profile_id() in switch_profile_ids)
|
||||||
# Add mac_learning profile if it exists and is configured
|
# Add mac_learning profile if it exists and is configured
|
||||||
if (mac_learning_profile_set or
|
if (self._mac_learning_profile and
|
||||||
(self._mac_learning_profile and
|
(mac_learning_profile_set or
|
||||||
updated_port.get(mac_ext.MAC_LEARNING) is True)):
|
updated_port.get(mac_ext.MAC_LEARNING) is True)):
|
||||||
switch_profile_ids.append(self._mac_learning_profile)
|
switch_profile_ids.append(self._mac_learning_profile)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user