| calvinosanc1 | 79fcc85 | 2020-07-29 12:11:41 +0200 | [diff] [blame] | 1 | # Copyright 2020 Canonical Ltd. |
| 2 | # |
| Felipe Vicens | f96bb45 | 2020-06-22 08:12:30 +0200 | [diff] [blame] | 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | *** Settings *** |
| 16 | Library OperatingSystem |
| 17 | Library String |
| 18 | Library Collections |
| 19 | Library Process |
| 20 | |
| 21 | Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot |
| 22 | Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot |
| 23 | Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot |
| 24 | Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot |
| 25 | Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot |
| 26 | Resource %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot |
| 27 | |
| 28 | Variables %{ROBOT_DEVOPS_FOLDER}/resources/k8s_03-simple_k8s_data.py |
| 29 | |
| 30 | Suite Teardown Run Keyword And Ignore Error Test Cleanup |
| 31 | |
| 32 | |
| 33 | *** Variables *** |
| 34 | ${ns_id} ${EMPTY} |
| 35 | ${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] } |
| 36 | ${publickey} ${EMPTY} |
| 37 | |
| 38 | *** Test Cases *** |
| 39 | Create Simple K8s VNF Descriptor |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 40 | [Tags] simple_k8s charm sanity regression |
| Felipe Vicens | f96bb45 | 2020-06-22 08:12:30 +0200 | [diff] [blame] | 41 | Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}' |
| 42 | |
| 43 | Create Simple K8s Descriptor |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 44 | [Tags] simple_k8s charm sanity regression |
| Felipe Vicens | f96bb45 | 2020-06-22 08:12:30 +0200 | [diff] [blame] | 45 | Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}' |
| 46 | |
| 47 | Add K8s Cluster To OSM |
| calvinosanc1 | 79fcc85 | 2020-07-29 12:11:41 +0200 | [diff] [blame] | 48 | [Tags] simple_k8s charm sanity regression |
| Felipe Vicens | f96bb45 | 2020-06-22 08:12:30 +0200 | [diff] [blame] | 49 | Create K8s Cluster %{K8S_CREDENTIALS} ${k8scluster_version} %{VIM_TARGET} %{VIM_MGMT_NET} ${k8scluster_name} |
| 50 | |
| 51 | Network Service K8s Instance Test |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 52 | [Tags] simple_k8s charm sanity regression |
| Felipe Vicens | f96bb45 | 2020-06-22 08:12:30 +0200 | [diff] [blame] | 53 | ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey} |
| 54 | Set Suite Variable ${ns_id} ${id} |
| 55 | |
| 56 | Delete NS K8s Instance Test |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 57 | [Tags] simple_k8s charm sanity regression cleanup |
| Felipe Vicens | f96bb45 | 2020-06-22 08:12:30 +0200 | [diff] [blame] | 58 | Delete NS ${ns_name} |
| 59 | |
| 60 | Remove K8s Cluster from OSM |
| calvinosanc1 | 79fcc85 | 2020-07-29 12:11:41 +0200 | [diff] [blame] | 61 | [Tags] simple_k8s charm sanity regression |
| Felipe Vicens | f96bb45 | 2020-06-22 08:12:30 +0200 | [diff] [blame] | 62 | Delete K8s Cluster ${k8scluster_name} |
| 63 | |
| 64 | Delete NS Descriptor Test |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 65 | [Tags] simple_k8s charm sanity regression cleanup |
| Felipe Vicens | f96bb45 | 2020-06-22 08:12:30 +0200 | [diff] [blame] | 66 | Delete NSD ${nsd_name} |
| 67 | |
| 68 | Delete VNF Descriptor Test |
| Dominik Fleischmann | b72faf3 | 2020-07-23 12:25:20 +0200 | [diff] [blame] | 69 | [Tags] simple_k8s charm sanity regression cleanup |
| Felipe Vicens | f96bb45 | 2020-06-22 08:12:30 +0200 | [diff] [blame] | 70 | Delete VNFD ${vnfd_name} |
| 71 | |
| 72 | |
| 73 | *** Keywords *** |
| 74 | Test Cleanup |
| 75 | [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim |
| 76 | Run Keyword If Test Failed Delete NS ${ns_name} |
| 77 | Run Keyword If Test Failed Delete NSD ${nsd_name} |
| 78 | Run Keyword If Test Failed Delete VNFD ${vnfd_name} |
| calvinosanc1 | 79fcc85 | 2020-07-29 12:11:41 +0200 | [diff] [blame] | 79 | Run Keyword If Test Failed Delete K8s Cluster ${k8scluster_name} |