Browse Source

Merge "NSX|V3+P: Fix mdproxy handling for vlan transparent" into stable/stein

stable/stein
Zuul 1 week ago
parent
commit
70eb6fd77d
2 changed files with 11 additions and 10 deletions
  1. 5
    5
      vmware_nsx/plugins/nsx_p/plugin.py
  2. 6
    5
      vmware_nsx/plugins/nsx_v3/plugin.py

+ 5
- 5
vmware_nsx/plugins/nsx_p/plugin.py View File

@@ -742,6 +742,11 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
742 742
                     super(NsxPolicyPlugin, self).delete_network(
743 743
                         context, net_id)
744 744
 
745
+        # this extra lookup is necessary to get the
746
+        # latest db model for the extension functions
747
+        net_model = self._get_network(context, net_id)
748
+        resource_extend.apply_funcs('networks', created_net, net_model)
749
+
745 750
         # MD Proxy is currently supported by the passthrough api only
746 751
         if is_backend_network and cfg.CONF.nsx_p.allow_passthrough:
747 752
             try:
@@ -754,11 +759,6 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
754 759
                 LOG.error("Failed to create mdproxy port for network %s: %s",
755 760
                           net_id, e)
756 761
 
757
-        # this extra lookup is necessary to get the
758
-        # latest db model for the extension functions
759
-        net_model = self._get_network(context, net_id)
760
-        resource_extend.apply_funcs('networks', created_net, net_model)
761
-
762 762
         # Update the QoS policy (will affect only future compute ports)
763 763
         qos_com_utils.set_qos_policy_on_new_net(
764 764
             context, net_data, created_net)

+ 6
- 5
vmware_nsx/plugins/nsx_v3/plugin.py View File

@@ -988,6 +988,12 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
988 988
                         {'network': {'vlan_transparent': vlt}})
989 989
 
990 990
             rollback_network = True
991
+
992
+            # this extra lookup is necessary to get the
993
+            # latest db model for the extension functions
994
+            net_model = self._get_network(context, created_net['id'])
995
+            resource_extend.apply_funcs('networks', created_net, net_model)
996
+
991 997
             if is_backend_network:
992 998
                 self._create_net_mdproxy_port(
993 999
                     context, created_net, az, nsx_net_id)
@@ -1008,11 +1014,6 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
1008 1014
                     super(NsxV3Plugin, self).delete_network(
1009 1015
                         context, created_net['id'])
1010 1016
 
1011
-        # this extra lookup is necessary to get the
1012
-        # latest db model for the extension functions
1013
-        net_model = self._get_network(context, created_net['id'])
1014
-        resource_extend.apply_funcs('networks', created_net, net_model)
1015
-
1016 1017
         # Update the QoS policy (will affect only future compute ports)
1017 1018
         qos_com_utils.set_qos_policy_on_new_net(
1018 1019
             context, net_data, created_net)

Loading…
Cancel
Save