blob: ed4b1678b6859c50fe747efc98e63d1b3ace9d20 [file] [log] [blame]
garciadeblas7a9e0312023-12-11 22:24:46 +01001*** Comments ***
Dominik Fleischmannb72faf32020-07-23 12:25:20 +02002# 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
garciadeblas7a9e0312023-12-11 22:24:46 +010014
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020015*** Settings ***
garciadeblasf4ebaa82022-06-23 13:33:26 +020016Documentation [BASIC-14] VNF Relations
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020017
18Library OperatingSystem
19Library SSHLibrary
20
garciadeblas7a9e0312023-12-11 22:24:46 +010021Resource ../lib/vnfd_lib.resource
22Resource ../lib/nsd_lib.resource
23Resource ../lib/ns_lib.resource
24Resource ../lib/ssh_lib.resource
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020025
garciadeblas7a9e0312023-12-11 22:24:46 +010026Test Tags basic_14 cluster_ee_config cluster_relations regression azure
garciadeblas4cf45d72021-04-08 13:52:22 +020027
garciadeblasd225e552020-10-02 16:10:14 +000028Suite Teardown Run Keyword And Ignore Error Suite Cleanup
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020029
30
31*** Variables ***
almagiab4697d32021-05-25 08:56:17 +020032# NS and VNF descriptor package folder and ids
garciadeblas7a9e0312023-12-11 22:24:46 +010033${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
almagiab4697d32021-05-25 08:56:17 +020037
38# NS instance name and configuration
garciadeblas7a9e0312023-12-11 22:24:46 +010039${NS_NAME} basic_14_vnf_relations_test
40${NS_CONFIG} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
41${NS_TIMEOUT} 15min
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020042
almagiab4697d32021-05-25 08:56:17 +020043# SSH public keys file
garciadeblas7a9e0312023-12-11 22:24:46 +010044${PUBLICKEY} %{HOME}/.ssh/id_rsa.pub
almagiab4697d32021-05-25 08:56:17 +020045
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020046
47*** Test Cases ***
48Create Charm VNF Descriptor
garciadeblas7a9e0312023-12-11 22:24:46 +010049 [Documentation] Upload VNF package for the testsuite.
50 Create VNFD '%{PACKAGES_FOLDER}/${VNFD_PKG}'
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020051
52Create Charm NS Descriptor
garciadeblas7a9e0312023-12-11 22:24:46 +010053 [Documentation] Upload NS package for the testsuite.
54 Create NSD '%{PACKAGES_FOLDER}/${NSD_PKG}'
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020055
56Instantiate Charm Network Service
garciadeblas7a9e0312023-12-11 22:24:46 +010057 [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}
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020060
garciadeblas7a9e0312023-12-11 22:24:46 +010061# TODO: Check juju status for relations
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020062
63Delete NS Instance
garciadeblas7a9e0312023-12-11 22:24:46 +010064 [Documentation] Delete NS instance.
garciadeblas4cf45d72021-04-08 13:52:22 +020065 [Tags] cleanup
garciadeblas7a9e0312023-12-11 22:24:46 +010066 Delete NS ${NS_NAME}
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020067
68Delete NS Descriptor
garciadeblas7a9e0312023-12-11 22:24:46 +010069 [Documentation] Delete NS package from OSM.
garciadeblas4cf45d72021-04-08 13:52:22 +020070 [Tags] cleanup
garciadeblas7a9e0312023-12-11 22:24:46 +010071 Delete NSD ${NSD_NAME}
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020072
garciadeblas7a9e0312023-12-11 22:24:46 +010073Delete VNF Descriptor
74 [Documentation] Delete VNF package from OSM.
garciadeblas4cf45d72021-04-08 13:52:22 +020075 [Tags] cleanup
garciadeblas7a9e0312023-12-11 22:24:46 +010076 Delete VNFD ${VNFD_NAME}
Dominik Fleischmannb72faf32020-07-23 12:25:20 +020077
78
79*** Keywords ***
garciadeblasd225e552020-10-02 16:10:14 +000080Suite Cleanup
garciadeblasf4ebaa82022-06-23 13:33:26 +020081 [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance
garciadeblas7a9e0312023-12-11 22:24:46 +010082 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}