Migrate Get Requests invocations(libraries) 09/111109/7 master
authorYaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Wed, 27 Mar 2024 14:35:50 +0000 (16:35 +0200)
committerYaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Mon, 8 Apr 2024 10:29:11 +0000 (13:29 +0300)
The 'Get Request' RequestsLibrary keyword has been deprecated.
'Get Request' has been replaced by 'GET On Session'.

JIRA: INTTEST-141
Change-Id: I2128046b5a97126ad33927b099f605fc92715e81
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
120 files changed:
csit/libraries/AAAKeywords.robot
csit/libraries/BGPSpeaker.robot
csit/libraries/BGPcliKeywords.robot
csit/libraries/BgpOperations.robot
csit/libraries/BulkomaticKeywords.robot
csit/libraries/ChangeCounter.robot
csit/libraries/ClusterManagement.robot
csit/libraries/ClusterOpenFlow.robot
csit/libraries/CrudLibrary.py
csit/libraries/DIDMKeywords.robot
csit/libraries/DaeximKeywords.robot
csit/libraries/DataModels.robot
csit/libraries/DatastoreCRUD.robot
csit/libraries/ExaBgpLib.robot
csit/libraries/FlowLib.robot
csit/libraries/GoBgpLib.robot
csit/libraries/MdsalLowlevelPy.py
csit/libraries/NetconfCallHome.robot
csit/libraries/NexusKeywords.robot
csit/libraries/OVSDB.robot
csit/libraries/PcepOperations.robot
csit/libraries/PrefixCounting.robot
csit/libraries/SettingsLibrary.py
csit/libraries/SwitchUtils.robot
csit/libraries/SxpBindingOriginsLib.robot
csit/libraries/SxpClusterLib.robot
csit/libraries/SxpLib.robot
csit/libraries/TemplatedRequests.robot
csit/libraries/TopoprocessingKeywords.robot
csit/libraries/Utils.robot
csit/libraries/VtnMaKeywords.robot
csit/libraries/WorkflowsOpenFlow.robot
csit/suites/aaa/authn/Restconf_Basic_Auth.robot
csit/suites/aaa/keystone/010__keystone_authn.robot
csit/suites/aaa/tls/010__aaa_restconf_tls.robot
csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot
csit/suites/bgpcep/bgpflowspec/010_bgp_flowspec.robot
csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot
csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot
csit/suites/bgpcep/bgpfunct/090_bgp_functional_rt_constrain_validation.robot
csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot
csit/suites/bgpcep/pcepuser/pcepuser.robot
csit/suites/controller/NETCONF/010__netconf_inventory.robot
csit/suites/controller/OneNode_Datastore/010_crud_mdsal_perf.robot
csit/suites/controller/ThreeNodes_Datastore/010_crud_mdsal_perf.robot
csit/suites/controller/ThreeNodes_Datastore/puts_during_isolation.robot
csit/suites/controller/singleton_service/global_rpc_freeze.robot
csit/suites/controller/singleton_service/global_rpc_isolate.robot
csit/suites/controller/singleton_service/global_rpc_kill.robot
csit/suites/daexim/020-import-basic.robot
csit/suites/l2switch/Inventory_Scalability_OF13/010__restconf_inventory.robot
csit/suites/l2switch/Inventory_Scalability_OF13/020__restconf_topology.robot
csit/suites/openflowplugin/Bug_Validation/6917.robot
csit/suites/openflowplugin/Bug_Validation/7258.robot
csit/suites/openflowplugin/Bug_Validation/7335.robot
csit/suites/openflowplugin/Bug_Validation/7349.robot
csit/suites/openflowplugin/Bug_Validation/8723.robot
csit/suites/openflowplugin/Bundlebased_Reconciliation/010_bundle_resync.robot
csit/suites/openflowplugin/Clustered_Reconciliation/010_Group_Flows.robot
csit/suites/openflowplugin/Flows_Additional_TCs/010_Lithium_Rps_Calls_Ovs.robot
csit/suites/openflowplugin/Flows_Additional_TCs/020_Lithium_Rps_Calls_Cpqd.robot
csit/suites/openflowplugin/Flows_Additional_TCs/030_Flow_Update_Test.robot
csit/suites/openflowplugin/Flows_Stats_OF13/010__SM_add_upd_del_flows.robot
csit/suites/openflowplugin/Groups_Meters_OF13/005__openflow_group.robot
csit/suites/openflowplugin/Groups_Meters_OF13/010__openflow_meter.robot
csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot
csit/suites/openflowplugin/Inventory_Scalability_OF10/020__restconf_topology.robot
csit/suites/openflowplugin/Inventory_Scalability_OF13/010__restconf_inventory.robot
csit/suites/openflowplugin/Inventory_Scalability_OF13/020__restconf_topology.robot
csit/suites/openflowplugin/MD_SAL_NSF_OF10/020_restconf_topology.robot
csit/suites/openflowplugin/MD_SAL_NSF_OF10/040_restconf_frm.robot
csit/suites/openflowplugin/MD_SAL_NSF_OF13/020_restconf_topology.robot
csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot
csit/suites/openflowplugin/Performance_Flow_Config/010_Rest_Config_Flows.robot
csit/suites/openflowplugin/Performance_Flow_Config/020_Stats_Collection_Gauss.robot
csit/suites/openflowplugin/Performance_Flow_Config/030_Stats_Collection_Linear.robot
csit/suites/openflowplugin/Performance_Flow_Config/040_Stats_Collection_One.robot
csit/suites/openflowplugin/Performance_Flow_Config/050_Stats_Collection_FirstTable.robot
csit/suites/openflowplugin/Performance_Flow_Config/060_Stats_Collection_Basic16kScenario.robot
csit/suites/openflowplugin/Performance_Flow_Config/070_Stats_Collection_100k_WithMininetRestart.robot
csit/suites/openflowplugin/Performance_Flow_Config/080_Rpc_100k_Flows_Configuration_Time_Measure.robot
csit/suites/openflowplugin/Performance_Flow_Config/090_BulkMaticConfigDsSetup_100k.robot
csit/suites/openflowplugin/Reconciliation/010_Group_Flows.robot
csit/suites/ovsdb/Southbound_Domain/010__configure_1_ovsdb_node.robot
csit/suites/ovsdb/Southbound_Domain/020__connection_manager.robot
csit/suites/ovsdb/Southbound_Domain/030__configure_exit_ovsdb_node.robot
csit/suites/ovsdb/Southbound_Domain/040__Vxlan_Extension_Test.robot
csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot
csit/variables/carpeople/crud/car-people/location.uri
csit/variables/carpeople/crud/cars/location.uri
csit/variables/carpeople/libtest/car/location.uri
csit/variables/carpeople/libtest/car_person/location.uri
csit/variables/carpeople/libtest/cars/location.uri
csit/variables/carpeople/libtest/cars_people/location.uri
csit/variables/mdsal/lowlevelrpc/become_prefix_leader/location.uri
csit/variables/mdsal/lowlevelrpc/check_publish_notifications/location.uri
csit/variables/mdsal/lowlevelrpc/create_prefix_shard/location.uri
csit/variables/mdsal/lowlevelrpc/get_constant/location.uri
csit/variables/mdsal/lowlevelrpc/get_contexted_constant/location.uri
csit/variables/mdsal/lowlevelrpc/get_singleton_constant/location.uri
csit/variables/mdsal/lowlevelrpc/produce_transactions/location.uri
csit/variables/mdsal/lowlevelrpc/register_bound_constant/location.uri
csit/variables/mdsal/lowlevelrpc/register_constant/location.uri
csit/variables/mdsal/lowlevelrpc/register_flapping_singleton/location.uri
csit/variables/mdsal/lowlevelrpc/register_singleton_constant/location.uri
csit/variables/mdsal/lowlevelrpc/remove_prefix_shard/location.uri
csit/variables/mdsal/lowlevelrpc/shutdown_prefix_shard_replica/location.uri
csit/variables/mdsal/lowlevelrpc/shutdown_shard_replica/location.uri
csit/variables/mdsal/lowlevelrpc/start_publish_notifications/location.uri
csit/variables/mdsal/lowlevelrpc/subscribe_ddtl/location.uri
csit/variables/mdsal/lowlevelrpc/subscribe_dtcl/location.uri
csit/variables/mdsal/lowlevelrpc/subscribe_ynl/location.uri
csit/variables/mdsal/lowlevelrpc/unregister_bound_constant/location.uri
csit/variables/mdsal/lowlevelrpc/unregister_constant/location.uri
csit/variables/mdsal/lowlevelrpc/unregister_flapping_singleton/location.uri
csit/variables/mdsal/lowlevelrpc/unregister_singleton_constant/location.uri
csit/variables/mdsal/lowlevelrpc/unsubscribe_ddtl/location.uri
csit/variables/mdsal/lowlevelrpc/unsubscribe_dtcl/location.uri
csit/variables/mdsal/lowlevelrpc/unsubscribe_ynl/location.uri
csit/variables/mdsal/lowlevelrpc/write_transactions/location.uri

index 9735f5b2c4031e2926593bfc302d49800a1835a9..0ea0618828ea933933975213b1d67b71b7716bde 100644 (file)
@@ -87,8 +87,11 @@ Get User From IDM DB
     [Arguments]    ${user_id}=${EMPTY}
     Create Session    httpbin    http://${ODL_SYSTEM_IP}:${RESTPORT}
     ${headers}=    Create Dictionary    Content-Type=application/x-www-form-urlencoded
-    ${resp}=    RequestsLibrary.GET Request    httpbin    ${idmurl}/users/${user_id}    headers=${headers}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}=    RequestsLibrary.GET On Session
+    ...    httpbin
+    ...    url=${idmurl}/users/${user_id}
+    ...    headers=${headers}
+    ...    expected_status=200
     Log    ${resp.text}
     RETURN    ${resp}
 
index 17d5f6789e41afe513bb16d620dac7b86e08cff4..1cfcc73060edbe73026f5a237d08ae3a208534ad 100644 (file)
@@ -65,7 +65,7 @@ Verify_BGP_Speaker_Connection
     ${exp_status_code}=    BuiltIn.Set_Variable_If    ${connected}    200    404
     ${url}=    BuiltIn.Set_Variable
     ...    ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F${ip}?content=nonconfig
-    ${response}=    RequestsLibrary.GET On Session    ${session}    ${url}    expected_status=${exp_status_code}
+    ${response}=    RequestsLibrary.GET On Session    ${session}    url=${url}    expected_status=${exp_status_code}
     RETURN    ${response.content}
 
 Start_BGP_Manager
index 8739d3426198e10d815a1c7ca262d7d28038f678..536b6bc06fc5683bf8ca884defc5a52fe5ce3e0c 100644 (file)
@@ -15,6 +15,7 @@ Documentation       Robot keyword library (Resource) for handling the BGP speake
 Library             SSHLibrary    timeout=10s
 Library             RequestsLibrary
 Resource            ../variables/Variables.robot
+Resource            BGPSpeaker.robot
 Resource            RemoteBash.robot
 Resource            NexusKeywords.robot
 
index 0614d80011dd839ffcded16e5e03e622dd244e65..ad3d40e6407cc91c5f8abc0637bad7b4493433db 100644 (file)
@@ -273,16 +273,18 @@ AddNeighbor To BGP Configuration On ODL
 Get BGP Configuration On ODL
     [Documentation]    Get bgp configuration
     [Arguments]    ${odl_session}
-    ${resp} =    RequestsLibrary.Get Request    ${odl_session}    ${CONFIG_API}/ebgp:bgp/
+    ${resp} =    RequestsLibrary.GET On Session    ${odl_session}    url=${CONFIG_API}/ebgp:bgp/
     Log    ${resp.text}
     RETURN    ${resp.text}
 
 Delete BGP Configuration On ODL
     [Documentation]    Delete BGP
     [Arguments]    ${odl_session}
-    ${resp} =    RequestsLibrary.Delete Request    ${odl_session}    ${CONFIG_API}/ebgp:bgp/
+    ${resp} =    RequestsLibrary.DELETE On Session
+    ...    ${odl_session}
+    ...    url=${CONFIG_API}/ebgp:bgp/
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     RETURN    ${resp.text}
 
 Create External Tunnel Endpoint Configuration
@@ -301,13 +303,6 @@ Delete External Tunnel Endpoint Configuration
     ...    mapping=${Kwargs}
     ...    session=session
 
-Get External Tunnel Endpoint Configuration
-    [Documentation]    Get bgp configuration
-    [Arguments]    ${ip}
-    ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/itm:dc-gateway-ip-list/dc-gateway-ip/${ip}/
-    Log    ${resp.text}
-    RETURN    ${resp.text}
-
 Teardown_Everything
     [Documentation]    Create and Log the diff between expected and actual responses, make sure Python tool was killed.
     ...    Tear down imported Resources.
@@ -318,7 +313,9 @@ Teardown_Everything
 Check_Example_Bgp_Rib_Content
     [Documentation]    Check the example-bgp-rib content for string
     [Arguments]    ${session}    ${substr}    ${error_message}=${JSONKEYSTR} not found, but expected.
-    ${response} =    RequestsLibrary.Get Request    ${session}    ${REST_API}/${BGP_RIB_URI}?content=nonconfig
+    ${response} =    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${REST_API}/${BGP_RIB_URI}?content=nonconfig
     BuiltIn.Log    ${response.status_code}
     BuiltIn.Log    ${response.text}
     BuiltIn.Should_Contain    ${response.text}    ${substr}    ${error_message}    values=False
@@ -326,7 +323,9 @@ Check_Example_Bgp_Rib_Content
 Check_Example_Bgp_Rib_Does_Not_Contain
     [Documentation]    Check the example-bgp-rib does not contain the string
     [Arguments]    ${session}    ${substr}    ${error_message}=${JSONKEYSTR} found, but not expected.
-    ${response} =    RequestsLibrary.Get Request    ${session}    ${REST_API}/${BGP_RIB_URI}?content=nonconfig
+    ${response} =    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${REST_API}/${BGP_RIB_URI}?content=nonconfig
     BuiltIn.Log    ${response.status_code}
     BuiltIn.Log    ${response.text}
     BuiltIn.Should_Not_Contain    ${response.text}    ${substr}    ${error_message}    values=False
@@ -334,7 +333,9 @@ Check_Example_Bgp_Rib_Does_Not_Contain
 Check_Example_IPv4_Topology_Content
     [Documentation]    Check the example-ipv4-topology content for string
     [Arguments]    ${session}    ${string_to_check}=${EMPTY}
-    ${response} =    RequestsLibrary.Get Request    ${session}    ${REST_API}/${BGP_TOPOLOGY_URI}?content=nonconfig
+    ${response} =    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${REST_API}/${BGP_TOPOLOGY_URI}?content=nonconfig
     BuiltIn.Log    ${response.status_code}
     BuiltIn.Log    ${response.text}
     BuiltIn.Should_Contain    ${response.text}    ${string_to_check}
@@ -342,7 +343,9 @@ Check_Example_IPv4_Topology_Content
 Check_Example_IPv4_Topology_Does_Not_Contain
     [Documentation]    Check the example-ipv4-topology does not contain the string
     [Arguments]    ${session}    ${string_to_check}
-    ${response} =    RequestsLibrary.Get Request    ${session}    ${REST_API}/${BGP_TOPOLOGY_URI}?content=nonconfig
+    ${response} =    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${REST_API}/${BGP_TOPOLOGY_URI}?content=nonconfig
     BuiltIn.Log    ${response.status_code}
     BuiltIn.Log    ${response.text}
     BuiltIn.Should_Not_Contain    ${response.text}    ${string_to_check}
index 302c913fa50fe1f48d00fa000d353557e4a7d840..83f9dfa51616b97da10e00c1db0d8de64bd2c793 100644 (file)
@@ -3,6 +3,7 @@ Documentation       Bulkomatic Keyword library contains keywords for performing
 ...                 with a single bulkomatic API we can trigger bulk flows in config datastore which eventually populates switches and operational datastore
 ...                 So far this library is only to be used by MD-SAL clustering and OpenFlowplugin clustering test as it is very specific for these tests
 
+Resource            ClusterManagement.robot
 Resource            Utils.robot
 Variables           ../variables/Variables.py
 
@@ -24,7 +25,7 @@ Operation Status Check
     [Documentation]    Checks to see if read or write operation is successfull in controller node.
     [Arguments]    ${op_status_uri}    ${controller_index}
     ${data}=    ClusterManagement.Get From Member    ${op_status_uri}    ${controller_index}
-    ${json}=    To Json    ${data}
+    ${json}=    Utils.Json Parse From String    ${data}
     ${value}=    Get From Dictionary    ${json}    value
     ${value}=    Convert to String    ${value}
     ${two}=    Convert to String    2
@@ -92,7 +93,7 @@ Verify Flow Count
     [Documentation]    Verify Flow Count in member ${controller_index} matches ${flow_count}.
     [Arguments]    ${flow_count}    ${controller_index}
     ${data}=    Get Bulk Flow Count    ${controller_index}
-    ${json}=    To Json    ${data}
+    ${json}=    Utils.Json Parse From String    ${data}
     ${value}=    Get From Dictionary    ${json}    value
     Should Be Equal As Strings    ${value}    ${flow_count}
 
index 5d082b17aaf34e6cc8ad7ee8d0b2e8df12d83459..63f9be70310af980c7c75f61703555ccf63c18f5 100644 (file)
@@ -34,7 +34,10 @@ CC_Setup
 Get_Change_Count
     [Documentation]    GET data change request, assert status 200, return the value.
     [Arguments]    ${session}=operational
-    ${response} =    RequestsLibrary.GET On Session    ${session}    ${CC_DATA_CHANGE_COUNTER_URL}    expected_status=200
+    ${response} =    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${CC_DATA_CHANGE_COUNTER_URL}
+    ...    expected_status=200
     # CompareStream.Set_Variable_If_At_Least_Else cannot be used direcly, because ${response.text}["data-change-counter"]["count"] would be
     # evaluated before the stream comparison and it causes failures
     BuiltIn.Log    ${response.text}
index c624b10b8fd1b0067a8a467bc3e90e3c95a150c6..93ef015a108d413d20108d03c1c58d1e8052d9dd 100644 (file)
@@ -30,7 +30,7 @@ Documentation       Resource housing Keywords common to several suites for clust
 ...
 ...                 TODO: Unify capitalization of Leaders and Followers.
 
-Library             RequestsLibrary    # for Create_Session and To_Json
+Library             RequestsLibrary    # for Create_Session
 Library             Collections
 Library             String
 Library             ClusterEntities.py
@@ -244,7 +244,7 @@ Get_Raft_Property_From_Shard_Member
     ...    uri=${uri}
     ...    session=${session}
     ...    http_timeout=${http_timeout}
-    ${data_object} =    RequestsLibrary.To_Json    ${data_text}
+    ${data_object} =    Utils.Json Parse From String    ${data_text}
     ${value} =    Collections.Get_From_Dictionary    ${data_object}    value
     ${raft_property} =    Collections.Get_From_Dictionary    ${value}    ${property}
     RETURN    ${raft_property}
@@ -1065,7 +1065,7 @@ ClusterManagement__Parse_Sync_Status
     [Documentation]    Return sync status parsed out of given text. Called twice by Get_Sync_Status_Of_Member.
     [Arguments]    ${shard_manager_text}
     BuiltIn.Log    ${shard_manager_text}
-    ${manager_object} =    RequestsLibrary.To_Json    ${shard_manager_text}
+    ${manager_object} =    Utils.Json Parse From String    ${shard_manager_text}
     ${value_object} =    Collections.Get_From_Dictionary    dictionary=${manager_object}    key=value
     ${sync_status} =    Collections.Get_From_Dictionary    dictionary=${value_object}    key=SyncStatus
     RETURN    ${sync_status}
index 1a0460d59107b08bfac710a4f1901cd7f5fefc68..ede359edd84f3e5941c346c28aa7921b99e2c7dc 100644 (file)
@@ -308,9 +308,11 @@ Check Linear Topology On Member
     [Documentation]    Check Linear topology.
     [Arguments]    ${switches}    ${member_index}=1
     ${session}=    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}=    RequestsLibrary.Get Request    ${session}    ${RFC8040_OPERATIONAL_TOPO_API}
+    ${resp}=    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${RFC8040_OPERATIONAL_TOPO_API}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     FOR    ${switch}    IN RANGE    1    ${switches+1}
         Should Contain    ${resp.text}    "node-id":"openflow:${switch}"
         Should Contain    ${resp.text}    "tp-id":"openflow:${switch}:1"
@@ -333,9 +335,11 @@ Check No Switches On Member
     [Documentation]    Check no switch is in topology
     [Arguments]    ${switches}    ${member_index}=1
     ${session}=    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}=    RequestsLibrary.Get Request    ${session}    ${RFC8040_OPERATIONAL_TOPO_API}
+    ${resp}=    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${RFC8040_OPERATIONAL_TOPO_API}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     FOR    ${switch}    IN RANGE    1    ${switches+1}
         Should Not Contain    ${resp.text}    openflow:${switch}
     END
@@ -344,9 +348,11 @@ Check Number Of Flows On Member
     [Documentation]    Check number of flows in the inventory.
     [Arguments]    ${flows}    ${member_index}=1
     ${session}=    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}=    RequestsLibrary.Get Request    ${session}    ${RFC8040_OPERATIONAL_NODES_API}
+    ${resp}=    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${RFC8040_OPERATIONAL_NODES_API}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     ${count}=    Get Count    ${resp.text}    "priority"
     Should Be Equal As Integers    ${count}    ${flows}
 
@@ -354,8 +360,10 @@ Check Number Of Groups On Member
     [Documentation]    Check number of groups in the inventory.
     [Arguments]    ${groups}    ${member_index}=1
     ${session}=    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}=    RequestsLibrary.Get Request    ${session}    ${RFC8040_OPERATIONAL_NODES_API}
+    ${resp}=    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${RFC8040_OPERATIONAL_NODES_API}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     ${group_count}=    Get Count    ${resp.text}    "group-type"
     Should Be Equal As Integers    ${group_count}    ${groups}
index 0f80253a3a5c81ac80c56b9cd082a521e4c8376a..cec6c5bc1f89c8532c3e9001caa5fada6050f6ec 100644 (file)
@@ -210,7 +210,9 @@ def buyCar(hostname, port, numberOfCarBuyers, start=0):
 
 def getCars(hostname, port, ignore):
     """Uses the GET on car:cars resource to get all cars in the store using RESTCONF"""
-    resp = UtilLibrary.get(SettingsLibrary.getCarsUrl(hostname, port), "admin", "admin")
+    resp = UtilLibrary.get(
+        SettingsLibrary.getCarsUrl(hostname, port) + "?content=config", "admin", "admin"
+    )
     resp.encoding = "utf-8"
     print(resp.text)
     return resp
@@ -225,7 +227,9 @@ def getPersons(hostname, port, ignore):
     </note>
     """
     resp = UtilLibrary.get(
-        SettingsLibrary.getPersonsUrl(hostname, port), "admin", "admin"
+        SettingsLibrary.getPersonsUrl(hostname, port) + "?content=config",
+        "admin",
+        "admin",
     )
     resp.encoding = "utf-8"
     print(resp.text)
@@ -242,7 +246,9 @@ def getCarPersonMappings(hostname, port, ignore):
     </note>
     """
     resp = UtilLibrary.get(
-        SettingsLibrary.getCarPersonUrl(hostname, port), "admin", "admin"
+        SettingsLibrary.getCarPersonUrl(hostname, port) + "?content=config",
+        "admin",
+        "admin",
     )
     resp.encoding = "utf-8"
     print(resp)
index 9905ee117a9d0e1f7e15a0b6b58da6058e8583f8..f61c1784c3e8955f114e8183c0e58f66554b8949 100644 (file)
@@ -12,8 +12,7 @@ Resource            ../variables/openflowplugin/Variables.robot
 *** Keywords ***
 Check DIDM Registered With Device
     [Documentation]    Check for DIDM registered with the device
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_NODES_API}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}=    RequestsLibrary.GET On Session    session    ${RFC8040_OPERATIONAL_NODES_API}    expected_status=200
     Log    ${resp.text}
     Should Contain    ${resp.text}    didm
     RETURN    ${resp.text}
index cc1aa1c2029b7fd22aefd639a601440bc3269853..f1b272146444878f18ccd6c60054fb2b3de735d2 100644 (file)
@@ -7,6 +7,7 @@ Resource    ClusterManagement.robot
 Resource    ../variables/daexim/DaeximVariables.robot
 Resource    ../variables/Variables.robot
 Resource    SSHKeywords.robot
+Resource    Utils.robot
 
 
 *** Keywords ***
@@ -234,7 +235,7 @@ Fetch Status Information From Netconf Endpoint
     [Arguments]    ${endpoint}    ${host_index}
     ${resp}    ClusterManagement.Get From Member    ${NETCONF_NODE_URL}=${endpoint}    ${host_index}
     ${output1}    Builtin.Set Variable    ${resp}
-    ${output}    RequestsLibrary.To Json    ${output1}
+    ${output}    Utils.Json Parse From String    ${output1}
     Builtin.Log    ${output}
     ${status}    Collections.Get From Dictionary
     ...    ${output['network-topology:node'][0]}
index 3b8994a1c9bede0ab14758394d108c97181e5afc..69e4c6a1cba9e6160afa73a1ac96e55c9be19df0 100644 (file)
@@ -3,6 +3,7 @@ Documentation       Library to deal with mdsal data models. Initially, as a comm
 ...                 debug a list of data models.
 
 Library             RequestsLibrary
+Resource            Utils.robot
 
 
 *** Variables ***
@@ -14,7 +15,7 @@ ${INTEGRATION_BRIDGE}       br-int
 *** Keywords ***
 Get Model Dump
     [Documentation]    Will output a list of mdsal models using ${data_models} list
-    [Arguments]    ${controller_ip}    ${data_models}=@{internal_data_models}    ${restconf_root}=restconf
+    [Arguments]    ${controller_ip}    ${data_models}=@{internal_data_models}    ${restconf_root}=rests
     # while feature request in bug 7892 is not done, we will quickly timeout and not retry the model dump get
     # request. This is because when it's done in a failed cluster state, it could take 20s for the reesponse to
     # to come back as the internal clustering times out waiting for a leader which will not come. When bug 7892
@@ -28,15 +29,14 @@ Get Model Dump
     ...    timeout=1
     ...    max_retries=0
     FOR    ${model}    IN    @{data_models}
-        ${resp}=    RequestsLibrary.Get Request    model_dump_session    ${restconf_root}/${model}
-        ${pretty_output}=    To Json    ${resp.text}    pretty_print=True
-        Log    ${pretty_output}
+        ${resp}=    RequestsLibrary.GET On Session    model_dump_session    url=${restconf_root}/${model}
+        Utils.Log Content    ${resp.text}
     END
 
 Verify No Ingress Dispatcher Non-Default Flow Entries
     [Documentation]    Verify the ingress dispatcher table has no non-default flows after neutron was cleaned up
     [Arguments]    ${ovs_ip}
-    ${flow_output}=    Run Command On Remote System
+    ${flow_output}=    Utils.Run Command On Remote System
     ...    ${ovs_ip}
     ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE} table=${DISPATCHER_TABLE} | grep -v "priority=0"
     Log    ${flow_output}
index dd591fe3e8b3f0c5ad24d785561cbbb412f96307..558f92ff39e526389bdbfee2e9916fc065212a37 100644 (file)
@@ -34,7 +34,7 @@ Read Records
     ...    http://${controller_ip}:${RESTCONFPORT}${CONFIG_API}
     ...    headers=${HEADERS}
     ...    auth=${AUTH}
-    ${resp}=    RequestsLibrary.Get Request    session    ${node}
+    ${resp}=    RequestsLibrary.GET On Session    session    ${node}
     RETURN    ${resp.json()}
 
 Update Records
index 276e0cc3e1157b76c59ca420d05a174d48384f06..2c47b308101d9eb3ce08e635a5c62e5d45efcff1 100644 (file)
@@ -13,6 +13,7 @@ Documentation       Robot keyword library (Resource) for handling the ExaBgp too
 ...
 ...                 TODO: RemoteBash.robot contains logic which could be reused here.
 
+Library             RequestsLibrary
 Library             SSHLibrary
 Resource            ${CURDIR}/SSHKeywords.robot
 Resource            ${CURDIR}/RemoteBash.robot
@@ -75,7 +76,10 @@ Verify_ExaBgps_Connection
     [Arguments]    ${session}    ${exabgp_ip}=${TOOLS_SYSTEM_IP}    ${connected}=${True}
     ${peer_check_url}=    BuiltIn.Set_Variable    ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F
     ${exp_status_code}=    BuiltIn.Set_Variable_If    ${connected}    ${200}    ${404}
-    ${rsp}=    RequestsLibrary.Get Request    ${session}    ${peer_check_url}${exabgp_ip}?content=nonconfig
+    ${rsp}=    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${peer_check_url}${exabgp_ip}?content=nonconfig
+    ...    expected_status=anything
     BuiltIn.Log    ${rsp.content}
     BuiltIn.Should_Be_Equal_As_Numbers    ${exp_status_code}    ${rsp.status_code}
 
index 18c163e2f0b4227530d03efbc623bc4b5398d0a9..d58f9bc8c097e63cbb8b94f01e308d44dfacad4f 100644 (file)
@@ -4,14 +4,16 @@ Documentation       Keywords used to create/modify flow objects. The object is d
 ...                 cookie and barrier fields, string formatted xml that can be used to push to
 ...                 controller). TODO: Remove hard dependency on controller HTTP "session".
 
-Library             XML
-Library             String
+Library             OperatingSystem
 Library             RequestsLibrary
-Library             ScaleClient.py
+Library             String
+Library             XML
+Library             Common.py
 Library             FlowLib.py
+Library             ScaleClient.py
 Library             XmlComparator.py
-Library             Common.py
 Resource            CompareStream.robot
+Resource            TemplatedRequests.robot
 Resource            ../variables/openflowplugin/Variables.robot
 Variables           ../variables/Variables.py
 
@@ -20,7 +22,10 @@ Variables           ../variables/Variables.py
 Check No Switches In Inventory
     [Documentation]    Check no switch is in inventory
     [Arguments]    ${switches}
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_NODES_API}
+    ${resp}=    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_OPERATIONAL_NODES_API}
+    ...    expected_status=200
     Log    ${resp.text}
     FOR    ${switch}    IN RANGE    1    ${switches+1}
         Should Not Contain    ${resp.text}    "openflow:${switch}"
@@ -29,9 +34,8 @@ Check No Switches In Inventory
 Check No Switches In Topology
     [Documentation]    Check no switch is in topology
     [Arguments]    ${switches}
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_API}
+    ${resp}=    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_API}    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     FOR    ${switch}    IN RANGE    1    ${switches+1}
         Should Not Contain    ${resp.text}    openflow:${switch}
     END
@@ -40,9 +44,11 @@ Check Switches In Inventory
     [Documentation]    Check all switches and stats in operational inventory
     [Arguments]    ${switches}
     FOR    ${switch}    IN RANGE    1    ${switches+1}
-        ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_NODES_API}/node=openflow%3A${switch}
+        ${resp}=    RequestsLibrary.GET On Session
+        ...    session
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch}
+        ...    expected_status=200
         Log    ${resp.text}
-        Should Be Equal As Strings    ${resp.status_code}    200
         Should Contain    ${resp.text}    flow-capable-node-connector-statistics
         Should Contain    ${resp.text}    flow-table-statistics
     END
@@ -50,27 +56,24 @@ Check Switches In Inventory
 Check Switches In Topology
     [Documentation]    Check switches are in the topology.
     [Arguments]    ${switches}
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_API}
+    ${resp}=    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_API}    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     ${count}=    Get Count    ${resp.text}    "node-id":"openflow:
     BuiltIn.Should Be Equal As Numbers    ${count}    ${switches}
 
 Check Number Of Links
     [Documentation]    Check number of links in the topolgy.
     [Arguments]    ${links}
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_API}
+    ${resp}=    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_API}    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     ${count}=    Get Count    ${resp.text}    "link-id":"openflow:
     Should Be Equal As Integers    ${count}    ${links}
 
 Check Linear Topology
     [Documentation]    Check Linear topology.
     [Arguments]    ${switches}
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_API}
+    ${resp}=    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_API}    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     FOR    ${switch}    IN RANGE    1    ${switches+1}
         Should Contain    ${resp.text}    "node-id":"openflow:${switch}"
         Should Contain    ${resp.text}    "tp-id":"openflow:${switch}:1"
@@ -98,44 +101,46 @@ Check Flows Operational Datastore
 Check Number Of Flows
     [Documentation]    Check number of flows in the inventory.
     [Arguments]    ${flows}
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_NODES_API}
+    ${resp}=    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_OPERATIONAL_NODES_API}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     ${count}=    Get Count    ${resp.text}    "priority"
     Should Be Equal As Integers    ${count}    ${flows}
 
 Check Number Of Groups
     [Documentation]    Check number of groups in the inventory.
     [Arguments]    ${groups}
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_NODES_API}
+    ${resp}=    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_OPERATIONAL_NODES_API}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     ${group_count}=    Get Count    ${resp.text}    "group-type"
     Should Be Equal As Integers    ${group_count}    ${groups}
 
 Check Flow Stats Are Available
     [Documentation]    A GET on the /node=${node_id} inventory API is made and flow stats string is checked for existence.
     [Arguments]    ${node_id}    ${flows}
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:table=2
+    ...    url=${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:table=2
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain X Times    ${resp.text}    priority    ${flows}
 
 Check Number Of Hosts
     [Documentation]    Check number of hosts in topology
     [Arguments]    ${hosts}
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_API}
+    ${resp}=    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_API}    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     ${count}=    Get Count    ${resp.text}    "node-id":"host:
     Should Be Equal As Integers    ${count}    ${hosts}
 
 Check No Hosts
     [Documentation]    Check if all hosts are deleted from inventory
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_API}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}=    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_API}    expected_status=200
     Should Not Contain    ${resp.text}    "node-id":"host:
 
 Add Table Miss Flows
@@ -298,37 +303,35 @@ Remove Flow XML Element
 Add Group To Controller And Verify
     [Documentation]    Push group through REST-API and verify in data-store
     [Arguments]    ${group_body}    ${node_id}    ${group_id}
-    ${resp}=    RequestsLibrary.Put Request
+    ${resp}=    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:group=${group_id}
+    ...    url=${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:group=${group_id}
     ...    headers=${HEADERS_XML}
     ...    data=${group_body}
     Log    ${resp.text}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:group=${group_id}?content=config
+    ...    url=${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:group=${group_id}?content=config
     ...    headers=${ACCEPT_XML}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Compare Xml    ${group_body}    ${resp.text}
 
 Add Flow To Controller And Verify
     [Documentation]    Push flow through REST-API and verify in data-store
     [Arguments]    ${flow_body}    ${node_id}    ${table_id}    ${flow_id}
-    ${resp}=    RequestsLibrary.Put Request
+    ${resp}=    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    url=${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}
     ...    headers=${HEADERS_XML}
     ...    data=${flow_body}
     Log    ${resp.text}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}?content=config
+    ...    url=${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}?content=config
     ...    headers=${ACCEPT_XML}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Compare Xml    ${flow_body}    ${resp.text}
 
 Verify Flow On Mininet Switch
@@ -344,14 +347,15 @@ Verify Flow On Mininet Switch
 Remove Group From Controller And Verify
     [Documentation]    Remove group and verify
     [Arguments]    ${node_id}    ${group_id}
-    ${resp}=    RequestsLibrary.Delete Request
+    ${resp}=    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:group=${group_id}
+    ...    url=${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:group=${group_id}
+    ...    expected_status=204
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    204
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.Get On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:group=${group_id}?content=config
+    ...    url=${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:group=${group_id}?content=config
+    ...    expected_status=anything
     IF    ${resp.status_code} == 404 or ${resp.status_code} == 409    RETURN
     Builtin.Log    ${resp.text}
     Builtin.Fail    The request failed with code ${resp.status_code}
@@ -359,14 +363,15 @@ Remove Group From Controller And Verify
 Remove Flow From Controller And Verify
     [Documentation]    Remove flow and verify
     [Arguments]    ${node_id}    ${table_id}    ${flow_id}
-    ${resp}=    RequestsLibrary.Delete Request
+    ${resp}=    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    url=${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    expected_status=204
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    204
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.Get On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}?content=config
+    ...    url=${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}?content=config
+    ...    expected_status=anything
     IF    ${resp.status_code} == 404 or ${resp.status_code} == 409    RETURN
     Builtin.Log    ${resp.text}
     Builtin.Fail    The request failed with code ${resp.status_code}
@@ -395,14 +400,14 @@ Remove Default Flows
     write    dpctl dump-flows -O OpenFlow13
     ${switchoutput}=    Read Until    >
     ${headers}=    Create Dictionary    Content-Type=application/yang-data+xml
-    ${resp}=    RequestsLibrary.Post Request
+    ${resp}=    RequestsLibrary.POST On Session
     ...    session
-    ...    rests/operations/sal-flow:remove-flow
+    ...    url=rests/operations/sal-flow:remove-flow
     ...    data=${flow.xml}
     ...    headers=${headers}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    ${resp}=    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_NODES_API}
+    ${resp}=    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_NODES_API}
     Log    ${resp.text}
     Should Not Contain    ${resp.text}    "output-node-connector": "CONTROLLER",
     ${strings_to_check_for}=    Create List    CONTROLLER
@@ -440,10 +445,11 @@ Flow Presence In Config Store
     ...    This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx}
     [Arguments]    ${expvalue}
     ${headers}=    Create Dictionary    Accept=application/xml
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.Get On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}?content=config
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}?content=config
     ...    headers=${headers}
+    ...    expected_status=anything
     Log    ${resp}
     Log    ${resp.text}
     IF    ${resp.status_code}!=200    RETURN    ${False}    ${EMPTY}
@@ -456,10 +462,11 @@ Flow Presence In Operational Store
     ...    This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx}
     [Arguments]    ${expvalue}    ${check_id}=${False}
     ${headers}=    Create Dictionary    Accept=application/xml
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.Get On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}
     ...    headers=${headers}
+    ...    expected_status=anything
     Log    ${resp}
     Log    ${resp.text}
     IF    ${resp.status_code}!=200    RETURN    ${False}    ${EMPTY}
@@ -510,24 +517,23 @@ Add Flow Via RPC
     Set Element Attribute    ${nodeelm}    xmlns:inv    urn:opendaylight:inventory
     Log Element    ${req}
     ${strxml}=    Element To String    ${req}
-    ${resp}=    RequestsLibrary.Post Request    session    /rests/operations/sal-flow:add-flow    data=${strxml}
+    ${resp}=    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=/rests/operations/sal-flow:add-flow
+    ...    data=${strxml}
+    ...    expected_status=204
     Log    ${resp.text}
-    ${expected_status_code}=    CompareStream.Set_Variable_If_At_Least_Phosphorus    204    200
-    Log    ${expected_status_code}
-    Should Be Equal As Strings    ${resp.status_code}    ${expected_status_code}
 
 Add Flow Via Restconf
     [Documentation]    Configures a flow specified by given flow details (${node_id}, ${table_id}, ${flow_body}) using POST method
     [Arguments]    ${node_id}    ${table_id}    ${flow_body}
     Log    ${flow_body}
-    ${resp}=    RequestsLibrary.Post Request
+    ${resp}=    RequestsLibrary.POST On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${node_id}/flow-node-inventory:table=${table_id}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${node_id}/flow-node-inventory:table=${table_id}
     ...    data=${flow_body}
+    ...    expected_status=201
     Log    ${resp.text}
-    ${msg}=    Set Variable
-    ...    Adding flow for ${RFC8040_NODES_API}/node=openflow%3A${node_id}/flow-node-inventory:table=${table_id} failed, http response ${resp.status_code} received.
-    Should Be Equal As Strings    ${resp.status_code}    201    msg=${msg}
 
 Update Flow Via RPC
     [Documentation]    Updates a flow by using update-flow operation. ${xmlroot} is usually a variable created by
@@ -552,24 +558,23 @@ Update Flow Via RPC
     Set Element Attribute    ${nodeelm}    xmlns:inv    urn:opendaylight:inventory
     Log Element    ${xml}
     ${strxml}=    Element To String    ${xml}
-    ${resp}=    RequestsLibrary.Post Request    session    /rests/operations/sal-flow:update-flow    data=${strxml}
+    ${resp}=    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=/rests/operations/sal-flow:update-flow
+    ...    data=${strxml}
+    ...    expected_status=204
     Log    ${resp.text}
-    ${expected_status_code}=    CompareStream.Set_Variable_If_At_Least_Phosphorus    204    200
-    Log    ${expected_status_code}
-    Should Be Equal As Strings    ${resp.status_code}    ${expected_status_code}
 
 Update Flow Via Restconf
     [Documentation]    Updates a flow configuration by given flow details (${node_id}, ${table_id}, ${flow_body}) using PUT method
     [Arguments]    ${node_id}    ${table_id}    ${flow_id}    ${flow_body}
     Log    ${flow_body}
-    ${resp}=    RequestsLibrary.Put Request
+    ${resp}=    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}
     ...    data=${flow_body}
+    ...    expected_status=204
     Log    ${resp.text}
-    ${msg}=    Set Variable
-    ...    Updating flow for ${RFC8040_NODES_API}/node=openflow%3A${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received.
-    Should Be Equal As Strings    ${resp.status_code}    204    msg=${msg}
 
 Delete Flow Via RPC
     [Documentation]    Deletes a flow by using remove-flow opearation. ${xmlroot} is usually a variable created by
@@ -584,29 +589,28 @@ Delete Flow Via RPC
     Set Element Attribute    ${nodeelm}    xmlns:inv    urn:opendaylight:inventory
     Log Element    ${req}
     ${strxml}=    Element To String    ${req}
-    ${resp}=    RequestsLibrary.Post Request    session    /rests/operations/sal-flow:remove-flow    data=${strxml}
+    ${resp}=    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=/rests/operations/sal-flow:remove-flow
+    ...    data=${strxml}
+    ...    expected_status=204
     Log    ${resp.text}
-    ${expected_status_code}=    CompareStream.Set_Variable_If_At_Least_Phosphorus    204    200
-    Log    ${expected_status_code}
-    Should Be Equal As Strings    ${resp.status_code}    ${expected_status_code}
 
 Delete Flow Via Restconf
     [Documentation]    Deletes a flow from configuration datastore specified by given flow details (${node_id}, ${table_id}, ${flow_body}) using DELETE method
     [Arguments]    ${node_id}    ${table_id}    ${flow_id}
-    ${resp}=    RequestsLibrary.Delete Request
+    ${resp}=    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    expected_status=204
     Log    ${resp.text}
-    ${msg}=    Set Variable
-    ...    Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${node_id}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received.
-    Should Be Equal As Strings    ${resp.status_code}    204    msg=${msg}
 
 Get Flow Id
     [Documentation]    This verifies specific flow-id for particular table-id matching from the flow element
     [Arguments]    ${dpnid}    ${table_id}    ${flow_element}
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${dpnid}/flow-node-inventory:table=${table_id}?content=config
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${dpnid}/flow-node-inventory:table=${table_id}?content=config
     BuiltIn.Log    ${resp.text}
     @{flow_id}=    String.Get Regexp Matches    ${resp.text}    id\":\"(\\d+${flow_element})    1
     RETURN    @{flow_id}[0]
index da71866c356a68be06dad4eb1106c2c9f62a0491..e2d931ed3c80e0de463af94365e224d2ed965927 100644 (file)
@@ -13,6 +13,7 @@ Documentation       Robot keyword library (Resource) for handling the GoBgp tool
 ...
 
 Library             Process
+Library             RequestsLibrary
 Library             SSHLibrary
 Resource            ${CURDIR}/BGPcliKeywords.robot
 Resource            ${CURDIR}/RemoteBash.robot
@@ -73,6 +74,9 @@ Verify_GoBgps_Connection
     ...    ${connected}
     ...    ${ALLOWED_STATUS_CODES}
     ...    ${DELETED_STATUS_CODES}
-    ${rsp}=    RequestsLibrary.Get Request    ${session}    ${peer_check_url}${gobgp_ip}?content=nonconfig
+    ${rsp}=    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${peer_check_url}${gobgp_ip}?content=nonconfig
+    ...    expected_status=anything
     BuiltIn.Log    ${rsp.content}
     BuiltIn.Should_Be_Equal_As_Numbers    ${exp_status_code}    ${rsp.status_code}
index d6ceb5c8318fa72962741253937e8eb356ddf8d3..4e1b24243ac55948cf9919384c17d6f146f21d4b 100644 (file)
@@ -124,7 +124,7 @@ def start_write_transactions_on_nodes(
         "CHAINED_FLAG": "true" if chained_flag else "false",
     }
     urlt = string.Template(
-        """http://$HOST:8181/restconf/operations/odl-mdsal-lowlevel-control:write-transactions"""
+        """http://$HOST:8181/rests/operations/odl-mdsal-lowlevel-control:write-transactions"""
     )
     _initiate_rpcs(host_list, index_list, urlt, datat, subst_dict)
 
@@ -178,7 +178,7 @@ def start_produce_transactions_on_nodes(
         "ISOLATED_TRANSACTIONS": "true" if isolated_transactions_flag else "false",
     }
     urlt = string.Template(
-        """http://$HOST:8181/restconf/operations/odl-mdsal-lowlevel-control:produce-transactions"""
+        """http://$HOST:8181/rests/operations/odl-mdsal-lowlevel-control:produce-transactions"""
     )
     _initiate_rpcs(host_list, index_list, urlt, datat, subst_dict)
 
index 415f7cdae5ec96f5954b7e9171bc4661fc96105c..8a1779d7bf1b9011864a61e4e614141696a2b1ee 100644 (file)
@@ -72,11 +72,12 @@ Register keys and certificates in ODL controller
     ...    return_stderr=True
     ${template}    OperatingSystem.Get File    ${ADD_KEYSTORE_ENTRY_REQ}
     ${body}    Replace String    ${template}    {base64-client-key}    ${base64-client-key}
-    ${resp}    RequestsLibrary.Post Request
+    ${resp}    RequestsLibrary.POST On Session
     ...    session
-    ...    ${netconf_keystore_url}:add-keystore-entry
+    ...    url=${netconf_keystore_url}:add-keystore-entry
     ...    data=${body}
     ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${client-key}    ${stderr}    SSHLibrary.Execute_Command
     ...    sed -u '1d; $d' ./configuration-files/certs/client.key | sed -z 's!\\n!\\\\n!g'
@@ -89,11 +90,12 @@ Register keys and certificates in ODL controller
     ${template}    OperatingSystem.Get File    ${ADD_PRIVATE_KEY_REQ}
     ${body}    Replace String    ${template}    {client-key}    ${client-key}
     ${body}    Replace String    ${body}    {certificate-chain}    ${certificate-chain}
-    ${resp}    RequestsLibrary.Post Request
+    ${resp}    RequestsLibrary.POST On Session
     ...    session
-    ...    ${netconf_keystore_url}:add-private-key
+    ...    url=${netconf_keystore_url}:add-private-key
     ...    data=${body}
     ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${ca-certificate}    ${stderr}    SSHLibrary.Execute_Command
     ...    sed -u '1d; $d' ./configuration-files/certs/ca.pem | sed -z 's!\\n!\\\\n!g'
@@ -106,11 +108,12 @@ Register keys and certificates in ODL controller
     ${template}    OperatingSystem.Get File    ${ADD_TRUSTED_CERTIFICATE}
     ${body}    Replace String    ${template}    {ca-certificate}    ${ca-certificate}
     ${body}    Replace String    ${body}    {device-certificate}    ${device-certificate}
-    ${resp}    RequestsLibrary.Post Request
+    ${resp}    RequestsLibrary.POST On Session
     ...    session
-    ...    ${netconf_keystore_url}:add-trusted-certificate
+    ...    url=${netconf_keystore_url}:add-trusted-certificate
     ...    data=${body}
     ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Register global credentials for SSH call-home devices (APIv1)
@@ -119,7 +122,12 @@ Register global credentials for SSH call-home devices (APIv1)
     ${template}    OperatingSystem.Get File    ${CREATE_GLOBAL_CREDENTIALS_REQ}
     ${body}    Replace String    ${template}    {username}    ${username}
     ${body}    Replace String    ${body}    {password}    ${password}
-    ${resp}    RequestsLibrary.Put Request    session    ${global_config_url}    data=${body}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.PUT On Session
+    ...    session
+    ...    url=${global_config_url}
+    ...    data=${body}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Register SSH call-home device in ODL controller (APIv1)
@@ -134,7 +142,12 @@ Register SSH call-home device in ODL controller (APIv1)
     ${body}    Replace String    ${body}    {username}    ${username}
     ${body}    Replace String    ${body}    {password}    ${password}
     ${body}    Replace String    ${body}    {hostkey}    ${hostkey}
-    ${resp}    RequestsLibrary.Post Request    session    ${whitelist}    data=${body}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${whitelist}
+    ...    data=${body}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Get create device request template (APIv1)
@@ -157,7 +170,12 @@ Register SSH call-home device in ODL controller (APIv2)
     ${body}    Replace String    ${body}    {username}    ${username}
     ${body}    Replace String    ${body}    {password}    ${password}
     ${body}    Replace String    ${body}    {hostkey}    ${hostkey}
-    ${resp}    RequestsLibrary.Post Request    session    ${whitelist}    data=${body}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${whitelist}
+    ...    data=${body}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Get create device request template (APIv2)
@@ -175,7 +193,12 @@ Register TLS call-home device in ODL controller (APIv2)
     ${body}    Replace String    ${template}    {device_name}    ${device_name}
     ${body}    Replace String    ${body}    {key_id}    ${key_id}
     ${body}    Replace String    ${body}    {certificate_id}    ${certificate_id}
-    ${resp}    RequestsLibrary.Post Request    session    ${whitelist}    data=${body}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${whitelist}
+    ...    data=${body}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Pull Netopeer2 Docker Image
@@ -239,8 +262,14 @@ Test Teardown
     ...    return_stderr=True
     ...    return_rc=True
     SSHLibrary.Execute_Command    rm -rf ./configuration-files
-    ${resp}    RequestsLibrary.Delete_On_Session    session    ${whitelist}
-    ${resp}    RequestsLibrary.Delete_On_Session    session    ${netconf_keystore_data_url}
+    ${resp}    RequestsLibrary.Delete_On_Session
+    ...    session
+    ...    url=${whitelist}
+    ...    expected_status=anything
+    ${resp}    RequestsLibrary.Delete_On_Session
+    ...    session
+    ...    url=${netconf_keystore_data_url}
+    ...    expected_status=anything
 
 Suite Setup
     [Documentation]    Get the suite ready for callhome test cases.
index 68897c74d6c75ec36cef2e9a2409021bb0f80216..1a8a8dbe76be2e3f9e312709fab0a5ad7ac53194 100644 (file)
@@ -371,7 +371,7 @@ Get_ODL_Versions_From_Nexus
     [Documentation]    Returns name of last release found on nexus and list of all versions.
     RequestsLibrary.Create_Session    nexus    ${NEXUS_RELEASES_URL}    verify=${TRUE}
     ${uri} =    BuiltIn.Set_Variable    maven-metadata.xml
-    ${response} =    RequestsLibrary.GET On Session    nexus    ${uri}
+    ${response} =    RequestsLibrary.GET On Session    nexus    url=${uri}
     BuiltIn.Log    ${response.text}
     ${root} =    XML.Parse_XML    ${response.text}
     ${element} =    XML.Get_Element    ${root}    versioning/latest
index 0f53041bd99387cd15be3c65c0139a4d0a1b347b..166ce964f02341da186b0a1b850f72dbf2372658 100644 (file)
@@ -19,17 +19,8 @@ ${INTERNAL_TUNNEL_TABLE}    36
 ${L3_TABLE}                 21
 ${DEFAULT_PING_COUNT}       3
 
-*** Keywords ***
-Log Request
-    [Arguments]    ${resp_content}
-    IF    '''${resp_content}''' != '${EMPTY}'
-        ${resp_json} =    RequestsLibrary.To Json    ${resp_content}    pretty_print=True
-    ELSE
-        ${resp_json} =    BuiltIn.Set Variable    ${EMPTY}
-    END
-    BuiltIn.Log    ${resp_json}
-    RETURN    ${resp_json}
 
+*** Keywords ***
 Create OVSDB Node
     [Arguments]    ${node_ip}    ${port}=${OVSDB_NODE_PORT}
     ${body} =    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/create_node.json
@@ -38,8 +29,8 @@ Create OVSDB Node
     ${uri} =    Builtin.Set Variable    ${RFC8040_TOPO_OVSDB1_API}
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
-    ${resp} =    RequestsLibrary.Post Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.POST On Session    session    url=${uri}    data=${body}    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Connect To Ovsdb Node
@@ -51,15 +42,17 @@ Connect To Ovsdb Node
     ${uri} =    BuiltIn.Set Variable    ${RFC8040_SOUTHBOUND_NODE_API}${node_ip}%3A${port}
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
-    ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.PUT On Session    session    url=${uri}    data=${body}    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Disconnect From Ovsdb Node
     [Documentation]    This request will disconnect the OVSDB node from the controller
     [Arguments]    ${node_ip}    ${port}=${OVSDB_NODE_PORT}
-    ${resp} =    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_API}${node_ip}%3A${port}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp} =    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_API}${node_ip}%3A${port}
+    ...    expected_status=204
 
 Add Bridge To Ovsdb Node
     [Documentation]    This will create a bridge and add it to the OVSDB node.
@@ -75,17 +68,17 @@ Add Bridge To Ovsdb Node
     ${uri} =    BuiltIn.Set Variable    ${RFC8040_SOUTHBOUND_NODE_API}${node_id_}%2Fbridge%2F${bridge}
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
-    ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.PUT On Session    session    url=${uri}    data=${body}    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Delete Bridge From Ovsdb Node
     [Documentation]    This request will delete the bridge node from the OVSDB
     [Arguments]    ${node_id}    ${bridge}
-    ${resp} =    RequestsLibrary.Delete Request
+    ${resp} =    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_API}${node_id}%2Fbridge%2F${bridge}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
+    ...    url=${RFC8040_SOUTHBOUND_NODE_API}${node_id}%2Fbridge%2F${bridge}
+    ...    expected_status=204
 
 Add Termination Point
     [Documentation]    Using the json data body file as a template, a REST config request is made to
@@ -97,7 +90,11 @@ Add Termination Point
     ${body} =    String.Replace String    ${body}    vxlanport    ${tp_name}
     ${node_id_} =    BuiltIn.Evaluate    """${node_id}""".replace("/","%2F").replace(":","%3A")
     ${uri} =    BuiltIn.Set Variable    ${RFC8040_SOUTHBOUND_NODE_API}${node_id_}%2Fbridge%2F${bridge}
-    ${resp} =    RequestsLibrary.Put Request    session    ${uri}/termination-point=${tp_name}    data=${body}
+    ${resp} =    RequestsLibrary.PUT On Session
+    ...    session
+    ...    url=${uri}/termination-point=${tp_name}
+    ...    data=${body}
+    ...    expected_status=anything
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Add Vxlan To Bridge
@@ -132,10 +129,12 @@ Get OVSDB UUID
     ...    node-id stripped of "ovsdb://uuid/". If not found, ${EMPTY} will be returned.
     [Arguments]    ${ovs_system_ip}=${TOOLS_SYSTEM_IP}    ${controller_http_session}=session
     ${uuid} =    Set Variable    ${EMPTY}
-    ${resp} =    RequestsLibrary.Get Request    ${controller_http_session}    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}
-    OVSDB.Log Request    ${resp.text}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
-    ${resp_json} =    RequestsLibrary.To Json    ${resp.text}
+    ${resp} =    RequestsLibrary.GET On Session
+    ...    ${controller_http_session}
+    ...    url=${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}
+    ...    expected_status=200
+    Utils.Log Content    ${resp.text}
+    ${resp_json} =    Utils.Json Parse From String    ${resp.text}
     ${topologies} =    Collections.Get From Dictionary    ${resp_json}    network-topology:topology
     ${topology} =    Collections.Get From List    ${topologies}    0
     ${node_list} =    Collections.Get From Dictionary    ${topology}    node
@@ -280,16 +279,22 @@ Get Port Metadata
 
 Log Config And Operational Topology
     [Documentation]    For debugging purposes, this will log both config and operational topo data stores
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_CONFIG_TOPO_API}
+    ...    expected_status=anything
+    Utils.Log Content    ${resp.text}
+    ${resp} =    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_OPERATIONAL_TOPO_API}
+    ...    expected_status=anything
+    Utils.Log Content    ${resp.text}
 
 Config and Operational Topology Should Be Empty
     [Documentation]    This will check that only the expected output is there for both operational and config
     ...    topology data stores. Empty probably means that only ovsdb:1 is there.
-    ${config_resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    ${operational_resp} =    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_API}
+    ${config_resp} =    RequestsLibrary.GET On Session   session    url=${RFC8040_CONFIG_TOPO_API}
+    ${operational_resp} =    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_API}
     BuiltIn.Should Contain    ${config_resp.text}    {"topology-id":"ovsdb:1"}
     BuiltIn.Should Contain    ${operational_resp.text}    {"topology-id":"ovsdb:1"}
 
@@ -310,8 +315,8 @@ Modify Multi Port Body
     ${uri} =    Builtin.Set Variable    ${RFC8040_TOPO_API}
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
-    ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.PUT On Session    session    url=${uri}    data=${body}    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     RETURN    ${body}
 
@@ -322,8 +327,8 @@ Create Qos
     ${body} =    Replace String    ${body}    QOS-1    ${qos}
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
-    ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.PUT On Session    session    url=${uri}    data=${body}    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Create Queue
@@ -333,8 +338,8 @@ Create Queue
     ${uri} =    BuiltIn.Set Variable    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:queues=${queue}
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
-    ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.PUT On Session    session    url=${uri}    data=${body}    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Update Qos
@@ -343,14 +348,18 @@ Update Qos
     ${uri} =    BuiltIn.Set Variable    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:qos-entries=${QOS}
     BuiltIn.Log    URL is ${uri}
     BuiltIn.Log    data: ${body}
-    ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.PUT On Session    session    url=${uri}    data=${body}    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Create Qos Linked Queue
     ${body} =    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/bug_7160/create_qoslinkedqueue.json
-    ${resp} =    RequestsLibrary.Put Request    session    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}    data=${body}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.PUT On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_HOST1_API}
+    ...    data=${body}
+    ...    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Add OVS Logging
@@ -400,9 +409,8 @@ Suite Teardown
     [Arguments]    ${uris}=@{EMPTY}
     OVSDB.Clean OVSDB Test Environment    ${TOOLS_SYSTEM_IP}
     FOR    ${uri}    IN    @{uris}
-        RequestsLibrary.Delete Request    session    ${uri}
+        RequestsLibrary.DELETE On Session    session    url=${uri}    expected_status=anything
     END
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
     OVSDB.Log Config And Operational Topology
     RequestsLibrary.Delete All Sessions
 
index 6cc315e05ea759397af812f3dcc8f06391c43a60..4dae800afd6f94e03c51fe39b9acc41bbdf9abfe 100644 (file)
@@ -24,15 +24,14 @@ ${PCEP_VAR_FOLDER}      ${CURDIR}/../variables/tcpmd5user
 Setup_Pcep_Operations
     [Documentation]    Creates Requests session to be used by subsequent keywords.
     RequestsLibrary.Create_Session
-    ...    alias=pcep_session
-    ...    url=http://${ODL_SYSTEM_IP}:${RESTCONFPORT}/rests/operations/
+    ...    pcep_session
+    ...    url=http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
     ...    headers=${HEADERS_XML}
     ...    auth=${AUTH}
 
 Teardown_Pcep_Operations
     [Documentation]    Teardown to pair with Setup (otherwise no-op).
-    Log    TODO: The following line does not seem to be implemented by RequestsLibrary. Look for a workaround.
-    # Delete_Session    pcep_session
+    RequestsLibrary.Delete_All_Sessions
 
 Add_Xml_Lsp_Return_Json
     [Documentation]    Instantiate LSP according to XML data and return response (json) text.
@@ -58,7 +57,12 @@ Remove_Xml_Lsp_Return_Json
 Operate_Xml_Lsp_Return_Json
     [Documentation]    Post XML data to given pcep-operations URI, check status_code is 200 and return response text (JSON).
     [Arguments]    ${uri_part}    ${xml_data}
-    ${response}=    RequestsLibrary.POST On Session    alias=pcep_session    url=${uri_part}    data=${xml_data}    expected_status=any
+    ${uri_path}=    BuiltIn.Set_Variable    /rests/operations/${uri_part}
+    ${response}=    RequestsLibrary.POST On Session
+    ...    pcep_session
+    ...    url=${uri_path}
+    ...    data=${xml_data}
+    ...    expected_status=anything
     Log    ${xml_data}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${response.status_code}
     RETURN    ${response.text}
index bd32c943f48dd261836089e0d3e8fe1295e6371f..9465e41925e8e268f348fd0b43f241dbb28a2d7f 100644 (file)
@@ -35,7 +35,10 @@ Get_Ipv4_Topology
     ...
     ...    Contrary to Utils.Get_Data_From_URI, this does not Log the (potentially huge) content.
     [Arguments]    ${session}=operational    ${topology}=example-ipv4-topology
-    ${response} =    RequestsLibrary.GET On Session    ${session}    url=${PC_NW_TOPOLOGY}=${topology}?content=nonconfig    expected_status=any
+    ${response} =    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${PC_NW_TOPOLOGY}=${topology}?content=nonconfig
+    ...    expected_status=anything
     IF    ${response.status_code} != 200
         Fail    Get on ${topology} returned status code ${response.status_code} with message: ${response.text}
     END
index 7e22ade8d8b991638bb0fb1ef3ef9bc9068a1e05..c0325d334f40ec611abae63847b935bc46da5fd6 100644 (file)
@@ -19,49 +19,47 @@ __email__ = "syedbahm@cisco.com"
 
 def getCarsUrl(hostname, port):
     """Cars resource URL for GET"""
-    return "http://" + hostname + ":" + port + "/restconf/config/car:cars"
+    return "http://" + hostname + ":" + port + "/rests/data/car:cars"
 
 
 def getPersonsUrl(hostname, port):
     """People resouce URL for GET"""
-    return "http://" + hostname + ":" + port + "/restconf/config/people:people"
+    return "http://" + hostname + ":" + port + "/rests/data/people:people"
 
 
 def getCarPersonUrl(hostname, port):
     """GET cars persons mapping resource URL"""
-    return "http://" + hostname + ":" + port + "/restconf/config/car-people:car-people"
+    return "http://" + hostname + ":" + port + "/rests/data/car-people:car-people"
 
 
 def getAddCarInitUrl(hostname, port):
     """POST or DELETE URL"""
-    return "http://" + hostname + ":" + port + "/restconf/config"
+    return "http://" + hostname + ":" + port + "/rests/data"
 
 
 def getAddCarUrl(hostname, port):
     """POST or DELETE URL"""
-    return "http://" + hostname + ":" + port + "/restconf/config/car:cars"
+    return "http://" + hostname + ":" + port + "/rests/data/car:cars"
 
 
 def getAddPersonUrl(hostname, port):
     """POST or DELETE URL"""
-    return "http://" + hostname + ":" + port + "/restconf/config"
+    return "http://" + hostname + ":" + port + "/rests/data"
 
 
 def getAddPersonRpcUrl(hostname, port):
     """POST URL -using rpc"""
-    return "http://" + hostname + ":" + port + "/restconf/operations/people:add-person"
+    return "http://" + hostname + ":" + port + "/rests/operations/people:add-person"
 
 
 def getAddCarPersonUrl(hostname, port):
     """POST URL for car person mapping"""
-    return "http://" + hostname + ":" + port + "/restconf/config"
+    return "http://" + hostname + ":" + port + "/rests/data"
 
 
 def getBuyCarRpcUrl(hostname, port):
     """POST URL for buy car rpc"""
-    return (
-        "http://" + hostname + ":" + port + "/restconf/operations/car-purchase:buy-car"
-    )
+    return "http://" + hostname + ":" + port + "/rests/operations/car-purchase:buy-car"
 
 
 def getJolokiaURL(hostname, port, shardIndex, shardName):
index be60c0838003a4b7df711471bec043155974f67a..c64f26005a1bc81b08043d9ca79bac6167d4fbca 100644 (file)
@@ -1,4 +1,5 @@
 *** Settings ***
+Library     RequestsLibrary
 Library     SSHLibrary
 Library     Telnet
 
@@ -23,14 +24,14 @@ Get Switch Datapath ID
 Verify Switch In Operational Data Store
     [Documentation]    Verifies the existence of the switch.datapath_id in the operational datastore.
     [Arguments]    ${switch}
-    ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT}
+    ${resp}=    RequestsLibrary.GET On Session    session    url=${REST_CONTEXT}
     Log    ${resp.text}
     Should Match Regexp    ${resp.text}    openflow:${switch.datapath_id}
 
 Verify Switch Not In Operational Data Store
     [Documentation]    Verifies that the given switch.datapath_id is not in the operational datastore.
     [Arguments]    ${switch}
-    ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT}
+    ${resp}=    RequestsLibrary.GET On Session    session    url=${REST_CONTEXT}
     Log    ${resp.text}
     Should Not Match Regexp    ${resp.text}    openflow:${switch.datapath_id}
 
index b41da8071d463c9eeaff9b13b8c21796665a8fcd..b09e8c8ff4f73dd14ce5ff6c78b926d005989816 100644 (file)
@@ -28,8 +28,8 @@ Revert To Default Binding Origins Configuration
 Get Binding Origins
     [Documentation]    Gets all binding origins via RPC from configuration
     [Arguments]    ${session}=session
-    ${resp} =    RequestsLibrary.Get Request    ${session}    /restconf/config/sxp-config:binding-origins
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp} =    RequestsLibrary.GET On Session    ${session}    /restconf/config/sxp-config:binding-origins
+    ...    expected_status=200
     RETURN    ${resp}
 
 Add Binding Origin
index dec6a0f8b17b22ac3a6a65a5e356d54b0a591f27..99fd137ae7c33efdff1675a2c9a72a5f7dd06d62 100644 (file)
@@ -129,10 +129,9 @@ Clean SXP Cluster
 Check Cluster Node Started
     [Documentation]    Verify that SxpNode has data written to Operational datastore and Node is running on one of cluster nodes
     [Arguments]    ${node}    ${port}=64999    ${ip}=${node}
-    ${resp} =    RequestsLibrary.Get Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${CONTROLLER_SESSION}
-    ...    /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ...    /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/    expected_status=200
     ${started} =    BuiltIn.Set Variable    ${False}
     FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
         ${rc} =    Utils.Run Command On Remote System
@@ -148,10 +147,10 @@ Check Cluster Node Started
 Check Cluster Node Stopped
     [Documentation]    Verify that SxpNode has data removed from Operational datastore and Node is stopped
     [Arguments]    ${node}    ${port}=64999    ${ip}=${node}
-    ${resp} =    RequestsLibrary.Get Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${CONTROLLER_SESSION}
     ...    /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    404
+    ...    expected_status=404
     ${stopped} =    BuiltIn.Set Variable    ${False}
     FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
         ${rc} =    Utils.Run Command On Remote System
index 7ee57de3898f5dfb4a0bfae9d185141357034e59..7a3a431029f541fdff86c61a58f5b6e3b7d18dc7 100644 (file)
@@ -362,20 +362,20 @@ Setup SXP Environment
 Check Node Started
     [Documentation]    Verify that SxpNode has data writen to Operational datastore and is running
     [Arguments]    ${node}    ${port}=64999    ${system}=${node}    ${session}=session    ${ip}=${node}
-    ${resp} =    RequestsLibrary.Get Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${session}
     ...    /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ...    expected_status=200
     ${rc} =    Get Node Running Status    ${node}    ${port}    ${system}    ${session}    ${ip}
     BuiltIn.Should Be Equal As Strings    ${rc}    0
 
 Check Node Stopped
     [Documentation]    Verify that SxpNode has data removed from Operational datastore and is not running
     [Arguments]    ${node}    ${port}=64999    ${system}=${node}    ${session}=session    ${ip}=${node}
-    ${resp} =    RequestsLibrary.Get Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${session}
     ...    /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    404
+    ...    expected_status=404
     ${rc} =    Get Node Running Status    ${node}    ${port}    ${system}    ${session}    ${ip}
     BuiltIn.Should Be Equal As Strings    ${rc}    1
 
@@ -403,7 +403,7 @@ Clean SXP Environment
 Get Routing Configuration From Controller
     [Documentation]    Get Routing configuration from config DS
     [Arguments]    ${session}
-    ${resp} =    RequestsLibrary.Get Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${session}
     ...    /restconf/config/sxp-cluster-route:sxp-cluster-route/
     ...    headers=${ACCEPT_XML}
@@ -424,7 +424,7 @@ Put Routing Configuration To Controller
 Clean Routing Configuration To Controller
     [Documentation]    Delete Routing configuration from Config DS
     [Arguments]    ${session}
-    ${resp} =    RequestsLibrary.Get Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${session}
     ...    /restconf/config/sxp-cluster-route:sxp-cluster-route/
     ...    headers=${ACCEPT_XML}
index 58d918df4cffd8570e7a22d5589fe41cf15a4925..73fc5ab08ac71a41180d16672dac2bc30e22d342 100644 (file)
@@ -125,6 +125,7 @@ Resource            ${CURDIR}/../variables/Variables.robot
 ...                                 ${201}
 ...                                 ${204}
 ...                                 ${404}
+...                                 ${409}
 # List of integers, not strings. Used by both PUT and DELETE (if the resource should have been present).
 @{ALLOWED_STATUS_CODES}
 ...                                 ${200}
@@ -150,7 +151,7 @@ Create_Default_Session
     ...    This Keyword is in this Resource only so that user do not need to call RequestsLibrary directly.
     [Arguments]    ${url}=http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    ${auth}=${AUTH}    ${timeout}=${DEFAULT_TIMEOUT_HTTP}    ${max_retries}=0
     RequestsLibrary.Create_Session
-    ...    alias=default
+    ...    default
     ...    url=${url}
     ...    auth=${auth}
     ...    timeout=${timeout}
index 6f60263945ac97ec707791ae27864bfcd4f7c5c1..b6ddab7094c44c1f90dba373546d8b1ff28038f3 100644 (file)
@@ -35,8 +35,7 @@ Basic Request Put
 Basic Request Get
     [Documentation]    Send a simple HTTP GET request to a given URL
     [Arguments]    ${overlay_topology_url}
-    ${resp}    Get Request    session    ${OPERATIONAL_API}/${overlay_topology_url}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Get On Session   session    ${OPERATIONAL_API}/${overlay_topology_url}    expected_status=200
     RETURN    ${resp}
 
 Send Basic Delete Request
index 449b9a1d39abaff4d0d12070f8b080bdd5df727e..17077d466caa6c10a471b7f0a5d0a631a42732d5 100644 (file)
@@ -114,7 +114,9 @@ Check For Specific Number Of Elements At URI
 Log Content
     [Arguments]    ${resp_content}
     IF    '''${resp_content}''' != '${EMPTY}'
-        ${resp_json}=    RequestsLibrary.To Json    ${resp_content}    pretty_print=True
+        ${resp_json}=    BuiltIn.Evaluate
+        ...    json.dumps(json.loads('''${resp_content}'''), sort_keys=True, indent=4, separators=(',', ': '))
+        ...    modules=json
     ELSE
         ${resp_json}=    BuiltIn.Set Variable    ${EMPTY}
     END
@@ -176,7 +178,7 @@ Clean Up Ovs
 Extract Value From Content
     [Documentation]    Will take the given response content and return the value at the given index as a string
     [Arguments]    ${content}    ${index}
-    ${JSON}=    Evaluate    json.loads('''${content}''')    json
+    ${JSON}=    BuiltIn.Evaluate    json.loads('''${content}''')    modules=json
     ${value}=    Set Variable    ${JSON${index}}
     RETURN    ${value}
 
@@ -365,18 +367,18 @@ Concatenate the String
 Post Elements To URI
     [Documentation]    Perform a POST rest operation, using the URL and data provided
     [Arguments]    ${rest_uri}    ${data}    ${headers}=${headers}    ${session}=session
-    ${resp}=    RequestsLibrary.Post On Session    ${session}    ${rest_uri}    data=${data}    headers=${headers}
+    ${resp}=    RequestsLibrary.Post On Session    ${session}    url=${rest_uri}    data=${data}    headers=${headers}
     Log    ${resp.text}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Remove All Elements At URI
     [Arguments]    ${uri}    ${session}=session
-    ${resp}=    RequestsLibrary.Delete On Session    ${session}    ${uri}
+    ${resp}=    RequestsLibrary.Delete On Session    ${session}    url=${uri}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Remove All Elements At URI And Verify
     [Arguments]    ${uri}    ${session}=session
-    ${resp}=    RequestsLibrary.Delete On Session    ${session}    ${uri}
+    ${resp}=    RequestsLibrary.Delete On Session    ${session}    url=${uri}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${resp}=    RequestsLibrary.Get On Session    ${session}    url=${uri}
     Should Contain    ${DELETED_STATUS_CODES}    ${resp.status_code}
@@ -393,7 +395,7 @@ Add Elements To URI From File
     [Documentation]    Put data from a file to a URI
     [Arguments]    ${dest_uri}    ${data_file}    ${headers}=${headers}    ${session}=session
     ${body}=    OperatingSystem.Get File    ${data_file}
-    ${resp}=    RequestsLibrary.Put On Session    ${session}    ${dest_uri}    data=${body}    headers=${headers}
+    ${resp}=    RequestsLibrary.Put On Session    ${session}    url=${dest_uri}    data=${body}    headers=${headers}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Add Elements To URI From File And Verify
@@ -405,7 +407,7 @@ Add Elements To URI From File And Verify
 Add Elements To URI And Verify
     [Documentation]    Put data to a URI and verify the HTTP response
     [Arguments]    ${dest_uri}    ${data}    ${headers}=${headers}    ${session}=session
-    ${resp}=    RequestsLibrary.Put On Session    ${session}    ${dest_uri}    ${data}    headers=${headers}
+    ${resp}=    RequestsLibrary.Put On Session    ${session}    url=${dest_uri}    ${data}    headers=${headers}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${resp}=    RequestsLibrary.Get On Session    ${session}    url=${dest_uri}
     Should Not Contain    ${DELETED_STATUS_CODES}    ${resp.status_code}
@@ -415,7 +417,7 @@ Add Elements To URI From File And Check Validation Error
     [Arguments]    ${dest_uri}    ${data_file}    ${headers}=${headers}    ${session}=session
     BuiltIn.Comment    TODO: Does this have any benefits, considering TemplatedRequests can also do this in one line?
     ${body}=    OperatingSystem.Get File    ${data_file}
-    ${resp}=    RequestsLibrary.Put On Session    ${session}    ${dest_uri}    data=${body}    headers=${headers}
+    ${resp}=    RequestsLibrary.Put On Session    ${session}    url=${dest_uri}    data=${body}    headers=${headers}
     Should Contain    ${DATA_VALIDATION_ERROR}    ${resp.status_code}
 
 Add Elements To URI From File And Check Server Error
@@ -424,13 +426,13 @@ Add Elements To URI From File And Check Server Error
     [Arguments]    ${dest_uri}    ${data_file}    ${headers}=${headers}    ${session}=session
     BuiltIn.Comment    TODO: Does this have any benefits, considering TemplatedRequests can also do this in one line?
     ${body}=    OperatingSystem.Get File    ${data_file}
-    ${resp}=    RequestsLibrary.Put On Session    ${session}    ${dest_uri}    data=${body}    headers=${headers}
+    ${resp}=    RequestsLibrary.Put On Session    ${session}    url=${dest_uri}    data=${body}    headers=${headers}
     Should Contain    ${INTERNAL_SERVER_ERROR}    ${resp.status_code}
 
 Post Elements To URI From File
     [Arguments]    ${dest_uri}    ${data_file}    ${headers}=${headers}    ${session}=session
     ${body}=    OperatingSystem.Get File    ${data_file}
-    ${resp}=    RequestsLibrary.Post On Session    ${session}    ${dest_uri}    data=${body}    headers=${headers}
+    ${resp}=    RequestsLibrary.Post On Session    ${session}    url=${dest_uri}    data=${body}    headers=${headers}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Run Process With Logging And Status Check
@@ -467,7 +469,11 @@ No Content From URI
     ...    ${headers}. If the request returns a HTTP error, fails. Otherwise
     ...    returns the data obtained by the request.
     [Arguments]    ${session}    ${uri}    ${headers}=${NONE}
-    ${resp}=    RequestsLibrary.Get On Session    ${session}    url=${uri}    expected_status=any    headers=${headers}
+    ${resp}=    RequestsLibrary.Get On Session
+    ...    ${session}
+    ...    url=${uri}
+    ...    headers=${headers}
+    ...    expected_status=anything
     IF    ${resp.status_code} == 404 or ${resp.status_code} == 409    RETURN
     Builtin.Log    ${resp.text}
     Builtin.Fail    The request failed with code ${resp.status_code}
@@ -495,7 +501,7 @@ Check Item Occurrence
 Post Log Check
     [Documentation]    Post body to ${uri}, log response content, and check status
     [Arguments]    ${uri}    ${body}    ${session}=session    ${status_codes}=200
-    ${resp}=    RequestsLibrary.Post On Session    ${session}    ${uri}    ${body}
+    ${resp}=    RequestsLibrary.Post On Session    ${session}    url=${uri}    data=${body}
     Log    ${resp.text}
     TemplatedRequests.Check Status Code    ${resp}    ${status_codes}
     RETURN    ${resp}
index 03b5020d400c1fff086fc176632e37166fe2e163..e299f335603a71253caf0455a7c3a0451b68f517 100644 (file)
@@ -101,16 +101,14 @@ Stop SuiteVtnMaTest
 
 Fetch vtn list
     [Documentation]    Check if VTN Manager is up.
-    ${resp}=    RequestsLibrary.Get Request    session    restconf/operational/vtn:vtns
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}=    RequestsLibrary.GET On Session    session    restconf/operational/vtn:vtns    expected_status=200
 
 Fetch vtn switch inventory
     [Documentation]    Check if Switch is detected.
     [Arguments]    ${sw_name}
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    session
-    ...    restconf/operational/vtn-inventory:vtn-nodes/vtn-node/${sw_name}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ...    restconf/operational/vtn-inventory:vtn-nodes/vtn-node/${sw_name}    expected_status=200
 
 Collect Debug Info
     [Documentation]    Check if Switch is detected.
@@ -243,7 +241,7 @@ Add a pathmap
 
 Get a pathmap
     [Documentation]    Get a pathmap for a vtn.
-    ${resp}=    RequestsLibrary.Get Request    session    restconf/operational/vtn-path-map:global-path-maps
+    ${resp}=    RequestsLibrary.GET On Session    session    restconf/operational/vtn-path-map:global-path-maps
     FOR    ${pathElement}    IN    @{PATHMAP_ATTR}
         should Contain    ${resp.text}    ${pathElement}
     END
@@ -260,7 +258,7 @@ Add a pathpolicy
 Get a pathpolicy
     [Documentation]    Get a pathpolicy for a vtn.
     [Arguments]    ${pathpolicy_id}
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    session
     ...    restconf/operational/vtn-path-policy:vtn-path-policies/vtn-path-policy/${pathpolicy_id}
     FOR    ${pathpolicyElement}    IN    @{PATHPOLICY_ATTR}
@@ -349,10 +347,10 @@ Start vlan_topo
 Get flow
     [Documentation]    Get data flow.
     [Arguments]    ${vtn_name}
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    session
     ...    restconf/operational/vtn-flow-impl:vtn-flows/vtn-flow-table/${vtn_name}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ...    expected_status=200
 
 Remove a portmap
     [Documentation]    Remove a portmap for a interface of a vbridge
@@ -519,16 +517,19 @@ Add a flowcondition
 
 Get flowconditions
     [Documentation]    Retrieve the list of flowconditions created
-    ${resp}=    RequestsLibrary.Get Request    session    restconf/operational/vtn-flow-condition:vtn-flow-conditions
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}=    RequestsLibrary.Get On Session
+    ...    session
+    ...    restconf/operational/vtn-flow-condition:vtn-flow-conditions
+    ...    expected_status=200
 
 Get flowcondition
     [Documentation]    Retrieve the flowcondition by name and to check the removed flowcondition we added "retrieve" argument to differentiate the status code,
     ...    since after removing flowcondition name the status will be different compare to status code when the flowcondition name is present.
     [Arguments]    ${flowcond_name}    ${retrieve}
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    session
     ...    restconf/operational/vtn-flow-condition:vtn-flow-conditions/vtn-flow-condition/${flowcond_name}
+    ...    expected_status=anything
     IF    '${retrieve}' == 'retrieve'
         Should Be Equal As Strings    ${resp.status_code}    200
     ELSE
index dac5fe89fc4c8323013e3e6ef01b9bc924a7f29c..2ad987e5d10153c607b0acab557f98dd8c503fc2 100644 (file)
@@ -360,6 +360,10 @@ Workflow Setup
 
 Workflow Teardown
     [Documentation]    Cleanup when workflow is interrupt
-    Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
+    Run Keyword And Ignore Error
+    ...    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_NODES_API}
+    ...    expected_status=anything
     Utils.Clean Mininet System
     RequestsLibrary.Delete All Sessions
index ce29321cce01daa2c6a4cf5526b5b902a8df165c..85c701ae42bfcddcccbfdff58520be090768ff24 100644 (file)
@@ -71,8 +71,7 @@ IDM Endpoints Only Available To admin Role
     [Documentation]    A user with a non-"admin" role should not have access to AAA endpoints
     ${auth} =    Create List    ${USER_USER}    ${USER_PW}
     Create Session    httpbin    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${auth}    headers=${HEADERS}
-    ${resp} =    RequestsLibrary.Get Request    httpbin    ${USERS_REST_URL}
-    Should Be Equal As Numbers    ${resp.status_code}    401
+    ${resp} =    RequestsLibrary.GET On Session    httpbin    url=${USERS_REST_URL}    expected_status=401
 
 
 *** Keywords ***
@@ -81,8 +80,7 @@ Auth Should Fail
     [Arguments]    ${url}    ${user}    ${password}
     @{auth} =    Create List    ${user}    ${password}
     Create Session    httpbin    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${auth}    headers=${HEADERS}
-    ${resp} =    RequestsLibrary.Get Request    httpbin    ${url}
-    Should Be Equal As Strings    ${resp.status_code}    401
+    ${resp} =    RequestsLibrary.GET On Session    httpbin    url=${url}    expected_status=401
     ${header_value} =    Convert To Uppercase    ${resp.headers}[www-authenticate]
     Should Contain    ${header_value}    BASIC
     Log    ${resp.content}
@@ -92,5 +90,4 @@ Auth Should Pass
     [Arguments]    ${url}    ${user}    ${password}
     @{auth} =    Create List    ${user}    ${password}
     Create Session    httpbin    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${auth}    headers=${HEADERS}
-    ${resp} =    RequestsLibrary.Get Request    httpbin    ${url}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp} =    RequestsLibrary.GET On Session    httpbin    url=${url}    expected_status=200
index 7977a2d9afa2097fc26638971d55b074b31446ba..f01c62eaaee5838b11d13a0a326f3b8811af92a3 100644 (file)
@@ -48,9 +48,17 @@ Successful Authentication Including Domain
     ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
     ...    auth=${AUTH_SDN_DOMAIN}
     ...    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${URI_CERTIFICATE}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
-    ${resp}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Successful Authentication Without Domain
@@ -67,9 +75,17 @@ Successful Authentication Without Domain
     ...
     ...    - URL "/restconf/operational/ietf-restconf-monitoring:restconf-state" is not specified neither in shiro.ini nor in MDSAL Dynamic Authorization so no specific role is required
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH_CSC_SDN}    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${URI_CERTIFICATE}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
-    ${resp}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Unsuccessful Authentication Wrong User
@@ -84,9 +100,17 @@ Unsuccessful Authentication Wrong User
     ...
     ...    Due to authentication fails, authorization is not evaluated
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH_INVALID}    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${URI_CERTIFICATE}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
-    ${resp}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
 
 UnSuccessful Authentication Without Domain
@@ -102,9 +126,17 @@ UnSuccessful Authentication Without Domain
     ...
     ...    Due to authentication fails, authorization is not evaluated
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH_SDN}    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${URI_CERTIFICATE}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
-    ${resp}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
 
 Unsuccessful Authentication Wrong Domain
@@ -125,9 +157,17 @@ Unsuccessful Authentication Wrong Domain
     ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
     ...    auth=${AUTH_SDN_WRONG_DOM}
     ...    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${URI_CERTIFICATE}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
-    ${resp}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
 
 Unsuccessful Basic Authorization
@@ -146,9 +186,17 @@ Unsuccessful Basic Authorization
     ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
     ...    auth=${AUTH_CSC_NO_ADMIN}
     ...    headers=${HEADERS}
-    ${resp_ok}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp_ok}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp_ok.status_code}
-    ${resp_nook}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp_nook}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${URI_CERTIFICATE}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp_nook.status_code}
 
 Unsuccessful Dynamic Authorization
@@ -167,9 +215,17 @@ Unsuccessful Dynamic Authorization
     ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
     ...    auth=${AUTH_CSC_NO_ADMIN}
     ...    headers=${HEADERS}
-    ${resp_nook}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp_nook}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp_nook.status_code}
-    ${resp_nook}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp_nook}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${URI_CERTIFICATE}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp_nook.status_code}
 
 Unsuccessful Dynamic Authorization 2
@@ -196,18 +252,34 @@ Unsuccessful Dynamic Authorization 2
     ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
     ...    auth=${AUTH_SDN_DOMAIN}
     ...    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${URI_CERTIFICATE}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
-    ${resp}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
     Create Session
     ...    session
     ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
     ...    auth=${AUTH_CSC_NO_ADMIN}
     ...    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
-    ${resp}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${URI_CERTIFICATE}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
 
 Unsuccessful No Keystone Connection
@@ -223,18 +295,30 @@ Unsuccessful No Keystone Connection
     ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
     ...    auth=${AUTH_SDN_DOMAIN}
     ...    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${URI_CERTIFICATE}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
-    ${resp}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
     Create Session
     ...    session
     ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
     ...    auth=${AUTH_CSC_NO_ADMIN}
     ...    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Get Request    session    ${URI_RESTCONF}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${URI_RESTCONF}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
-    ${resp}    RequestsLibrary.Post Request    session    ${URI_CERTIFICATE}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.POST On Session    session    url=${URI_CERTIFICATE}    headers=${HEADERS}
     Should Contain    ${UNAUTHORIZED_STATUS_CODES}    ${resp.status_code}
 
 
@@ -346,13 +430,14 @@ Provision MDSAL
     Create Session    session_admin    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
     Set Suite Variable    ${PUT_DYNAMIC_AUTH_URI}    /restconf/config/aaa:http-authorization
     ${body_dyn}    OperatingSystem.Get File    ${PUT_DYNAMIC_AUTH_FILE}
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session_admin
-    ...    ${PUT_DYNAMIC_AUTH_URI}
+    ...    url=${PUT_DYNAMIC_AUTH_URI}
     ...    data=${body_dyn}
     ...    headers=${HEADERS}
+    ...    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
-    Delete Request    session_admin    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
+    DELETE On Session    session_admin    url=http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
 
 Restart Controller
     [Documentation]    Controller restart is needed in order the new shiro.ini config takes effect
@@ -367,7 +452,7 @@ Restart Controller
 Get Controller Modules
     [Documentation]    Get the restconf modules, check 200 status and ietf-restconf presence
     Create Session    session1    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Get_Request    session1    ${MODULES_API}
+    ${resp}    RequestsLibrary.GET On Session    session1    url=${MODULES_API}
     BuiltIn.Log    ${resp.content}
     BuiltIn.Should_Be_Equal    ${resp.status_code}    ${200}
     BuiltIn.Should_Contain    ${resp.content}    ietf-restconf
index 945fb3b7b244979e44c968a5422300518409e423..1ce552a1b27682b136e1f45b817a4ca2455cdd8b 100644 (file)
@@ -27,7 +27,7 @@ ${RESTCONF_MONITORING_URL}      https://${ODL_SYSTEM_IP}:${RESTCONFPORT_TLS}${RE
 Basic Unsecure Restconf Request
     [Documentation]    Tests a basic HTTP request, just to ensure that system is working fine with normal, unsecure reqs
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Get Request    session    ${RESTCONF_MONITORING_URI}
+    ${resp}    RequestsLibrary.GET On Session    session    ${RESTCONF_MONITORING_URI}    expected_status=anything
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Delete All Sessions
 
@@ -47,7 +47,7 @@ Activate TLS
     Enable TLS in ODL
     # Check ODL was restarted properly
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Get Request    session    ${RESTCONF_MONITORING_URI}
+    ${resp}    RequestsLibrary.GET On Session    session    ${RESTCONF_MONITORING_URI}    expected_status=anything
     Delete All Sessions
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
@@ -91,7 +91,7 @@ Activate Client Authentication
     Enable Client TLS Authentication in ODL
     # Check ODL was restarted properly
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
-    ${resp}    RequestsLibrary.Get Request    session    ${RESTCONF_MONITORING_URI}
+    ${resp}    RequestsLibrary.GET On Session    session    ${RESTCONF_MONITORING_URI}    expected_status=anything
     Delete All Sessions
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
index 51c25ea53c87d1acdc68fbb5bca7338f657f22e9..506b41f946f64e0ee08e456f64aff68afef88a40 100644 (file)
@@ -137,7 +137,10 @@ Verify_Bgp_Peer_Connection
     # TODO:    This keyword is not specific to prefix counting. Find a better place for it.
     ${peer_check_url} =    BuiltIn.Set_Variable    ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F
     ${exp_status_code} =    BuiltIn.Set_Variable_If    ${connected}    200    404
-    ${rsp} =    RequestsLibrary.GET On Session    ${session}    ${peer_check_url}${peer_ip}?content=nonconfig    expected_status=${exp_status_code}
+    ${rsp} =    RequestsLibrary.GET On Session
+    ...    ${session}
+    ...    url=${peer_check_url}${peer_ip}?content=nonconfig
+    ...    expected_status=${exp_status_code}
     BuiltIn.Log    ${rsp.content}
 
 Set_Shard_Leaders_Location_And_Verify
index 52d267b2e242493677d91f24d1ba08244503fc62..ef3930ab6becc0424a2133747f397aa89f03bdc3 100644 (file)
@@ -129,7 +129,7 @@ Verify_Flowspec_Data
 
 Normalize_And_Compare
     [Documentation]    Verify empty flowspec data
-    ${rsp}    RequestsLibrary.Get_Request    ${CONFIG_SESSION}    ${FLOWSPEC_URL}
+    ${rsp}    RequestsLibrary.GET On Session    ${CONFIG_SESSION}    url=${FLOWSPEC_URL}
     TemplatedRequests.Normalize_Jsons_With_Bits_And_Compare
     ...    ${EXP0}
     ...    ${rsp.content}
index 2135dbabdf917d4a784c3f3d7d96c79f43f9b9b7..3691d790e8d9d22e450040eea02e36a197eb5ab2 100644 (file)
@@ -196,9 +196,9 @@ Store_Rib_Configuration
     BuiltIn.Set_Suite_Variable    ${rib_old}
 
 Log_Loc_Rib_Operational
-    ${rsp}    RequestsLibrary.Get Request
+    ${rsp}    RequestsLibrary.GET On Session
     ...    ${CONFIG_SESSION}
-    ...    /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/
+    ...    url=/rests/data/bgp-rib:bgp-rib/rib=example-bgp-rib/loc-rib?content=nonconfig
     BuiltIn.Log    ${rsp.content}
 
 Configure_App_Peer_With_Routes
index 7e0676739142a3e84acf944f64d623f7250c0f95..efac5aad93295650cace17dc362e73b5acc1268d 100644 (file)
@@ -321,23 +321,23 @@ Odl_To_Play_Template
     BuiltIn.Log    ${withdraw_hex}
     BgpRpcClient.play_clean
     ${resp} =    RequestsLibrary.POST On Session
-    ...    alias=${CONFIG_SESSION}
+    ...    ${CONFIG_SESSION}
     ...    url=${EVPN_CONF_URL}
     ...    data=${data_xml}
     ...    headers=${HEADERS_XML}
     ...    expected_status=201
     BuiltIn.Log    ${resp.content}
-    ${resp} =    RequestsLibrary.Get_Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${CONFIG_SESSION}
-    ...    ${EVPN_CONF_URL}?content=config
+    ...    url=${EVPN_CONF_URL}?content=config
     ...    headers=${HEADERS_XML}
     BuiltIn.Log    ${resp.content}
-    ${aupdate} =    BuiltIn.Wait_Until_Keyword_Succeeds    4x    2s    Get_Update_Content
+    ${aupdate} =    BuiltIn.Wait_Until_Keyword_Succeeds    4x    2s    Get_Update_Content    ${ALLOWED_STATUS_CODES}
     BuiltIn.Log    ${aupdate}
     BgpOperations.Verify_Two_Hex_Messages_Are_Equal    ${aupdate}    ${announce_hex}
     BgpRpcClient.play_clean
     Remove_Configured_Routes
-    ${wupdate} =    BuiltIn.Wait_Until_Keyword_Succeeds    4x    2s    Get_Update_Content
+    ${wupdate} =    BuiltIn.Wait_Until_Keyword_Succeeds    4x    2s    Get_Update_Content    ${DELETED_STATUS_CODES}
     BuiltIn.Log    ${wupdate}
     BgpOperations.Verify_Two_Hex_Messages_Are_Equal    ${wupdate}    ${withdraw_hex}
     [Teardown]    Remove_Configured_Routes
@@ -362,23 +362,38 @@ Play_To_Odl_Template
     [Teardown]    Withdraw_Route_And_Verify    ${withdraw_hex}
 
 Verify_Test_Preconditions
-    ${resp} =    RequestsLibrary.Get_Request    ${CONFIG_SESSION}    ${EVPN_CONF_URL}?content=config
+    ${resp} =    RequestsLibrary.GET On Session
+    ...    ${CONFIG_SESSION}
+    ...    url=${EVPN_CONF_URL}?content=config
+    ...    expected_status=anything
     BuiltIn.Should_Contain    ${DELETED_STATUS_CODES}    ${resp.status_code}
-    ${rsp} =    RequestsLibrary.Get_Request    ${CONFIG_SESSION}    ${EVPN_FAMILY_LOC_RIB}    headers=${HEADERS}
-    TemplatedRequests.Normalize_Jsons_And_Compare    ${EMPTY_ROUTES}    ${rsp.content}
+    ${resp} =    RequestsLibrary.GET On Session
+    ...    ${CONFIG_SESSION}
+    ...    url=${EVPN_FAMILY_LOC_RIB}
+    ...    headers=${HEADERS}
+    TemplatedRequests.Normalize_Jsons_And_Compare    ${EMPTY_ROUTES}    ${resp.content}
 
 Remove_Configured_Routes
     [Documentation]    Removes the route if present. First GET is for debug purposes.
-    ${rsp} =    RequestsLibrary.Get_Request    ${CONFIG_SESSION}    ${EVPN_LOC_RIB}    headers=${HEADERS}
-    Log    ${rsp.content}
-    ${rsp} =    RequestsLibrary.Get_Request
+    ${resp} =    RequestsLibrary.GET On Session
+    ...    ${CONFIG_SESSION}
+    ...    url=${EVPN_LOC_RIB}
+    ...    headers=${HEADERS}
+    ...    expected_status=anything
+    BuiltIn.Log    ${resp.content}
+    BuiltIn.Should_Contain    ${ALLOWED_DELETE_STATUS_CODES}    ${resp.status_code}
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${CONFIG_SESSION}
-    ...    ${EVPN_CONF_URL}?content=config
+    ...    url=${EVPN_CONF_URL}?content=config
     ...    headers=${HEADERS}
-    Log    ${rsp.content}
-    IF    ${rsp.status_code} in ${DELETED_STATUS_CODES}    RETURN
-    ${resp} =    RequestsLibrary.Delete_Request    ${CONFIG_SESSION}    ${EVPN_CONF_URL}
-    BuiltIn.Should_Be_Equal_As_Numbers    ${resp.status_code}    204
+    ...    expected_status=anything
+    BuiltIn.Log    ${resp.content}
+    BuiltIn.Should_Contain    ${ALLOWED_DELETE_STATUS_CODES}    ${resp.status_code}
+    IF    ${resp.status_code} in ${DELETED_STATUS_CODES}    RETURN
+    ${resp} =    RequestsLibrary.DELETE On Session
+    ...    ${CONFIG_SESSION}
+    ...    url=${EVPN_CONF_URL}
+    ...    expected_status=204
 
 Withdraw_Route_And_Verify
     [Documentation]    Sends withdraw update message from exabgp and verifies route removal from odl's rib
@@ -388,8 +403,14 @@ Withdraw_Route_And_Verify
 
 Get_Update_Content
     [Documentation]    Gets received data from odl's peer
-    ${resp} =    RequestsLibrary.Get_Request    ${CONFIG_SESSION}    ${EVPN_LOC_RIB}    headers=${HEADERS_XML}
+    [Arguments]    ${expected_status_codes}
+    ${resp} =    RequestsLibrary.GET On Session
+    ...    ${CONFIG_SESSION}
+    ...    url=${EVPN_LOC_RIB}
+    ...    headers=${HEADERS_XML}
+    ...    expected_status=anything
     BuiltIn.Log    ${resp.content}
+    BuiltIn.Should_Contain    ${expected_status_codes}    ${resp.status_code}
     ${update} =    BgpRpcClient.play_get
     BuiltIn.Should_Not_Be_Equal    ${update}    ${Empty}
     RETURN    ${update}
@@ -397,6 +418,6 @@ Get_Update_Content
 Loc_Rib_Presence
     [Documentation]    Verifies if loc-rib contains expected data
     [Arguments]    ${exp_content}
-    ${rsp} =    RequestsLibrary.Get_Request    ${CONFIG_SESSION}    ${EVPN_LOC_RIB}    headers=${HEADERS}
-    BuiltIn.Log_Many    ${exp_content}    ${rsp.content}
-    TemplatedRequests.Normalize_Jsons_And_Compare    ${exp_content}    ${rsp.content}
+    ${resp} =    RequestsLibrary.GET On Session    ${CONFIG_SESSION}    url=${EVPN_LOC_RIB}    headers=${HEADERS}
+    BuiltIn.Log_Many    ${exp_content}    ${resp.content}
+    TemplatedRequests.Normalize_Jsons_And_Compare    ${exp_content}    ${resp.content}
index 9b5f00dd4061e2820b6dbaa0e37badb7cdee989a..72697ec7db1ec56cb9f23e0ba65da3e76f688874 100644 (file)
@@ -285,7 +285,7 @@ Verify_Reported_Data
     [Arguments]    ${url}    ${exprspfile}
     ${expresponse} =    OperatingSystem.Get File    ${exprspfile}
     BuiltIn.Log    expected_response: ${expresponse}
-    ${rsp} =    RequestsLibrary.Get_Request    ${CONFIG_SESSION}    ${url}
+    ${rsp} =    RequestsLibrary.GET On Session    ${CONFIG_SESSION}    url=${url}
     BuiltIn.Log    actual_response: ${rsp}
     BuiltIn.Log    actual_response_content: ${rsp.content}
     TemplatedRequests.Normalize_Jsons_And_Compare    ${expresponse}    ${rsp.content}
index 81a33bf23488a27c00d9d86073556369fa3c3061..64613570dba1a8d9a5dd48b1eb5bb7de5b7353b8 100644 (file)
@@ -145,16 +145,16 @@ Connect_iBGP_Peer1
     [Documentation]    Connect BGP peer
     [Tags]    critical
     SSHLibrary.Switch Connection    ibgp_peer1_console
-    Start_Console_Tool    ${iBGP_PEER1_COMMAND}    ${iBGP_PEER1_OPTIONS}
-    Read_And_Fail_If_Prompt_Is_Seen
+    BGPcliKeywords.Start_Console_Tool    ${iBGP_PEER1_COMMAND}    ${iBGP_PEER1_OPTIONS}
+    BGPcliKeywords.Read_And_Fail_If_Prompt_Is_Seen
     BgpOperations.Check_Example_IPv4_Topology_Does_Not_Contain    ${CONFIG_SESSION}    prefix
 
 Connect_eBGP_Peer1
     [Documentation]    Connect BGP peer
     [Tags]    critical
     SSHLibrary.Switch Connection    ebgp_peer1_console
-    Start_Console_Tool    ${eBGP_PEER1_COMMAND}    ${eBGP_PEER1_OPTIONS}
-    Read_And_Fail_If_Prompt_Is_Seen
+    BGPcliKeywords.Start_Console_Tool    ${eBGP_PEER1_COMMAND}    ${eBGP_PEER1_OPTIONS}
+    BGPcliKeywords.Read_And_Fail_If_Prompt_Is_Seen
 
 Check_IPv4_Topology_For_First_Path
     [Documentation]    The IPv4 topology shall contain the route announced by the first eBGP
@@ -195,8 +195,8 @@ Connect_eBGP_Peer2
     [Documentation]    Connect BGP peer and check empty topology
     [Tags]    critical
     SSHLibrary.Switch Connection    ebgp_peer2_console
-    Start_Console_Tool    ${eBGP_PEER2_COMMAND}    ${eBGP_PEER2_OPTIONS}
-    Read_And_Fail_If_Prompt_Is_Seen
+    BGPcliKeywords.Start_Console_Tool    ${eBGP_PEER2_COMMAND}    ${eBGP_PEER2_OPTIONS}
+    BGPcliKeywords.Read_And_Fail_If_Prompt_Is_Seen
 
 Disconnect_eBGP_Peer1
     [Documentation]    Stop BGP peer, log topology and store logs
@@ -429,12 +429,6 @@ Setup_Everything
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background
     ...    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.protocol
 
-Read_Text_Before_Prompt
-    [Documentation]    Log text gathered by SSHLibrary.Read_Until_Prompt.
-    ...    This needs to be a separate keyword just because how Read_And_Fail_If_Prompt_Is_Seen is implemented.
-    ${text}    SSHLibrary.Read_Until_Prompt
-    BuiltIn.Log    ${text}
-
 Store_File_To_Workspace
     [Documentation]    Store the ${source_file_name} to the workspace as ${target_file_name}.
     [Arguments]    ${source_file_name}    ${target_file_name}
index 4cdb4332477a574039546e8b069b223bea7dc3de..d1bce641ae753b907798b994e40e063b8ba151e6 100644 (file)
@@ -156,5 +156,5 @@ Compare_Topology
     ...    '${uri}'=='${EMPTY}'
     ...    ${REST_API}/${TOPOLOGY_URL}=pcep-topology?content=nonconfig
     ...    ${REST_API}/${TOPOLOGY_URL}=pcep-topology/${uri}?content=nonconfig
-    ${response}=    RequestsLibrary.GET On Session    ${CONFIG_SESSION}    ${topology_uri}    expected_status=200
+    ${response}=    RequestsLibrary.GET On Session    ${CONFIG_SESSION}    url=${topology_uri}    expected_status=200
     TemplatedRequests.Normalize_Jsons_And_Compare    ${exp}    ${response.text}
index 47ffaf0d3c1e8b602b9ed7d69022943b9178cb98..99a2ef89b04218acf5b5ef4a04235c8f638d8497 100644 (file)
@@ -1,10 +1,12 @@
 *** Settings ***
 Documentation       Test suite for NETCONF client
+...                 FIXME: this test suite is based on the config subsystem, which has been long gone.
+...                 Currently this test suite is not used and hence should be fixed when added back.
 
 Library             Collections
 Library             OperatingSystem
-Library             String
 Library             RequestsLibrary
+Library             String
 Library             ../../../libraries/Common.py
 Variables           ../../../variables/Variables.py
 
@@ -13,13 +15,12 @@ Suite Teardown      Delete All Sessions
 
 
 *** Variables ***
-${NETOPEER}             ${TOOLS_SYSTEM_IP}
-${NETOPEER_USER}        ${TOOLS_SYSTEM_USER}
-${FILE}                 ${CURDIR}/../../../variables/xmls/netconf.xml
-${REST_CONT_CONF}       /restconf/config/network-topology:network-topology/topology/topology-netconf
-${REST_CONT_OPER}       /restconf/operational/network-topology:network-topology/topology/topology-netconf
-${REST_NTPR_CONF}       node/controller-config/yang-ext:mount/config:modules
-${REST_NTPR_MOUNT}      node/netopeer/yang-ext:mount/
+${NETOPEER}                 ${TOOLS_SYSTEM_IP}
+${NETOPEER_USER}            ${TOOLS_SYSTEM_USER}
+${FILE}                     ${CURDIR}/../../../variables/xmls/netconf.xml
+${REST_TOPOLOGY_NETCONF}    /rests/data/network-topology:network-topology/topology=topology-netconf
+${REST_NTPR_CONF}           node=controller-config/yang-ext:mount/config:modules
+${REST_NTPR_MOUNT}          node=netopeer/yang-ext:mount
 
 
 *** Test Cases ***
@@ -30,9 +31,12 @@ Add NetConf device
     ${XML2}    Replace String    ${XML1}    127.0.0.1    ${NETOPEER}
     ${body}    Replace String    ${XML2}    mininet    ${NETOPEER_USER}
     Log    ${body}
-    ${resp}    Post Request    session    ${REST_CONT_CONF}/${REST_NTPR_CONF}    data=${body}
+    ${resp}    RequestsLibrary.POST On Session
+    ...    session
+    ...    url=${REST_TOPOLOGY_NETCONF}/${REST_NTPR_CONF}
+    ...    data=${body}
+    ...    expected_status=204
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    204
 
 Get Controller Inventory
     [Documentation]    Get Controller operational inventory
@@ -42,17 +46,21 @@ Get Controller Inventory
 Pull External Device configuration
     [Documentation]    Pull Netopeer configuration
     [Tags]    netconf
-    ${resp}    Get Request    session    ${REST_CONT_CONF}/${REST_NTPR_MOUNT}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${REST_TOPOLOGY_NETCONF}/${REST_NTPR_MOUNT}?content=config
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    {}
 
 Verify Device Operational data
     [Documentation]    Verify Netopeer operational data
     [Tags]    exclude
-    ${resp}    Get Request    session    ${REST_CONT_OPER}/${REST_NTPR_MOUNT}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${REST_TOPOLOGY_NETCONF}/${REST_NTPR_MOUNT}?content=nonconfig
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    schema
     Should Contain    ${resp.content}    statistics
     Should Contain    ${resp.content}    datastores
@@ -60,9 +68,11 @@ Verify Device Operational data
 
 *** Keywords ***
 Get Inventory
-    ${resp}    Get Request    session    ${REST_CONT_OPER}/node/netopeer
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${REST_TOPOLOGY_NETCONF}/node=netopeer?content=nonconfig
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    "node-id":"netopeer"
     Should Contain    ${resp.content}    "netconf-node-topology:connection-status":"connected"
     Should Contain    ${resp.content}    "netconf-node-topology:available-capabilities"
index 735cfa9e9b448c3d3b320272a3e267ba4e09fa74..0be32338a8ff4464f94e9079f463c7ba0a8b9996 100644 (file)
@@ -40,9 +40,12 @@ ${addpeoplecmd}
 ...                         python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 5
 ${purchasecmd}
 ...                         python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 5
-${carurl}                   /restconf/config/car:cars
-${peopleurl}                /restconf/config/people:people
-${carpeopleurl}             /restconf/config/car-people:car-people
+${carurl}                   /rests/data/car:cars
+${carurl_config}            /rests/data/car:cars?content=config
+${peopleurl}                /rests/data/people:people
+${peopleurl_config}         /rests/data/people:people?content=config
+${carpeopleurl}             /rests/data/car-people:car-people
+${carpeopleurl_config}      /rests/data/car-people:car-people?content=config
 ${CONTROLLER_LOG_LEVEL}     INFO
 ${TOOL_OPTIONS}             ${EMPTY}
 
@@ -59,7 +62,7 @@ Verify Cars
     [Documentation]    Store logs and verify result
     Stop Tool
     Store File To Workspace    cluster_rest_script.log    cluster_rest_script_add_cars.log
-    ${rsp}=    RequestsLibrary.Get Request    session    ${carurl}    headers=${ACCEPT_XML}
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${carurl_config}    headers=${ACCEPT_XML}
     ${count}=    XML.Get Element Count    ${rsp.content}    xpath=car-entry
     Should Be Equal As Numbers    ${count}    ${ITEM_COUNT}
 
@@ -72,7 +75,7 @@ Verify People
     [Documentation]    Store logs and verify result
     Stop Tool
     Store File To Workspace    cluster_rest_script.log    cluster_rest_script_add_people.log
-    ${rsp}=    RequestsLibrary.Get Request    session    ${peopleurl}    headers=${ACCEPT_XML}
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${peopleurl_config}    headers=${ACCEPT_XML}
     ${count}=    XML.Get Element Count    ${rsp.content}    xpath=person
     Should Be Equal As Numbers    ${count}    ${ITEM_COUNT}
 
@@ -89,23 +92,20 @@ Verify Purchases
 
 Delete Cars
     [Documentation]    Remove cars from the datastore
-    ${rsp}=    RequestsLibrary.Delete Request    session    ${carurl}
-    Should Be Equal As Numbers    200    ${rsp.status_code}
-    ${rsp}=    RequestsLibrary.Get Request    session    ${carurl}
+    ${rsp}=    RequestsLibrary.DELETE On Session    session    url=${carurl}    expected_status=200
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${carurl_config}    expected_status=anything
     Should Contain    ${DELETED_STATUS_CODES}    ${rsp.status_code}
 
 Delete People
     [Documentation]    Remove people from the datastore
-    ${rsp}=    RequestsLibrary.Delete Request    session    ${peopleurl}
-    Should Be Equal As Numbers    200    ${rsp.status_code}
-    ${rsp}=    RequestsLibrary.Get Request    session    ${peopleurl}
+    ${rsp}=    RequestsLibrary.DELETE On Session    session    url=${peopleurl}    expected_status=200
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${peopleurl_config}    expected_status=anything
     Should Contain    ${DELETED_STATUS_CODES}    ${rsp.status_code}
 
 Delete CarPeople
     [Documentation]    Remove car-people entries from the datastore
-    ${rsp}=    RequestsLibrary.Delete Request    session    ${carpeopleurl}
-    Should Be Equal As Numbers    200    ${rsp.status_code}
-    ${rsp}=    RequestsLibrary.Get Request    session    ${carpeopleurl}
+    ${rsp}=    RequestsLibrary.DELETE On Session    session    url=${carpeopleurl}    expected_status=200
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${carpeopleurl_config}    expected_status=anything
     Should Contain    ${DELETED_STATUS_CODES}    ${rsp.status_code}
 
 
@@ -149,7 +149,7 @@ Wait_Until_Tool_Finish
 Purchase Is Completed
     [Documentation]    Check purchase of ${item_count} is completed.
     [Arguments]    ${item_count}
-    ${rsp}=    RequestsLibrary.Get Request    session    ${carpeopleurl}    headers=${ACCEPT_XML}
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${carpeopleurl_config}    headers=${ACCEPT_XML}
     ${count}=    XML.Get Element Count    ${rsp.content}    xpath=car-person
     Should Be Equal As Numbers    ${count}    ${item_count}
 
index 7fb96081317f34c8cef2b36d22715c03602f1785..a4fd17741f0959d64a0a84e439645ad0bbac6490 100644 (file)
@@ -43,9 +43,12 @@ ${addpeoplecmd}
 ...                         python cluster_rest_script.py --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 6
 ${purchasecmd}
 ...                         python cluster_rest_script.py --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 6
-${carurl}                   /restconf/config/car:cars
-${peopleurl}                /restconf/config/people:people
-${carpeopleurl}             /restconf/config/car-people:car-people
+${carurl}                   /rests/data/car:cars
+${carurl_config}            /rests/data/car:cars?content=config
+${peopleurl}                /rests/data/people:people
+${peopleurl_config}         /rests/data/people:people?content=config
+${carpeopleurl}             /rests/data/car-people:car-people
+${carpeopleurl_config}      /rests/data/car-people:car-people?content=config
 ${CONTROLLER_LOG_LEVEL}     INFO
 ${TOOL_OPTIONS}             ${EMPTY}
 
@@ -61,7 +64,7 @@ Verify Cars
     [Documentation]    Store logs and verify result
     Stop Tool
     Store File To Workspace    cluster_rest_script.log    cluster_rest_script_add_cars.log
-    ${rsp}=    RequestsLibrary.Get Request    ${car_leader_session}    ${carurl}    headers=${ACCEPT_XML}
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${carurl_config}    headers=${ACCEPT_XML}
     ${count}=    XML.Get Element Count    ${rsp.content}    xpath=car-entry
     Should Be Equal As Numbers    ${count}    ${ITEM_COUNT}
 
@@ -74,7 +77,7 @@ Verify People
     [Documentation]    Store logs and verify result
     Stop Tool
     Store File To Workspace    cluster_rest_script.log    cluster_rest_script_add_people.log
-    ${rsp}=    RequestsLibrary.Get Request    ${car_leader_session}    ${peopleurl}    headers=${ACCEPT_XML}
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${peopleurl_config}    headers=${ACCEPT_XML}
     ${count}=    XML.Get Element Count    ${rsp.content}    xpath=person
     Should Be Equal As Numbers    ${count}    ${ITEM_COUNT}
 
@@ -92,23 +95,20 @@ Verify Purchases
 
 Delete Cars
     [Documentation]    Remove cars from the datastore
-    ${rsp}=    RequestsLibrary.Delete Request    ${car_leader_session}    ${carurl}
-    Should Be Equal As Numbers    200    ${rsp.status_code}
-    ${rsp}=    RequestsLibrary.Get Request    ${car_leader_session}    ${carurl}
+    ${rsp}=    RequestsLibrary.DELETE On Session    session    url=${carurl}    expected_status=200
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${carurl_config}    expected_status=anything
     Should Contain    ${DELETED_STATUS_CODES}    ${rsp.status_code}
 
 Delete People
     [Documentation]    Remove people from the datastore
-    ${rsp}=    RequestsLibrary.Delete Request    ${car_leader_session}    ${peopleurl}
-    Should Be Equal As Numbers    200    ${rsp.status_code}
-    ${rsp}=    RequestsLibrary.Get Request    ${car_leader_session}    ${peopleurl}
+    ${rsp}=    RequestsLibrary.DELETE On Session    session    url=${peopleurl}    expected_status=200
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${peopleurl_config}    expected_status=anything
     Should Contain    ${DELETED_STATUS_CODES}    ${rsp.status_code}
 
 Delete CarPeople
     [Documentation]    Remove car-people entries from the datastore
-    ${rsp}=    RequestsLibrary.Delete Request    ${car_leader_session}    ${carpeopleurl}
-    Should Be Equal As Numbers    200    ${rsp.status_code}
-    ${rsp}=    RequestsLibrary.Get Request    ${car_leader_session}    ${carpeopleurl}
+    ${rsp}=    RequestsLibrary.DELETE On Session    session    url=${carpeopleurl}    expected_status=200
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${carpeopleurl_config}    expected_status=anything
     Should Contain    ${DELETED_STATUS_CODES}    ${rsp.status_code}
 
 
@@ -128,6 +128,7 @@ Start Suite
     SSHLibrary.Put File    ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/scripts/cluster_rest_script.py    .
     ${stdout}    ${stderr}    ${rc}=    SSHLibrary.Execute Command    ls    return_stdout=True    return_stderr=True
     ...    return_rc=True
+    RequestsLibrary.Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}
 
 Stop Suite
     [Documentation]    Suite teardown keyword
@@ -149,7 +150,7 @@ Wait_Until_Tool_Finish
 Purchase Is Completed
     [Documentation]    Check purchase of ${item_count} is completed.
     [Arguments]    ${item_count}
-    ${rsp}=    RequestsLibrary.Get Request    ${car_leader_session}    ${carpeopleurl}    headers=${ACCEPT_XML}
+    ${rsp}=    RequestsLibrary.GET On Session    session    url=${carpeopleurl_config}    headers=${ACCEPT_XML}
     ${count}=    XML.Get Element Count    ${rsp.content}    xpath=car-person
     Should Be Equal As Numbers    ${count}    ${item_count}
 
index 7b02de6007a22f6ae893610e268051a69fbfd276..2be077c6f1cce170de5fac4df5925e4ad1068611 100644 (file)
@@ -33,7 +33,8 @@ ${ITEM_COUNT}               ${10000}
 ${THREADS}                  10
 ${ADDCMD}
 ...                         python ${TOOL_NAME} --port ${RESTCONFPORT} add-with-retries --itemtype car --itemcount ${ITEM_COUNT} --threads ${THREADS}
-${CARURL}                   /restconf/config/car:cars
+${CARURL}                   /rests/data/car:cars
+${CARURL_CONFIG}            /rests/data/car:cars?content=config
 ${SHARD_NAME}               car
 ${SHARD_TYPE}               config
 ${TEST_LOG_LEVEL}           info
@@ -86,9 +87,8 @@ Rejoin_Isolated_Member
 Delete Cars
     [Documentation]    Remove cars from the datastore
     ${session} =    Resolve_Http_Session_For_Member    member_index=${new_leader_index}
-    ${rsp} =    RequestsLibrary.Delete Request    ${session}    ${CARURL}
-    Should Be Equal As Numbers    200    ${rsp.status_code}
-    ${rsp} =    RequestsLibrary.Get Request    ${session}    ${CARURL}
+    ${rsp} =    RequestsLibrary.DELETE On Session    ${session}    url=${CARURL}    expected_status=200
+    ${rsp} =    RequestsLibrary.GET On Session    ${session}    url=${CARURL_CONFIG}    expected_status=anything
     Should Contain    ${DELETED_STATUS_CODES}    ${rsp.status_code}
 
 
@@ -113,7 +113,7 @@ Stop Suite
     Stop_Tool
     ${session} =    Resolve_Http_Session_For_Member    member_index=${new_leader_index}
     # best effort to make sure cars are deleted in case more suites will run after this and the delete test case had trouble
-    ${rsp} =    RequestsLibrary.Delete Request    ${session}    ${CARURL}
+    ${rsp} =    RequestsLibrary.DELETE On Session    ${session}    url=${CARURL}    expected_status=anything
     BuiltIn.Log    ${rsp.status_code} : ${rsp.text}
     SSHKeywords.Virtual_Env_Delete
     Store_File_To_Workspace    ${out_file}    ${out_file}
@@ -147,7 +147,7 @@ Verify_Cars_Count
 Get_Cars_Count
     [Documentation]    Count car items in config ds.
     [Arguments]    ${session}
-    ${resp} =    RequestsLibrary.Get_Request    ${session}    ${CARURL}
+    ${resp} =    RequestsLibrary.GET On Session    ${session}    url=${CARURL_CONFIG}
     ${count} =    BuiltIn.Evaluate    len(${resp.json()}[cars][car-entry])
     RETURN    ${count}
 
index 073c5916675adc98f1b600fbd784d890722565eb..8dfbfcff2bc720cebef6410d0310fc78434f6768 100644 (file)
@@ -23,12 +23,12 @@ Default Tags        critical
 
 
 *** Variables ***
-${RPC_URL}                  /restconf/operations/basic-rpc-test:basic-global
+${RPC_URL}                  /rests/operations/basic-rpc-test:basic-global
 &{EMPTY_DICT}
 ${SERVICE}                  Basic-rpc-test']
 ${TEST_LOG_LEVEL}           info
 @{TEST_LOG_COMPONENTS}      org.opendaylight.controller.remote.rpc
-${EOS_URL}                  /restconf/operational/entity-owners:entity-owners
+${EOS_URL}                  /rests/data/entity-owners:entity-owners?content=nonconfig
 ${active_nodes}             ${EMPTY}
 
 
index 96029838fb78a2ac6fabef645f2aab3bfe077cdf..42761acad6447a7dc54bc1ab2677287c3b6c9a48 100644 (file)
@@ -24,12 +24,12 @@ Default Tags        critical
 
 
 *** Variables ***
-${RPC_URL}                  /restconf/operations/basic-rpc-test:basic-global
+${RPC_URL}                  /rests/operations/basic-rpc-test:basic-global
 &{EMPTY_DICT}
 ${SERVICE}                  Basic-rpc-test']
 ${TEST_LOG_LEVEL}           info
 @{TEST_LOG_COMPONENTS}      org.opendaylight.controller.remote.rpc
-${EOS_URL}                  /restconf/operational/entity-owners:entity-owners
+${EOS_URL}                  /rests/data/entity-owners:entity-owners?content=nonconfig
 ${RPC_STATUS_ISOLATED}      501
 
 
@@ -71,8 +71,8 @@ Rpc_On_Isolated_Node
     ${session} =    Resolve_Http_Session_For_Member    member_index=${old_brt_owner}
     BuiltIn.Run_Keyword_And_Ignore_Error    Get_And_Log_EOS_Output_To_Karaf_Log    ${session}
     BuiltIn.Pass_Execution    Rpc on isolated node may work for some time(bug 8207), then will fail (bug 8214)
-    ${resp} =    RequestsLibrary.Post Request    ${session}    ${RPC_URL}    data=${EMPTY}
-    BuiltIn.Should_Be_Equal_As_Numbers    ${resp.status_code}    ${RPC_STATUS_ISOLATED}
+    ${resp} =    RequestsLibrary.POST On Session    ${session}    url=${RPC_URL}    data=${EMPTY}
+    ...    expected_status=${RPC_STATUS_ISOLATED}
 
 Rpc_On_Non_Isolated_Cluster_Nodes
     [Documentation]    Run rpc on remained cluster nodes.
index 59c0767e5ffaa467d3855a4bca7ffc2fe5ba598a..08ce9945b556d39a577faa5cc8ce195b19cec245 100644 (file)
@@ -24,12 +24,12 @@ Default Tags        critical
 
 
 *** Variables ***
-${RPC_URL}                  /restconf/operations/basic-rpc-test:basic-global
+${RPC_URL}                  /rests/operations/basic-rpc-test:basic-global
 &{EMPTY_DICT}
 ${SERVICE}                  Basic-rpc-test']
 ${TEST_LOG_LEVEL}           info
 @{TEST_LOG_COMPONENTS}      org.opendaylight.controller.remote.rpc
-${EOS_URL}                  /restconf/operational/entity-owners:entity-owners
+${EOS_URL}                  /rests/data/entity-owners:entity-owners?content=nonconfig
 
 
 *** Test Cases ***
index 6f8f9655743c82f1a76accd449de1e80d925930d..527f4c111fbf16a61125307c98072b932b484c60 100644 (file)
@@ -10,8 +10,8 @@ Suite Teardown      Delete All Sessions
 *** Test Cases ***
 Create Basic Import
     [Documentation]    schedule a basic import/restore with data containg controller mounting itself as a NETCONF
-    ...                device. The configuration is documented in
-    ...                https://docs.opendaylight.org/projects/netconf/en/latest/user-guide.html#spawning-new-netconf-connectors
+    ...    device. The configuration is documented in
+    ...    https://docs.opendaylight.org/projects/netconf/en/latest/user-guide.html#spawning-new-netconf-connectors
     [Tags]    create restore
     DaeximKeywords.Cleanup The Export Files    ${FIRST_CONTROLLER_INDEX}
     ClusterManagement.Stop_Members_From_List_Or_All
index 155e1c31cdea360b8c7c5a1789a5fe0e68adf120..b4692f5003790745a59e8406788f9d611c9cff5e 100644 (file)
@@ -11,7 +11,7 @@ Suite Teardown      Delete All Sessions
 
 
 *** Variables ***
-${REST_CONTEXT}     /restconf/operational/opendaylight-inventory:nodes
+${REST_CONTEXT}     /rests/data/opendaylight-inventory:nodes
 
 
 *** Test Cases ***
@@ -25,9 +25,11 @@ Get list of nodes
 Get nodeconnector for the root node
     [Documentation]    Get the inventory for the root node
     ${TOPO_TREE_FANOUT}    Convert To Integer    ${TOPO_TREE_FANOUT}
-    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/node/openflow:1
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${REST_CONTEXT}/node=openflow%3A1?content=nonconfig
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Wait Until Keyword Succeeds    30s    2s    Check conn loop    ${TOPO_TREE_FANOUT}    1    ${resp.content}
 
 Get nodeconnector for a node
@@ -48,8 +50,10 @@ Get Stats for a node
 *** Keywords ***
 Check Every Nodes
     [Arguments]    ${numnodes}
-    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${REST_CONTEXT}?content=nonconfig
+    ...    expected_status=200
     FOR    ${IND}    IN RANGE    1    ${numnodes+1}
         Should Contain    ${resp.content}    openflow:${IND}
     END
@@ -57,9 +61,11 @@ Check Every Nodes
 Check Every Nodes Stats
     [Arguments]    ${numnodes}
     FOR    ${IND}    IN RANGE    1    ${numnodes+1}
-        ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/node/openflow:${IND}
+        ${resp}    RequestsLibrary.GET On Session
+        ...    session
+        ...    url=${REST_CONTEXT}/node=openflow%3A${IND}?content=nonconfig
+        ...    expected_status=200
         Log    ${resp.content}
-        Should Be Equal As Strings    ${resp.status_code}    200
         Should Contain    ${resp.content}    flow-capable-node-connector-statistics
         Should Contain    ${resp.content}    flow-table-statistics
     END
@@ -67,9 +73,11 @@ Check Every Nodes Stats
 Check Every Nodes Nodeconnector
     [Arguments]    ${numnodes}
     FOR    ${IND}    IN RANGE    2    ${numnodes+1}
-        ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/node/openflow:${IND}
+        ${resp}    RequestsLibrary.GET On Session
+        ...    session
+        ...    url=${REST_CONTEXT}/node=openflow%3A${IND}?content=nonconfig
+        ...    expected_status=200
         Log    ${resp.content}
-        Should Be Equal As Strings    ${resp.status_code}    200
         Check conn loop    ${TOPO_TREE_FANOUT+1}    ${IND}    ${resp.content}
     END
 
index e4d3258c73d345989ad0e8cc418478c0170f2cf2..7381f6fe76beb2d27ddbae0e1094fc1ee834a3ee 100644 (file)
@@ -12,7 +12,7 @@ Suite Teardown      Delete All Sessions
 
 
 *** Variables ***
-${REST_CONTEXT}     /restconf/operational/network-topology:network-topology/topology/flow:1
+${REST_CONTEXT}     /rests/data/network-topology:network-topology/topology=flow%3A1?content=nonconfig
 
 
 *** Test Cases ***
@@ -35,8 +35,11 @@ Get Links Count
 *** Keywords ***
 Verify Element Count
     [Arguments]    ${URI}    ${xpath_location}    ${expected_count}
-    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}    headers=${ACCEPT_XML}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${REST_CONTEXT}
+    ...    headers=${ACCEPT_XML}
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     ${count}    Get Element Count    ${resp.content}    xpath=${xpath_location}
     Should Be Equal As Numbers    ${count}    ${expected_count}
index 1b6808b391f53fc860a71a491381bffe8196cd32..95ebdce233e9f91fec53c631c09f2d4c3271513b 100644 (file)
@@ -90,4 +90,4 @@ Add Flow
     ...    ${False}
     ...    ${True}
     Sleep    8
-    [Teardown]    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
+    [Teardown]    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.DELETE On Session    session    url=${RFC8040_NODES_API}
index 7f7d99c8eff071e497ca92105ad0a79542e80391..9cd8534587a8039fc1d09fb4e8398ef793287141 100644 (file)
@@ -50,6 +50,6 @@ Initialization Phase
 
 Final Phase
     [Documentation]    Stops mininet.
-    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
+    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.DELETE On Session    session    url=${RFC8040_NODES_API}
     MininetKeywords.Stop Mininet And Exit    ${mininet_conn_id}
     RequestsLibrary.Delete All Sessions
index caa34b28424df0b8bf60a26f38fbbdb13f8cd5f3..7642b349354197cd2f7e9d08c68a3ae302e2421d 100644 (file)
@@ -63,6 +63,6 @@ Initialization Phase
 
 Final Phase
     [Documentation]    Stops mininet.
-    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
+    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.DELETE On Session    session    url=${RFC8040_NODES_API}
     MininetKeywords.Stop Mininet And Exit    ${mininet_conn_id}
     RequestsLibrary.Delete All Sessions
index 03507c93768624f6e3299dbe468c113e074d9298..b8fae2d0d402d4cd1d497841bc528d682414b9cd 100644 (file)
@@ -66,6 +66,6 @@ Initialization Phase
 
 Final Phase
     [Documentation]    Stops mininet.
-    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
+    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.DELETE On Session    session    url=${RFC8040_NODES_API}
     MininetKeywords.Stop Mininet And Exit    ${mininet_conn_id}
     RequestsLibrary.Delete All Sessions
index 31d2a6b0bcf5e8f0c940ccee5c87e028e3df3154..f916e6f4dabf91fe63ddadf05ae6436023d64a1e 100644 (file)
@@ -58,7 +58,7 @@ Initialization Phase
 
 Final Phase
     [Documentation]    Stops mininet.
-    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
+    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.DELETE On Session    session    url=${RFC8040_NODES_API}
     MininetKeywords.Stop Mininet And Exit    ${mininet_conn_id}
     RequestsLibrary.Delete All Sessions
 
index e997c74d01af8ef9d74e09f1bd0bdae1ed7f6e20..07af6fe270ca31bb494d29f8e9b9e38a31f77e11 100644 (file)
@@ -16,16 +16,16 @@ Suite Teardown      End Suite
 
 
 *** Variables ***
-${XMLSDIR}              ${CURDIR}/../../../../csit/variables/openflowplugin
-@{FLOWFILE}             f279.xml    f280.xml    f281.xml    f282.xml    f283.xml    f284.xml    f278.xml
-@{GROUPFILE}            g279.xml    g280.xml    g281.xml
-@{GROUP_ID}             1    2    3
-${FLAG_MSG}             "bundle-based-reconciliation-enabled configuration property was changed to 'true'"
-${STATIC_FLOW}          table=91
+${XMLSDIR}                  ${CURDIR}/../../../../csit/variables/openflowplugin
+@{FLOWFILE}                 f279.xml    f280.xml    f281.xml    f282.xml    f283.xml    f284.xml    f278.xml
+@{GROUPFILE}                g279.xml    g280.xml    g281.xml
+@{GROUP_ID}                 1    2    3
+${FLAG_MSG}                 "bundle-based-reconciliation-enabled configuration property was changed to 'true'"
+${STATIC_FLOW}              table=91
 @{DATA_MODELS}
-...                     data/opendaylight-inventory:nodes?${RFC8040_CONFIG_CONTENT}
-...                     data/opendaylight-inventory:nodes?${RFC8040_OPERATIONAL_CONTENT}
-${INTEGRATION_BRIDGE}   br-int
+...                         data/opendaylight-inventory:nodes?${RFC8040_CONFIG_CONTENT}
+...                         data/opendaylight-inventory:nodes?${RFC8040_OPERATIONAL_CONTENT}
+${INTEGRATION_BRIDGE}       br-int
 
 
 *** Test Cases ***
@@ -93,7 +93,7 @@ Start Suite
 
 End Suite
     [Documentation]    Run at end of the suite
-    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
+    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.DELETE On Session    session    url=${RFC8040_NODES_API}
     KarafKeywords.Issue_Command_On_Karaf_Console
     ...    log:set INFO org.opendaylight.openflowplugin.applications.frm.impl.FlowNodeReconciliationImpl
     SSHLibrary.Close All Connections
index 3e6fc6b6c3252c4120218241a2e6cdd36181f5bf..235be68ac667bf220caa09f18230105c79da9ad5 100644 (file)
@@ -500,7 +500,7 @@ Final Phase
     [Documentation]    Delete all sessions.
     ${command}=    BuiltIn.Set Variable    sudo iptables -v -F
     BuiltIn.Run Keyword And Ignore Error    ClusterManagement.Run_Bash_Command_On_List_Or_All    ${command}
-    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
+    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.DELETE On Session    session    url=${RFC8040_NODES_API}
     RequestsLibrary.Delete All Sessions
 
 Add Groups And Flows On Member
@@ -536,15 +536,15 @@ Remove Single Group And Flow On Member
     [Arguments]    ${member_index}=1
     ${session}=    Resolve_Http_Session_For_Member    member_index=${member_index}
     FOR    ${switch}    IN RANGE    1    ${switches+1}
-        RequestsLibrary.Delete Request
+        RequestsLibrary.DELETE On Session
         ...    ${session}
-        ...    ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:table=0/flow=1
-        RequestsLibrary.Delete Request
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:table=0/flow=1
+        RequestsLibrary.DELETE On Session
         ...    ${session}
-        ...    ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1
-        RequestsLibrary.Delete Request
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1
+        RequestsLibrary.DELETE On Session
         ...    ${session}
-        ...    ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1000
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1000
     END
 
 Check Flow Stats Are Not Frozen
@@ -561,12 +561,12 @@ Extract Flow Duration
     [Documentation]    Extract duration for flow 1 in switch 1.
     [Arguments]    ${member_index}
     ${session}=    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    ${session}
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=1?content=nonconfig
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=1?content=nonconfig
     ...    headers=${headers}
     Log    ${resp.content}
-    ${json_resp}=    RequestsLibrary.To_Json    ${resp.content}
+    ${json_resp}=    Utils.Json Parse From String    ${resp.content}
     ${flow_list}=    Collections.Get_From_Dictionary    ${json_resp}    flow-node-inventory:flow
     ${flow_stats}=    Collections.Get_From_Dictionary
     ...    ${flow_list}[0]
index d95b6350f77b69c7d579ffee4fcd295b6cc89ad6..5c112e399f5b0c9d0c421437fbc3b6bc79b030c1 100644 (file)
@@ -20,23 +20,23 @@ ${send_echo_url}        /rests/operations/sal-echo:send-echo
 *** Test Cases ***
 Sending Barrier
     [Documentation]    Test to send barrier
-    ${resp}=    RequestsLibrary.Post Request
+    ${resp}=    RequestsLibrary.POST On Session
     ...    session
-    ...    ${send_barrier_url}
+    ...    url=${send_barrier_url}
     ...    data=${RPC_SEND_BARRIER_DATA}
     ...    headers=${HEADERS_XML}
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
 
 Sending Echo
     [Documentation]    Test to send echo
-    ${resp}=    RequestsLibrary.Post Request
+    ${resp}=    RequestsLibrary.POST On Session
     ...    session
-    ...    ${send_echo_url}
+    ...    url=${send_echo_url}
     ...    data=${RPC_SEND_ECHO_DATA}
     ...    headers=${HEADERS_XML}
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
 
 
 *** Keywords ***
index 11ae3dd927f31d4bab2ec1d35720249d8f7c26de..a22d47a2cd26a2450e187813dabf8d0ae2610c0f 100644 (file)
@@ -20,13 +20,13 @@ ${start}                    sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --to
 *** Test Cases ***
 Sending Update Table
     [Documentation]    Test to send table update request
-    ${resp}=    RequestsLibrary.Post Request
+    ${resp}=    RequestsLibrary.POST On Session
     ...    session
-    ...    ${send_update_table_url}
+    ...    url=${send_update_table_url}
     ...    data=${RPC_SEND_UPDATE_TABLE_DATA}
     ...    headers=${HEADERS_XML}
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
 
 
 *** Keywords ***
index ae400fa848e8d94c2fb3e260a21d70c0323bb6ae..6342eb8e40d41086999ad8295b9443f9d6343fd1 100644 (file)
@@ -59,10 +59,8 @@ Final Phase
 
 Delete Flow
     [Documentation]    Removes used flow
-    ${resp}=    RequestsLibrary.Delete Request
+    ${resp}=    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    expected_status=200
     Log    ${resp.content}
-    ${msg}=    Set Variable
-    ...    Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory: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 e7f3bcc9f1fff22e5a1a4c567ca3dbfd2c3862b1..4430b615eb5a761e58aa1ba1ba3732be2ce1824c 100644 (file)
@@ -222,10 +222,11 @@ Check Config Flow Presence
 
 Flow Presence Config Flow
     ${headers}=    Create Dictionary    Accept=application/xml
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}
     ...    headers=${headers}
+    ...    expected_status=anything
     Log    ${resp}
     Log    ${resp.content}
     IF    ${resp.status_code}!=200    RETURN    ${False}    ${EMPTY}
@@ -245,10 +246,11 @@ Check Operational Table Presence
 
 Flow Presence Operational Table
     ${headers}=    Create Dictionary    Accept=application/xml
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}?${RFC8040_OPERATIONAL_CONTENT}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}?${RFC8040_OPERATIONAL_CONTENT}
     ...    headers=${headers}
+    ...    expected_status=anything
     Log    ${resp}
     Log    ${resp.content}
     IF    ${resp.status_code}!=200    RETURN    ${False}    ${EMPTY}
@@ -258,22 +260,18 @@ Flow Presence Operational Table
 
 Add Flow
     Log    ${data}
-    ${resp}=    RequestsLibrary.Put Request
+    ${resp}=    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}
     ...    headers=${HEADERS_XML}
     ...    data=${data}
-    ${msg}=    Set Variable
-    ...    Adding flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received.
-    Should Be Equal As Strings    ${resp.status_code}    200    msg=${msg}
+    ...    expected_status=200
 
 Delete Flow
-    ${resp}=    RequestsLibrary.Delete Request
+    ${resp}=    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}
-    ${msg}=    Set Variable
-    ...    Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received.
-    Should Be Equal As Strings    ${resp.status_code}    200    msg=${msg}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}
+    ...    expected_status=200
 
 Delete All Flows
     [Documentation]    Deletes all flows
index 7a9e154de9334ecaf049e1f2d6cd0b6c1eb0a243..e225af368351b19f6c6ebaa3972f7810cc868829 100644 (file)
@@ -38,21 +38,20 @@ Add a group
     [Tags]    push
     ${body}    OperatingSystem.Get File    ${GROUP}
     Set Suite Variable    ${body}
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:group=1
+    ...    url=${REST_CONTEXT}/flow-node-inventory:group=1
     ...    headers=${HEADERS_XML}
     ...    data=${body}
     Log    ${resp.content}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
 
 Verify after adding group config
     [Documentation]    Get the group stat in config
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
     ...    ${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_CONFIG_CONTENT}
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    ${GROUP_NAME}
 
 Verify after adding group operational
@@ -71,22 +70,21 @@ Add a flow that includes a group
     [Tags]    push
     ${body}    OperatingSystem.Get File    ${FLOW}
     Set Suite Variable    ${body}
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=1
     ...    headers=${HEADERS_XML}
     ...    data=${body}
     Log    ${resp.content}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
 
 Verify after adding flow config
     [Documentation]    Verify the flow
     [Tags]    get
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT}
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT}
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    ${FLOW_NAME}
 
 Verify after adding flow operational
@@ -101,28 +99,32 @@ Verify after adding flow operational
 
 Remove the flow
     [Documentation]    Remove the flow
-    ${resp}    RequestsLibrary.Delete Request    session    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=1
+    ...    expected_status=200
 
 Verify after deleting flow
     [Documentation]    Verify the flow removal
     [Tags]    get
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT}
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT}
     Should Not Contain    ${resp.content}    ${FLOW_NAME}
 
 Delete the group
     [Documentation]    Remove the group
     [Tags]    delete
-    ${resp}    RequestsLibrary.Delete Request    session    ${REST_CONTEXT}/flow-node-inventory:group=1
+    ${resp}    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${REST_CONTEXT}/flow-node-inventory:group=1
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
 
 Verify after deleting group
     [Documentation]    Verify the flow removal
     [Tags]    get
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_CONFIG_CONTENT}
+    ...    url=${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_CONFIG_CONTENT}
     Should Not Contain    ${resp.content}    ${GROUP_NAME}
index d56e32e4848eec67e8f71868802462c9edc0666b..9b21516ffd0e4992adcec529306a687ae626ff47 100644 (file)
@@ -38,19 +38,20 @@ Add a meter
     [Tags]    push
     ${body}    OperatingSystem.Get File    ${METER}
     Set Suite Variable    ${body}
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${REST_CONTEXT}/meter=1
+    ...    url=${REST_CONTEXT}/meter=1
     ...    headers=${HEADERS_XML}
     ...    data=${body}
     Log    ${resp.content}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
 
 Verify after adding meter config
     [Documentation]    Get the meter stat in config
-    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/meter=1?${RFC8040_CONFIG_CONTENT}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${REST_CONTEXT}/meter=1?${RFC8040_CONFIG_CONTENT}
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    ${METER_NAME}
 
 Verify after adding meter operational
@@ -69,22 +70,21 @@ Add a flow that includes a meter
     [Tags]    push
     ${body}    OperatingSystem.Get File    ${FLOW}
     Set Suite Variable    ${body}
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=2
     ...    headers=${HEADERS_XML}
     ...    data=${body}
     Log    ${resp.content}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
 
 Verify after adding flow config
     [Documentation]    Verify the flow
     [Tags]    get
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2?${RFC8040_CONFIG_CONTENT}
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=2?${RFC8040_CONFIG_CONTENT}
+    ...    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    ${FLOW_NAME}
 
 Verify after adding flow operational
@@ -99,26 +99,27 @@ Verify after adding flow operational
 
 Remove the flow
     [Documentation]    Remove the flow
-    ${resp}    RequestsLibrary.Delete Request    session    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=2
+    ...    expected_status=200
 
 Verify after deleting flow
     [Documentation]    Verify the flow removal
     [Tags]    get
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2?${RFC8040_CONFIG_CONTENT}
+    ...    url=${REST_CONTEXT}/flow-node-inventory:table=0/flow=2?${RFC8040_CONFIG_CONTENT}
     Should Not Contain    ${resp.content}    ${FLOW_NAME}
 
 Delete the meter
     [Documentation]    Remove the meter
     [Tags]    delete
-    ${resp}    RequestsLibrary.Delete Request    session    ${REST_CONTEXT}/meter=1
+    ${resp}    RequestsLibrary.DELETE On Session    session    url=${REST_CONTEXT}/meter=1    expected_status=200
     Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
 
 Verify after deleting meter
     [Documentation]    Verify the flow removal
     [Tags]    get
-    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/meter=1?${RFC8040_CONFIG_CONTENT}
+    ${resp}    RequestsLibrary.GET On Session    session    url=${REST_CONTEXT}/meter=1?${RFC8040_CONFIG_CONTENT}
     Should Not Contain    ${resp.content}    ${METER_NAME}
index 6956e6ce472761bea7cc4f148fb4b89aacf5d799..d0146177f6517708e9f580e5019c7926dadbb7f5 100644 (file)
@@ -22,11 +22,11 @@ Get list of nodes
 Get nodeconnector for the root node
     [Documentation]    Get the inventory for the root node
     ${TOPO_TREE_FANOUT}    Convert To Integer    ${TOPO_TREE_FANOUT}
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Wait Until Keyword Succeeds    30s    2s    Check conn loop    ${TOPO_TREE_FANOUT}    1    ${resp.text}
 
 Get nodeconnector for a node
@@ -47,8 +47,7 @@ Get Stats for a node
 *** Keywords ***
 Check Every Nodes
     [Arguments]    ${numnodes}
-    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_NODES_API}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_NODES_API}    expected_status=200
     FOR    ${IND}    IN RANGE    1    ${numnodes+1}
         Should Contain    ${resp.text}    openflow:${IND}
     END
@@ -56,11 +55,11 @@ Check Every Nodes
 Check Every Nodes Stats
     [Arguments]    ${numnodes}
     FOR    ${IND}    IN RANGE    1    ${numnodes+1}
-        ${resp}    RequestsLibrary.Get Request
+        ${resp}    RequestsLibrary.GET On Session
         ...    session
-        ...    ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT}
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT}
+        ...    expected_status=200
         Log    ${resp.text}
-        Should Be Equal As Strings    ${resp.status_code}    200
         Should Contain    ${resp.text}    flow-capable-node-connector-statistics
         Should Contain    ${resp.text}    flow-table-statistics
     END
@@ -68,11 +67,11 @@ Check Every Nodes Stats
 Check Every Nodes Nodeconnector
     [Arguments]    ${numnodes}
     FOR    ${IND}    IN RANGE    2    ${numnodes+1}
-        ${resp}    RequestsLibrary.Get Request
+        ${resp}    RequestsLibrary.GET On Session
         ...    session
-        ...    ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT}
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT}
+        ...    expected_status=200
         Log    ${resp.text}
-        Should Be Equal As Strings    ${resp.status_code}    200
         Check conn loop    ${TOPO_TREE_FANOUT+1}    ${IND}    ${resp.text}
     END
 
index 157e736e9e6c3e0b0d827a0f8de23798d5277e9d..90ced470cce727d372ae76773d3e238ef8604bb8 100644 (file)
@@ -44,8 +44,11 @@ Get Links Count
 *** Keywords ***
 Verify Element Count
     [Arguments]    ${URI}    ${xpath_location}    ${expected_count}
-    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
+    ...    headers=${ACCEPT_XML}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     ${count}    Get Element Count    ${resp.text}    xpath=${xpath_location}
     Should Be Equal As Numbers    ${count}    ${expected_count}
index 6956e6ce472761bea7cc4f148fb4b89aacf5d799..116720e8c96768c5d3f2efc8b7925f3dad6ef6ac 100644 (file)
@@ -22,11 +22,11 @@ Get list of nodes
 Get nodeconnector for the root node
     [Documentation]    Get the inventory for the root node
     ${TOPO_TREE_FANOUT}    Convert To Integer    ${TOPO_TREE_FANOUT}
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT}
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     Wait Until Keyword Succeeds    30s    2s    Check conn loop    ${TOPO_TREE_FANOUT}    1    ${resp.text}
 
 Get nodeconnector for a node
@@ -47,8 +47,7 @@ Get Stats for a node
 *** Keywords ***
 Check Every Nodes
     [Arguments]    ${numnodes}
-    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_NODES_API}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_NODES_API}    expected_status=200
     FOR    ${IND}    IN RANGE    1    ${numnodes+1}
         Should Contain    ${resp.text}    openflow:${IND}
     END
@@ -56,11 +55,11 @@ Check Every Nodes
 Check Every Nodes Stats
     [Arguments]    ${numnodes}
     FOR    ${IND}    IN RANGE    1    ${numnodes+1}
-        ${resp}    RequestsLibrary.Get Request
+        ${resp}    RequestsLibrary.GET On Session
         ...    session
-        ...    ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT}
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT}
+        ...    expected_status=200
         Log    ${resp.text}
-        Should Be Equal As Strings    ${resp.status_code}    200
         Should Contain    ${resp.text}    flow-capable-node-connector-statistics
         Should Contain    ${resp.text}    flow-table-statistics
     END
@@ -68,11 +67,10 @@ Check Every Nodes Stats
 Check Every Nodes Nodeconnector
     [Arguments]    ${numnodes}
     FOR    ${IND}    IN RANGE    2    ${numnodes+1}
-        ${resp}    RequestsLibrary.Get Request
+        ${resp}    RequestsLibrary.GET On Session
         ...    session
-        ...    ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT}
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT}    expected_status=200
         Log    ${resp.text}
-        Should Be Equal As Strings    ${resp.status_code}    200
         Check conn loop    ${TOPO_TREE_FANOUT+1}    ${IND}    ${resp.text}
     END
 
index 157e736e9e6c3e0b0d827a0f8de23798d5277e9d..90ced470cce727d372ae76773d3e238ef8604bb8 100644 (file)
@@ -44,8 +44,11 @@ Get Links Count
 *** Keywords ***
 Verify Element Count
     [Arguments]    ${URI}    ${xpath_location}    ${expected_count}
-    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
+    ...    headers=${ACCEPT_XML}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
     ${count}    Get Element Count    ${resp.text}    xpath=${xpath_location}
     Should Be Equal As Numbers    ${count}    ${expected_count}
index 143b7c9ccb02b30989d06c1e71e6e08f787890fb..4a47359ae5a6ff2a6beb8624f6db37d78dd37de5 100644 (file)
@@ -25,7 +25,7 @@ Get RESTCONF Topology
     ...    Check For Elements At URI
     ...    ${RFC8040_OPERATIONAL_TOPO_API}
     ...    ${node_list}
-    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_API}
+    ${resp}    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_API}
     Log    ${resp.text}
 
 List all the links
@@ -98,10 +98,12 @@ Add Port
 *** Keywords ***
 Verify Links
     [Arguments]    ${expected_links}
-    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    ${result}    To JSON    ${resp.text}
+    ${result}    Utils.Json Parse From String    ${resp.text}
     Log    ${result}
     ${content}    Get From Dictionary    ${result}    network-topology:topology
     ${topology}    Get From List    ${content}    0
index 9e735dde9fc50512d8f91544c739e1cafe7aaf6f..dfbab85e3c582908a6b48c3e6fc45ac90a7d9294 100644 (file)
@@ -20,19 +20,18 @@ ${BODY2}
 *** Test Cases ***
 Add a flow - Output to physical port#
     [Documentation]    Push a flow through REST-API
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152
     ...    headers=${HEADERS_XML}
     ...    data=${BODY2}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
 
 Verify after adding flow config - Output to physical port#
     [Documentation]    Verify the flow
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=config
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=config
+    ...    expected_status=200
     Should Contain    ${resp.text}    152
 
 Verify after adding flow operational - Output to physical port#
@@ -47,17 +46,17 @@ Verify after adding flow operational - Output to physical port#
 
 Remove a flow - Output to physical port#
     [Documentation]    Remove a flow
-    ${resp}    RequestsLibrary.Delete Request
+    ${resp}    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152
-    Should Be Equal As Strings    ${resp.status_code}    204
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152
+    ...    expected_status=204
 
 Verify after deleting flow config - Output to physical port#
     [Documentation]    Verify the flow
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=config
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=config
+    ...    expected_status=200
     Should Not Contain    ${resp.text}    152
     #    Standing bug #368 - This has been fixed
 
index 129e642990016a3967de839970c5de652c473add..b6334ed9b29c8edb5caa067927927d0cf07914cf 100644 (file)
@@ -25,7 +25,7 @@ Get RESTCONF Topology
     ...    Check For Elements At URI
     ...    ${RFC8040_OPERATIONAL_TOPO_API}
     ...    ${node_list}
-    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_API}
+    ${resp}    RequestsLibrary.GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_API}
     Log    ${resp.text}
 
 List all the links
@@ -98,10 +98,12 @@ Add Port
 *** Keywords ***
 Verify Links
     [Arguments]    ${expected_links}
-    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
+    ${resp}    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
+    ...    expected_status=200
     Log    ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    ${result}    To JSON    ${resp.text}
+    ${result}    Utils.Json Parse From String    ${resp.text}
     Log    ${result}
     ${content}    Get From Dictionary    ${result}    network-topology:topology
     ${topology}    Get From List    ${content}    0
index 1080e741e1e324fcd46e16c418a4633fd83d251f..f33538f448ea0f2c08796ecd7b9b838345997b71 100644 (file)
@@ -22,19 +22,18 @@ ${BODY2}
 *** Test Cases ***
 Add a flow - Sending IPv4 Dest Address and Eth type
     [Documentation]    Push a flow through REST-API
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
     ...    headers=${HEADERS_XML}
     ...    data=${BODY1}
-    BuiltIn.Should_Match    "${resp.status_code}"    "20?"
 
 Verify after adding flow config - Sending IPv4 Dest Address and Eth type
     [Documentation]    Verify the flow
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
+    ...    expected_status=200
     Should Contain    ${resp.text}    139
 
 Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
@@ -49,19 +48,19 @@ Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
 
 Modify a flow - Output to physical port#
     [Documentation]    Push a flow through REST-API
-    ${resp}    RequestsLibrary.Put Request
+    ${resp}    RequestsLibrary.PUT On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
     ...    headers=${HEADERS_XML}
     ...    data=${BODY2}
-    Should Be Equal As Strings    ${resp.status_code}    204
+    ...    expected_status=204
 
 Verify after modifying flow config - Output to physical port#
     [Documentation]    Verify the flow
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
+    ...    expected_status=200
     Should Contain    ${resp.text}    10.0.20.1
 
 Verify after modifying flow operational - Output to physical port#
@@ -76,17 +75,17 @@ Verify after modifying flow operational - Output to physical port#
 
 Remove a flow - Output to physical port#
     [Documentation]    Remove a flow
-    ${resp}    RequestsLibrary.Delete Request
+    ${resp}    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
-    Should Be Equal As Strings    ${resp.status_code}    204
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139
+    ...    expected_status=204
 
 Verify after deleting flow config - Output to physical port#
     [Documentation]    Verify the flow
-    ${resp}    RequestsLibrary.Get Request
+    ${resp}    RequestsLibrary.GET On Session
     ...    session
-    ...    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ...    url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config
+    ...    expected_status=200
     Should Not Contain    ${resp.text}    139
 
 Verify after deleting flow operational - Output to physical port#
index bd5032e2a3beef8c71f619a6506cd6c3adc7da53..d095b03110d9b31bb8163ec786dcf323b30c65f2 100644 (file)
@@ -56,9 +56,9 @@ Start Http Session
 Are Switches Connected
     [Documentation]    Checks Topology Contains a fix number ${switches} of switces.
     [Arguments]    ${switches}
-    ${resp}=    RequestsLibrary.Get Request
+    ${resp}=    RequestsLibrary.GET On Session
     ...    tcsession
-    ...    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
+    ...    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
     ...    headers=${ACCEPT_XML}
     Log    ${resp.content}
     ${count}=    XML.Get Element Count    ${resp.content}    xpath=node
index 9a289883586682e8a6f210c1e4694129ebebf6fa..ac447ccfe231115c8ce21d6815489ce4cb6aba07 100644 (file)
@@ -71,7 +71,7 @@ Stop Switches
 
 Are Switches Connected Topo
     [Documentation]    Checks wheather switches are connected to controller
-    ${resp}=    Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
+    ${resp}=    GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
     Log    ${resp.content}
     ${count}=    Get Element Count    ${resp.content}    xpath=node
     Should Be Equal As Numbers    ${count}    ${swnr}
index ab77cd39152fa2060c309116904ffeeb2f84c7f1..b8947ed0805799abf49d1bf34db2d137a9d2e885 100644 (file)
@@ -71,7 +71,7 @@ Stop Switches
 
 Are Switches Connected Topo
     [Documentation]    Checks wheather switches are connected to controller
-    ${resp}=    Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
+    ${resp}=    GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
     Log    ${resp.content}
     ${count}=    Get Element Count    ${resp.content}    xpath=node
     Should Be Equal As Numbers    ${count}    ${swnr}
index 86961c60a4ad349cbe4c65d502b4d88efe6fd0ae..03b57c6279bc017f1ec65a39fa12e78d78b0e0c4 100644 (file)
@@ -71,7 +71,7 @@ Stop Switches
 
 Are Switches Connected Topo
     [Documentation]    Checks wheather switches are connected to controller
-    ${resp}=    Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
+    ${resp}=    GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
     Log    ${resp.content}
     ${count}=    Get Element Count    ${resp.content}    xpath=node
     Should Be Equal As Numbers    ${count}    ${swnr}
index 862b8e1ecf5e151ebb4d368208a643a8c2817f64..c7445d35f55a3542ca191a5009bb802b57e40ccd 100644 (file)
@@ -71,7 +71,7 @@ Stop Switches
 
 Are Switches Connected Topo
     [Documentation]    Checks wheather switches are connected to controller
-    ${resp}=    Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
+    ${resp}=    GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
     Log    ${resp.content}
     ${count}=    Get Element Count    ${resp.content}    xpath=node
     Should Be Equal As Numbers    ${count}    ${swnr}
index e8567aae71024c897c0e5205820886313abde1ed..3bd4e15766d7f4a3ac9fd022a98fe75bfb51fe9e 100644 (file)
@@ -122,7 +122,7 @@ Delete Http Session
 
 Are Switches Connected Topo
     [Documentation]    Checks wheather switches are connected to controller
-    ${resp}=    Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
+    ${resp}=    GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
     Log    ${resp.content}
     ${count}=    Get Element Count    ${resp.content}    xpath=node
     Should Be Equal As Numbers    ${count}    ${swnr}
@@ -133,6 +133,6 @@ Check Flows Inventory
     Should Be True    ${res}
 
 Check No Switches Inventory
-    ${resp}=    Get Request    session    ${RFC8040_OPERATIONAL_NODES_API}
+    ${resp}=    GET On Session    session    ${RFC8040_OPERATIONAL_NODES_API}
     Log    ${resp.content}
     Should Be Equal As Strings    '${resp.content}'    '{"nodes":{}}'
index bcfd60119d9f95090898c22ed8c82833e9c02e1e..8a6335f4c0cdf4ef6c934c6eeb033cfeade7e5c7 100644 (file)
@@ -92,8 +92,7 @@ Check Flows Are Operational Again
 
 Deconfigure Flows
     [Documentation]    Flows deconfiguration
-    ${resp}=    Delete Request    session    ${RFC8040_NODES_API}
-    Should Be Equal As Numbers    ${resp.status_code}    204
+    ${resp}=    DELETE On Session    session    url=${RFC8040_NODES_API}    expected_status=204
 
 Check No Flows In Operational Last
     [Documentation]    Operational datastore to be without any flows
@@ -146,7 +145,7 @@ Delete Http Session And Store Plot Data
 
 Are Switches Connected Topo
     [Documentation]    Checks wheather switches are connected to controller
-    ${resp}=    Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
+    ${resp}=    GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
     Log    ${resp.content}
     ${count}=    Get Element Count    ${resp.content}    xpath=node
     Should Be Equal As Numbers    ${count}    ${swnr}
index c980e41a9cbc975c8f4e5f1bde0bc44763cb6483..97a9163e1d2be35173dcf980a670c2ccb7f5e898 100644 (file)
@@ -118,7 +118,7 @@ Delete Http Session And Store Plot Data
 
 Are Switches Connected Topo
     [Documentation]    Checks wheather switches are connected to controller
-    ${resp}=    Get Request    session    ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
+    ${resp}=    GET On Session    session    url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}    headers=${ACCEPT_XML}
     Log    ${resp.content}
     ${count}=    Get Element Count    ${resp.content}    xpath=node
     Should Be Equal As Numbers    ${count}    ${swnr}
index 69eaa53a594c76ddc997e0d68110d260253487e2..9cc2df1b8825bd1cc3bb3740b76c2b66368b372f 100644 (file)
@@ -117,7 +117,7 @@ Delete Http Session And Store Plot Data
 
 Are Switches Connected Topo
     [Documentation]    Checks wheather switches are connected to controller
-    ${resp}=    Get Request    session    ${OPERATIONAL_TOPO_API}/topology/flow:1    headers=${ACCEPT_XML}
+    ${resp}=    GET On Session    session    url=${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}
index 3329a39e4b5e5e8afa08618940ad3f32af597090..8b019d6db45085ae4c438a557d09e88795b62455 100644 (file)
@@ -93,15 +93,15 @@ Check Linear Topology After Mininet Reconnects
 Remove Flows And Groups After Mininet Reconnects
     [Documentation]    Remove some groups and flows while network is down.
     FOR    ${switch}    IN RANGE    1    ${switches+1}
-        RequestsLibrary.Delete Request
+        RequestsLibrary.DELETE On Session
         ...    session
-        ...    ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:table=0/flow=1
-        RequestsLibrary.Delete Request
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:table=0/flow=1
+        RequestsLibrary.DELETE On Session
         ...    session
-        ...    ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1
-        RequestsLibrary.Delete Request
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1
+        RequestsLibrary.DELETE On Session
         ...    session
-        ...    ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1000
+        ...    url=${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1000
     END
 
 Check Flows In Operational DS After Mininet Reconnects
@@ -176,7 +176,7 @@ Final Phase
     [Documentation]    Delete all sessions.
     ${command}    BuiltIn.Set Variable    sudo iptables -v -F
     Utils.Run Command On Controller    cmd=${command}
-    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
+    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.DELETE On Session    session    url=${RFC8040_NODES_API}
     RequestsLibrary.Delete All Sessions
 
 Disconnect Controller Mininet
index 4067abaa91e2d44a5c56e9b95c39c63cf3ce2193..1f3be3d216499f4d7772e71a4935f7751f2cae43 100644 (file)
@@ -54,9 +54,8 @@ Create a Bridge
 
 Get Config Topology with Bridge
     [Documentation]    This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp} =    RequestsLibrary.GET On Session    session    url=${RFC8040_CONFIG_TOPO_API}    expected_status=200
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${resp.text}    ${BRIDGE}
 
 Get Operational Topology with Bridge
@@ -87,10 +86,10 @@ Get Operational Topology with Port
 
 Delete the Port
     [Documentation]    This request will delete the port node from the bridge node and data store.
-    ${resp} =    RequestsLibrary.Delete Request
+    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}/termination-point=${PORT}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
+    ...    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}/termination-point=${PORT}
+    ...    expected_status=204
 
 Get Operational Topology after Deletion of Port
     [Documentation]    This request will fetch the operational topology after the Port is deleted
@@ -105,8 +104,10 @@ Get Operational Topology after Deletion of Port
 
 Delete the Bridge
     [Documentation]    This request will delete the bridge node from the config data store.
-    ${resp} =    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
+    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}
+    ...    expected_status=204
 
 Get Operational Topology after Deletion of Bridge
     [Documentation]    This request will fetch the operational topology after the Bridge is deleted
@@ -121,9 +122,8 @@ Get Operational Topology after Deletion of Bridge
 
 Verify Config Still Has OVS Info
     [Documentation]    This will fetch the configuration topology from configuration data store to verify the node is still in the data store
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp} =    RequestsLibrary.GET On Session    session    url=${RFC8040_CONFIG_TOPO_API}    expected_status=200
+    Utils.Log Content    ${resp.text}
     BuiltIn.Wait Until Keyword Succeeds
     ...    8s
     ...    2s
@@ -134,8 +134,7 @@ Verify Config Still Has OVS Info
 
 Delete the OVSDB Node
     [Documentation]    This request will delete the OVSDB node
-    ${resp} =    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
+    RequestsLibrary.DELETE On Session    session    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}    expected_status=204
 
 Get Operational Topology to make sure the connection has been deleted
     [Documentation]    This request will fetch the operational topology from the connected OVSDB nodes
@@ -175,9 +174,8 @@ Get Operational Topology After Node Reconnect
 
 Get Config Topology After Reconnect
     [Documentation]    This will fetch the configuration topology from configuration data store after reconnect
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp} =    RequestsLibrary.GET On Session    session    url=${RFC8040_CONFIG_TOPO_API}    expected_status=200
+    Utils.Log Content    ${resp.text}
     BuiltIn.Wait Until Keyword Succeeds
     ...    8s
     ...    2s
@@ -208,8 +206,11 @@ Update QOS with a Linked queue entry to a OVSDB Node
 
 Get QOS Config Topology with port
     [Documentation]    This will fetch the configuration topology from configuration data store to verify the QOS is added to the data store
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_CONFIG_TOPO_API}
+    ...    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     BuiltIn.Should Contain    ${resp.text}    ${QOS}
 
@@ -226,8 +227,11 @@ Get QOS Operational Topology with port
 
 Get Queue Config Topology with port
     [Documentation]    This request will fetch the configuration topology from configuration data store to verify the Queue is added to the data store
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_CONFIG_TOPO_API}
+    ...    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     BuiltIn.Should Contain    ${resp.text}    ${QUEUE}
 
@@ -244,34 +248,43 @@ Get Queue Operational Topology with port
 
 Delete a Queue entry from a Qos entry
     [Documentation]    This request will Delete a Queue entry from a Qos entry
-    ${resp} =    RequestsLibrary.Delete Request
+    ${resp} =    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:qos-entries=${QOS}/queue-list=0
+    ...    url=${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:qos-entries=${QOS}/queue-list=0
+    ...    expected_status=anything
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Delete a QoS entry from a node
     [Documentation]    This request will Delete a QoS entry from a node.
-    ${resp} =    RequestsLibrary.Delete Request
+    ${resp} =    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:qos-entries=${QOS}
+    ...    url=${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:qos-entries=${QOS}
+    ...    expected_status=anything
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Delete a Queue entry from an ovsdb node
     [Documentation]    This request will Delete a Queue entry from an ovsdb node
-    ${resp} =    RequestsLibrary.Delete Request
+    ${resp} =    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:queues=${QUEUE}
+    ...    url=${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:queues=${QUEUE}
+    ...    expected_status=anything
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Delete the OVSDB Node HOST1
     [Documentation]    This request will delete the OVSDB node
-    ${resp} =    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}
+    ${resp} =    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_HOST1_API}
+    ...    expected_status=anything
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Get Config Topology to verify that deleted configurations are cleaned from config datastore
     [Documentation]    This request will fetch the configuration topology from configuration data store to verify OVSDB NODE is deleted frrom the configuration data store
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
+    ${resp} =    RequestsLibrary.GET On Session
+    ...    session
+    ...    url=${RFC8040_CONFIG_TOPO_API}
+    ...    expected_status=anything
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     BuiltIn.Should Not Contain    ${resp.text}    ovsdb:HOST1
 
index 04de1db840bc36e032044e7673e5d40a8c16be2c..dd737adae142636ca0319b36b08b719493ac2ed8 100644 (file)
@@ -61,9 +61,8 @@ Get Operational Topology to verify the bridge has been added
 
 Get Config Topology to verify the manually added bridge is not added to the config datastore
     [Documentation]    This request will fetch the configuration topology from configuration data store
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp} =    RequestsLibrary.GET On Session    session    url=${RFC8040_CONFIG_TOPO_API}    expected_status=200
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Not Contain    ${resp.text}    ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_NODE_PORT}/bridge/${BRIDGE1}
 
 Create a Bridge through controller
@@ -83,9 +82,8 @@ Get Operational Topology to verify the bridge has been added through rest call
 
 Get Config Topology to verify the entry added to the config datastore
     [Documentation]    This request will fetch the configuration topology from configuration data store
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp} =    RequestsLibrary.GET On Session    session    url=${RFC8040_CONFIG_TOPO_API}    expected_status=200
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${resp.text}    ovsdb://uuid/${OVSDB_UUID}/bridge/${BRIDGE2}
 
 Create bridge of already added bridge
@@ -94,9 +92,8 @@ Create bridge of already added bridge
 
 Get Config Topology to verify the entry of existing bridge added to the config datastore
     [Documentation]    This request will fetch the configuration topology from configuration data store
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp} =    RequestsLibrary.GET On Session    session    url=${RFC8040_CONFIG_TOPO_API}    expected_status=200
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${resp.text}    ovsdb://uuid/${OVSDB_UUID}/bridge/${BRIDGE1}
 
 Delete bridge manually
@@ -115,17 +112,16 @@ Get Operational Topology to verify the bridge has been deleted manually
 
 Config Topology Still Contains Bridge
     [Documentation]    This request will fetch the configuration topology from configuration data store
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp} =    RequestsLibrary.GET On Session    session    url=${RFC8040_CONFIG_TOPO_API}    expected_status=200
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${resp.text}    ovsdb://uuid/${OVSDB_UUID}/bridge/${BRIDGE2}
 
 Delete the Bridge through rest call
     [Documentation]    This request will delete the bridge node from the config data store.
-    ${resp} =    RequestsLibrary.Delete Request
+    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}%2Fbridge%2F${BRIDGE2}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
+    ...    url=${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}%2Fbridge%2F${BRIDGE2}
+    ...    expected_status=204
 
 Get Operational Topology after Deletion of Bridge
     [Documentation]    This request will fetch the operational topology after the Bridge is deleted
index ea60bd2b44f63d22520cbbd3a79a8c7b63f0885e..36f889ad334b16dcc8d9e2fc01d2161c15e9dd1c 100644 (file)
@@ -125,10 +125,10 @@ Get Operational Topology with Port
 
 Delete the Port1
     [Documentation]    This request will delete the port node from the bridge node and data store.
-    ${resp} =    RequestsLibrary.Delete Request
+    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}/termination-point=${PORT1}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
+    ...    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}/termination-point=${PORT1}
+    ...    expected_status=204
 
 Get Operational Topology after deletion of Port1
     [Documentation]    This request will fetch the operational topology after the Port is added to the bridge
@@ -143,10 +143,10 @@ Get Operational Topology after deletion of Port1
 
 Delete the Port2
     [Documentation]    This request will delete the port node from the bridge node and data store.
-    ${resp} =    RequestsLibrary.Delete Request
+    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}/termination-point=${PORT2}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
+    ...    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}/termination-point=${PORT2}
+    ...    expected_status=204
 
 Get Operational Topology after Deletion of Port2
     [Documentation]    This request will fetch the operational topology after the Port is deleted
@@ -161,8 +161,10 @@ Get Operational Topology after Deletion of Port2
 
 Delete the Bridge
     [Documentation]    This request will delete the bridge node from the config data store.
-    ${resp} =    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
+    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}
+    ...    expected_status=204
 
 Get Operational Topology after Deletion of Bridge
     [Documentation]    This request will fetch the operational topology after the Bridge is deleted
@@ -177,8 +179,10 @@ Get Operational Topology after Deletion of Bridge
 
 Delete the OVSDB Node
     [Documentation]    This request will delete the OVSDB node
-    ${resp} =    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
+    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}
+    ...    expected_status=204
 
 Get Operational Topology after Deletion of OVSDB Node
     [Documentation]    This request will fetch the operational topology after the OVSDB node is deleted
index cb085c2568592b2500496d0cab0afd11e689f2fc..3941296db5c6f2a3781424333a405856b3b4aeae 100644 (file)
@@ -169,6 +169,5 @@ Suite Teardown
     [Documentation]    Cleans up test environment, close existing sessions.
     OVSDB.Clean OVSDB Test Environment    ${TOOLS_SYSTEM_IP}
     OVSDB.Clean OVSDB Test Environment    ${TOOLS_SYSTEM_2_IP}
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
     OVSDB.Log Config And Operational Topology
     RequestsLibrary.Delete All Sessions
index f7e5d0768139983377ea974f7fe3e118770ca6a0..7b9fe519b0e7e1b322c62f1894a8223baf8ae732 100644 (file)
@@ -66,7 +66,7 @@ Bug 7414 Same Endpoint Name
     ...    ${TOOLS_SYSTEM_2_IP}
     ...    ${TOOLS_SYSTEM_IP}
     [Teardown]    BuiltIn.Run Keywords    Test Teardown
-    ...    AND    RequestsLibrary.Delete Request    session    ${RFC8040_TOPO_API}    data=${body}
+    ...    AND    RequestsLibrary.DELETE On Session    session    url=${RFC8040_TOPO_API}    data=${body}    expected_status=anything
 
 Bug 7414 Different Endpoint Name
     [Documentation]    This test case is supplemental to the other test case for bug 7414. Even when the other
@@ -104,7 +104,7 @@ Bug 7414 Different Endpoint Name
     ...    ${TOOLS_SYSTEM_2_IP}
     ...    ${TOOLS_SYSTEM_IP}
     [Teardown]    BuiltIn.Run Keywords    Test Teardown
-    ...    AND    RequestsLibrary.Delete Request    session    ${RFC8040_TOPO_API}    data=${body}
+    ...    AND    RequestsLibrary.DELETE On Session    session    url=${RFC8040_TOPO_API}    data=${body}    expected_status=anything
 
 Bug 5221
     [Documentation]    In the case that an ovs node is rebooted, or the ovs service is
@@ -154,8 +154,8 @@ Bug 5221
     ...    ${list}
     ...    pretty_print_json=True
     [Teardown]    BuiltIn.Run Keywords    Test Teardown
-    ...    AND    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${bridge}
-    ...    AND    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}
+    ...    AND    RequestsLibrary.DELETE On Session    session    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${bridge}    expected_status=anything
+    ...    AND    RequestsLibrary.DELETE On Session    session    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}    expected_status=anything
 
 Bug 5177
     [Documentation]    This test case will recreate the bug using the same basic steps as
@@ -172,9 +172,8 @@ Bug 5177
     BuiltIn.Set Suite Variable    ${OVSDB_UUID}
     ${node} =    BuiltIn.Set Variable    uuid/${OVSDB_UUID}
     OVSDB.Add Bridge To Ovsdb Node    ${node}    ${TOOLS_SYSTEM_IP}    ${BRIDGE}    0000000000005177
-    ${resp} =    RequestsLibrary.Get Request    session    ${RFC8040_CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.text}
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp} =    RequestsLibrary.GET On Session    session    url=${RFC8040_CONFIG_TOPO_API}    expected_status=200
+    Utils.Log Content    ${resp.text}
     BuiltIn.Should Contain    ${resp.text}    ${node}/bridge/${BRIDGE}
     Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT}
     @{list} =    BuiltIn.Create List    ${BRIDGE}
@@ -208,8 +207,8 @@ Bug 4794
     ...    Shard.*shard-topology-operational An exception occurred while preCommitting transaction
     # TODO: Bug 5178
     [Teardown]    BuiltIn.Run Keywords    Test Teardown
-    ...    AND    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_API}${node_id}%2Fbridge%2F${BRIDGE}
-    ...    AND    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_API}${node_id}
+    ...    AND    RequestsLibrary.DELETE On Session    session    url=${RFC8040_SOUTHBOUND_NODE_API}${node_id}%2Fbridge%2F${BRIDGE}    expected_status=anything
+    ...    AND    RequestsLibrary.DELETE On Session    session    url=${RFC8040_SOUTHBOUND_NODE_API}${node_id}    expected_status=anything
 
 Bug 8280
     [Documentation]    Any config created for a bridge (e.g. added ports) should be reconciled when a bridge is
@@ -237,8 +236,8 @@ Bug 8280
     Utils.Check For Elements At URI    ${RFC8040_CONFIG_TOPO_API}    ${config_store_elements}    pretty_print_json=True
     BuiltIn.Wait Until Keyword Succeeds    5s    1s    Verify Ovs-vsctl Output    show    Port "port2"
     [Teardown]    BuiltIn.Run Keywords    Test Teardown
-    ...    AND    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID2}%2Fbridge%2F${BRIDGE}
-    ...    AND    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID2}
+    ...    AND    RequestsLibrary.DELETE On Session    session    url=${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID2}%2Fbridge%2F${BRIDGE}    expected_status=anything
+    ...    AND    RequestsLibrary.DELETE On Session    session    url=${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID2}    expected_status=anything
 
 Bug 7160
     [Documentation]    If this bug is reproduced, it's possible that the operational store will be
@@ -257,22 +256,26 @@ Bug 7160
     OVSDB.Log Config And Operational Topology
     OVSDB.Create Qos Linked Queue
     OVSDB.Log Config And Operational Topology
-    ${resp} =    RequestsLibrary.Delete Request
+    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:qos-entries=${qos}/queue-list=0
+    ...    url=${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:qos-entries=${qos}/queue-list=0
     OVSDB.Log Config And Operational Topology
-    ${resp} =    RequestsLibrary.Delete Request
+    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:qos-entries=${qos}
+    ...    url=${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:qos-entries=${qos}
     OVSDB.Log Config And Operational Topology
-    ${resp} =    RequestsLibrary.Delete Request
+    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:queues=${queue}
+    ...    url=${RFC8040_SOUTHBOUND_NODE_HOST1_API}/ovsdb:queues=${queue}
     OVSDB.Log Config And Operational Topology
-    ${resp} =    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_HOST1_API}
+    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_HOST1_API}
     OVSDB.Log Config And Operational Topology
     Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-manager
-    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}
+    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}
     OVSDB.Log Config And Operational Topology
     BuiltIn.Wait Until Keyword Succeeds    5s    1s    OVSDB.Config and Operational Topology Should Be Empty
 
@@ -296,16 +299,30 @@ Suite Teardown
     [Documentation]    Cleans up test environment, close existing sessions.
     Clean All Ovs Nodes
     # Best effort to clean config store, by deleting all the types of nodes that are used in this suite
-    RequestsLibrary.Delete Request
+    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}%2Fbridge%2F${BRIDGE}
+    ...    expected_status=anything
+    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}
+    ...    expected_status=anything
+    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID2}%2Fbridge%2F${BRIDGE}
+    ...    expected_status=anything
+    RequestsLibrary.DELETE On Session
+    ...    session
+    ...    url=${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID2}
+    ...    expected_status=anything
+    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}%2Fbridge%2F${BRIDGE}
-    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}
-    RequestsLibrary.Delete Request
+    ...    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}
+    ...    expected_status=anything
+    RequestsLibrary.DELETE On Session
     ...    session
-    ...    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID2}%2Fbridge%2F${BRIDGE}
-    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID2}
-    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}
-    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}
+    ...    url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}
+    ...    expected_status=anything
     OVSDB.Log Config And Operational Topology
     Delete All Sessions
 
index 81ac4440fca2c6b799456f54c044bd4f5c75d411..b78be0b238dced3c985fc55278fe70568b62ffc8 100644 (file)
@@ -1 +1 @@
-/restconf/config/car-people:car-people
+/rests/data/car-people:car-people
index 22a7f80ea181f29972b8a13197ae63941fd52d59..8a0a81dbdf605d1a4bd36789e25c079c2db2027f 100644 (file)
@@ -1 +1 @@
-/restconf/config/car:cars
+/rests/data/car:cars
index e07c8f83290421a930c19b6d5297846877b54fe9..2abba97b584a8bd5877236a619100ce9d02caad9 100644 (file)
@@ -1 +1 @@
-/restconf/config/car:cars/car-entry/boogie
+/rests/data/car:cars/car-entry/boogie
index 49d3e33b6cf6cf4226777afa40aa9283b825e8f7..6e7f29ead886c37563ad8f429a1d8ae1512ebebd 100644 (file)
@@ -1 +1 @@
-/restconf/config/car-people:car-people/car-person/boogie/joe
+/rests/data/car-people:car-people/car-person/boogie/joe
index 22a7f80ea181f29972b8a13197ae63941fd52d59..8a0a81dbdf605d1a4bd36789e25c079c2db2027f 100644 (file)
@@ -1 +1 @@
-/restconf/config/car:cars
+/rests/data/car:cars
index 81ac4440fca2c6b799456f54c044bd4f5c75d411..b78be0b238dced3c985fc55278fe70568b62ffc8 100644 (file)
@@ -1 +1 @@
-/restconf/config/car-people:car-people
+/rests/data/car-people:car-people
index fb88de7c5d74d92dcc3c8651fe1c2c6ffdc282c8..bb28d90a510446e5c7c85cfe418fff9836fb9831 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:become-prefix-leader
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:become-prefix-leader
index 14a3526ec551e10223e4960129900e3133b4f159..475dcf25c830381719987b70b4919c91c93616d9 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:check-publish-notifications
+/rests/operations/odl-mdsal-lowlevel-control:check-publish-notifications
index 4f360714caf50fb6c8edbef7fef9e706965094ba..b34309016a4edaae74e6757dbe35ee61da5a2cd8 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:create-prefix-shard
+/rests/operations/odl-mdsal-lowlevel-control:create-prefix-shard
index 1df1391ba7fca93e047289070ee8d1bf301198c9..f3d05e1cd005d0271e653a8dce7a7255ea41bb87 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-target:get-constant
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-target:get-constant
index 6b5ff937ab651ff3e97a0dc24d561a11339f2e7d..8bcf25c7be317aa6b56f0fb1fb9572e0f84b8547 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-target:get-contexted-constant
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-target:get-contexted-constant
index d30fed30cc5351c82edfb3a356db79a4e76a0109..6087234f9336c13a68b8e5000ff2b31247a7ecf6 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-target:get-singleton-constant
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-target:get-singleton-constant
index 6cf9549da979a8adc2de5de26961146992775b36..3597bdf34e2e0761c8610f0fba59cf2d60508842 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:produce-transactions
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:produce-transactions
index bc24857d0bdea4b67467d86ebdc34afd68c21ac0..f234f1b9a6681b38729beeca950c87bc63f9400f 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:register-bound-constant
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:register-bound-constant
index 0af89eb82ada5d8a7b1617c67acb09a1cb2c6f3b..310e69ea42536703f0599237635512910007b069 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:register-constant
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:register-constant
index 9fb9587697a19c24d1f9dd8a6e51e93f9662827e..40a5da4b75b6c96cea717b19f05447a0ea10d4d8 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:register-flapping-singleton
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:register-flapping-singleton
index a192d69bfb34c83505b1b3bc7d2831198368a262..47351539bf83fac588c4379bdd5eeb9b3cf2c2a7 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:register-singleton-constant
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:register-singleton-constant
index 65d88672224edc8cf0ed399cf3c9b855995a733c..0407c7b43c7b08da2bb423eff1ad55e848d716c6 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:remove-prefix-shard
+/rests/operations/odl-mdsal-lowlevel-control:remove-prefix-shard
index 7e00f3700d71de0607b84cb9949111e06cc07e0b..ce999f100878748ac935bfb215ceadb808d2f784 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:shutdown-prefix-shard-replica
+/rests/operations/odl-mdsal-lowlevel-control:shutdown-prefix-shard-replica
index 968202bdb093f06ee1f9db4eca6b7258564df759..ce08c60cc2b36f2560bed986bde0b7a6be214926 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:shutdown-shard-replica
+/rests/operations/odl-mdsal-lowlevel-control:shutdown-shard-replica
index 7c0fbb1a98e0ce3a8465f036cfa1e7c257d929fa..4a3d364d0c0961bd24d2781316776781c192477e 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:start-publish-notifications
+/rests/operations/odl-mdsal-lowlevel-control:start-publish-notifications
index 8725e8b1758c21b8302aebdd023869dd0dc88a23..daf35fb549f6b584848bb372f423338dd8a314fa 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:subscribe-ddtl
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:subscribe-ddtl
index 5d30b0fd03958704289a9d51b2b935e068812478..06fe70abb11277600502d2e9fe3765e9449f798b 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:subscribe-dtcl
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:subscribe-dtcl
index f0c5e6a426004d8420d483ee177fdce826675422..78c479eface17e11f256f3b003c0d9f8e3d71310 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:subscribe-ynl
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:subscribe-ynl
index 4c1243d250b8040e027c604edc7b677b2c6bb4b4..de167b2fa4cc2dbc2a5fb438e6404c2100ec775e 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:unregister-bound-constant
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:unregister-bound-constant
index e6814696fb75bafcdff3d1c57c3defd32d99964c..f2241f0b45bb9fb4478f6a06567039e570efb951 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:unregister-constant
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:unregister-constant
index 3f1177f6660f52f18974118d024c4787d710e33e..532aa5e879c196a350b27909319effba33836f48 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:unregister-flapping-singleton
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:unregister-flapping-singleton
index f0e72fba26d92827944b9e297dc2fe4935828c95..450740993cb411f51ca32c4ebf42007e81f1c387 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:unregister-singleton-constant
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:unregister-singleton-constant
index 93cbe5af77e82b2c0cf5d63513c4a18ab85574b9..cce66e0f472e224045bb638cb7cbb76a74b21b5f 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:unsubscribe-ddtl
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:unsubscribe-ddtl
index 8850035310815aa72e4999171eec7e7fb341b6a4..a27c7bc4010c8a3b69b3b70739bc7a684c45496a 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:unsubscribe-dtcl
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:unsubscribe-dtcl
index c2d4f5e816716233c0ee48beeab69c9cdbf0cffe..d51746f3ad938dc229ab2f0530c07e0cbed6e70d 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:unsubscribe-ynl
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:unsubscribe-ynl
index 27559584996c4d3af265237730136ae76478ad13..e76d22cadc9850af6e9f94f06329f51bfaebb022 100644 (file)
@@ -1 +1 @@
-/restconf/operations/odl-mdsal-lowlevel-control:write-transactions
\ No newline at end of file
+/rests/operations/odl-mdsal-lowlevel-control:write-transactions