Bug 2327 fix to verify ipaddress in sol003_02 testsuite
[osm/tests.git] / robot-systest / testsuite / k8s_07-dummy_helm.robot
1 *** Comments ***
2 #   Licensed under the Apache License, Version 2.0 (the "License");
3 #   you may not use this file except in compliance with the License.
4 #   You may obtain a copy of the License at
5 #
6 #       http://www.apache.org/licenses/LICENSE-2.0
7 #
8 #   Unless required by applicable law or agreed to in writing, software
9 #   distributed under the License is distributed on an "AS IS" BASIS,
10 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 #   See the License for the specific language governing permissions and
12 #   limitations under the License.
13
14
15 *** Settings ***
16 Documentation   [K8s-07] Openldap Helm in isolated cluster with dummy VIM.
17
18 Library   OperatingSystem
19 Library   String
20 Library   Collections
21 Library   Process
22
23 Resource   ../lib/vim_lib.resource
24 Resource   ../lib/vnfd_lib.resource
25 Resource   ../lib/nsd_lib.resource
26 Resource   ../lib/ns_lib.resource
27 Resource   ../lib/connectivity_lib.resource
28 Resource   ../lib/ssh_lib.resource
29 Resource   ../lib/k8scluster_lib.resource
30
31 Test Tags   k8s_07   cluster_k8s   daily   regression   azure
32
33 Suite Teardown   Run Keyword And Ignore Error   Suite Cleanup
34
35
36 *** Variables ***
37 # VIM Configuration
38 ${VIM_NAME}   k8s07_dummy
39 ${VIM_USER}   user
40 ${VIM_PASSWORD}   pass
41 ${VIM_AUTH_URL}   http://localhost/dummy
42 ${VIM_TENANT}   tenant
43 ${VIM_ACCOUNT_TYPE}   dummy
44
45 # K8s cluster data
46 ${K8SCLUSTER_NAME}   k8s07
47 ${K8SCLUSTER_VERSION}   v1
48 ${K8SCLUSTER_NET}   null
49
50 # NS and VNF descriptor package files
51 ${VNFD_PKG}   openldap_knf
52 ${NSD_PKG}   openldap_ns
53 ${VNFD_NAME}   openldap_knf
54 ${NSD_NAME}   openldap_ns
55
56 # NS instance name
57 ${NS_NAME}   ldap
58
59 ${NS_ID}   ${EMPTY}
60 ${NS_CONFIG}   ${EMPTY}
61 ${PUBLICKEY}   ${EMPTY}
62
63
64 *** Test Cases ***
65 Create Package For OpenLDAP CNF
66     [Documentation]   Upload NF package for the testsuite.
67     Create VNFD   '%{PACKAGES_FOLDER}/${VNFD_PKG}'
68
69 Create Package For OpenLDAP NS
70     [Documentation]   Upload NS package for the testsuite.
71     Create NSD   '%{PACKAGES_FOLDER}/${NSD_PKG}'
72
73 Create Dummy VIM
74     [Documentation]   Register a VIM of type dummy in OSM.
75     ${created_vim_account_id}=   Create VIM Target   ${VIM_NAME}   ${VIM_USER}   ${VIM_PASSWORD}   ${VIM_AUTH_URL}   ${VIM_TENANT}   ${VIM_ACCOUNT_TYPE}
76     Log   ${created_vim_account_id}
77
78 Add K8s Cluster To OSM
79     [Documentation]   Register a K8s cluster associated to the dummy VIM.
80     Create K8s Cluster   %{K8S_CREDENTIALS}   ${K8SCLUSTER_VERSION}   ${VIM_NAME}   ${K8SCLUSTER_NET}   ${K8SCLUSTER_NAME}
81     Check For K8s Cluster To Be Ready   ${K8SCLUSTER_NAME}
82
83 Create Network Service Instance
84     [Documentation]   Instantiate NS for the testsuite.
85     ${id}=   Create Network Service   ${NSD_NAME}   ${VIM_NAME}   ${NS_NAME}   ${NS_CONFIG}   ${PUBLICKEY}
86     Set Suite Variable   ${NS_ID}   ${id}
87
88 Delete Network Service Instance
89     [Documentation]   Delete NS instance.
90     [Tags]   cleanup
91     Delete NS   ${NS_NAME}
92
93 Remove K8s Cluster from OSM
94     [Documentation]   Remove K8s cluster from OSM.
95     [Tags]   cleanup
96     Delete K8s Cluster   ${K8SCLUSTER_NAME}
97
98 Delete VIM
99     [Documentation]   Remove VIM from OSM.
100     [Tags]   cleanup
101     Delete VIM Target   ${VIM_NAME}
102
103 Delete NS Descriptor Test
104     [Documentation]   Delete NS package from OSM.
105     [Tags]   cleanup
106     Delete NSD   ${NSD_NAME}
107
108 Delete VNF Descriptor Test
109     [Documentation]   Delete NF package from OSM.
110     [Tags]   cleanup
111     Delete VNFD   ${VNFD_NAME}
112
113
114 *** Keywords ***
115 Suite Cleanup
116     [Documentation]   Test Suit Cleanup: Deleting Descriptor, instance, cluster and vim
117     Run Keyword If Any Tests Failed   Delete NS   ${NS_NAME}
118     Run Keyword If Any Tests Failed   Delete NSD   ${NSD_NAME}
119     Run Keyword If Any Tests Failed   Delete VNFD   ${VNFD_NAME}
120     Run Keyword If Any Tests Failed   Delete K8s Cluster   ${K8SCLUSTER_NAME}
121     Run Keyword If Any Tests Failed   Delete VIM Target   ${VIM_NAME}