From: Gabriel Cuba Date: Wed, 14 Dec 2022 23:33:50 +0000 (-0500) Subject: Fix Bug 2159: Use provider-network profile when specified even if it's overlay or... X-Git-Tag: v12.0.5^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F94%2F12794%2F1;p=osm%2FRO.git Fix Bug 2159: Use provider-network profile when specified even if it's overlay or management Change-Id: Ib1f910e0f8ce9ed5fbb6ffbcb09847c90c2c9710 Signed-off-by: Gabriel Cuba (cherry picked from commit 0d8ce07a6fd75ce185e0b35826b0baedb60bfa43) --- diff --git a/NG-RO/osm_ng_ro/ns.py b/NG-RO/osm_ng_ro/ns.py index b71f1b46..1308fbdb 100644 --- a/NG-RO/osm_ng_ro/ns.py +++ b/NG-RO/osm_ng_ro/ns.py @@ -920,7 +920,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"], diff --git a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py index eda56990..934cde94 100644 --- a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py +++ b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py @@ -753,7 +753,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 index 00000000..22d4053b --- /dev/null +++ b/releasenotes/notes/fix_bug_2159-0f354a90f97425bb.yaml @@ -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.