| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 1 | *** Comments *** |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +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 | |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 15 | *** Settings *** |
| 16 | Documentation [K8s-07] Openldap Helm in isolated cluster with dummy VIM. |
| 17 | |
| 18 | Library OperatingSystem |
| 19 | Library String |
| 20 | Library Collections |
| 21 | Library Process |
| 22 | |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 23 | Resource ../lib/vim_lib.resource |
| 24 | Resource ../lib/vnfd_lib.resource |
| 25 | Resource ../lib/nsd_lib.resource |
| 26 | Resource ../lib/ns_lib.resource |
| 27 | Resource ../lib/connectivity_lib.resource |
| 28 | Resource ../lib/ssh_lib.resource |
| 29 | Resource ../lib/k8scluster_lib.resource |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 30 | |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 31 | Test Tags k8s_07 cluster_k8s daily regression azure |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 32 | |
| 33 | Suite Teardown Run Keyword And Ignore Error Suite Cleanup |
| 34 | |
| 35 | |
| 36 | *** Variables *** |
| 37 | # VIM Configuration |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 38 | ${VIM_NAME} k8s07_dummy |
| 39 | ${VIM_USER} user |
| 40 | ${VIM_PASSWORD} pass |
| 41 | ${VIM_AUTH_URL} http://localhost/dummy |
| 42 | ${VIM_TENANT} tenant |
| 43 | ${VIM_ACCOUNT_TYPE} dummy |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 44 | |
| 45 | # K8s cluster data |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 46 | ${K8SCLUSTER_NAME} k8s07 |
| 47 | ${K8SCLUSTER_VERSION} v1 |
| 48 | ${K8SCLUSTER_NET} null |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 49 | |
| 50 | # NS and VNF descriptor package files |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 51 | ${VNFD_PKG} openldap_knf |
| 52 | ${NSD_PKG} openldap_ns |
| 53 | ${VNFD_NAME} openldap_knf |
| 54 | ${NSD_NAME} openldap_ns |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 55 | |
| 56 | # NS instance name |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 57 | ${NS_NAME} ldap |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 58 | |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 59 | ${NS_ID} ${EMPTY} |
| 60 | ${NS_CONFIG} ${EMPTY} |
| 61 | ${PUBLICKEY} ${EMPTY} |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 62 | |
| 63 | |
| 64 | *** Test Cases *** |
| 65 | Create Package For OpenLDAP CNF |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 66 | [Documentation] Upload NF package for the testsuite. |
| 67 | Create VNFD '%{PACKAGES_FOLDER}/${VNFD_PKG}' |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 68 | |
| 69 | Create Package For OpenLDAP NS |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 70 | [Documentation] Upload NS package for the testsuite. |
| 71 | Create NSD '%{PACKAGES_FOLDER}/${NSD_PKG}' |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 72 | |
| 73 | Create Dummy VIM |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 74 | [Documentation] Register a VIM of type dummy in OSM. |
| 75 | ${created_vim_account_id}= Create VIM Target ${VIM_NAME} ${VIM_USER} ${VIM_PASSWORD} ${VIM_AUTH_URL} ${VIM_TENANT} ${VIM_ACCOUNT_TYPE} |
| 76 | Log ${created_vim_account_id} |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 77 | |
| 78 | Add K8s Cluster To OSM |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 79 | [Documentation] Register a K8s cluster associated to the dummy VIM. |
| 80 | Create K8s Cluster %{K8S_CREDENTIALS} ${K8SCLUSTER_VERSION} ${VIM_NAME} ${K8SCLUSTER_NET} ${K8SCLUSTER_NAME} |
| garciadeblas | 93e5cc2 | 2023-12-17 01:40:23 +0100 | [diff] [blame^] | 81 | Check For K8s Cluster To Be Ready ${K8SCLUSTER_NAME} |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 82 | |
| 83 | Create Network Service Instance |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 84 | [Documentation] Instantiate NS for the testsuite. |
| 85 | ${id}= Create Network Service ${NSD_NAME} ${VIM_NAME} ${NS_NAME} ${NS_CONFIG} ${PUBLICKEY} |
| 86 | Set Suite Variable ${NS_ID} ${id} |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 87 | |
| 88 | Delete Network Service Instance |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 89 | [Documentation] Delete NS instance. |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 90 | [Tags] cleanup |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 91 | Delete NS ${NS_NAME} |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 92 | |
| 93 | Remove K8s Cluster from OSM |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 94 | [Documentation] Remove K8s cluster from OSM. |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 95 | [Tags] cleanup |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 96 | Delete K8s Cluster ${K8SCLUSTER_NAME} |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 97 | |
| 98 | Delete VIM |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 99 | [Documentation] Remove VIM from OSM. |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 100 | [Tags] cleanup |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 101 | Delete VIM Target ${VIM_NAME} |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 102 | |
| 103 | Delete NS Descriptor Test |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 104 | [Documentation] Delete NS package from OSM. |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 105 | [Tags] cleanup |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 106 | Delete NSD ${NSD_NAME} |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 107 | |
| 108 | Delete VNF Descriptor Test |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 109 | [Documentation] Delete NF package from OSM. |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 110 | [Tags] cleanup |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 111 | Delete VNFD ${VNFD_NAME} |
| garciadeblas | f4ebaa8 | 2022-06-23 13:33:26 +0200 | [diff] [blame] | 112 | |
| 113 | |
| 114 | *** Keywords *** |
| 115 | Suite Cleanup |
| 116 | [Documentation] Test Suit Cleanup: Deleting Descriptor, instance, cluster and vim |
| garciadeblas | 7a9e031 | 2023-12-11 22:24:46 +0100 | [diff] [blame] | 117 | Run Keyword If Any Tests Failed Delete NS ${NS_NAME} |
| 118 | Run Keyword If Any Tests Failed Delete NSD ${NSD_NAME} |
| 119 | Run Keyword If Any Tests Failed Delete VNFD ${VNFD_NAME} |
| 120 | Run Keyword If Any Tests Failed Delete K8s Cluster ${K8SCLUSTER_NAME} |
| 121 | Run Keyword If Any Tests Failed Delete VIM Target ${VIM_NAME} |