From da707570cd34a3102a8f3d6228a6cbe3210a4e83 Mon Sep 17 00:00:00 2001 From: rahul Date: Wed, 30 Aug 2023 15:06:49 +0530 Subject: [PATCH] Fix bug 2281: Healing operation Failing for Dual stack IP feature Change-Id: I80b56dd9ea64e0a4974a0b6c93461fcd84425ae6 Signed-off-by: rahul Signed-off-by: garciadeblas --- NG-RO/osm_ng_ro/ns.py | 6 ++++- ...ual_stack_IP_feature-598fc9f01d71c6aa.yaml | 25 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bug_fix_2281_Healing_operation_Failing_for_Dual_stack_IP_feature-598fc9f01d71c6aa.yaml diff --git a/NG-RO/osm_ng_ro/ns.py b/NG-RO/osm_ng_ro/ns.py index fc2b9a74..317579be 100644 --- a/NG-RO/osm_ng_ro/ns.py +++ b/NG-RO/osm_ng_ro/ns.py @@ -2001,7 +2001,11 @@ class Ns(object): net_item["model"] = interface.get("type") if interface.get("ip-address"): - net_item["ip_address"] = interface["ip-address"] + dual_ip = interface.get("ip-address").split(";") + if len(dual_ip) == 2: + net_item["ip_address"] = dual_ip + else: + net_item["ip_address"] = interface["ip-address"] if interface.get("mac-address"): net_item["mac_address"] = interface["mac-address"] diff --git a/releasenotes/notes/bug_fix_2281_Healing_operation_Failing_for_Dual_stack_IP_feature-598fc9f01d71c6aa.yaml b/releasenotes/notes/bug_fix_2281_Healing_operation_Failing_for_Dual_stack_IP_feature-598fc9f01d71c6aa.yaml new file mode 100644 index 00000000..008cd9fa --- /dev/null +++ b/releasenotes/notes/bug_fix_2281_Healing_operation_Failing_for_Dual_stack_IP_feature-598fc9f01d71c6aa.yaml @@ -0,0 +1,25 @@ +####################################################################################### +# 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 change aims to fix auto heal operation failing for dual stack NS. + This is happening because the function "_process_recreate_vdu_params" + in osm-ngro/ns.py still expects a single IP instead of a list of IPs, + as it was possible after the feature that enable dual stack IPs for + VNF interfaces. -- 2.25.1