From b731aaccb1bc7041b55fe4801e26177f0e3c6cbe Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Sat, 25 Jun 2022 18:29:22 +0200 Subject: [PATCH 01/16] Apply cluster_heal tag to heal tests instead of cluster_main Change-Id: I8fb7929eb7890b2a3426bc07d3cfa28952a7fbf8 Signed-off-by: garciadeblas --- README.md | 1 + robot-systest/testsuite/heal_01-volume_vdu_healing.robot | 2 +- robot-systest/testsuite/heal_02-scale_vdu_healing.robot | 2 +- robot-systest/testsuite/heal_03-multiple_healing.robot | 2 +- robot-systest/testsuite/heal_04-autohealing.robot | 9 +++++++-- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7eff36f..f38799c 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,7 @@ The following tags exist for each testsuite: - `cluster_k8s_charms`: `k8s_05`, `k8s_06` - `cluster_sa`: `sa_01`, `sa_02`, `sa_07` - `cluster_slices`: `slice_01`, `slice_02` + - `cluster_heal`: `heal_01`, `heal_02`, `heal_03`, `heal_04` - daily: for all testsuites that will run in the daily job - regression: for all testsuites that should pass in the current stable branch - sanity: for all testsuites that should be passed by each commit in the diff --git a/robot-systest/testsuite/heal_01-volume_vdu_healing.robot b/robot-systest/testsuite/heal_01-volume_vdu_healing.robot index f0270c0..2922ee6 100644 --- a/robot-systest/testsuite/heal_01-volume_vdu_healing.robot +++ b/robot-systest/testsuite/heal_01-volume_vdu_healing.robot @@ -26,7 +26,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot -Force Tags heal_01 cluster_main daily regression +Force Tags heal_01 cluster_heal daily regression Suite Teardown Run Keyword And Ignore Error Suite Cleanup diff --git a/robot-systest/testsuite/heal_02-scale_vdu_healing.robot b/robot-systest/testsuite/heal_02-scale_vdu_healing.robot index e7d6966..5bdcf36 100644 --- a/robot-systest/testsuite/heal_02-scale_vdu_healing.robot +++ b/robot-systest/testsuite/heal_02-scale_vdu_healing.robot @@ -26,7 +26,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot -Force Tags heal_02 cluster_main daily regression +Force Tags heal_02 cluster_heal daily regression Suite Teardown Run Keyword And Ignore Error Suite Cleanup diff --git a/robot-systest/testsuite/heal_03-multiple_healing.robot b/robot-systest/testsuite/heal_03-multiple_healing.robot index 3b0baae..f534157 100644 --- a/robot-systest/testsuite/heal_03-multiple_healing.robot +++ b/robot-systest/testsuite/heal_03-multiple_healing.robot @@ -26,7 +26,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot -Force Tags heal_03 cluster_main daily regression +Force Tags heal_03 cluster_heal daily regression Suite Teardown Run Keyword And Ignore Error Suite Cleanup diff --git a/robot-systest/testsuite/heal_04-autohealing.robot b/robot-systest/testsuite/heal_04-autohealing.robot index 5518b11..f151c20 100644 --- a/robot-systest/testsuite/heal_04-autohealing.robot +++ b/robot-systest/testsuite/heal_04-autohealing.robot @@ -12,13 +12,13 @@ *** Settings *** Documentation [HEAL-04] Autohealing of NS -Suite Teardown Run Keyword And Ignore Error Suite Cleanup -Force Tags heal_04 cluster_main daily regression + Library OperatingSystem Library String Library Collections Library Process Library SSHLibrary + Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnf_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot @@ -26,6 +26,11 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot +Force Tags heal_04 cluster_heal daily regression + +Suite Teardown Run Keyword And Ignore Error Suite Cleanup + + *** Variables *** # NS and VNF descriptor package folder and ids ${vnfd_pkg} autoheal_vnf -- 2.25.1 From d7f75d7d293999d41af88ef4752906b134f58930 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Sat, 25 Jun 2022 18:38:32 +0200 Subject: [PATCH 02/16] Remove regression tag from new tests Regression tags should only be applied to tests running in the previous release. New tests for newi features by default should not have the tag regression, unless they are incorporated into the latest stable branch. This change updates the tags accordingly. In addition, this commit does minor changes in README file. Change-Id: Icca6c15343961fee1bb1adf0ee19f6871725f9cf Signed-off-by: garciadeblas --- README.md | 1 + .../testsuite/heal_01-volume_vdu_healing.robot | 2 +- .../testsuite/heal_02-scale_vdu_healing.robot | 2 +- .../testsuite/heal_03-multiple_healing.robot | 2 +- robot-systest/testsuite/heal_04-autohealing.robot | 2 +- .../testsuite/k8s_12-openldap_helm_day-2.robot | 2 +- .../sol003_01-vnf-lifecycle-management.robot | 12 ++++++++++-- 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f38799c..5e09d8b 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,7 @@ The following tags exist for each testsuite: - `cluster_sa`: `sa_01`, `sa_02`, `sa_07` - `cluster_slices`: `slice_01`, `slice_02` - `cluster_heal`: `heal_01`, `heal_02`, `heal_03`, `heal_04` + - `cluster_sol003`: `sol003_01` - daily: for all testsuites that will run in the daily job - regression: for all testsuites that should pass in the current stable branch - sanity: for all testsuites that should be passed by each commit in the diff --git a/robot-systest/testsuite/heal_01-volume_vdu_healing.robot b/robot-systest/testsuite/heal_01-volume_vdu_healing.robot index 2922ee6..db4ca64 100644 --- a/robot-systest/testsuite/heal_01-volume_vdu_healing.robot +++ b/robot-systest/testsuite/heal_01-volume_vdu_healing.robot @@ -26,7 +26,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot -Force Tags heal_01 cluster_heal daily regression +Force Tags heal_01 cluster_heal daily Suite Teardown Run Keyword And Ignore Error Suite Cleanup diff --git a/robot-systest/testsuite/heal_02-scale_vdu_healing.robot b/robot-systest/testsuite/heal_02-scale_vdu_healing.robot index 5bdcf36..5da1149 100644 --- a/robot-systest/testsuite/heal_02-scale_vdu_healing.robot +++ b/robot-systest/testsuite/heal_02-scale_vdu_healing.robot @@ -26,7 +26,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot -Force Tags heal_02 cluster_heal daily regression +Force Tags heal_02 cluster_heal daily Suite Teardown Run Keyword And Ignore Error Suite Cleanup diff --git a/robot-systest/testsuite/heal_03-multiple_healing.robot b/robot-systest/testsuite/heal_03-multiple_healing.robot index f534157..856bcfd 100644 --- a/robot-systest/testsuite/heal_03-multiple_healing.robot +++ b/robot-systest/testsuite/heal_03-multiple_healing.robot @@ -26,7 +26,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot -Force Tags heal_03 cluster_heal daily regression +Force Tags heal_03 cluster_heal daily Suite Teardown Run Keyword And Ignore Error Suite Cleanup diff --git a/robot-systest/testsuite/heal_04-autohealing.robot b/robot-systest/testsuite/heal_04-autohealing.robot index f151c20..4968619 100644 --- a/robot-systest/testsuite/heal_04-autohealing.robot +++ b/robot-systest/testsuite/heal_04-autohealing.robot @@ -26,7 +26,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot -Force Tags heal_04 cluster_heal daily regression +Force Tags heal_04 cluster_heal daily Suite Teardown Run Keyword And Ignore Error Suite Cleanup diff --git a/robot-systest/testsuite/k8s_12-openldap_helm_day-2.robot b/robot-systest/testsuite/k8s_12-openldap_helm_day-2.robot index d19a831..ac02202 100644 --- a/robot-systest/testsuite/k8s_12-openldap_helm_day-2.robot +++ b/robot-systest/testsuite/k8s_12-openldap_helm_day-2.robot @@ -25,7 +25,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot -Force Tags k8s_12 cluster_k8s daily regression +Force Tags k8s_12 cluster_k8s daily Suite Teardown Run Keyword And Ignore Error Suite Cleanup diff --git a/robot-systest/testsuite/sol003_01-vnf-lifecycle-management.robot b/robot-systest/testsuite/sol003_01-vnf-lifecycle-management.robot index 18801a1..dcae4f4 100644 --- a/robot-systest/testsuite/sol003_01-vnf-lifecycle-management.robot +++ b/robot-systest/testsuite/sol003_01-vnf-lifecycle-management.robot @@ -12,8 +12,7 @@ *** Settings *** Documentation [SOL003-01] Sol003 Api testing -Suite Teardown Run Keyword And Ignore Error Suite Cleanup -Force Tags sol003_01 cluster_sol003 daily + Library OperatingSystem Library String Library Collections @@ -21,14 +20,21 @@ Library RequestsLibrary Library yaml Library JsonValidator Library JSONLibrary + Resource %{ROBOT_DEVOPS_FOLDER}/lib/sol003_common_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/vim_lib.robot +Force Tags sol003_01 cluster_sol003 daily + +Suite Teardown Run Keyword And Ignore Error Suite Cleanup + + *** Variables *** ${vnfd_pkg} hackfest_basic_metrics_vnf ${vnfd_name} hackfest_basic_metrics-vnf + *** Test Cases *** Create VNF package from JSON file descriptor [Documentation] Test case to create a VNF Identifier @@ -169,8 +175,10 @@ Delete VNF Descriptor Test Delete VNFD ${vnfd_name} + *** Keywords *** Suite Cleanup [Documentation] Test Suit Cleanup: Deleting Descriptor Run Keyword If Any Tests Failed Delete VNFD ${vnfd_name} + -- 2.25.1 From a131bf078c13b0c63ace7555be0944ac5e2fc588 Mon Sep 17 00:00:00 2001 From: aticig Date: Thu, 25 Aug 2022 13:10:14 +0300 Subject: [PATCH 03/16] Adding robot tests to validate Feature 10944 change naming of charms Change-Id: I88c2c38d4be172502858c2fde7f7ef6d87afbd0b Signed-off-by: aticig --- robot-systest/lib/juju_lib.robot | 29 +++++++++++++++ .../testsuite/basic_06-vnf_with_charm.robot | 13 +++++++ .../testsuite/basic_12-ns_primitives.robot | 37 ++++++++++++++++++- 3 files changed, 78 insertions(+), 1 deletion(-) diff --git a/robot-systest/lib/juju_lib.robot b/robot-systest/lib/juju_lib.robot index 62f557e..8cc450c 100644 --- a/robot-systest/lib/juju_lib.robot +++ b/robot-systest/lib/juju_lib.robot @@ -32,3 +32,32 @@ Get Model Name ${model_name}= Set Variable ${kdu_name}-${ns_id} Should Be Equal As Strings ${model_name} ${stdout} [Return] ${stdout} + +Get Application Name VDU Level Charm + [Arguments] ${host} ${username} ${password} ${privatekey} ${model_name} ${vdu_profile_id} ${ee_name} + + Should Not Be Empty ${model_name} + ${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju status -m ${model_name} | grep "\\-vdu" | grep -v "*" | grep -i ${vdu_profile_id} | cut -f1 -d " " + log ${stdout} + Should Not Be Empty ${stdout} + Should Contain ${stdout} ${ee_name} + [Return] ${stdout} + +Get Application Name NS Level Charm + [Arguments] ${host} ${username} ${password} ${privatekey} ${model_name} ${charm_name} + + Should Not Be Empty ${model_name} + ${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju status -m ${model_name} | grep "\\-ns" | grep -v "*" | grep -i ${charm_name} | cut -f1 -d " " + log ${stdout} + Should Not Be Empty ${stdout} + [Return] ${stdout} + +Get Application Name VNF Level Charm + [Arguments] ${host} ${username} ${password} ${privatekey} ${model_name} ${vnf_profile_id} ${ee_name} + + Should Not Be Empty ${model_name} + ${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju status -m ${model_name} | grep "\\-vnf" | grep -v "*" | grep -i ${vnf_profile_id} | cut -f1 -d " " + log ${stdout} + Should Not Be Empty ${stdout} + Should Contain ${stdout} ${ee_name} + [Return] ${stdout} \ No newline at end of file diff --git a/robot-systest/testsuite/basic_06-vnf_with_charm.robot b/robot-systest/testsuite/basic_06-vnf_with_charm.robot index b3ae63e..a3bf07e 100644 --- a/robot-systest/testsuite/basic_06-vnf_with_charm.robot +++ b/robot-systest/testsuite/basic_06-vnf_with_charm.robot @@ -20,6 +20,7 @@ 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/ssh_lib.robot +Resource %{ROBOT_DEVOPS_FOLDER}/lib/juju_lib.robot Force Tags basic_06 cluster_ee_config daily regression @@ -51,6 +52,10 @@ ${day_2_file_name_1} /home/ubuntu/mytouch1 ${day_2_file_name_2} /home/ubuntu/mytouch2 ${ns_timeout} 15min +# VNF profile id, execution environment name to check VNF level charm naming +${vnf_profile_id} vnf1 +${ee_name} simple-ee + *** Test Cases *** Create Charm VNF Descriptor @@ -67,6 +72,14 @@ Instantiate Charm Network Service ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey} ${ns_timeout} Set Suite Variable ${ns_id} ${id} + Set Suite Variable ${model_name} ${id} + + +Check VNF Charm Application Name + + ${vnf_charm_app_name}= Get Application Name VNF Level Charm %{OSM_HOSTNAME} ${username} ${password} %{OSM_RSA_FILE} ${model_name} ${vnf_profile_id} ${ee_name} + ${length}= Get Length ${vnf_charm_app_name} + Should Be True ${length} <50 Get Management Ip Addresses diff --git a/robot-systest/testsuite/basic_12-ns_primitives.robot b/robot-systest/testsuite/basic_12-ns_primitives.robot index 3355691..9a15ddf 100644 --- a/robot-systest/testsuite/basic_12-ns_primitives.robot +++ b/robot-systest/testsuite/basic_12-ns_primitives.robot @@ -18,11 +18,14 @@ 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/package_lib.robot +Resource %{ROBOT_DEVOPS_FOLDER}/lib/juju_lib.robot +Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Force Tags basic_12 cluster_ee_config daily regression @@ -49,6 +52,18 @@ ${old_juju_password} a5611fc6452349cc6e45705d34c501d4 ${publickey} ${EMPTY} ${success_return_code} 0 +# VDU profile id, execution environment name to check vdu level charm naming structure +${vdu_profile_id} PolicyVM +${ee_name} vnf-policy + +# # Username and SSH private key for accessing OSM host +${privatekey} %{OSM_RSA_FILE} +${username} ubuntu +${password} ${EMPTY} + +# Charm name to check ns level charm naming structure +${charm_name} ns + *** Test Cases *** Change Juju Password @@ -56,23 +71,41 @@ Change Juju Password ${rc} ${stdout}= Run and Return RC and Output cp -r '%{PACKAGES_FOLDER}/${nsd_pkg}' '%{PACKAGES_FOLDER}/${new_nsd_pkg}' Should Be Equal As Integers ${rc} ${success_return_code} - ${nsd_yaml}= Get File %{PACKAGES_FOLDER}/${new_nsd_pkg}/${nsd_file} + ${nsd_yaml}= OperatingSystem.Get File %{PACKAGES_FOLDER}/${new_nsd_pkg}/${nsd_file} ${changed_nsd_yaml}= Replace String ${nsd_yaml} ${old_juju_password} %{JUJU_PASSWORD} Create File %{PACKAGES_FOLDER}/${new_nsd_pkg}/${nsd_file} ${changed_nsd_yaml} + Upload Vnfds Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg1}' Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg2}' + Upload Nsd Create NSD %{PACKAGES_FOLDER}/${new_nsd_pkg}/ + Instantiate NS ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey} ns_launch_max_wait_time=${ns_timeout} Set Suite Variable ${ns_id} ${id} + Set Suite Variable ${model_name} ${id} + + +Check NS Charm Application Name + + ${ns_charm_app_name}= Get Application Name NS Level Charm %{OSM_HOSTNAME} ${username} ${password} ${privatekey} ${model_name} ${charm_name} + ${length}= Get Length ${ns_charm_app_name} + Should Be True ${length} <50 + + +Check VDU Charm Application Name + + ${vdu_charm_app_name}= Get Application Name VDU Level Charm %{OSM_HOSTNAME} ${username} ${password} ${privatekey} ${model_name} ${vdu_profile_id} ${ee_name} + ${length}= Get Length ${vdu_charm_app_name} + Should Be True ${length} <50 # TODO: Check Initial Config Primitives Status @@ -81,12 +114,14 @@ Delete NS Delete NS ${ns_name} + Delete NS Descriptor [Tags] cleanup Delete NSD ${nsd_name} Delete Temporary Descriptor Folder '%{PACKAGES_FOLDER}/${new_nsd_pkg}' + Delete VNF Descriptors [Tags] cleanup -- 2.25.1 From f7e5f01e89cf4c66316d8ec1821fbdc63107f7c5 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 30 Aug 2022 13:26:10 +0200 Subject: [PATCH 04/16] Remove redundant README file Change-Id: I14d115937b31af3c619b5d4c256b258e9c6e69a9 Signed-off-by: garciadeblas --- robot-systest/README.md | 50 ----------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 robot-systest/README.md diff --git a/robot-systest/README.md b/robot-systest/README.md deleted file mode 100644 index fd27468..0000000 --- a/robot-systest/README.md +++ /dev/null @@ -1,50 +0,0 @@ - - -# Robot Framework: Test usage - -## Requirements - -- OSM client installed () -- devops repository cloned in home () -- The descriptor packages used on each test are expected to be in `${PACKAGES_FOLDER}`. -- A set of environment variables (there is an example file located at devops/robot-systest/environment.rc): - - `OSM_HOSTNAME`: IP address of target OSM. - - `OS_CLOUD`: Cloud credentialss. - - `VIM_TARGET`: VIM where tests will be run. - - `VIM_MGMT_NET`: VIM management network, reachable from robot. - - `PACKAGES_FOLDER`: Path where descriptor packages repository are cloned: https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/ - - `ROBOT_DEVOPS_FOLDER`: Where the devops repository is located. - - `ROBOT_REPORT_FOLDER`: Where robot outpul will be placed. - -## Installation - -```bash -sudo -H python3 -m pip install --ignore-installed haikunator requests pyvcloud progressbar pathlib robotframework robotframework-seleniumlibrary robotframework-requests robotframework-SSHLibrary -sudo snap install yq -sudo apt-get install -y python3-openstackclient # Installs Queens by default -``` - -## Usage - -Example using hackfest basic test. - -```bash - -# Set your environment variables in environment.rc as specified in requirements -source environment.rc - -cd ~/devops/robot-systest -robot -d ${ROBOT_REPORT_FOLDER} testsuite/hackfest_basic.robot -``` -- 2.25.1 From 36ec713138cf03f3e5571830f5a2e847147a4bab Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 30 Aug 2022 13:30:01 +0200 Subject: [PATCH 05/16] Minor typo in README, added plans for new policies in stage-test Change-Id: Icf5178c54c030fef0f7b7dbc2d23e1961ef34db5 Signed-off-by: garciadeblas --- README.md | 8 ++++---- devops-stages/stage-test.sh | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5e09d8b..aa3b58c 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ docker run --rm=true -t osmtests --env-file \ ### From an environment identical to OSM CICD -````bash +```bash git clone https://osm.etsi.org/gerrit/osm/devops git clone https://osm.etsi.org/gerrit/osm/IM git clone https://osm.etsi.org/gerrit/osm/osmclient @@ -194,11 +194,11 @@ the tests were forcefully stopped. - For helping in the migration tests and other scenarios in which you don't want to destroy the deployments immediately, the following tags are used: - - prepare: for the tests that are used to deploy the network + - `prepare`: for the tests that are used to deploy the network services under test - - verify: for the tests that perform the actual testing, or changes for + - `verify`: for the tests that perform the actual testing, or changes for additional verifications (e.g. scaling). - - cleanup: already described above. + - `cleanup`: already described above. So, for instance, you could first deploy a number of network services executing the tests with "prepare" tag, migrate to another OSM version, and then diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 0fcf210..31161ac 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -93,6 +93,13 @@ check_spaces_eol robot-systest/testsuite check_spaces_eol robot-systest/lib echo "No presence of spaces at EOL in robot files. Correct!" +# Other policies to be added here: +# - Blank lines used to separate main sections (Settings, Variables, Test Cases, Keywords) +# - Blank lines used to separate parts of eah section: +# - Variables: max 1 blank line to separate each one +# - Settings: 1 blank line to separate each kind of setting (all LIbrary together, all Resource together, etc.) +# - Test cases: 2 blank lines between test cases, max 1 blank line inside Test case, no blank line after Test Case Keyword + echo "SUCCESS" exit 0 -- 2.25.1 From ed3d1227894f2e3313bbf4214cf3db29b410b440 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 30 Aug 2022 14:42:26 +0200 Subject: [PATCH 06/16] Update default env file for tests Change-Id: I3c8877ef23d552f9b6b5647aa9d0c8fd4eb65166 Signed-off-by: garciadeblas --- README.md | 41 +++---------------------------------- envconfig-local.rc | 44 ++++++++++++++++++++++------------------ robot-systest/envfile.rc | 28 ------------------------- 3 files changed, 27 insertions(+), 86 deletions(-) delete mode 100644 robot-systest/envfile.rc diff --git a/README.md b/README.md index aa3b58c..03d6054 100644 --- a/README.md +++ b/README.md @@ -39,50 +39,15 @@ PACKAGES_FOLDER=osm-packages git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git ${PACKAGES_FOLDER} ``` -Configure a file `envfile.rc` copying from `envconfig-local.rc` and set the required variables +## Configure the environment -```bash -# VIM Setup -OS_USERNAME= -OS_PASSWORD= -OS_TENANT_NAME= -OS_AUTH_URL= -OS_TENANT_ID= - -# OSM Setup -OSM_HOSTNAME= -VIM_TARGET= -VIM_MGMT_NET= - -# Clouds file datacenter -OS_CLOUD= -# SDNCs file -OS_SDNC= - -# K8S config file -K8S_CREDENTIALS= - -# The following set of environment variables will be used in host -# of the robot framework. Not needed for docker execution - -# Folder where Robot tests are stored -ROBOT_DEVOPS_FOLDER=robot-systest - -# Folder to save alternative DUT environments (optional) -ENVIRONMENTS_FOLDER=environments - -# Folder where all required packages are stored -PACKAGES_FOLDER=osm-packages - -# Folder where test results should be exported -ROBOT_REPORT_FOLDER=results -``` +Create a file `envfile.rc` copying from `envconfig-local.rc` and set the required variables. ## Running the tests ### From the host machine -If you have installed all the dependecnies, the way of executing the tests is via the following command: +If you have installed all the dependencies, the way of executing the tests is via the following command: ```bash source envfile.rc diff --git a/envconfig-local.rc b/envconfig-local.rc index 8bdc298..a1bbf62 100644 --- a/envconfig-local.rc +++ b/envconfig-local.rc @@ -10,27 +10,31 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Openstack Setup -OS_USERNAME= -OS_PASSWORD= -OS_TENANT_NAME= -OS_AUTH_URL= -OS_TENANT_ID= -OS_IDENTITY_API_VERSION= +# OSM target for the tests +export OSM_HOSTNAME= -# OSM Setup -OSM_HOSTNAME= -VIM_TARGET= -VIM_MGMT_NET= +# VIM to be used for the tests +export VIM_TARGET= +export VIM_MGMT_NET= -# Robot setup -ENVIRONMENTS_FOLDER=environments -PACKAGES_FOLDER=/robot-systest/osm-packages +# Variables required for tests running locally on the host (not necessary in Docker since they are already defined) +export PACKAGES_FOLDER= # path to the location of the OSM packages +export K8S_CREDENTIALS= # path to the kubeconfig file -# Clouds file datacenter -OS_CLOUD=openstack -# SDNCs file -OS_SDNC=onos +# Variables required for tests interacting with Openstack +export OS_CLOUD= # OpenStack Cloud defined in $HOME/.config/openstack/clouds.yaml or in /etc/openstack/clouds.yaml + +# Openstack variables required when using Docker to run tests (they are used to register the VIM) +export OS_USERNAME= +export OS_PASSWORD= +export OS_TENANT_NAME= +export OS_AUTH_URL= +export OS_TENANT_ID= +export OS_IDENTITY_API_VERSION= + +# SDN controller variables required for running tests with SDN controllers +export SDNC_USER= +export SDNC_PASSWORD= +export SDNC_TYPE= +export SDNC_URL= -LC_ALL=C.UTF-8 -LANG=C.UTF-8 diff --git a/robot-systest/envfile.rc b/robot-systest/envfile.rc deleted file mode 100644 index ef4ac32..0000000 --- a/robot-systest/envfile.rc +++ /dev/null @@ -1,28 +0,0 @@ -# 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. - -echo "Please set your environment variables." -# export OSM_HOSTNAME= -# export OS_CLOUD= -# export OS_SDNC= -# export VIM_TARGET= -# export VIM_MGMT_NET= -# export PACKAGES_FOLDER= -# export ROBOT_DEVOPS_FOLDER= -# export ROBOT_REPORT_FOLDER= -# K8s_01 variables - Installation of a K8s cluster from a NS -# export IP_VM1= -# export IP_VM2= -# export IP_VM3= -# export IP_VM4= -# export IP_JUJU= -# export JUJU_PASSWORD= # Could be found in ~/.local/share/juju/accounts.yaml file -- 2.25.1 From 0b2294c90fd45cc352fcba67ae3aa7893dbd89e8 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Thu, 1 Sep 2022 13:53:06 +0200 Subject: [PATCH 07/16] Update requirements-dev.txt based on osmclient and IM requirements Change-Id: I04265ff5752c844bdf44f04d1d44403d5fe531df Signed-off-by: garciadeblas --- requirements-dev.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 8a4f25f..9cdc309 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -18,15 +18,15 @@ bitarray==2.5.1 # via # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master # pyangbind -certifi==2021.10.8 +certifi==2022.6.15 # via # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master # requests -charset-normalizer==2.0.10 +charset-normalizer==2.0.12 # via # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master # requests -click==8.0.3 +click==8.1.3 # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master enum34==1.1.10 # via @@ -36,14 +36,14 @@ idna==3.3 # via # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master # requests -jinja2==3.0.3 +jinja2==3.1.2 # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master lxml==4.9.0 # via # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master # pyang # pyangbind -markupsafe==2.0.1 +markupsafe==2.1.1 # via # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master # jinja2 @@ -53,7 +53,7 @@ osmclient @ git+https://osm.etsi.org/gerrit/osm/osmclient.git@master # via -r requirements-dev.in packaging==21.3 # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master -prettytable==3.0.0 +prettytable==3.3.0 # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master pyang==2.5.3 # via @@ -61,13 +61,13 @@ pyang==2.5.3 # pyangbind pyangbind==0.8.1 # via -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master -pycurl==7.44.1 +pycurl==7.45.1 # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master -pyparsing==3.0.6 +pyparsing==3.0.9 # via # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master # packaging -python-magic==0.4.24 +python-magic==0.4.27 # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master pyyaml==5.4.1 # via @@ -77,13 +77,13 @@ regex==2022.6.2 # via # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master # pyangbind -requests==2.27.1 +requests==2.28.0 # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master six==1.16.0 # via # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master # pyangbind -urllib3==1.26.8 +urllib3==1.26.9 # via # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master # requests -- 2.25.1 From c0bf951271b606fc92648cc672c058522cdd8ed1 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Mon, 3 Oct 2022 11:08:12 +0200 Subject: [PATCH 08/16] Update quotas_01 to follow the same format than other tests Change-Id: I801cf487ef5dd1659b0973b2a90d94a1c2122b01 Signed-off-by: garciadeblas --- .../quotas_01-quota_enforcement.robot | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/robot-systest/testsuite/quotas_01-quota_enforcement.robot b/robot-systest/testsuite/quotas_01-quota_enforcement.robot index 229a60c..5cebb0f 100644 --- a/robot-systest/testsuite/quotas_01-quota_enforcement.robot +++ b/robot-systest/testsuite/quotas_01-quota_enforcement.robot @@ -26,8 +26,7 @@ Suite Teardown Run Keyword And Ignore Error Suite Cleanup *** Variables *** # VNFD package to use during test -${vnfd_name} hackfest_basic_vnf -${vnfd_pkg} %{PACKAGES_FOLDER}/${vnfd_name} +${vnfd_pkg} hackfest_basic_vnf # Project names and quotas to use ${project_1_name} quotas_01_proj_1 @@ -88,8 +87,8 @@ Change First Project Name to Third Project Name Create VNFDs On Third Project Until Exceed Quota - Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v1;product-name=v1' - Run Keyword And Expect Error * Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v2;product-name=v2' + Create VNFD In Project ${project_3_name} '%{PACKAGES_FOLDER}/${vnfd_pkg}' ${user_name} ${user_password} override='id=v1;product-name=v1' + Run Keyword And Expect Error * Create VNFD In Project ${project_3_name} '%{PACKAGES_FOLDER}/${vnfd_pkg}' ${user_name} ${user_password} override='id=v2;product-name=v2' Increase Third Project Quotas @@ -101,17 +100,17 @@ Increase Third Project Quotas Create More VNFDs On Third Project Until Exceed Quota - Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v2;product-name=v2' - Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v3;product-name=v3' - Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v4;product-name=v4' - Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v5;product-name=v5' - Run Keyword And Expect Error * Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v6;product-name=v6' + Create VNFD In Project ${project_3_name} '%{PACKAGES_FOLDER}/${vnfd_pkg}' ${user_name} ${user_password} override='id=v2;product-name=v2' + Create VNFD In Project ${project_3_name} '%{PACKAGES_FOLDER}/${vnfd_pkg}' ${user_name} ${user_password} override='id=v3;product-name=v3' + Create VNFD In Project ${project_3_name} '%{PACKAGES_FOLDER}/${vnfd_pkg}' ${user_name} ${user_password} override='id=v4;product-name=v4' + Create VNFD In Project ${project_3_name} '%{PACKAGES_FOLDER}/${vnfd_pkg}' ${user_name} ${user_password} override='id=v5;product-name=v5' + Run Keyword And Expect Error * Create VNFD In Project ${project_3_name} '%{PACKAGES_FOLDER}/${vnfd_pkg}' ${user_name} ${user_password} override='id=v6;product-name=v6' Create VNFDs On Second Project Until Exceed Quota - Create VNFD In Project ${project_2_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=vp2_1;product-name=vp2_1' - Run Keyword And Expect Error * Create VNFD In Project ${project_2_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=vp2_2;product-name=vp2_2' + Create VNFD In Project ${project_2_name} '%{PACKAGES_FOLDER}/${vnfd_pkg}' ${user_name} ${user_password} override='id=vp2_1;product-name=vp2_1' + Run Keyword And Expect Error * Create VNFD In Project ${project_2_name} '%{PACKAGES_FOLDER}/${vnfd_pkg}' ${user_name} ${user_password} override='id=vp2_2;product-name=vp2_2' Check Project Scopes -- 2.25.1 From 0d264a6a67af6ef72ad0c413df03bc01f71ee102 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Thu, 13 Oct 2022 12:11:24 +0200 Subject: [PATCH 09/16] Remove regression tag from disabled daily tests Change-Id: Ie825fe49cc5543179b68c8edd2a2cd8e73aab85c Signed-off-by: garciadeblas --- robot-systest/testsuite/k8s_01-create_k8s_cluster.robot | 2 +- robot-systest/testsuite/k8s_11-simple_helm_k8s_scaling.robot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot b/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot index 23bf8ee..341237c 100644 --- a/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot +++ b/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot @@ -27,7 +27,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot -Force Tags k8s_01 cluster_k8s regression +Force Tags k8s_01 cluster_k8s Suite Teardown Run Keyword And Ignore Error Suite Cleanup diff --git a/robot-systest/testsuite/k8s_11-simple_helm_k8s_scaling.robot b/robot-systest/testsuite/k8s_11-simple_helm_k8s_scaling.robot index e994c17..6731ec7 100644 --- a/robot-systest/testsuite/k8s_11-simple_helm_k8s_scaling.robot +++ b/robot-systest/testsuite/k8s_11-simple_helm_k8s_scaling.robot @@ -26,7 +26,7 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Resource %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot -Force Tags k8s_11 cluster_k8s regression +Force Tags k8s_11 cluster_k8s Suite Teardown Run Keyword And Ignore Error Suite Cleanup -- 2.25.1 From fea3ae0f718a8d9617d7f56c5460c8e4a36c81eb Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 15 Nov 2022 17:11:28 +0100 Subject: [PATCH 10/16] Remove deprecated folder Change-Id: I534b2adcb5559acce341dffde467ebbf39c28f76 Signed-off-by: garciadeblas --- robot-systest/deprecated/README_Robot_Test.md | 86 ------ robot-systest/deprecated/lib/api/common.robot | 64 ----- .../deprecated/lib/api/vim_lib.robot | 60 ----- .../lib/cli/network_slicing_lib.robot | 118 --------- robot-systest/deprecated/lib/cli/ns_lib.robot | 193 -------------- .../deprecated/lib/cli/nsd_lib.robot | 85 ------ .../lib/cli/osm_package_tools_lib.robot | 88 ------- ...osm_platform_resiliancy_recovery_lib.robot | 55 ---- .../deprecated/lib/cli/rbac_lib.robot | 245 ------------------ .../deprecated/lib/cli/sdnc_account_lib.robot | 65 ----- .../deprecated/lib/cli/vim_account_lib.robot | 136 ---------- .../deprecated/lib/cli/vnfd_lib.robot | 85 ------ .../deprecated/lib/client_lib/client_lib.py | 69 ----- robot-systest/deprecated/lib/custom_lib.py | 67 ----- .../deprecated/lib/gui/login_gui.robot | 87 ------- .../deprecated/resource/api/common.robot | 46 ---- .../deprecated/resource/api/variables.py | 33 --- .../cli/disable_port_security_ns_data.py | 29 --- .../resource/cli/hackfest_basic_ns_data.py | 32 --- .../cli/hackfest_cloudinit_ns_data.py | 32 --- .../resource/cli/hackfest_epa_ns_data.py | 32 --- .../resource/cli/hackfest_multivdu_ns_data.py | 32 --- .../cli/hackfest_simplecharm_ns_data.py | 32 --- .../deprecated/resource/cli/test_vnf_data.py | 32 --- .../resource/cli/ubuntu-cloudinit_ns_data.py | 30 --- robot-systest/deprecated/run_test.sh | 109 -------- .../testsuite/api/TS01__Vim_Account.robot | 54 ---- .../testsuite/cli/TS008__Test_SDNC.robot | 45 ---- ...9__Feature_6283_Network_Slicing_Test.robot | 117 --------- ...latform_Resiliency_and_Recovery_Test.robot | 62 ----- ..._Feature_1415_RBAC_For_Platform_Test.robot | 106 -------- ...nstantiation_Parameters_in_CloudInit.robot | 87 ------- ...Visibility_Of_Packages_And_Instances.robot | 144 ---------- ...Feature_7921_MongoDB_Filesystem_Test.robot | 124 --------- ...ient_Package_Creation_And_Validation.robot | 84 ------ .../TS016__Manual_VNF_VDU_Scaling_Test.robot | 129 --------- ...sable_Port_Security_at_Network_level.robot | 122 --------- .../testsuite/cli/TS01__Test_VNF.robot | 107 -------- .../testsuite/cli/TS02__Test_Vim.robot | 49 ---- .../cli/TS03__Hackfest_Basic_NS.robot | 108 -------- .../cli/TS04__Hackfest_Simplecharm_NS.robot | 113 -------- .../cli/TS05__Hackfest_Multivdu_NS.robot | 108 -------- .../cli/TS06__Hackfest_Cloudinit_NS.robot | 108 -------- .../testsuite/cli/TS07__Hackfest_EPA_NS.robot | 108 -------- .../deprecated/testsuite/cli/__init__.robot | 39 --- .../TS01__OSMClient_Library_Test.robot | 82 ------ .../testsuite/gui/TS01__Test_GUI_Login.robot | 41 --- 47 files changed, 3879 deletions(-) delete mode 100644 robot-systest/deprecated/README_Robot_Test.md delete mode 100644 robot-systest/deprecated/lib/api/common.robot delete mode 100644 robot-systest/deprecated/lib/api/vim_lib.robot delete mode 100644 robot-systest/deprecated/lib/cli/network_slicing_lib.robot delete mode 100644 robot-systest/deprecated/lib/cli/ns_lib.robot delete mode 100644 robot-systest/deprecated/lib/cli/nsd_lib.robot delete mode 100644 robot-systest/deprecated/lib/cli/osm_package_tools_lib.robot delete mode 100644 robot-systest/deprecated/lib/cli/osm_platform_resiliancy_recovery_lib.robot delete mode 100644 robot-systest/deprecated/lib/cli/rbac_lib.robot delete mode 100644 robot-systest/deprecated/lib/cli/sdnc_account_lib.robot delete mode 100644 robot-systest/deprecated/lib/cli/vim_account_lib.robot delete mode 100644 robot-systest/deprecated/lib/cli/vnfd_lib.robot delete mode 100644 robot-systest/deprecated/lib/client_lib/client_lib.py delete mode 100644 robot-systest/deprecated/lib/custom_lib.py delete mode 100644 robot-systest/deprecated/lib/gui/login_gui.robot delete mode 100644 robot-systest/deprecated/resource/api/common.robot delete mode 100644 robot-systest/deprecated/resource/api/variables.py delete mode 100644 robot-systest/deprecated/resource/cli/disable_port_security_ns_data.py delete mode 100644 robot-systest/deprecated/resource/cli/hackfest_basic_ns_data.py delete mode 100644 robot-systest/deprecated/resource/cli/hackfest_cloudinit_ns_data.py delete mode 100644 robot-systest/deprecated/resource/cli/hackfest_epa_ns_data.py delete mode 100644 robot-systest/deprecated/resource/cli/hackfest_multivdu_ns_data.py delete mode 100644 robot-systest/deprecated/resource/cli/hackfest_simplecharm_ns_data.py delete mode 100644 robot-systest/deprecated/resource/cli/test_vnf_data.py delete mode 100644 robot-systest/deprecated/resource/cli/ubuntu-cloudinit_ns_data.py delete mode 100644 robot-systest/deprecated/run_test.sh delete mode 100644 robot-systest/deprecated/testsuite/api/TS01__Vim_Account.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS008__Test_SDNC.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS009__Feature_6283_Network_Slicing_Test.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS010__OSM_Platform_Resiliency_and_Recovery_Test.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS011__Feature_1415_RBAC_For_Platform_Test.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS012__Feature_7181_Allow_Instantiation_Parameters_in_CloudInit.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS013__Feature_1415_RBAC_Visibility_Of_Packages_And_Instances.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS014__Feature_7921_MongoDB_Filesystem_Test.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS015__Feature_8047_OSMClient_Package_Creation_And_Validation.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS016__Manual_VNF_VDU_Scaling_Test.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS017__Feature_7326_Disable_Port_Security_at_Network_level.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS01__Test_VNF.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS02__Test_Vim.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS03__Hackfest_Basic_NS.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS04__Hackfest_Simplecharm_NS.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS05__Hackfest_Multivdu_NS.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS06__Hackfest_Cloudinit_NS.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/TS07__Hackfest_EPA_NS.robot delete mode 100644 robot-systest/deprecated/testsuite/cli/__init__.robot delete mode 100644 robot-systest/deprecated/testsuite/client_library/TS01__OSMClient_Library_Test.robot delete mode 100644 robot-systest/deprecated/testsuite/gui/TS01__Test_GUI_Login.robot diff --git a/robot-systest/deprecated/README_Robot_Test.md b/robot-systest/deprecated/README_Robot_Test.md deleted file mode 100644 index 083e1dd..0000000 --- a/robot-systest/deprecated/README_Robot_Test.md +++ /dev/null @@ -1,86 +0,0 @@ - - - -# Step to run robot framework test standalone linux environment - -All installation commands run using root user(`sudo su`) -## Step 1: Install python packages -Install below python packages using pip ->pip install python-magic pyangbind haikunator requests pyvcloud progressbar pathlib robotframework robotframework-seleniumlibrary robotframework-requests robotframework-jsonlibrary - -## Step 2: Install linux packages -Install below linux packages ->curl http://osm-download.etsi.org/repository/osm/debian/ReleaseSIX/OSM%20ETSI%20Release%20Key.gpg | apt-key add - - ->add-apt-repository -y "deb http://osm-download.etsi.org/repository/osm/debian/ReleaseSIX stable devops osmclient IM" && apt update - ->curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - - ->echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list - -> apt-get install -y python-osmclient python-osm-im google-chrome-stable chromium-chromedriver - ->./git-repo/devops/tools/OVF_converter/install.sh - -## Step 3: checkout robot seed code -Checkout devops from gerrit -> git clone "https://osm.etsi.org/gerrit/osm/devops" - -If robot seed code not merged to to master, pull it -> git pull "https://osm.etsi.org/gerrit/osm/devops" refs/changes/52/7852/4 - -## Step 4: Set environmet -for build test need to create env-file and provide below details and for Standalone testing export them -``` -export OSM_HOSTNAME= -``` - -OpenStack Details -``` -export OS_AUTH_URL= -export OS_PASSWORD= -export OS_PROJECT_NAME= -export OS_VIM_CONFIG= -``` - -VCD Details -``` -export VCD_AUTH_URL= -export VCD_USERNAME= -export VCD_PASSWORD= -export VCD_TENANT_NAME= -export VCD_ORGANIZATION= -export VCD_VIM_CONFIG= -``` - -Note:- Optional -``` -export NS_CONFIG= -e.g. export NS_CONFIG="'{vld: [ {name: mgmtnet, vim-network-name: mgmt}]}'" -``` - -## Step 5: Run Test -There are two ways to run the test-case: -* use `devops/robot-systest/run_test.sh` file and provide test-name(vim/smoke/sanity/comprehensive). - > ./devops/robot-systest/run_test.sh -t smoke - -* use `robot` command - > robot -d path/to/report/dir -i test-tag-to-be-included -e test-tag-to-be-excluded path/to/testsuiet - - > robot -d devops/robot-systest/reports -i comprehensive devops/robot-systest/testsuite \ No newline at end of file diff --git a/robot-systest/deprecated/lib/api/common.robot b/robot-systest/deprecated/lib/api/common.robot deleted file mode 100644 index 4724016..0000000 --- a/robot-systest/deprecated/lib/api/common.robot +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com -## - - -*** Variables *** -${token}= ${EMPTY} -${HOST}= ${EMPTY} - - -*** Keywords *** -Get Auth Token - [Tags] auth_token - - ${nbi_host}= Get Environment Variable OSM_HOSTNAME - ${passed}= Run Keyword And Return Status Should Contain ${nbi_host} : - Run Keyword If ${passed} Set Dockerized Host ${nbi_host} - ... ELSE Set Standalone Host ${nbi_host} - - Create Session osmhit ${HOST} verify=${FALSE} debug=1 headers=${HEADERS} - - Log Many ${auth_token_uri} @{data} ${data} - - ${resp}= Post Request osmhit ${auth_token_uri} data=${data} - log ${resp} - - Pass Execution If ${resp.status_code} in ${success_status_code_list} Get Auth Token completed - - ${content}= To Json ${resp.content} - ${t}= Get From Dictionary ${content} _id - - Set Suite Variable ${token} ${t} - - -Set Dockerized Host - [Arguments] ${env_host} - - Set Suite Variable ${HOST} https://${env_host} - - -Set Standalone Host - [Arguments] ${env_host} - - Set Suite Variable ${HOST} https://${env_host}:9999 diff --git a/robot-systest/deprecated/lib/api/vim_lib.robot b/robot-systest/deprecated/lib/api/vim_lib.robot deleted file mode 100644 index a52354f..0000000 --- a/robot-systest/deprecated/lib/api/vim_lib.robot +++ /dev/null @@ -1,60 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-sep-2019 -## - - -*** Keywords *** -Create Vim - [Arguments] ${vim_name} ${account_type} ${auth_url} ${user} ${password} ${tenant} ${description} - - &{request_data}= Create Dictionary vim_user=${user} vim_password=${password} vim_url=${auth_url} vim_tenant_name=${tenant} vim_type=${account_type} description=${description} name=${vim_name} - - &{headers}= Create Dictionary Authorization=Bearer ${token} Content-Type=application/json Accept=application/json - - Create Session osmvim ${HOST} verify=${FALSE} headers=${headers} - - LOG ${request_data} - ${res}= Post Request osmvim ${create_vim_uri} data=${request_data} - log ${res.content} - Pass Execution If ${res.status_code} in ${success_status_code_list} Create Vim Request completed - Get Vim ID ${res.content} - - -Delete Vim - [Arguments] ${vim_id} - - ${uri} = Catenate SEPARATOR=/ ${create_vim_uri} ${vim_id} - ${resp}= Delete Request osmvim ${uri} - - log ${resp.content} - Pass Execution If ${resp.status_code} in ${success_status_code_list} Delete Vim Request completed - - -Get Vim ID - [Arguments] ${res} - -# log to console ${res} - ${content}= To Json ${res} - ${id}= Get From Dictionary ${content} id - Set Suite Variable ${vim_id} ${id} - log Vim Id is ${vim_id} diff --git a/robot-systest/deprecated/lib/cli/network_slicing_lib.robot b/robot-systest/deprecated/lib/cli/network_slicing_lib.robot deleted file mode 100644 index 9a3ff37..0000000 --- a/robot-systest/deprecated/lib/cli/network_slicing_lib.robot +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 08-nov-2019 -## - -*** Variables *** -${success_return_code} 0 -${delete_max_wait_time} 1min -${delete_pol_time} 15sec -${ns_launch_max_wait_time} 5min -${ns_launch_pol_time} 30sec - - -*** Keywords *** -Create NST - [Documentation] Create nst at osm - [Arguments] ${nst_pkg} - - ${rc} ${stdout}= Run and Return RC and Output osm nst-create ${nst_pkg} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - [Return] ${stdout} - - -Delete NST - [Documentation] delete nst at osm - [Arguments] ${nst} - - ${rc} ${stdout}= Run and Return RC and Output osm nst-delete ${nst} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - [Return] ${stdout} - - -Launch Network Slice Instance - [Arguments] ${vim_name} ${nst_name} ${ns_config}='' - - ${nsi_name}= GENERATE NAME - Run Keyword If ${ns_config}!='' Create Network Slice With Config ${nsi_name} ${nst_name} ${vim_name} ${ns_config} - ... ELSE Create Network Slice Without Config ${nsi_name} ${nst_name} ${vim_name} - - WAIT UNTIL KEYWORD SUCCEEDS ${ns_launch_max_wait_time} ${ns_launch_pol_time} Check For Network Slice Instance To Configured ${nsi_name} - Check For Network Slice Instance For Failure ${nsi_name} - - -Create Network Slice With Config - [Arguments] ${nsi_name} ${nst_name} ${vim} ${config} - - ${rc} ${stdout}= Run and Return RC and Output osm nsi-create --nsi_name ${nsi_name} --nst_name ${nst_name} --vim_account ${vim} --config ${config} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Append To List ${nsi_list} ${nsi_name} - - -Create Network Slice Without Config - [Arguments] ${nsi_name} ${nst_name} ${vim} - - ${rc} ${stdout}= Run and Return RC and Output osm nsi-create --nsi_name ${nsi_name} --nst_name ${nst_name} --vim_account ${vim} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Append To List ${nsi_list} ${nsi_name} - - -Check For Network Slice Instance For Failure - [Arguments] ${nsi_name} - - ${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${nsi_name}" - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Should Not Contain ${stdout} failed - - -Check For Network Slice Instance To Configured - [Arguments] ${nsi_name} - - ${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${nsi_name}" - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Should Contain Any ${stdout} configured failed - - -Delete Network Slice Instance - [Documentation] Delete ns - [Arguments] ${nsi} - - ${rc} ${stdout}= Run and Return RC and Output osm nsi-delete ${nsi} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For NSI Instance To Be Delete ${nsi} - - -Check For NSI Instance To Be Delete - [Arguments] ${nsi} - - ${rc} ${stdout}= Run and Return RC and Output osm nsi-list - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Should Not Contain ${stdout} ${nsi} diff --git a/robot-systest/deprecated/lib/cli/ns_lib.robot b/robot-systest/deprecated/lib/cli/ns_lib.robot deleted file mode 100644 index e0eb0c2..0000000 --- a/robot-systest/deprecated/lib/cli/ns_lib.robot +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-aug-2019 : Improvement to the code, robot framework initial seed code. -## - - -*** Variables *** -${success_return_code} 0 -${ns_launch_max_wait_time} 5min -${ns_launch_pol_time} 30sec -${ns_delete_max_wait_time} 1min -${ns_delete_pol_time} 15sec -${nsconfig} - -*** Keywords *** -Get NS List - [Documentation] Get ns instance list - - ${rc} ${stdout}= Run and Return RC and Output osm ns-list - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Get NS Instance ID - [Arguments] ${ns_name} - - ${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}" | awk 'NR==4{print $4}' - log ${stdout} - [Return] ${stdout} - - -Verify All JUJU Applications Status - [Arguments] ${ns} ${api_ip} ${api_port} ${username} ${password} ${api_cert_path} - - ${juju_model}= Get NS Instance ID ${ns} - - Import Library robot_juju.JujuLibrary ${api_ip} ${api_port} ${juju_model} ${username} ${password} ${api_cert_path} - Assert status of applications is ${status_active} - - -Launch Network Services and Return - [Arguments] ${vim_name} ${ns_config}='' - [Documentation] Get Configuration parameter to create Newtork service - - Run Keyword If ${ns_config}=='' Get NS Config - ... ELSE Set NS Config ${ns_config} - Log To Console \n${nsconfig} - Should Not Be Empty ${nsd_ids} There are no NS descriptors to launch the NS - :FOR ${nsd} IN @{nsd_ids} - \ ${ns_name}= GENERATE NAME - \ Append To List ${ns_ids} ${ns_name} - \ Create Network Service ${nsd} ${vim_name} ${ns_name} ${nsconfig} - - -Set NS Config - [Arguments] ${ns_config} - [Documentation] Set NS Configuration variable - - ${nsconfig}= Get Variable Value ${ns_config} '' - Set Test Variable ${nsconfig} - - -Get NS Config - [Documentation] Get NS Configuration from Environment Variable - - ${nsconfig}= Get Environment Variable NS_CONFIG '' - Set Test Variable ${nsconfig} - - -Create Network Service - [Documentation] Create ns at osm - [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} - - Run Keyword If ${ns_config}!='' Create Network Service With Config ${nsd} ${vim_name} ${ns_name} ${ns_config} - ... ELSE Create Network Service Without Config ${nsd} ${vim_name} ${ns_name} - - WAIT UNTIL KEYWORD SUCCEEDS ${ns_launch_max_wait_time} ${ns_launch_pol_time} Check For NS Instance To Configured ${ns_name} - Check For NS Instance For Failure ${ns_name} - - -Create Network Service Without Config - [Documentation] Create ns at osm - [Arguments] ${nsd} ${vim_name} ${ns_name} - - ${rc} ${stdout}= Run and Return RC and Output osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Create Network Service With Config - [Documentation] Create ns at osm - [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} - - ${rc} ${stdout}= Run and Return RC and Output osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} --config ${ns_config} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Delete NS - [Documentation] Delete ns - [Arguments] ${ns} - - ${rc} ${stdout}= Run and Return RC and Output osm ns-delete ${ns} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - WAIT UNTIL KEYWORD SUCCEEDS ${ns_delete_max_wait_time} ${ns_delete_pol_time} Check For NS Instance To Be Delete ${ns} - - -Check For NS Instance To Configured - [Arguments] ${ns_name} - - ${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}" - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Should Contain Any ${stdout} READY BROKEN - - -Check For NS Instance For Failure - [Arguments] ${ns_name} - - ${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}" - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Should Not Contain ${stdout} BROKEN - - -Check For NS Instance To Be Delete - [Arguments] ${ns} - - ${rc} ${stdout}= Run and Return RC and Output osm ns-list - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Should Not Contain ${stdout} ${ns} - - -Force Delete NS - [Documentation] Forcely Delete ns - [Arguments] ${ns} - - ${rc} ${stdout}= Run and Return RC and Output osm ns-delete ${ns} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - WAIT UNTIL KEYWORD SUCCEEDS ${ns_delete_max_wait_time} ${ns_delete_pol_time} Check For NS Instance To Be Delete ${ns} - - -Perform VNF Scale-in Operation - [Arguments] ${ns} ${vnf_member} ${scaling_group} - - ${rc} ${nsr}= Run and Return RC and Output osm ns-show ${ns} --literal - ${scaled_vnf}= Get Scaled Vnf ${nsr} - log to console Scaled VNF befor scale-in operation is ${scaled_vnf} - ${rc} ${stdout}= Run and Return RC and Output osm vnf-scale --scale-in --scaling-group ${scaling_group} ${ns} ${vnf_member} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - Sleep 1m Waiting for scale-in operation to complete - ${rc} ${nsr}= Run and Return RC and Output osm ns-show ${ns} --literal - ${scaled_vnf}= Get Scaled Vnf ${nsr} - log to console Scaled VNF after scale-in operation is ${scaled_vnf} - - -Perform VNF Scale-out Operation - [Arguments] ${ns} ${vnf_member} ${scaling_group} - - ${rc} ${nsr}= Run and Return RC and Output osm ns-show ${ns} --literal - ${scaled_vnf}= Get Scaled Vnf ${nsr} - log to console Scaled VNF befor scale-out operation is ${scaled_vnf} - ${rc} ${stdout}= Run and Return RC and Output osm vnf-scale --scale-out --scaling-group ${scaling_group} ${ns} ${vnf_member} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - Sleep 1m Waiting for scale-out operation to complete - ${rc} ${nsr}= Run and Return RC and Output osm ns-show ${ns} --literal - ${scaled_vnf}= Get Scaled Vnf ${nsr} - log to console Scaled VNF befor scale-out operation is ${scaled_vnf} diff --git a/robot-systest/deprecated/lib/cli/nsd_lib.robot b/robot-systest/deprecated/lib/cli/nsd_lib.robot deleted file mode 100644 index da27b4f..0000000 --- a/robot-systest/deprecated/lib/cli/nsd_lib.robot +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-sep-2019 -## - -*** Variables *** -${success_return_code} 0 -${delete_max_wait_time} 1min -${delete_pol_time} 15sec - - -*** Keywords *** -Get NSDs List - [Documentation] Get nsds list - - ${rc} ${stdout}= Run and Return RC and Output osm nsd-list - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Create NSD - [Documentation] Create nsd at osm - [Arguments] ${nsd_pkg} - - ${rc} ${stdout}= Run and Return RC and Output osm nsd-create ${nsd_pkg} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - [Return] ${stdout} - - -Delete NSD - [Documentation] Delete nsd - [Arguments] ${nsd_id} - - # For timebeing exception thrown by nsd-delete api was ignor because nsd was deleted successfully. The cause of exception is need to debug further - ${rc} ${stdout}= Run Keyword And Continue On Failure Run and Return RC and Output osm nsd-delete ${nsd_id} - log ${stdout} -# Should Be Equal As Integers ${rc} ${success_return_code} - WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For NSD ${nsd_id} - - -Check For NSD - [Arguments] ${nsd_id} - - ${rc} ${stdout}= Run and Return RC and Output osm nsd-list - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Should Not Contain ${stdout} ${nsd_id} - - -Force Delete NSD - [Documentation] Forcely Delete nsd - [Arguments] ${nsd_id} - - ${rc} ${stdout}= Run and Return RC and Output osm nsd-delete ${nsd_id} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Build NS Descriptor - [Documentation] Build NS Descriptor from the descriptor-packages - [Arguments] ${nsd path} - - ${rc} ${stdout}= Run and Return RC and Output make -C '${CURDIR}${/}../../..${nsd path}' - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} diff --git a/robot-systest/deprecated/lib/cli/osm_package_tools_lib.robot b/robot-systest/deprecated/lib/cli/osm_package_tools_lib.robot deleted file mode 100644 index c8a864c..0000000 --- a/robot-systest/deprecated/lib/cli/osm_package_tools_lib.robot +++ /dev/null @@ -1,88 +0,0 @@ -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 18-Dec-2019 -## - -*** Keywords *** -Create OSM NS Package - [Arguments] ${pkg_name} - ${ns_pkg}= Catenate SEPARATOR=_ ${pkg_name} ns - ${ns_yaml}= Catenate SEPARATOR=_ ${pkg_name} nsd - ${ns_yaml}= Catenate SEPARATOR=. ${ns_yaml} yaml - ${nsd_path}= Join Path ${ns_pkg} ${ns_yaml} - ${rc} ${stdout}= Run and Return RC and Output osm package-create ns ${pkg_name} - Should Be Equal As Integers ${rc} ${success_return_code} - File Should Exist ${nsd_path} - log ${stdout} - - -Create OSM VNF Package - [Arguments] ${pkg_name} - ${vnf_pkg}= Catenate SEPARATOR=_ ${pkg_name} vnf - ${vnf_yaml}= Catenate SEPARATOR=_ ${pkg_name} vnfd - ${vnf_yaml}= Catenate SEPARATOR=. ${vnf_yaml} yaml - ${vnfd_path}= Join Path ${vnf_pkg} ${vnf_yaml} - ${rc} ${stdout}= Run and Return RC and Output osm package-create vnf ${pkg_name} - Should Be Equal As Integers ${rc} ${success_return_code} - File Should Exist ${vnfd_path} - log ${stdout} - - -Validate OSM NS Package - [Arguments] ${pkg_name} - ${ns_pkg}= Catenate SEPARATOR=_ ${pkg_name} ns - ${rc} ${stdout}= Run and Return RC and Output osm package-validate ${ns_pkg} - Should Be Equal As Integers ${rc} ${success_return_code} - Verify Package Validation Result ${ns_pkg} - log ${stdout} - - -Validate OSM VNF Package - [Arguments] ${pkg_name} - ${vnf_pkg}= Catenate SEPARATOR=_ ${pkg_name} vnf - ${rc} ${stdout}= Run and Return RC and Output osm package-validate ${vnf_pkg} - Should Be Equal As Integers ${rc} ${success_return_code} - Verify Package Validation Result ${vnf_pkg} - log ${stdout} - - -Verify Package Validation Result - [Arguments] ${pkg} - ${rc} ${stdout}= Run and Return RC and Output osm package-validate ${pkg} | awk 'NR==6{print $6}' - Should Be Equal As Integers ${rc} ${success_return_code} - Should Not Contain ${stdout} ERROR - log ${stdout} - - -Build OSM VNF Package - [Arguments] ${pkg_name} - ${vnf_pkg}= Catenate SEPARATOR=_ ${pkg_name} vnf - ${vnf_pkg_tar}= Catenate SEPARATOR=. ${vnf_pkg} tar gz - ${rc} ${stdout}= Run and Return RC and Output osm package-build ${vnf_pkg} - Should Be Equal As Integers ${rc} ${success_return_code} - File Should Exist ${vnf_pkg_tar} - log ${stdout} - - -Build OSM NS Package - [Arguments] ${pkg_name} - ${ns_pkg}= Catenate SEPARATOR=_ ${pkg_name} ns - ${ns_pkg_tar}= Catenate SEPARATOR=. ${ns_pkg} tar gz - ${rc} ${stdout}= Run and Return RC and Output osm package-build ${ns_pkg} - Should Be Equal As Integers ${rc} ${success_return_code} - File Should Exist ${ns_pkg_tar} - log ${stdout} diff --git a/robot-systest/deprecated/lib/cli/osm_platform_resiliancy_recovery_lib.robot b/robot-systest/deprecated/lib/cli/osm_platform_resiliancy_recovery_lib.robot deleted file mode 100644 index fb86768..0000000 --- a/robot-systest/deprecated/lib/cli/osm_platform_resiliancy_recovery_lib.robot +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 08-nov-2019 -## - - -*** Variables *** -${success_return_code} 0 -${er_replicas} 0/1 - - -*** Keywords *** -Check If OSM Working - - ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-list - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - ${rc} ${stdout}= Run and Return RC and Output osm vim-list - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Check All Service Are Running - - ${rc} ${stdout}= Run and Return RC and Output docker service ls - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Should Not Contain ${stdout} ${er_replicas} - - -Kill Docker Container - [Arguments] ${name} - - ${rc} ${stdout}= Run and Return RC and Output docker rm -f \$(docker ps |grep -i ${name}|awk '{print $1}') - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} \ No newline at end of file diff --git a/robot-systest/deprecated/lib/cli/rbac_lib.robot b/robot-systest/deprecated/lib/cli/rbac_lib.robot deleted file mode 100644 index bbf717a..0000000 --- a/robot-systest/deprecated/lib/cli/rbac_lib.robot +++ /dev/null @@ -1,245 +0,0 @@ -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 21-nov-2019 -## - -*** Keywords *** -Configure NBI For RBAC - ${rc} ${stdout}= Run and Return RC and Output docker service update osm_nbi --force --env-add OSMNBI_AUTHENTICATION_BACKEND=keystone --env-add OSMNBI_AUTHENTICATION_AUTH_URL=keystone --env-add OSMNBI_AUTHENTICATION_AUTH_PORT=5000 --env-add OSMNBI_AUTHENTICATION_USER_DOMAIN_NAME=default --env-add OSMNBI_AUTHENTICATION_PROJECT_DOMAIN_NAME=default --env-add OSMNBI_AUTHENTICATION_SERVICE_USERNAME=nbi --env-add OSMNBI_AUTHENTICATION_SERVICE_PROJECT=service - Should Be Equal As Integers ${rc} ${success_return_code} - Sleep 30s Wait for NBI service to be update - - -Create User - [Arguments] ${user} ${password} - - ${rc} ${stdout}= Run and Return RC and Output osm user-create ${user} --password ${password} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - [Return] ${stdout} - - -List User - ${rc} ${stdout}= Run and Return RC and Output osm user-list - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - [Return] ${stdout} - - -List User And Check For The Created User - [Arguments] ${user} - ${user list}= List User - Should Contain ${user list} ${user} - - -Get User Info By Name - [Arguments] ${user_name} - ${rc} ${stdout}= Run and Return RC and Output osm user-show ${user_name} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - - -Get User Info By ID - [Arguments] ${user_id} - ${rc} ${stdout}= Run and Return RC and Output osm user-show ${user_id} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - - -Update User - [Arguments] ${user} ${field} ${value} - ${rc} ${stdout}= Run and Return RC and Output osm user-update ${field} ${value} ${user} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - - -Update User And Verify Info - [Arguments] ${user} @{args} - FOR ${arg} IN @{args} - ${fields}= Get Dictionary Items ${arg} - Update User ${user} ${fields[0]} ${fields[1]} - END - ${rc} ${stdout}= Run and Return RC and Output osm user-show ${user} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - - -Login With User And Perform Operation - [Arguments] ${user} ${password} ${project} - ${rc} ${stdout}= Run and Return RC and Output export OSM_USER=${user} - Should Be Equal As Integers ${rc} ${success_return_code} - ${rc} ${stdout}= Run and Return RC and Output export OSM_PROJECT=${project} - Should Be Equal As Integers ${rc} ${success_return_code} - ${rc} ${stdout}= Run and Return RC and Output export OSM_PASSWORD=${password} - Should Be Equal As Integers ${rc} ${success_return_code} - ${rc} ${stdout}= Run and Return RC and Output osm ns-list - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - Logout and Login With Admin - - -Logout and Login With Admin - ${rc} ${stdout}= Run and Return RC and Output export OSM_USER=admin - Should Be Equal As Integers ${rc} ${success_return_code} - ${rc} ${stdout}= Run and Return RC and Output export OSM_PASSWORD=admin - Should Be Equal As Integers ${rc} ${success_return_code} - ${rc} ${stdout}= Run and Return RC and Output osm ns-list - Should Be Equal As Integers ${rc} ${success_return_code} - - -Delete User - [Arguments] ${user} - ${rc} ${stdout}= Run and Return RC and Output osm user-delete ${user} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Delete User And Check - [Arguments] ${user} - Delete User ${user} - ${rc} ${stdout}= Run and Return RC and Output osm user-list - Should Be Equal As Integers ${rc} ${success_return_code} - Should Not Contain ${stdout} ${user} - - -Create Project - [Arguments] ${project} - ${rc} ${stdout}= Run and Return RC and Output osm project-create ${project} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - [Return] ${stdout} - - -List Project - ${rc} ${stdout}= Run and Return RC and Output osm project-list - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - [Return] ${stdout} - - -List Project And Verify - [Arguments] ${project} - ${project list}= List Project - Should Contain ${project list} ${project} - - -Get Project Info By Name - [Arguments] ${project_name} - ${rc} ${stdout}= Run and Return RC and Output osm project-show ${project_name} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - [Return] ${stdout} - - -Get Project Info By ID - [Arguments] ${project_id} - ${rc} ${stdout}= Run and Return RC and Output osm project-show ${project_id} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - [Return] ${stdout} - - -Update Project - [Arguments] ${project} ${feild} ${value} - ${rc} ${stdout}= Run and Return RC and Output osm project-update ${feild} ${value} ${project} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - - -Update Project Name And Verify - [Arguments] ${old_name} ${new_name} - Update Project ${old_name} --name ${new_name} - List Project And Verify ${new_name} - - -Delete Project - [Arguments] ${project} - ${rc} ${stdout}= Run and Return RC and Output osm project-delete ${project} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Delete Project And Verify - [Arguments] ${project} - Delete Project ${project} - ${project_list}= List Project - Should Not Contain ${project_list} ${project} - - -Create Role - [Arguments] ${role} - ${rc} ${stdout}= Run and Return RC and Output osm role-create ${role} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - [Return] ${stdout} - - -List Roles - ${rc} ${stdout}= Run and Return RC and Output osm role-list - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - [Return] ${stdout} - - -List Roles And Verify - [Arguments] ${role} - ${role_list}= List Roles - Should Contain ${role_list} ${role} - - -Get Role Info By Name - [Arguments] ${role} - ${rc} ${stdout}= Run and Return RC and Output osm role-show ${role} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - [Return] ${stdout} - - -Get Role Info By ID - [Arguments] ${role_id} - ${rc} ${stdout}= Run and Return RC and Output osm role-show ${role_id} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - [Return] ${stdout} - - -Update Role - [Arguments] ${role} ${feild} ${value} - ${rc} ${stdout}= Run and Return RC and Output osm role-update ${feild} ${value} ${role} - Should Be Equal As Integers ${rc} ${success_return_code} - log ${stdout} - - -Add Role And Verify - [Arguments] ${role} ${role_to_add} - Update Role ${role} --add ${role_to_add} - ${role_info}= Get Role Info By Name ${role} -# Should Contain ${role_info} ${role_to_add} - - -Delete Role - [Arguments] ${role} - ${rc} ${stdout}= Run and Return RC and Output osm role-delete ${role} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Delete Role And Verify - [Arguments] ${role} - Delete Role ${role} - ${role_list}= List Roles - Should Not Contain ${role_list} ${role} diff --git a/robot-systest/deprecated/lib/cli/sdnc_account_lib.robot b/robot-systest/deprecated/lib/cli/sdnc_account_lib.robot deleted file mode 100644 index 71680b8..0000000 --- a/robot-systest/deprecated/lib/cli/sdnc_account_lib.robot +++ /dev/null @@ -1,65 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - - -*** Variables *** -${success_return_code} 0 -${name} "OpenSite" -${user} "admin" -${password} "admin" -${ip} "1.1.1.1" -${type} "onos" -${port} "5858" -${dpid} "a7:2f:aa:be:C3:c1:fe:C9" - - -*** Keywords *** -Create SDNC Account - [Documentation] create new sdnc account - - ${rc} ${stdout}= Run and Return RC and Output osm sdnc-create --name ${name} --type ${type} --ip_address ${ip} --user ${user} --password ${password} --port ${port} --switch_dpid ${dpid} - log ${rc} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Get SDNC List - [Documentation] Get a sdnc account list - - ${rc} ${stdout}= Run and Return RC and Output osm sdnc-list - log ${stdout} - - -Show SDNC Account - [Documentation] Get sdnc account details - - ${rc} ${stdout}= Run and Return RC and Output osm sdnc-show ${name} - log ${rc} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Delete SDNC Account - [Documentation] Get sdnc account details - - ${rc} ${stdout}= Run and Return RC and Output osm sdnc-delete ${name} - log ${rc} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} \ No newline at end of file diff --git a/robot-systest/deprecated/lib/cli/vim_account_lib.robot b/robot-systest/deprecated/lib/cli/vim_account_lib.robot deleted file mode 100644 index c3c8242..0000000 --- a/robot-systest/deprecated/lib/cli/vim_account_lib.robot +++ /dev/null @@ -1,136 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-sep-2019 -## - -*** Settings *** -Library OperatingSystem -Library String -Library Collections -Library ../custom_lib.py - - -*** Variables *** -${success_return_code} 0 -${user} "robottest" -${password} "fred" -${authurl} "https://127.0.0.1/" -${type} "openstack" -${desc} "a test vim" -${tenant} "robottest2" - - -*** Keywords *** -Create Vim Account - [Documentation] Create a new vim account - - ${vim-name}= Generate Random String 8 [NUMBERS] - ${vim-name}= Catenate SEPARATOR= vim_ ${vim-name} - set global variable ${vim-name} - - ${rc} ${stdout}= Run and Return RC and Output osm vim-create --name ${vim-name} --user ${user} --password ${password} --auth_url ${authurl} --tenant ${tenant} --account_type ${type} --description ${desc} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Get Vim List - [Documentation] Get a vim account list - - ${rc} ${stdout}= Run and Return RC and Output osm vim-list - log ${stdout} - Log To Console ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Delete Vim Account - [Documentation] delete vim account details - [Arguments] ${vim_name}=${vim-name} - - ${rc} ${stdout}= Run and Return RC and Output osm vim-delete ${vim_name} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -VIM Setup To Launch Network Services - [Documentation] Setup a VIM to launch network services - - set global variable @{vim} - ${vmware_url}= Get Environment Variable VCD_AUTH_URL ${EMPTY} - ${openstack_url}= Get Environment Variable OS_AUTH_URL ${EMPTY} - ${vmware_vim}= Run Keyword And Return If '${vmware_url}'!='${EMPTY}' Setup Vmware Vim ${vmware_url} 'vmware' 'pytest system test' - ${openstack_vim}= Run Keyword And Return If '${openstack_url}'!='${EMPTY}' Setup Openstack Vim ${openstack_url} 'openstack' 'pytest system test' - Should Not Be Empty ${vim} VIM details not provided - Log Many @{vim} - - -Setup Openstack Vim - [Documentation] Openstack Vim Account Setup - [Tags] vim-setup - [Arguments] ${authurl} ${type} ${desc} - - ${user}= Get Environment Variable OS_USERNAME '' - ${password}= Get Environment Variable OS_PASSWORD '' - ${tenant}= Get Environment Variable OS_PROJECT_NAME '' - ${vim-config}= Get Environment Variable OS_VIM_CONFIG '' - ${vim_name}= GENERATE NAME - - ${rc} ${stdout}= Run and Return RC and Output osm vim-create --name ${vim_name} --user ${user} --password ${password} --auth_url ${authurl} --tenant ${tenant} --account_type ${type} --description ${desc} --config ${vim-config} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Sleep 30s Wait for to get vim ready - ${rc} ${vim_detail}= Run and Return RC and Output osm vim-show ${vim_name} - Should Contain ${vim_detail} "operationalState": "ENABLED" msg=Openstack vim is not available values=False - Append To List ${vim} ${stdout} - - [Return] ${stdout} - - -Setup Vmware Vim - [Documentation] Vmware Vim Account Setup - [Tags] vim-setup - [Arguments] ${authurl} ${type} ${desc} - - ${user}= Get Environment Variable VCD_USERNAME '' - ${password}= Get Environment Variable VCD_PASSWORD '' - ${tenant}= Get Environment Variable VCD_TENANT_NAME '' - ${vcd-org}= Get Environment Variable VCD_ORGANIZATION '' - ${vim-config}= Get Environment Variable VCD_VIM_CONFIG '' - ${vim_name}= GENERATE NAME - - ${rc} ${stdout}= Run and Return RC and Output osm vim-create --name ${vim_name} --user ${user} --password ${password} --auth_url ${authurl} --tenant ${tenant} --account_type ${type} --description ${desc} --config ${vim-config} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Sleep 30s Wait for to get vim ready - ${rc} ${vim_detail}= Run and Return RC and Output osm vim-show ${vim_name} - Should Contain ${vim_detail} "operationalState": "ENABLED" msg=VMWare VCD vim is not available values=False - Append To List ${vim} ${stdout} - - [Return] ${stdout} - - -Force Delete Vim Account - [Documentation] delete vim account details - [Arguments] ${vim_name} - - ${rc} ${stdout}= Run and Return RC and Output osm vim-delete ${vim_name} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} diff --git a/robot-systest/deprecated/lib/cli/vnfd_lib.robot b/robot-systest/deprecated/lib/cli/vnfd_lib.robot deleted file mode 100644 index 1b99f43..0000000 --- a/robot-systest/deprecated/lib/cli/vnfd_lib.robot +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-sep-2019 -## - -*** Variables *** -${success_return_code} 0 -${delete_max_wait_time} 1min -${delete_pol_time} 15sec - - -*** Keywords *** -Get VNFDs List - [Documentation] Get vnfds list - - ${rc} ${stdout}= Run and Return RC and Output osm vnfd-list - log ${stdout} - log ${rc} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Create VNFD - [Documentation] Create vnfd at osm - [Arguments] ${vnfd_pkg} - - ${rc} ${stdout}= Run and Return RC and Output osm vnfd-create ${vnfd_pkg} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - [Return] ${stdout} - - -Delete VNFD - [Documentation] Delete vnfd - [Arguments] ${vnfd_id} - - ${rc} ${stdout}= Run and Return RC and Output osm vnfd-delete ${vnfd_id} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For VNFD ${vnfd_id} - - -Check For VNFD - [Arguments] ${vnfd_id} - - ${rc} ${stdout}= Run and Return RC and Output osm vnfd-list - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - Should Not Contain ${stdout} ${vnfd_id} - - -Force Delete VNFD - [Documentation] Forcely Delete vnfd - [Arguments] ${vnfd_id} - - ${rc} ${stdout}= Run and Return RC and Output osm vnfd-delete ${vnfd_id} - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Build VNF Descriptor - [Documentation] Build VNF Descriptor from the descriptor-packages - [Arguments] ${vnfd path} - - ${rc} ${stdout}= Run and Return RC and Output make -C '${CURDIR}${/}../../..${vnfd path}' - log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} diff --git a/robot-systest/deprecated/lib/client_lib/client_lib.py b/robot-systest/deprecated/lib/client_lib/client_lib.py deleted file mode 100644 index c9390ae..0000000 --- a/robot-systest/deprecated/lib/client_lib/client_lib.py +++ /dev/null @@ -1,69 +0,0 @@ -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - - -from osmclient import client -from robot.api import logger -import json - - -class ClientLib: - def __init__(self, host="127.0.0.1", user=None, password=None, project=None): - - kwargs = {} - if user is not None: - kwargs['user'] = user - if password is not None: - kwargs['password'] = password - if project is not None: - kwargs['project'] = project - self.client = client.Client(host=host, sol005=True, **kwargs) - - def get_vim_list(self): - resp = self.client.vim.list() - logger.info('VIM List: {}'.format(resp)) - return json.dumps(resp) - - def create_vim_account(self, name, vim_type, user, password, auth_url, tenant, desc='', config=None): - vim_access = {} - if config is not None: - vim_access['config'] = config - vim_access['vim-type'] = vim_type - vim_access['vim-username'] = user - vim_access['vim-password'] = password - vim_access['vim-url'] = auth_url - vim_access['vim-tenant-name'] = tenant - vim_access['description'] = desc - - resp = self.client.vim.create(name, vim_access) - logger.info('Create VIM Account: {}'.format(resp)) - return json.dumps(resp) - - def delete_vim_account(self, name): - resp = self.client.vim.delete(name) - return json.dumps(resp) - - def get_vnfd_list(self): - resp = self.client.vnfd.list() - logger.info('VNF Descriptor List: {}'.format(resp)) - return json.dumps(resp) - - def get_nsd_list(self): - resp = self.client.nsd.list() - logger.info('NS Descriptor List: {}'.format(resp)) - return json.dumps(resp) diff --git a/robot-systest/deprecated/lib/custom_lib.py b/robot-systest/deprecated/lib/custom_lib.py deleted file mode 100644 index 2a3d23f..0000000 --- a/robot-systest/deprecated/lib/custom_lib.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com -##Ì¥ - - -import random -from haikunator import Haikunator -import yaml -from os.path import basename -import hashlib - -from robot.api import logger -from robot.api.deco import keyword - - -def generate_name(): - haikunator = Haikunator() - name = haikunator.haikunate(delimiter='_', token_length=2) - return name - - -def get_random_item_from_list(l): - assert isinstance(l, list), "List should be provided" - return random.choice(l) - - -def get_scaled_vnf(nsr): - nsr = yaml.load(nsr) - if 'scaling-group' in nsr['_admin']: - return nsr['_admin']['scaling-group'][0]['nb-scale-op'] - else: - return 0 - - -@keyword('Get File Name From Path') -def get_filename(path): - filename = basename(path) - return filename, filename.split('.')[0] - - -@keyword('Generate MD5') -def generate_md5(fpath): - hash_md5 = hashlib.md5() - with open(fpath, "rb") as f: - for chunk in iter(lambda: f.read(1024), b""): - hash_md5.update(chunk) - return hash_md5.hexdigest() diff --git a/robot-systest/deprecated/lib/gui/login_gui.robot b/robot-systest/deprecated/lib/gui/login_gui.robot deleted file mode 100644 index c125664..0000000 --- a/robot-systest/deprecated/lib/gui/login_gui.robot +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-aug-2019 : Improvement to the code, robot framework initial seed code. -## - - -*** Variables *** -${DESIRED_CAPABILITIES} desired_capabilities -${BROWSER} Chrome -${DELAY} 0 -${VALID USER} admin -${VALID PASSWORD} admin -${LOGIN URL} /auth/ -${WELCOME URL} /projects/ -${NS LIST URL} /packages/ns/list -${VNF LIST URL} /packages/vnf/list - - -*** Keywords *** -Set Server URL - ${env_host}= Get Environment Variable OSM_HOSTNAME - ${passed}= Run Keyword And Return Status Should Contain ${env_host} : - Run Keyword If ${passed} Set Dockerized Host - ... ELSE Set Standalone Host ${env_host} - - -Open Browser To Login Page - ${chrome_options} = Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver - Call Method ${chrome_options} add_argument headless - Call Method ${chrome_options} add_argument disable-gpu - Call Method ${chrome_options} add_argument no-sandbox - ${options}= Call Method ${chrome_options} to_capabilities - Open Browser ${SERVER}${LOGIN URL} ${BROWSER} desired_capabilities=${options} - Maximize Browser Window - Set Selenium Speed ${DELAY} - Login Page Should Be Open - - -Login Page Should Be Open - Element Text Should Be //*[@id="main_content"]/div/div[2]/p Sign in to start your session - - -Enter Credentials - [Arguments] ${username} ${password} - Input Text name:username ${username} - Input Password name:password ${password} - - -Submit Credentials - Click Button //*[@id="main_content"]/div/div[2]/form/div[3]/div[2]/button - - -Home Page Should Be Open - Location Should Be ${SERVER}${WELCOME URL} -# Element Should Contain id:title_header 6e3a8415-9014-4100-9727-90e0150263be ignore_case=True - Element Attribute Value Should Be //*[@id="main_content"]/div/div[2]/div[1]/div[1]/div/a href ${SERVER}${NS LIST URL} - Element Attribute Value Should Be //*[@id="main_content"]/div/div[2]/div[1]/div[2]/div/a href ${SERVER}${VNF LIST URL} - - -Set Dockerized Host - - Set Suite Variable ${SERVER} http://light-ui - - -Set Standalone Host - [Arguments] ${env_host} - - Set Suite Variable ${SERVER} http://${env_host} diff --git a/robot-systest/deprecated/resource/api/common.robot b/robot-systest/deprecated/resource/api/common.robot deleted file mode 100644 index 9342316..0000000 --- a/robot-systest/deprecated/resource/api/common.robot +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com -## - - -*** Variables *** -&{HEADERS} Content-Type=application/json Accept=application/json -&{data} username=admin password=admin project-id=admin -@{success_status_code_list} 200 201 202 204 - -${descriptor_content_type_gzip} application/gzip - -${auth_token_uri} /osm/admin/v1/tokens - -${get_all_vnfd_uri} /osm/vnfpkgm/v1/vnf_packages -${create_vnfd_uri} /osm/vnfpkgm/v1/vnf_packages_content -${delete_vnfd_uri} /osm/vnfpkgm/v1/vnf_packages - -${get_all_nsd_uri} /osm/nsd/v1/ns_descriptors -${create_nsd_uri} /osm/nsd/v1/ns_descriptors_content -${delete_nsd_uri} /osm/nsd/v1/ns_descriptors - -${base_ns_uri} /osm/nslcm/v1/ns_instances_content -${create_ns_uri} /osm/nslcm/v1/ns_instances_content - -${create_vim_uri} /osm/admin/v1/vim_accounts diff --git a/robot-systest/deprecated/resource/api/variables.py b/robot-systest/deprecated/resource/api/variables.py deleted file mode 100644 index a97763a..0000000 --- a/robot-systest/deprecated/resource/api/variables.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-sep-2019 -## - - -# Create/Delete Vim Account -vim_name = 'API-TEST-VIM' -account_type = 'openstack' -auth_url = 'http://127.0.0.1:5000/v3' -user = 'admin' -password = 'admin' -tenant = 'admin' -description = 'Test OpenStack Vim Account' diff --git a/robot-systest/deprecated/resource/cli/disable_port_security_ns_data.py b/robot-systest/deprecated/resource/cli/disable_port_security_ns_data.py deleted file mode 100644 index e1383bd..0000000 --- a/robot-systest/deprecated/resource/cli/disable_port_security_ns_data.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2020 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -# Author: Mrityunjay Yadav < MY00514913@techmahindra.com >, Jayant Madavi -## - - -# VNFD Details -vnfdPckgPath = "/descriptor-packages/vnfd/hackfest_basic_vnf" -vnfdPckg = '/build/hackfest_basic_vnf.tar.gz' - -# NSD Details -nsdPckgPath = "/descriptor-packages/nsd/no_port_security_ns" -nsdPckg = '/build/no_port_security_ns.tar.gz' diff --git a/robot-systest/deprecated/resource/cli/hackfest_basic_ns_data.py b/robot-systest/deprecated/resource/cli/hackfest_basic_ns_data.py deleted file mode 100644 index 8b8054b..0000000 --- a/robot-systest/deprecated/resource/cli/hackfest_basic_ns_data.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-aug-2019 : Improvement to the code, robot framework initial seed code. -## - - -# VNFD Details -vnfdPckgPath = "/descriptor-packages/vnfd/hackfest_basic_vnf" -vnfdPckg = '/build/hackfest_basic_vnf.tar.gz' - -# NSD Details -nsdPckgPath = "/descriptor-packages/nsd/hackfest_basic_ns" -nsdPckg = '/build/hackfest_basic_ns.tar.gz' diff --git a/robot-systest/deprecated/resource/cli/hackfest_cloudinit_ns_data.py b/robot-systest/deprecated/resource/cli/hackfest_cloudinit_ns_data.py deleted file mode 100644 index d725a36..0000000 --- a/robot-systest/deprecated/resource/cli/hackfest_cloudinit_ns_data.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-aug-2019 : Improvement to the code, robot framework initial seed code. -## - - -# VNFD Details -vnfdPckgPath = "/descriptor-packages/vnfd/hackfest_cloudinit_vnf" -vnfdPckg = '/build/hackfest_cloudinit_vnf.tar.gz' - -# NSD Details -nsdPckgPath = "/descriptor-packages/nsd/hackfest_cloudinit_ns" -nsdPckg = '/build/hackfest_cloudinit_ns.tar.gz' diff --git a/robot-systest/deprecated/resource/cli/hackfest_epa_ns_data.py b/robot-systest/deprecated/resource/cli/hackfest_epa_ns_data.py deleted file mode 100644 index 8975e31..0000000 --- a/robot-systest/deprecated/resource/cli/hackfest_epa_ns_data.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-aug-2019 : Improvement to the code, robot framework initial seed code. -## - - -# VNFD Details -vnfdPckgPath = "/descriptor-packages/vnfd/hackfest_epasriov_vnf" -vnfdPckg = '/build/hackfest_epasriov_vnf.tar.gz' - -# NSD Details -nsdPckgPath = "/descriptor-packages/nsd/hackfest_epasriov_ns" -nsdPckg = '/build/hackfest_epasriov_ns.tar.gz' diff --git a/robot-systest/deprecated/resource/cli/hackfest_multivdu_ns_data.py b/robot-systest/deprecated/resource/cli/hackfest_multivdu_ns_data.py deleted file mode 100644 index 5ecb9e8..0000000 --- a/robot-systest/deprecated/resource/cli/hackfest_multivdu_ns_data.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-aug-2019 : Improvement to the code, robot framework initial seed code. -## - - -# VNFD Details -vnfdPckgPath = "/descriptor-packages/vnfd/hackfest_multivdu_vnf" -vnfdPckg = '/build/hackfest_multivdu_vnf.tar.gz' - -# NSD Details -nsdPckgPath = "/descriptor-packages/nsd/hackfest_multivdu_ns" -nsdPckg = '/build/hackfest_multivdu_ns.tar.gz' diff --git a/robot-systest/deprecated/resource/cli/hackfest_simplecharm_ns_data.py b/robot-systest/deprecated/resource/cli/hackfest_simplecharm_ns_data.py deleted file mode 100644 index 5ffcd35..0000000 --- a/robot-systest/deprecated/resource/cli/hackfest_simplecharm_ns_data.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-aug-2019 : Improvement to the code, robot framework initial seed code. -## - - -# VNFD Details -vnfdPckgPath = "/descriptor-packages/vnfd/hackfest_simplecharm_vnf" -vnfdPckg = '/build/hackfest_simplecharm_vnf.tar.gz' - -# NSD Details -nsdPckgPath = "/descriptor-packages/nsd/hackfest_simplecharm_ns" -nsdPckg = '/build/hackfest_simplecharm_ns.tar.gz' diff --git a/robot-systest/deprecated/resource/cli/test_vnf_data.py b/robot-systest/deprecated/resource/cli/test_vnf_data.py deleted file mode 100644 index 02ee065..0000000 --- a/robot-systest/deprecated/resource/cli/test_vnf_data.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com -## - - -# VNFD Details -vnfdPckgPath = "/descriptor-packages/vnfd/cirros_vnf" -vnfdPckg = '/build/cirros_vnf.tar.gz' - -# NSD Details -nsdPckgPath = "/descriptor-packages/nsd/cirros_ns" -nsdPckg = '/build/cirros_ns.tar.gz' diff --git a/robot-systest/deprecated/resource/cli/ubuntu-cloudinit_ns_data.py b/robot-systest/deprecated/resource/cli/ubuntu-cloudinit_ns_data.py deleted file mode 100644 index ce68037..0000000 --- a/robot-systest/deprecated/resource/cli/ubuntu-cloudinit_ns_data.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 TATA ELXSI -# -# All Rights Reserved. -# -# 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. -## - -## -# Author: Ragavi D (ragavi.d@tataelxsi.co.in) - -# VNFD Details -vnfdPckgPath = "/descriptor-packages/vnfd/ubuntu-cloudinit_vnf" -vnfdPckg = '/build/ubuntu-cloudinit_vnf.tar.gz' - -# NSD Details -nsdPckgPath = "/descriptor-packages/nsd/ubuntu-cloudinit_ns" -nsdPckg = '/build/ubuntu-cloudinit_ns.tar.gz' diff --git a/robot-systest/deprecated/run_test.sh b/robot-systest/deprecated/run_test.sh deleted file mode 100644 index 3f86ff9..0000000 --- a/robot-systest/deprecated/run_test.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env bash - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 06-Sep-2019 -# Entry script to start the vim, smoke, openstack_stage_4 and comprehensive test using Robot Framework as a Automation Test Framework -## - -BASEDIR=$(dirname "$0") -TOPDIR=$(dirname "$BASEDIR") -DESCRIPTOR_DIR=$TOPDIR/descriptor-packages - - -robot_prerequisite(){ - echo -e "\nInstalling robot requirements" - # installing python packages - pip install haikunator requests robotframework robotframework-seleniumlibrary robotframework-requests robotframework-jsonlibrary -} - -while getopts ":t:-:" o; do - case "${o}" in - t) - TEST=${OPTARG} - ;; - -) - [[ "${OPTARG}" == "do_install" ]] && robot_prerequisite && continue - ;; - \?) - echo -e "Invalid option: '-$OPTARG'\n" >&2 - exit 1 - ;; - esac -done - -if [[ -z $TEST ]]; then - printf "Test not provided. \nRunning default test: smoke\n" - TEST="smoke" -fi - -if [[ "$TEST" == "vim" ]]; then - echo "Robot Framework Vim Test" - robot -d $BASEDIR/reports -i vim $BASEDIR/testsuite/ - exit 0 -elif [[ "$TEST" == "smoke" ]]; then - echo "Robot Framework SMOKE test" - robot --removekeywords tag:vim-setup --removekeywords WUKS -d $BASEDIR/reports -i smoke $BASEDIR/testsuite/ - exit 0 -elif [[ "$TEST" == "sanity" ]]; then - echo "Robot Framework Cirros VNF Test" - mkdir -p $BASEDIR/images/cache - if [[ ! -z $OS_AUTH_URL ]]; then - (openstack image show cirros-0.3.5-x86_64-disk.img) || (wget -r -nc http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img -O $BASEDIR/images/cache/cirros-0.3.5-x86_64-disk.img && make $BASEDIR/images/cache/cirros-0.3.5-x86_64-disk.img && openstack image create --file $BASEDIR/images/cache/cirros-0.3.5-x86_64-disk.img cirros-0.3.5-x86_64-disk.img) - fi - if [[ ! -z $VCD_AUTH_URL ]]; then -# TODO: Check for image over VIM before downloading - if [[ ! -s $BASEDIR/images/cache/cirros-0.3.5-x86_64-disk.img ]]; then - wget -r -nc http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img -O $BASEDIR/images/cache/cirros-0.3.5-x86_64-disk.img - fi - ovf_converter $BASEDIR/images/cache/cirros-0.3.5-x86_64-disk.img -n cirros - python $TOPDIR/tools/vmware_ovf_upload.py $VCD_AUTH_URL $VCD_USERNAME $VCD_PASSWORD $VCD_ORGANIZATION $BASEDIR/images/cache/cirros.ovf - fi - robot --removekeywords tag:vim-setup --removekeywords WUKS -d $BASEDIR/reports -i sanity $BASEDIR/testsuite/ - exit 0 -elif [[ "$TEST" == "comprehensive" ]]; then - echo "Robot Framework Comprehensive Test" - echo "Installing chrome driver and chrome for UI testing" - # installing chrome driver and chrome for UI testing - curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list - apt-get update && apt-get -y install google-chrome-stable chromium-chromedriver - echo "Checking of image over VIMs" - mkdir -p $BASEDIR/images/cache - if [[ ! -z $OS_AUTH_URL ]]; then - (openstack image show ubuntu1604) || (wget -r -nc https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img -O $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img && make $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img && openstack image create --file $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img ubuntu1604) - (openstack image show hackfest3-mgmt) || (wget -r -nc https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img -O $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img && make $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img && openstack image create --file $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img hackfest3-mgmt) - fi - if [[ ! -z $VCD_AUTH_URL ]]; then -# TODO: Check for image over VIM before downloading - if [[ ! -s $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img ]]; then - wget -r -nc https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img -O $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img - fi - ovf_converter $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img -n ubuntu1604 - python $TOPDIR/tools/vmware_ovf_upload.py $VCD_AUTH_URL $VCD_USERNAME $VCD_PASSWORD $VCD_ORGANIZATION $BASEDIR/images/cache/ubuntu1604.ovf - fi - robot --removekeywords tag:vim-setup --removekeywords WUKS -d $BASEDIR/reports -i comprehensive $BASEDIR/testsuite/ - exit 0 -else - echo "wrong test provided" - exit 1 -fi - -exit 1 diff --git a/robot-systest/deprecated/testsuite/api/TS01__Vim_Account.robot b/robot-systest/deprecated/testsuite/api/TS01__Vim_Account.robot deleted file mode 100644 index be04c3f..0000000 --- a/robot-systest/deprecated/testsuite/api/TS01__Vim_Account.robot +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-aug-2019 : Improvement to the code, robot framework initial seed code. -## - - -*** Settings *** -Documentation Test Suite to create and delete vim account -Library Collections -Library RequestsLibrary -Library OperatingSystem -Resource ../../lib/api/common.robot -Resource ../../lib/api/vim_lib.robot -Resource ../../resource/api/common.robot -Variables ../../resource/api/variables.py - -Suite Setup Get Auth Token -Suite Teardown Delete All Sessions - - -*** Variables *** -${vim_id} ${EMPTY} - - -*** Test Cases *** -Create Vim Account - [Tags] comprehensive api_vim_test - [Template] Create Vim - ${vim name} ${account type} ${auth url} ${user} ${password} ${tenant} ${description} - - -Delete Vim Account - [Tags] comprehensive api_vim_test - [Template] Delete Vim - ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/TS008__Test_SDNC.robot b/robot-systest/deprecated/testsuite/cli/TS008__Test_SDNC.robot deleted file mode 100644 index 3b2b21a..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS008__Test_SDNC.robot +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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 Test suiet to create/delete sdnc account via osmclient -Library OperatingSystem -Library Collections -Resource ../../lib/cli/sdnc_account_lib.robot - - -*** Test Cases *** -Create SDNC Account Test - [Tags] sdnc - - Create SDNC Account - - -Get SDNC Accounts List Test - [Tags] sdnc - - Get SDNC List - - -Delete SDNC Account Test - [Tags] sdnc - - Delete SDNC Account diff --git a/robot-systest/deprecated/testsuite/cli/TS009__Feature_6283_Network_Slicing_Test.robot b/robot-systest/deprecated/testsuite/cli/TS009__Feature_6283_Network_Slicing_Test.robot deleted file mode 100644 index fa8c44a..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS009__Feature_6283_Network_Slicing_Test.robot +++ /dev/null @@ -1,117 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 08-nov-2019 : network slicing test library -## - - -*** Settings *** -Documentation Test Suite to create hackfest basic nestwork service -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Resource ../../lib/cli/network_slicing_lib.robot -Library ../../lib/custom_lib.py - -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -${vnfd_id} -@{vnfd_ids} -${nsd_id} -@{nsd_ids} -${nst_id} -@{nsi_list} -${vnfdPckg} slice_hackfest_vnfd.tar.gz -${nsdPckg} slice_hackfest_nsd.tar.gz -${nstPckg} slice_hackfest_nst.yaml -${vnfdftpPath} https://osm-download.etsi.org/ftp/osm-5.0-five/6th-hackfest/packages/slice_hackfest_vnfd.tar.gz -${nsdftpPath} https://osm-download.etsi.org/ftp/osm-5.0-five/6th-hackfest/packages/slice_hackfest_nsd.tar.gz -${nstftpPath} https://osm-download.etsi.org/ftp/osm-5.0-five/6th-hackfest/packages/slice_hackfest_nst.yaml -${nst_config} '{netslice-vld: [{name: mgmtnet, vim-network-name: mgmt}]}' - - -*** Test Cases *** -Create Slice Hackfest VNF Descriptor - [Tags] slice_hackfest comprehensive - [Documentation] Create Slice Hackfest VNF Descriptor Test - - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../resource/cli/slice/' ${vnfdftpPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../resource/cli/slice${/}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create Slice Hackfest NS Descriptor - [Tags] slice_hackfest comprehensive - [Documentation] Create Slice Hackfest NS Descriptor Test - - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../resource/cli/slice/' ${nsdftpPath} - ${nsd_id}= Create NSD '${CURDIR}${/}../../resource/cli/slice${/}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Create Slice Hackfest Network Slice Template - [Tags] slice_hackfest comprehensive - [Documentation] Create Slice Hackfest Network Slice Template Test - -# set suite variable ${nst_id} - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../resource/cli/slice/' ${nstftpPath} - ${nst_id}= Create NST '${CURDIR}${/}../../resource/cli/slice${/}${nstPckg}' - Set Suite Variable ${nst_id} - - -Instanciate Network Slice - [Tags] slice_hackfest comprehensive - [Documentation] Instantiate Network Slice Test - - :FOR ${vim_name} IN @{vim} - \ Launch Network Slice Instance ${vim_name} ${nst_id} ${nst_config} - - -Terminate Network Slice Instance - [Tags] slice_hackfest comprehensive - [Documentation] Terminate Network Slice Instance Test - - :FOR ${nsi} IN @{nsi_list} - \ Delete Network Slice Instance ${nsi} - - -*** Keywords *** -Test Cleanup - [Documentation] Test Suit Cleanup: delete NST, NSD and VNFD - - Delete NST ${nst_id} - -# :FOR ${nsi} IN @{nsi_list} -# \ Delete Network Slice Instance ${nsi} - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/TS010__OSM_Platform_Resiliency_and_Recovery_Test.robot b/robot-systest/deprecated/testsuite/cli/TS010__OSM_Platform_Resiliency_and_Recovery_Test.robot deleted file mode 100644 index 2475e74..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS010__OSM_Platform_Resiliency_and_Recovery_Test.robot +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 08-nov-2019 : network slicing test library -## - - -*** Settings *** -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/osm_platform_resiliancy_recovery_lib.robot -Library ../../lib/custom_lib.py - - -*** Variables *** -${max_wait_time} 5min -${pol_time} 30sec -@{components} osm_keystone.1 osm_lcm.1 osm_light-ui.1 osm_mon.1 osm_mongo.1 osm_nbi.1 osm_pol.1 osm_prometheus.1 osm_ro.1 osm_kafka.1 osm_zookeeper.1 osm_mysql.1 - - -*** Test Cases *** -Feature 1413 - OSM platform resiliency to single component failure - [Tags] platform resiliency - [Documentation] OSM platform resiliency test - - ${name}= Get Random Item From List ${components} - Check If OSM Working - WAIT UNTIL KEYWORD SUCCEEDS 2x 30sec Check All Service Are Running - Kill Docker Container ${name} - WAIT UNTIL KEYWORD SUCCEEDS ${max_wait_time} ${pol_time} Check All Service Are Running - Check If OSM Working - - -Feature 1412 - OSM platform recovery after major failure - [Tags] platform recovery - [Documentation] OSM platform recovery - - Check If OSM Working - WAIT UNTIL KEYWORD SUCCEEDS 2x 30sec Check All Service Are Running - :FOR ${component} IN @{components} - \ Kill Docker Container ${component} - WAIT UNTIL KEYWORD SUCCEEDS ${max_wait_time} ${pol_time} Check All Service Are Running - Check If OSM Working diff --git a/robot-systest/deprecated/testsuite/cli/TS011__Feature_1415_RBAC_For_Platform_Test.robot b/robot-systest/deprecated/testsuite/cli/TS011__Feature_1415_RBAC_For_Platform_Test.robot deleted file mode 100644 index c8e44e1..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS011__Feature_1415_RBAC_For_Platform_Test.robot +++ /dev/null @@ -1,106 +0,0 @@ -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 21-nov-2019 -## - -*** Settings *** -Documentation Test RBAC for platform using CRUD operations over users, projects and roles -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/rbac_lib.robot - -#Suite Setup Configure NBI For RBAC -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -${success_return_code} 0 -# Test data for Users Operations test -${user_id} ${EMPTY} -&{update_field1} --set-project=admin,system_admin,project_admin #project,role1,role2... -&{update_field2} --add-project-role=admin,project_user #project,role1,role2... -&{update_field3} --add-project-role=service,account_manager #project,role1,role2... -@{update_user} ${update_field1} ${update_field2} ${update_field3} -# Test data for Project Operations test -${project_id} ${EMPTY} -# Test data for Role Operations test -${role_id} ${EMPTY} -${role_to_add} "vims: true" - - -*** Test Cases *** -Test User Operations - [Documentation] Test RBAC using CRUD operation over users - [Tags] rabc rabc_users comprehensive - - ${user-name}= Generate Random String 8 [NUMBERS] - ${user-name}= Catenate SEPARATOR= user_ ${user-name} - set global variable ${user-name} - ${user-password}= Generate Random String 8 [NUMBERS] - set global variable ${user-password} - ${user_id}= Create User ${user-name} ${user-password} - List User And Check For The Created User ${user-name} - Get User Info By Name ${user-name} - Get User Info By ID ${user_id} - Update User And Verify Info ${user-name} @{update_user} - Login With User And Perform Operation ${user-name} ${user-password} admin - Delete User And Check ${user-name} - - -Test Project Operatios - [Documentation] Test RBAC using CRUD operation over projects - [Tags] rabc rabc_projects comprehensive - - ${project-name}= Generate Random String 8 [NUMBERS] - ${project-name}= Catenate SEPARATOR= project_ ${project-name} - set global variable ${project-name} - ${project_id}= Create Project ${project-name} - List Project And Verify ${project-name} - Get Project Info By Name ${project-name} - Get Project Info By ID ${project_id} - ${new-project-name}= Generate Random String 8 [NUMBERS] - ${new-project-name}= Catenate SEPARATOR= project_ ${new-project-name} - set global variable ${new-project-name} - Update Project Name And Verify ${project-name} ${new-project-name} - Delete Project And Verify ${new-project-name} - - -Test Role Operations - [Documentation] Test RBAC using CRUD operation over roles - [Tags] rabc rabc_roles comprehensive - - ${role-name}= Generate Random String 8 [NUMBERS] - ${role-name}= Catenate SEPARATOR= project_ ${role-name} - set global variable ${role-name} - ${role_id}= Create Role ${role-name} - List Roles And Verify ${role-name} - Get Role Info By Name ${role-name} - Get Role Info By ID ${role_id} - Add Role And Verify ${role-name} ${role_to_add} - Delete Role And Verify ${role-name} - - -*** Keywords *** -Test Cleanup - Delete User ${user-name} - Delete Project ${project-name} - Delete Project ${new-project-name} - Delete Role ${role-name} \ No newline at end of file diff --git a/robot-systest/deprecated/testsuite/cli/TS012__Feature_7181_Allow_Instantiation_Parameters_in_CloudInit.robot b/robot-systest/deprecated/testsuite/cli/TS012__Feature_7181_Allow_Instantiation_Parameters_in_CloudInit.robot deleted file mode 100644 index c5e1c75..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS012__Feature_7181_Allow_Instantiation_Parameters_in_CloudInit.robot +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 TATA ELXSI -# -# All Rights Reserved. -# -# 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. -## - -## Author: Ragavi D (ragavi.d@tataelxsi.co.in) - -*** Settings *** -Documentation Test Suite to create hackfest basic nestwork service -Suite Teardown Run Keyword And Ignore Error Test Cleanup -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py -Variables ../../resource/cli/ubuntu-cloudinit_ns_data.py - -*** Variables *** -@{vnfd_ids} -${nsd_id} ${EMPTY} -@{nsd_ids} -@{ns_ids} -${ns_config} '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ], additionalParamsForVnf: [ { member-vnf-index: "1", additionalParams: { password: "PASSWORD" } } ] }' - -*** Test Cases *** -Create Ubuntu CloudInit VNF Descriptor - [Tags] comprehensive ubuntu-cloudinit_ns - Build VNF Descriptor ${vnfdPckgPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - -Create Ubuntu CloudInit NS Descriptor - [Tags] comprehensive ubuntu-cloudinit_ns - Build NS Descriptor ${nsdPckgPath} - ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - -Network Service Instance Test - [Documentation] Launch and terminate network services - [Tags] comprehensive ubuntu-cloudinit_ns - : FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} ${ns_config} - -Delete NS Instance Test - [Tags] comprehensive ubuntu-cloudinit_ns - : FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - -Delete NS Descriptor Test - [Tags] comprehensive ubuntu-cloudinit_ns - : FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - -Delete VNF Descriptor Test - [Tags] comprehensive ubuntu-cloudinit_ns - : FOR ${vnfd_id} IN @{vnfd_ids} - \ Delete VNFD ${vnfd_id} - -*** Keywords *** -Test Cleanup - [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim - : FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - : FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - : FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - # :FOR ${vim_id} IN @{vim} - # Delete Vim Account ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/TS013__Feature_1415_RBAC_Visibility_Of_Packages_And_Instances.robot b/robot-systest/deprecated/testsuite/cli/TS013__Feature_1415_RBAC_Visibility_Of_Packages_And_Instances.robot deleted file mode 100644 index 4302951..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS013__Feature_1415_RBAC_Visibility_Of_Packages_And_Instances.robot +++ /dev/null @@ -1,144 +0,0 @@ -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 18-Dec-2019 -## - -*** Settings *** -Documentation Test RBAC for platform - Visibility of packages and instances test -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/rbac_lib.robot -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py - -Suite Setup Prerequisite For Test -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -${success_return_code} 0 - -@{vim} -@{vnfd_ids} -${nsd_id} -@{nsd_ids} -@{ns_ids} -${vnfdPckg} hackfest_basic_vnf.tar.gz -${nsdPckg} hackfest_basic_ns.tar.gz -${vnfdftpPath} https://osm-download.etsi.org/ftp/osm-5.0-five/6th-hackfest/packages/hackfest_basic_vnf.tar.gz -${nsdftpPath} https://osm-download.etsi.org/ftp/osm-5.0-five/6th-hackfest/packages/hackfest_basic_ns.tar.gz - -# Test data for Users Operations test -${user_id} ${EMPTY} - -# Test data for Project Operations test -${project_id} ${EMPTY} - - -*** Test Cases *** -Create VIM Account For New User - [Documentation] Test to create VIM account for newly created user - [Tags] rabc rabc_vim comprehensive nbi - - Wait Until Keyword Succeeds 2x 30sec VIM Setup To Launch Network Services - - -Create VNF Descriptor For New User - [Documentation] Test to create vnfd for new user - [Tags] rabc rabc_vnfd comprehensive nbi - - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../resource/cli/rbac/' ${vnfdftpPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../resource/cli/rbac${/}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create NS Descriptor For New User - [Documentation] Test to create nsd for new user - [Tags] rabc rabc_nsd comprehensive nbi - - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../resource/cli/rbac/' ${nsdftpPath} - ${nsd_id}= Create VNFD '${CURDIR}${/}../../resource/cli/rbac${/}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Instanciate Network Service For New User - [Documentation] Launch network services for new user - [Tags] rabc rabc_ns comprehensive nbi - - :FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} - - -Delete NS Instance Test - [Tags] rabc rabc_ns comprehensive nbi - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - -Delete NS Descriptor Test - [Tags] rabc rabc_nsd comprehensive nbi - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - -Delete VNF Descriptor Test - [Tags] rabc rabc_vnfd comprehensive nbi - - :FOR ${vnfd_id} IN @{vnfd_ids} - \ Delete VNFD ${vnfd_id} - - -*** Keywords *** -Prerequisite For Test - ${user-name}= Generate Random String 8 [NUMBERS] - ${user-name}= Catenate SEPARATOR= user_ ${user-name} - set global variable ${user-name} - ${user-password}= Generate Random String 8 [NUMBERS] - set global variable ${user-password} - ${user_id}= Create User ${user-name} ${user-password} - - ${project-name}= Generate Random String 8 [NUMBERS] - ${project-name}= Catenate SEPARATOR= project_ ${project-name} - set global variable ${project-name} - ${project_id}= Create Project ${project-name} - - &{update_field1}= Create Dictionary --add-project-role=admin,project_user - &{update_field2}= Create Dictionary --add-project-role=${project-name},account_manager - @{update_user}= Create List ${update_field1} ${update_field2} - Update User And Verify Info ${user-name} @{update_user} - Login With User And Perform Operation ${user-name} ${user-password} ${project-name} - - -Test Cleanup - [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim - -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} - - Logout and Login With Admin - - Delete User ${user-name} - Delete Project ${project-name} diff --git a/robot-systest/deprecated/testsuite/cli/TS014__Feature_7921_MongoDB_Filesystem_Test.robot b/robot-systest/deprecated/testsuite/cli/TS014__Feature_7921_MongoDB_Filesystem_Test.robot deleted file mode 100644 index 3070d41..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS014__Feature_7921_MongoDB_Filesystem_Test.robot +++ /dev/null @@ -1,124 +0,0 @@ -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 18-Dec-2019 -## - -*** Settings *** -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py - -Suite Setup Prerequisite For Test -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -${success_return_code} 0 - -@{vim} -@{vnfd_ids} -${nsd_id} -@{nsd_ids} -@{ns_ids} -${vnfdPckg} hackfest_basic_vnf.tar.gz -${nsdPckg} hackfest_basic_ns.tar.gz -${vnfdftpPath} https://osm-download.etsi.org/ftp/osm-5.0-five/6th-hackfest/packages/hackfest_basic_vnf.tar.gz -${nsdftpPath} https://osm-download.etsi.org/ftp/osm-5.0-five/6th-hackfest/packages/hackfest_basic_ns.tar.gz - - -*** Test Cases *** -Create VNF Descriptor Test - [Tags] comprehensive feature7921 - - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../resource/' ${vnfdftpPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../resource${/}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create NS Descriptor Test - [Tags] comprehensive feature7921 - - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../resource/' ${nsdftpPath} - ${nsd_id}= Create VNFD '${CURDIR}${/}../../resource${/}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Instanciate Network Service Test - [Tags] comprehensive feature7921 - [Setup] Wait Until Keyword Succeeds 2x 30sec VIM Setup To Launch Network Services - - :FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} - - -Delete NS Instance Test - [Tags] comprehensive feature7921 - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - -Delete NS Descriptor Test - [Tags] comprehensive feature7921 - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - -Delete VNF Descriptor Test - [Tags] comprehensive feature7921 - - :FOR ${vnfd_id} IN @{vnfd_ids} - \ Delete VNFD ${vnfd_id} - - -*** Keywords *** -Prerequisite For Test - [Documentation] Update docker service to use mongodb as file system - - Update NBI Service - Update LCM Service - - -Update NBI Service - ${rc} ${stdout}= Run and Return RC and Output docker service update osm_nbi --force --env-add OSMNBI_STORAGE_DRIVER=mongo --env-add OSMNBI_STORAGE_PATH=/app/storage --env-add OSMNBI_STORAGE_COLLECTION=files --env-add OSMNBI_STORAGE_URI=mongodb://mongo:27017 - Should Be Equal As Integers ${rc} ${success_return_code} - Sleep 30s Wait for NBI service to be update - - -Update LCM Service - ${rc} ${stdout}= Run and Return RC and Output docker service update osm_lcm --force --env-add OSMLCM_STORAGE_DRIVER=mongo --env-add OSMLCM_STORAGE_PATH=/app/storage --env-add OSMLCM_STORAGE_COLLECTION=files --env-add OSMLCM_STORAGE_URI=mongodb://mongo:27017 - Should Be Equal As Integers ${rc} ${success_return_code} - Sleep 30s Wait for LCM service to be update - - -Test Cleanup -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} - - ${rc} ${stdout}= Run and Return RC and Output docker service rollback osm_nbi - Should Be Equal As Integers ${rc} ${success_return_code} - ${rc} ${stdout}= Run and Return RC and Output docker service rollback osm_lcm - Should Be Equal As Integers ${rc} ${success_return_code} diff --git a/robot-systest/deprecated/testsuite/cli/TS015__Feature_8047_OSMClient_Package_Creation_And_Validation.robot b/robot-systest/deprecated/testsuite/cli/TS015__Feature_8047_OSMClient_Package_Creation_And_Validation.robot deleted file mode 100644 index e717c10..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS015__Feature_8047_OSMClient_Package_Creation_And_Validation.robot +++ /dev/null @@ -1,84 +0,0 @@ -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 18-Dec-2019 -## - -*** Settings *** -Documentation Test Suite to test OSMClient Package Createtion and Validation Tool -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/osm_package_tools_lib.robot - -Suite Setup Prerequisite For Test -Suite Teardown Test Cleanup - - -*** Variables *** -${success_return_code} 0 -${base_dir} ${EXECDIR} -${pkg_dir} ${CURDIR}${/}../../resource/cli/packages -${ns_pkg} vEPC -${vnf_pkg} vEPC - - -*** Test Cases *** -Test OSM NS Package Create - [Tags] comprehensive feature8047 - Create OSM NS Package ${ns_pkg} - - -Test OSM VNF Package Create - [Tags] comprehensive feature8047 - Create OSM VNF Package ${vnf_pkg} - - -Test OSM NS Package Validate - [Tags] comprehensive feature8047 - Validate OSM NS Package ${ns_pkg} - - -Test OSM VNF Package Validate - [Tags] comprehensive feature8047 - Validate OSM VNF Package ${vnf_pkg} - - -Test OSM VNF Package Build - [Tags] comprehensive feature8047 - Build OSM VNF Package ${vnf_pkg} - - -Test OSM NS Package Build - [Tags] comprehensive feature8047 - Build OSM NS Package ${ns_pkg} - - -*** Keywords *** -Prerequisite For Test - Create Directory ${pkg_dir} - ${rc} ${stdout}= Run and Return RC and Output cd ${pkg_dir} - Should Be Equal As Integers ${rc} ${success_return_code} - - -Test Cleanup - ${rc} ${stdout}= Run and Return RC and Output cd ${base_dir} - Should Be Equal As Integers ${rc} ${success_return_code} - - Remove Directory ${pkg_dir} recursive=${TRUE} \ No newline at end of file diff --git a/robot-systest/deprecated/testsuite/cli/TS016__Manual_VNF_VDU_Scaling_Test.robot b/robot-systest/deprecated/testsuite/cli/TS016__Manual_VNF_VDU_Scaling_Test.robot deleted file mode 100644 index 3f7bce8..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS016__Manual_VNF_VDU_Scaling_Test.robot +++ /dev/null @@ -1,129 +0,0 @@ -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 27-Nov-19 -## - -*** Settings *** -Documentation Test Suite to test manual scale-in/out cirros VNF and NS using osm-client -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py - -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -# VNFD Details -@{vnfd_ids} -${vnfdPckgPath} /descriptor-packages/vnfd/cirros_vnf -${vnfdPckg} /build/cirros_vnf.tar.gz - -# NSD Details -@{nsd_ids} -${nsdPckgPath} /descriptor-packages/nsd/cirros_ns -${nsdPckg} /build/cirros_ns.tar.gz -${scaling_group} scaling_cirros_vnf -${vnf_member_index} 1 - -@{ns_ids} - - -*** Test Cases *** -Create VNF Descriptor Test - [Documentation] Build and onboard cirros VNF package with scaling parameter - [Tags] comprehensive manual_scaling - - Build VNF Descriptor ${vnfdPckgPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create NS Descriptor Test - [Documentation] Build and onboard cirros NS package with scaling parameter - [Tags] comprehensive manual_scaling - - Build NS Descriptor ${nsdPckgPath} - ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Network Service Instance Test - [Documentation] Launch cirros ns with scaling parameter - [Tags] comprehensive manual_scaling - - :FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} - - -Perform VNF/VDU Scaling-out Operation Over Launched NS Test - [Documentation] scale-out cirros ns - [Tags] comprehensive manual_scaling - :FOR ${ns} IN @{ns_ids} - \ Perform VNF Scale-out Operation ${ns} ${vnf_member_index} ${scaling_group} - - -Perform VNF/VDU Scaling-in Operation Over Launched NS Test - [Documentation] scale-in cirros ns - [Tags] comprehensive manual_scaling - :FOR ${ns} IN @{ns_ids} - \ Perform VNF Scale-in Operation ${ns} ${vnf_member_index} ${scaling_group} - - -Delete NS Instance Test - [Tags] comprehensive manual_scaling - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - -Delete NS Descriptor Test - [Tags] comprehensive manual_scaling - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - -Delete VNF Descriptor Test - [Tags] comprehensive manual_scaling - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - - -*** Keywords *** -Test Cleanup - [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/TS017__Feature_7326_Disable_Port_Security_at_Network_level.robot b/robot-systest/deprecated/testsuite/cli/TS017__Feature_7326_Disable_Port_Security_at_Network_level.robot deleted file mode 100644 index 562dc15..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS017__Feature_7326_Disable_Port_Security_at_Network_level.robot +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2020 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -# -# Author: Mrityunjay Yadav , Jayant Madavi -## - - -*** Settings *** -Documentation Test Suite to test disable network port security NS -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py -Variables ../../resource/cli/disable_port_security_ns_data.py - -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -@{vnfd_ids} -${nsd_id} -@{nsd_ids} -@{ns_ids} - - -*** Test Cases *** -Create VNF Descriptor - [Tags] disable_port_security comprehensive - - Build VNF Descriptor ${vnfdPckgPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create NS Descriptor - [Tags] disable_port_security comprehensive - - Build NS Descriptor ${nsdPckgPath} - ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Network Service Instance Test - [Documentation] Launch and terminate network services - [Tags] disable_port_security comprehensive - - :FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} - - -Verify Port Security - [Tags] disable_port_security comprehensive - - :FOR ${ns} IN @{ns_ids} - \ Check For Network Port Security ${ns} - - -Delete NS Instance Test - [Tags] disable_port_security comprehensive - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - -Delete NS Descriptor Test - [Tags] disable_port_security comprehensive - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - -Delete VNF Descriptor Test - [Tags] disable_port_security comprehensive - - :FOR ${vnfd_id} IN @{vnfd_ids} - \ Delete VNFD ${vnfd_id} - - -*** Keywords *** -Check For Network Port Security - [Arguments] ${ns_name} - ${rc} ${network_id}= Run and Return RC and Output openstack network list | grep ${ns_name} | awk '{print $2}' - Log ${network_id} - ${rc} ${stdout}= Run and Return RC and Output openstack network show ${network_id} -f json | jq '.port_security_enabled' - Log ${stdout} - Should Be Equal As Strings ${stdout} true - - -Test Cleanup - [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/TS01__Test_VNF.robot b/robot-systest/deprecated/testsuite/cli/TS01__Test_VNF.robot deleted file mode 100644 index 84e1f92..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS01__Test_VNF.robot +++ /dev/null @@ -1,107 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 06-aug-2019 -## - - -*** Settings *** -Documentation Test Suite to test basic cirros VNF and NS using osm-client -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py -Variables ../../resource/cli/test_vnf_data.py - -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -@{vnfd_ids} -@{nsd_ids} -@{ns_ids} - - -*** Test Cases *** -Create VNF Descriptor Test - [Tags] sanity smoke - - Build VNF Descriptor ${vnfdPckgPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create NS Descriptor Test - [Tags] sanity smoke - - Build NS Descriptor ${nsdPckgPath} - ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Network Service Instance Test - [Documentation] Launch and terminate network services - [Tags] sanity - - :FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} - - -Delete NS Instance Test - [Tags] sanity - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - -Delete NS Descriptor Test - [Tags] sanity smoke - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - -Delete VNF Descriptor Test - [Tags] sanity smoke - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - - -*** Keywords *** -Test Cleanup - [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/TS02__Test_Vim.robot b/robot-systest/deprecated/testsuite/cli/TS02__Test_Vim.robot deleted file mode 100644 index 18f2a50..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS02__Test_Vim.robot +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-aug-2019 : Improvement to the code, robot framework initial seed code. -## - - -*** Settings *** -Documentation Test suiet to create/delete vim account via osmclient -Library OperatingSystem -Library Collections -Resource ../../lib/cli/vim_account_lib.robot - - -*** Test Cases *** -Create Vim Account Test - [Tags] smoke vim - - Create Vim Account - - -Get Vim Accounts List Test - [Tags] vim - - Get Vim List - - -Delete Vim Account Test - [Tags] smoke vim - - Delete Vim Account diff --git a/robot-systest/deprecated/testsuite/cli/TS03__Hackfest_Basic_NS.robot b/robot-systest/deprecated/testsuite/cli/TS03__Hackfest_Basic_NS.robot deleted file mode 100644 index 40492f7..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS03__Hackfest_Basic_NS.robot +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 06-aug-2019 -## - - -*** Settings *** -Documentation Test Suite to create hackfest basic nestwork service -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py -Variables ../../resource/cli/hackfest_basic_ns_data.py - -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -@{vnfd_ids} -${nsd_id} -@{nsd_ids} -@{ns_ids} - - -*** Test Cases *** -Create Hackfest Basic VNF Descriptor - [Tags] comprehensive hackfest_basic_ns - - Build VNF Descriptor ${vnfdPckgPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create Hackfest Basic NS Descriptor - [Tags] comprehensive hackfest_basic_ns - - Build NS Descriptor ${nsdPckgPath} - ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Network Service Instance Test - [Documentation] Launch and terminate network services - [Tags] comprehensive hackfest_basic_ns - - :FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} - - -Delete NS Instance Test - [Tags] comprehensive hackfest_basic_ns - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - -Delete NS Descriptor Test - [Tags] comprehensive hackfest_basic_ns - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - -Delete VNF Descriptor Test - [Tags] comprehensive hackfest_basic_ns - - :FOR ${vnfd_id} IN @{vnfd_ids} - \ Delete VNFD ${vnfd_id} - - -*** Keywords *** -Test Cleanup - [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/TS04__Hackfest_Simplecharm_NS.robot b/robot-systest/deprecated/testsuite/cli/TS04__Hackfest_Simplecharm_NS.robot deleted file mode 100644 index 2a22478..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS04__Hackfest_Simplecharm_NS.robot +++ /dev/null @@ -1,113 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 06-aug-2019 -## - - -*** Settings *** -Documentation Test Suite to create hackfest simplecharm ns -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py -Variables ../../resource/cli/hackfest_simplecharm_ns_data.py - -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -@{vnfd_ids} -${nsd_id} -@{nsd_ids} -@{ns_ids} -${vnfdftpPath} https://osm-download.etsi.org/ftp/osm-6.0-six/7th-hackfest/packages/hackfest_simplecharm_vnf.tar.gz -${nsdftpPath} https://osm-download.etsi.org/ftp/osm-6.0-six/7th-hackfest/packages/hackfest_simplecharm_ns.tar.gz - - -*** Test Cases *** -Create Hackfest Simple Charm VNF Descriptor - [Tags] hackfest_simplecharm comprehensive - - #Build VNF Descriptor ${vnfdPckgPath} - #Workarround for charm build issue - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../..${vnfdPckgPath}${/}build/' ${vnfdftpPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create Hackfest Simple Charm NS Descriptor - [Tags] hackfest_simplecharm comprehensive - - #Build NS Descriptor ${nsdPckgPath} - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../..${nsdPckgPath}${/}build/' ${nsdftpPath} - ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Network Service Instance Test - [Documentation] Launch and terminate network services - [Tags] hackfest_simplecharm comprehensive - - :FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} - - -Delete NS Instance Test - [Tags] comprehensive hackfest_simplecharm - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - -Delete NS Descriptor Test - [Tags] hackfest_simplecharm comprehensive - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - -Delete VNF Descriptor Test - [Tags] hackfest_simplecharm comprehensive - - :FOR ${vnfd_id} IN @{vnfd_ids} - \ Delete VNFD ${vnfd_id} - - -*** Keywords *** -Test Cleanup - [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/TS05__Hackfest_Multivdu_NS.robot b/robot-systest/deprecated/testsuite/cli/TS05__Hackfest_Multivdu_NS.robot deleted file mode 100644 index e3cc440..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS05__Hackfest_Multivdu_NS.robot +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 06-aug-2019 -## - - -*** Settings *** -Documentation Test Suite to create hackfest multivdu ns -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py -Variables ../../resource/cli/hackfest_multivdu_ns_data.py - -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -@{vnfd_ids} -${nsd_id} -@{nsd_ids} -@{ns_ids} - - -*** Test Cases *** -Create Hackfest Multivdu VNF Descriptor - [Tags] comprehensive hackfest_multivdu - - Build VNF Descriptor ${vnfdPckgPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create Hackfest Multivdu NS Descriptor - [Tags] comprehensive hackfest_multivdu - - Build NS Descriptor ${nsdPckgPath} - ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Network Service Instance Test - [Documentation] Launch and terminate network services - [Tags] comprehensive hackfest_multivdu - - :FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} - - -Delete NS Instance Test - [Tags] comprehensive hackfest_multivdu - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - -Delete NS Descriptor Test - [Tags] comprehensive hackfest_multivdu - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - -Delete VNF Descriptor Test - [Tags] comprehensive hackfest_multivdu - - :FOR ${vnfd_id} IN @{vnfd_ids} - \ Delete VNFD ${vnfd_id} - - -*** Keywords *** -Test Cleanup - [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/TS06__Hackfest_Cloudinit_NS.robot b/robot-systest/deprecated/testsuite/cli/TS06__Hackfest_Cloudinit_NS.robot deleted file mode 100644 index 87bf22f..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS06__Hackfest_Cloudinit_NS.robot +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 06-aug-2019 -## - - -*** Settings *** -Documentation Test Suite to create hackfest cloudinit ns -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py -Variables ../../resource/cli/hackfest_cloudinit_ns_data.py - -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -@{vnfd_ids} -${nsd_id} -@{nsd_ids} -@{ns_ids} - - -*** Test Cases *** -Create Hackfest Cloudinit VNF Descriptor - [Tags] comprehensive hackfest_cloudinit - - Build VNF Descriptor ${vnfdPckgPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create Hackfest Cloudinit NS Descriptor - [Tags] comprehensive hackfest_cloudinit - - Build NS Descriptor ${nsdPckgPath} - ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Network Service Instance Test - [Documentation] Launch and terminate network services - [Tags] comprehensive hackfest_cloudinit - - :FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} - - -Delete NS Instance Test - [Tags] comprehensive hackfest_cloudinit - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - -Delete NS Descriptor Test - [Tags] comprehensive hackfest_cloudinit - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - -Delete VNF Descriptor Test - [Tags] comprehensive hackfest_cloudinit - - :FOR ${vnfd_id} IN @{vnfd_ids} - \ Delete VNFD ${vnfd_id} - - -*** Keywords *** -Test Cleanup - [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/TS07__Hackfest_EPA_NS.robot b/robot-systest/deprecated/testsuite/cli/TS07__Hackfest_EPA_NS.robot deleted file mode 100644 index 5316598..0000000 --- a/robot-systest/deprecated/testsuite/cli/TS07__Hackfest_EPA_NS.robot +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 06-aug-2019 -## - - -*** Settings *** -Documentation Test Suite to create hackfest epa ns -Library OperatingSystem -Library String -Library Collections -Resource ../../lib/cli/vnfd_lib.robot -Resource ../../lib/cli/nsd_lib.robot -Resource ../../lib/cli/ns_lib.robot -Resource ../../lib/cli/vim_account_lib.robot -Library ../../lib/custom_lib.py -Variables ../../resource/cli/hackfest_epa_ns_data.py - -Suite Teardown Run Keyword And Ignore Error Test Cleanup - - -*** Variables *** -@{vnfd_ids} -${nsd_id} -@{nsd_ids} -@{ns_ids} - - -*** Test Cases *** -Create Hackfest EPA VNF Descriptor - [Tags] hackfest_epa - - Build VNF Descriptor ${vnfdPckgPath} - ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}' - Append To List ${vnfd_ids} ${vnfd_id} - - -Create Hackfest EPA NS Descriptor - [Tags] hackfest_epa - - Build NS Descriptor ${nsdPckgPath} - ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}' - Append To List ${nsd_ids} ${nsd_id} - - -Network Service Instance Test - [Documentation] Launch and terminate network services - [Tags] hackfest_epa - - :FOR ${vim_name} IN @{vim} - \ Launch Network Services and Return ${vim_name} - - -Delete NS Instance Test - [Tags] hackfest_epa - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - -Delete NS Descriptor Test - [Tags] hackfest_epa - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - -Delete VNF Descriptor Test - [Tags] hackfest_epa - - :FOR ${vnfd_id} IN @{vnfd_ids} - \ Delete VNFD ${vnfd_id} - - -*** Keywords *** -Test Cleanup - [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim - - :FOR ${ns} IN @{ns_ids} - \ Delete NS ${ns} - - :FOR ${nsd} IN @{nsd_ids} - \ Delete NSD ${nsd} - - :FOR ${vnfd} IN @{vnfd_ids} - \ Delete VNFD ${vnfd} - -# :FOR ${vim_id} IN @{vim} -# \ Delete Vim Account ${vim_id} diff --git a/robot-systest/deprecated/testsuite/cli/__init__.robot b/robot-systest/deprecated/testsuite/cli/__init__.robot deleted file mode 100644 index 2d959da..0000000 --- a/robot-systest/deprecated/testsuite/cli/__init__.robot +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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 *** -Library OperatingSystem -Library String -Library Collections -Library ../../lib/custom_lib.py -Resource ../../lib/cli/vim_account_lib.robot - -Suite Setup Wait Until Keyword Succeeds 2x 30sec VIM Setup To Launch Network Services -Suite Teardown Run Keyword And Ignore Error Suite Cleanup - - -*** Variables *** -@{vim} - - -*** Keywords *** -Suite Cleanup - :FOR ${vim_id} IN @{vim} - \ Force Delete Vim Account ${vim_id} \ No newline at end of file diff --git a/robot-systest/deprecated/testsuite/client_library/TS01__OSMClient_Library_Test.robot b/robot-systest/deprecated/testsuite/client_library/TS01__OSMClient_Library_Test.robot deleted file mode 100644 index 88d8b5c..0000000 --- a/robot-systest/deprecated/testsuite/client_library/TS01__OSMClient_Library_Test.robot +++ /dev/null @@ -1,82 +0,0 @@ -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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 Test suite to test osmclient python library -Library OperatingSystem - -Suite Setup Setup OSM Client - - -*** Variables *** -${name} helloworld-os -${user} robottest -${password} fred -${authurl} https://169.254.169.245/ -${type} openstack -${desc} a test vim -${tenant} robottest - - -*** Test Cases *** -Get VIM Account List Test - [Tags] comprehensive osmclient_lib - [Documentation] Using python's osmclient library to get vim account list - - ${vim_list}= osmclient.get_vim_list - log to console ${vim_list} - log ${vim_list} - - -Get VNF Descriptor List Test - [Tags] comprehensive osmclient_lib - [Documentation] Using python's osmclient library to get vnfd list - - ${vnfd_list}= osmclient.get_vnfd_list - log to console ${vnfd_list} - log ${vnfd_list} - - -Get NS Descriptor List Test - [Tags] comprehensive osmclient_lib - [Documentation] Using python's osmclient library to get nsd list - - ${nsd_list}= osmclient.get_nsd_list - log to console ${nsd_list} - log ${nsd_list} - - -Create Vim Account Test - [Tags] comprehensive osmclient_lib - [Documentation] Using python's osmclient library to create vim account - [Template] osmclient.create_vim_account - ${name} ${type} ${user} ${password} ${authurl} ${tenant} ${desc} - - -Delete Vim Account Test - [Tags] comprehensive osmclient_lib - [Documentation] Using python's osmclient library to delete vim account - osmclient.delete_vim_account ${name} - - -*** Keywords *** -Setup OSM Client - evaluate sys.path.append('${CURDIR}${/}../../lib/client_lib') modules=sys - ${host}= Get Environment Variable OSM_HOSTNAME 127.0.0.1 - Import Library client_lib.ClientLib host=${host} WITH NAME osmclient diff --git a/robot-systest/deprecated/testsuite/gui/TS01__Test_GUI_Login.robot b/robot-systest/deprecated/testsuite/gui/TS01__Test_GUI_Login.robot deleted file mode 100644 index 4f20a18..0000000 --- a/robot-systest/deprecated/testsuite/gui/TS01__Test_GUI_Login.robot +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- - -## -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# 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. -## - -## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com -## - - -*** Settings *** -Documentation Suite description -Library SeleniumLibrary -Library OperatingSystem -Resource ../../lib/gui/login_gui.robot - - -*** Test Cases *** -Valid Login - [Tags] comprehensive gui_login_test - [Setup] Set Server URL - Open Browser To Login Page - Enter Credentials admin admin - Submit Credentials - Home Page Should Be Open - [Teardown] Close Browser -- 2.25.1 From 9c869c937d3ef04305a52c6308710ec5d8566176 Mon Sep 17 00:00:00 2001 From: Gabriel Cuba Date: Fri, 4 Nov 2022 18:43:55 -0500 Subject: [PATCH 11/16] Feature 10956: Add test basic_27 for Helm based EE - NS update Change-Id: I190697b0a77fc76f00782f025d79303ea4ee0878 Signed-off-by: Gabriel Cuba --- ...date_helm_ee_in_running_vnf_instance.robot | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 robot-systest/testsuite/basic_27-update_helm_ee_in_running_vnf_instance.robot diff --git a/robot-systest/testsuite/basic_27-update_helm_ee_in_running_vnf_instance.robot b/robot-systest/testsuite/basic_27-update_helm_ee_in_running_vnf_instance.robot new file mode 100644 index 0000000..1f62bd8 --- /dev/null +++ b/robot-systest/testsuite/basic_27-update_helm_ee_in_running_vnf_instance.robot @@ -0,0 +1,176 @@ +# 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-27] Update Helm EE in Running VNF Instance. + +Library OperatingSystem +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/ssh_lib.robot + +Force Tags basic_27 cluster_ee_config daily regression + +Suite Teardown Run Keyword And Ignore Error Suite Cleanup + + +*** Variables *** +# NS and VNF descriptor package folder and ids +${vnfd_pkg} simple_ee_vnf +${updated_vnfd_pkg} updated_simple_ee_vnf +${vnfd_name} simple_ee-vnf +${nsd_pkg} simple_ee_ns +${nsd_name} simple_ee-ns + +# NS instance name and configuration +${ns_name} basic_27_helm_ee_update_test +${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} + +${action_name} touch +${new_action_name} mkdir +${vnf_member_index} simple +${day_1_file_name} /home/ubuntu/first-touch +${day_2_file_name} /home/ubuntu/mytouch1 +${day_2_folder_name} /home/ubuntu/myfolder1 +${ns_timeout} 15min + +# NS update operation configuration +${update_type} CHANGE_VNFPKG +${ns_update_timeout} 500 + + +*** Test Cases *** +Create VNF Descriptor + + ${id}= Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}' + Set Suite Variable ${vnfd_id} ${id} + + +Create NS Descriptor + + Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}' + + +Instantiate Network Service + + ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey} ${ns_timeout} + Set Suite Variable ${ns_id} ${id} + + +Set NS Update Config + + Variable Should Exist ${ns_id} msg=NS is not available + ${id} Get Vnf Id ${ns_id} ${vnf_member_index} + log ${id} + Set Suite Variable ${vnf_id} ${id} + Set Suite Variable ${ns_update_config} '{changeVnfPackageData: [{vnfInstanceId: "${vnf_id}", vnfdId: "${vnfd_id}"}]}' + + +Get Management Ip Address + + ${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index} + log ${ip_addr} + Set Suite Variable ${vnf_ip_addr} ${ip_addr} + + +Test SSH Access + + Variable Should Exist ${vnf_ip_addr} msg=IP address of the management VNF '${vnf_member_index}' is not available + Sleep 30s Waiting ssh daemon to be up + Test SSH Connection ${vnf_ip_addr} ${username} ${password} ${privatekey} + + +Check Remote Files Created Via Day 1 Operation + [Documentation] The VNF has a Day 1 operation that creates a file named ${day_1_file_name}. + ... This test checks whether that files have been created or not. + + Check If remote File Exists ${vnf_ip_addr} ${username} ${password} ${privatekey} ${day_1_file_name} + + +Execute Day 2 Operation + [Documentation] Performs one Day 2 operation on the VNF that creates a new file. + + Variable Should Exist ${ns_id} msg=Network service instance is not available + ${ns_op_id_1}= Execute NS Action ${ns_name} ${action_name} ${vnf_member_index} file-path=${day_2_file_name} + + +Check Remote File Created Via Day 2 Operation + [Documentation] Check whether the file created in the previous test via Day 2 operations exist or not. + + Check If remote File Exists ${vnf_ip_addr} ${username} ${password} ${privatekey} ${day_2_file_name} + + +Update VNFD Package + [Documentation] Updates the VNFD by using new VNFD package which includes the EE + ... which has new day2 operation. + + Update VNFD '%{PACKAGES_FOLDER}/${updated_vnfd_pkg}' ${vnfd_name} + + +Update Running VNF Instance + [Documentation] Updates the running VNF instance by using new VNFD package. + ... As the VNFD has an updated Helm EE, this operation will trigger the upgrade of existing Helm EE + ... for the specific VNF. + + Update Network Service ${ns_id} ${update_type} ${ns_update_config} ${ns_update_timeout} + + +Execute Day 2 Operation on Upgraded Helm EE + [Documentation] Performs one Day 2 operation on the updated VNF that creates a new folder. + + Variable Should Exist ${ns_id} msg=Network service instance is not available + ${ns_op_id_2}= Execute NS Action ${ns_name} ${new_action_name} ${vnf_member_index} foldername=${day_2_folder_name} + + +Check Remote Folder Created Via Day 2 Operation + [Documentation] Check whether the folder created in the previous test via Day 2 operations exist or not. + + Check If remote Folder Exists ${vnf_ip_addr} ${username} ${password} ${privatekey} ${day_2_folder_name} + + +Delete NS Instance + [Tags] cleanup + + Delete NS ${ns_name} + + +Delete NS Descriptor + [Tags] cleanup + + Delete NSD ${nsd_name} + + +Delete VNF Descriptor + [Tags] cleanup + + Delete VNFD ${vnfd_name} + + +*** Keywords *** +Suite Cleanup + [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance + + 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} + -- 2.25.1 From 01b2947724030b15445e2e78ce6e3ff51bc4645c Mon Sep 17 00:00:00 2001 From: Guillermo Calvino Date: Fri, 18 Nov 2022 16:52:50 +0100 Subject: [PATCH 12/16] Bug 2194: OSM_HOSTNAME variable doesn't get the IP of the host when robot tests are used with Charmed OSM Change-Id: I96882f584dcdab60cafa27edcf7dbdae7fb65a4b Signed-off-by: Guillermo Calvino --- robot-systest/lib/juju_lib.robot | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/robot-systest/lib/juju_lib.robot b/robot-systest/lib/juju_lib.robot index 8cc450c..b125679 100644 --- a/robot-systest/lib/juju_lib.robot +++ b/robot-systest/lib/juju_lib.robot @@ -16,17 +16,19 @@ ${success_return_code} 0 *** Keywords *** Get Scale Number - [Arguments] ${host} ${username} ${password} ${privatekey} ${application_name} ${model_name} + [Arguments] ${endpoint} ${username} ${password} ${privatekey} ${application_name} ${model_name} Should Not Be Empty ${application_name} ${model_name} + ${host}= Remove String Using Regexp ${endpoint} :([0-9]+)$ ${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju show-status ${application_name} --format yaml -m ${model_name} | grep scale | awk -F ': ' '{print $2}' log ${stdout} [Return] ${stdout} Get Model Name - [Arguments] ${host} ${username} ${password} ${privatekey} ${ns_id} ${kdu_name} + [Arguments] ${endpoint} ${username} ${password} ${privatekey} ${ns_id} ${kdu_name} Should Not Be Empty ${ns_id} ${kdu_name} + ${host}= Remove String Using Regexp ${endpoint} :([0-9]+)$ ${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju models | grep -i ${kdu_name} | grep -i ${ns_id} | cut -f1 -d " " log ${stdout} ${model_name}= Set Variable ${kdu_name}-${ns_id} @@ -34,9 +36,10 @@ Get Model Name [Return] ${stdout} Get Application Name VDU Level Charm - [Arguments] ${host} ${username} ${password} ${privatekey} ${model_name} ${vdu_profile_id} ${ee_name} + [Arguments] ${endpoint} ${username} ${password} ${privatekey} ${model_name} ${vdu_profile_id} ${ee_name} Should Not Be Empty ${model_name} + ${host}= Remove String Using Regexp ${endpoint} :([0-9]+)$ ${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju status -m ${model_name} | grep "\\-vdu" | grep -v "*" | grep -i ${vdu_profile_id} | cut -f1 -d " " log ${stdout} Should Not Be Empty ${stdout} @@ -44,18 +47,20 @@ Get Application Name VDU Level Charm [Return] ${stdout} Get Application Name NS Level Charm - [Arguments] ${host} ${username} ${password} ${privatekey} ${model_name} ${charm_name} + [Arguments] ${endpoint} ${username} ${password} ${privatekey} ${model_name} ${charm_name} Should Not Be Empty ${model_name} + ${host}= Remove String Using Regexp ${endpoint} :([0-9]+)$ ${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju status -m ${model_name} | grep "\\-ns" | grep -v "*" | grep -i ${charm_name} | cut -f1 -d " " log ${stdout} Should Not Be Empty ${stdout} [Return] ${stdout} Get Application Name VNF Level Charm - [Arguments] ${host} ${username} ${password} ${privatekey} ${model_name} ${vnf_profile_id} ${ee_name} + [Arguments] ${endpoint} ${username} ${password} ${privatekey} ${model_name} ${vnf_profile_id} ${ee_name} Should Not Be Empty ${model_name} + ${host}= Remove String Using Regexp ${endpoint} :([0-9]+)$ ${stdout}= Execute Remote Command Check Rc Return Output ${host} ${username} ${password} ${privatekey} juju status -m ${model_name} | grep "\\-vnf" | grep -v "*" | grep -i ${vnf_profile_id} | cut -f1 -d " " log ${stdout} Should Not Be Empty ${stdout} -- 2.25.1 From 73951e60380e7b6b908945237cd82c115f81f882 Mon Sep 17 00:00:00 2001 From: Gabriel Cuba Date: Fri, 4 Nov 2022 18:52:08 -0500 Subject: [PATCH 13/16] Feature 10947: Add test basic_26 for Secure gRPC in helm based EE Change-Id: I43d3f5743252c134a1f5c38b7500cfaac58ca3e1 Signed-off-by: Gabriel Cuba --- ...26-secure_helm_execution_environment.robot | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 robot-systest/testsuite/basic_26-secure_helm_execution_environment.robot diff --git a/robot-systest/testsuite/basic_26-secure_helm_execution_environment.robot b/robot-systest/testsuite/basic_26-secure_helm_execution_environment.robot new file mode 100644 index 0000000..54806ba --- /dev/null +++ b/robot-systest/testsuite/basic_26-secure_helm_execution_environment.robot @@ -0,0 +1,118 @@ +# 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-26] Secure connection to helm execution environments. + +Library OperatingSystem +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/ssh_lib.robot + +Force Tags basic_26 cluster_ee_config daily regression + +Suite Teardown Run Keyword And Ignore Error Suite Cleanup + + +*** Variables *** +# NS and VNF descriptor package folder and ids +${vnfd_pkg} simple_secure_ee_vnf +${vnfd_name} simple_secure_ee-vnf +${nsd_pkg} simple_secure_ee_ns +${nsd_name} simple_secure_ee-ns + +# NS instance name and configuration +${ns_name} basic_26_secure_helm_ee_test +${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} + +${action_name} touch +${new_action_name} mkdir +${vnf_member_index} simple +${day_1_file_name} /home/ubuntu/first-touch +${ns_timeout} 15min + + +*** Test Cases *** +Create VNF Descriptor + + ${id}= Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}' + Set Suite Variable ${vnfd_id} ${id} + + +Create NS Descriptor + + Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}' + + +Instantiate Network Service + + ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey} ${ns_timeout} + Set Suite Variable ${ns_id} ${id} + + +Get Management Ip Address + + ${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index} + log ${ip_addr} + Set Suite Variable ${vnf_ip_addr} ${ip_addr} + + +Test SSH Access + + Variable Should Exist ${vnf_ip_addr} msg=IP address of the management VNF '${vnf_member_index}' is not available + Sleep 30s Waiting ssh daemon to be up + Test SSH Connection ${vnf_ip_addr} ${username} ${password} ${privatekey} + + +Check Remote File Created Via Day 1 Operation + [Documentation] Check whether the file created in the previous test via Day 1 operations exist or not. + + Check If remote File Exists ${vnf_ip_addr} ${username} ${password} ${privatekey} ${day_1_file_name} + + +Delete NS Instance + [Tags] cleanup + + Delete NS ${ns_name} + + +Delete NS Descriptor + [Tags] cleanup + + Delete NSD ${nsd_name} + + +Delete VNF Descriptor + [Tags] cleanup + + Delete VNFD ${vnfd_name} + + +*** Keywords *** +Suite Cleanup + [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance + + 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} + -- 2.25.1 From b61c5d9524d14bab0dcf0e59c7dd2f7bd29579a1 Mon Sep 17 00:00:00 2001 From: Mark Beierl Date: Mon, 28 Nov 2022 06:29:25 -0500 Subject: [PATCH 14/16] v13.0 Branch Preparation Pins version of Flake8 Updates requirements to point to branch Change-Id: I8b62a76fd1b06ad6b5a3fb13c321b3b15d7c1a16 Signed-off-by: Mark Beierl --- requirements-dev.in | 4 ++-- requirements-dev.txt | 48 ++++++++++++++++++++++---------------------- tox.ini | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/requirements-dev.in b/requirements-dev.in index dc09a5e..ae6bd6a 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -14,7 +14,7 @@ # limitations under the License. git+https://osm.etsi.org/gerrit/osm/IM.git@master#egg=osm-im --r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master +-r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=v13.0 git+https://osm.etsi.org/gerrit/osm/osmclient.git@master#egg=osm-osmclient --r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master +-r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 diff --git a/requirements-dev.txt b/requirements-dev.txt index 9cdc309..2396ab6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,80 +16,80 @@ ####################################################################################### bitarray==2.5.1 # via - # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=v13.0 # pyangbind certifi==2022.6.15 # via - # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 # requests charset-normalizer==2.0.12 # via - # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 # requests click==8.1.3 - # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 enum34==1.1.10 # via - # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=v13.0 # pyangbind idna==3.3 # via - # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 # requests jinja2==3.1.2 - # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 lxml==4.9.0 # via - # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=v13.0 # pyang # pyangbind markupsafe==2.1.1 # via - # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 # jinja2 osm-im @ git+https://osm.etsi.org/gerrit/osm/IM.git@master # via -r requirements-dev.in osmclient @ git+https://osm.etsi.org/gerrit/osm/osmclient.git@master # via -r requirements-dev.in packaging==21.3 - # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 prettytable==3.3.0 - # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 pyang==2.5.3 # via - # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=v13.0 # pyangbind pyangbind==0.8.1 - # via -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master + # via -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=v13.0 pycurl==7.45.1 - # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 pyparsing==3.0.9 # via - # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 # packaging python-magic==0.4.27 - # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 pyyaml==5.4.1 # via - # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master - # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=v13.0 + # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 regex==2022.6.2 # via - # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=v13.0 # pyangbind requests==2.28.0 - # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 six==1.16.0 # via - # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=v13.0 # pyangbind urllib3==1.26.9 # via - # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 # requests verboselogs==1.7 - # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 wcwidth==0.2.5 # via - # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master + # -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=v13.0 # prettytable diff --git a/tox.ini b/tox.ini index 81860e5..2898650 100644 --- a/tox.ini +++ b/tox.ini @@ -45,7 +45,7 @@ whitelist_externals = sh ####################################################################################### [testenv:flake8] -deps = flake8 +deps = flake8==5.0.4 commands = flake8 robot-systest -- 2.25.1 From 8c7c4c03bbb44a3299836291380a9f1ff22b9d5a Mon Sep 17 00:00:00 2001 From: Guillermo Calvino Date: Mon, 21 Nov 2022 18:13:58 +0100 Subject: [PATCH 15/16] Fix Bug 2197 - Prometheus cannot be authenticated in Robot tests Change-Id: I1c610968fea5f13711d6d6d8bed5ddc7422a6d3f Signed-off-by: Guillermo Calvino Signed-off-by: garciadeblas --- robot-systest/lib/prometheus_lib.robot | 14 +++--- robot-systest/lib/sdnc_lib.robot | 8 ++-- robot-systest/lib/vim_lib.robot | 16 +++---- ..._01-crud_operations_on_vim_targets_data.py | 43 +++++++++++++++---- ...isable_port_security_network_level_data.py | 43 +++++++++++++------ robot-systest/resources/common_helpers.py | 14 +++--- .../epa_03-crud_operations_on_sdnc_data.py | 7 ++- .../sa_01-vnf_with_vim_metrics_data.py | 7 ++- ...f_with_vim_metrics_and_autoscaling_data.py | 7 ++- .../sa_07-alarms_from_sa-related_vnfs_data.py | 7 ++- ...sa_08-vnf_with_vnf_indicators_snmp_data.py | 7 ++- ...ic_01-crud_operations_on_vim_targets.robot | 4 +- ...-disable_port_security_network_level.robot | 2 +- .../epa_03-crud_operations_on_sdnc.robot | 2 +- .../sa_01-vnf_with_vim_metrics.robot | 4 +- ...vnf_with_vim_metrics_and_autoscaling.robot | 4 +- .../sa_07-alarms_from_sa-related_vnfs.robot | 2 +- .../sa_08-vnf_with_vnf_indicators_snmp.robot | 4 +- 18 files changed, 134 insertions(+), 61 deletions(-) diff --git a/robot-systest/lib/prometheus_lib.robot b/robot-systest/lib/prometheus_lib.robot index c76b560..5fdda49 100644 --- a/robot-systest/lib/prometheus_lib.robot +++ b/robot-systest/lib/prometheus_lib.robot @@ -29,17 +29,17 @@ Get Metric ... The filter parameters are given to this function in key=value format (one argument per key/value pair). ... Fails if the metric is not found or has multiple values. ... Examples of execution: - ... \${metric}= Get Metric \${prometheus_ip} \${prometheus_port} \${metric} - ... \${metric}= Get Metric \${prometheus_ip} \${prometheus_port} \${metric} \${param1}=\${value1} \${param2}=\${value2} + ... \${metric}= Get Metric \${prometheus_ip} \${prometheus_port} ${prometheus_password} \${metric} + ... \${metric}= Get Metric \${prometheus_ip} \${prometheus_port} ${prometheus_password} \${metric} \${param1}=\${value1} \${param2}=\${value2} - [Arguments] ${prometheus_ip} ${prometheus_port} ${metric} @{filter_parameters} + [Arguments] ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric} @{filter_parameters} ${filter}= Set Variable ${EMPTY} FOR ${param} IN @{filter_parameters} ${match} ${param_name} ${param_value} = Should Match Regexp ${param} (.+)=(.+) msg=Syntax error in filter parameters ${filter}= Catenate SEPARATOR= ${filter} ${param_name}="${param_value}", END - ${resp}= Execute Prometheus Instant Query ${prometheus_host} ${prometheus_port} query=${metric}{${filter}} + ${resp}= Execute Prometheus Instant Query ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} query=${metric}{${filter}} ${result_list}= Convert To List ${resp["data"]["result"]} ${results}= Get Length ${result_list} Should Not Be Equal As Numbers 0 ${results} msg=Metric ${metric} not found values=false @@ -52,9 +52,9 @@ Execute Prometheus Instant Query ... Return an inline json with the result of the query. ... The requested URL is the next: http://\${prometheus_ip}:\${prometheus_port}/api/v1/query?\${querystring} - [Arguments] ${prometheus_ip} ${prometheus_port} ${querystring} - - Create Session prometheus http://${prometheus_ip}:${prometheus_port} timeout=${timeout} max_retries=${max_retries} + [Arguments] ${prometheus_ip} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${querystring} + ${auth}= IF '${prometheus_password}'!='${EMPTY}' Create List ${prometheus_user} ${prometheus_password} ELSE Set Variable None + Create Session prometheus http://${prometheus_ip}:${prometheus_port} timeout=${timeout} max_retries=${max_retries} verify=false auth=${auth} ${resp}= GET On Session prometheus /api/v1/query?${querystring} timeout=${timeout} Status Should Be 200 ${resp} [Return] ${resp.json()} diff --git a/robot-systest/lib/sdnc_lib.robot b/robot-systest/lib/sdnc_lib.robot index 0b4508b..1089b7c 100644 --- a/robot-systest/lib/sdnc_lib.robot +++ b/robot-systest/lib/sdnc_lib.robot @@ -80,9 +80,9 @@ Check for SDNC Check for SDNC Status - [Arguments] ${sdnc_id} ${prometheus_host} ${prometheus_port} + [Arguments] ${sdnc_id} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} - Wait Until Keyword Succeeds ${sdnc_status_max_wait_time} ${sdnc_status_pol_time} Check If SDNC Is Available ${sdnc_id} ${prometheus_host} ${prometheus_port} + Wait Until Keyword Succeeds ${sdnc_status_max_wait_time} ${sdnc_status_pol_time} Check If SDNC Is Available ${sdnc_id} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} Get SDNC ID @@ -95,7 +95,7 @@ Get SDNC ID Check If SDNC Is Available - [Arguments] ${sdnc_id} ${prometheus_host} ${prometheus_port} + [Arguments] ${sdnc_id} ${prometheus_host} ${prometheus_port} ${prometheus_password} ${prometheus_user} ${prometheus_password} - ${metric}= Get Metric ${prometheus_host} ${prometheus_port} osm_sdnc_status sdnc_id=${sdnc_id} + ${metric}= Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_password} ${prometheus_user} ${prometheus_password} osm_sdnc_status sdnc_id=${sdnc_id} Should Be Equal As Integers ${metric} 1 msg=SDNC '${sdnc_id}' is not active values=false diff --git a/robot-systest/lib/vim_lib.robot b/robot-systest/lib/vim_lib.robot index 8fd7e51..bfaae36 100644 --- a/robot-systest/lib/vim_lib.robot +++ b/robot-systest/lib/vim_lib.robot @@ -73,17 +73,17 @@ Check for VIM Target Check for VIM Target Metric - [Arguments] ${vim_name} ${prometheus_host} ${prometheus_port} + [Arguments] ${vim_name} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${vim_account_id}= Get VIM Target ID ${vim_name} - Wait Until Keyword Succeeds ${vim_status_max_wait_time} ${vim_status_pol_time} Check If VIM Target Has Metric ${vim_account_id} ${prometheus_host} ${prometheus_port} + Wait Until Keyword Succeeds ${vim_status_max_wait_time} ${vim_status_pol_time} Check If VIM Target Has Metric ${vim_account_id} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} Check for VIM Target Status - [Arguments] ${vim_name} ${prometheus_host} ${prometheus_port} + [Arguments] ${vim_name} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${vim_account_id}= Get VIM Target ID ${vim_name} - Wait Until Keyword Succeeds ${vim_status_max_wait_time} ${vim_status_pol_time} Check If VIM Target Is Available ${vim_account_id} ${prometheus_host} ${prometheus_port} + Wait Until Keyword Succeeds ${vim_status_max_wait_time} ${vim_status_pol_time} Check If VIM Target Is Available ${vim_account_id} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} Get VIM Target ID @@ -110,14 +110,14 @@ Check If VIM Target Is Enabled Check If VIM Target Is Available - [Arguments] ${vim_account_id} ${prometheus_host} ${prometheus_port} + [Arguments] ${vim_account_id} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} - ${metric}= Get Metric ${prometheus_host} ${prometheus_port} osm_vim_status vim_account_id=${vim_account_id} + ${metric}= Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} osm_vim_status vim_account_id=${vim_account_id} Should Be Equal As Integers ${metric} 1 msg=VIM Target '${vim_account_id}' is not active values=false Check If VIM Target Has Metric - [Arguments] ${vim_account_id} ${prometheus_host} ${prometheus_port} + [Arguments] ${vim_account_id} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} - ${metric}= Get Metric ${prometheus_host} ${prometheus_port} osm_vim_status vim_account_id=${vim_account_id} + ${metric}= Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} osm_vim_status vim_account_id=${vim_account_id} Should Be True ${metric} <2 msg=VIM Target '${vim_account_id}' has no metric diff --git a/robot-systest/resources/basic_01-crud_operations_on_vim_targets_data.py b/robot-systest/resources/basic_01-crud_operations_on_vim_targets_data.py index de9e696..c56d51a 100644 --- a/robot-systest/resources/basic_01-crud_operations_on_vim_targets_data.py +++ b/robot-systest/resources/basic_01-crud_operations_on_vim_targets_data.py @@ -17,7 +17,12 @@ from common_helpers import get_prometheus_info # Prometheus host and port -(prometheus_host, prometheus_port) = get_prometheus_info() +( + prometheus_host, + prometheus_port, + prometheus_user, + prometheus_password, +) = get_prometheus_info() # VIM configuration cloud_type = os.environ.get("CLOUD_TYPE", "openstack") @@ -27,7 +32,11 @@ if cloud_type == "openstack": vim_name_prefix = "basic01" # Get credentias from Openstack Clouds file os_cloud = os.environ.get("OS_CLOUD") - clouds_file_paths = ["./clouds.yaml", str(Path.home()) + "/.config/openstack/clouds.yaml", "/etc/openstack/clouds.yaml"] + clouds_file_paths = [ + "./clouds.yaml", + str(Path.home()) + "/.config/openstack/clouds.yaml", + "/etc/openstack/clouds.yaml", + ] for path in clouds_file_paths: clouds_file_path = Path(path) if clouds_file_path.exists(): @@ -49,12 +58,22 @@ if cloud_type == "openstack": raise Exception("Auth url not found in Openstack cloud '" + os_cloud + "'") vim_auth_url = cloud["auth"]["auth_url"] if not "project_name" in cloud["auth"]: - raise Exception("Project name not found in Openstack cloud '" + os_cloud + "'") + raise Exception( + "Project name not found in Openstack cloud '" + os_cloud + "'" + ) vim_tenant = cloud["auth"]["project_name"] - vim_user_domain_name = cloud["auth"]["user_domain_name"] if "user_domain_name" in cloud["auth"] else None - vim_project_domain_name = cloud["auth"]["project_domain_name"] if "project_domain_name" in cloud["auth"] else None + vim_user_domain_name = ( + cloud["auth"]["user_domain_name"] + if "user_domain_name" in cloud["auth"] + else None + ) + vim_project_domain_name = ( + cloud["auth"]["project_domain_name"] + if "project_domain_name" in cloud["auth"] + else None + ) vim_insecure = True if "verify" in cloud and not cloud["verify"] else None - + # Extra config vim_config_dict = {} vim_config_dict["vim_network_name"] = os.environ.get("VIM_MGMT_NET") @@ -64,7 +83,11 @@ if cloud_type == "openstack": vim_config_dict["user_domain_name"] = vim_user_domain_name if vim_insecure: vim_config_dict["insecure"] = True - vim_config = "'{}'".format(yaml.safe_dump(vim_config_dict, default_flow_style=True, width=10000).rstrip('\r\n')) + vim_config = "'{}'".format( + yaml.safe_dump(vim_config_dict, default_flow_style=True, width=10000).rstrip( + "\r\n" + ) + ) elif cloud_type == "azure": # Azure VIM @@ -87,7 +110,11 @@ elif cloud_type == "azure": vim_config_dict["vnet_name"] = os.environ.get("VNET_NAME") if "AZURE_FLAVORS_PATTERN" in os.environ: vim_config_dict["flavors_pattern"] = os.environ.get("AZURE_FLAVORS_PATTERN") - vim_config = "'{}'".format(yaml.safe_dump(vim_config_dict, default_flow_style=True, width=10000).rstrip('\r\n')) + vim_config = "'{}'".format( + yaml.safe_dump(vim_config_dict, default_flow_style=True, width=10000).rstrip( + "\r\n" + ) + ) else: raise Exception("VIM type not supported: '" + cloud_type + "'") diff --git a/robot-systest/resources/basic_08-disable_port_security_network_level_data.py b/robot-systest/resources/basic_08-disable_port_security_network_level_data.py index f4ee5f3..62cb9c3 100644 --- a/robot-systest/resources/basic_08-disable_port_security_network_level_data.py +++ b/robot-systest/resources/basic_08-disable_port_security_network_level_data.py @@ -18,7 +18,12 @@ from common_helpers import get_prometheus_info # Prometheus host and port -(prometheus_host, prometheus_port) = get_prometheus_info() +( + prometheus_host, + prometheus_port, + prometheus_user, + prometheus_password, +) = get_prometheus_info() # VIM Configuration vim_account_type = "openstack" @@ -26,7 +31,11 @@ vim_name = "basic_08_vim_test" # Get credentials from Openstack clouds file os_cloud = os.environ.get("OS_CLOUD") -clouds_file_paths = ["./clouds.yaml", str(Path.home()) + "/.config/openstack/clouds.yaml", "/etc/openstack/clouds.yaml"] +clouds_file_paths = [ + "./clouds.yaml", + str(Path.home()) + "/.config/openstack/clouds.yaml", + "/etc/openstack/clouds.yaml", +] for path in clouds_file_paths: clouds_file_path = Path(path) if clouds_file_path.exists(): @@ -50,8 +59,16 @@ with clouds_file_path.open() as clouds_file: if not "project_name" in cloud["auth"]: raise Exception("Project name not found in Openstack cloud '" + os_cloud + "'") vim_tenant = cloud["auth"]["project_name"] - vim_user_domain_name = cloud["auth"]["user_domain_name"] if "user_domain_name" in cloud["auth"] else None - vim_project_domain_name = cloud["auth"]["project_domain_name"] if "project_domain_name" in cloud["auth"] else None + vim_user_domain_name = ( + cloud["auth"]["user_domain_name"] + if "user_domain_name" in cloud["auth"] + else None + ) + vim_project_domain_name = ( + cloud["auth"]["project_domain_name"] + if "project_domain_name" in cloud["auth"] + else None + ) vim_insecure = True if "verify" in cloud and not cloud["verify"] else None # Extra VIM config @@ -65,18 +82,20 @@ if vim_insecure: vim_config_dict["insecure"] = True vim_config_dict["disable_network_port_security"] = True vim_config_dict["management_network_name"] = os.environ.get("VIM_MGMT_NET") -vim_config = "'{}'".format(yaml.safe_dump(vim_config_dict, default_flow_style=True, width=10000).rstrip('\r\n')) +vim_config = "'{}'".format( + yaml.safe_dump(vim_config_dict, default_flow_style=True, width=10000).rstrip("\r\n") +) # Get ${HOME} from local machine home = str(Path.home()) # NS and VNF descriptor package folder -vnfd_pkg = 'hackfest_multivdu_vnf' -nsd_pkg = 'hackfest_multivdu_ns' +vnfd_pkg = "hackfest_multivdu_vnf" +nsd_pkg = "hackfest_multivdu_ns" # NS and VNF descriptor id -vnfd_name = 'hackfest_multivdu-vnf' -nsd_name = 'hackfest_multivdu-ns' +vnfd_name = "hackfest_multivdu-vnf" +nsd_name = "hackfest_multivdu-ns" # NS instance name -ns_name = 'basic_08_disable_port_security_network_level_test' +ns_name = "basic_08_disable_port_security_network_level_test" # SSH keys to be used -publickey = home + '/.ssh/id_rsa.pub' -privatekey = home + '/.ssh/id_rsa' +publickey = home + "/.ssh/id_rsa.pub" +privatekey = home + "/.ssh/id_rsa" diff --git a/robot-systest/resources/common_helpers.py b/robot-systest/resources/common_helpers.py index 8ffaffe..87a3d34 100644 --- a/robot-systest/resources/common_helpers.py +++ b/robot-systest/resources/common_helpers.py @@ -13,10 +13,12 @@ import os def get_prometheus_info(): - if os.environ.get('PROMETHEUS_HOSTNAME', False): - prometheus_host = os.environ.get('PROMETHEUS_HOSTNAME') - prometheus_port = os.environ.get('PROMETHEUS_PORT', 9090) + if os.environ.get("PROMETHEUS_HOSTNAME", False): + prometheus_host = os.environ.get("PROMETHEUS_HOSTNAME") + prometheus_port = os.environ.get("PROMETHEUS_PORT", 9090) else: - prometheus_host = os.environ.get('OSM_HOSTNAME') - prometheus_port = os.environ.get('PROMETHEUS_PORT', 9091) - return prometheus_host, prometheus_port + prometheus_host = os.environ.get("OSM_HOSTNAME") + prometheus_port = os.environ.get("PROMETHEUS_PORT", 9091) + prometheus_user = os.environ.get("PROMETHEUS_USER", "") + prometheus_password = os.environ.get("PROMETHEUS_PASSWORD", "") + return prometheus_host, prometheus_port, prometheus_user, prometheus_password diff --git a/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py b/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py index 029cb2b..3267dd2 100644 --- a/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py +++ b/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py @@ -19,7 +19,12 @@ from common_helpers import get_prometheus_info # Prometheus host and port -(prometheus_host, prometheus_port) = get_prometheus_info() +( + prometheus_host, + prometheus_port, + prometheus_user, + prometheus_password, +) = get_prometheus_info() # SDNC Configuration diff --git a/robot-systest/resources/sa_01-vnf_with_vim_metrics_data.py b/robot-systest/resources/sa_01-vnf_with_vim_metrics_data.py index 6d63b55..27f448f 100644 --- a/robot-systest/resources/sa_01-vnf_with_vim_metrics_data.py +++ b/robot-systest/resources/sa_01-vnf_with_vim_metrics_data.py @@ -16,4 +16,9 @@ from common_helpers import get_prometheus_info # Prometheus host and port -(prometheus_host, prometheus_port) = get_prometheus_info() +( + prometheus_host, + prometheus_port, + prometheus_user, + prometheus_password, +) = get_prometheus_info() diff --git a/robot-systest/resources/sa_02-vnf_with_vim_metrics_and_autoscaling_data.py b/robot-systest/resources/sa_02-vnf_with_vim_metrics_and_autoscaling_data.py index 6d63b55..27f448f 100644 --- a/robot-systest/resources/sa_02-vnf_with_vim_metrics_and_autoscaling_data.py +++ b/robot-systest/resources/sa_02-vnf_with_vim_metrics_and_autoscaling_data.py @@ -16,4 +16,9 @@ from common_helpers import get_prometheus_info # Prometheus host and port -(prometheus_host, prometheus_port) = get_prometheus_info() +( + prometheus_host, + prometheus_port, + prometheus_user, + prometheus_password, +) = get_prometheus_info() diff --git a/robot-systest/resources/sa_07-alarms_from_sa-related_vnfs_data.py b/robot-systest/resources/sa_07-alarms_from_sa-related_vnfs_data.py index 6d63b55..27f448f 100644 --- a/robot-systest/resources/sa_07-alarms_from_sa-related_vnfs_data.py +++ b/robot-systest/resources/sa_07-alarms_from_sa-related_vnfs_data.py @@ -16,4 +16,9 @@ from common_helpers import get_prometheus_info # Prometheus host and port -(prometheus_host, prometheus_port) = get_prometheus_info() +( + prometheus_host, + prometheus_port, + prometheus_user, + prometheus_password, +) = get_prometheus_info() diff --git a/robot-systest/resources/sa_08-vnf_with_vnf_indicators_snmp_data.py b/robot-systest/resources/sa_08-vnf_with_vnf_indicators_snmp_data.py index 6d63b55..27f448f 100644 --- a/robot-systest/resources/sa_08-vnf_with_vnf_indicators_snmp_data.py +++ b/robot-systest/resources/sa_08-vnf_with_vnf_indicators_snmp_data.py @@ -16,4 +16,9 @@ from common_helpers import get_prometheus_info # Prometheus host and port -(prometheus_host, prometheus_port) = get_prometheus_info() +( + prometheus_host, + prometheus_port, + prometheus_user, + prometheus_password, +) = get_prometheus_info() diff --git a/robot-systest/testsuite/basic_01-crud_operations_on_vim_targets.robot b/robot-systest/testsuite/basic_01-crud_operations_on_vim_targets.robot index 9445a97..eb35010 100644 --- a/robot-systest/testsuite/basic_01-crud_operations_on_vim_targets.robot +++ b/robot-systest/testsuite/basic_01-crud_operations_on_vim_targets.robot @@ -33,7 +33,7 @@ Create VIM Target Basic ${created_vim_account_id}= Create VIM Target ${vim_name} ${vim_user} ${vim_password} ${vim_auth_url} ${vim_tenant} ${vim_account_type} Set Suite Variable ${created_vim_account_id} Check VIM Target Operational State ${vim_name} - Check for VIM Target Metric ${vim_name} ${prometheus_host} ${prometheus_port} + ${stdout}= Check for VIM Target Metric ${vim_name} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} Delete VIM Target By Name @@ -57,7 +57,7 @@ Create VIM Target With Extra Config ${created_vim_account_id}= Create VIM Target ${vim_name} ${vim_user} ${vim_password} ${vim_auth_url} ${vim_tenant} ${vim_account_type} config=${vim_config} Set Suite Variable ${created_vim_account_id} Check VIM Target Operational State ${vim_name} - Check for VIM Target Status ${vim_name} ${prometheus_host} ${prometheus_port} + Check for VIM Target Status ${vim_name} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} Delete VIM Target By ID diff --git a/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot b/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot index 41228ea..25164f5 100644 --- a/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot +++ b/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot @@ -38,7 +38,7 @@ ${port_disabled_msg} port_security_enabled: false Create VIM With Port Security Disabled ${created_vim_account_id}= Create VIM Target ${vim_name} ${vim_user} ${vim_password} ${vim_auth_url} ${vim_tenant} ${vim_account_type} config=${vim_config} - Check for VIM Target Status ${vim_name} ${prometheus_host} ${prometheus_port} + Check for VIM Target Status ${vim_name} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} Create VNF Descriptor diff --git a/robot-systest/testsuite/epa_03-crud_operations_on_sdnc.robot b/robot-systest/testsuite/epa_03-crud_operations_on_sdnc.robot index e507fa7..982a8de 100644 --- a/robot-systest/testsuite/epa_03-crud_operations_on_sdnc.robot +++ b/robot-systest/testsuite/epa_03-crud_operations_on_sdnc.robot @@ -37,7 +37,7 @@ Create Basic SDNC Check SDNC Status Is Healthy - Check for SDNC Status ${sdnc_id} ${prometheus_host} ${prometheus_port} + Check for SDNC Status ${sdnc_id} ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} Delete Basic SDNC diff --git a/robot-systest/testsuite/sa_01-vnf_with_vim_metrics.robot b/robot-systest/testsuite/sa_01-vnf_with_vim_metrics.robot index df04d4e..b9b69ad 100644 --- a/robot-systest/testsuite/sa_01-vnf_with_vim_metrics.robot +++ b/robot-systest/testsuite/sa_01-vnf_with_vim_metrics.robot @@ -81,9 +81,9 @@ Get VNF VIM-based Metrics Variable Should Exist ${prometheus_port} msg=Prometheus port is not available Variable Should Exist ${metric_1_name} msg=Prometheus first metric name is not available Variable Should Exist ${metric_2_name} msg=Prometheus second metric name is not available - ${metric_1_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${metric_1_name} + ${metric_1_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_1_name} Run Keyword If ${metric_1_value} <= 0 Fail msg=The metric '${metric_1_name}' value is '${metric_1_value}' - ${metric_2_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${metric_2_name} + ${metric_2_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_2_name} Run Keyword If ${metric_2_value} <= 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}' diff --git a/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot b/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot index 74b56dd..76b3229 100644 --- a/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot +++ b/robot-systest/testsuite/sa_02-vnf_with_vim_metrics_and_autoscaling.robot @@ -113,7 +113,7 @@ Get VNF VIM-based Metric Before Auto-scaling Variable Should Exist ${prometheus_host} msg=Prometheus address is not available Variable Should Exist ${prometheus_port} msg=Prometheus port is not available Variable Should Exist ${metric_name} msg=Prometheus metric name is not available - ${metric_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${metric_name} + ${metric_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_name} Run Keyword If ${metric_value} <= 0 Fail msg=The metric '${metric_name}' value is '${metric_value}' Run Keyword If ${metric_value} >= ${metric_threshold} Fail msg=The metric '${metric_name}' value is higher than '${metric_threshold}' before scaling @@ -173,7 +173,7 @@ Check VIM-based Metric Exceeds Threshold Variable Should Exist ${prometheus_host} msg=Prometheus address is not available Variable Should Exist ${prometheus_port} msg=Prometheus port is not available Variable Should Exist ${metric_name} msg=Prometheus metric name is not available - ${metric_value}= Get Metric ${prometheus_host} ${prometheus_port} ${metric_name} + ${metric_value}= Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_name} Run Keyword If ${metric_value} <= ${metric_threshold} Fail msg=The metric '${metric_name}' value is '${metric_value}' which is lower than '${metric_threshold}' diff --git a/robot-systest/testsuite/sa_07-alarms_from_sa-related_vnfs.robot b/robot-systest/testsuite/sa_07-alarms_from_sa-related_vnfs.robot index 465c300..4055dfd 100644 --- a/robot-systest/testsuite/sa_07-alarms_from_sa-related_vnfs.robot +++ b/robot-systest/testsuite/sa_07-alarms_from_sa-related_vnfs.robot @@ -137,7 +137,7 @@ Get Alarm Metric Variable Should Exist ${prometheus_host} msg=Prometheus address is not available Variable Should Exist ${prometheus_port} msg=Prometheus port is not available Variable Should Exist ${metric_name} msg=Prometheus metric name is not available - ${metric_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${metric_name} + ${metric_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_name} Run Keyword If ${metric_value} <= 0 Fail msg=The metric '${metric_name}' value is '${metric_value}' diff --git a/robot-systest/testsuite/sa_08-vnf_with_vnf_indicators_snmp.robot b/robot-systest/testsuite/sa_08-vnf_with_vnf_indicators_snmp.robot index 5fde6ba..a937bcd 100644 --- a/robot-systest/testsuite/sa_08-vnf_with_vnf_indicators_snmp.robot +++ b/robot-systest/testsuite/sa_08-vnf_with_vnf_indicators_snmp.robot @@ -77,9 +77,9 @@ Get VNF SNMP Metrics Variable Should Exist ${prometheus_port} msg=Prometheus port is not available Variable Should Exist ${metric_1_name} msg=Prometheus first metric name is not available Variable Should Exist ${metric_2_name} msg=Prometheus second metric name is not available - ${metric_1_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${metric_1_name} ${metric_1_filter} + ${metric_1_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_1_name} ${metric_1_filter} Run Keyword If ${metric_1_value} <= 0 Fail msg=The metric '${metric_1_name}' value is '${metric_1_value}' - ${metric_2_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${metric_2_name} ${metric_2_filter} + ${metric_2_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_2_name} ${metric_2_filter} Run Keyword If ${metric_2_value} <= 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}' -- 2.25.1 From 91871c7f6b4c8205dc489073128d92482e28d95d Mon Sep 17 00:00:00 2001 From: Guillermo Calvino Date: Tue, 22 Nov 2022 13:34:31 +0100 Subject: [PATCH 16/16] Bug 2198 - NBI authentication uses fix username, password and project Change-Id: Ibca350611263fd354365a183dbb16b8c347adfb3 Signed-off-by: Guillermo Calvino Signed-off-by: garciadeblas --- robot-systest/lib/sol003_common_lib.robot | 3 ++- robot-systest/resources/common_helpers.py | 7 +++++++ .../sol003_01-vnf_lifecycle_management.py | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 robot-systest/resources/sol003_01-vnf_lifecycle_management.py diff --git a/robot-systest/lib/sol003_common_lib.robot b/robot-systest/lib/sol003_common_lib.robot index 6617e91..5231e92 100644 --- a/robot-systest/lib/sol003_common_lib.robot +++ b/robot-systest/lib/sol003_common_lib.robot @@ -20,6 +20,7 @@ Library JSONLibrary Library String Library OperatingSystem Resource %{ROBOT_DEVOPS_FOLDER}/lib/vim_lib.robot +Variables %{ROBOT_DEVOPS_FOLDER}/resources/sol003_01-vnf_lifecycle_management.py *** Variables *** @{success_status_code_list} 200 201 202 204 @@ -36,7 +37,7 @@ Get Auth Token Get Hostname Create Session osmhit ${HOST} &{headers} Create Dictionary Content-Type=application/json Accept=application/json - &{data} Create Dictionary username=admin password=admin project-id=admin + &{data} Create Dictionary username=${osm_user} password=${osm_password} project-id=${osm_project} ${resp}= Post On Session osmhit ${auth_token_uri} json=${data} headers=${headers} log ${resp} Pass Execution If ${resp.status_code} in ${success_status_code_list} Get Auth Token completed diff --git a/robot-systest/resources/common_helpers.py b/robot-systest/resources/common_helpers.py index 87a3d34..3753555 100644 --- a/robot-systest/resources/common_helpers.py +++ b/robot-systest/resources/common_helpers.py @@ -22,3 +22,10 @@ def get_prometheus_info(): prometheus_user = os.environ.get("PROMETHEUS_USER", "") prometheus_password = os.environ.get("PROMETHEUS_PASSWORD", "") return prometheus_host, prometheus_port, prometheus_user, prometheus_password + + +def get_osm_info(): + osm_user = os.environ.get("OSM_USER", "admin") + osm_password = os.environ.get("OSM_PASSWORD", "admin") + osm_project = os.environ.get("OSM_PROJECT", "admin") + return osm_user, osm_password, osm_project diff --git a/robot-systest/resources/sol003_01-vnf_lifecycle_management.py b/robot-systest/resources/sol003_01-vnf_lifecycle_management.py new file mode 100644 index 0000000..a722445 --- /dev/null +++ b/robot-systest/resources/sol003_01-vnf_lifecycle_management.py @@ -0,0 +1,18 @@ +# 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. + +from pathlib import Path + +from common_helpers import get_osm_info + + +(osm_user, osm_password, osm_project) = get_osm_info() -- 2.25.1