From f3ec8f4cfb29ba0605f2b9263dcac169b4849593 Mon Sep 17 00:00:00 2001 From: yadavmr Date: Thu, 30 Jan 2020 16:07:59 +0530 Subject: [PATCH] Robot Test: Included Test are Feature 1415 RBAC visibility of packeges and instances Feature 7921 MongoDb File system Feature 8047 osmclient package creation and validation Manual VNF/VDU scaling using osmclient Feature 7326 Disable port security for ns at network level Change-Id: I1e936595a4af9e6c707f22c2719438310e646b35 Signed-off-by: yadavmr --- .../nsd/no_port_security_ns/Makefile | 22 +++ .../nsd/no_port_security_ns/src/icons/osm.png | Bin 0 -> 55888 bytes .../src/no_port_security_nsd.yaml | 41 +++++ .../lib/cli/network_slicing_lib.robot | 16 +- robot-systest/lib/cli/ns_lib.robot | 47 ++++++ .../lib/cli/osm_package_tools_lib.robot | 88 +++++++++++ robot-systest/lib/cli/vim_account_lib.robot | 3 +- robot-systest/lib/custom_lib.py | 34 ++++- .../cli/disable_port_security_ns_data.py | 29 ++++ ...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 +++++++++++++++ 14 files changed, 872 insertions(+), 11 deletions(-) create mode 100644 descriptor-packages/nsd/no_port_security_ns/Makefile create mode 100644 descriptor-packages/nsd/no_port_security_ns/src/icons/osm.png create mode 100644 descriptor-packages/nsd/no_port_security_ns/src/no_port_security_nsd.yaml create mode 100644 robot-systest/lib/cli/osm_package_tools_lib.robot create mode 100644 robot-systest/resource/cli/disable_port_security_ns_data.py create mode 100644 robot-systest/testsuite/cli/TS013__Feature_1415_RBAC_Visibility_Of_Packages_And_Instances.robot create mode 100644 robot-systest/testsuite/cli/TS014__Feature_7921_MongoDB_Filesystem_Test.robot create mode 100644 robot-systest/testsuite/cli/TS015__Feature_8047_OSMClient_Package_Creation_And_Validation.robot create mode 100644 robot-systest/testsuite/cli/TS016__Manual_VNF_VDU_Scaling_Test.robot create mode 100644 robot-systest/testsuite/cli/TS017__Feature_7326_Disable_Port_Security_at_Network_level.robot diff --git a/descriptor-packages/nsd/no_port_security_ns/Makefile b/descriptor-packages/nsd/no_port_security_ns/Makefile new file mode 100644 index 00000000..91f87927 --- /dev/null +++ b/descriptor-packages/nsd/no_port_security_ns/Makefile @@ -0,0 +1,22 @@ +# +# Copyright 2020 Tech Mahindra Limited +# +# 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 +# + +DESCRIPTORS_TOPDIR ?= ../.. +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/nsd/no_port_security_ns/src/icons/osm.png b/descriptor-packages/nsd/no_port_security_ns/src/icons/osm.png new file mode 100644 index 0000000000000000000000000000000000000000..62012d2a2b491bdcd536d62c3c3c863c0d8c1b33 GIT binary patch literal 55888 zcmeHwcVN_2w*Q%4(|d0OLLi+Mnsh-yL{Y>ZASk;E3aIGrzPH8Qr`y-xuB*GQy6#gH z8?K0`bg9xyNCE*8l8|1f_uuDyCle;aWC)1v`-2OU`L= z(5#u$?!fmFe3mNZ_&Xtc#6$Q}Ju!3PDx%sQo4@$EA1*Fll77=f_4qYo(ZJ)St4mVXJpS17Rb$soNEg~2i(|f=m!2v- zvigS;(kF9=srSseJ$34em8Gd8b4TSYE+{BS9bKGTFmg;$;mF~sh4}>|^YV-H3i5OE z3&s}Yk1fnk?J4OK)i@fza>>%McTAhn(;dzxq(8cP^%Gj zxH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& z7nNFj*m*3B#sqbyF#FjaVEcyc7!C*UvkGWwysoj%e2%^_y!%aJfnvqe=}*^3V)Gwt z&s4`NfLT!6;U4<7nv?f9uXOyqAw&QglR07oVd@B7Q*`sMwiw@e^{8pvk9Hm0`6SQu zoS@N^9*ndhxboeruPzOr?T#2#BC=Yx&yC@~rUk+-Ad52{(vV5{930YNQjU z!^WNZPq%f(*8Nc#FW(v)8SjjWj1qRK`!<{5c>256@9z~Mobhpk* z0vEPnWRNxNgk)CJZSAB(hFz{x=7WbXYES>WQ`z*MNF}a}4MV~;o^{$`h$14&sW=`# zox8>F_wRoMA>OZOGubWqxdpSpKE$qMUF#v!XFuCq^X~Kl@wic%?(oT>mguxWnqlHl zDSmwi>n&mw3G^n`nmnAg632-^6JpO7mU!E8W=Uqq4Q5B@%%}7^McbZgQTg5$ zMcvMBYxnl7#4KloH42;4V38(}CB|=T{a-2nafAq(m{{B{1yIBer1JztSId$Wf0qt2 z{vA8dsjw0uLn{hRjMF4%=q?(EoVa*+K}Exf=qh7b_mrgBEf%|30`tS(&{d~%i0xg9 zAlU_@OJ8Mhb)A-kJL|;?(K*cgi(33hag;flEcjJ5W}DxqT(}x!|Hl!+gJq<6)JO&t z$5~ii4w8kKqQYWM%H*<>4vhg@uUcrr$kE3tUOBNceQNB}Cr#Tv!z@=#n>NjU@kE!c zqN0pO<&379(-%mAP0V7W69prcmstN_MuIoOL>@qRU%YYrpMwA-pv!e=%)#Q7>+a6u QVa%F-+q93SJpA+j4_IIKX8-^I literal 0 HcmV?d00001 diff --git a/descriptor-packages/nsd/no_port_security_ns/src/no_port_security_nsd.yaml b/descriptor-packages/nsd/no_port_security_ns/src/no_port_security_nsd.yaml new file mode 100644 index 00000000..097e6155 --- /dev/null +++ b/descriptor-packages/nsd/no_port_security_ns/src/no_port_security_nsd.yaml @@ -0,0 +1,41 @@ +## +# 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 +## + + +nsd:nsd-catalog: + nsd: + - id: no_port_security-ns + name: no_port_security-ns + short-name: no_port_security-ns + description: Simple NS with a single VNF and a single VL + version: '1.0' + logo: osm.png + constituent-vnfd: + - vnfd-id-ref: hackfest_basic-vnf + member-vnf-index: '1' + vld: + - id: noPortSecurity + name: noPortSecurity + short-name: noPortSecurity + type: ELAN + vnfd-connection-point-ref: + - vnfd-id-ref: hackfest_basic-vnf + member-vnf-index-ref: '1' + vnfd-connection-point-ref: vnf-cp0 diff --git a/robot-systest/lib/cli/network_slicing_lib.robot b/robot-systest/lib/cli/network_slicing_lib.robot index 8ed3e637..9a3ff370 100644 --- a/robot-systest/lib/cli/network_slicing_lib.robot +++ b/robot-systest/lib/cli/network_slicing_lib.robot @@ -36,8 +36,8 @@ Create NST [Arguments] ${nst_pkg} ${rc} ${stdout}= Run and Return RC and Output osm nst-create ${nst_pkg} - Should Be Equal As Integers ${rc} ${success_return_code} log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} [Return] ${stdout} @@ -46,8 +46,8 @@ Delete NST [Arguments] ${nst} ${rc} ${stdout}= Run and Return RC and Output osm nst-delete ${nst} - Should Be Equal As Integers ${rc} ${success_return_code} log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} [Return] ${stdout} @@ -66,8 +66,8 @@ 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} - Should Be Equal As Integers ${rc} ${success_return_code} log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} Append To List ${nsi_list} ${nsi_name} @@ -75,8 +75,8 @@ 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} - Should Be Equal As Integers ${rc} ${success_return_code} log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} Append To List ${nsi_list} ${nsi_name} @@ -84,8 +84,8 @@ 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}" - Should Be Equal As Integers ${rc} ${success_return_code} log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} Should Not Contain ${stdout} failed @@ -93,8 +93,8 @@ 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}" - Should Be Equal As Integers ${rc} ${success_return_code} log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} Should Contain Any ${stdout} configured failed @@ -103,8 +103,8 @@ Delete Network Slice Instance [Arguments] ${nsi} ${rc} ${stdout}= Run and Return RC and Output osm nsi-delete ${nsi} - Should Be Equal As Integers ${rc} ${success_return_code} 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} @@ -113,6 +113,6 @@ Check For NSI Instance To Be Delete [Arguments] ${nsi} ${rc} ${stdout}= Run and Return RC and Output osm nsi-list - Should Be Equal As Integers ${rc} ${success_return_code} log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} Should Not Contain ${stdout} ${nsi} diff --git a/robot-systest/lib/cli/ns_lib.robot b/robot-systest/lib/cli/ns_lib.robot index 254bc6a7..e0eb0c2b 100644 --- a/robot-systest/lib/cli/ns_lib.robot +++ b/robot-systest/lib/cli/ns_lib.robot @@ -40,6 +40,23 @@ Get NS List 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 @@ -144,3 +161,33 @@ Force 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/lib/cli/osm_package_tools_lib.robot b/robot-systest/lib/cli/osm_package_tools_lib.robot new file mode 100644 index 00000000..c8a864c4 --- /dev/null +++ b/robot-systest/lib/cli/osm_package_tools_lib.robot @@ -0,0 +1,88 @@ +# 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/lib/cli/vim_account_lib.robot b/robot-systest/lib/cli/vim_account_lib.robot index 8d01b39b..c3c8242f 100644 --- a/robot-systest/lib/cli/vim_account_lib.robot +++ b/robot-systest/lib/cli/vim_account_lib.robot @@ -63,8 +63,9 @@ Get Vim List 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} + ${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/lib/custom_lib.py b/robot-systest/lib/custom_lib.py index 4603f449..2a3d23fa 100644 --- a/robot-systest/lib/custom_lib.py +++ b/robot-systest/lib/custom_lib.py @@ -19,11 +19,18 @@ ## ## Change log: -# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-aug-2019 : Improvement to the code, robot framework initial seed code. -## +# 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(): @@ -35,3 +42,26 @@ def generate_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/resource/cli/disable_port_security_ns_data.py b/robot-systest/resource/cli/disable_port_security_ns_data.py new file mode 100644 index 00000000..e1383bd4 --- /dev/null +++ b/robot-systest/resource/cli/disable_port_security_ns_data.py @@ -0,0 +1,29 @@ +# -*- 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/testsuite/cli/TS013__Feature_1415_RBAC_Visibility_Of_Packages_And_Instances.robot b/robot-systest/testsuite/cli/TS013__Feature_1415_RBAC_Visibility_Of_Packages_And_Instances.robot new file mode 100644 index 00000000..43029516 --- /dev/null +++ b/robot-systest/testsuite/cli/TS013__Feature_1415_RBAC_Visibility_Of_Packages_And_Instances.robot @@ -0,0 +1,144 @@ +## +# 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/testsuite/cli/TS014__Feature_7921_MongoDB_Filesystem_Test.robot b/robot-systest/testsuite/cli/TS014__Feature_7921_MongoDB_Filesystem_Test.robot new file mode 100644 index 00000000..3070d419 --- /dev/null +++ b/robot-systest/testsuite/cli/TS014__Feature_7921_MongoDB_Filesystem_Test.robot @@ -0,0 +1,124 @@ +## +# 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/testsuite/cli/TS015__Feature_8047_OSMClient_Package_Creation_And_Validation.robot b/robot-systest/testsuite/cli/TS015__Feature_8047_OSMClient_Package_Creation_And_Validation.robot new file mode 100644 index 00000000..e717c105 --- /dev/null +++ b/robot-systest/testsuite/cli/TS015__Feature_8047_OSMClient_Package_Creation_And_Validation.robot @@ -0,0 +1,84 @@ +## +# 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/testsuite/cli/TS016__Manual_VNF_VDU_Scaling_Test.robot b/robot-systest/testsuite/cli/TS016__Manual_VNF_VDU_Scaling_Test.robot new file mode 100644 index 00000000..3f7bce8d --- /dev/null +++ b/robot-systest/testsuite/cli/TS016__Manual_VNF_VDU_Scaling_Test.robot @@ -0,0 +1,129 @@ +## +# 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/testsuite/cli/TS017__Feature_7326_Disable_Port_Security_at_Network_level.robot b/robot-systest/testsuite/cli/TS017__Feature_7326_Disable_Port_Security_at_Network_level.robot new file mode 100644 index 00000000..562dc15d --- /dev/null +++ b/robot-systest/testsuite/cli/TS017__Feature_7326_Disable_Port_Security_at_Network_level.robot @@ -0,0 +1,122 @@ +# -*- 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} -- 2.25.1