Migrate request invocations (openflowplugin)
[integration/test.git] / csit / suites / openflowplugin / Groups_Meters_OF13 / 005__openflow_group.robot
index 7a9e154de9334ecaf049e1f2d6cd0b6c1eb0a243..e225af368351b19f6c6ebaa3972f7810cc868829 100644 (file)
@@ -38,21 +38,20 @@ Add a group
     [Tags]    push
     ${body}    OperatingSystem.Get File    ${GROUP}
     Set Suite Variable    ${body}
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:group=1
+    ...    url=${REST_CONTEXT}/flow-node-inventory:group=1
     ...    headers=${HEADERS_XML}
     ...    data=${body}
     Log    ${resp.content}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
 
 Verify after adding group config
     [Documentation]    Get the group stat in config
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
     ...    ${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_CONFIG_CONTENT}
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    ${GROUP_NAME}
 
 Verify after adding group operational
@@ -71,22 +70,21 @@ Add a flow that includes a group
     [Tags]    push
     ${body}    OperatingSystem.Get File    ${FLOW}
     Set Suite Variable    ${body}
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=1
     ...    headers=${HEADERS_XML}
     ...    data=${body}
     Log    ${resp.content}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
 
 Verify after adding flow config
     [Documentation]    Verify the flow
     [Tags]    get
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT}
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT}
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    ${FLOW_NAME}
 
 Verify after adding flow operational
@@ -101,28 +99,32 @@ Verify after adding flow operational
 
 Remove the flow
     [Documentation]    Remove the flow
-    ${resp}    RequestsLibrary.Delete Request    session    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=1
+    ...    expected_status=200
 
 Verify after deleting flow
     [Documentation]    Verify the flow removal
     [Tags]    get
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT}
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT}
     Should Not Contain    ${resp.content}    ${FLOW_NAME}
 
 Delete the group
     [Documentation]    Remove the group
     [Tags]    delete
-    ${resp}    RequestsLibrary.Delete Request    session    ${REST_CONTEXT}/flow-node-inventory:group=1
+    ${resp}    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${REST_CONTEXT}/flow-node-inventory:group=1
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
 
 Verify after deleting group
     [Documentation]    Verify the flow removal
     [Tags]    get
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_CONFIG_CONTENT}
+    ...    url=${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_CONFIG_CONTENT}
     Should Not Contain    ${resp.content}    ${GROUP_NAME}