... controller)
Library ./FlowLib.py
Library XML
+Variables ../variables/Variables.py
*** Variables ***
${resp} RequestsLibrary.Post session restconf/operations/sal-flow:remove-flow data=${flow.xml} headers=${headers}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- ${resp}= RequestsLibrary.Get session ${REST_OPR}
+ ${resp}= RequestsLibrary.Get session ${OPERATIONAL_NODES_API}
Log ${resp.content}
Should Not Contain ${resp.content} "output-node-connector": "CONTROLLER",
${strings_to_check_for}= Create List CONTROLLER
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f1.xml
${FLOW} 124
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f2.xml
${FLOW} 125
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f3.xml
${FLOW} 126
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f5.xml
${FLOW} 128
${TABLE} 2
Library Collections
Library OperatingSystem
Library String
+Library RequestsLibrary
Library XML
Resource ../../../libraries/FlowLib.txt
-Library ../../../libraries/RequestsLibrary.py
Library ../../../libraries/Common.py
Variables ../../../variables/Variables.py
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${GENERIC_ACTION_FLOW_FILE} ${CURDIR}/../../../variables/xmls/genericActionFlow.xml
${ipv4_src} 10.1.2.0/24
${ipv4_dst} 40.4.0.0/16
${set_mpls_ttl_doc} OFPAT_SET_MPLS_TTL = 15, /* MPLS TTL */
${dec_mpls_ttl_doc} OFPAT_DEC_MPLS_TTL = 16, /* Decrement MPLS TTL */
-*** Test Cases *** ODL flow action action key action value tableID flowID verify OVS? OVS specific string?
+*** Test Cases *** ODL flow action action key action value tableID flowID priority verify OVS? OVS specific string?
Set_IP_TTL [Documentation] ${set_ip_ttl_doc}
[Tags] ttl set
- set-nw-ttl-action nw-ttl 1 2 101 no set_ttl
+ set-nw-ttl-action nw-ttl 1 2 101 10 no set_ttl
Dec_TTL [Documentation] ${dec_ttl_doc}
[Tags] ttl dec
- dec-nw-ttl none none 3 305 yes dec_ttl
+ dec-nw-ttl none none 3 305 311 yes dec_ttl
Copy_TTL_In [Documentation] ${copy_ttl_in_doc}
[Tags] ttl copyin
- copy-ttl-in none none 9 202 no copy_ttl_in
+ copy-ttl-in none none 9 202 9 no copy_ttl_in
Copy_TTL_Out [Documentation] ${copy_ttl_out_doc}
[Tags] ttl copyout
- copy-ttl-out none none 8 909 no copy_ttl_out
+ copy-ttl-out none none 8 909 4242 no copy_ttl_out
Set_MPLS_TTL [Documentation] ${set_mpls_ttl_doc}
[Tags] ttl setmpls
- set-mpls-ttl-action mpls-ttl 1 4 505 yes set_mpls_ttl
+ set-mpls-ttl-action mpls-ttl 1 4 505 9021 yes set_mpls_ttl
Dec_MPLS_TTL [Documentation] ${dec_mpls_ttl_doc}
[Tags] ttl decmpls
- dec-mpls-ttl none none 2 1001 yes dec_mpls_ttl
+ dec-mpls-ttl none none 2 1001 81 yes dec_mpls_ttl
*** Keywords ***
Create And Remove Flow
- [Arguments] ${flow_action} ${action_key} ${action_value} ${table_id} ${flow_id} ${verify_switch_flag}
- ... ${additional_ovs_flowelements}
+ [Arguments] ${flow_action} ${action_key} ${action_value} ${table_id} ${flow_id} ${priority}
+ ... ${verify_switch_flag} ${additional_ovs_flowelements}
@{OVS_FLOWELEMENTS} Create List dl_dst=${eth_dst} table=${table_id} dl_src=${eth_src} nw_src=${ipv4_src} nw_dst=${ipv4_dst}
... ${additional_ovs_flowelements}
##The dictionaries here will be used to populate the match and action elements of the flow mod
${flow}= Create Inventory Flow
Set "${flow}" "table_id" With "${table_id}"
Set "${flow}" "id" With "${flow_id}"
+ Set "${flow}" "priority" With "${priority}"
Clear Flow Actions ${flow}
Set Flow Action ${flow} 0 0 ${flow_action}
Set Flow Ethernet Match ${flow} ${ethernet_match_dict}
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f7.xml
${FLOW} 130
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f8.xml
${FLOW} 131
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f9.xml
${FLOW} 132
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f10.xml
${FLOW} 133
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f11.xml
${FLOW} 134
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f12.xml
${FLOW} 135
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f13.xml
${FLOW} 136
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f14.xml
${FLOW} 137
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f15.xml
${FLOW} 138
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f16.xml
${FLOW} 139
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f17.xml
${FLOW} 140
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f18.xml
${FLOW} 141
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f19.xml
${FLOW} 142
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f20.xml
${FLOW} 143
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f21.xml
${FLOW} 144
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f22.xml
${FLOW} 145
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f23.xml
${FLOW} 146
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f24.xml
${FLOW} 147
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${FILE} ${CURDIR}/../../../variables/xmls/f25.xml
${FLOW} 148
${TABLE} 2
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${BODY2} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>0</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>openflow:1:1</output-node-connector></output-action></action></apply-actions></instruction></instructions></flow>
*** Test Cases ***
Verify after adding flow operational - Output to physical port#
[Documentation] Verify the flow
${elements}= Create List 10.0.20.1
- Wait Until Keyword Succeeds 60s 2s Check For Elements At URI ${REST_OPR}/node/openflow:1/table/0 ${elements}
+ Wait Until Keyword Succeeds 60s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/table/0 ${elements}
Remove a flow - Output to physical port#
[Documentation] Remove a flow
Verify after deleting flow operational - Output to physical port#
[Documentation] Verify the flow
${elements}= Create List 10.0.20.1
- Wait Until Keyword Succeeds 60s 2s Check For Elements Not At URI ${REST_OPR}/node/openflow:1/table/0 ${elements}
+ Wait Until Keyword Succeeds 60s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API}/node/openflow:1/table/0 ${elements}
*** Variables ***
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${BODY1} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.10.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><dec-nw-ttl/></action></apply-actions></instruction></instructions></flow>
${BODY2} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>1</output-node-connector><max-length>60</max-length></output-action></action></apply-actions></instruction></instructions></flow>
Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
[Documentation] Verify the flow
${elements}= Create List 10.0.10.1
- Wait Until Keyword Succeeds 60s 2s Check For Elements At URI ${REST_OPR}/node/openflow:1/table/2 ${elements}
+ Wait Until Keyword Succeeds 60s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/table/2 ${elements}
Modify a flow - Output to physical port#
[Documentation] Push a flow through REST-API
Verify after modifying flow operational - Output to physical port#
[Documentation] Verify the flow
${elements}= Create List 10.0.20.1
- Wait Until Keyword Succeeds 90s 2s Check For Elements At URI ${REST_OPR}/node/openflow:1/table/2/flow/139 ${elements}
+ Wait Until Keyword Succeeds 90s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/table/2/flow/139 ${elements}
Remove a flow - Output to physical port#
[Documentation] Remove a flow
Verify after deleting flow operational - Output to physical port#
[Documentation] Verify the flow
${elements}= Create List 10.0.20.1
- Wait Until Keyword Succeeds 60s 2s Check For Elements Not At URI ${REST_OPR}/node/openflow:1/table/2 ${elements}
+ Wait Until Keyword Succeeds 60s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API}/node/openflow:1/table/2 ${elements}
${SWITCH_IP} ${MININET}
${CONTROLLER} null
${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
${ipv4_src} 11.3.0.0/16
${ipv4_dst} 99.0.0.0/8
${eth_type} 0x800