Adjust OF scalability test 60/57660/2
authorLuis Gomez <ecelgp@gmail.com>
Tue, 23 May 2017 07:49:49 +0000 (00:49 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Tue, 23 May 2017 07:52:59 +0000 (00:52 -0700)
Add table miss flows using REST instead of application.

Change-Id: Ie945b78378a6399c3184211f1a6a5ebe52442e2e
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
csit/libraries/FlowLib.robot
csit/libraries/WorkflowsOpenFlow.robot
csit/variables/openflowplugin/table_miss_flow.json [new file with mode: 0644]

index 73b91d04ba7552c8d337e854adc78395092d7428..37f09d9921b6da3d700a08d7922b28ee9aa1ac3c 100644 (file)
@@ -123,6 +123,21 @@ Check No Hosts
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Not Contain    ${resp.content}    "node-id":"host:
 
+Add Table Miss Flows
+    [Arguments]    ${switches}
+    [Documentation]    Add table miss flows to switches.
+    ${switches}=    Convert To Integer    ${switches}
+    ${data}=    OperatingSystem.Get File    ${CURDIR}/../variables/openflowplugin/table_miss_flow.json
+    : FOR    ${switch}    IN RANGE    1    ${switches+1}
+    \    TemplatedRequests.Put As Json To Uri    ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/default    ${data}    session
+
+Check Table Miss Flows
+    [Arguments]    ${switches}
+    [Documentation]    Check table miss flows in switches.
+    ${switches}=    Convert To Integer    ${switches}
+    : FOR    ${switch}    IN RANGE    1    ${switches+1}
+    \    TemplatedRequests.Get As Json From Uri    ${OPERATIONAL_NODES_API}/node/openflow:${switch}/table/0/flow/default    session
+
 Create Inventory Flow
     [Documentation]    Calls FlowLib.Make_Inventory_Flow function and initializes and sanitizes
     ...    the basic flow elements that can be given to flow:inventory
index 1413f2c2dc054333e099c77fb32dc227ffba7606..a02926be5e1b99bc4ddfc3069b3b77a78e67bfc6 100644 (file)
@@ -49,6 +49,13 @@ Workflow Linear Topology
     ${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}
diff --git a/csit/variables/openflowplugin/table_miss_flow.json b/csit/variables/openflowplugin/table_miss_flow.json
new file mode 100644 (file)
index 0000000..a2a7984
--- /dev/null
@@ -0,0 +1,30 @@
+{
+    "flow-node-inventory:flow": [
+        {
+            "id": "default",
+            "flags": "",
+            "priority": 1,
+            "flow-name": "Table miss flow",
+            "table_id": 0,
+            "hard-timeout": 0,
+            "instructions": {
+                "instruction": [
+                    {
+                        "order": 0,
+                        "apply-actions": {
+                            "action": [
+                                {
+                                    "order": 0,
+                                    "output-action": {
+                                        "output-node-connector": "CONTROLLER",
+                                        "max-length": 65535
+                                    }
+                                }
+                            ]
+                        }
+                    }
+                ]
+            }
+        }
+    ]
+}