New test K8s07: OpenLDAP KNF in an isolated cluster of a dummy VIM
[osm/tests.git] / robot-systest / testsuite / k8s_07-dummy_helm.robot
1 #   Licensed under the Apache License, Version 2.0 (the "License");\r
2 #   you may not use this file except in compliance with the License.\r
3 #   You may obtain a copy of the License at\r
4 #\r
5 #       http://www.apache.org/licenses/LICENSE-2.0\r
6 #\r
7 #   Unless required by applicable law or agreed to in writing, software\r
8 #   distributed under the License is distributed on an "AS IS" BASIS,\r
9 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
10 #   See the License for the specific language governing permissions and\r
11 #   limitations under the License.\r
12 \r
13 *** Settings ***\r
14 Library   OperatingSystem\r
15 Library   String\r
16 Library   Collections\r
17 Library   Process\r
18 \r
19 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/vim_lib.robot\r
20 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot\r
21 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot\r
22 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot\r
23 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot\r
24 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot\r
25 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot\r
26 \r
27 Variables   %{ROBOT_DEVOPS_FOLDER}/resources/k8s_07-dummy_helm_data.py\r
28 \r
29 Suite Teardown   Run Keyword And Ignore Error   Suite Cleanup\r
30 \r
31 \r
32 *** Variables ***\r
33 ${ns_id}   ${EMPTY}\r
34 ${ns_config}   ${EMPTY}\r
35 ${publickey}   ${EMPTY}\r
36 \r
37 *** Test Cases ***\r
38 Create Package For OpenLDAP CNF\r
39     [Tags]   dummy_vim   sanity   regression\r
40     Create VNFD   '%{PACKAGES_FOLDER}/${vnfd_pkg}'\r
41 \r
42 Create Package For OpenLDAP NS\r
43     [Tags]   dummy_vim   sanity   regression\r
44     Create NSD   '%{PACKAGES_FOLDER}/${nsd_pkg}'\r
45 \r
46 Create Dummy VIM\r
47     [Tags]  dummy_vim  sanity   regression\r
48     ${created_vim_account_id}=  Create VIM Target   ${vim_name}   ${vim_user}   ${vim_password}   ${vim_auth_url}   ${vim_tenant}   ${vim_account_type}\r
49 \r
50 Add K8s Cluster To OSM\r
51     [Tags]   dummy_vim   sanity   regression\r
52     Create K8s Cluster   %{K8S_CREDENTIALS}   ${k8scluster_version}   ${vim_name}   ${k8scluster_net}   ${k8scluster_name}\r
53 \r
54 Create Network Service Instance\r
55     [Tags]   dummy_vim   sanity   regression\r
56     ${id}=   Create Network Service   ${nsd_name}   ${vim_name}   ${ns_name}   ${ns_config}  ${publickey}\r
57     Set Suite Variable   ${ns_id}   ${id}\r
58 \r
59 Delete Network Service Instance\r
60     [Tags]   dummy_vim   sanity   regression   cleanup\r
61     Delete NS   ${ns_name}\r
62 \r
63 Remove K8s Cluster from OSM\r
64     [Tags]   dummy_vim   sanity   regression\r
65     Delete K8s Cluster   ${k8scluster_name}\r
66 \r
67 Delete VIM\r
68     [Tags]  dummy_vim  sanity   regression  cleanup\r
69     Delete VIM Target   ${vim_name}\r
70 \r
71 Delete NS Descriptor Test\r
72     [Tags]   dummy_vim   sanity   regression   cleanup\r
73     Delete NSD   ${nsd_name}\r
74 \r
75 Delete VNF Descriptor Test\r
76     [Tags]   dummy_vim   sanity   regression   cleanup\r
77     Delete VNFD   ${vnfd_name}\r
78 \r
79 \r
80 *** Keywords ***\r
81 Suite Cleanup\r
82     [Documentation]  Test Suit Cleanup: Deleting Descriptor, instance, cluster and vim\r
83     Run Keyword If Any Tests Failed  Delete NS   ${ns_name}\r
84     Run Keyword If Any Tests Failed  Delete NSD   ${nsd_name}\r
85     Run Keyword If Any Tests Failed  Delete VNFD   ${vnfd_name}\r
86     Run Keyword If Any Tests Failed  Delete K8s Cluster   ${k8scluster_name}\r
87     Run Keyword If Any Tests Failed  Delete VIM Target   ${vim_name}\r