${DUMPFLOWS_OF13} dpctl dump-flows -O OpenFlow13
${index} 7
@{FLOWELMENTS} nw_src=10.0.0.1 nw_dst=10.0.0.3 actions=drop
-@{BRIDGE1_DATAFLOW} "reason":"PORTMAPPED" "path":{"tenant":"Tenant1","bridge":"vBridge1","interface":"if2"}
-@{BRIDGE2_DATAFLOW} "reason":"PORTMAPPED" "path":{"tenant":"Tenant1","bridge":"vBridge2","interface":"if3"}
-${vlanmap_bridge1} {"vlan": "200"}
-${vlanmap_bridge2} {"vlan": "300"}
-@{VLANMAP_BRIDGE1_DATAFLOW} "reason":"VLANMAPPED" "path":{"tenant":"Tenant1","bridge":"vBridge1_vlan"}
-@{VLANMAP_BRIDGE2_DATAFLOW} "reason":"VLANMAPPED" "path":{"tenant":"Tenant1","bridge":"vBridge2_vlan"}
-${in_port} 1
+@{BRIDGE1_DATAFLOW} "reason":"PORTMAPPED" "virtual-node-path":{"bridge-name":"vBridge1","tenant-name":"Tenant1","interface-name":"if2"}
+@{BRIDGE2_DATAFLOW} "reason":"PORTMAPPED" "virtual-node-path":{"bridge-name":"vBridge2","tenant-name":"Tenant1","interface-name":"if3"}
+${vlanmap_bridge1} 200
+${vlanmap_bridge2} 300
+@{VLANMAP_BRIDGE1_DATAFLOW} "reason":"VLANMAPPED" "virtual-node-path":{"bridge-name":"vBridge1_vlan","tenant-name":"Tenant1","vlan-map-id":"ANY.200"}
+@{VLANMAP_BRIDGE2_DATAFLOW} "reason":"VLANMAPPED" "virtual-node-path":{"bridge-name":"vBridge2_vlan","tenant-name":"Tenant1","vlan-map-id":"ANY.300"}
${out_before_pathpolicy} output:2
${out_after_pathpolicy} output:3
-${flowcond_restconfigdata} {"input":{"operation":"SET","present":"false","name":"cond_1","vtn-flow-match":[{"vtn-ether-match":{"destination-address":"ba:bd:0f:e3:a8:c8","ether-type":"2048","source-address":"ca:9e:58:0c:1e:f0","vlan-id": "1"},"vtn-inet-match":{"source-network":"10.0.0.1/32","protocol":1,"destination-network":"10.0.0.2/32"},"index":"1"}]}}
+${pathpolicy_topo_13} sudo mn --controller=remote,ip=${CONTROLLER} --custom topo-3sw-2host_multipath.py --topo pathpolicytopo --switch ovsk,protocols=OpenFlow13
+${pathpolicy_topo_10} sudo mn --controller=remote,ip=${CONTROLLER} --custom topo-3sw-2host_multipath.py --topo pathpolicytopo --switch ovsk,protocols=OpenFlow10
+@{PATHMAP_ATTR} "index":"1" "condition":"flowcond_path" "policy":"1"
+${policy_id} 1
+${in_port} 1
+@{PATHPOLICY_ATTR} "id":1 "port-desc":"openflow:4,2,s4-eth2"
+${custom} ${CURDIR}/${CREATE_PATHPOLICY_TOPOLOGY_FILE_PATH}
*** Keywords ***
-
Start SuiteVtnMa
[Documentation] Start VTN Manager Rest Config Api Test Suite
Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
Add a Vtn
[Arguments] ${vtn_name}
[Documentation] Create a vtn with specified parameters.
- ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn:update-vtn data={"input": {"tenant-name":${vtn_name}, "update-mode": "CREATE","operation": "SET", "description": "creating vtn", "idle-timeout":300, "hard-timeout":0}}
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn:update-vtn data={"input": {"tenant-name":${vtn_name}, "update-mode": "CREATE","operation": "SET", "description": "creating vtn", "idle-timeout":300, "hard-timeout":0}}
Should Be Equal As Strings ${resp.status_code} 200
Add a vBridge
Add a interface
[Arguments] ${vtn_name} ${vbr_name} ${interface_name}
[Documentation] Create a interface into a vBridge of a VTN
- ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-vinterface:update-vinterface data={"input": {"update-mode":"CREATE","operation":"SET", "tenant-name":${vtn_name}, "bridge-name":${vbr_name}, "description": "vbrdige interfacecreated", "enabled":"true", "interface-name": ${interface_name}}}
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-vinterface:update-vinterface data={"input": {"update-mode":"CREATE","operation":"SET", "tenant-name":${vtn_name}, "bridge-name":${vbr_name}, "description": "vbrdige interfacecreated", "enabled":"true", "interface-name": ${interface_name}}}
Should Be Equal As Strings ${resp.status_code} 200
Add a portmap
- [Arguments] ${vtn_name} ${vbr_name} ${interface_name} ${node_id} ${port_id}
+ [Arguments] ${vtn_name} ${vbr_name} ${interface_name} ${node_id} ${port_id}
[Documentation] Create a portmap for a interface of a vbridge
- ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-port-map:set-port-map data={"input": { "tenant-name":${vtn_name}, "bridge-name":${vbr_name}, "interface-name": ${interface_name}, "node":"${node_id}", "port-name":"${port_id}"}}
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-port-map:set-port-map data={"input": { "tenant-name":${vtn_name}, "bridge-name":${vbr_name}, "interface-name": ${interface_name}, "node":"${node_id}", "port-name":"${port_id}"}}
Should Be Equal As Strings ${resp.status_code} 200
Delete a Vtn
Add a vlanmap
[Arguments] ${vtn_name} ${vbr_name} ${vlan_id}
[Documentation] Create a vlanmap
- ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-vlan-map:add-vlan-map data={"input": {"tenant-name":${vtn_name},"bridge-name":${vbr_name},"vlan-id":${vlan_id}}}
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-vlan-map:add-vlan-map data={"input": {"tenant-name":${vtn_name},"bridge-name":${vbr_name},"vlan-id":${vlan_id}}}
Should Be Equal As Strings ${resp.status_code} 200
Verify Data Flows
... ELSE IF '${vBridge_name}' == 'vBridge1_vlan' DataFlowsForBridge ${resp} @{VLANMAP_BRIDGE1_DATAFLOW}
... ELSE DataFlowsForBridge ${resp} @{VLANMAP_BRIDGE2_DATAFLOW}
+Start PathSuiteVtnMaTest
+ [Documentation] Start VTN Manager Test Suite and Mininet
+ Start SuiteVtnMaTest
+ Start Mininet ${MININET} ${pathpolicy_topo_13} ${custom}
+
+Start PathSuiteVtnMaTestOF10
+ [Documentation] Start VTN Manager Test Suite and Mininet in Open Flow 10 Specification
+ Start SuiteVtnMaTest
+ Start Mininet ${MININET} ${pathpolicy_topo_10} ${custom}
+
+Stop PathSuiteVtnMaTest
+ [Documentation] Cleanup/Shutdown work at the completion of all tests.
+ Delete All Sessions
+ Stop Mininet ${mininet_conn_id}
+
DataFlowsForBridge
[Arguments] ${resp} @{BRIDGE_DATAFLOW}
[Documentation] Verify whether the required attributes exists.
: FOR ${pathpolicyElement} IN @{PATHPOLICY_ATTR}
\ should Contain ${resp.content} ${pathpolicyElement}
+Delete a pathmap
+ [Arguments] ${tenant_path}
+ [Documentation] Remove a pathmap for a vtn
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-path-map:remove-path-map data={"input":{"tenant-name":"${tenant_path}","map-index":["${policy_id}"]}}
+ Should Be Equal As Strings ${resp.status_code} 200
+
Delete a pathpolicy
- [Arguments] ${path_id}
+ [Arguments] ${policy_id}
[Documentation] Delete a pathpolicy for a vtn
- ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-path-policy:remove-path-policy data={"input": {"id": "${path_id}"}}
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-path-policy:remove-path-policy data={"input":{"id":"${policy_id}"}}
Should Be Equal As Strings ${resp.status_code} 200
Verify flowEntryPathPolicy
Add a macmap
[Arguments] ${vtn_name} ${vBridge_name} ${macmap_data}
[Documentation] Create a macmap for a vbridge
- ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-mac-map:set-mac-map data={"input": { "allowed-hosts": ["${macmap_data}"], "tenant-name":${vtn_name}, "bridge-name": ${vBridge_name}}} }
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-mac-map:set-mac-map data={"input": { "allowed-hosts": ["${macmap_data}"], "tenant-name":${vtn_name}, "bridge-name": ${vBridge_name}}} }
Should Be Equal As Strings ${resp.status_code} 200
Get DynamicMacAddress
Add a vtn flowfilter
[Arguments] ${vtn_name} ${vtnflowfilter_data}
[Documentation] Create a flowfilter for a vtn
- ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-flow-filter:set-flow-filter data=${vtnflowfilter_data}
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-flow-filter:set-flow-filter data={"input": {"tenant-name": "${vtn_name}",${vtnflowfilter_data}}}
Should Be Equal As Strings ${resp.status_code} 200
Add a vbr flowfilter
[Arguments] ${vtn_name} ${vBridge_name} ${vbrflowfilter_data}
[Documentation] Create a flowfilter for a vbr
- ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-flow-filter:set-flow-filter data=${vbrflowfilter_data}
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-flow-filter:set-flow-filter data={"input": {"tenant-name": "${vtn_name}", "bridge-name": "${vBridge_name}", ${vbrflowfilter_data}}}
Should Be Equal As Strings ${resp.status_code} 200
Add a vbrif flowfilter
[Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${vbrif_flowfilter_data}
[Documentation] Create a flowfilter for a vbrif
- ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-flow-filter:set-flow-filter data=${vbrif_flowfilter_data}
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-flow-filter:set-flow-filter data={"input": {"tenant-name": ${vtn_name}, "bridge-name": "${vBridge_name}","interface-name":"${interface_name}",${vbrif_flowfilter_data}}}
Should Be Equal As Strings ${resp.status_code} 200
Verify Flow Entry for Inet Flowfilter
Get flowcondition
[Arguments] ${flowcond_name} ${retrieve}
- [Documentation] Retrieve the flowcondition by name and to check the removed flowcondition added "retrieve" argument to differentiate the status code, since
- ... after removing flowcondition name the status will be different compare to status code when the flowcondition name is present.
+ [Documentation] Retrieve the flowcondition by name and to check the removed flowcondition we added "retrieve" argument to differentiate the status code,
+ ... since after removing flowcondition name the status will be different compare to status code when the flowcondition name is present.
${resp}= RequestsLibrary.Get Request session restconf/operational/vtn-flow-condition:vtn-flow-conditions/vtn-flow-condition/${flowcond_name}
Run Keyword If '${retrieve}' == 'retrieve' Should Be Equal As Strings ${resp.status_code} 200
... ELSE Should Not Be Equal As Strings ${resp.status_code} 200
Remove flowcondition
[Arguments] ${flowcond_name}
[Documentation] Remove the flowcondition by name
- ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-flow-condition:remove-flow-condition {"input": {"name": "${flowcond_name}"}}
+ ${resp}= RequestsLibrary.Post Request session restconf/operations/vtn-flow-condition:remove-flow-condition data={"input":{"name":"${flowcond_name}"}}
Should Be Equal As Strings ${resp.status_code} 200