Fix Bug 2159: Use provider-network profile when specified even if it's overlay or... 91/12791/2
authorGabriel Cuba <gcuba@whitestack.com>
Wed, 14 Dec 2022 23:33:50 +0000 (18:33 -0500)
committerGabriel Cuba <gcuba@whitestack.com>
Wed, 14 Dec 2022 23:53:28 +0000 (18:53 -0500)
Change-Id: Ib1f910e0f8ce9ed5fbb6ffbcb09847c90c2c9710
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
NG-RO/osm_ng_ro/ns.py
RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py
releasenotes/notes/fix_bug_2159-0f354a90f97425bb.yaml [new file with mode: 0644]

index a4c7b65..19ff791 100644 (file)
@@ -949,7 +949,7 @@ class Ns(object):
                     "id": vim_info.get("vim_network_id"),
                 },
             }
-        elif target_vld.get("mgmt-network"):
+        elif target_vld.get("mgmt-network") and not vim_info.get("provider_network"):
             extra_dict["find_params"] = {
                 "mgmt": True,
                 "name": target_vld["id"],
index 2de443c..00558dc 100644 (file)
@@ -754,7 +754,7 @@ class vimconnector(vimconn.VimConnector):
             self._reload_connection()
             network_dict = {"name": net_name, "admin_state_up": True}
 
-            if net_type in ("data", "ptp"):
+            if net_type in ("data", "ptp") or provider_network_profile:
                 provider_physical_network = None
 
                 if provider_network_profile and provider_network_profile.get(
diff --git a/releasenotes/notes/fix_bug_2159-0f354a90f97425bb.yaml b/releasenotes/notes/fix_bug_2159-0f354a90f97425bb.yaml
new file mode 100644 (file)
index 0000000..22d4053
--- /dev/null
@@ -0,0 +1,21 @@
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+---
+fixes:
+  - |
+    This fixes the bug 2159. RO will create the network with the provided provider-network 
+    profile when specified, even if it's an overlay network or a management network.