Add ping test in aclrecovery suite
[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 Suite Setup       Genius.SRM Start Suite
5 Suite Teardown    Genius.SRM Stop Suite
6 Test Setup        Genius Test Setup
7 Test Teardown     Genius Test Teardown    ${data_models}
8 Resource          ../../libraries/DataModels.robot
9 Resource          ../../libraries/Genius.robot
10 Resource          ../../libraries/OVSDB.robot
11 Resource          ../../libraries/Utils.robot
12 Resource          ../../libraries/VpnOperations.robot
13 Resource          ../../variables/Variables.robot
14 Variables         ../../variables/genius/Modules.py
15
16 *** Test Cases ***
17 ITM TZ Recovery
18     [Documentation]    This test case recovers the tunnels using transportzone name.
19     Delete Tunnel on OVS
20     KarafKeywords.Issue Command On Karaf Console    srm:recover INSTANCE ITM-TZ TZA
21     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
22
23 ITM TEP Recovery
24     [Documentation]    This test case recovers the tunnels using transportzone name and tunnel's ip address.
25     Delete Tunnel on OVS
26     KarafKeywords.Issue Command On Karaf Console    srm:recover INSTANCE ITM-TEP TZA:${TOOLS_SYSTEM_1_IP}
27     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
28
29 ITM Service Recovery
30     [Documentation]    This test case recovers ITM Service.
31     ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds    40    20    Genius.Get Tunnel    ${DPN_ID_LIST[0]}    ${DPN_ID_LIST[1]}
32     ...    odl-interface:tunnel-type-vxlan
33     Utils.Remove All Elements At URI And Verify    ${CONFIG_API}/ietf-interfaces:interfaces/interface/${tunnel}
34     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Delete on DS    ${tunnel}
35     KarafKeywords.Issue Command On Karaf Console    srm:recover SERVICE ITM
36     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
37
38 IFM Instance Recovery
39     [Documentation]    This test case recovers tunnel interface instance using interface name.
40     ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds    40    20    Genius.Get Tunnel    ${DPN_ID_LIST[0]}    ${DPN_ID_LIST[1]}
41     ...    odl-interface:tunnel-type-vxlan
42     Delete Tunnel on OVS
43     KarafKeywords.Issue Command On Karaf Console    srm:recover INSTANCE IFM-IFACE ${tunnel}
44     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
45
46 IFM Service Recovery
47     [Documentation]    This test case recovers IFM Service.
48     ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds    40    20    Genius.Get Tunnel    ${DPN_ID_LIST[0]}    ${DPN_ID_LIST[1]}
49     ...    odl-interface:tunnel-type-vxlan
50     SSHLibrary.Switch Connection    ${TOOLS_SYSTEM_ALL_CONN_IDS[0]}
51     ${uuid}    ${bridge} =    OVSDB.Get Bridge Data
52     ${resp} =    RequestsLibrary.Delete Request    session    ${SOUTHBOUND_CONFIG_API}uuid%2F${uuid}%2Fbridge%2F${bridge}
53     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    ${RESP_CODE}
54     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Delete on DS    ${tunnel}
55     KarafKeywords.Issue Command On Karaf Console    srm:recover SERVICE IFM
56     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
57
58 *** Keywords ***
59 Delete Tunnel on OVS
60     [Documentation]    Deletes a tunnel interface on switch and verify deletion on OVS.
61     ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds    40    20    Genius.Get Tunnel    ${DPN_ID_LIST[0]}    ${DPN_ID_LIST[1]}
62     ...    odl-interface:tunnel-type-vxlan
63     Utils.Run Command On Remote System    ${TOOLS_SYSTEM_1_IP}    sudo ovs-vsctl del-port ${tunnel}
64     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Delete on DS    ${tunnel}