[Documentation] Get Topology and validate the result.
[Tags] get
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
Should Contain X Times ${resp.content} ${nodeconn1} 2
Should Contain X Times ${resp.content} ${nodeconn2} 2
${body} Create Dictionary name ${name} status Success srcNodeConnector
... OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector OF|1@OF|00:00:00:00:00:00:00:03
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/userLink/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 201
${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Contain Value ${content} ${body}
${body} Create Dictionary name ${name} status Success srcNodeConnector
... OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector OF|1@OF|00:00:00:00:00:00:00:03
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/userLink/${name}
- Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 204
${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Not Contain Value ${content} ${body}
[Documentation] Show port stats and validate result
[Tags] get
${resp} Get session ${REST_CONTEXT}/${CONTAINER}/port
+ Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} ${nodeconn1}
Should Contain ${resp.content} ${nodeconn2}
Should Contain ${resp.content} ${nodeconn3}
[Documentation] Show flow stats and validate result
[Tags] get
${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
+ Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} ${node1}
Should Contain ${resp.content} ${node2}
Should Contain ${resp.content} ${node3}
[Documentation] Show flow stats and validate result
[Tags] get
${resp} Get session ${REST_CONTEXT}/${CONTAINER}/table
+ Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.content} ${node1}
Should Contain ${resp.content} ${node2}
Should Contain ${resp.content} ${node3}
${key} flowConfig
${node_id} 00:00:00:00:00:00:00:02
${REST_CONTEXT} /controller/nb/v2/flowprogrammer
+${REST_CONTEXT_ST} /controller/nb/v2/statistics
+${FLOW} "10.0.0.1"
*** Test Cases ***
Add a flow
... ${node} priority 1 etherType 0x800 nwDst
... 10.0.0.1/32 actions ${actions}
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 201
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
${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 10
+ ${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
... ${node} priority 1 etherType 0x800 nwDst
... 10.0.0.1/32 actions ${actions}
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}
- Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 204
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Not Contain Value ${content} ${body}
+Check flow is not in flow stats
+ [Documentation] Show flow stats and validate result
+ [Tags] get
+ Sleep 10
+ ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
+ Should Be Equal As Strings ${resp.status_code} 200
+ Log ${resp.content}
+ Should Not Contain ${resp.content} ${FLOW}
+
${name} 10.0.1.4
${key} hostConfig
${REST_CONTEXT} /controller/nb/v2/hosttracker
+${REST_CONTEXT_ST} /controller/nb/v2/statistics
+${FLOW} "10.0.1.4"
*** Test Cases ***
Add a host
[Documentation] Add a host, list to validate the result.
[Tags] add
${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
- ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress
+ ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 2 networkAddress
... 10.0.1.4 staticHost ${True} nodeConnectorType OF
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/address/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201 Response status code error
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 201
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/active
+ Should Be Equal As Strings ${resp.status_code} 200
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
- List Should Contain Value ${content} ${body}
-
+ List Should Contain Value ${content} ${body}
+Check flow in flow stats
+ [Documentation] Show flow stats and validate result
+ [Tags] get
+ Sleep 10
+ ${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
${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
- ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress
+ ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 2 networkAddress
... 10.0.1.4 staticHost ${True} nodeConnectorType OF
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/address/${name}
- Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 204
${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Not Contain Value ${content} ${body}
+Check flow is not in flow stats
+ [Documentation] Show flow stats and validate result
+ [Tags] get
+ Sleep 10
+ ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
+ Should Be Equal As Strings ${resp.status_code} 200
+ Log ${resp.content}
+ Should Not Contain ${resp.content} ${FLOW}
+
${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
... 10.0.0.2
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/route/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 201
${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Contain Value ${content} ${body}
- Sleep 3
Remove a static route
[Documentation] Remove a static route, list to validate the result.
[Tags] remove
${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
... 10.0.0.2
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/route/${name}
- Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 204
${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Not Contain Value ${content} ${body}
${key} flowConfig
${node_id} 00:00:00:00:00:00:00:02
${REST_CONTEXT} /controller/nb/v2/flowprogrammer
+${REST_CONTEXT_ST} /controller/nb/v2/statistics
+${FLOW} "10.0.0.1"
*** Test Cases ***
Add a flow
... ${node} priority 1 etherType 0x800 nwDst
... 10.0.0.1/32 actions ${actions}
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 201
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
${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 10
+ ${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
... ${node} priority 1 etherType 0x800 nwDst
... 10.0.0.1/32 actions ${actions}
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}
- Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 204
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Not Contain Value ${content} ${body}
+Check flow is not in flow stats
+ [Documentation] Show flow stats and validate result
+ [Tags] get
+ Sleep 10
+ ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
+ Should Be Equal As Strings ${resp.status_code} 200
+ Log ${resp.content}
+ Should Not Contain ${resp.content} ${FLOW}
+
${key} flowConfig
${node_id} 00:00:00:00:00:00:00:02
${REST_CONTEXT} /controller/nb/v2/flowprogrammer
+${REST_CONTEXT_ST} /controller/nb/v2/statistics
+${FLOW} "10.0.0.1"
*** Test Cases ***
Add a flow
... ${node} priority 1 etherType 0x800 nwDst
... 10.0.0.1/32 actions ${actions}
${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 201
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
${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 10
+ ${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
... ${node} priority 1 etherType 0x800 nwDst
... 10.0.0.1/32 actions ${actions}
${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}
- Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 204
${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Should Be Equal As Strings ${resp.status_code} 200
${result} To JSON ${resp.content}
${content} Get From Dictionary ${result} ${key}
List Should Not Contain Value ${content} ${body}
+Check flow is not in flow stats
+ [Documentation] Show flow stats and validate result
+ [Tags] get
+ Sleep 10
+ ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
+ Should Be Equal As Strings ${resp.status_code} 200
+ Log ${resp.content}
+ Should Not Contain ${resp.content} ${FLOW}
+