Browse Source

Merge "NSX|V3+P: Fix mdproxy handling for vlan transparent"

changes/43/682243/1
Zuul 1 week ago
parent
commit
9cc310d98c
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

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

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

@@ -970,6 +970,12 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
970 970
                         {'network': {'vlan_transparent': vlt}})
971 971
 
972 972
             rollback_network = True
973
+
974
+            # this extra lookup is necessary to get the
975
+            # latest db model for the extension functions
976
+            net_model = self._get_network(context, created_net['id'])
977
+            resource_extend.apply_funcs('networks', created_net, net_model)
978
+
973 979
             if is_backend_network:
974 980
                 self._create_net_mdproxy_port(
975 981
                     context, created_net, az, nsx_net_id)
@@ -990,11 +996,6 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
990 996
                     super(NsxV3Plugin, self).delete_network(
991 997
                         context, created_net['id'])
992 998
 
993
-        # this extra lookup is necessary to get the
994
-        # latest db model for the extension functions
995
-        net_model = self._get_network(context, created_net['id'])
996
-        resource_extend.apply_funcs('networks', created_net, net_model)
997
-
998 999
         # Update the QoS policy (will affect only future compute ports)
999 1000
         qos_com_utils.set_qos_policy_on_new_net(
1000 1001
             context, net_data, created_net)

Loading…
Cancel
Save