From 0d8ce07a6fd75ce185e0b35826b0baedb60bfa43 Mon Sep 17 00:00:00 2001 From: Gabriel Cuba Date: Wed, 14 Dec 2022 18:33:50 -0500 Subject: [PATCH] Fix Bug 2159: Use provider-network profile when specified even if it's overlay or management Change-Id: Ib1f910e0f8ce9ed5fbb6ffbcb09847c90c2c9710 Signed-off-by: Gabriel Cuba --- NG-RO/osm_ng_ro/ns.py | 2 +- .../osm_rovim_openstack/vimconn_openstack.py | 2 +- .../notes/fix_bug_2159-0f354a90f97425bb.yaml | 21 +++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/fix_bug_2159-0f354a90f97425bb.yaml diff --git a/NG-RO/osm_ng_ro/ns.py b/NG-RO/osm_ng_ro/ns.py index a4c7b65c..19ff791a 100644 --- a/NG-RO/osm_ng_ro/ns.py +++ b/NG-RO/osm_ng_ro/ns.py @@ -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"], diff --git a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py index 2de443c5..00558dc6 100644 --- a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py +++ b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py @@ -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 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. -- 2.17.1