From: aticig Date: Fri, 11 Mar 2022 12:03:55 +0000 (+0300) Subject: Fix Bug 1910 Enabling stage-test failing by tox results X-Git-Tag: v12.0.0rc1~30 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FRO.git;a=commitdiff_plain;h=2b24d62cdf354f0edf80546408bf96dc1df8ef3c Fix Bug 1910 Enabling stage-test failing by tox results Change-Id: I9d8fd2104916a1b16fccb68d21126891ac512b9f Signed-off-by: aticig --- diff --git a/NG-RO/osm_ng_ro/ns.py b/NG-RO/osm_ng_ro/ns.py index 8e2f8270..b6524cc4 100644 --- a/NG-RO/osm_ng_ro/ns.py +++ b/NG-RO/osm_ng_ro/ns.py @@ -1156,7 +1156,7 @@ class Ns(object): if item in ("net", "vdu"): if vnfr is None: db_record = "nsrs:{}:{}".format(nsr_id, db_path) - target_list = indata.get("ns", []).get(db_path, []) + target_list = indata.get("ns", []).get(db_path, []) existing_list = db_nsr.get(db_path, []) else: db_record = "vnfrs:{}:{}".format(vnfr_id, db_path) diff --git a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py index 5a58cf98..6756ef45 100644 --- a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py +++ b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py @@ -6230,7 +6230,7 @@ class vimconnector(vimconn.VimConnector): ) return None - deviceId = hex(host_pci_dev.deviceId % 2 ** 16).lstrip("0x") + deviceId = hex(host_pci_dev.deviceId % 2**16).lstrip("0x") backing = vim.VirtualPCIPassthroughDeviceBackingInfo( deviceId=deviceId, id=host_pci_dev.id, @@ -7493,13 +7493,10 @@ if [ "$1" = "precustomization" ];then for device in devices: if type(device) is vim.vm.device.VirtualDisk: - if ( - isinstance( - device.backing, - vim.vm.device.VirtualDisk.FlatVer2BackingInfo, - ) - and hasattr(device.backing, "fileName") - ): + if isinstance( + device.backing, + vim.vm.device.VirtualDisk.FlatVer2BackingInfo, + ) and hasattr(device.backing, "fileName"): disk_info["full_path"] = device.backing.fileName disk_info["datastore"] = device.backing.datastore disk_info["capacityKB"] = device.capacityInKB diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 2b39c48f..278b33bf 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -14,5 +14,4 @@ # limitations under the License. echo launching tox -OUTPUT=$(TOX_PARALLEL_NO_SPINNER=1 tox --parallel=auto) -printf '%s\n' "$OUTPUT" +tox --parallel=auto diff --git a/releasenotes/notes/fix_bug_1910-000745f344b28e5b.yaml b/releasenotes/notes/fix_bug_1910-000745f344b28e5b.yaml new file mode 100644 index 00000000..c1b4c401 --- /dev/null +++ b/releasenotes/notes/fix_bug_1910-000745f344b28e5b.yaml @@ -0,0 +1,22 @@ +####################################################################################### +# 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 1910: This fix allows stage tests to fail based on tox results. + By this way, Jenkins builds will not be successful unless all tests are passed. +