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
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 Documentation [BASIC-14] VNF Relations
18 Library OperatingSystem
21 Resource ../lib/vnfd_lib.resource
22 Resource ../lib/nsd_lib.resource
23 Resource ../lib/ns_lib.resource
24 Resource ../lib/ssh_lib.resource
26 Test Tags basic_14 cluster_ee_config cluster_relations regression azure
28 Suite Teardown Run Keyword And Ignore Error Suite Cleanup
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
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}} ] }
43 # SSH public keys file
44 ${PUBLICKEY} %{HOME}/.ssh/id_rsa.pub
48 Create Charm VNF Descriptor
49 [Documentation] Upload VNF package for the testsuite.
50 Create VNFD '%{PACKAGES_FOLDER}/${VNFD_PKG}'
52 Create Charm NS Descriptor
53 [Documentation] Upload NS package for the testsuite.
54 Create NSD '%{PACKAGES_FOLDER}/${NSD_PKG}'
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}
61 # TODO: Check juju status for relations
64 [Documentation] Delete NS instance.
69 [Documentation] Delete NS package from OSM.
71 Delete NSD ${NSD_NAME}
74 [Documentation] Delete VNF package from OSM.
76 Delete VNFD ${VNFD_NAME}
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}