${SUCCESS_RETURN_CODE} 0
${CLUSTER_LAUNCH_MAX_WAIT_TIME} 12min
${CLUSTER_LAUNCH_POL_TIME} 30sec
+${CLUSTER_REGISTER_MAX_WAIT_TIME} 7min
+${CLUSTER_REGISTER_POL_TIME} 30sec
${CLUSTER_DELETE_MAX_WAIT_TIME} 12min
${CLUSTER_DELETE_POL_TIME} 30sec
${OKA_OPERATION_MAX_WAIT_TIME} 5min
${cluster_id}= Set Variable ${stdout}
Log ${cluster_id}
Check Cluster Age Keys ${cluster_id}
+ IF ${wait_flag} == True
+ Wait Until Keyword Succeeds ${CLUSTER_REGISTER_MAX_WAIT_TIME} ${CLUSTER_REGISTER_POL_TIME}
+ ... Check For Cluster To Be Ready ${name}
+ END
+ RETURN ${cluster_id}
+
+Register Cluster
+ [Documentation] Register a Kubernetes cluster in OSM using a provided name and kubeconfig credentials.
+ [Arguments] ${name} ${vim_account} ${creds} ${description} ${bootstrap_flag}=True ${wait_flag}=True
+ ${command}= Catenate
+ ... osm cluster-register ${name}
+ ... --vim-account ${vim_account}
+ ... --creds ${creds}
+ ... --description ${description}
+ IF ${bootstrap_flag} == True
+ Catenate ${command} --bootstrap
+ ELSE
+ Catenate ${command} --no-bootstrap
+ END
+ ${rc} ${stdout}= Run And Return Rc And Output ${command}
+ Log ${rc},${stdout}
+ Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE} msg=Cluster registration failed: ${stdout}
+ ${cluster_id}= Set Variable ${stdout}
+ Log ${cluster_id}
+ Check Cluster Age Keys ${cluster_id}
IF ${wait_flag} == True
Wait Until Keyword Succeeds ${CLUSTER_LAUNCH_MAX_WAIT_TIME} ${CLUSTER_LAUNCH_POL_TIME}
... Check For Cluster To Be Ready ${name}
Log pubkey is ${stdout}
Delete Cluster
- [Documentation] Unregister/delete a Kubernetes cluster from OSM.
+ [Documentation] Delete a Kubernetes cluster from OSM.
[Arguments] ${cluster_name} ${wait_flag}=True
${rc} ${stdout}= Run And Return Rc And Output osm cluster-delete ${cluster_name}
Log ${rc},${stdout}
... Check For Cluster Deletion Status ${cluster_name}
END
+Deregister Cluster
+ [Documentation] Deregister a Kubernetes cluster from OSM.
+ [Arguments] ${cluster_name} ${wait_flag}=True
+ ${rc} ${stdout}= Run And Return Rc And Output osm cluster-deregister ${cluster_name}
+ Log ${rc},${stdout}
+ Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE} msg=Cluster deregistration failed: ${stdout}
+ IF ${wait_flag} == True
+ Wait Until Keyword Succeeds ${CLUSTER_DELETE_MAX_WAIT_TIME} ${CLUSTER_DELETE_POL_TIME}
+ ... Check For Cluster Deletion Status ${cluster_name}
+ END
+
Check For Cluster Deletion Status
[Documentation] Check if a Kubernetes cluster identified by name is deleted or in error state.
[Arguments] ${cluster_name}
Log ${matches}
IF ${matches} != @{EMPTY}
Log ${ksu_name} is a valid UUID
- ${rc} ${stdout}= Run And Return Rc And Output osm ksu-list --filter _id="${ksu_name}" | grep ${ksu_name}
+ # ${rc} ${stdout}= Run And Return Rc And Output osm ksu-list --filter _id="${ksu_name}" | grep ${ksu_name}
+ ${rc} ${stdout}= Run And Return Rc And Output osm ksu-list --filter _id="${ksu_name}" -o jsonpath='[*].name'| grep -E "\^${ksu_name}\$""
ELSE
Log ${ksu_name} is not a valid UUID, so it will be treated as a name
- ${rc} ${stdout}= Run And Return Rc And Output osm ksu-list --filter name="${ksu_name}" | grep ${ksu_name}
+ # ${rc} ${stdout}= Run And Return Rc And Output osm ksu-list --filter name="${ksu_name}" | grep ${ksu_name}
+ ${rc} ${stdout}= Run And Return Rc And Output osm ksu-list --filter name="${ksu_name}" -o jsonpath='[*].name'| grep -E "\^${ksu_name}\$"
END
Log ${rc},${stdout}
Should Be Empty ${stdout}
+++ /dev/null
-*** Comments ***
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-*** Settings ***
-Documentation [GITOPS-01] Advanced Cluster Management.
-
-Library OperatingSystem
-Library String
-Library Collections
-Library Process
-
-Resource ../lib/advanced_cluster_mgmt_lib.resource
-
-Test Tags gitops_01 cluster_gitops
-
-# Suite Teardown Run Keyword And Ignore Error Suite Cleanup
-
-
-*** Variables ***
-# OKA packages
-${OKA_FOLDER} '%{PACKAGES_FOLDER}/oka'
-${OKA1_PKG} apps/testacme
-${OKA1_NAME} testacme
-${OKA1_PROFILE} app-profile
-${OKA2_PKG} apps/jenkins
-${OKA2_NAME} jenkins
-${OKA2_PROFILE} app-profile
-${OKA_NS_PKG} apps/namespace
-${OKA_NS_NAME} namespace
-${OKA_NS_PROFILE} app-profile
-
-# Cluster
-${CLUSTER_NAME} gitops01
-${CLUSTER_DESCRIPTION} "Cluster for gitops01 Robot test suite"
-${CLUSTER_VM_SIZE} Standard_D2_v2
-${CLUSTER_NODES} 2
-${REGION_NAME} northeurope
-${RESOURCE_GROUP} OSM-CTIO
-${KUBERNETES_VERSION} "1.30"
-
-# KSUs
-${KSU1_NAME} testacme
-${KSU_NS_NAME} jenkins-ns
-${KSU2_NAME} jenkins
-${KSU3_NAME} jenkinsbis
-
-
-*** Test Cases ***
-Add OKA Packages For The Testsuite
- [Documentation] Add OKA packages for the testsuite.
- [Tags] oka create
- Add OKA Package ${OKA_NS_NAME} '${OKA_FOLDER}/${OKA_NS_PKG}' ${OKA_NS_PROFILE}
- Add OKA Package ${OKA1_NAME} '${OKA_FOLDER}/${OKA1_PKG}' ${OKA1_PROFILE}
- Add OKA Package ${OKA2_NAME} '${OKA_FOLDER}/${OKA2_PKG}' ${OKA2_PROFILE}
-
-Create Cluster For Testsuite in Azure
- [Documentation] Create K8s cluster for the testsuite.
- [Tags] cluster create
- ${id}= Create Cluster ${CLUSTER_NAME} %{VIM_TARGET} ${CLUSTER_DESCRIPTION} ${CLUSTER_VM_SIZE} ${KUBERNETES_VERSION} ${CLUSTER_NODES} ${REGION_NAME} ${RESOURCE_GROUP}
- Set Suite Variable ${CLUSTER_ID} ${id}
- Log ${CLUSTER_ID}
-
-Get Cluster Kubeconfig
- [Documentation] Get Kubeconfig for the cluster.
- [Tags] cluster
- ${rc} ${stdout}= Run And Return Rc And Output
- ... osm cluster-show ${CLUSTER_NAME} -o jsonpath='{.credentials}' | yq -y
- Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE}
- Log ${stdout}
-
-Create KSU Namespace For All KSUs
- [Documentation] Create KSU based on ${OKA_NS_NAME} with params.
- [Tags] ksu ksu-ns create
- ${id}= Create KSU ${KSU_NS_NAME} ${KSU_NS_NAME} ${CLUSTER_NAME} app-profile ${OKA_NS_NAME} ${OKA_FOLDER}/apps/jenkins-ns-params.yaml
- Set Suite Variable ${KSU_NS_ID} ${id}
- Log ${KSU_NS_ID}
-
-Create KSU1 Without Params
- [Documentation] Create KSU based on ${OKA1_NAME} without params (default namespace).
- [Tags] ksu ksu1 create
- ${id}= Create KSU ${KSU1_NAME} ${KSU1_NAME} ${CLUSTER_NAME} app-profile ${OKA1_NAME}
- Set Suite Variable ${KSU1_ID} ${id}
- Log ${KSU1_ID}
-
-Create KSU2 With Params
- [Documentation] Create KSU based on ${OKA2_NAME} with params.
- [Tags] ksu ksu2 create
- ${id}= Create KSU ${KSU2_NAME} ${KSU2_NAME} ${CLUSTER_NAME} app-profile ${OKA2_NAME} ${OKA_FOLDER}/apps/jenkins-params.yaml
- Set Suite Variable ${KSU2_ID} ${id}
- Log ${KSU2_ID}
-
-Create KSU3 With Params
- [Documentation] Create KSU based on ${OKA2_NAME} with same params as KSU2.
- [Tags] ksu ksu3 create
- ${id}= Create KSU ${KSU3_NAME} ${KSU3_NAME} ${CLUSTER_NAME} app-profile ${OKA2_NAME} ${OKA_FOLDER}/apps/jenkins-params.yaml
- Set Suite Variable ${KSU3_ID} ${id}
- Log ${KSU3_ID}
-
-Delete KSU3
- [Documentation] Delete KSU3 based on ${OKA2_NAME}.
- [Tags] cleanup ksu ksu3
- Delete KSU ${KSU3_ID}
-
-Delete KSU2
- [Documentation] Delete KSU2 based on ${OKA2_NAME}.
- [Tags] cleanup ksu ksu2
- Delete KSU ${KSU2_ID}
-
-Delete KSU1
- [Documentation] Delete KSU1 based on ${OKA1_NAME}.
- [Tags] cleanup ksu ksu1
- Delete KSU ${KSU1_NAME}
-
-Delete KSU Namespace
- [Documentation] Delete KSU based on ${OKA_NS_NAME}.
- [Tags] cleanup ksu ksu-ns
- Delete KSU ${KSU_NS_ID}
-
-Delete Cluster For Testsuite
- [Documentation] Delete K8s cluster for the testsuite.
- [Tags] cleanup cluster
- Delete Cluster ${CLUSTER_NAME}
-
-Delete OKA Packages For The Testsuite
- [Documentation] Delete OKA packages for the testsuite.
- [Tags] cleanup oka
- Delete OKA Package ${OKA_NS_NAME}
- Delete OKA Package ${OKA1_NAME}
- Delete OKA Package ${OKA2_NAME}
-
-
-*** Keywords ***
-Suite Cleanup
- [Documentation] Test Suit Cleanup: Deleting cluster, KSUs, OKAs
- Run Keyword If Any Tests Failed Delete Cluster ${CLUSTER_NAME}
- Run Keyword If Any Tests Failed Delete OKA Package ${OKA_NS_NAME}
- Run Keyword If Any Tests Failed Delete OKA Package ${OKA1_NAME}
- Run Keyword If Any Tests Failed Delete OKA Package ${OKA2_NAME}
--- /dev/null
+*** Comments ***
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+*** Settings ***
+Documentation [GITOPS-01] Advanced Cluster Management. Cluster creation
+
+Library OperatingSystem
+Library String
+Library Collections
+Library Process
+
+Resource ../lib/advanced_cluster_mgmt_lib.resource
+
+Test Tags gitops_01 cluster_gitops
+
+Suite Teardown Run Keyword And Ignore Error Suite Cleanup
+
+
+*** Variables ***
+# OKA packages
+${OKA_FOLDER} '%{PACKAGES_FOLDER}/oka'
+${OKA1_PKG} apps/testacme
+${OKA1_NAME} testacme
+${OKA1_PROFILE} app-profile
+${OKA2_PKG} apps/jenkins
+${OKA2_NAME} jenkins
+${OKA2_PROFILE} app-profile
+${OKA_NS_PKG} apps/namespace
+${OKA_NS_NAME} namespace
+${OKA_NS_PROFILE} app-profile
+
+# Cluster
+${CLUSTER_NAME} gitops01
+${CLUSTER_DESCRIPTION} "Cluster for gitops01 Robot test suite"
+${CLUSTER_VM_SIZE} Standard_D2_v2
+${CLUSTER_NODES} 2
+${REGION_NAME} northeurope
+${RESOURCE_GROUP} OSM-CTIO
+${KUBERNETES_VERSION} "1.30"
+
+# KSUs
+${KSU1_NAME} testacme
+${KSU_NS_NAME} jenkins-ns
+${KSU2_NAME} jenkins
+${KSU3_NAME} jenkinsbis
+
+
+*** Test Cases ***
+Add OKA Packages For The Testsuite
+ [Documentation] Add OKA packages for the testsuite.
+ [Tags] oka create
+ Add OKA Package ${OKA_NS_NAME} '${OKA_FOLDER}/${OKA_NS_PKG}' ${OKA_NS_PROFILE}
+ Add OKA Package ${OKA1_NAME} '${OKA_FOLDER}/${OKA1_PKG}' ${OKA1_PROFILE}
+ Add OKA Package ${OKA2_NAME} '${OKA_FOLDER}/${OKA2_PKG}' ${OKA2_PROFILE}
+
+Create Cluster For Testsuite in Azure
+ [Documentation] Create K8s cluster for the testsuite.
+ [Tags] cluster create
+ ${id}= Create Cluster ${CLUSTER_NAME} %{VIM_TARGET} ${CLUSTER_DESCRIPTION} ${CLUSTER_VM_SIZE} ${KUBERNETES_VERSION} ${CLUSTER_NODES} ${REGION_NAME} ${RESOURCE_GROUP}
+ Set Suite Variable ${CLUSTER_ID} ${id}
+ Log ${CLUSTER_ID}
+
+Get Cluster Kubeconfig
+ [Documentation] Get Kubeconfig for the cluster.
+ [Tags] cluster
+ ${rc} ${stdout}= Run And Return Rc And Output
+ ... osm cluster-show ${CLUSTER_NAME} -o jsonpath='{.credentials}' | yq -y
+ Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE}
+ Log ${stdout}
+
+Create KSU Namespace For All KSUs
+ [Documentation] Create KSU based on ${OKA_NS_NAME} with params.
+ [Tags] ksu ksu-ns create
+ ${id}= Create KSU ${KSU_NS_NAME} ${KSU_NS_NAME} ${CLUSTER_NAME} app-profile ${OKA_NS_NAME} ${OKA_FOLDER}/apps/jenkins-ns-params.yaml
+ Set Suite Variable ${KSU_NS_ID} ${id}
+ Log ${KSU_NS_ID}
+
+Create KSU1 Without Params
+ [Documentation] Create KSU based on ${OKA1_NAME} without params (default namespace).
+ [Tags] ksu ksu1 create
+ ${id}= Create KSU ${KSU1_NAME} ${KSU1_NAME} ${CLUSTER_NAME} app-profile ${OKA1_NAME}
+ Set Suite Variable ${KSU1_ID} ${id}
+ Log ${KSU1_ID}
+
+Create KSU2 With Params
+ [Documentation] Create KSU based on ${OKA2_NAME} with params.
+ [Tags] ksu ksu2 create
+ ${id}= Create KSU ${KSU2_NAME} ${KSU2_NAME} ${CLUSTER_NAME} app-profile ${OKA2_NAME} ${OKA_FOLDER}/apps/jenkins-params.yaml
+ Set Suite Variable ${KSU2_ID} ${id}
+ Log ${KSU2_ID}
+
+Create KSU3 With Params
+ [Documentation] Create KSU based on ${OKA2_NAME} with same params as KSU2.
+ [Tags] ksu ksu3 create
+ ${id}= Create KSU ${KSU3_NAME} ${KSU3_NAME} ${CLUSTER_NAME} app-profile ${OKA2_NAME} ${OKA_FOLDER}/apps/jenkins-params.yaml
+ Set Suite Variable ${KSU3_ID} ${id}
+ Log ${KSU3_ID}
+
+Delete KSU3
+ [Documentation] Delete KSU3 based on ${OKA2_NAME}.
+ [Tags] cleanup ksu ksu3
+ Delete KSU ${KSU3_ID}
+
+Delete KSU2
+ [Documentation] Delete KSU2 based on ${OKA2_NAME}.
+ [Tags] cleanup ksu ksu2
+ Delete KSU ${KSU2_ID}
+
+Delete KSU1
+ [Documentation] Delete KSU1 based on ${OKA1_NAME}.
+ [Tags] cleanup ksu ksu1
+ Delete KSU ${KSU1_NAME}
+
+Delete KSU Namespace
+ [Documentation] Delete KSU based on ${OKA_NS_NAME}.
+ [Tags] cleanup ksu ksu-ns
+ Delete KSU ${KSU_NS_ID}
+
+Delete Cluster For Testsuite
+ [Documentation] Delete K8s cluster for the testsuite.
+ [Tags] cleanup cluster
+ Delete Cluster ${CLUSTER_NAME}
+
+Delete OKA Packages For The Testsuite
+ [Documentation] Delete OKA packages for the testsuite.
+ [Tags] cleanup oka
+ Delete OKA Package ${OKA_NS_NAME}
+ Delete OKA Package ${OKA1_NAME}
+ Delete OKA Package ${OKA2_NAME}
+
+
+*** Keywords ***
+Suite Cleanup
+ [Documentation] Test Suit Cleanup: Deleting cluster, KSUs, OKAs
+ Run Keyword If Any Tests Failed Delete Cluster ${CLUSTER_NAME}
+ Run Keyword If Any Tests Failed Delete OKA Package ${OKA_NS_NAME}
+ Run Keyword If Any Tests Failed Delete OKA Package ${OKA1_NAME}
+ Run Keyword If Any Tests Failed Delete OKA Package ${OKA2_NAME}
--- /dev/null
+*** Comments ***
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+*** Settings ***
+Documentation [GITOPS-02] Advanced Cluster Management. Cluster registration
+
+Library OperatingSystem
+Library String
+Library Collections
+Library Process
+
+Resource ../lib/advanced_cluster_mgmt_lib.resource
+
+Test Tags gitops_02 cluster_gitops
+
+# Suite Teardown Run Keyword And Ignore Error Suite Cleanup
+
+
+*** Variables ***
+# OKA packages
+${OKA_FOLDER} '%{PACKAGES_FOLDER}/oka'
+${OKA1_PKG} apps/testacme
+${OKA1_NAME} testacme
+${OKA1_PROFILE} app-profile
+${OKA2_PKG} apps/jenkins
+${OKA2_NAME} jenkins
+${OKA2_PROFILE} app-profile
+${OKA_NS_PKG} apps/namespace
+${OKA_NS_NAME} namespace
+${OKA_NS_PROFILE} app-profile
+
+# Cluster
+${CLUSTER_NAME} cl-madrid-norte1
+${CLUSTER_DESCRIPTION} "Cluster for gitops02 Robot test suite"
+
+# KSUs
+${KSU_NS_NAME} jenkins-ns
+${KSU1_NAME} testacme
+${KSU2_NAME} jenkins
+${KSU_NS_ID} ${EMPTY}
+${KSU1_ID} ${EMPTY}
+${KSU2_ID} ${EMPTY}
+
+
+*** Test Cases ***
+Add OKA Packages For The Testsuite
+ [Documentation] Add OKA packages for the testsuite.
+ [Tags] oka create
+ Add OKA Package ${OKA_NS_NAME} '${OKA_FOLDER}/${OKA_NS_PKG}' ${OKA_NS_PROFILE}
+ Add OKA Package ${OKA1_NAME} '${OKA_FOLDER}/${OKA1_PKG}' ${OKA1_PROFILE}
+ Add OKA Package ${OKA2_NAME} '${OKA_FOLDER}/${OKA2_PKG}' ${OKA2_PROFILE}
+
+Register Cluster For Testsuite
+ [Documentation] Register K8s cluster for the testsuite.
+ [Tags] cluster create
+ ${id}= Register Cluster ${CLUSTER_NAME} %{VIM_TARGET} %{CLUSTER_KUBECONFIG_CREDENTIALS} ${CLUSTER_DESCRIPTION}
+ Set Suite Variable ${CLUSTER_ID} ${id}
+ Log ${CLUSTER_ID}
+
+Get Cluster Kubeconfig
+ [Documentation] Get Kubeconfig for the cluster.
+ [Tags] cluster
+ ${rc} ${stdout}= Run And Return Rc And Output
+ ... osm cluster-show ${CLUSTER_NAME} -o jsonpath='{.credentials}' | yq -y
+ Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE}
+ Log ${stdout}
+
+Create KSU Namespace For All KSUs
+ [Documentation] Create KSU based on ${OKA_NS_NAME} with params.
+ [Tags] ksu ksu-ns create
+ ${id}= Create KSU ${KSU_NS_NAME} ${KSU_NS_NAME} ${CLUSTER_NAME} app-profile ${OKA_NS_NAME} ${OKA_FOLDER}/apps/jenkins-ns-params.yaml
+ Set Suite Variable ${KSU_NS_ID} ${id}
+ Log ${KSU_NS_ID}
+
+Create KSU1 Without Params
+ [Documentation] Create KSU based on ${OKA1_NAME} without params (default namespace).
+ [Tags] ksu ksu1 create
+ ${id}= Create KSU ${KSU1_NAME} ${KSU1_NAME} ${CLUSTER_NAME} app-profile ${OKA1_NAME}
+ Set Suite Variable ${KSU1_ID} ${id}
+ Log ${KSU1_ID}
+
+Create KSU2 With Params
+ [Documentation] Create KSU based on ${OKA2_NAME} with params.
+ [Tags] ksu ksu2 create
+ ${id}= Create KSU ${KSU2_NAME} ${KSU2_NAME} ${CLUSTER_NAME} app-profile ${OKA2_NAME} ${OKA_FOLDER}/apps/jenkins-params.yaml
+ Set Suite Variable ${KSU2_ID} ${id}
+ Log ${KSU2_ID}
+
+Delete KSU2
+ [Documentation] Delete KSU2 based on ${OKA2_NAME}.
+ [Tags] cleanup ksu ksu2
+ IF '${KSU2_ID}' != ''
+ ${KSU_TO_BE_DELETED}= Set Variable ${KSU2_ID}
+ ELSE
+ ${KSU_TO_BE_DELETED}= Set Variable ${KSU2_NAME}
+ END
+ Delete KSU ${KSU_TO_BE_DELETED}
+
+Delete KSU1
+ [Documentation] Delete KSU1 based on ${OKA1_NAME}.
+ [Tags] cleanup ksu ksu1
+ IF '${KSU1_ID}' != ''
+ ${KSU_TO_BE_DELETED}= Set Variable ${KSU1_ID}
+ ELSE
+ ${KSU_TO_BE_DELETED}= Set Variable ${KSU1_NAME}
+ END
+ Delete KSU ${KSU_TO_BE_DELETED}
+
+Delete KSU Namespace
+ [Documentation] Delete KSU based on ${OKA_NS_NAME}.
+ [Tags] cleanup ksu ksu-ns
+ IF '${KSU_NS_ID}' != ''
+ ${KSU_TO_BE_DELETED}= Set Variable ${KSU_NS_ID}
+ ELSE
+ ${KSU_TO_BE_DELETED}= Set Variable ${KSU_NS_NAME}
+ END
+ Delete KSU ${KSU_TO_BE_DELETED}
+
+Deregister Cluster For Testsuite
+ [Documentation] Deregister K8s cluster for the testsuite.
+ [Tags] cleanup cluster
+ Deregister Cluster ${CLUSTER_NAME}
+
+Delete OKA Packages For The Testsuite
+ [Documentation] Delete OKA packages for the testsuite.
+ [Tags] cleanup oka
+ Delete OKA Package ${OKA_NS_NAME}
+ Delete OKA Package ${OKA1_NAME}
+ Delete OKA Package ${OKA2_NAME}
+
+
+*** Keywords ***
+Suite Cleanup
+ [Documentation] Test Suit Cleanup: Deleting cluster, KSUs, OKAs
+ Run Keyword If Any Tests Failed Deregister Cluster ${CLUSTER_NAME}
+ Run Keyword If Any Tests Failed Delete OKA Package ${OKA_NS_NAME}
+ Run Keyword If Any Tests Failed Delete OKA Package ${OKA1_NAME}
+ Run Keyword If Any Tests Failed Delete OKA Package ${OKA2_NAME}