1 # -*- coding: utf-8 -*-
4 # Copyright 2019 Tech Mahindra Limited
8 # Licensed under the Apache License, Version 2.0 (the "License"); you may
9 # not use this file except in compliance with the License. You may obtain
10 # a copy of the License at
12 # http://www.apache.org/licenses/LICENSE-2.0
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17 # License for the specific language governing permissions and limitations
22 # 1. Feature 7829: Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 06-aug-2019
27 Documentation Test Suite to create hackfest cloudinit ns
28 Library OperatingSystem
31 Resource ../../lib/cli/vnfd_lib.robot
32 Resource ../../lib/cli/nsd_lib.robot
33 Resource ../../lib/cli/ns_lib.robot
34 Resource ../../lib/cli/vim_account_lib.robot
35 Library ../../lib/custom_lib.py
36 Variables ../../resource/cli/hackfest_cloudinit_ns_data.py
38 Suite Teardown Run Keyword And Ignore Error Test Cleanup
50 Create Hackfest Cloudinit VNF Descriptor
51 [Tags] comprehensive hackfest_cloudinit
53 Build VNF Descriptor ${vnfdPckgPath}
54 ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}'
55 Append To List ${vnfd_ids} ${vnfd_id}
58 Create Hackfest Cloudinit NS Descriptor
59 [Tags] comprehensive hackfest_cloudinit
61 Build NS Descriptor ${nsdPckgPath}
62 ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}'
63 Append To List ${nsd_ids} ${nsd_id}
66 Network Service Instance Test
67 [Documentation] Launch and terminate network services
68 [Tags] comprehensive hackfest_cloudinit
69 [Setup] VIM Setup To Launch Network Services
70 [Teardown] Run Keyword And Ignore Error Network Service Instance Cleanup
72 Should Not Be Empty ${vim} VIM details not provided
73 :FOR ${vim_name} IN @{vim}
74 \ Launch Network Services and Return ${vim_name}
77 Delete NS Descriptor Test
78 [Tags] comprehensive hackfest_cloudinit
80 :FOR ${nsd} IN @{nsd_ids}
84 Delete VNF Descriptor Test
85 [Tags] comprehensive hackfest_cloudinit
87 :FOR ${vnfd_id} IN @{vnfd_ids}
88 \ Delete VNFD ${vnfd_id}
93 [Documentation] Test Suit Cleanup: Forcefully delete NSD and VNFD
95 :FOR ${nsd} IN @{nsd_ids}
96 \ Force Delete NSD ${nsd_id}
98 :FOR ${vnfd_id} IN @{vnfd_ids}
99 \ Force Delete VNFD ${vnfd_id}
102 Network Service Instance Cleanup
103 [Documentation] Forcefully delete created network service instances and vim account
105 :FOR ${ns_id} IN @{ns_ids}
106 \ Force Delete NS ${ns_id}
108 :FOR ${vim_id} IN @{vim}
109 \ Force Delete Vim Account ${vim_id}