Migrate ExaBgpLib.robot 18/111118/4
authorSangwook Ha <sangwook.ha@verizon.com>
Wed, 27 Mar 2024 20:25:06 +0000 (13:25 -0700)
committerSangwook Ha <sangwook.ha@verizon.com>
Thu, 28 Mar 2024 00:04:19 +0000 (17:04 -0700)
The 'Get Request' RequestsLibrary keyword has been deprecated.
Migrate it to 'GET On Session'.

Change-Id: I262a907f8c5528611a62505f08c53490d04d5921
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
csit/libraries/ExaBgpLib.robot

index 276e0cc3e1157b76c59ca420d05a174d48384f06..b1bf48c12deafef81af090ac6418afa1545a1807 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,9 @@ 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
+    ...    alias=${session}
+    ...    url=${peer_check_url}${exabgp_ip}?content=nonconfig
     BuiltIn.Log    ${rsp.content}
     BuiltIn.Should_Be_Equal_As_Numbers    ${exp_status_code}    ${rsp.status_code}