f307596d7baa47f7ede1477be4b4292d495c0817
[integration/test.git] / csit / suites / netvirt / Netvirt_Cluster / 030_Ovsdb_Southbound_NetVirt.robot
1 *** Settings ***
2 Documentation     Test suite for Ovsdb Southbound Cluster
3 Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown
4 Suite Teardown    Delete All Sessions
5 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
6 Library           RequestsLibrary
7 Resource          ../../../libraries/ClusterManagement.robot
8 Resource          ../../../libraries/ClusterOvsdb.robot
9 Resource          ../../../libraries/SetupUtils.robot
10 Resource          ../../../libraries/OVSDB.robot
11 Resource          ../../../libraries/Utils.robot
12 Variables         ../../../variables/Variables.py
13
14 *** Variables ***
15 @{FLOW_TABLE_LIST}    actions=goto_table:20    actions=CONTROLLER:65535    actions=goto_table:30    actions=goto_table:31    actions=resubmit(,39),resubmit(,40)    actions=goto_table:50    actions=goto_table:60
16 ...               actions=goto_table:70    actions=goto_table:80    actions=goto_table:90    actions=goto_table:100    actions=goto_table:105    actions=goto_table:110    actions=drop
17
18 *** Test Cases ***
19 Verify Net-virt Features
20     [Documentation]    Installing Net-virt Console related features (odl-ovsdb-openstack)
21     KarafKeywords.Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_1_IP}
22     KarafKeywords.Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_2_IP}
23     KarafKeywords.Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_3_IP}
24
25 Check Shards Status Before Fail
26     [Documentation]    Check Status for all shards in Ovsdb application.
27     ClusterOvsdb.Check Ovsdb Shards Status
28
29 Start Mininet Multiple Connections
30     [Documentation]    Start mininet with connection to all cluster instances.
31     ${mininet_conn_id}    Ovsdb.Add Multiple Managers to OVS
32     Set Suite Variable    ${mininet_conn_id}
33     Log    ${mininet_conn_id}
34
35 Get manager connection
36     [Documentation]    This will verify if the OVS manager is connected
37     [Tags]    OVSDB netvirt
38     Ovsdb.Verify OVS Reports Connected
39
40 Check Operational topology
41     [Documentation]    Check Operational topology
42     ${dictionary}=    Create Dictionary    ovsdb://uuid/=5
43     Wait Until Keyword Succeeds    20s    2s    ClusterManagement.Check_Item_Occurrence_Member_List_Or_All    uri=${OPERATIONAL_TOPO_API}    dictionary=${dictionary}
44
45 Get bridge setup
46     [Documentation]    This request is verifying that the br-int bridge has been created
47     [Tags]    OVSDB netvirt
48     ${output}    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
49     Log    ${output}
50     Should Contain    ${output}    Bridge br-int
51
52 Get port setup
53     [Documentation]    This will check the port br-int has been created
54     [Tags]    OVSDB netvirt
55     ${output}    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
56     Log    ${output}
57     Should Contain    ${output}    Port br-int
58
59 Get interface setup
60     [Documentation]    This verify the interface br-int has been created
61     [Tags]    OVSDB netvirt
62     ${output}    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
63     Log    ${output}
64     Should Contain    ${output}    Interface br-int
65
66 Get the bridge flows
67     [Documentation]    This request fetch the OF13 flow tables to verify the flows are correctly added
68     [Tags]    OVSDB netvirt
69     ${output}    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-ofctl -O Openflow13 dump-flows br-int
70     Log    ${output}
71     : FOR    ${flows}    IN    @{FLOW_TABLE_LIST}
72     \    Should Contain    ${output}    ${flows}