40492f71e6db29094db144585591c5d9d6dfb6d0
[osm/tests.git] / robot-systest / deprecated / testsuite / cli / TS03__Hackfest_Basic_NS.robot
1 # -*- coding: utf-8 -*-
2
3 ##
4 # Copyright 2019 Tech Mahindra Limited
5 #
6 # All Rights Reserved.
7 #
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
11 #
12 #         http://www.apache.org/licenses/LICENSE-2.0
13 #
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
18 # under the License.
19 ##
20
21 ## Change log:
22 # 1. Feature 7829: Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 06-aug-2019
23 ##
24
25
26 *** Settings ***
27 Documentation    Test Suite to create hackfest basic nestwork service
28 Library     OperatingSystem
29 Library     String
30 Library     Collections
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_basic_ns_data.py
37
38 Suite Teardown     Run Keyword And Ignore Error    Test Cleanup
39
40
41 *** Variables ***
42 @{vnfd_ids}
43 ${nsd_id}
44 @{nsd_ids}
45 @{ns_ids}
46
47
48 *** Test Cases ***
49 Create Hackfest Basic VNF Descriptor
50     [Tags]   comprehensive   hackfest_basic_ns
51
52     Build VNF Descriptor    ${vnfdPckgPath}
53     ${vnfd_id}=    Create VNFD    '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}'
54     Append To List     ${vnfd_ids}       ${vnfd_id}
55
56
57 Create Hackfest Basic NS Descriptor
58     [Tags]   comprehensive   hackfest_basic_ns
59
60     Build NS Descriptor    ${nsdPckgPath}
61     ${nsd_id}=    Create NSD    '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}'
62     Append To List     ${nsd_ids}       ${nsd_id}
63
64
65 Network Service Instance Test
66     [Documentation]  Launch and terminate network services
67     [Tags]   comprehensive   hackfest_basic_ns
68
69     :FOR    ${vim_name}    IN    @{vim}
70     \    Launch Network Services and Return    ${vim_name}
71
72
73 Delete NS Instance Test
74     [Tags]    comprehensive   hackfest_basic_ns
75
76     :FOR    ${ns}  IN   @{ns_ids}
77     \   Delete NS   ${ns}
78
79
80 Delete NS Descriptor Test
81     [Tags]   comprehensive   hackfest_basic_ns
82
83     :FOR    ${nsd}  IN   @{nsd_ids}
84     \   Delete NSD      ${nsd}
85
86
87 Delete VNF Descriptor Test
88     [Tags]   comprehensive   hackfest_basic_ns
89
90     :FOR    ${vnfd_id}  IN   @{vnfd_ids}
91     \   Delete VNFD     ${vnfd_id}
92
93
94 *** Keywords ***
95 Test Cleanup
96     [Documentation]  Test Suit Cleanup: Deliting Descriptor, instance and vim
97
98     :FOR    ${ns}  IN   @{ns_ids}
99     \   Delete NS   ${ns}
100
101     :FOR    ${nsd}  IN   @{nsd_ids}
102     \   Delete NSD      ${nsd}
103
104     :FOR    ${vnfd}  IN   @{vnfd_ids}
105     \   Delete VNFD     ${vnfd}
106
107 #    :FOR    ${vim_id}  IN   @{vim}
108 #    \   Delete Vim Account    ${vim_id}