From: Luis Gomez Date: Tue, 23 May 2017 07:49:49 +0000 (-0700) Subject: Adjust OF scalability test X-Git-Tag: release/carbon~13 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=6707668e987bc62d563b133f421068baa424e8c5;p=integration%2Ftest.git Adjust OF scalability test Add table miss flows using REST instead of application. Change-Id: Ie945b78378a6399c3184211f1a6a5ebe52442e2e Signed-off-by: Luis Gomez --- diff --git a/csit/libraries/FlowLib.robot b/csit/libraries/FlowLib.robot index 73b91d04ba..37f09d9921 100644 --- a/csit/libraries/FlowLib.robot +++ b/csit/libraries/FlowLib.robot @@ -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 diff --git a/csit/libraries/WorkflowsOpenFlow.robot b/csit/libraries/WorkflowsOpenFlow.robot index 1413f2c2dc..a02926be5e 100644 --- a/csit/libraries/WorkflowsOpenFlow.robot +++ b/csit/libraries/WorkflowsOpenFlow.robot @@ -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 index 0000000000..a2a7984ee6 --- /dev/null +++ b/csit/variables/openflowplugin/table_miss_flow.json @@ -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 + } + } + ] + } + } + ] + } + } + ] +}