From 00773301bfc678e4139e5690f982735de3405fdc Mon Sep 17 00:00:00 2001 From: srisankethu Date: Sun, 25 Dec 2016 13:59:31 +0530 Subject: [PATCH] Update RequestsLibrary deprecated calls Change-Id: I348939a2888a791311cb29d3cdeae87cd888d1ff Signed-off-by: srisankethu --- csit/suites/armoury/basic/010_Restconf_OK.robot | 2 +- .../NETCONF/010__netconf_inventory.robot | 8 ++++---- .../Lacp_Feature_OF13/010__lacp_inventory.robot | 16 ++++++++-------- .../020_Stats_Collection_Gauss.robot | 2 +- .../030_Stats_Collection_Linear.robot | 2 +- .../040_Stats_Collection_One.robot | 2 +- .../050_Stats_Collection_FirstTable.robot | 2 +- .../060_Stats_Collection_Basic16kScenario.robot | 4 ++-- ...tats_Collection_100k_WithMininetRestart.robot | 4 ++-- ...c_100k_Flows_Configuration_Time_Measure.robot | 2 +- .../090_BulkMaticConfigDsSetup_100k.robot | 2 +- .../Sanity3Node/010__Flows_OF13_Cluster.robot | 12 ++++++------ csit/suites/snmp/snmp-get/010__snmp_get.robot | 2 +- csit/suites/usc/channel/USC_CHANNEL.robot | 2 +- 14 files changed, 31 insertions(+), 31 deletions(-) diff --git a/csit/suites/armoury/basic/010_Restconf_OK.robot b/csit/suites/armoury/basic/010_Restconf_OK.robot index 7fe98847e2..8ec9c49d11 100644 --- a/csit/suites/armoury/basic/010_Restconf_OK.robot +++ b/csit/suites/armoury/basic/010_Restconf_OK.robot @@ -10,7 +10,7 @@ Resource ../../../libraries/Utils.robot *** Test Cases *** Get Controller Modules [Documentation] Get the controller modules via Restconf - ${resp} RequestsLibrary.Get session ${MODULES_API} + ${resp} RequestsLibrary.Get Request session ${MODULES_API} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ietf-restconf diff --git a/csit/suites/controller/NETCONF/010__netconf_inventory.robot b/csit/suites/controller/NETCONF/010__netconf_inventory.robot index 2749e1779c..b5db3b6921 100644 --- a/csit/suites/controller/NETCONF/010__netconf_inventory.robot +++ b/csit/suites/controller/NETCONF/010__netconf_inventory.robot @@ -26,7 +26,7 @@ Add NetConf device ${XML2} Replace String ${XML1} 127.0.0.1 ${NETOPEER} ${body} Replace String ${XML2} mininet ${NETOPEER_USER} Log ${body} - ${resp} Post session ${REST_CONT_CONF}/${REST_NTPR_CONF} data=${body} + ${resp} Post Request session ${REST_CONT_CONF}/${REST_NTPR_CONF} data=${body} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 204 @@ -38,7 +38,7 @@ Get Controller Inventory Pull External Device configuration [Documentation] Pull Netopeer configuration [Tags] netconf - ${resp} Get session ${REST_CONT_CONF}/${REST_NTPR_MOUNT} + ${resp} Get Request session ${REST_CONT_CONF}/${REST_NTPR_MOUNT} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} {} @@ -46,7 +46,7 @@ Pull External Device configuration Verify Device Operational data [Documentation] Verify Netopeer operational data [Tags] exclude - ${resp} Get session ${REST_CONT_OPER}/${REST_NTPR_MOUNT} + ${resp} Get Request session ${REST_CONT_OPER}/${REST_NTPR_MOUNT} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} schema @@ -55,7 +55,7 @@ Verify Device Operational data *** Keywords *** Get Inventory - ${resp} Get session ${REST_CONT_OPER}/node/netopeer + ${resp} Get Request session ${REST_CONT_OPER}/node/netopeer Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} "node-id":"netopeer" diff --git a/csit/suites/lacp/Lacp_Feature_OF13/010__lacp_inventory.robot b/csit/suites/lacp/Lacp_Feature_OF13/010__lacp_inventory.robot index 140452500a..59410d765d 100644 --- a/csit/suites/lacp/Lacp_Feature_OF13/010__lacp_inventory.robot +++ b/csit/suites/lacp/Lacp_Feature_OF13/010__lacp_inventory.robot @@ -20,19 +20,19 @@ ${agg2-connector-id2} 4 *** Test Cases *** Get the Specific Node Inventory and Lacp aggregator details [Documentation] Get the lacp-aggregator data for specific node - ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1} + ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1} Verify LACP RESTAPI Response Code for node ${resp} Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} ${agg-id1} Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} ${agg-id2} Get information of each lacp-aggregator for a node [Documentation] Get each lacp-aggregator data for a node - ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id1} + ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id1} Verify LACP RESTAPI Response Code for node ${resp} Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg1-connector-id1} Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg1-connector-id2} Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} lag-groupid - ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2} + ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2} Verify LACP RESTAPI Response Code for node ${resp} Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id1} Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id2} @@ -40,16 +40,16 @@ Get information of each lacp-aggregator for a node Get node connector data for node 1 [Documentation] Get the node connector inventory for node 1 - ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg1-connector-id1} + ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg1-connector-id1} Verify LACP RESTAPI Response Code for node ${resp} Verify specific LACP node connector data for node ${resp.content} ${agg-id1} agg-id - ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg1-connector-id2} + ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg1-connector-id2} Verify LACP RESTAPI Response Code for node ${resp} Verify specific LACP node connector data for node ${resp.content} ${agg-id1} agg-id - ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg2-connector-id1} + ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg2-connector-id1} Verify LACP RESTAPI Response Code for node ${resp} Verify specific LACP node connector data for node ${resp.content} ${agg-id2} agg-id - ${resp} Get session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg2-connector-id2} + ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg2-connector-id2} Verify LACP RESTAPI Response Code for node ${resp} Verify specific LACP node connector data for node ${resp.content} ${agg-id2} agg-id @@ -77,7 +77,7 @@ Verify specific LACP node connector data for node Verify LACP Tags Are Formed [Documentation] Fundamental Check That LACP is working - ${resp} Get session ${OPERATIONAL_NODES_API} + ${resp} Get Request session ${OPERATIONAL_NODES_API} Verify LACP RESTAPI Response Code for node ${resp} Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} non-lag-groupid Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} lacp-aggregators diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/020_Stats_Collection_Gauss.robot b/csit/suites/openflowplugin/Performance_Flow_Config/020_Stats_Collection_Gauss.robot index cc9ab8aa90..d0a6ac78d3 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/020_Stats_Collection_Gauss.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/020_Stats_Collection_Gauss.robot @@ -64,7 +64,7 @@ Stop Switches Are Switches Connected Topo [Documentation] Checks wheather switches are connected to controller - ${resp}= Get session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML} + ${resp}= Get Request session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML} Log ${resp.content} ${count}= Get Element Count ${resp.content} xpath=node Should Be Equal As Numbers ${count} ${swnr} diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/030_Stats_Collection_Linear.robot b/csit/suites/openflowplugin/Performance_Flow_Config/030_Stats_Collection_Linear.robot index e02fd72b06..b7e44735af 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/030_Stats_Collection_Linear.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/030_Stats_Collection_Linear.robot @@ -64,7 +64,7 @@ Stop Switches Are Switches Connected Topo [Documentation] Checks wheather switches are connected to controller - ${resp}= Get session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML} + ${resp}= Get Request session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML} Log ${resp.content} ${count}= Get Element Count ${resp.content} xpath=node Should Be Equal As Numbers ${count} ${swnr} diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/040_Stats_Collection_One.robot b/csit/suites/openflowplugin/Performance_Flow_Config/040_Stats_Collection_One.robot index 9d309d5b43..f7e6d3fbc8 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/040_Stats_Collection_One.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/040_Stats_Collection_One.robot @@ -64,7 +64,7 @@ Stop Switches Are Switches Connected Topo [Documentation] Checks wheather switches are connected to controller - ${resp}= Get session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML} + ${resp}= Get Request session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML} Log ${resp.content} ${count}= Get Element Count ${resp.content} xpath=node Should Be Equal As Numbers ${count} ${swnr} diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/050_Stats_Collection_FirstTable.robot b/csit/suites/openflowplugin/Performance_Flow_Config/050_Stats_Collection_FirstTable.robot index 0653e2cd2a..c008e5eb00 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/050_Stats_Collection_FirstTable.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/050_Stats_Collection_FirstTable.robot @@ -64,7 +64,7 @@ Stop Switches Are Switches Connected Topo [Documentation] Checks wheather switches are connected to controller - ${resp}= Get session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML} + ${resp}= Get Request session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML} Log ${resp.content} ${count}= Get Element Count ${resp.content} xpath=node Should Be Equal As Numbers ${count} ${swnr} diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/060_Stats_Collection_Basic16kScenario.robot b/csit/suites/openflowplugin/Performance_Flow_Config/060_Stats_Collection_Basic16kScenario.robot index 76fbae4663..0d90064ad2 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/060_Stats_Collection_Basic16kScenario.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/060_Stats_Collection_Basic16kScenario.robot @@ -111,7 +111,7 @@ Delete Http Session Are Switches Connected Topo [Documentation] Checks wheather switches are connected to controller - ${resp}= Get session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML} + ${resp}= Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML} Log ${resp.content} ${count}= Get Element Count ${resp.content} xpath=node Should Be Equal As Numbers ${count} ${swnr} @@ -122,6 +122,6 @@ Check Flows Inventory Should Be True ${res} Check No Switches Inventory - ${resp}= Get session ${OPERATIONAL_NODES_API} + ${resp}= Get Request session ${OPERATIONAL_NODES_API} Log ${resp.content} Should Be Equal As Strings '${resp.content}' '{"nodes":{}}' diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/070_Stats_Collection_100k_WithMininetRestart.robot b/csit/suites/openflowplugin/Performance_Flow_Config/070_Stats_Collection_100k_WithMininetRestart.robot index 3526451946..6e0ade87c1 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/070_Stats_Collection_100k_WithMininetRestart.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/070_Stats_Collection_100k_WithMininetRestart.robot @@ -78,7 +78,7 @@ Check Flows Are Operational Again Deconfigure Flows [Documentation] Flows deconfiguration - ${resp}= Delete session ${CONFIG_NODES_API} + ${resp}= Delete Request session ${CONFIG_NODES_API} Should Be Equal As Numbers ${resp.status_code} 200 Check No Flows In Operational Last @@ -126,7 +126,7 @@ Delete Http Session And Store Plot Data Are Switches Connected Topo [Documentation] Checks wheather switches are connected to controller - ${resp}= Get session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML} + ${resp}= Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML} Log ${resp.content} ${count}= Get Element Count ${resp.content} xpath=node Should Be Equal As Numbers ${count} ${swnr} diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/080_Rpc_100k_Flows_Configuration_Time_Measure.robot b/csit/suites/openflowplugin/Performance_Flow_Config/080_Rpc_100k_Flows_Configuration_Time_Measure.robot index 09ff91f5c6..3e62123cbb 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/080_Rpc_100k_Flows_Configuration_Time_Measure.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/080_Rpc_100k_Flows_Configuration_Time_Measure.robot @@ -99,7 +99,7 @@ Delete Http Session And Store Plot Data Are Switches Connected Topo [Documentation] Checks wheather switches are connected to controller - ${resp}= Get session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML} + ${resp}= Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML} Log ${resp.content} ${count}= Get Element Count ${resp.content} xpath=node Should Be Equal As Numbers ${count} ${swnr} diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/090_BulkMaticConfigDsSetup_100k.robot b/csit/suites/openflowplugin/Performance_Flow_Config/090_BulkMaticConfigDsSetup_100k.robot index 4474e0a2b3..71c74435e1 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/090_BulkMaticConfigDsSetup_100k.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/090_BulkMaticConfigDsSetup_100k.robot @@ -99,7 +99,7 @@ Delete Http Session And Store Plot Data Are Switches Connected Topo [Documentation] Checks wheather switches are connected to controller - ${resp}= Get session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML} + ${resp}= Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML} Log ${resp.content} ${count}= Get Element Count ${resp.content} xpath=node Should Be Equal As Numbers ${count} ${swnr} diff --git a/csit/suites/openflowplugin/Sanity3Node/010__Flows_OF13_Cluster.robot b/csit/suites/openflowplugin/Sanity3Node/010__Flows_OF13_Cluster.robot index 86d4808076..1e726f0127 100644 --- a/csit/suites/openflowplugin/Sanity3Node/010__Flows_OF13_Cluster.robot +++ b/csit/suites/openflowplugin/Sanity3Node/010__Flows_OF13_Cluster.robot @@ -48,7 +48,7 @@ Logging Initial Cluster Information Add Flow 1 To Controller1 Init Flow Variables 1 1 1 Log ${data} - ${resp}= Put session1 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data} + ${resp}= Put Request session1 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data} Log ${resp.content} ${msg}= Set Variable Adding flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} @@ -56,7 +56,7 @@ Add Flow 1 To Controller1 Add Flow 2 To Controller2 Init Flow Variables 1 2 2 Log ${data} - ${resp}= Put session2 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data} + ${resp}= Put Request session2 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data} Log ${resp.content} ${msg}= Set Variable Adding flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} @@ -64,7 +64,7 @@ Add Flow 2 To Controller2 Add Flow 3 To Controller3 Init Flow Variables 1 3 3 Log ${data} - ${resp}= Put session3 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data} + ${resp}= Put Request session3 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data} Log ${resp.content} ${msg}= Set Variable Adding flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} @@ -240,21 +240,21 @@ Check Flow 3 Operational On Controller3 Delete Flow 1 On Controller1 Init Flow Variables 1 1 1 - ${resp}= Delete session1 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} + ${resp}= Delete Request session1 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} Log ${resp.content} ${msg}= Set Variable Delete flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} Delete Flow 2 On Controller2 Init Flow Variables 1 2 2 - ${resp}= Delete session2 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} + ${resp}= Delete Request session2 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} Log ${resp.content} ${msg}= Set Variable Delete flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} Delete Flow 3 On Controller3 Init Flow Variables 1 3 3 - ${resp}= Delete session3 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} + ${resp}= Delete Request session3 ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} Log ${resp.content} ${msg}= Set Variable Delete flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/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/suites/snmp/snmp-get/010__snmp_get.robot b/csit/suites/snmp/snmp-get/010__snmp_get.robot index 7bc520a0f0..8197fc70c0 100644 --- a/csit/suites/snmp/snmp-get/010__snmp_get.robot +++ b/csit/suites/snmp/snmp-get/010__snmp_get.robot @@ -18,6 +18,6 @@ ${DEVICE_IP} 10.86.3.13 List connections [Documentation] SNMP get [Tags] SNMP get - ${resp} RequestsLibrary.Post session ${REST_CONTEXT_SNMP_SET} data={"input": {"ip-address": "${DEVICE_IP}","oid" : "1.3.6.1.2.1.1.1.0","get-type" : "GET-BULK","community" : "private" } } + ${resp} RequestsLibrary.Post Request session ${REST_CONTEXT_SNMP_SET} data={"input": {"ip-address": "${DEVICE_IP}","oid" : "1.3.6.1.2.1.1.1.0","get-type" : "GET-BULK","community" : "private" } } Should Be Equal As Strings ${resp.status_code} 200 [Teardown] Report_Failure_Due_To_Bug 5360 diff --git a/csit/suites/usc/channel/USC_CHANNEL.robot b/csit/suites/usc/channel/USC_CHANNEL.robot index a69b1c5484..ad33f59af4 100644 --- a/csit/suites/usc/channel/USC_CHANNEL.robot +++ b/csit/suites/usc/channel/USC_CHANNEL.robot @@ -12,7 +12,7 @@ Resource ../../../libraries/Utils.robot *** Test Cases *** Get Controller Modules [Documentation] Get the controller modules via Restconf - ${resp} RequestsLibrary.Get session ${MODULES_API} + ${resp} RequestsLibrary.Get Request session ${MODULES_API} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ietf-restconf -- 2.36.6