From af10a8780c93a7ac8b8fde288b776cf98e04582a Mon Sep 17 00:00:00 2001 From: Junaid Zulfiqar Date: Wed, 3 Feb 2016 20:23:21 -0800 Subject: [PATCH] Moved calls to "RequestLibrary. Request" in csit/libraries/ + 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 --- csit/libraries/AAAKeywords.robot | 8 ++-- csit/libraries/ConfigViaRestconf.robot | 8 ++-- csit/libraries/DIDMKeywords.robot | 2 +- csit/libraries/DatastoreCRUD.robot | 10 ++--- csit/libraries/FlowLib.robot | 28 ++++++------ csit/libraries/GBP/RestconfUtils.robot | 4 +- csit/libraries/NetconfViaRestconf.robot | 8 ++-- csit/libraries/NicKeywords.robot | 10 ++--- csit/libraries/PcepOperations.robot | 2 +- csit/libraries/Scalability.robot | 14 +++--- csit/libraries/SwitchUtils.robot | 4 +- csit/libraries/Utils.robot | 4 +- csit/libraries/VtnCoKeywords.robot | 50 ++++++++++----------- csit/libraries/VtnMaKeywordsLi.robot | 58 ++++++++++++------------- 14 files changed, 105 insertions(+), 105 deletions(-) diff --git a/csit/libraries/AAAKeywords.robot b/csit/libraries/AAAKeywords.robot index 9d05bb69a8..a77d5157c0 100644 --- a/csit/libraries/AAAKeywords.robot +++ b/csit/libraries/AAAKeywords.robot @@ -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} diff --git a/csit/libraries/ConfigViaRestconf.robot b/csit/libraries/ConfigViaRestconf.robot index d80dee6fe1..d0e42945a9 100644 --- a/csit/libraries/ConfigViaRestconf.robot +++ b/csit/libraries/ConfigViaRestconf.robot @@ -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} diff --git a/csit/libraries/DIDMKeywords.robot b/csit/libraries/DIDMKeywords.robot index 6a69d48c37..036105c4a1 100644 --- a/csit/libraries/DIDMKeywords.robot +++ b/csit/libraries/DIDMKeywords.robot @@ -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 diff --git a/csit/libraries/DatastoreCRUD.robot b/csit/libraries/DatastoreCRUD.robot index 7995cc3319..7ac899c931 100644 --- a/csit/libraries/DatastoreCRUD.robot +++ b/csit/libraries/DatastoreCRUD.robot @@ -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} @@ -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} @@ -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} 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} Assemble Payload diff --git a/csit/libraries/FlowLib.robot b/csit/libraries/FlowLib.robot index c52481f0f7..f982c65089 100644 --- a/csit/libraries/FlowLib.robot +++ b/csit/libraries/FlowLib.robot @@ -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} diff --git a/csit/libraries/GBP/RestconfUtils.robot b/csit/libraries/GBP/RestconfUtils.robot index 6d496cc039..50c52e17b6 100644 --- a/csit/libraries/GBP/RestconfUtils.robot +++ b/csit/libraries/GBP/RestconfUtils.robot @@ -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']} diff --git a/csit/libraries/NetconfViaRestconf.robot b/csit/libraries/NetconfViaRestconf.robot index fe794b9104..4d55e50f10 100644 --- a/csit/libraries/NetconfViaRestconf.robot +++ b/csit/libraries/NetconfViaRestconf.robot @@ -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} diff --git a/csit/libraries/NicKeywords.robot b/csit/libraries/NicKeywords.robot index f2c90a52da..7e142861fd 100644 --- a/csit/libraries/NicKeywords.robot +++ b/csit/libraries/NicKeywords.robot @@ -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 diff --git a/csit/libraries/PcepOperations.robot b/csit/libraries/PcepOperations.robot index 74ab90219e..78130a83f1 100644 --- a/csit/libraries/PcepOperations.robot +++ b/csit/libraries/PcepOperations.robot @@ -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} diff --git a/csit/libraries/Scalability.robot b/csit/libraries/Scalability.robot index 4d84327048..71c9d24212 100644 --- a/csit/libraries/Scalability.robot +++ b/csit/libraries/Scalability.robot @@ -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} diff --git a/csit/libraries/SwitchUtils.robot b/csit/libraries/SwitchUtils.robot index 4058ff0549..349964e692 100644 --- a/csit/libraries/SwitchUtils.robot +++ b/csit/libraries/SwitchUtils.robot @@ -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} diff --git a/csit/libraries/Utils.robot b/csit/libraries/Utils.robot index 097285771a..c182b2b311 100644 --- a/csit/libraries/Utils.robot +++ b/csit/libraries/Utils.robot @@ -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} diff --git a/csit/libraries/VtnCoKeywords.robot b/csit/libraries/VtnCoKeywords.robot index e01f80b8dc..aa986fc706 100644 --- a/csit/libraries/VtnCoKeywords.robot +++ b/csit/libraries/VtnCoKeywords.robot @@ -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 diff --git a/csit/libraries/VtnMaKeywordsLi.robot b/csit/libraries/VtnMaKeywordsLi.robot index 6b6406b0f1..07e26baae9 100644 --- a/csit/libraries/VtnMaKeywordsLi.robot +++ b/csit/libraries/VtnMaKeywordsLi.robot @@ -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 -- 2.36.6