${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>152</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>
+${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 ***
-Add a flow - Sending IPv4 Dest Address and Eth type
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/2/flow/139 data=${BODY1}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 139
-
-Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 20
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 10.0.10.1
-
-Remove a flow - - Sending IPv4 Dest Address and Eth type
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/2/flow/139
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 139
-
-# Reason in using high time is, I used STOPWATCH to check the timer after deleting the flow config
-Verify after deleting flow operational - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 42
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 10.0.10.1
Add a flow - Output to physical port#
[Documentation] Push a flow through REST-API
[Tags] Push
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/2/flow/152 data=${BODY2}
+ ${resp} Putxml session ${REST_CON}/node/openflow:1/table/0/flow/152 data=${BODY2}
Should Be Equal As Strings ${resp.status_code} 200
Verify after adding flow config - Output to physical port#
[Documentation] Verify the flow
[Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
+ ${resp} Get session ${REST_CON}/node/openflow:1/table/0
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} 152
Verify after adding flow operational - Output to physical port#
[Documentation] Verify the flow
[Tags] Get
- Sleep 20
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
+ Sleep 40
+ ${resp} Get session ${REST_OPR}/node/openflow:1/table/0
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} 10.0.20.1
Remove a flow - Output to physical port#
[Documentation] Remove a flow
[Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/2/flow/152
+ ${resp} Delete session ${REST_CON}/node/openflow:1/table/0/flow/152
Should Be Equal As Strings ${resp.status_code} 200
Verify after deleting flow config - Output to physical port#
[Documentation] Verify the flow
[Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} Get session ${REST_CON}/node/openflow:1/table/0
+ Should Be Equal As Strings ${resp.status_code} 200
Should Not Contain ${resp.content} 152
+# Standing bug #368 - This has been fixed
Verify after deleting flow operational - Output to physical port#
[Documentation] Verify the flow
[Tags] Get
- Sleep 45
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
+ Sleep 60
+ ${resp} Get session ${REST_OPR}/node/openflow:1/table/0
Should Be Equal As Strings ${resp.status_code} 200
Should Not Contain ${resp.content} 10.0.20.1
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Contain Value ${content} ${body}
- Sleep 20
Check flow in flow stats
- [Documentation] Show flow stats and validate result
+ [Documentation] Show flow stats and validate result
[Tags] get
+ Sleep 40
${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Not Contain Value ${content} ${body}
- Sleep 30
Check flow is not in flow stats
[Documentation] Show flow stats and validate result
[Tags] get
+ Sleep 40
${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
Check flow in flow stats
[Documentation] Show flow stats and validate result
[Tags] get
- Sleep 20
+ Sleep 40
${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
Check flow is not in flow stats
[Documentation] Show flow stats and validate result
[Tags] get
- Sleep 30
+ Sleep 40
${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
*** Settings ***
Documentation Restat Mininet with OF10 simulation
-Documentation Test suite for the OpenDaylight base edition with of10
+Documentation Test suite for the OpenDaylight base edition with of13
Library SSHLibrary
*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2
+${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13
*** Test Cases ***
Stop Mininet
${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>
+${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>152</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>
*** Test Cases ***
+Add a flow - Sending IPv4 Dest Address and Eth type
+ [Documentation] Push a flow through REST-API
+ [Tags] Push
+ ${resp} Putxml session ${REST_CON}/node/openflow:1/table/2/flow/139 data=${BODY1}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Verify after adding flow config - Sending IPv4 Dest Address and Eth type
+ [Documentation] Verify the flow
+ [Tags] Get
+ ${resp} Get session ${REST_CON}/node/openflow:1/table/2
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} 139
+
+Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
+ [Documentation] Verify the flow
+ [Tags] Get
+ Sleep 40
+ ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} 10.0.10.1
+
+Remove a flow - - Sending IPv4 Dest Address and Eth type
+ [Documentation] Remove a flow
+ [Tags] remove
+ ${resp} Delete session ${REST_CON}/node/openflow:1/table/2/flow/139
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Verify after deleting flow config - Sending IPv4 Dest Address and Eth type
+ [Documentation] Verify the flow
+ [Tags] Get
+ ${resp} Get session ${REST_CON}/node/openflow:1/table/2
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Not Contain ${resp.content} 139
+
+# Reason in using high time is, I used STOPWATCH to check the timer after deleting the flow config
+Verify after deleting flow operational - Sending IPv4 Dest Address and Eth type
+ [Documentation] Verify the flow
+ [Tags] Get
+ Sleep 60
+ ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Not Contain ${resp.content} 10.0.10.1
Add a flow - Output to physical port#
[Documentation] Push a flow through REST-API
[Tags] Push
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/0/flow/152 data=${BODY2}
+ ${resp} Putxml session ${REST_CON}/node/openflow:1/table/2/flow/152 data=${BODY2}
Should Be Equal As Strings ${resp.status_code} 200
Verify after adding flow config - Output to physical port#
[Documentation] Verify the flow
[Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/0
+ ${resp} Get session ${REST_CON}/node/openflow:1/table/2
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} 152
Verify after adding flow operational - Output to physical port#
[Documentation] Verify the flow
[Tags] Get
- Sleep 20
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/0
+ Sleep 40
+ ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} 10.0.20.1
Remove a flow - Output to physical port#
[Documentation] Remove a flow
[Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/0/flow/152
+ ${resp} Delete session ${REST_CON}/node/openflow:1/table/2/flow/152
Should Be Equal As Strings ${resp.status_code} 200
Verify after deleting flow config - Output to physical port#
[Documentation] Verify the flow
[Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/0
- Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} Get session ${REST_CON}/node/openflow:1/table/2
+ Should Be Equal As Strings ${resp.status_code} 200
Should Not Contain ${resp.content} 152
-# Standing bug #368 - This has been fixed
Verify after deleting flow operational - Output to physical port#
[Documentation] Verify the flow
[Tags] Get
- Sleep 40
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/0
+ Sleep 60
+ ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
Should Be Equal As Strings ${resp.status_code} 200
Should Not Contain ${resp.content} 10.0.20.1
Check flow in flow stats
[Documentation] Show flow stats and validate result
[Tags] get
- Sleep 20
+ Sleep 40
${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
Check flow is not in flow stats
[Documentation] Show flow stats and validate result
[Tags] get
- Sleep 30
+ Sleep 40
${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Contain Value ${content} ${body}
Check flow in flow stats
- [Documentation] Show flow stats and validate result
+ [Documentation] Show flow stats and validate result
[Tags] get
- Sleep 20
+ Sleep 40
${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
Check flow is not in flow stats
[Documentation] Show flow stats and validate result
[Tags] get
- Sleep 30
+ Sleep 40
${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Contain Value ${content} ${body}
Sleep 20
-# This works locally but fails at OpenDaylight
+# This works locally but NOT in OpenDaylight
#Check flow in flow stats
# [Documentation] Show flow stats and validate result
# [Tags] get
# ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
# Should Be Equal As Strings ${resp.status_code} 200
# Log ${resp.content}
-# Should Contain X Times ${resp.content} 10.0.0.2 3
+# Should Contain X Times ${resp.content} 10.0.0.2 3
Remove a static route
[Documentation] Remove a static route, list to validate the result.
[Tags] remove
${content} Get From List ${subnet} 0
Dictionary Should Contain Value ${content} 0.0.0.0/0
Ping h1 to h4
- [Documentation] Ping h1 to h4, verify no packet loss
+ [Documentation] Ping h1 to h4, verify no packet loss
[Tags] Get
Write h1 ping -w 6 h4
Sleep 6
Write h4 ping -w 6 h1
Sleep 6
- ${result} Read
+ ${result} Read
Should Contain ${result} 64 bytes
List hosts
[Documentation] List hosts and verify h1 and h4
*** Settings ***
-Documentation Test suite for the OpenDaylight base edition with of13
+Documentation Test suite for the OpenDaylight base edition with of10
Suite Setup Start Suite
Suite Teardown Stop Suite
Library SSHLibrary
*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13
+${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2
** Keywords ***
Start Suite