2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
16 Documentation [BASIC-32] Basic NS with a volume in different availability zone
18 Library OperatingSystem
24 Resource ../lib/vim_lib.resource
25 Resource ../lib/prometheus_lib.resource
26 Resource ../lib/vnfd_lib.resource
27 Resource ../lib/nsd_lib.resource
28 Resource ../lib/ns_lib.resource
30 Variables ../resources/basic_32-volume_with_different_az.py
34 Suite Setup Run Keyword And Ignore Error Suite Preparation
38 # NS and VNF descriptor package folder and ids
39 ${VNFD_PKG} several_volumes_vnf
40 ${VNFD_NAME} several_volumes-vnf
41 ${NSD_PKG} several_volumes_ns
42 ${NSD_NAME} several_volumes-ns
44 # NS instance name and configuration
46 ${NS_CONFIG} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
48 # SSH keys and username to be used
49 ${PUBLICKEY} %{HOME}/.ssh/id_rsa.pub
53 Create VIM Target Basic
54 [Documentation] Create a VIM Target only with the az parameters.
55 ... Checks the status of the VIM in Prometheus after it creation.
57 Pass Execution If '${VIM_ACCOUNT_TYPE}' != 'openstack' Not applicable for ${VIM_ACCOUNT_TYPE} VIM
58 ${rand}= Generate Random String 6 [NUMBERS]
59 ${VIM_NAME_AZ}= Catenate SEPARATOR=_ ${VIM_NAME_PREFIX} ${rand}
60 Set Suite Variable ${VIM_NAME_AZ}
61 ${CREATED_VIM_ACCOUNT_ID}= Create VIM Target ${VIM_NAME_AZ} ${VIM_USER} ${VIM_PASSWORD} ${VIM_AUTH_URL} ${VIM_TENANT} ${VIM_ACCOUNT_TYPE} config=${VIM_CONFIG}
62 Set Suite Variable ${CREATED_VIM_ACCOUNT_ID}
65 [Documentation] Upload VNF package for the testsuite.
66 Create VNFD '%{PACKAGES_FOLDER}/${VNFD_PKG}'
69 [Documentation] Upload NS package for the testsuite.
70 Create NSD '%{PACKAGES_FOLDER}/${NSD_PKG}'
72 Network Service Instance Test
73 [Documentation] Instantiate NS for the testsuite.
75 ${id}= Create Network Service ${NSD_NAME} ${VIM_NAME_AZ} ${NS_NAME} ${NS_CONFIG} ${PUBLICKEY}
76 Set Suite Variable ${NS_ID} ${id}
78 Delete NS Instance Test
79 [Documentation] Delete NS instance.
83 Delete NS Descriptor Test
84 [Documentation] Delete NS package from OSM.
86 Delete NSD ${NSD_NAME}
88 Delete VNF Descriptor Test
89 [Documentation] Delete VNF package from OSM.
92 Delete VNFD ${VNFD_NAME}
94 Delete VIM Target By ID
95 [Documentation] Delete the VIM Target created in previous test-case by its ID.
96 ... Checks whether the VIM Target was created or not before perform the deletion.
99 ${vim_account_id}= Get VIM Target ID ${VIM_NAME_AZ}
100 Should Be Equal As Strings ${vim_account_id} ${CREATED_VIM_ACCOUNT_ID}
101 Delete VIM Target ${vim_account_id}
106 [Documentation] Test Suite Preparation: Setting Prometheus Testsuite Variables
107 Set Testsuite Prometheus Variables
110 [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim
111 Run Keyword If Any Tests Failed Delete NS ${NS_NAME}
112 Run Keyword If Any Tests Failed Delete NSD ${NSD_NAME}
113 Run Keyword If Any Tests Failed Delete VNFD ${VNFD_NAME}