Update from master part 2
Squashed commit of the following:
commit b91fc76ef46323c88e27610c06316af168549834
Author: Gabriel Cuba <gcuba@whitestack.com>
Date: Fri May 19 18:30:19 2023 -0500
Feature 10972: Add tests for volume multiattach
Change-Id: Ib7c918cd8d3a160cfeb69503e10b135893be244b
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
commit 6373cc958e17809f45cbd229323b591f93f821fa
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Tue May 23 11:17:09 2023 +0200
Avoid execution of tests in run_test.sh if no tag is provided
The idea of this commit is to enable the use of run_test.sh for
other purposes like running TST010 conformance tests or register VIM
and K8s clusters, so that the VIM and cluster registration can be
decoupled. In that way, daily jobs could run several tests, one after
the other, with different VIMs.
Change-Id: If0791f9562d23a861f8491c144cdc7f539efec46
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit 437637ceb4f984b3d3d9a0f31201cd171b37efd9
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Tue May 23 11:31:29 2023 +0200
Updated README with cleaner instructions
Change-Id: Iac797372e88e71afb1322e2bd0e71feba4535f21
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit 8f994ccfd43dbc1db7c3fdb3410d98dd235a3529
Author: Gabriel Cuba <gcuba@whitestack.com>
Date: Fri May 12 13:44:16 2023 -0500
Feature 10975: Modify heal_02 to test instantiation, scaling and healing using an existing flavor-id
Change-Id: Ic9c02b13dda5c2e8eac3b8bfe027bd858d49a367
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
commit 245b04f08965d65f323de1197c082468829b6bf6
Author: Gabriel Cuba <gcuba@whitestack.com>
Date: Tue May 9 12:37:29 2023 -0500
Feature 10978: add tests for ipv6 profiles in vnfd and nsd
Change-Id: If62b1489249fe4135a14b9c2720573ba8fe1a5c1
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
commit 541f9cf287bf6c7dca45fe911f8e844988711fa3
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Tue May 23 11:59:47 2023 +0200
Fix Fail01 to get openstack quota properly after updating client version
Change-Id: Ief7b4d5f150d67cecf944021c2598456672a30e0
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit a86e6938d53e345b08a7ca9cc9615115f14a002a
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Fri May 19 12:47:09 2023 +0200
Update SA02 to take into account the VNF threshold-time
Change-Id: Idde7fa330e8e9b141053c15edb266817c4e699c6
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit c753f67c813fa82926b3d64db759fd7d0d7aa2cc
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Thu May 18 15:06:49 2023 +0200
Fix error message in run_test.sh for create_k8scluster
Change-Id: Ice2e0bc5e829e31a81cbde30ea6784de64d8ca63
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit b9dfe0317c4935294747897dc2fd1645c4983067
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Wed May 10 17:25:47 2023 +0200
Support of Python3.10
This change includes required changes to make tests work in Python3.10.
It also enables tox running as part of stage-test, which was not included before.
For the moment, only flake8 and black envs will be checked. Some pylint
errors have been fixed, but a few remain unsolved. That's why pylint is
run, but its result is ignored.
Change-Id: I29105bf849eab8b47f92627a7eea1ede31b8e05b
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit 3d7579ccc2356a23ea32878e8f0fbb0e75f59b68
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Tue Apr 18 15:04:57 2023 +0200
Clean stage-archive.sh and use allowlist_extenals in tox.ini
Change-Id: I690598c770f52d805ee3516fead7fa191c90205f
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit 43f34481b4c5ccfda407a7f82a124012aab0dccc
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Thu Feb 23 17:37:47 2023 +0100
Fix bug 2220 to solve sol003_01 test
Change-Id: Ic4376067a8b42e470c09ba0668c545db8ce08e55
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Change-Id: Ide1e04dc7598e80885c2d504da8b89fb4a2f902f
Signed-off-by: Dario Faccin <dario.faccin@canonical.com>
diff --git a/robot-systest/testsuite/basic_31-multivdu_volume_multiattach.robot b/robot-systest/testsuite/basic_31-multivdu_volume_multiattach.robot
new file mode 100644
index 0000000..f8fe60f
--- /dev/null
+++ b/robot-systest/testsuite/basic_31-multivdu_volume_multiattach.robot
@@ -0,0 +1,125 @@
+# 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.
+
+*** Settings ***
+Documentation [BASIC-31] Basic NS with two multi-VDU VNF
+
+Library OperatingSystem
+Library String
+Library Collections
+Library Process
+Library SSHLibrary
+
+Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
+Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
+Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
+Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
+Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
+
+Force Tags basic_31 cluster_main daily
+
+Suite Teardown Run Keyword And Ignore Error Suite Cleanup
+
+
+*** Variables ***
+# NS and VNF descriptor package folder and ids
+${vnfd_pkg} multivdu_multiattach_vnf
+${vnfd_name} multivdu_multiattach-vnf
+${nsd_pkg} multivdu_multiattach_ns
+${nsd_name} multivdu_multiattach-ns
+
+# NS instance name and configuration
+${ns_name} multivdu_multiattach
+${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
+
+# SSH keys and username to be used
+${publickey} %{HOME}/.ssh/id_rsa.pub
+${privatekey} %{HOME}/.ssh/id_rsa
+${username} ubuntu
+${password} ${EMPTY}
+
+${ns_id} ${EMPTY}
+${vnf_member_index} vnf
+${vnf_ip_addr} ${EMPTY}
+${wait_guard_for_vm_boot} 50s
+
+
+*** Test Cases ***
+Create Hackfest multivdu VNF Descriptor
+
+ Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
+
+
+Create Hackfest Multivdu NS Descriptor
+
+ Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
+
+
+Network Service Instance Test
+
+ ${status} ${message}= Run Keyword And Ignore Error Variable Should Exist ${publickey}
+ Run Keyword If "${status}" == "FAIL" Set Global Variable ${publickey} ${EMPTY}
+ ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
+ Set Suite Variable ${ns_id} ${id}
+ Sleep ${wait_guard_for_vm_boot} Waiting for VM's daemons to be up and running
+
+
+Get Vnf ID
+
+ ${_vnf_id}= Get Vnf Id ${ns_id} ${vnf_member_index}
+ Set Suite Variable ${vnf_id} ${_vnf_id}
+
+
+Get Vnf Management Ip Addresses
+
+ ${rc} ${vdu0_ip}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[0].interfaces[]."ip-address"' | tr -d \\"
+ ${rc} ${vdu1_ip}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq '.vdur[1].interfaces[]."ip-address"' | tr -d \\"
+ Set Suite Variable ${mgmnt_ip_addr_0} ${vdu0_ip}
+ Set Suite Variable ${mgmnt_ip_addr_1} ${vdu1_ip}
+
+
+Ensure that VDUs can share data
+
+ Execute Remote Command Check Rc Return Output ${mgmnt_ip_addr_0} ${username} ${EMPTY} ${privatekey} sudo mkfs.ext3 -F /dev/vdb && sudo mkdir /shared && sudo mount /dev/vdb /shared && sudo chown ubuntu /shared && echo "osmtest" > /shared/test_file
+ Execute Remote Command Check Rc Return Output ${mgmnt_ip_addr_1} ${username} osmpass ${privatekey} sudo mkdir /shared && sudo mount /dev/vdb /shared && cat /shared/test_file
+ ${stdout}= Execute Remote Command Check Rc Return Output ${mgmnt_ip_addr_0} ${username} ${EMPTY} ${privatekey} cat /shared/test_file
+ Log ${stdout}
+ Should Be Equal ${stdout} osmtest Shared data can't be read
+
+
+Delete NS Instance Test
+ [Tags] cleanup
+
+ Delete NS ${ns_name}
+
+
+Delete NS Descriptor Test
+ [Tags] cleanup
+
+ Delete NSD ${nsd_name}
+
+
+Delete VNF Descriptor Test
+ [Tags] cleanup
+
+ Delete VNFD ${vnfd_name}
+
+
+*** Keywords ***
+Suite Cleanup
+ [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim
+
+ Run Keyword If Any Tests Failed Delete NS ${ns_name}
+
+ Run Keyword If Any Tests Failed Delete NSD ${nsd_name}
+
+ Run Keyword If Any Tests Failed Delete VNFD ${vnfd_name}