2 # Copyright 2019 Tech Mahindra Limited
6 # Licensed under the Apache License, Version 2.0 (the "License"); you may
7 # not use this file except in compliance with the License. You may obtain
8 # a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 # License for the specific language governing permissions and limitations
20 # 1. Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 27-Nov-19
24 Documentation Test Suite to test manual scale-in/out cirros VNF and NS using osm-client
25 Library OperatingSystem
28 Resource ../../lib/cli/vnfd_lib.robot
29 Resource ../../lib/cli/nsd_lib.robot
30 Resource ../../lib/cli/ns_lib.robot
31 Resource ../../lib/cli/vim_account_lib.robot
32 Library ../../lib/custom_lib.py
34 Suite Teardown Run Keyword And Ignore Error Test Cleanup
40 ${vnfdPckgPath} /descriptor-packages/vnfd/cirros_vnf
41 ${vnfdPckg} /build/cirros_vnf.tar.gz
45 ${nsdPckgPath} /descriptor-packages/nsd/cirros_ns
46 ${nsdPckg} /build/cirros_ns.tar.gz
47 ${scaling_group} scaling_cirros_vnf
54 Create VNF Descriptor Test
55 [Documentation] Build and onboard cirros VNF package with scaling parameter
56 [Tags] comprehensive manual_scaling
58 Build VNF Descriptor ${vnfdPckgPath}
59 ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}'
60 Append To List ${vnfd_ids} ${vnfd_id}
63 Create NS Descriptor Test
64 [Documentation] Build and onboard cirros NS package with scaling parameter
65 [Tags] comprehensive manual_scaling
67 Build NS Descriptor ${nsdPckgPath}
68 ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}'
69 Append To List ${nsd_ids} ${nsd_id}
72 Network Service Instance Test
73 [Documentation] Launch cirros ns with scaling parameter
74 [Tags] comprehensive manual_scaling
76 :FOR ${vim_name} IN @{vim}
77 \ Launch Network Services and Return ${vim_name}
80 Perform VNF/VDU Scaling-out Operation Over Launched NS Test
81 [Documentation] scale-out cirros ns
82 [Tags] comprehensive manual_scaling
83 :FOR ${ns} IN @{ns_ids}
84 \ Perform VNF Scale-out Operation ${ns} ${vnf_member_index} ${scaling_group}
87 Perform VNF/VDU Scaling-in Operation Over Launched NS Test
88 [Documentation] scale-in cirros ns
89 [Tags] comprehensive manual_scaling
90 :FOR ${ns} IN @{ns_ids}
91 \ Perform VNF Scale-in Operation ${ns} ${vnf_member_index} ${scaling_group}
94 Delete NS Instance Test
95 [Tags] comprehensive manual_scaling
97 :FOR ${ns} IN @{ns_ids}
101 Delete NS Descriptor Test
102 [Tags] comprehensive manual_scaling
104 :FOR ${nsd} IN @{nsd_ids}
108 Delete VNF Descriptor Test
109 [Tags] comprehensive manual_scaling
111 :FOR ${vnfd} IN @{vnfd_ids}
112 \ Delete VNFD ${vnfd}
117 [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim
119 :FOR ${ns} IN @{ns_ids}
122 :FOR ${nsd} IN @{nsd_ids}
125 :FOR ${vnfd} IN @{vnfd_ids}
126 \ Delete VNFD ${vnfd}
128 # :FOR ${vim_id} IN @{vim}
129 # \ Delete Vim Account ${vim_id}