+*** 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
# See the License for the specific language governing permissions and
# limitations under the License.
-*** Settings ***
-Documentation [EPA-03] CRUD operations on SDNC accounts.
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/sdnc_lib.robot
+*** Settings ***
+Documentation [EPA-03] CRUD operations on SDNC accounts.
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/epa_03-crud_operations_on_sdnc_data.py
+Resource ../lib/prometheus_lib.resource
+Resource ../lib/sdnc_lib.resource
-Suite Teardown Run Keyword And Ignore Error Delete Basic SDNC
+Variables ../resources/epa_03-crud_operations_on_sdnc_data.py
+Test Tags epa_03 cluster_epa daily regression
-*** Test Cases ***
-Create Basic SDNC
- [Tags] sdnc_crud sanity regression
+Suite Setup Run Keyword And Ignore Error Suite Preparation
+Suite Teardown Run Keyword And Ignore Error Delete Basic SDNC
- ${created_sdnc_id}= Create SDNC ${sdnc_name} ${sdnc_user} ${sdnc_password} ${sdnc_url} ${sdnc_type}
- Check for SDNC ${sdnc_name}
+*** Variables ***
+${SDNC_ENABLED_MAX_WAIT_TIME} 1min
+${SDNC_ENABLED_POL_TIME} 10
- Check SDNC Status Is Healthy
- [Tags] sdnc_crud sanity regression
- Check for SDNC Status ${sdnc_name} ${prometheus_host} ${prometheus_port}
+*** Test Cases ***
+Create Basic SDNC
+ [Documentation] Register SDN controller in OSM.
+ ${created_sdnc_id}= Create SDNC ${sdnc_name} ${sdnc_user} ${sdnc_password} ${sdnc_url} ${sdnc_type}
+ Set Suite Variable ${SDNC_ID} ${created_sdnc_id}
+ Wait Until Keyword Succeeds ${SDNC_ENABLED_MAX_WAIT_TIME} ${SDNC_ENABLED_POL_TIME} Check For SDNC ${SDNC_ID}
+Check SDNC Status Is Healthy
+ [Documentation] Check in Prometheus that the SDN controller is in healthy state.
+ Check For SDNC Status ${SDNC_ID} ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${PROMETHEUS_USER} ${PROMETHEUS_PASSWORD}
Delete Basic SDNC
- [Tags] sdnc_crud sanity regression cleanup
+ [Documentation] Delete SDN controller from OSM.
+ [Tags] cleanup
+ Delete SDNC ${sdnc_name}
+
- Delete SDNC ${sdnc_name}
+*** Keywords ***
+Suite Preparation
+ [Documentation] Test Suite Preparation: Setting Prometheus Testsuite Variables.
+ Set Testsuite Prometheus Variables