1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
5 # http://www.apache.org/licenses/LICENSE-2.0
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
14 Documentation [BASIC-32] Basic NS with a volume in different availability zone
16 Library OperatingSystem
22 Resource %{ROBOT_DEVOPS_FOLDER}/lib/vim_lib.robot
23 Resource %{ROBOT_DEVOPS_FOLDER}/lib/prometheus_lib.robot
24 Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
25 Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
26 Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
28 Variables %{ROBOT_DEVOPS_FOLDER}/resources/basic_32-volume_with_different_az.py
32 Suite Setup Run Keyword And Ignore Error Suite Preparation
35 # NS and VNF descriptor package folder and ids
36 ${vnfd_pkg} several_volumes_vnf
37 ${vnfd_name} several_volumes-vnf
38 ${nsd_pkg} several_volumes_ns
39 ${nsd_name} several_volumes-ns
41 # NS instance name and configuration
43 ${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
45 # SSH keys and username to be used
46 ${publickey} %{HOME}/.ssh/id_rsa.pub
47 ${privatekey} %{HOME}/.ssh/id_rsa
51 Create VIM Target Basic
52 [Documentation] Create a VIM Target only with the az parameters.
53 ... Checks the status of the VIM in Prometheus after it creation.
55 Pass Execution If '${vim_account_type}' != 'openstack' Not applicable for ${vim_account_type} VIM
56 ${rand}= Generate Random String 6 [NUMBERS]
57 ${vim_name_az}= Catenate SEPARATOR=_ ${vim_name_prefix} ${rand}
58 Set Suite Variable ${vim_name_az}
59 ${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}
60 Set Suite Variable ${created_vim_account_id}
65 Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
70 Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
73 Network Service Instance Test
75 ${id}= Create Network Service ${nsd_name} ${vim_name_az} ${ns_name} ${ns_config} ${publickey}
76 Set Suite Variable ${ns_id} ${id}
79 Delete NS Instance Test
85 Delete NS Descriptor Test
88 Delete NSD ${nsd_name}
91 Delete VNF Descriptor Test
94 Delete VNFD ${vnfd_name}
97 Delete VIM Target By ID
98 [Documentation] Delete the VIM Target created in previous test-case by its ID.
99 ... Checks whether the VIM Target was created or not before perform the deletion.
102 ${vim_account_id}= Get VIM Target ID ${vim_name_az}
103 Should Be Equal As Strings ${vim_account_id} ${created_vim_account_id}
104 Delete VIM Target ${vim_account_id}
109 [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim
111 Run Keyword If Any Tests Failed Delete NS ${ns_name}
113 Run Keyword If Any Tests Failed Delete NSD ${nsd_name}
115 Run Keyword If Any Tests Failed Delete VNFD ${vnfd_name}