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 [FAIL-01] A single VNF with 2 VDUs, one of them unallocatable because of resources.
16 Library OperatingSystem
21 Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
22 Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
23 Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
24 Resource %{ROBOT_DEVOPS_FOLDER}/lib/openstack_lib.robot
26 Force Tags fail_01 cluster_main daily regression
28 Suite Teardown Run Keyword And Ignore Error Suite Cleanup
32 # NS and VNF descriptor package folder and ids
33 ${vnfd_pkg} simple_2vm_vnf
34 ${vnfd_name} simple_2vm-vnf
35 ${nsd_pkg} simple_2vm_ns
36 ${nsd_name} simple_2vm-ns
38 # NS instance name and configuration
39 ${ns_name_prefix} fail_01
40 ${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
43 ${publickey} %{HOME}/.ssh/id_rsa.pub
45 # Default memory for dataVM VDU (can be overwritten by VM_MEMORY_OVERRIDE environment variable)
48 # NS launch timeout and polling time
49 ${ns_launch_max_wait_time} 5min
50 ${ns_launch_pol_time} 15
52 # Openstack delete operation timeout and polling time
53 ${os_delete_max_wait_time} 6min
54 ${os_delete_pol_time} 20
60 ${memory}= Get Environment Variable VM_MEMORY_OVERRIDE default=${default_memory}
61 Create VNFD Overriding Fields '%{PACKAGES_FOLDER}/${vnfd_pkg}' virtual-compute-desc.1.virtual-memory.size=${memory}
66 Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
69 Cannot Instantiate Network Service
71 ${rand}= Generate Random String 4 [NUMBERS]
72 ${ns_name}= Catenate SEPARATOR=_ ${ns_name_prefix} ${rand}
73 Set Suite Variable ${ns_name}
75 ${id}= Instantiate Network Service ${ns_name} ${nsd_name} %{VIM_TARGET} --config '${ns_config}' --ssh_keys ${publickey}
77 Set Suite Variable ${ns_id} ${id}
78 WAIT UNTIL KEYWORD SUCCEEDS ${ns_launch_max_wait_time} ${ns_launch_pol_time} Check For Ns Instance To Configured ${ns_name}
79 ${rc} ${stdout}= run and return rc and output osm ns-list --filter id="${ns_id}" | grep ${ns_id} | awk '{print $8}'
81 Should Contain ${stdout} BROKEN
82 ${rc} ${stdout}= run and return rc and output osm ns-show ${ns_id} --literal | yq .errorDetail
84 Should Contain ${stdout} Deploying at VIM: Error at create vdu
87 Delete NS Instance And Check VIM
91 WAIT UNTIL KEYWORD SUCCEEDS ${os_delete_max_wait_time} ${os_delete_pol_time} Check NS Servers In VIM ${ns_name} 0
97 Delete NSD ${nsd_name}
100 Delete VNF Descriptor
103 Delete VNFD ${vnfd_name}
108 [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance
110 Run Keyword If Any Tests Failed Delete NS ${ns_name}
111 Run Keyword If Any Tests Failed Delete NSD ${nsd_name}
112 Run Keyword If Any Tests Failed Delete VNFD ${vnfd_name}