Moved calls to "RequestLibrary.<action> Request" in csit/libraries/ 44/34044/2
authorJunaid Zulfiqar <junaid.rao21@gmail.com>
Thu, 4 Feb 2016 04:23:21 +0000 (20:23 -0800)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 4 Feb 2016 21:41:24 +0000 (21:41 +0000)
+ RequestsLibrary.Put Request
+ RequestsLibrary.put Request
+ RequestsLibrary.Get Request
+ RequestsLibrary.GET Request
+ RequestsLibrary.Delete Request
+ RequestsLibrary.Post Request
+ RequestsLibrary.POST Request

Change-Id: Id801b2ecb709368a36b3806ac22640eea9890529
Signed-off-by: Junaid Zulfiqar <junaid.rao21@gmail.com>
14 files changed:
csit/libraries/AAAKeywords.robot
csit/libraries/ConfigViaRestconf.robot
csit/libraries/DIDMKeywords.robot
csit/libraries/DatastoreCRUD.robot
csit/libraries/FlowLib.robot
csit/libraries/GBP/RestconfUtils.robot
csit/libraries/NetconfViaRestconf.robot
csit/libraries/NicKeywords.robot
csit/libraries/PcepOperations.robot
csit/libraries/Scalability.robot
csit/libraries/SwitchUtils.robot
csit/libraries/Utils.robot
csit/libraries/VtnCoKeywords.robot
csit/libraries/VtnMaKeywordsLi.robot

index 9d05bb69a8935f8abdfa2c489f8065a479eb51cb..a77d5157c0b654d2e0d8dfdd24be5d7a8111cadd 100644 (file)
@@ -14,7 +14,7 @@ AAA Login
     [Documentation]    Makes a POST REST call to the AUTH_TOKEN_API with the given auth_data and returns the response
     Create Session    ODL_SESSION    http://${controller_ip}:8181
     ${headers}=    Create Dictionary    Content-Type=application/x-www-form-urlencoded
-    ${resp}=    RequestsLibrary.POST    ODL_SESSION    ${AUTH_TOKEN_API}    data=${auth_data}    headers=${headers}
+    ${resp}=    RequestsLibrary.POST Request    ODL_SESSION    ${AUTH_TOKEN_API}    data=${auth_data}    headers=${headers}
     Delete All Sessions
     [Return]    ${resp}
 
@@ -60,7 +60,7 @@ Revoke Auth Token
     [Arguments]    ${token}
     [Documentation]    Requests the given token be revoked via POST to ${REVOKE_TOKEN_API}
     ${headers}=    Create Dictionary    Content-Type=application/x-www-form-urlencoded
-    ${resp}=    RequestsLibrary.POST    ODL_SESSION    ${REVOKE_TOKEN_API}    data=${token}    headers=${headers}
+    ${resp}=    RequestsLibrary.POST Request    ODL_SESSION    ${REVOKE_TOKEN_API}    data=${token}    headers=${headers}
     Should Be Equal As Strings    ${resp.status_code}    204
 
 Validate Token Format
@@ -73,7 +73,7 @@ Get User From IDM DB
     [Documentation]    Will return user information. If no user id is passed, it will retrieve all users in DB
     Create Session    httpbin    http://${ODL_SYSTEM_IP}:${RESTPORT}
     ${headers}=    Create Dictionary    Content-Type=application/x-www-form-urlencoded
-    ${resp}=    RequestsLibrary.GET    httpbin    ${idmurl}/users/${user_id}    headers=${headers}
+    ${resp}=    RequestsLibrary.GET Request    httpbin    ${idmurl}/users/${user_id}    headers=${headers}
     Should Be Equal As Strings    ${resp.status_code}    200
     Log    ${resp.content}
     [Return]    ${resp}
@@ -83,7 +83,7 @@ Create User
     [Documentation]    Will return user information. If no user id is passed, it will retrieve all users in DB
     Create Session    httpbin    http://${ODL_SYSTEM_IP}:${RESTPORT}
     ${headers}=    Create Dictionary    Content-Type=application/json
-    ${resp}=    RequestsLibrary.POST    httpbin    ${idmurl}/users    headers=${headers}    data=${user_data}
+    ${resp}=    RequestsLibrary.POST Request    httpbin    ${idmurl}/users    headers=${headers}    data=${user_data}
     Should Be Equal As Strings    ${resp.status_code}    201
     Log    ${resp.content}
     [Return]    ${resp}
index d80dee6fe12f198fb12534566c61bf1ac0872cc7..d0e42945a9c84c24ebfb7bb4353c746fc11e71e1 100644 (file)
@@ -165,7 +165,7 @@ Put_Xml_Config_Via_Restconf
     [Documentation]    Put XML data to given controller-config URI, check reponse text is empty and status_code is one of allowed ones.
     BuiltIn.Log    ${uri_part}
     BuiltIn.Log    ${xml_data}
-    ${response}=    RequestsLibrary.Put    cvr_session    ${uri_part}    data=${xml_data}
+    ${response}=    RequestsLibrary.Put Request    cvr_session    ${uri_part}    data=${xml_data}
     BuiltIn.Log    ${response.text}
     BuiltIn.Log    ${response.status_code}
     BuiltIn.Should_Be_Empty    ${response.text}
@@ -175,7 +175,7 @@ Get_Xml_Config_Via_Restconf
     [Arguments]    ${uri_part}
     [Documentation]    Get XML data from given controller-config URI, check status_code is one of allowed ones, return response text.
     BuiltIn.Log    ${uri_part}
-    ${response}=    RequestsLibrary.Get    cvr_session    ${uri_part}    headers=${ACCEPT_XML}
+    ${response}=    RequestsLibrary.Get Request    cvr_session    ${uri_part}    headers=${ACCEPT_XML}
     BuiltIn.Log    ${response.text}
     BuiltIn.Log    ${response.status_code}
     BuiltIn.Should_Contain    ${allowed_status_codes}    ${response.status_code}
@@ -185,7 +185,7 @@ Get_Json_Config_Via_Restconf
     [Arguments]    ${uri_part}
     [Documentation]    Get XML data from given controller-config URI, check status_code is one of allowed ones, return response text.
     BuiltIn.Log    ${uri_part}
-    ${response}=    RequestsLibrary.Get    cvr_session    ${uri_part}    headers=${ACCEPT_JSON}
+    ${response}=    RequestsLibrary.Get Request    cvr_session    ${uri_part}    headers=${ACCEPT_JSON}
     BuiltIn.Log    ${response.text}
     BuiltIn.Log    ${response.status_code}
     BuiltIn.Should_Contain    ${allowed_status_codes}    ${response.status_code}
@@ -195,7 +195,7 @@ Delete_Config_Via_Restconf
     [Arguments]    ${uri_part}
     [Documentation]    Delete resource at controller-config URI, check reponse text is empty and status_code is 204.
     BuiltIn.Log    ${uri_part}
-    ${response}=    RequestsLibrary.Delete    cvr_session    ${uri_part}
+    ${response}=    RequestsLibrary.Delete Request    cvr_session    ${uri_part}
     BuiltIn.Log    ${response.text}
     BuiltIn.Should_Be_Empty    ${response.text}
     BuiltIn.Should_Contain    ${allowed_status_codes}    ${response.status_code}
index 6a69d48c3749e6c1cbe3cc368a85a050631611c4..036105c4a19ba8d86c1047f2f0974514b05268db 100644 (file)
@@ -9,7 +9,7 @@ Resource          ./Utils.robot
 *** Keywords ***
 Check DIDM Registered With Device
     [Documentation]    Check for DIDM registered with the device
-    ${resp}=    RequestsLibrary.Get    session    ${OPERATIONAL_NODES_API}
+    ${resp}=    RequestsLibrary.Get Request    session    ${OPERATIONAL_NODES_API}
     Should Be Equal As Strings    ${resp.status_code}    200
     Log    ${resp.content}
     Should Contain    ${resp.content}    didm
index 7995cc3319ede3c586fd8223337fe2b6c1b945ad..7ac899c9310cc9a11af8c83a378dee077726ef46 100644 (file)
@@ -16,7 +16,7 @@ Create Records
     \    ${payload}=    Assemble Payload    ${INDEX}    ${prefix}    ${field bases}    ${postfix}
     \    Log    ${payload}
     \    Create_Session    session    http://${controller_ip}:${RESTCONFPORT}${CONFIG_API}    headers=${HEADERS}    auth=${AUTH}
-    \    ${resp}    RequestsLibrary.Post    session    ${node}    ${payload}
+    \    ${resp}    RequestsLibrary.Post Request    session    ${node}    ${payload}
     \    Log    ${resp}
     \    Should Be Equal As Strings    ${resp}    <Response [204]>
 
@@ -24,7 +24,7 @@ Read Records
     [Arguments]    ${controller_ip}    ${node}
     [Documentation]    GETs records from a shard on a controller's data store.
     Create_Session    session    http://${controller_ip}:${RESTCONFPORT}${CONFIG_API}    headers=${HEADERS}    auth=${AUTH}
-    ${resp}=    RequestsLibrary.Get    session    ${node}
+    ${resp}=    RequestsLibrary.Get Request    session    ${node}
     [Return]    ${resp.json()}
 
 Update Records
@@ -39,7 +39,7 @@ Update Records
     \    ${payload}=    Assemble Payload    ${INDEX}    ${prefix}    ${field bases}    ${postfix}
     \    Log    ${payload}
     \    Create_Session    session    http://${controller_ip}:${RESTCONFPORT}${CONFIG_API}    headers=${HEADERS}    auth=${AUTH}
-    \    ${resp}=    RequestsLibrary.Put    session    ${node}/${INDEX}    ${payload}
+    \    ${resp}=    RequestsLibrary.Put Request    session    ${node}/${INDEX}    ${payload}
     \    Log    ${resp}
     \    Should Be Equal As Strings    ${resp}    <Response [200]>
 
@@ -49,14 +49,14 @@ Delete Records
     ${last}    Convert to Integer    ${last}
     : FOR    ${INDEX}    IN RANGE    ${first}    ${last+1}
     \    Create_Session    session    http://${controller_ip}:${RESTCONFPORT}${CONFIG_API}    headers=${HEADERS}    auth=${AUTH}
-    \    ${resp}=    RequestsLibrary.Delete    session    ${node}/${INDEX}
+    \    ${resp}=    RequestsLibrary.Delete Request    session    ${node}/${INDEX}
     \    Should Be Equal As Strings    ${resp}    <Response [200]>
 
 Delete All Records
     [Arguments]    ${controller_ip}    ${node}
     [Documentation]    DELETEs all records from a shard on a controller's data store.
     Create_Session    session    http://${controller_ip}:${RESTCONFPORT}${CONFIG_API}    headers=${HEADERS}    auth=${AUTH}
-    ${resp}=    RequestsLibrary.Delete    session    ${node}
+    ${resp}=    RequestsLibrary.Delete Request    session    ${node}
     Should Be Equal As Strings    ${resp}    <Response [200]>
 
 Assemble Payload
index c52481f0f7e8cdb81cb0f2c19fc863d16fbe19cf..f982c650891ccbbbd502f23448acd2b1e080e045 100644 (file)
@@ -142,10 +142,10 @@ Remove Flow XML Element
 Add Flow To Controller And Verify
     [Arguments]    ${flow_body}    ${node_id}    ${table_id}    ${flow_id}
     [Documentation]    Push flow through REST-API and verify in data-store
-    ${resp}    RequestsLibrary.Put    session    ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id}    headers=${HEADERS_XML}    data=${flow_body}
+    ${resp}    RequestsLibrary.Put Request    session    ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id}    headers=${HEADERS_XML}    data=${flow_body}
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
-    ${resp}    RequestsLibrary.Get    session    ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id}    headers=${ACCEPT_XML}
+    ${resp}    RequestsLibrary.Get Request    session    ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id}    headers=${ACCEPT_XML}
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
     compare xml    ${flow_body}    ${resp.content}
@@ -162,10 +162,10 @@ Verify Flow On Mininet Switch
 Remove Flow From Controller And Verify
     [Arguments]    ${flow_body}    ${node_id}    ${table_id}    ${flow_id}
     [Documentation]    Remove flow
-    ${resp}    RequestsLibrary.Delete    session    ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id}
+    ${resp}    RequestsLibrary.Delete Request    session    ${REST_CON}/node/${node_id}/table/${table_id}/flow/${flow_id}
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
-    ${resp}    RequestsLibrary.Get    session    ${REST_CON}/node/${node_id}/table/${table_id}
+    ${resp}    RequestsLibrary.Get Request    session    ${REST_CON}/node/${node_id}/table/${table_id}
     Log    ${resp.content}
     Should Not Contain    ${resp.content}    ${flow_id}
 
@@ -192,10 +192,10 @@ Remove Default Flows
     write    dpctl dump-flows -O OpenFlow13
     ${switchoutput}    Read Until    >
     ${headers}=    Create Dictionary    Content-Type=application/yang.data+xml
-    ${resp}    RequestsLibrary.Post    session    restconf/operations/sal-flow:remove-flow    data=${flow.xml}    headers=${headers}
+    ${resp}    RequestsLibrary.Post Request    session    restconf/operations/sal-flow:remove-flow    data=${flow.xml}    headers=${headers}
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
-    ${resp}=    RequestsLibrary.Get    session    ${OPERATIONAL_NODES_API}
+    ${resp}=    RequestsLibrary.Get Request    session    ${OPERATIONAL_NODES_API}
     Log    ${resp.content}
     Should Not Contain    ${resp.content}    "output-node-connector": "CONTROLLER",
     ${strings_to_check_for}=    Create List    CONTROLLER
@@ -232,7 +232,7 @@ Flow Presence In Config Store
     [Documentation]    Checks the config store for given flow. Returns True if present, otherwise returns False
     ...    This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx}
     ${headers}=    Create Dictionary    Accept=application/xml
-    ${resp}=    RequestsLibrary.Get    session    ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}    headers=${headers}
+    ${resp}=    RequestsLibrary.Get Request    session    ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}    headers=${headers}
     Log    ${resp}
     Log    ${resp.content}
     Return From Keyword If    ${resp.status_code}!=200    ${False}    ${EMPTY}
@@ -245,7 +245,7 @@ Flow Presence In Operational Store
     [Documentation]    Checks the operational store for given flow. Returns True if present, otherwise returns False
     ...    This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx}
     ${headers}=    Create Dictionary    Accept=application/xml
-    ${resp}=    RequestsLibrary.Get    session    ${OPERATIONAL_NODES_API}/node/openflow:${switch_idx}/table/${table_id}    headers=${headers}
+    ${resp}=    RequestsLibrary.Get Request    session    ${OPERATIONAL_NODES_API}/node/openflow:${switch_idx}/table/${table_id}    headers=${headers}
     Log    ${resp}
     Log    ${resp.content}
     Return From Keyword If    ${resp.status_code}!=200    ${False}    ${EMPTY}
@@ -291,7 +291,7 @@ Add Flow Via RPC
     Set Element Attribute    ${nodeelm}    xmlns:inv    urn:opendaylight:inventory
     Log Element    ${req}
     ${strxml}=    Element To String    ${req}
-    ${resp}=    RequestsLibrary.Post    session    /restconf/operations/sal-flow:add-flow    data=${strxml}
+    ${resp}=    RequestsLibrary.Post Request    session    /restconf/operations/sal-flow:add-flow    data=${strxml}
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
 
@@ -299,7 +299,7 @@ Add Flow Via Restconf
     [Arguments]    ${node_id}    ${table_id}    ${flow_body}
     [Documentation]    Configures a flow specified by given flow details (${node_id}, ${table_id}, ${flow_body}) using POST method
     Log    ${flow_body}
-    ${resp}=    RequestsLibrary.Post    session    ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}    data=${flow_body}
+    ${resp}=    RequestsLibrary.Post Request    session    ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}    data=${flow_body}
     Log    ${resp.content}
     ${msg}=    Set Variable    Adding flow for ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id} failed, http response ${resp.status_code} received.
     Should Be Equal As Strings    ${resp.status_code}    204    msg=${msg}
@@ -327,7 +327,7 @@ Update Flow Via RPC
     Set Element Attribute    ${nodeelm}    xmlns:inv    urn:opendaylight:inventory
     Log Element    ${xml}
     ${strxml}=    Element To String    ${xml}
-    ${resp}=    RequestsLibrary.Post    session    /restconf/operations/sal-flow:update-flow    data=${strxml}
+    ${resp}=    RequestsLibrary.Post Request    session    /restconf/operations/sal-flow:update-flow    data=${strxml}
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
 
@@ -335,7 +335,7 @@ Update Flow Via Restconf
     [Arguments]    ${node_id}    ${table_id}    ${flow_id}    ${flow_body}
     [Documentation]    Updates a flow configuration by given flow details (${node_id}, ${table_id}, ${flow_body}) using PUT method
     Log    ${flow_body}
-    ${resp}=    RequestsLibrary.Put    session    ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id}    data=${flow_body}
+    ${resp}=    RequestsLibrary.Put Request    session    ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id}    data=${flow_body}
     Log    ${resp.content}
     ${msg}=    Set Variable    Updating flow for ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
     Should Be Equal As Strings    ${resp.status_code}    200    msg=${msg}
@@ -353,14 +353,14 @@ Delete Flow Via RPC
     Set Element Attribute    ${nodeelm}    xmlns:inv    urn:opendaylight:inventory
     Log Element    ${req}
     ${strxml}=    Element To String    ${req}
-    ${resp}=    RequestsLibrary.Post    session    /restconf/operations/sal-flow:remove-flow    data=${strxml}
+    ${resp}=    RequestsLibrary.Post Request    session    /restconf/operations/sal-flow:remove-flow    data=${strxml}
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Delete Flow Via Restconf
     [Arguments]    ${node_id}    ${table_id}    ${flow_id}
     [Documentation]    Deletes a flow from configuration datastore specified by given flow details (${node_id}, ${table_id}, ${flow_body}) using DELETE method
-    ${resp}=    RequestsLibrary.Delete    session    ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id}
+    ${resp}=    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id}
     Log    ${resp.content}
     ${msg}=    Set Variable    Delete flow for ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
     Should Be Equal As Strings    ${resp.status_code}    200    msg=${msg}
index 6d496cc0392d16d4a813bdfdbfda66d71345e83b..50c52e17b6a1cb6635b7f229848f0ac3265060df 100644 (file)
@@ -13,7 +13,7 @@ ${ENDPOINTS_OPER_PATH}    /restconf/operational/endpoint:endpoints
 *** Keywords ***
 Unregister Endpoints
     [Documentation]    Unregister Endpoints Endpoints from ODL
-    ${result} =    RequestsLibrary.Get    session    ${ENDPOINTS_OPER_PATH}
+    ${result} =    RequestsLibrary.Get Request    session    ${ENDPOINTS_OPER_PATH}
     ${json_result} =    json.loads    ${result.text}
     Pass Execution If    ${json_result['endpoints']}=={}    No Endpoints available
     ${L2_ENDPOINTS} =    Set Variable    ${json_result['endpoints']['endpoint']}
@@ -22,7 +22,7 @@ Unregister Endpoints
     Unregister L2Endpoints    ${L2_ENDPOINTS}
     Log    ${L3_ENDPOINTS}
     Unregister L3Endpoints    ${L3_ENDPOINTS}
-    ${result} =    RequestsLibrary.Get    session    ${ENDPOINTS_OPER_PATH}
+    ${result} =    RequestsLibrary.Get Request    session    ${ENDPOINTS_OPER_PATH}
     ${json_result} =    json.loads    ${result.text}
     Should Be Empty    ${json_result['endpoints']}
 
index fe794b910440927250c292149a7d9fc0e4f69ceb..4d55e50f1020e6edfc6b039d6debf5cb399c5bf1 100644 (file)
@@ -102,7 +102,7 @@ Post_Xml_Via_Restconf
     # As seen in previous two Keywords, Post does not need long specific URI.
     # But during Lithium development, Post ceased to do merge, so those Keywords do not work anymore.
     # This Keyword can still be used with specific URI to create a new container and fail if a container was already present.
-    ${response}=    RequestsLibrary.Post    ${NetconfViaRestconf__active_config_session}    ${uri_part}    data=${xml_data}
+    ${response}=    RequestsLibrary.Post Request    ${NetconfViaRestconf__active_config_session}    ${uri_part}    data=${xml_data}
     BuiltIn.Log    ${response.text}
     BuiltIn.Should_Be_Empty    ${response.text}
     BuiltIn.Should_Be_Equal_As_Strings    ${response.status_code}    204
@@ -119,7 +119,7 @@ Put_Xml_Via_Restconf
     [Documentation]    Put XML data to given controller-config URI, check reponse text is empty and status_code is one of allowed ones.
     BuiltIn.Log    ${uri_part}
     BuiltIn.Log    ${xml_data}
-    ${response}=    RequestsLibrary.Put    ${NetconfViaRestconf__active_config_session}    ${uri_part}    data=${xml_data}
+    ${response}=    RequestsLibrary.Put Request    ${NetconfViaRestconf__active_config_session}    ${uri_part}    data=${xml_data}
     BuiltIn.Log    ${response.text}
     BuiltIn.Log    ${response.status_code}
     BuiltIn.Should_Be_Empty    ${response.text}
@@ -137,7 +137,7 @@ Put_Json_Via_Restconf
     [Documentation]    Put JSON data to given controller-config URI, check reponse text is empty and status_code is one of allowed ones.
     BuiltIn.Log    ${uri_part}
     BuiltIn.Log    ${json_data}
-    ${response}=    RequestsLibrary.Put    ${NetconfViaRestconf__active_config_session}    ${uri_part}    data=${json_data}    headers=${HEADERS_YANG_JSON}
+    ${response}=    RequestsLibrary.Put Request    ${NetconfViaRestconf__active_config_session}    ${uri_part}    data=${json_data}    headers=${HEADERS_YANG_JSON}
     BuiltIn.Log    ${response.text}
     BuiltIn.Log    ${response.status_code}
     BuiltIn.Should_Be_Empty    ${response.text}
@@ -154,7 +154,7 @@ Delete_Via_Restconf
     [Arguments]    ${uri_part}
     [Documentation]    Delete resource at controller-config URI, check reponse text is empty and status_code is 204.
     BuiltIn.Log    ${uri_part}
-    ${response}=    RequestsLibrary.Delete    ${NetconfViaRestconf__active_config_session}    ${uri_part}
+    ${response}=    RequestsLibrary.Delete Request    ${NetconfViaRestconf__active_config_session}    ${uri_part}
     BuiltIn.Log    ${response.text}
     BuiltIn.Should_Be_Empty    ${response.text}
     BuiltIn.Should_Contain    ${allowed_status_codes}    ${response.status_code}
index f2c90a52da02f5e7d46d2de71349b8ad7fe39e42..7e142861fd10ae231aa8859ab75fdefa91bef112 100644 (file)
@@ -38,31 +38,31 @@ Stop NIC VTN Rest Test Suite
 
 Fetch Intent List
     [Documentation]    Check if VTN Renderer feature is installed.
-    ${resp}=    RequestsLibrary.Get    session    ${INTENTS}
+    ${resp}=    RequestsLibrary.Get Request    session    ${INTENTS}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Add Intent Using RestConf
     [Arguments]    ${intent_id}    ${intent_data}
     [Documentation]    Create a intent with specified parameters.
-    ${resp}=    RequestsLibrary.put    session    ${REST_CONTEXT_INTENT}/${intent_id}    data=${intent_data}
+    ${resp}=    RequestsLibrary.put Request    session    ${REST_CONTEXT_INTENT}/${intent_id}    data=${intent_data}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Verify Intent Using RestConf
     [Arguments]    ${intent_id}
     [Documentation]    Verify If intent is created.
-    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT_INTENT}/${intent_id}
+    ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT_INTENT}/${intent_id}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Update Intent Using RestConf
     [Arguments]    ${intent_id}    ${intent_data}
     [Documentation]    Update a intent with specified parameters.
-    ${resp}=    RequestsLibrary.put    session    ${REST_CONTEXT_INTENT}/${intent_id}    data=${intent_data}
+    ${resp}=    RequestsLibrary.put Request    session    ${REST_CONTEXT_INTENT}/${intent_id}    data=${intent_data}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Delete Intent Using RestConf
     [Arguments]    ${intent_id}
     [Documentation]    Delete a intent with specified parameters.
-    ${resp}=    RequestsLibrary.Delete    session    ${REST_CONTEXT_INTENT}/${intent_id}
+    ${resp}=    RequestsLibrary.Delete Request    session    ${REST_CONTEXT_INTENT}/${intent_id}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Add Intent From Karaf Console
index 74ab90219eae9d3a5d21db55fd79241e7167da4c..78130a83f17f92e66ad40a8155662f1a8e8bcdbb 100644 (file)
@@ -45,7 +45,7 @@ Remove_Xml_Lsp_Return_Json
 Operate_Xml_Lsp_Return_Json
     [Arguments]    ${uri_part}    ${xml_data}
     [Documentation]    Post XML data to given pcep-operations URI, check status_code is 200 and return response text (JSON).
-    ${response}=    RequestsLibrary.Post    pcep_session    ${uri_part}    data=${xml_data}
+    ${response}=    RequestsLibrary.Post Request    pcep_session    ${uri_part}    data=${xml_data}
     Should_Be_Equal_As_Strings    ${response.status_code}    200
     [Return]    ${response.text}
 
index 4d8432704861240e1f7c19dc7d38deb559f906c6..71c9d24212b239818b8f88d46e3bfc300bcef7cf 100644 (file)
@@ -133,7 +133,7 @@ Start Mininet With One Switch And ${hosts} hosts
 Check Number Of Hosts
     [Arguments]    ${hosts}
     [Documentation]    Check number of hosts in inventory
-    ${resp}=    RequestsLibrary.Get    session    ${OPERATIONAL_TOPO_API}
+    ${resp}=    RequestsLibrary.Get Request    session    ${OPERATIONAL_TOPO_API}
     Log    Check number of hosts in inventory
     Log To Console    Check number of hosts in inventory
     Should Be Equal As Strings    ${resp.status_code}    200
@@ -143,7 +143,7 @@ Check Number Of Hosts
 Check Number Of Links
     [Arguments]    ${links}
     [Documentation]    Check number of links in inventory is ${links}
-    ${resp}=    RequestsLibrary.Get    session    ${OPERATIONAL_TOPO_API}
+    ${resp}=    RequestsLibrary.Get Request    session    ${OPERATIONAL_TOPO_API}
     Log    Check number of links in inventory is ${links}
     Log To Console    Check number of links in inventory is ${links}
     Should Be Equal As Strings    ${resp.status_code}    200
@@ -163,7 +163,7 @@ Ping Two Hosts
 
 Check No Hosts
     [Documentation]    Check if all hosts are deleted from inventory
-    ${resp}=    RequestsLibrary.Get    session    ${OPERATIONAL_TOPO_API}
+    ${resp}=    RequestsLibrary.Get Request    session    ${OPERATIONAL_TOPO_API}
     Log To Console    Checking no hosts are present in operational database
     Log    Checking no hosts are present in operational database
     Should Be Equal As Strings    ${resp.status_code}    200
@@ -205,7 +205,7 @@ Check Every Switch
     ${mac}=    Convert To Integer    ${mac}
     : FOR    ${switch}    IN RANGE    1    ${switches+1}
     \    ${dpid_decimal}=    Evaluate    ${mac}+${switch}
-    \    ${resp}    RequestsLibrary.Get    session    ${OPERATIONAL_NODES_API}/node/openflow:${dpid_decimal}
+    \    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_NODES_API}/node/openflow:${dpid_decimal}
     \    Should Be Equal As Strings    ${resp.status_code}    200
     \    Log To Console    Checking Switch ${switch}
     \    Should Contain    ${resp.content}    flow-capable-node-connector-statistics
@@ -214,7 +214,7 @@ Check Every Switch
 Check Linear Topology
     [Arguments]    ${switches}
     [Documentation]    Check Linear topology given ${switches}
-    ${resp}    RequestsLibrary.Get    session    ${OPERATIONAL_TOPO_API}
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_TOPO_API}
     Log To Console    Checking Topology
     Should Be Equal As Strings    ${resp.status_code}    200
     : FOR    ${switch}    IN RANGE    1    ${switches+1}
@@ -231,7 +231,7 @@ Check Linear Topology
 Check No Switches
     [Arguments]    ${switches}
     [Documentation]    Check no switch is in inventory
-    ${resp}    RequestsLibrary.Get    session    ${OPERATIONAL_NODES_API}
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_NODES_API}
     Log To Console    Checking No Switches
     Should Be Equal As Strings    ${resp.status_code}    200
     : FOR    ${switch}    IN RANGE    1    ${switches+1}
@@ -240,7 +240,7 @@ Check No Switches
 Check No Topology
     [Arguments]    ${switches}
     [Documentation]    Check no switch is in topology
-    ${resp}    RequestsLibrary.Get    session    ${OPERATIONAL_TOPO_API}
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_TOPO_API}
     Log To Console    Checking No Topology
     Should Be Equal As Strings    ${resp.status_code}    200
     : FOR    ${switch}    IN RANGE    1    ${switches+1}
index 4058ff0549a29df480bc0952f68d305242d2144a..349964e6920f72b7d7128f1f4161794eb4b09015 100644 (file)
@@ -22,14 +22,14 @@ Get Switch Datapath ID
 Verify Switch In Operational Data Store
     [Arguments]    ${switch}
     [Documentation]    Verifies the existence of the switch.datapath_id in the operational datastore.
-    ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}
+    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}
     Log    ${resp.content}
     Should Match Regexp    ${resp.content}    openflow:${switch.datapath_id}
 
 Verify Switch Not In Operational Data Store
     [Arguments]    ${switch}
     [Documentation]    Verifies that the given switch.datapath_id is not in the operational datastore.
-    ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}
+    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}
     Log    ${resp.content}
     Should Not Match Regexp    ${resp.content}    openflow:${switch.datapath_id}
 
index 097285771a95656c90d3552ffa4105fc157917e8..c182b2b311ad5b9e2bc10b1950e8ec8cf94413de 100644 (file)
@@ -302,7 +302,7 @@ Remove All Elements At URI And Verify
     [Arguments]    ${uri}
     ${resp}    RequestsLibrary.Delete Request    session    ${uri}
     Should Be Equal As Strings    ${resp.status_code}    200
-    ${resp}    RequestsLibrary.Get    session    ${uri}
+    ${resp}    RequestsLibrary.Get Request    session    ${uri}
     Should Be Equal As Strings    ${resp.status_code}    404
 
 Add Elements To URI From File
@@ -367,7 +367,7 @@ Check Item Occurrence
 Post Log Check
     [Arguments]    ${uri}    ${body}    ${status_code}=200
     [Documentation]    Post body to ${uri}, log response content, and check status
-    ${resp}=    RequestsLibrary.Post    session    ${uri}    ${body}
+    ${resp}=    RequestsLibrary.Post Request    session    ${uri}    ${body}
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    ${status_code}
     [Return]    ${resp}
index e01f80b8dca533d345422a97f49f8057561b8a83..aa986fc706df9ab1848a93aab93c6ea9844a90a7 100644 (file)
@@ -65,7 +65,7 @@ Stop SuiteVtnCoTest
 
 Get Coordinator Version
     [Documentation]    Get API version for testing
-    ${resp}    RequestsLibrary.Get    session    ${VTNWEBAPI}/api_version
+    ${resp}    RequestsLibrary.Get Request    session    ${VTNWEBAPI}/api_version
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Add a Controller
@@ -74,13 +74,13 @@ Add a Controller
     ${controllerinfo}    Create Dictionary    controller_id=${ctrlname}    type=odc    ipaddr=${ctrlip}    version=1.0
     ${controllercreate}    Create Dictionary    controller=${controllerinfo}
     ${controllercreate_json}=    json.dumps    ${controllercreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${CTRLS_CREATE}    data=${controllercreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${CTRLS_CREATE}    data=${controllercreate_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Remove Controller
     [Arguments]    ${ctrlname}
     [Documentation]    Delete a Controller
-    ${resp}    RequestsLibrary.Delete    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
+    ${resp}    RequestsLibrary.Delete Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
     Should Be Equal As Strings    ${resp.status_code}    204
 
 Update Controller
@@ -89,7 +89,7 @@ Update Controller
     ${controllerinfo}    Create Dictionary    description=${desc}    ipaddr=${ctrlip}    version=1.0
     ${controllerupdate}    Create Dictionary    controller=${controllerinfo}
     ${controllerupdate_json}=    json.dumps    ${controllerupdate}
-    ${resp}    RequestsLibrary.Put    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json    data=${controllerupdate_json}
+    ${resp}    RequestsLibrary.Put Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json    data=${controllerupdate_json}
     Should Be Equal As Strings    ${resp.status_code}    204
 
 Audit Controller
@@ -98,13 +98,13 @@ Audit Controller
     ${auditinfo}    Create Dictionary    force=false    real-network_audit=false
     ${auditupdate}    Create Dictionary    audit=${auditinfo}
     ${auditupdate_json}=    json.dumps    ${auditupdate}
-    ${resp}    RequestsLibrary.Put    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/audit.json    data=${auditupdate_json}
+    ${resp}    RequestsLibrary.Put Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/audit.json    data=${auditupdate_json}
     Should Be Equal As Strings    ${resp.status_code}    204
 
 Check Controller Status
     [Arguments]    ${ctrlname}    ${stat}
     [Documentation]    Get controller status
-    ${resp}    RequestsLibrary.Get    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
+    ${resp}    RequestsLibrary.Get Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
     ${contents}    To JSON    ${resp.content}
     ${controllerblock}    Get From Dictionary    ${contents}    controller
     ${status}    Get From Dictionary    ${controllerblock}    operstatus
@@ -116,13 +116,13 @@ Add a VTN
     ${vtninfo}    Create Dictionary    vtn_name=${vtnname}    description=${vtndescription}
     ${vtncreate}    Create Dictionary    vtn=${vtninfo}
     ${vtncreate_json}=    json.dumps    ${vtncreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS_CREATE}    data=${vtncreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS_CREATE}    data=${vtncreate_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Delete a VTN
     [Arguments]    ${vtnname}
     [Documentation]    Delete a VTN Created
-    ${resp}    RequestsLibrary.Delete    session    ${VTNWEBAPI}/${VTNS}/${vtnname}.json
+    ${resp}    RequestsLibrary.Delete Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}.json
     Should Be Equal As Strings    ${resp.status_code}    204
 
 Create VBR in VTN
@@ -131,7 +131,7 @@ Create VBR in VTN
     ${vbrinfo}    Create Dictionary    vbr_name=${vbrname}    controller_id=${ctrlname}    domain_id=(DEFAULT)
     ${vbrcreate}    Create Dictionary    vbridge=${vbrinfo}
     ${vbrcreate_json}=    json.dumps    ${vbrcreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE}    data=${vbrcreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE}    data=${vbrcreate_json}
     Run Keyword If    '${vbrname}' == 'Vbr_audit'    Should Be Equal As Strings    ${resp.status_code}    202
     ...    ELSE    Should Be Equal As Strings    ${resp.status_code}    201
 
@@ -141,7 +141,7 @@ Create VBRIF in VBR
     ${vbrifinfo}    Create Dictionary    if_name=${vbrifname}    description=${ifdescription}
     ${vbrifcreate}    Create Dictionary    interface=${vbrifinfo}
     ${vbrifcreate_json}=    json.dumps    ${vbrifcreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE}    data=${vbrifcreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE}    data=${vbrifcreate_json}
     Should Be Equal As Strings    ${resp.status_code}    ${retcode}
 
 Define Portmap for VBRIF
@@ -150,7 +150,7 @@ Define Portmap for VBRIF
     ${logical_port_info}    Create Dictionary    logical_port_id=${logical_port_id}
     ${portmapdefine}    Create Dictionary    portmap=${logical_port_info}
     ${portmapdefine_json}=    json.dumps    ${portmapdefine}
-    ${resp}    RequestsLibrary.Put    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE}    data=${portmapdefine_json}
+    ${resp}    RequestsLibrary.Put Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE}    data=${portmapdefine_json}
     Should Be Equal As Strings    ${resp.status_code}    204
 
 Add a FLOWLIST
@@ -159,7 +159,7 @@ Add a FLOWLIST
     ${flowlistinfo}    Create Dictionary    fl_name=${flowlistname}    ip_version=${ipversion}
     ${flowlistcreate}    Create Dictionary    flowlist=${flowlistinfo}
     ${flowlistcreate_json}=    json.dumps    ${flowlistcreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${FLOWLISTS_CREATE}    data=${flowlistcreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${FLOWLISTS_CREATE}    data=${flowlistcreate_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Create FLOWLISTENTRY
@@ -169,7 +169,7 @@ Create FLOWLISTENTRY
     ...    ipsrcaddrprefix=32    ipproto=1
     ${flowlistentrycreate}    Create Dictionary    flowlistentry=${flowlistentryinfo}
     ${flowlistentrycreate_json}=    json.dumps    ${flowlistentrycreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}/${FLOWLISTENTRIES_CREATE}    data=${flowlistentrycreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}/${FLOWLISTENTRIES_CREATE}    data=${flowlistentrycreate_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Create FLOWLISTENTRY_ANY in FLOWLIST
@@ -178,7 +178,7 @@ Create FLOWLISTENTRY_ANY in FLOWLIST
     ${flowlistentryinfo}    Create Dictionary    seqnum=1
     ${flowlistentrycreate}    Create Dictionary    flowlistentry=${flowlistentryinfo}
     ${flowlistentrycreate_json}=    json.dumps    ${flowlistentrycreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}/${FLOWLISTENTRIES_CREATE}    data=${flowlistentrycreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}/${FLOWLISTENTRIES_CREATE}    data=${flowlistentrycreate_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Create VBRIF in FLOWFILTER
@@ -187,7 +187,7 @@ Create VBRIF in FLOWFILTER
     ${flowfilters_info}    Create Dictionary    ff_type=${ff_type}
     ${flowfiltersdefine}    Create Dictionary    flowfilter=${flowfilters_info}
     ${flowfiltersdefine_json}=    json.dumps    ${flowfiltersdefine}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS_CREATE}    data=${flowfiltersdefine_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS_CREATE}    data=${flowfiltersdefine_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Create FLOWFILTERENTRY DROP In VBRIFFLOWFILTER
@@ -196,7 +196,7 @@ Create FLOWFILTERENTRY DROP In VBRIFFLOWFILTER
     ${flowfilterentryinfo}    Create Dictionary    seqnum=233    fl_name=Flowlist1    action_type=${actiontype}    priority=3    dscp=55
     ${flowfilterentrycreate}    Create Dictionary    flowfilterentry=${flowfilterentryinfo}
     ${flowfilterentrycreate_json}=    json.dumps    ${flowfilterentrycreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE}    data=${flowfilterentrycreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE}    data=${flowfilterentrycreate_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Create FLOWFILTERENTRY PASS In VBRIFFLOWFILTER
@@ -205,7 +205,7 @@ Create FLOWFILTERENTRY PASS In VBRIFFLOWFILTER
     ${flowfilterentryinfo}    Create Dictionary    fl_name=Flowlist1    action_type=${actiontype}    priority=3    dscp=55
     ${flowfilterentrycreate}    Create Dictionary    flowfilterentry=${flowfilterentryinfo}
     ${flowfilterentrycreate_json}=    json.dumps    ${flowfilterentrycreate}
-    ${resp}    RequestsLibrary.Put    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS}/${FLOWFILTERS_UPDATE}/${seqnum}    data=${flowfilterentrycreate_json}
+    ${resp}    RequestsLibrary.Put Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS}/${FLOWFILTERS_UPDATE}/${seqnum}    data=${flowfilterentrycreate_json}
     Should Be Equal As Strings    ${resp.status_code}    204
 
 Create FLOWFILTER in VBR
@@ -214,7 +214,7 @@ Create FLOWFILTER in VBR
     ${flowfilters_info}    Create Dictionary    ff_type=${ff_type}
     ${flowfiltersdefine}    Create Dictionary    flowfilter=${flowfilters_info}
     ${flowfiltersdefine_json}=    json.dumps    ${flowfiltersdefine}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${FLOWFILTERS_CREATE}    data=${flowfiltersdefine_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${FLOWFILTERS_CREATE}    data=${flowfiltersdefine_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Create FLOWFILTERENTRY PASS in VBRFLOWFILTER
@@ -224,7 +224,7 @@ Create FLOWFILTERENTRY PASS in VBRFLOWFILTER
     ${flowfilterentryinfo_1}    Create Dictionary    vnode_name=${vbrname}    fl_name=Flowlist1    direction=in
     ${flowfilterentrycreate}    Create Dictionary    flowfilterentry=${flowfilterentryinfo}
     ${flowfilterentrycreate_json}=    json.dumps    ${flowfilterentrycreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE}    data=${flowfilterentrycreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE}    data=${flowfilterentrycreate_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Create FLOWFILTER in VTN
@@ -233,7 +233,7 @@ Create FLOWFILTER in VTN
     ${flowfilters_info}    Create Dictionary    ff_type=${ff_type}
     ${flowfiltersdefine}    Create Dictionary    flowfilter=${flowfilters_info}
     ${flowfiltersdefine_json}=    json.dumps    ${flowfiltersdefine}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${FLOWFILTERS_CREATE}    data=${flowfiltersdefine_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${FLOWFILTERS_CREATE}    data=${flowfiltersdefine_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Create FLOWFILTERENTRY PASS in VTNFLOWFILTER
@@ -242,7 +242,7 @@ Create FLOWFILTERENTRY PASS in VTNFLOWFILTER
     ${flowfilterentryinfo}    Create Dictionary    seqnum=233    fl_name=Flowlist1    action_type=${actiontype}    priority=3    dscp=55
     ${flowfilterentrycreate}    Create Dictionary    flowfilterentry=${flowfilterentryinfo}
     ${flowfilterentrycreate_json}=    json.dumps    ${flowfilterentrycreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE}    data=${flowfilterentrycreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE}    data=${flowfilterentrycreate_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Create VLANMAP in VBRIDGE
@@ -251,7 +251,7 @@ Create VLANMAP in VBRIDGE
     ${vlaninfo}    Create Dictionary    vlan_id=${vlanid}
     ${vlancreate}    Create Dictionary    vlanmap=${vlaninfo}
     ${vlancreate_json}=    json.dumps    ${vlancreate}
-    ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VLANMAP_CREATE }    data=${vlancreate_json}
+    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VLANMAP_CREATE }    data=${vlancreate_json}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Start vlan_topo
@@ -261,7 +261,7 @@ Start vlan_topo
 Delete a FLOWLIST
     [Arguments]    ${flowlistname}
     [Documentation]    Delete a Flowlist
-    ${resp}    RequestsLibrary.Delete    session    ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}.json
+    ${resp}    RequestsLibrary.Delete Request    session    ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}.json
     Should Be Equal As Strings    ${resp.status_code}    204
 
 Test Ping
@@ -274,7 +274,7 @@ Test Ping
 Verify Switch
     [Arguments]    ${ctrlname}    ${switch_id}
     [Documentation]    Get switch
-    ${resp}    RequestsLibrary.Get    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
+    ${resp}    RequestsLibrary.Get Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
     ${contents}    To JSON    ${resp.content}
     ${switchblock}    Get From Dictionary    ${contents}    switch
     ${status}    Get From Dictionary    ${switchblock}    switch_id
@@ -283,5 +283,5 @@ Verify Switch
 Verify SwitchPort
     [Arguments]    ${ctrlname}    ${switch_id}
     [Documentation]    Get switch
-    ${resp}    RequestsLibrary.Get    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
+    ${resp}    RequestsLibrary.Get Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
     Should Be Equal As Strings    ${resp.status_code}    200
index 6b6406b0f118dc13349e9c6bdd8287eb8ffef20b..07e26baae9d096d08516fe650746751b69e41f40 100644 (file)
@@ -57,50 +57,50 @@ Stop SuiteVtnMaTest
 
 Fetch vtn list
     [Documentation]    Check if VTN Manager is up.
-    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT_VTNS}
+    ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT_VTNS}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Fetch vtn switch inventory
     [Arguments]    ${sw_name}
     [Documentation]    Check if Switch is detected.
-    ${resp}=    RequestsLibrary.Get    session    ${VTN_INVENTORY}/vtn-inventory:vtn-node/${sw_name}
+    ${resp}=    RequestsLibrary.Get Request    session    ${VTN_INVENTORY}/vtn-inventory:vtn-node/${sw_name}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Add a vtn
     [Arguments]    ${vtn_name}    ${vtn_data}
     [Documentation]    Create a vtn with specified parameters.
-    ${resp}=    RequestsLibrary.Post    session    ${REST_CONTEXT_VTNS}/${vtn_name}    data=${vtn_data}
+    ${resp}=    RequestsLibrary.Post Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}    data=${vtn_data}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Delete a vtn
     [Arguments]    ${vtn_name}
     [Documentation]    Create a vtn with specified parameters.
-    ${resp}=    RequestsLibrary.Delete    session    ${REST_CONTEXT_VTNS}/${vtn_name}
+    ${resp}=    RequestsLibrary.Delete Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Add a vBridge
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${vBridge_data}
     [Documentation]    Create a vBridge in a VTN
-    ${resp}=    RequestsLibrary.Post    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}    data=${vBridge_data}
+    ${resp}=    RequestsLibrary.Post Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}    data=${vBridge_data}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Add a interface
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${interface_name}    ${interface_data}
     [Documentation]    Create a interface into a vBridge of a VTN
-    ${resp}=    RequestsLibrary.Post    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}    data=${interface_data}
+    ${resp}=    RequestsLibrary.Post Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}    data=${interface_data}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Add a portmap
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${interface_name}    ${portmap_data}
     [Documentation]    Create a portmap for a interface of a vbridge
     ${json_data}=    json.dumps    ${portmap_data}
-    ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap    data=${json_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Put Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap    data=${json_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Verify Data Flows
     [Arguments]    ${vtn_name}    ${vBridge_name}
     [Documentation]    Verify the reason and physical data flows for the specified vtn and vbridge
-    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT_VTNS}/${vtn_name}/flows/detail
+    ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/flows/detail
     Run Keyword If    '${vBridge_name}' == 'vBridge1'    DataFlowsForBridge    ${resp}    @{BRIDGE1_DATAFLOW}
     ...    ELSE IF    '${vBridge_name}' == 'vBridge2'    DataFlowsForBridge    ${resp}    @{BRIDGE2_DATAFLOW}
     ...    ELSE IF    '${vBridge_name}' == 'vBridge1_vlan'    DataFlowsForBridge    ${resp}    @{VLANMAP_BRIDGE1_DATAFLOW}
@@ -116,12 +116,12 @@ Add a pathmap
     [Arguments]    ${pathmap_data}
     [Documentation]    Create a pathmap for a vtn
     ${json_data}=    json.dumps    ${pathmap_data}
-    ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT}/pathmaps/${policy_id}    data=${pathmap_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Put Request    session    ${REST_CONTEXT}/pathmaps/${policy_id}    data=${pathmap_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Get a pathmap
     [Documentation]    Get a pathmap for a vtn.
-    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT}/pathmaps
+    ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/pathmaps
     : FOR    ${pathElement}    IN    @{PATHMAP_ATTR}
     \    should Contain    ${resp.content}    ${pathElement}
 
@@ -129,12 +129,12 @@ Add a pathpolicy
     [Arguments]    ${pathpolicy_data}
     [Documentation]    Create a pathpolicy for a vtn
     ${json_data}=    json.dumps    ${pathpolicy_data}
-    ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT}/pathpolicies/${policy_id}    data=${pathpolicy_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Put Request    session    ${REST_CONTEXT}/pathpolicies/${policy_id}    data=${pathpolicy_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Get a pathpolicy
     [Documentation]    Get a pathpolicy for a vtn.
-    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT}/pathpolicies/${policy_id}
+    ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/pathpolicies/${policy_id}
     : FOR    ${pathpolicyElement}    IN    @{PATHPOLICY_ATTR}
     \    should Contain    ${resp.content}    ${pathpolicyElement}
 
@@ -163,23 +163,23 @@ Stop PathSuiteVtnMaTest
 
 Delete a pathmap
     [Documentation]    Delete a pathmap for a vtn
-    ${resp}=    RequestsLibrary.Delete    session    ${REST_CONTEXT}/pathmaps/1
+    ${resp}=    RequestsLibrary.Delete Request    session    ${REST_CONTEXT}/pathmaps/1
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Get a pathmap after delete
     [Documentation]    Get a pathmap for a vtn.
-    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT}/pathmaps
+    ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/pathmaps
     : FOR    ${pathElement}    IN    @{PATHMAP_ATTR}
     \    should Not Contain    ${resp.content}    ${pathElement}
 
 Delete a pathpolicy
     [Documentation]    Delete a pathpolicy for a vtn
-    ${resp}=    RequestsLibrary.Delete    session    ${REST_CONTEXT}/pathpolicies/1
+    ${resp}=    RequestsLibrary.Delete Request    session    ${REST_CONTEXT}/pathpolicies/1
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Get a pathpolicy after delete
     [Documentation]    Get a pathpolicy for a vtn after delete.
-    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT}/pathpolicies/${policy_id}
+    ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/pathpolicies/${policy_id}
     : FOR    ${pathpolicyElement}    IN    @{PATHPOLICY_ATTR}
     \    should Not Contain    ${resp.content}    ${pathpolicyElement}
 
@@ -187,7 +187,7 @@ Add a macmap
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${macmap_data}
     [Documentation]    Create a macmap for a vbridge
     ${json_data}=    json.dumps    ${macmap_data}
-    ${resp}=    RequestsLibrary.Post    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/macmap/allow    data=${macmap_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Post Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/macmap/allow    data=${macmap_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Get DynamicMacAddress
@@ -204,7 +204,7 @@ Add a vBridgeMacMapping
     [Arguments]    ${tenant_name}    ${Bridge_name}    ${bridge_macmap_data}
     [Documentation]    Create a vbridge macmap for a bridge
     ${json_data}=    json.dumps    ${bridge_macmap_data}
-    ${resp}=    RequestsLibrary.Post    session    ${REST_CONTEXT_VTNS}/${tenant_name}/vbridges/${Bridge_name}/macmap/allow    data=${json_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Post Request    session    ${REST_CONTEXT_VTNS}/${tenant_name}/vbridges/${Bridge_name}/macmap/allow    data=${json_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Mininet Ping Should Succeed
@@ -224,7 +224,7 @@ Mininet Ping Should Not Succeed
 Delete a interface
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${interface_name}
     [Documentation]    Delete a interface with specified parameters.
-    ${resp}=    RequestsLibrary.Delete    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}
+    ${resp}=    RequestsLibrary.Delete Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Start vlan_topo
@@ -242,20 +242,20 @@ Start vlan_topo
 Add a vlanmap
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${vlanmap_data}
     [Documentation]    Create a vlanmap
-    ${resp}=    RequestsLibrary.Post    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/vlanmaps/    data=${vlanmap_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Post Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/vlanmaps/    data=${vlanmap_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Get flow
     [Arguments]    ${vtn_name}
     [Documentation]    Get data flow.
-    ${resp}=    RequestsLibrary.Get    session    ${REST_CONTEXT_VTNS}/${vtn_name}/flows/detail
+    ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/flows/detail
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Remove a portmap
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${interface_name}    ${portmap_data}
     [Documentation]    Remove a portmap for a interface of a vbridge
     ${json_data}=    json.dumps    ${portmap_data}
-    ${resp}=    RequestsLibrary.Delete    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap    data=${json_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Delete Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap    data=${json_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Verify FlowMacAddress
@@ -304,43 +304,43 @@ Add a flowcondition
     [Arguments]    ${cond_name}    ${flowcond_data}
     [Documentation]    Create a flowcondition for a interface of a vbridge
     ${json_data}=    json.dumps    ${flowcond_data}
-    ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT}/flowconditions/${cond_name}    data=${json_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Put Request    session    ${REST_CONTEXT}/flowconditions/${cond_name}    data=${json_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Delete a flowcondition
     [Arguments]    ${cond_name}
     [Documentation]    Delete a flowcondition for a interface of a vbridge
-    ${resp}=    RequestsLibrary.Delete    session    ${REST_CONTEXT}/flowconditions/${cond_name}
+    ${resp}=    RequestsLibrary.Delete Request    session    ${REST_CONTEXT}/flowconditions/${cond_name}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Add a flowfilter
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${interface_name}    ${flowfilter_data}    ${ff_index}
     [Documentation]    Create a flowfilter for a vtn
-    ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index}    data=${flowfilter_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Put Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index}    data=${flowfilter_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Add a flowfilter_vtn
     [Arguments]    ${vtn_name}    ${flowfilter_data}    ${ff_index}
     [Documentation]    Create a flowfilter for a vtn
-    ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT_VTNS}/${vtn_name}/flowfilters/${ff_index}    data=${flowfilter_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Put Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/flowfilters/${ff_index}    data=${flowfilter_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Add a flowfilter_vbr
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${flowfilter_data}    ${ff_index}
     [Documentation]    Create a flowfilter for a vbr
-    ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/flowfilters/IN/${ff_index}    data=${flowfilter_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Put Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/flowfilters/IN/${ff_index}    data=${flowfilter_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    201
 
 Update a flowfilter
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${interface_name}    ${flowfilter_data}    ${ff_index}
     [Documentation]    Create a flowfilter for a vtn
-    ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index}    data=${flowfilter_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Put Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index}    data=${flowfilter_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Add a flowfilter for drop
     [Arguments]    ${vtn_name}    ${vBridge_name}    ${interface_name}    ${flowfilter_data}    ${ff_index}
     [Documentation]    Create a flowfilter for a vtn
-    ${resp}=    RequestsLibrary.Put    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index}    data=${flowfilter_data}    headers=${HEADERS}
+    ${resp}=    RequestsLibrary.Put Request    session    ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/flowfilters/IN/${ff_index}    data=${flowfilter_data}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Verify Flow Entry for Inet Flowfilter