Read all variables required for EPA_03 testsuite from the robot file
[osm/tests.git] / robot-systest / testsuite / epa_03-crud_operations_on_sdnc.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   [EPA-03] CRUD operations on SDNC accounts.
17
18 Resource   ../lib/prometheus_lib.resource
19 Resource   ../lib/sdnc_lib.resource
20
21 Test Tags   epa_03   cluster_epa   daily   regression
22
23 Suite Setup   Run Keyword And Ignore Error   Suite Preparation
24 Suite Teardown   Run Keyword And Ignore Error   Clean SDNC
25
26
27 *** Variables ***
28 ${SDNC_ENABLED_MAX_WAIT_TIME}   1min
29 ${SDNC_ENABLED_POL_TIME}   10
30 ${SDNC_NAME}   epa_03
31 ${SDNC_USER}   %{SDNC_USER=karaf}
32 ${SDNC_PASSWORD}   %{SDNC_PASSWORD=karaf}
33 ${SDNC_URL}   %{SDNC_URL=http://localhost:8181}
34 ${SDNC_TYPE}   %{SDNC_TYPE=onos_vpls}
35
36
37 *** Test Cases ***
38 Create Basic SDNC
39     [Documentation]   Register SDN controller in OSM.
40     ${created_sdnc_id}=   Create SDNC   ${SDNC_NAME}   ${SDNC_USER}   ${SDNC_PASSWORD}   ${SDNC_URL}   ${SDNC_TYPE}
41     Set Suite Variable   ${SDNC_ID}   ${created_sdnc_id}
42     Wait Until Keyword Succeeds   ${SDNC_ENABLED_MAX_WAIT_TIME}   ${SDNC_ENABLED_POL_TIME}   Check For SDNC   ${SDNC_ID}
43
44 Check SDNC Status Is Healthy
45     [Documentation]   Check in Prometheus that the SDN controller is in healthy state.
46     Check For SDNC Status   ${SDNC_ID}   ${PROMETHEUS_HOST}   ${PROMETHEUS_PORT}   ${PROMETHEUS_USER}   ${PROMETHEUS_PASSWORD}
47
48 Delete Basic SDNC
49     [Documentation]   Delete SDN controller from OSM.
50     [Tags]   cleanup
51     Delete SDNC   ${SDNC_NAME}
52
53
54 *** Keywords ***
55 Suite Preparation
56     [Documentation]   Test Suite Preparation: Setting Prometheus Testsuite Variables.
57     Set Testsuite Prometheus Variables
58
59 Clean SDNC
60     [Documentation]   Delete SDN controller from OSM.
61     Delete SDNC   ${sdnc_name}