Should Contain ${resp.content} openflow:2
Should Contain ${resp.content} openflow:3
-Get nodeconnector for a node
+Get nodeconnector for a node 1
[Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:2
+ ${resp} Get session ${REST_CONTEXT}/node/openflow:1
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} openflow:1:1
+ Should Contain ${resp.content} openflow:1:2
+
+Get nodeconnector for a node 2
+ [Documentation] Get the inventory for a node
+ ${resp} Get session ${REST_CONTEXT}/node/openflow:2
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} openflow:2:1
+ Should Contain ${resp.content} openflow:2:2
+ Should Contain ${resp.content} openflow:2:3
+
+Get nodeconnector for a node 3
+ [Documentation] Get the inventory for a node
+ ${resp} Get session ${REST_CONTEXT}/node/openflow:3
Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:2:1
- Should Contain ${resp.content} openflow:2:2
- Should Contain ${resp.content} openflow:2:3
+ Should Contain ${resp.content} openflow:3:1
+ Should Contain ${resp.content} openflow:3:2
+ Should Contain ${resp.content} openflow:3:3
Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
[Documentation] Verify the flow
[Tags] Get
- Sleep 5
+ Sleep 10
${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
Should Be Equal As Strings ${resp.status_code} 404
Should Not Contain ${resp.content} 139
+# This only works the first time
#Verify after deleting flow operational - Sending IPv4 Dest Address and Eth type
# [Documentation] Verify the flow
# [Tags] Get
+# Sleep 3
# ${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
Verify after adding flow operational - Output to physical port#
[Documentation] Verify the flow
[Tags] Get
- Sleep 5
+ Sleep 10
${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
Should Be Equal As Strings ${resp.status_code} 404
Should Not Contain ${resp.content} 152
-#Verify after deleting flow operational - Output to physical port#
-# [Documentation] Verify the flow
-# [Tags] Get
-# ${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
+Verify after deleting flow operational - Output to physical port#
+ [Documentation] Verify the flow
+ [Tags] Get
+ Sleep 3
+ ${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
[Documentation] Add a property to node
Add property to node MD_SAL openflow:2 description Switch2
Node property should exist MD_SAL openflow:2 description Switch2
+# Standing bug #335
#Remove property from node
# [Documentation] Remove a property from node
# Remove property from node MD_SAL openflow:2 description
${content} Get From Dictionary ${result} ${key}
List Should Contain Value ${content} ${body}
Sleep 20
+# This works locally but NOT in OpenDaylight
#Check flow in flow stats
# [Documentation] Show flow stats and validate result
# [Tags] get
${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
... data={"type":"patch", "CUSTOM":{"peer":"s4-eth2"}}
Should Be Equal As Strings ${resp.status_code} 201
-#Ping h1 to h4
-# [Documentation] Ping h1 to h4, verify no packet loss
-# [Tags] Get
-# Sleep 5
-# Write h1 ping -c 30 h4
-# Sleep 40
-# ${result} Read
-# Should Contain ${result} 64 bytes
+Ping h1 to h4
+ [Documentation] Ping h1 to h4, verify no packet loss
+ [Tags] Get
+ Sleep 5
+ Write h1 ping -c 30 h4
+ Sleep 40
+ ${result} Read
+ Should Contain ${result} 64 bytes
Delete s4 ports
[Documentation] Delete s4 connected ports
[Tags] delete
Log Stop Mininet
Read
Write exit
- Sleep 40
+ Sleep 60
Read
Start Mininet
Log Start Mininet
Should Contain ${resp.content} openflow:2
Should Contain ${resp.content} openflow:3
-Get nodeconnector for a node
+Get nodeconnector for a node 1
[Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:2
+ ${resp} Get session ${REST_CONTEXT}/node/openflow:1
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} openflow:1:1
+ Should Contain ${resp.content} openflow:1:2
+
+Get nodeconnector for a node 2
+ [Documentation] Get the inventory for a node
+ ${resp} Get session ${REST_CONTEXT}/node/openflow:2
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} openflow:2:1
+ Should Contain ${resp.content} openflow:2:2
+ Should Contain ${resp.content} openflow:2:3
+
+Get nodeconnector for a node 3
+ [Documentation] Get the inventory for a node
+ ${resp} Get session ${REST_CONTEXT}/node/openflow:3
Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:2:1
- Should Contain ${resp.content} openflow:2:2
- Should Contain ${resp.content} openflow:2:3
+ Should Contain ${resp.content} openflow:3:1
+ Should Contain ${resp.content} openflow:3:2
+ Should Contain ${resp.content} openflow:3:3
${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 5
-# ${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} 404
- Should Not Contain ${resp.content} 139
-
-#Verify after deleting flow operational - Sending IPv4 Dest Address and Eth type
-# [Documentation] Verify the flow
-# [Tags] Get
-# ${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 5
-# ${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
+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
+ 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} 404
+ ${resp} Get session ${REST_CON}/node/openflow:1/table/0
Should Not Contain ${resp.content} 152
+# Standing bug #368
#Verify after deleting flow operational - Output to physical port#
# [Documentation] Verify the flow
# [Tags] Get
-# ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
+# Sleep 3
+# ${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
Get Topology
[Documentation] Get Topology and validate the result.
[Tags] get
-# Sleep 10
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
[Documentation] Add a property to node
Add property to node MD_SAL openflow:2 description Switch2
Node property should exist MD_SAL openflow:2 description Switch2
+# Standing bug #335
#Remove property from node
# [Documentation] Remove a property from node
# Remove property from node MD_SAL openflow:2 description
${result} To JSON ${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
-# [Tags] get
-# Sleep 20
-# ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
-# Should Be Equal As Strings ${resp.status_code} 200
-# Log ${resp.content}
-# Should Contain ${resp.content} ${FLOW}
+Check flow in flow stats
+ [Documentation] Show flow stats and validate result
+ [Tags] get
+ Sleep 20
+ ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
+ Should Be Equal As Strings ${resp.status_code} 200
+ Log ${resp.content}
+ Should Contain ${resp.content} ${FLOW}
Remove a flow
[Documentation] Remove a flow, list to validate the result.
[Tags] remove
${result} To JSON ${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
-# [Tags] get
-# Sleep 20
-# ${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} ${FLOW} 3
+Check flow in flow stats
+ [Documentation] Show flow stats and validate result
+ [Tags] get
+ Sleep 20
+ ${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} ${FLOW} 3
Remove a host
[Documentation] Remove a host, list to validate the result.
[Tags] remove
${content} Get From Dictionary ${result} ${key}
List Should Contain Value ${content} ${body}
Sleep 20
+# This works locally but fails at OpenDaylight
#Check flow in flow stats
# [Documentation] Show flow stats and validate result
# [Tags] get
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Not Contain Value ${content} ${body}
- Sleep 40
${subnet} Get From Dictionary ${result} ${key}
${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
-# [Tags] Get
-# Write h1 ping -c 3 h4
-# Sleep 6
-# ${result} Read
-# Should Contain ${result} 64 bytes
-#List hosts
-# [Documentation] List hosts and verify h1 and h4
-# [Tags] Get
-# ${resp} Get session ${REST_CONTEXT_HT}/${CONTAINER}/hosts/active
-# Should Be Equal As Strings ${resp.status_code} 200
-# Should Contain ${resp.content} 10.0.0.1
-# Should Contain ${resp.content} 10.0.0.4
+Ping h1 to h4
+ [Documentation] Ping h1 to h4, verify no packet loss
+ [Tags] Get
+ Write h1 ping -c 3 h4
+ Sleep 6
+ ${result} Read
+ Should Contain ${result} 64 bytes
+List hosts
+ [Documentation] List hosts and verify h1 and h4
+ [Tags] Get
+ ${resp} Get session ${REST_CONTEXT_HT}/${CONTAINER}/hosts/active
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} 10.0.0.1
+ Should Contain ${resp.content} 10.0.0.4
Add a subnet
[Documentation] Add a subnet, list to validate the result.
[Tags] add
${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
... data={"type":"patch", "CUSTOM":{"peer":"s4-eth2"}}
Should Be Equal As Strings ${resp.status_code} 201
-#Ping h1 to h4
-# [Documentation] Ping h1 to h4, verify no packet loss
-# [Tags] Get
-# Sleep 5
-# Write h1 ping -c 30 h4
-# Sleep 40
-# ${result} Read
-# Should Contain ${result} 64 bytes
+Ping h1 to h4
+ [Documentation] Ping h1 to h4, verify no packet loss
+ [Tags] Get
+ Sleep 5
+ Write h1 ping -c 30 h4
+ Sleep 40
+ ${result} Read
+ Should Contain ${result} 64 bytes
Delete s4 ports
[Documentation] Delete s4 connected ports
[Tags] delete