blob: 5b0db07c942e252762570c0672481fabf8f89977 [file] [log] [blame]
Felipe Vicensf96bb452020-06-22 08:12:30 +02001# 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 ***
14Library OperatingSystem
15Library String
16Library Collections
17Library Process
18
19Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
20Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
21Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
22Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
23Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
24Resource %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot
25
26Variables %{ROBOT_DEVOPS_FOLDER}/resources/k8s_03-simple_k8s_data.py
27
28Suite Teardown Run Keyword And Ignore Error Test Cleanup
29
30
31*** Variables ***
32${ns_id} ${EMPTY}
33${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
34${publickey} ${EMPTY}
35
36*** Test Cases ***
37Create Simple K8s VNF Descriptor
Felipe Vicens5c54d272020-06-23 15:55:08 +020038 [Tags] simple_k8s sanity regression
Felipe Vicensf96bb452020-06-22 08:12:30 +020039 Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
40
41Create Simple K8s Descriptor
Felipe Vicens5c54d272020-06-23 15:55:08 +020042 [Tags] simple_k8s sanity regression
Felipe Vicensf96bb452020-06-22 08:12:30 +020043 Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
44
45Add K8s Cluster To OSM
Felipe Vicens5c54d272020-06-23 15:55:08 +020046 [Tags] k8scluster sanity regression
Felipe Vicensf96bb452020-06-22 08:12:30 +020047 Create K8s Cluster %{K8S_CREDENTIALS} ${k8scluster_version} %{VIM_TARGET} %{VIM_MGMT_NET} ${k8scluster_name}
48
49Network Service K8s Instance Test
Felipe Vicens5c54d272020-06-23 15:55:08 +020050 [Tags] simple_k8s sanity regression
Felipe Vicensf96bb452020-06-22 08:12:30 +020051 ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
52 Set Suite Variable ${ns_id} ${id}
53
54Delete NS K8s Instance Test
Felipe Vicens5c54d272020-06-23 15:55:08 +020055 [Tags] simple_k8s sanity regression cleanup
Felipe Vicensf96bb452020-06-22 08:12:30 +020056 Delete NS ${ns_name}
57
58Remove K8s Cluster from OSM
Felipe Vicens5c54d272020-06-23 15:55:08 +020059 [Tags] k8scluster sanity regression
Felipe Vicensf96bb452020-06-22 08:12:30 +020060 Delete K8s Cluster ${k8scluster_name}
61
62Delete NS Descriptor Test
Felipe Vicens5c54d272020-06-23 15:55:08 +020063 [Tags] simple_k8s sanity regression cleanup
Felipe Vicensf96bb452020-06-22 08:12:30 +020064 Delete NSD ${nsd_name}
65
66Delete VNF Descriptor Test
Felipe Vicens5c54d272020-06-23 15:55:08 +020067 [Tags] simple_k8s sanity regression cleanup
Felipe Vicensf96bb452020-06-22 08:12:30 +020068 Delete VNFD ${vnfd_name}
69
70
71*** Keywords ***
72Test Cleanup
73 [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim
74 Run Keyword If Test Failed Delete NS ${ns_name}
75 Run Keyword If Test Failed Delete NSD ${nsd_name}
76 Run Keyword If Test Failed Delete VNFD ${vnfd_name}
77
78