Migrate GoBgpLib.robot 29/111129/2
authorSangwook Ha <sangwook.ha@verizon.com>
Wed, 27 Mar 2024 23:06:08 +0000 (16:06 -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: Ia520b59076383f3b68f9bd0e692ce8355f909e72
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
csit/libraries/GoBgpLib.robot

index da71866c356a68be06dad4eb1106c2c9f62a0491..986f3079f1d86f3d6c40e85feb7f1ef36d72fc5e 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
+    ...    alias=${session}
+    ...    url=${peer_check_url}${gobgp_ip}?content=nonconfig
+    ...    expected_status=any
     BuiltIn.Log    ${rsp.content}
     BuiltIn.Should_Be_Equal_As_Numbers    ${exp_status_code}    ${rsp.status_code}