df24790fbd0718f89468cfe53d870afed683cce5
[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
17 ...               actions=goto_table:80    actions=goto_table:90    actions=goto_table:100    actions=goto_table:110    actions=drop
18
19 *** Test Cases ***
20 Create Original Cluster List
21     [Documentation]    Create original cluster list.
22     ${original_cluster_list}    Create Controller Index List
23     Set Suite Variable    ${original_cluster_list}
24     Log    ${original_cluster_list}
25
26 Verify Net-virt Features
27     [Documentation]    Installing Net-virt Console related features (odl-ovsdb-openstack)
28     Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_1_IP}
29     Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_2_IP}
30     Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_3_IP}
31
32 Check Shards Status Before Fail
33     [Documentation]    Check Status for all shards in Ovsdb application.
34     Check Ovsdb Shards Status    ${original_cluster_list}
35
36 Start Mininet Multiple Connections
37     [Documentation]    Start mininet with connection to all cluster instances.
38     ${mininet_conn_id}    Add Multiple Managers to OVS    ${TOOLS_SYSTEM_IP}    ${original_cluster_list}
39     Set Suite Variable    ${mininet_conn_id}
40     Log    ${mininet_conn_id}
41
42 Get manager connection
43     [Documentation]    This will verify if the OVS manager is connected
44     [Tags]    OVSDB netvirt
45     Verify OVS Reports Connected
46
47 Check Operational topology
48     [Documentation]    Check Operational topology
49     ${dictionary}=    Create Dictionary    ovsdb://uuid/=5
50     Wait Until Keyword Succeeds    20s    2s    Check Item Occurrence At URI In Cluster    ${original_cluster_list}    ${dictionary}    ${OPERATIONAL_TOPO_API}
51
52 Get bridge setup
53     [Documentation]    This request is verifying that the br-int bridge has been created
54     [Tags]    OVSDB netvirt
55     ${output}    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
56     Log    ${output}
57     Should Contain    ${output}    Bridge br-int
58
59 Get port setup
60     [Documentation]    This will check the port br-int has been created
61     [Tags]    OVSDB netvirt
62     ${output}    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
63     Log    ${output}
64     Should Contain    ${output}    Port br-int
65
66 Get interface setup
67     [Documentation]    This verify the interface br-int has been created
68     [Tags]    OVSDB netvirt
69     ${output}    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
70     Log    ${output}
71     Should Contain    ${output}    Interface br-int
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}