X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Fsuites%2Fopenflowplugin%2FMD_SAL_NSF_OF13%2F040_restconf_frm.robot;h=f33538f448ea0f2c08796ecd7b9b838345997b71;hb=HEAD;hp=9c7df31f41b806bec8789f2818cef77d787bdee5;hpb=e70dd17a598fd3e1d0854ee5266e5e256fa362ea;p=integration%2Ftest.git
diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot
index 9c7df31f41..f33538f448 100644
--- a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot
+++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot
@@ -1,62 +1,99 @@
*** Settings ***
-Documentation Test suite for RESTCONF FRM
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library RequestsLibrary
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-Resource ../../../libraries/Utils.robot
+Documentation Test suite for RESTCONF FRM
+
+Library Collections
+Library RequestsLibrary
+Library ../../../libraries/Common.py
+Variables ../../../variables/Variables.py
+Resource ../../../libraries/Utils.robot
+Resource ../../../variables/openflowplugin/Variables.robot
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+Suite Teardown Delete All Sessions
+
*** Variables ***
-${BODY1} 2Foo204810.0.10.1/32139200
-${BODY2} 2Foo204810.0.20.1/32139200160
+${BODY1}
+... 2Foo204810.0.10.1/32139200
+${BODY2}
+... 2Foo204810.0.20.1/32139200160
+
*** Test Cases ***
Add a flow - Sending IPv4 Dest Address and Eth type
[Documentation] Push a flow through REST-API
- ${resp} RequestsLibrary.Put Request session ${CONFIG_NODES_API}/node/openflow:1/table/2/flow/139 headers=${HEADERS_XML} data=${BODY1}
- BuiltIn.Should_Match "${resp.status_code}" "20?"
+ ${resp} RequestsLibrary.PUT On Session
+ ... session
+ ... url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
+ ... headers=${HEADERS_XML}
+ ... data=${BODY1}
Verify after adding flow config - Sending IPv4 Dest Address and Eth type
[Documentation] Verify the flow
- ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 139
+ ${resp} RequestsLibrary.GET On Session
+ ... session
+ ... url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
+ ... expected_status=200
+ Should Contain ${resp.text} 139
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 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/table/2/flow/139 ${elements}
+ ${elements} Create List 10.0.10.1
+ Wait Until Keyword Succeeds
+ ... 10s
+ ... 2s
+ ... Check For Elements At URI
+ ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139?content=nonconfig
+ ... ${elements}
Modify a flow - Output to physical port#
[Documentation] Push a flow through REST-API
- ${resp} RequestsLibrary.Put Request session ${CONFIG_NODES_API}/node/openflow:1/table/2/flow/139 headers=${HEADERS_XML} data=${BODY2}
- Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} RequestsLibrary.PUT On Session
+ ... session
+ ... url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
+ ... headers=${HEADERS_XML}
+ ... data=${BODY2}
+ ... expected_status=204
Verify after modifying flow config - Output to physical port#
[Documentation] Verify the flow
- ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 10.0.20.1
+ ${resp} RequestsLibrary.GET On Session
+ ... session
+ ... url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
+ ... expected_status=200
+ Should Contain ${resp.text} 10.0.20.1
Verify after modifying flow operational - Output to physical port#
[Documentation] Verify the flow
- ${elements}= Create List 10.0.20.1
- Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/table/2/flow/139 ${elements}
+ ${elements} Create List 10.0.20.1
+ Wait Until Keyword Succeeds
+ ... 10s
+ ... 2s
+ ... Check For Elements At URI
+ ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139?content=nonconfig
+ ... ${elements}
Remove a flow - Output to physical port#
[Documentation] Remove a flow
- ${resp} RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:1/table/2/flow/139
- Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} RequestsLibrary.DELETE On Session
+ ... session
+ ... url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
+ ... expected_status=204
Verify after deleting flow config - Output to physical port#
[Documentation] Verify the flow
- ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 139
+ ${resp} RequestsLibrary.GET On Session
+ ... session
+ ... url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
+ ... expected_status=200
+ Should Not Contain ${resp.text} 139
Verify after deleting flow operational - Output to physical port#
[Documentation] Verify the flow
- ${elements}= Create List 10.0.20.1
- Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API}/node/openflow:1/table/2 ${elements}
+ ${elements} Create List 10.0.20.1
+ Wait Until Keyword Succeeds
+ ... 10s
+ ... 2s
+ ... Check For Elements Not At URI
+ ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=nonconfig
+ ... ${elements}