Modified testsuites to remove resource files
[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 Documentation     [K8s-07] Openldap Helm in isolated cluster with dummy VIM.\r
15 \r
16 Library   OperatingSystem\r
17 Library   String\r
18 Library   Collections\r
19 Library   Process\r
20 \r
21 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/vim_lib.robot\r
22 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot\r
23 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot\r
24 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot\r
25 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot\r
26 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot\r
27 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot\r
28 \r
29 Force Tags   k8s_07   cluster_k8s   daily   regression\r
30 \r
31 Suite Teardown   Run Keyword And Ignore Error   Suite Cleanup\r
32 \r
33 \r
34 *** Variables ***\r
35 # VIM Configuration\r
36 ${vim_name}   k8s07_dummy\r
37 ${vim_user}   user\r
38 ${vim_password}   pass\r
39 ${vim_auth_url}   http://localhost/dummy\r
40 ${vim_tenant}   tenant\r
41 ${vim_account_type}   dummy\r
42 \r
43 # K8s cluster data\r
44 ${k8scluster_name}   k8s07\r
45 ${k8scluster_version}   v1\r
46 ${k8scluster_net}   null\r
47 \r
48 # NS and VNF descriptor package files\r
49 ${vnfd_pkg}   openldap_knf\r
50 ${nsd_pkg}   openldap_ns\r
51 ${vnfd_name}   openldap_knf\r
52 ${nsd_name}   openldap_ns\r
53 \r
54 # NS instance name\r
55 ${ns_name}   ldap\r
56 \r
57 ${ns_id}   ${EMPTY}\r
58 ${ns_config}   ${EMPTY}\r
59 ${publickey}   ${EMPTY}\r
60 \r
61 \r
62 *** Test Cases ***\r
63 Create Package For OpenLDAP CNF\r
64     Create VNFD   '%{PACKAGES_FOLDER}/${vnfd_pkg}'\r
65 \r
66 Create Package For OpenLDAP NS\r
67     Create NSD   '%{PACKAGES_FOLDER}/${nsd_pkg}'\r
68 \r
69 Create Dummy VIM\r
70     ${created_vim_account_id}=  Create VIM Target   ${vim_name}   ${vim_user}   ${vim_password}   ${vim_auth_url}   ${vim_tenant}   ${vim_account_type}\r
71 \r
72 Add K8s Cluster To OSM\r
73     Create K8s Cluster   %{K8S_CREDENTIALS}   ${k8scluster_version}   ${vim_name}   ${k8scluster_net}   ${k8scluster_name}\r
74 \r
75 Create Network Service Instance\r
76     ${id}=   Create Network Service   ${nsd_name}   ${vim_name}   ${ns_name}   ${ns_config}  ${publickey}\r
77     Set Suite Variable   ${ns_id}   ${id}\r
78 \r
79 Delete Network Service Instance\r
80     [Tags]   cleanup\r
81     Delete NS   ${ns_name}\r
82 \r
83 Remove K8s Cluster from OSM\r
84     [Tags]   cleanup\r
85     Delete K8s Cluster   ${k8scluster_name}\r
86 \r
87 Delete VIM\r
88     [Tags]   cleanup\r
89     Delete VIM Target   ${vim_name}\r
90 \r
91 Delete NS Descriptor Test\r
92     [Tags]   cleanup\r
93     Delete NSD   ${nsd_name}\r
94 \r
95 Delete VNF Descriptor Test\r
96     [Tags]   cleanup\r
97     Delete VNFD   ${vnfd_name}\r
98 \r
99 \r
100 *** Keywords ***\r
101 Suite Cleanup\r
102     [Documentation]  Test Suit Cleanup: Deleting Descriptor, instance, cluster and vim\r
103     Run Keyword If Any Tests Failed  Delete NS   ${ns_name}\r
104     Run Keyword If Any Tests Failed  Delete NSD   ${nsd_name}\r
105     Run Keyword If Any Tests Failed  Delete VNFD   ${vnfd_name}\r
106     Run Keyword If Any Tests Failed  Delete K8s Cluster   ${k8scluster_name}\r
107     Run Keyword If Any Tests Failed  Delete VIM Target   ${vim_name}\r