Remove openstack integration
[integration/test.git] / csit / suites / genius / Service_Recovery.robot
1 *** Settings ***
2 Documentation       Test Suite for Service Recovery.
3 ...                 Find detailed test plan here, http://docs.opendaylight.org/en/latest/submodules/genius/docs/testplans/service-recovery.html
4
5 Resource            ../../libraries/DataModels.robot
6 Resource            ../../libraries/Genius.robot
7 Resource            ../../libraries/OVSDB.robot
8 Resource            ../../libraries/Utils.robot
9 Resource            ../../libraries/VpnOperations.robot
10 Resource            ../../variables/Variables.robot
11 Variables           ../../variables/genius/Modules.py
12
13 Suite Setup         Genius.SRM Start Suite
14 Suite Teardown      Genius.SRM Stop Suite
15 Test Setup          Genius Test Setup
16 Test Teardown       Genius Test Teardown    ${data_models}
17
18
19 *** Test Cases ***
20 ITM TZ Recovery
21     [Documentation]    This test case recovers the tunnels using transportzone name.
22     Delete Tunnel on OVS
23     KarafKeywords.Issue Command On Karaf Console    srm:recover INSTANCE ITM-TZ TZA
24     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
25
26 ITM TEP Recovery
27     [Documentation]    This test case recovers the tunnels using transportzone name and tunnel's ip address.
28     Delete Tunnel on OVS
29     KarafKeywords.Issue Command On Karaf Console    srm:recover INSTANCE ITM-TEP TZA:${TOOLS_SYSTEM_1_IP}
30     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
31
32 ITM Service Recovery
33     [Documentation]    This test case recovers ITM Service.
34     ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds
35     ...    40
36     ...    20
37     ...    Genius.Get Tunnel
38     ...    ${DPN_ID_LIST[0]}
39     ...    ${DPN_ID_LIST[1]}
40     ...    odl-interface:tunnel-type-vxlan
41     Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/ietf-interfaces:interfaces/interface/${tunnel}
42     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Delete on DS    ${tunnel}
43     KarafKeywords.Issue Command On Karaf Console    srm:recover SERVICE ITM
44     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
45
46 IFM Instance Recovery
47     [Documentation]    This test case recovers tunnel interface instance using interface name.
48     ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds
49     ...    40
50     ...    20
51     ...    Genius.Get Tunnel
52     ...    ${DPN_ID_LIST[0]}
53     ...    ${DPN_ID_LIST[1]}
54     ...    odl-interface:tunnel-type-vxlan
55     Delete Tunnel on OVS
56     KarafKeywords.Issue Command On Karaf Console    srm:recover INSTANCE IFM-IFACE ${tunnel}
57     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
58
59 IFM Service Recovery
60     [Documentation]    This test case recovers IFM Service.
61     ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds
62     ...    40
63     ...    20
64     ...    Genius.Get Tunnel
65     ...    ${DPN_ID_LIST[0]}
66     ...    ${DPN_ID_LIST[1]}
67     ...    odl-interface:tunnel-type-vxlan
68     SSHLibrary.Switch Connection    ${TOOLS_SYSTEM_ALL_CONN_IDS[0]}
69     ${uuid}    ${bridge} =    OVSDB.Get Bridge Data
70     ${resp} =    RequestsLibrary.Delete Request
71     ...    session
72     ...    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${uuid}%2Fbridge%2F${bridge}
73     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    ${RESP_CODE}
74     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Delete on DS    ${tunnel}
75     KarafKeywords.Issue Command On Karaf Console    srm:recover SERVICE IFM
76     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
77
78
79 *** Keywords ***
80 Delete Tunnel on OVS
81     [Documentation]    Deletes a tunnel interface on switch and verify deletion on OVS.
82     ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds
83     ...    40
84     ...    20
85     ...    Genius.Get Tunnel
86     ...    ${DPN_ID_LIST[0]}
87     ...    ${DPN_ID_LIST[1]}
88     ...    odl-interface:tunnel-type-vxlan
89     Utils.Run Command On Remote System    ${TOOLS_SYSTEM_1_IP}    sudo ovs-vsctl del-port ${tunnel}
90     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Delete on DS    ${tunnel}