Use RFC8040 URL for JSON-RPC tests
[integration/test.git] / csit / libraries / WorkflowsOpenFlow.robot
index 1413f2c2dc054333e099c77fb32dc227ffba7606..50ec659d444fbf3cd001dd7051bff6981401f0aa 100644 (file)
@@ -11,8 +11,10 @@ Resource          CompareStream.robot
 Resource          MininetKeywords.robot
 Resource          KarafKeywords.robot
 Resource          ../variables/Variables.robot
+Resource          ../variables/openflowplugin/Variables.robot
 
 *** Variables ***
+${log_level}      ERROR
 ${flow_count}     10000
 ${swspread}       linear
 ${tables}         10
@@ -30,8 +32,8 @@ Workflow Linear Topology
     ${controller_list}=    Create List    ${ODL_SYSTEM_IP}
     ${flow_count}=    Convert to Integer    ${flow_count}
     ${flows_ovs_25}=    Evaluate    ${flow_count} + ${switches}
-    ${flows_before}=    CompareStream.Set_Variable_If_At_Least_Boron    ${switches}    ${0}
-    ${flows_after}=    CompareStream.Set_Variable_If_At_Least_Boron    ${flows_ovs_25}    ${flow_count}
+    ${flows_before}=    Set Variable    ${switches}
+    ${flows_after}=    Set Variable    ${flows_ovs_25}
     ${flows}    ${notes}    ScaleClient.Generate New Flow Details    flows=${flow_count}    switches=${switches}    swspread=${swspread}    tables=${tables}
     ...    tabspread=${tabspread}
     # Workflow starts
@@ -45,10 +47,19 @@ Workflow Linear Topology
     Return From Keyword If    '${status}' == 'FAIL'    ${status}    Controller is dead    ${topology_discover_time}
     ${status}    ${result}    Run Keyword And Ignore Error    Utils.Verify Controller Has No Null Pointer Exceptions    ${ODL_SYSTEM_IP}
     Return From Keyword If    '${status}' == 'FAIL'    ${status}    Controller has NPE    ${topology_discover_time}
+    ${status}    ${result}    Run Keyword And Ignore Error    Utils.Verify Controller Has No Runtime Exceptions    ${ODL_SYSTEM_IP}
+    Return From Keyword If    '${status}' == 'FAIL'    ${status}    Controller has RuntimeException    ${topology_discover_time}
     Log To Console    Checking ${switches} switches
     ${status}    ${result}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    ${switches*2}    2s    FlowLib.Check Switches In Inventory
     ...    ${switches}
     Return From Keyword If    '${status}' == 'FAIL'    ${status}    Fail checking switch    ${topology_discover_time}
+    Log To Console    Add table miss flows
+    ${status}    ${result}    Run Keyword And Ignore Error    FlowLib.Add Table Miss Flows    ${switches}
+    Return From Keyword If    '${status}' == 'FAIL'    ${status}    Fail adding table Miss flows    ${topology_discover_time}
+    Log To Console    Checking Table Miss Flows
+    ${status}    ${result}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    ${switches}    2s    FlowLib.Check Table Miss Flows
+    ...    ${switches}
+    Return From Keyword If    '${status}' == 'FAIL'    ${status}    Fail checking table miss flows    ${topology_discover_time}
     Log To Console    Checking Linear Topology
     ${status}    ${result}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    ${switches}    2s    FlowLib.Check Linear Topology
     ...    ${switches}
@@ -82,7 +93,7 @@ Workflow Linear Topology
     ${status}    ${result}    Run Keyword And Ignore Error    MininetKeywords.Stop Mininet And Exit
     Return From Keyword If    '${status}' == 'FAIL'    ${status}    Fail stopping mininet    ${topology_discover_time}
     Log To Console    Checking No Switches
-    ${status}    ${result}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    10s    2s    FlowLib.Check No Switches In Inventory
+    ${status}    ${result}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    30s    2s    FlowLib.Check No Switches In Inventory
     ...    ${switches}
     Return From Keyword If    '${status}' == 'FAIL'    ${status}    Fail checking no switch    ${topology_discover_time}
     Log To Console    Checking No Topology
@@ -103,8 +114,8 @@ Workflow Full Mesh Topology
     ${controller_list}=    Create List    ${ODL_SYSTEM_IP}
     ${flow_count}=    Convert to Integer    ${flow_count}
     ${flows_ovs_25}=    Evaluate    ${flow_count} + ${switches}
-    ${flows_before}=    CompareStream.Set_Variable_If_At_Least_Boron    ${switches}    ${0}
-    ${flows_after}=    CompareStream.Set_Variable_If_At_Least_Boron    ${flows_ovs_25}    ${flow_count}
+    ${flows_before}=    Set Variable    ${switches}
+    ${flows_after}=    Set Variable    ${flows_ovs_25}
     ${flows}    ${notes}    ScaleClient.Generate New Flow Details    flows=${flow_count}    switches=${switches}    swspread=${swspread}    tables=${tables}
     ...    tabspread=${tabspread}
     # Workflow starts
@@ -118,8 +129,10 @@ Workflow Full Mesh Topology
     Return From Keyword If    '${status}' == 'FAIL'    ${status}    Controller is dead    ${topology_discover_time}
     ${status}    ${result}    Run Keyword And Ignore Error    Utils.Verify Controller Has No Null Pointer Exceptions    ${ODL_SYSTEM_IP}
     Return From Keyword If    '${status}' == 'FAIL'    ${status}    Controller has NPE    ${topology_discover_time}
+    ${status}    ${result}    Run Keyword And Ignore Error    Utils.Verify Controller Has No Runtime Exceptions    ${ODL_SYSTEM_IP}
+    Return From Keyword If    '${status}' == 'FAIL'    ${status}    Controller has RuntimeException    ${topology_discover_time}
     Log To Console    Checking ${switches} switches
-    ${status}    ${result}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    10s    2s    FlowLib.Check Switches In Inventory
+    ${status}    ${result}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    30s    2s    FlowLib.Check Switches In Inventory
     ...    ${switches}
     Return From Keyword If    '${status}' == 'FAIL'    ${status}    Fail checking switch    ${topology_discover_time}
     Log To Console    Check number of links in inventory is ${links}
@@ -166,10 +179,10 @@ Workflow Full Mesh Topology
 
 Workflow Setup
     RequestsLibrary.Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
-    Wait Until Keyword Succeeds    3x    1s    KarafKeywords.Issue Command On Karaf Console    log:set ERROR
+    Wait Until Keyword Succeeds    3x    1s    KarafKeywords.Issue Command On Karaf Console    log:set ${log_level}
 
 Workflow Teardown
     [Documentation]    Cleanup when workflow is interrupt
-    Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}
+    Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
     Utils.Clean Mininet System
     RequestsLibrary.Delete All Sessions