Disable stale marking feature test 19/57319/6
authorLuis Gomez <ecelgp@gmail.com>
Thu, 18 May 2017 00:09:52 +0000 (17:09 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Fri, 19 May 2017 23:33:27 +0000 (23:33 +0000)
The feature activation is being moved from REST to config
file and during this transition the test should be disabled.

BTW stabilize the test suite and organize KWs.

Change-Id: Ib808332575fb3e068311a46c1360961e4d6b0d1e
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
csit/libraries/ClusterOpenFlow.robot
csit/libraries/MininetKeywords.robot
csit/suites/openflowplugin/Clustered_Reconciliation/010_Group_Flows.robot
csit/suites/openflowplugin/Reconciliation/010_Group_Flows.robot

index d2fc786d615e2516f9c41897ede92d7ac20311b1..c2ec5231d8d3a212147ef35d3e9f40f963e2c2d9 100644 (file)
@@ -147,3 +147,52 @@ Check Flows Operational Datastore On Member
     [Documentation]    Check if number of Operational Flows on member of given index is equal to ${flow_count}.
     ${sw}    ${reported_flow}    ${found_flow}=    ScaleClient.Flow Stats Collected    controller=${ODL_SYSTEM_${member_index}_IP}
     BuiltIn.Should_Be_Equal_As_Numbers    ${flow_count}    ${found_flow}
+
+Check Linear Topology On Member
+    [Arguments]    ${switches}    ${member_index}=1
+    [Documentation]    Check Linear topology.
+    ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
+    ${resp}    RequestsLibrary.Get Request    ${session}    ${OPERATIONAL_TOPO_API}
+    Log    ${resp.content}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    : FOR    ${switch}    IN RANGE    1    ${switches+1}
+    \    Should Contain    ${resp.content}    "node-id":"openflow:${switch}"
+    \    Should Contain    ${resp.content}    "tp-id":"openflow:${switch}:1"
+    \    Should Contain    ${resp.content}    "tp-id":"openflow:${switch}:2"
+    \    Should Contain    ${resp.content}    "source-tp":"openflow:${switch}:2"
+    \    Should Contain    ${resp.content}    "dest-tp":"openflow:${switch}:2"
+    \    ${edge}    Evaluate    ${switch}==1 or ${switch}==${switches}
+    \    Run Keyword Unless    ${edge}    Should Contain    ${resp.content}    "tp-id":"openflow:${switch}:3"
+    \    Run Keyword Unless    ${edge}    Should Contain    ${resp.content}    "source-tp":"openflow:${switch}:3"
+    \    Run Keyword Unless    ${edge}    Should Contain    ${resp.content}    "dest-tp":"openflow:${switch}:3
+
+Check No Switches On Member
+    [Arguments]    ${switches}    ${member_index}=1
+    [Documentation]    Check no switch is in topology
+    ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
+    ${resp}    RequestsLibrary.Get Request    ${session}    ${OPERATIONAL_TOPO_API}
+    Log    ${resp.content}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    : FOR    ${switch}    IN RANGE    1    ${switches+1}
+    \    Should Not Contain    ${resp.content}    openflow:${switch}
+
+Check Number Of Flows On Member
+    [Arguments]    ${flows}    ${member_index}=1
+    [Documentation]    Check number of flows in the inventory.
+    ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
+    ${resp}=    RequestsLibrary.Get Request    ${session}    ${OPERATIONAL_NODES_API}
+    Log    ${resp.content}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${count}=    Get Count    ${resp.content}    "priority"
+    Should Be Equal As Integers    ${count}    ${flows}
+
+Check Number Of Groups On Member
+    [Arguments]    ${groups}    ${member_index}=1
+    [Documentation]    Check number of groups in the inventory.
+    ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
+    ${resp}=    RequestsLibrary.Get Request    ${session}    ${OPERATIONAL_NODES_API}
+    Log    ${resp.content}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${group_count}=    Get Count    ${resp.content}    "group-type"
+    ${count}=    CompareStream.Set_Variable_If_At Least_Boron    ${group_count}    ${group_count/2}
+    Should Be Equal As Integers    ${count}    ${groups}
index 416b27274baf1eb75ac88292aca81c77749b43f3..2528d7882f3750dee9a157a35a96a286fe38c96f 100644 (file)
@@ -120,6 +120,19 @@ Stop Mininet And Exit Multiple Sessions
     : FOR    ${mininet_conn}    IN    @{mininet_conn_list}
     \    MininetKeywords.Stop Mininet And Exit    ${mininet_conn}
 
+Disconnect Cluster Mininet
+    [Arguments]    ${action}=break    ${member_index_list}=${EMPTY}
+    [Documentation]    Break and restore controller to mininet connection via iptables.
+    ${index_list} =    ClusterManagement.List_Indices_Or_All    given_list=${member_index_list}
+    : FOR    ${index}    IN    @{index_list}
+    \    ${rule} =    BuiltIn.Set Variable    OUTPUT -p all --source ${ODL_SYSTEM_${index}_IP} --destination ${TOOLS_SYSTEM_IP} -j DROP
+    \    ${command} =    BuiltIn.Set Variable If    '${action}'=='restore'    sudo /sbin/iptables -D ${rule}    sudo /sbin/iptables -I ${rule}
+    \    Log To Console    ${ODL_SYSTEM_${index}_IP}
+    \    Utils.Run Command On Controller    ${ODL_SYSTEM_${index}_IP}    cmd=${command}
+    \    ${command} =    BuiltIn.Set Variable    sudo /sbin/iptables -L -n
+    \    ${output} =    Utils.Run Command On Controller    cmd=${command}
+    \    BuiltIn.Log    ${output}
+
 Verify Aggregate Flow From Mininet Session
     [Arguments]    ${mininet_conn}=${EMPTY}    ${flow_count}=0    ${time_out}=0s
     [Documentation]    Verify flow count per switch
index 46714354acad12ee8f1af0d9b7800de232d4a9b2..7cc60ec581b871d26901dfcad82438e8ffe1f25d 100644 (file)
@@ -8,6 +8,7 @@ Resource          ../../../libraries/ClusterOpenFlow.robot
 Resource          ../../../libraries/TemplatedRequests.robot
 Resource          ../../../libraries/MininetKeywords.robot
 Resource          ../../../libraries/Utils.robot
+Resource          ../../../libraries/OvsManager.robot
 Resource          ../../../variables/Variables.robot
 
 *** Variables ***
@@ -16,32 +17,29 @@ ${ITER}           100
 ${VAR_DIR}        ${CURDIR}/../../../variables/openflowplugin
 
 *** Test Cases ***
-Enable Stale Flow Entry
-    [Documentation]    Enable stale flow entry feature.
-    # Stale flows/groups feature is only available in Boron onwards.
-    CompareStream.Run Keyword If At Least Boron    TemplatedRequests.Put As Json Templated    folder=${VAR_DIR}/frm-config    mapping={"STALE":"true"}    session=session
-
 Add Groups And Flows
     [Documentation]    Add ${ITER} groups 1&2 and flows in every switch.
-    Add Groups And Flows    ${ITER}
+    Add Groups And Flows On Member    ${ITER}
 
 Start Mininet Multiple Connections
     [Documentation]    Start mininet linear with connection to all cluster instances.
-    ${mininet_conn_id}=    MininetKeywords.Start Mininet Multiple Controllers    ${TOOLS_SYSTEM_IP}    ${ClusterManagement__member_index_list}    --topo linear,${SWITCHES} --switch ovsk,protocols=OpenFlow13
+    ${cluster_index_list}=    ClusterManagement.List All Indices
+    ${mininet_conn_id}=    MininetKeywords.Start Mininet Multiple Controllers    ${TOOLS_SYSTEM_IP}    ${cluster_index_list}    --topo linear,${SWITCHES} --switch ovsk,protocols=OpenFlow13
+    BuiltIn.Set Suite Variable    ${cluster_index_list}
     BuiltIn.Set Suite Variable    ${mininet_conn_id}
     BuiltIn.Wait Until Keyword Succeeds    10s    1s    OVSDB.Check OVS OpenFlow Connections    ${TOOLS_SYSTEM_IP}    ${SWITCHES*3}
 
 Check Linear Topology
     [Documentation]    Check Linear Topology.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Linear Topology    ${SWITCHES}
+    BuiltIn.Wait Until Keyword Succeeds    30s    1s    ClusterOpenFlow.Check Linear Topology On Member    ${SWITCHES}
 
 Check Flows In Operational DS
-    [Documentation]    Check Groups after mininet starts.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Number Of Flows    ${all_flows}
+    [Documentation]    Check Flows after mininet starts.
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Number Of Flows On Member    ${all_flows}
 
 Check Groups In Operational DS
-    [Documentation]    Check Flows after mininet starts.
-    Check Number Of Groups    ${all_groups}
+    [Documentation]    Check Groups after mininet starts.
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Number Of Groups On Member    ${all_groups}
 
 Check Flows In Switch
     [Documentation]    Check Flows in switch after mininet starts.
@@ -51,32 +49,40 @@ Check Entity Owner Status And Find Owner and Successor Before Fail
     [Documentation]    Check Entity Owner Status and identify owner and successor for first switch s1.
     ${original_owner}    ${original_successor_list}    ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device    openflow:1    1
     BuiltIn.Set Suite Variable    ${original_owner}
+    BuiltIn.Set Suite Variable    ${new_cluster_list}    ${original_successor_list}
 
 Disconnect Mininet From Owner
     [Documentation]    Disconnect mininet from the owner
     ${owner_list}    BuiltIn.Create List    ${original_owner}
-    Disconnect Cluster Mininet    break    ${owner_list}
+    MininetKeywords.Disconnect Cluster Mininet    break    ${owner_list}
     BuiltIn.Set Suite Variable    ${owner_list}
 
 Check Entity Owner Status And Find Owner and Successor After Fail
     [Documentation]    Check Entity Owner Status and identify owner and successor for first switch s1.
-    ${new_owner}    ${new_successor_list}    ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device    openflow:1    1
+    ${new_owner}    ${new_successor_list}    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device    openflow:1
+    ...    1    ${new_cluster_list}    after_stop=True
+    BuiltIn.Set Suite Variable    ${new_owner}
+
+Check Switch Moves To New Master
+    [Documentation]    Check switch s1 is connected to new Master.
+    ${new_master}=    BuiltIn.Set Variable    ${ODL_SYSTEM_${new_owner}_IP}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    OvsManager.Should Be Master    s1    ${new_master}    update_data=${True}
 
 Check Linear Topology After Disconnect
     [Documentation]    Check Linear Topology After Disconnecting mininet from owner.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Linear Topology    ${SWITCHES}
+    BuiltIn.Wait Until Keyword Succeeds    30s    1s    ClusterOpenFlow.Check Linear Topology On Member    ${SWITCHES}
 
 Remove Flows And Groups After Mininet Is Disconnected
-    [Documentation]    Remove 1 group 1&2 and 1 flow in every switch after mininet is disconnected.
-    Remove Single Group And Flow
+    [Documentation]    Remove 1 group 1&2 and 1 flow in every switch.
+    Remove Single Group And Flow On Member
 
 Check Flows In Operational DS After Mininet Is Disconnected
     [Documentation]    Check Flows in Operational DS after mininet is disconnected.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Number Of Flows    ${less_flows}
+    BuiltIn.Wait Until Keyword Succeeds    30s    1s    ClusterOpenFlow.Check Number Of Flows On Member    ${less_flows}
 
 Check Groups In Operational DS After Mininet Is Disconnected
     [Documentation]    Check Groups in Operational DS after mininet is disconnected.
-    Check Number Of Groups    ${less_groups}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Number Of Groups On Member    ${less_groups}
 
 Check Flows In Switch After Mininet Is Disconnected
     [Documentation]    Check Flows in switch after mininet is disconnected
@@ -84,23 +90,28 @@ Check Flows In Switch After Mininet Is Disconnected
 
 Reconnect Mininet To Owner
     [Documentation]    Reconnect mininet to switch 1 owner.
-    Disconnect Cluster Mininet    restore    ${owner_list}
+    MininetKeywords.Disconnect Cluster Mininet    restore    ${owner_list}
+
+Check Entity Owner Status And Find Owner and Successor After Reconnect
+    [Documentation]    Check Entity Owner Status and identify owner and successor for first switch s1.
+    ${owner}    ${successor_list}    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device    openflow:1
+    ...    1
 
 Check Linear Topology After Reconnect
     [Documentation]    Check Linear Topology After Reconnect.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Linear Topology    ${SWITCHES}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Linear Topology On Member    ${SWITCHES}
 
 Add Flows And Groups After Reconnect
     [Documentation]    Add 1 group type 1&2 and 1 flow in every switch.
-    Add Single Group And Flow
+    Add Single Group And Flow On Member
 
 Check Flows After Reconnect In Operational DS
     [Documentation]    Check Flows in Operational DS after mininet is reconnected.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Number Of Flows    ${all_flows}
+    BuiltIn.Wait Until Keyword Succeeds    30s    1s    ClusterOpenFlow.Check Number Of Flows On Member    ${all_flows}
 
 Check Groups After Reconnect In Operational DS
     [Documentation]    Check Groups in Operational DS after mininet is reconnected.
-    Check Number Of Groups    ${all_groups}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Number Of Groups On Member    ${all_groups}
 
 Check Flows After Reconnect In Switch
     [Documentation]    Check Flows in switch after mininet is reconnected.
@@ -108,31 +119,42 @@ Check Flows After Reconnect In Switch
 
 Disconnect Mininet From Cluster
     [Documentation]    Disconnect Mininet from Cluster.
-    Disconnect Cluster Mininet
+    MininetKeywords.Disconnect Cluster Mininet
 
 Check No Switches After Disconnect
     [Documentation]    Check no switches in topology after disconnecting mininet from cluster.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check No Switches In Topology    ${SWITCHES}
+    BuiltIn.Wait Until Keyword Succeeds    30s    1s    ClusterOpenFlow.Check No Switches On Member    ${SWITCHES}
 
-Remove Flows And Groups While Mininet Is Disconnected
-    [Documentation]    Remove a group and flow while mininet Is Disconnected from cluster.
-    Remove Single Group And Flow
+Check Switch Is Not Connected
+    [Documentation]    Check switch s1 is not connected to any controller.
+    : FOR    ${index}    IN    @{cluster_index_list}
+    \    BuiltIn.Wait Until Keyword Succeeds    10s    1s    OvsManager.Should Be Disconnected    s1    ${ODL_SYSTEM_${index}_IP}
+    \    ...    update_data=${True}
 
 Reconnect Mininet To Cluster
     [Documentation]    Reconnect mininet to cluster by removing Iptables drop rules that were used to disconnect
-    Disconnect Cluster Mininet    restore
+    MininetKeywords.Disconnect Cluster Mininet    restore
+
+Check Entity Owner Status And Find Owner and Successor After Reconnect Cluster
+    [Documentation]    Check Entity Owner Status and identify owner and successor for first switch s1.
+    ${owner}    ${successor_list}    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device    openflow:1
+    ...    1
 
 Check Linear Topology After Mininet Reconnects
     [Documentation]    Check Linear Topology after reconnect.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Linear Topology    ${SWITCHES}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Linear Topology On Member    ${SWITCHES}
+
+Remove Flows And Groups After Mininet Reconnects
+    [Documentation]    Remove 1 group 1&2 and 1 flow in every switch.
+    Remove Single Group And Flow On Member
 
 Check Flows In Operational DS After Mininet Reconnects
     [Documentation]    Check Flows in Operational DS after mininet is reconnected.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Number Of Flows    ${less_flows}
+    BuiltIn.Wait Until Keyword Succeeds    30s    1s    ClusterOpenFlow.Check Number Of Flows On Member    ${less_flows}
 
 Check Groups In Operational DS After Mininet Reconnects
     [Documentation]    Check Groups in Operational DS after mininet is reconnected to cluster.
-    Check Number Of Groups    ${less_groups}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Number Of Groups On Member    ${less_groups}
 
 Check Flows In Switch After Mininet Reconnects
     [Documentation]    Check Flows in switch after mininet is reconnected to cluster.
@@ -166,19 +188,19 @@ Check Entity Owner Status And Find Owner and Successor After Stop
 
 Check Linear Topology After Owner Stop
     [Documentation]    Check Linear Topology.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Linear Topology    ${SWITCHES}    ${new_owner}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Linear Topology On Member    ${SWITCHES}    ${new_owner}
 
 Add Configuration In Owner and Verify After Fail
-    [Documentation]    Add Flow in Owner and verify it gets applied from all instances.
-    Add Single Group And Flow    ${new_owner}
+    [Documentation]    Add 1 group type 1&2 and 1 flow in every switch.
+    Add Single Group And Flow On Member    ${new_owner}
 
 Check Flows In Operational DS After Owner Is Stopped
     [Documentation]    Check Flows in Operational DS after Owner is Stopped.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Number Of Flows    ${all_flows}    ${new_owner}
+    BuiltIn.Wait Until Keyword Succeeds    30s    1s    ClusterOpenFlow.Check Number Of Flows On Member    ${all_flows}    ${new_owner}
 
 Check Groups In Operational DS After Owner Is Stopped
     [Documentation]    Check Groups in Operational DS after Owner is Stopped.
-    Check Number Of Groups    ${all_groups}    ${new_owner}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Number Of Groups On Member    ${all_groups}    ${new_owner}
 
 Check Flows In Switch After Owner Is Stopped
     [Documentation]    Check Flows in switch after Owner is Stopped
@@ -188,21 +210,26 @@ Start Old Owner Instance
     [Documentation]    Start old Owner Instance and verify it is up
     ClusterManagement.Start Single Member    ${original_owner}
 
+Check Entity Owner Status And Find Owner and Successor After Start Owner
+    [Documentation]    Check Entity Owner Status and identify owner and successor for first switch s1.
+    ${owner}    ${successor_list}    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device    openflow:1
+    ...    1
+
 Check Linear Topology After Owner Restart
     [Documentation]    Check Linear Topology.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Linear Topology    ${SWITCHES}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Linear Topology On Member    ${SWITCHES}
 
 Remove Configuration In Owner and Verify After Owner Restart
-    [Documentation]    Add Flow in Owner and verify it gets applied from all instances.
-    Remove Single Group And Flow    ${new_owner}
+    [Documentation]    Remove 1 group 1&2 and 1 flow in every switch.
+    Remove Single Group And Flow On Member    ${new_owner}
 
 Check Flows After Owner Restart In Operational DS
     [Documentation]    Check Flows in Operational DS after owner is restarted.
-    BuiltIn.Wait Until Keyword Succeeds    30s    1s    Check Number Of Flows    ${less_flows}
+    BuiltIn.Wait Until Keyword Succeeds    30s    1s    ClusterOpenFlow.Check Number Of Flows On Member    ${less_flows}
 
 Check Groups After Owner Restart In Operational DS
     [Documentation]    Check Groups in Operational DS after owner is restarted.
-    Check Number Of Groups    ${less_groups}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Number Of Groups On Member    ${less_groups}
 
 Check Flows In Switch After Owner Is Restarted
     [Documentation]    Check Flows in switch after Owner is restarted
@@ -217,19 +244,19 @@ Restart Cluster
 
 Check Linear Topology After Controller Restarts
     [Documentation]    Check Linear Topology after controller restarts.
-    BuiltIn.Wait Until Keyword Succeeds    300s    2s    Check Linear Topology    ${SWITCHES}
+    BuiltIn.Wait Until Keyword Succeeds    300s    2s    ClusterOpenFlow.Check Linear Topology On Member    ${SWITCHES}
 
 Add Flow And Group After Restart
     [Documentation]    Add 1 group type 1&2 and 1 flow in every switch.
-    Add Single Group And Flow
+    Add Single Group And Flow On Member
 
 Check Flows In Operational DS After Controller Restarts
     [Documentation]    Check Flows in Operational DS after controller is restarted.
-    BuiltIn.Wait Until Keyword Succeeds    300s    2s    Check Number Of Flows    ${all_flows}
+    BuiltIn.Wait Until Keyword Succeeds    30s    1s    ClusterOpenFlow.Check Number Of Flows On Member    ${all_flows}
 
 Check Groups In Operational DS After Controller Restarts
     [Documentation]    Check Groups in Operational DS after controller is restarted.
-    Check Number Of Groups    ${all_groups}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    ClusterOpenFlow.Check Number Of Groups On Member    ${all_groups}
 
 Check Flows In Switch After Controller Restarts
     [Documentation]    Check Flows in switch after controller is restarted..
@@ -241,7 +268,7 @@ Stop Mininet
 
 Check No Switches
     [Documentation]    Check no switches in topology.
-    BuiltIn.Wait Until Keyword Succeeds    5s    1s    Check No Switches In Topology    ${SWITCHES}
+    BuiltIn.Wait Until Keyword Succeeds    5s    1s    ClusterOpenFlow.Check No Switches On Member    ${SWITCHES}
 
 *** Keywords ***
 Initialization Phase
@@ -269,25 +296,11 @@ Initialization Phase
 Final Phase
     [Documentation]    Delete all sessions.
     ${command} =    BuiltIn.Set Variable    sudo iptables -v -F
-    Utils.Run Command On Controller    cmd=${command}
-    CompareStream.Run Keyword If At Least Boron    TemplatedRequests.Put As Json Templated    folder=${VAR_DIR}/frm-config    mapping={"STALE":"false"}    session=session
+    BuiltIn.Run Keyword And Ignore Error    ClusterManagement.Run_Bash_Command_On_List_Or_All    ${command}
     BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}
     RequestsLibrary.Delete All Sessions
 
-Disconnect Cluster Mininet
-    [Arguments]    ${action}=break    ${member_index_list}=${EMPTY}
-    [Documentation]    Break and restore controller to mininet connection via iptables.
-    ${index_list} =    ClusterManagement.List_Indices_Or_All    given_list=${member_index_list}
-    : FOR    ${index}    IN    @{index_list}
-    \    ${rule} =    BuiltIn.Set Variable    OUTPUT -p all --source ${ODL_SYSTEM_${index}_IP} --destination ${TOOLS_SYSTEM_IP} -j DROP
-    \    ${command} =    BuiltIn.Set Variable If    '${action}'=='restore'    sudo /sbin/iptables -D ${rule}    sudo /sbin/iptables -I ${rule}
-    \    Log To Console    ${ODL_SYSTEM_${index}_IP}
-    \    Utils.Run Command On Controller    ${ODL_SYSTEM_${index}_IP}    cmd=${command}
-    \    ${command} =    BuiltIn.Set Variable    sudo /sbin/iptables -L -n
-    \    ${output} =    Utils.Run Command On Controller    cmd=${command}
-    \    BuiltIn.Log    ${output}
-
-Add Groups And Flows
+Add Groups And Flows On Member
     [Arguments]    ${iter}=1    ${member_index}=1
     [Documentation]    Add ${ITER} groups type 1 & 2 and flows in every switch.
     ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
@@ -296,12 +309,12 @@ Add Groups And Flows
     \    TemplatedRequests.Post As Json Templated    folder=${VAR_DIR}/add-group-2    mapping={"SWITCH":"${switch}"}    session=${session}    iterations=${iter}
     \    TemplatedRequests.Post As Json Templated    folder=${VAR_DIR}/add-flow    mapping={"SWITCH":"${switch}"}    session=${session}    iterations=${iter}
 
-Add Single Group And Flow
+Add Single Group And Flow On Member
     [Arguments]    ${member_index}=1
     [Documentation]    Add 1 group 1&2 and 1 flow in every switch.
-    Add Groups And Flows    1    ${member_index}
+    Add Groups And Flows On Member    1    ${member_index}
 
-Remove Single Group And Flow
+Remove Single Group And Flow On Member
     [Arguments]    ${member_index}=1
     [Documentation]    Remove 1 group 1&2 and 1 flow in every switch.
     ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
@@ -309,62 +322,3 @@ Remove Single Group And Flow
     \    RequestsLibrary.Delete Request    ${session}    ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/1
     \    RequestsLibrary.Delete Request    ${session}    ${CONFIG_NODES_API}/node/openflow:${switch}/group/1
     \    RequestsLibrary.Delete Request    ${session}    ${CONFIG_NODES_API}/node/openflow:${switch}/group/1000
-
-Check Linear Topology
-    [Arguments]    ${switches}    ${member_index}=1
-    [Documentation]    Check Linear topology.
-    ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}    RequestsLibrary.Get Request    ${session}    ${OPERATIONAL_TOPO_API}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    : FOR    ${switch}    IN RANGE    1    ${switches+1}
-    \    Should Contain    ${resp.content}    "node-id":"openflow:${switch}"
-    \    Should Contain    ${resp.content}    "tp-id":"openflow:${switch}:1"
-    \    Should Contain    ${resp.content}    "tp-id":"openflow:${switch}:2"
-    \    Should Contain    ${resp.content}    "source-tp":"openflow:${switch}:2"
-    \    Should Contain    ${resp.content}    "dest-tp":"openflow:${switch}:2"
-    \    ${edge}    Evaluate    ${switch}==1 or ${switch}==${switches}
-    \    Run Keyword Unless    ${edge}    Should Contain    ${resp.content}    "tp-id":"openflow:${switch}:3"
-    \    Run Keyword Unless    ${edge}    Should Contain    ${resp.content}    "source-tp":"openflow:${switch}:3"
-    \    Run Keyword Unless    ${edge}    Should Contain    ${resp.content}    "dest-tp":"openflow:${switch}:3
-
-Check No Switches In Inventory
-    [Arguments]    ${switches}    ${member_index}=1
-    [Documentation]    Check no switch is in inventory
-    ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}    RequestsLibrary.Get Request    ${session}    ${OPERATIONAL_NODES_API}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    : FOR    ${switch}    IN RANGE    1    ${switches+1}
-    \    Should Not Contain    ${resp.content}    "openflow:${switch}"
-
-Check Number Of Flows
-    [Arguments]    ${flows}    ${member_index}=1
-    [Documentation]    Check number of flows in the inventory.
-    ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}=    RequestsLibrary.Get Request    ${session}    ${OPERATIONAL_NODES_API}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    ${count}=    Get Count    ${resp.content}    "priority"
-    Should Be Equal As Integers    ${count}    ${flows}
-
-Check Number Of Groups
-    [Arguments]    ${groups}    ${member_index}=1
-    [Documentation]    Check number of groups in the inventory.
-    ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}=    RequestsLibrary.Get Request    ${session}    ${OPERATIONAL_NODES_API}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    ${group_count}=    Get Count    ${resp.content}    "group-type"
-    ${count}=    CompareStream.Set_Variable_If_At Least_Boron    ${group_count}    ${group_count/2}
-    Should Be Equal As Integers    ${count}    ${groups}
-
-Check No Switches In Topology
-    [Arguments]    ${switches}    ${member_index}=1
-    [Documentation]    Check no switch is in topology
-    ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}    RequestsLibrary.Get Request    ${session}    ${OPERATIONAL_TOPO_API}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    : FOR    ${switch}    IN RANGE    1    ${switches+1}
-    \    Should Not Contain    ${resp.content}    openflow:${switch}
index bb2723bb658e7efe7bbf236dc13de4d4e029c09b..21fd17a1736783d39a972df3f0150723eba89b66 100644 (file)
@@ -16,11 +16,6 @@ ${ITER}           100
 ${VAR_DIR}        ${CURDIR}/../../../variables/openflowplugin
 
 *** Test Cases ***
-Enable Stale Flow Entry
-    [Documentation]    Enable stale flow entry feature.
-    # Stale flows/groups feature is only available in Boron onwards.
-    CompareStream.Run Keyword If At Least Boron    TemplatedRequests.Put As Json Templated    folder=${VAR_DIR}/frm-config    mapping={"STALE":"true"}    session=session
-
 Add Group 1 In Every Switch
     [Documentation]    Add ${ITER} groups of type 1 in every switch.
     : FOR    ${switch}    IN RANGE    1    ${switches+1}
@@ -64,13 +59,6 @@ Check No Switches After Disconnect
     [Documentation]    Check no switches in topology.
     BuiltIn.Wait Until Keyword Succeeds    30s    1s    FlowLib.Check No Switches In Topology    ${SWITCHES}
 
-Remove Flows And Groups While Mininet Is Disconnected
-    [Documentation]    Remove some groups and flows while network is down.
-    : FOR    ${switch}    IN RANGE    1    ${switches+1}
-    \    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/1
-    \    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}/node/openflow:${switch}/group/1
-    \    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}/node/openflow:${switch}/group/1000
-
 Reconnect Mininet
     [Documentation]    Connect Mininet.
     Disconnect Controller Mininet    restore
@@ -79,6 +67,13 @@ Check Linear Topology After Mininet Reconnects
     [Documentation]    Check Linear Topology.
     BuiltIn.Wait Until Keyword Succeeds    30s    1s    FlowLib.Check Linear Topology    ${SWITCHES}
 
+Remove Flows And Groups After Mininet Reconnects
+    [Documentation]    Remove some groups and flows while network is down.
+    : FOR    ${switch}    IN RANGE    1    ${switches+1}
+    \    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/1
+    \    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}/node/openflow:${switch}/group/1
+    \    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}/node/openflow:${switch}/group/1000
+
 Check Flows In Operational DS After Mininet Reconnects
     [Documentation]    Check Flows after mininet starts.
     BuiltIn.Wait Until Keyword Succeeds    30s    1s    FlowLib.Check Number Of Flows    ${less_flows}
@@ -150,7 +145,6 @@ Final Phase
     [Documentation]    Delete all sessions.
     ${command} =    BuiltIn.Set Variable    sudo iptables -v -F
     Utils.Run Command On Controller    cmd=${command}
-    CompareStream.Run Keyword If At Least Boron    TemplatedRequests.Put As Json Templated    folder=${VAR_DIR}/frm-config    mapping={"STALE":"false"}    session=session
     BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}
     RequestsLibrary.Delete All Sessions