Bug 2327 fix to verify ipaddress in sol003_02 testsuite
[osm/tests.git] / robot-systest / testsuite / basic_14-vnf_relations.robot
1 *** Comments ***
2 #   Licensed under the Apache License, Version 2.0 (the "License");
3 #   you may not use this file except in compliance with the License.
4 #   You may obtain a copy of the License at
5 #
6 #       http://www.apache.org/licenses/LICENSE-2.0
7 #
8 #   Unless required by applicable law or agreed to in writing, software
9 #   distributed under the License is distributed on an "AS IS" BASIS,
10 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 #   See the License for the specific language governing permissions and
12 #   limitations under the License.
13
14
15 *** Settings ***
16 Documentation   [BASIC-14] VNF Relations
17
18 Library   OperatingSystem
19 Library   SSHLibrary
20
21 Resource   ../lib/vnfd_lib.resource
22 Resource   ../lib/nsd_lib.resource
23 Resource   ../lib/ns_lib.resource
24 Resource   ../lib/ssh_lib.resource
25
26 Test Tags   basic_14   cluster_ee_config   cluster_relations   regression   azure
27
28 Suite Teardown   Run Keyword And Ignore Error   Suite Cleanup
29
30
31 *** Variables ***
32 # NS and VNF descriptor package folder and ids
33 ${VNFD_PKG}   charm-packages/vnf_relations_vnf
34 ${VNFD_NAME}   vnf_relations-vnf
35 ${NSD_PKG}   charm-packages/vnf_relations_ns
36 ${NSD_NAME}   vnf_relations-ns
37
38 # NS instance name and configuration
39 ${NS_NAME}   basic_14_vnf_relations_test
40 ${NS_CONFIG}   {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
41 ${NS_TIMEOUT}   15min
42
43 # SSH public keys file
44 ${PUBLICKEY}   %{HOME}/.ssh/id_rsa.pub
45
46
47 *** Test Cases ***
48 Create Charm VNF Descriptor
49     [Documentation]   Upload VNF package for the testsuite.
50     Create VNFD   '%{PACKAGES_FOLDER}/${VNFD_PKG}'
51
52 Create Charm NS Descriptor
53     [Documentation]   Upload NS package for the testsuite.
54     Create NSD   '%{PACKAGES_FOLDER}/${NSD_PKG}'
55
56 Instantiate Charm Network Service
57     [Documentation]   Instantiate NS for the testsuite.
58     ${id}=   Create Network Service   ${NSD_NAME}   %{VIM_TARGET}   ${NS_NAME}   ${NS_CONFIG}   ${PUBLICKEY}   ${NS_TIMEOUT}
59     Set Suite Variable   ${NS_ID}   ${id}
60
61 # TODO: Check juju status for relations
62
63 Delete NS Instance
64     [Documentation]   Delete NS instance.
65     [Tags]   cleanup
66     Delete NS   ${NS_NAME}
67
68 Delete NS Descriptor
69     [Documentation]   Delete NS package from OSM.
70     [Tags]   cleanup
71     Delete NSD   ${NSD_NAME}
72
73 Delete VNF Descriptor
74     [Documentation]   Delete VNF package from OSM.
75     [Tags]   cleanup
76     Delete VNFD   ${VNFD_NAME}
77
78
79 *** Keywords ***
80 Suite Cleanup
81     [Documentation]   Test Suite Cleanup: Deleting descriptors and NS instance
82     Run Keyword If Any Tests Failed   Delete NS   ${NS_NAME}
83     Run Keyword If Any Tests Failed   Delete NSD   ${NSD_NAME}
84     Run Keyword If Any Tests Failed   Delete VNFD   ${VNFD_NAME}