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