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
${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}
--- /dev/null
+{
+ "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
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+}