| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 1 | *** Comments *** |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 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 | |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 14 | |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 15 | *** Settings *** |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 16 | Documentation [BASIC-14] VNF Relations |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 17 | |
| 18 | Library OperatingSystem |
| 19 | Library SSHLibrary |
| 20 | |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 21 | Resource ../lib/vnfd_lib.resource |
| 22 | Resource ../lib/nsd_lib.resource |
| 23 | Resource ../lib/ns_lib.resource |
| 24 | Resource ../lib/ssh_lib.resource |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 25 | |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 26 | Test Tags basic_14 cluster_ee_config cluster_relations regression azure |
| garciadeblas | 4cf45d7 | 2021-04-08 13:52:22 +0200 | [diff] [blame] | 27 | |
| garciadeblas | d225e55 | 2020-10-02 16:10:14 +0000 | [diff] [blame] | 28 | Suite Teardown Run Keyword And Ignore Error Suite Cleanup |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 29 | |
| 30 | |
| 31 | *** Variables *** |
| almagia | b4697d3 | 2021-05-25 08:56:17 +0200 | [diff] [blame] | 32 | # NS and VNF descriptor package folder and ids |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 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 |
| almagia | b4697d3 | 2021-05-25 08:56:17 +0200 | [diff] [blame] | 37 | |
| 38 | # NS instance name and configuration |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 39 | ${NS_NAME} basic_14_vnf_relations_test |
| 40 | ${NS_CONFIG} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] } |
| 41 | ${NS_TIMEOUT} 15min |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 42 | |
| almagia | b4697d3 | 2021-05-25 08:56:17 +0200 | [diff] [blame] | 43 | # SSH public keys file |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 44 | ${PUBLICKEY} %{HOME}/.ssh/id_rsa.pub |
| almagia | b4697d3 | 2021-05-25 08:56:17 +0200 | [diff] [blame] | 45 | |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 46 | |
| 47 | *** Test Cases *** |
| 48 | Create Charm VNF Descriptor |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 49 | [Documentation] Upload VNF package for the testsuite. |
| 50 | Create VNFD '%{PACKAGES_FOLDER}/${VNFD_PKG}' |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 51 | |
| 52 | Create Charm NS Descriptor |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 53 | [Documentation] Upload NS package for the testsuite. |
| 54 | Create NSD '%{PACKAGES_FOLDER}/${NSD_PKG}' |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 55 | |
| 56 | Instantiate Charm Network Service |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 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} |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 60 | |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 61 | # TODO: Check juju status for relations |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 62 | |
| 63 | Delete NS Instance |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 64 | [Documentation] Delete NS instance. |
| garciadeblas | 4cf45d7 | 2021-04-08 13:52:22 +0200 | [diff] [blame] | 65 | [Tags] cleanup |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 66 | Delete NS ${NS_NAME} |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 67 | |
| 68 | Delete NS Descriptor |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 69 | [Documentation] Delete NS package from OSM. |
| garciadeblas | 4cf45d7 | 2021-04-08 13:52:22 +0200 | [diff] [blame] | 70 | [Tags] cleanup |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 71 | Delete NSD ${NSD_NAME} |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 72 | |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 73 | Delete VNF Descriptor |
| 74 | [Documentation] Delete VNF package from OSM. |
| garciadeblas | 4cf45d7 | 2021-04-08 13:52:22 +0200 | [diff] [blame] | 75 | [Tags] cleanup |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 76 | Delete VNFD ${VNFD_NAME} |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 77 | |
| 78 | |
| 79 | *** Keywords *** |
| garciadeblas | d225e55 | 2020-10-02 16:10:14 +0000 | [diff] [blame] | 80 | Suite Cleanup |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 81 | [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 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} |