c5e1c75d3c865385b7826e7f220ad6b42475bc8c
[osm/tests.git] / robot-systest / deprecated / testsuite / cli / TS012__Feature_7181_Allow_Instantiation_Parameters_in_CloudInit.robot
1 # -*- coding: utf-8 -*-
2
3 ##
4 # Copyright 2019 TATA ELXSI
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 ## Author: Ragavi D (ragavi.d@tataelxsi.co.in)
22
23 *** Settings ***
24 Documentation     Test Suite to create hackfest basic nestwork service
25 Suite Teardown    Run Keyword And Ignore Error    Test Cleanup
26 Library           OperatingSystem
27 Library           String
28 Library           Collections
29 Resource          ../../lib/cli/vnfd_lib.robot
30 Resource          ../../lib/cli/nsd_lib.robot
31 Resource          ../../lib/cli/ns_lib.robot
32 Resource          ../../lib/cli/vim_account_lib.robot
33 Library           ../../lib/custom_lib.py
34 Variables         ../../resource/cli/ubuntu-cloudinit_ns_data.py
35
36 *** Variables ***
37 @{vnfd_ids}
38 ${nsd_id}         ${EMPTY}
39 @{nsd_ids}
40 @{ns_ids}
41 ${ns_config}      '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ], additionalParamsForVnf: [ { member-vnf-index: "1", additionalParams: { password: "PASSWORD" } } ] }'
42
43 *** Test Cases ***
44 Create Ubuntu CloudInit VNF Descriptor
45     [Tags]    comprehensive    ubuntu-cloudinit_ns
46     Build VNF Descriptor    ${vnfdPckgPath}
47     ${vnfd_id}=    Create VNFD    '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}'
48     Append To List    ${vnfd_ids}    ${vnfd_id}
49
50 Create Ubuntu CloudInit NS Descriptor
51     [Tags]    comprehensive    ubuntu-cloudinit_ns
52     Build NS Descriptor    ${nsdPckgPath}
53     ${nsd_id}=    Create NSD    '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}'
54     Append To List    ${nsd_ids}    ${nsd_id}
55
56 Network Service Instance Test
57     [Documentation]    Launch and terminate network services
58     [Tags]    comprehensive    ubuntu-cloudinit_ns
59     : FOR    ${vim_name}    IN    @{vim}
60     \    Launch Network Services and Return    ${vim_name}    ${ns_config}
61
62 Delete NS Instance Test
63     [Tags]    comprehensive    ubuntu-cloudinit_ns
64     : FOR    ${ns}    IN    @{ns_ids}
65     \    Delete NS    ${ns}
66
67 Delete NS Descriptor Test
68     [Tags]    comprehensive    ubuntu-cloudinit_ns
69     : FOR    ${nsd}    IN    @{nsd_ids}
70     \    Delete NSD    ${nsd}
71
72 Delete VNF Descriptor Test
73     [Tags]    comprehensive    ubuntu-cloudinit_ns
74     : FOR    ${vnfd_id}    IN    @{vnfd_ids}
75     \    Delete VNFD    ${vnfd_id}
76
77 *** Keywords ***
78 Test Cleanup
79     [Documentation]    Test Suit Cleanup: Deliting Descriptor, instance and vim
80     : FOR    ${ns}    IN    @{ns_ids}
81     \    Delete NS    ${ns}
82     : FOR    ${nsd}    IN    @{nsd_ids}
83     \    Delete NSD    ${nsd}
84     : FOR    ${vnfd}    IN    @{vnfd_ids}
85     \    Delete VNFD    ${vnfd}
86     #    :FOR    ${vim_id}    IN    @{vim}
87     #    Delete Vim Account    ${vim_id}