blob: 59c73ba5095ad64b33c5132b8553831d1e27813a [file] [log] [blame]
garciadeblas7a9e0312023-12-11 22:24:46 +01001*** Comments ***
garciadeblasf4ebaa82022-06-23 13:33:26 +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
garciadeblasf4ebaa82022-06-23 13:33:26 +020015*** Settings ***
16Documentation [K8s-07] Openldap Helm in isolated cluster with dummy VIM.
17
18Library OperatingSystem
19Library String
20Library Collections
21Library Process
22
garciadeblas7a9e0312023-12-11 22:24:46 +010023Resource ../lib/vim_lib.resource
24Resource ../lib/vnfd_lib.resource
25Resource ../lib/nsd_lib.resource
26Resource ../lib/ns_lib.resource
27Resource ../lib/connectivity_lib.resource
28Resource ../lib/ssh_lib.resource
29Resource ../lib/k8scluster_lib.resource
garciadeblasf4ebaa82022-06-23 13:33:26 +020030
garciadeblas7a9e0312023-12-11 22:24:46 +010031Test Tags k8s_07 cluster_k8s daily regression azure
garciadeblasf4ebaa82022-06-23 13:33:26 +020032
33Suite Teardown Run Keyword And Ignore Error Suite Cleanup
34
35
36*** Variables ***
37# VIM Configuration
garciadeblas7a9e0312023-12-11 22:24:46 +010038${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
garciadeblasf4ebaa82022-06-23 13:33:26 +020044
45# K8s cluster data
garciadeblas7a9e0312023-12-11 22:24:46 +010046${K8SCLUSTER_NAME} k8s07
47${K8SCLUSTER_VERSION} v1
48${K8SCLUSTER_NET} null
garciadeblasf4ebaa82022-06-23 13:33:26 +020049
50# NS and VNF descriptor package files
garciadeblas7a9e0312023-12-11 22:24:46 +010051${VNFD_PKG} openldap_knf
52${NSD_PKG} openldap_ns
53${VNFD_NAME} openldap_knf
54${NSD_NAME} openldap_ns
garciadeblasf4ebaa82022-06-23 13:33:26 +020055
56# NS instance name
garciadeblas7a9e0312023-12-11 22:24:46 +010057${NS_NAME} ldap
garciadeblasf4ebaa82022-06-23 13:33:26 +020058
garciadeblas7a9e0312023-12-11 22:24:46 +010059${NS_ID} ${EMPTY}
60${NS_CONFIG} ${EMPTY}
61${PUBLICKEY} ${EMPTY}
garciadeblasf4ebaa82022-06-23 13:33:26 +020062
63
64*** Test Cases ***
65Create Package For OpenLDAP CNF
garciadeblas7a9e0312023-12-11 22:24:46 +010066 [Documentation] Upload NF package for the testsuite.
67 Create VNFD '%{PACKAGES_FOLDER}/${VNFD_PKG}'
garciadeblasf4ebaa82022-06-23 13:33:26 +020068
69Create Package For OpenLDAP NS
garciadeblas7a9e0312023-12-11 22:24:46 +010070 [Documentation] Upload NS package for the testsuite.
71 Create NSD '%{PACKAGES_FOLDER}/${NSD_PKG}'
garciadeblasf4ebaa82022-06-23 13:33:26 +020072
73Create Dummy VIM
garciadeblas7a9e0312023-12-11 22:24:46 +010074 [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}
garciadeblasf4ebaa82022-06-23 13:33:26 +020077
78Add K8s Cluster To OSM
garciadeblas7a9e0312023-12-11 22:24:46 +010079 [Documentation] Register a K8s cluster associated to the dummy VIM.
80 Create K8s Cluster %{K8S_CREDENTIALS} ${K8SCLUSTER_VERSION} ${VIM_NAME} ${K8SCLUSTER_NET} ${K8SCLUSTER_NAME}
garciadeblasf4ebaa82022-06-23 13:33:26 +020081
82Create Network Service Instance
garciadeblas7a9e0312023-12-11 22:24:46 +010083 [Documentation] Instantiate NS for the testsuite.
84 ${id}= Create Network Service ${NSD_NAME} ${VIM_NAME} ${NS_NAME} ${NS_CONFIG} ${PUBLICKEY}
85 Set Suite Variable ${NS_ID} ${id}
garciadeblasf4ebaa82022-06-23 13:33:26 +020086
87Delete Network Service Instance
garciadeblas7a9e0312023-12-11 22:24:46 +010088 [Documentation] Delete NS instance.
garciadeblasf4ebaa82022-06-23 13:33:26 +020089 [Tags] cleanup
garciadeblas7a9e0312023-12-11 22:24:46 +010090 Delete NS ${NS_NAME}
garciadeblasf4ebaa82022-06-23 13:33:26 +020091
92Remove K8s Cluster from OSM
garciadeblas7a9e0312023-12-11 22:24:46 +010093 [Documentation] Remove K8s cluster from OSM.
garciadeblasf4ebaa82022-06-23 13:33:26 +020094 [Tags] cleanup
garciadeblas7a9e0312023-12-11 22:24:46 +010095 Delete K8s Cluster ${K8SCLUSTER_NAME}
garciadeblasf4ebaa82022-06-23 13:33:26 +020096
97Delete VIM
garciadeblas7a9e0312023-12-11 22:24:46 +010098 [Documentation] Remove VIM from OSM.
garciadeblasf4ebaa82022-06-23 13:33:26 +020099 [Tags] cleanup
garciadeblas7a9e0312023-12-11 22:24:46 +0100100 Delete VIM Target ${VIM_NAME}
garciadeblasf4ebaa82022-06-23 13:33:26 +0200101
102Delete NS Descriptor Test
garciadeblas7a9e0312023-12-11 22:24:46 +0100103 [Documentation] Delete NS package from OSM.
garciadeblasf4ebaa82022-06-23 13:33:26 +0200104 [Tags] cleanup
garciadeblas7a9e0312023-12-11 22:24:46 +0100105 Delete NSD ${NSD_NAME}
garciadeblasf4ebaa82022-06-23 13:33:26 +0200106
107Delete VNF Descriptor Test
garciadeblas7a9e0312023-12-11 22:24:46 +0100108 [Documentation] Delete NF package from OSM.
garciadeblasf4ebaa82022-06-23 13:33:26 +0200109 [Tags] cleanup
garciadeblas7a9e0312023-12-11 22:24:46 +0100110 Delete VNFD ${VNFD_NAME}
garciadeblasf4ebaa82022-06-23 13:33:26 +0200111
112
113*** Keywords ***
114Suite Cleanup
115 [Documentation] Test Suit Cleanup: Deleting Descriptor, instance, cluster and vim
garciadeblas7a9e0312023-12-11 22:24:46 +0100116 Run Keyword If Any Tests Failed Delete NS ${NS_NAME}
117 Run Keyword If Any Tests Failed Delete NSD ${NSD_NAME}
118 Run Keyword If Any Tests Failed Delete VNFD ${VNFD_NAME}
119 Run Keyword If Any Tests Failed Delete K8s Cluster ${K8SCLUSTER_NAME}
120 Run Keyword If Any Tests Failed Delete VIM Target ${VIM_NAME}