blob: 811d14d78a376a5dbbf0c32730af3c3fb5544730 [file] [log] [blame]
aguilarherna4751c622021-03-10 16:27:37 +01001# Licensed under the Apache License, Version 2.0 (the "License");
2# you may not use this file except in compliance with the License.
3# You may obtain a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS,
9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10# See the License for the specific language governing permissions and
11# limitations under the License.
12
13*** Settings ***
garciadeblas4cf45d72021-04-08 13:52:22 +020014Documentation [K8s-07] Openldap Helm in isolated cluster with dummy VIM.
15
aguilarherna4751c622021-03-10 16:27:37 +010016Library OperatingSystem
17Library String
18Library Collections
19Library Process
20
21Resource %{ROBOT_DEVOPS_FOLDER}/lib/vim_lib.robot
22Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
23Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
24Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
25Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
26Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
27Resource %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot
28
aguilarhernac0b3a8e2021-05-12 08:56:23 +000029Variables %{ROBOT_DEVOPS_FOLDER}/resources/k8s_07-dummy_helm_data.py
30
garciadeblas4cf45d72021-04-08 13:52:22 +020031Force Tags k8s_07 cluster_k8s daily regression
32
aguilarherna4751c622021-03-10 16:27:37 +010033Suite Teardown Run Keyword And Ignore Error Suite Cleanup
34
35
36*** Variables ***
37${ns_id} ${EMPTY}
38${ns_config} ${EMPTY}
39${publickey} ${EMPTY}
40
41*** Test Cases ***
42Create Package For OpenLDAP CNF
aguilarherna4751c622021-03-10 16:27:37 +010043 Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
44
45Create Package For OpenLDAP NS
aguilarherna4751c622021-03-10 16:27:37 +010046 Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
47
48Create Dummy VIM
aguilarherna4751c622021-03-10 16:27:37 +010049 ${created_vim_account_id}= Create VIM Target ${vim_name} ${vim_user} ${vim_password} ${vim_auth_url} ${vim_tenant} ${vim_account_type}
50
51Add K8s Cluster To OSM
aguilarherna4751c622021-03-10 16:27:37 +010052 Create K8s Cluster %{K8S_CREDENTIALS} ${k8scluster_version} ${vim_name} ${k8scluster_net} ${k8scluster_name}
53
54Create Network Service Instance
aguilarherna4751c622021-03-10 16:27:37 +010055 ${id}= Create Network Service ${nsd_name} ${vim_name} ${ns_name} ${ns_config} ${publickey}
56 Set Suite Variable ${ns_id} ${id}
57
58Delete Network Service Instance
garciadeblas4cf45d72021-04-08 13:52:22 +020059 [Tags] cleanup
aguilarherna4751c622021-03-10 16:27:37 +010060 Delete NS ${ns_name}
61
62Remove K8s Cluster from OSM
garciadeblas4cf45d72021-04-08 13:52:22 +020063 [Tags] cleanup
aguilarherna4751c622021-03-10 16:27:37 +010064 Delete K8s Cluster ${k8scluster_name}
65
66Delete VIM
garciadeblas4cf45d72021-04-08 13:52:22 +020067 [Tags] cleanup
aguilarherna4751c622021-03-10 16:27:37 +010068 Delete VIM Target ${vim_name}
69
70Delete NS Descriptor Test
garciadeblas4cf45d72021-04-08 13:52:22 +020071 [Tags] cleanup
aguilarherna4751c622021-03-10 16:27:37 +010072 Delete NSD ${nsd_name}
73
74Delete VNF Descriptor Test
garciadeblas4cf45d72021-04-08 13:52:22 +020075 [Tags] cleanup
aguilarherna4751c622021-03-10 16:27:37 +010076 Delete VNFD ${vnfd_name}
77
78
79*** Keywords ***
80Suite Cleanup
81 [Documentation] Test Suit Cleanup: Deleting Descriptor, instance, cluster and vim
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}
85 Run Keyword If Any Tests Failed Delete K8s Cluster ${k8scluster_name}
86 Run Keyword If Any Tests Failed Delete VIM Target ${vim_name}