From 0108e942476c51824199dba8caffd3914e3e2f35 Mon Sep 17 00:00:00 2001 From: gallardo Date: Mon, 14 Mar 2022 18:16:41 +0000 Subject: [PATCH] Fix bug 1904 for EPA tests (no valid hostname) Change-Id: Ia2f2b71812e46f33144178d342c3559e54d8a03c Signed-off-by: gallardo --- NG-RO/osm_ng_ro/ns.py | 29 ++++++++++--------- .../notes/fix_bug_1904-27a920480a14d3b7.yaml | 23 +++++++++++++++ 2 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 releasenotes/notes/fix_bug_1904-27a920480a14d3b7.yaml diff --git a/NG-RO/osm_ng_ro/ns.py b/NG-RO/osm_ng_ro/ns.py index f3b073e1..8e2f8270 100644 --- a/NG-RO/osm_ng_ro/ns.py +++ b/NG-RO/osm_ng_ro/ns.py @@ -1000,10 +1000,13 @@ class Ns(object): if deep_get( tasks_by_target_record_id, net_text, + "extra_dict", "params", "net_type", ): - tasks_by_target_record_id[net_text]["params"]["net_type"] = "data" + tasks_by_target_record_id[net_text]["extra_dict"]["params"][ + "net_type" + ] = "data" net_item["use"] = "data" net_item["model"] = interface["type"] @@ -1285,18 +1288,18 @@ class Ns(object): "task_index": task_index, } - diff_items.append( - { - "deployment_info": deployment_info, - "target_id": target_vim, - "item": item_, - "action": "CREATE", - "target_record": f"{db_record}.{item_index}.vim_info.{target_vim}", - "target_record_id": target_record_id, - "extra_dict": extra_dict, - "common_id": target_item.get("common_id", None), - } - ) + new_item = { + "deployment_info": deployment_info, + "target_id": target_vim, + "item": item_, + "action": "CREATE", + "target_record": f"{db_record}.{item_index}.vim_info.{target_vim}", + "target_record_id": target_record_id, + "extra_dict": extra_dict, + "common_id": target_item.get("common_id", None), + } + diff_items.append(new_item) + tasks_by_target_record_id[target_record_id] = new_item task_index += 1 db_nsr_update[db_path + ".{}".format(item_index)] = target_item diff --git a/releasenotes/notes/fix_bug_1904-27a920480a14d3b7.yaml b/releasenotes/notes/fix_bug_1904-27a920480a14d3b7.yaml new file mode 100644 index 00000000..6e5bc48e --- /dev/null +++ b/releasenotes/notes/fix_bug_1904-27a920480a14d3b7.yaml @@ -0,0 +1,23 @@ +####################################################################################### +# 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: + - | + Fixing Bug 1904 - Openstack related error "No valid host was found. There are not enough hosts available." + error which is meet at EPA01, EPA04 robot tests are fixed. + -- 2.25.1