f399835f320d0655edc54dc90de15be86c0cdca8
[osm/tests.git] / robot-systest / testsuite / k8s_02-k8scluster_creation.robot
1 # Copyright 2020 Canonical Ltd.
2 #
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 Documentation     [K8s-02] K8s cluster addition.
17
18 Library   OperatingSystem
19 Library   String
20 Library   Collections
21 Library   Process
22
23 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot
24
25 Force Tags   k8s_02   cluster_k8s   daily   regression
26
27 Suite Teardown   Run Keyword And Ignore Error   Suite Cleanup
28
29
30 *** Variables ***
31 # K8s cluster name and version
32 ${k8scluster_name}   k8s-test
33 ${k8scluster_version}   v1
34
35 *** Test Cases ***
36 Add K8s Cluster To OSM
37
38     Create K8s Cluster  %{K8S_CREDENTIALS}  ${k8scluster_version}  %{VIM_TARGET}  %{VIM_MGMT_NET}  ${k8scluster_name}
39
40 Remove K8s Cluster from OSM
41     [Tags]   cleanup
42
43     Delete K8s Cluster  ${k8scluster_name}
44
45 *** Keywords ***
46 Suite Cleanup
47     [Documentation]  Test Suit Cleanup: Deleting K8s Cluster
48
49     Run Keyword If Any Tests Failed  Delete K8s Cluster  ${k8scluster_name}