Migrate request invocations (openflowplugin)
[integration/test.git] / csit / suites / openflowplugin / MD_SAL_NSF_OF13 / 040_restconf_frm.robot
index 1080e741e1e324fcd46e16c418a4633fd83d251f..f33538f448ea0f2c08796ecd7b9b838345997b71 100644 (file)
@@ -22,19 +22,18 @@ ${BODY2}
 *** Test Cases ***
 Add a flow - Sending IPv4 Dest Address and Eth type
     [Documentation]    Push a flow through REST-API
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
     ...    headers=${HEADERS_XML}
     ...    data=${BODY1}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
 
 Verify after adding flow config - Sending IPv4 Dest Address and Eth type
     [Documentation]    Verify the flow
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ...    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
@@ -49,19 +48,19 @@ Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
 
 Modify a flow - Output to physical port#
     [Documentation]    Push a flow through REST-API
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
     ...    headers=${HEADERS_XML}
     ...    data=${BODY2}
-    Should Be Equal As Strings    ${resp.status_code}    204
+    ...    expected_status=204
 
 Verify after modifying flow config - Output to physical port#
     [Documentation]    Verify the flow
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ...    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#
@@ -76,17 +75,17 @@ Verify after modifying flow operational - Output to physical port#
 
 Remove a flow - Output to physical port#
     [Documentation]    Remove a flow
-    ${resp}    RequestsLibrary.Delete Request
+    ${resp}    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
-    Should Be Equal As Strings    ${resp.status_code}    204
+    ...    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
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ...    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#