Robotframework request package upgrade changes

Current working package version
   robotframework-requests            0.7.2

To Test:
      pip3 install robotframework-requests -U
                 or
      # Once this commit is merged.
      pip3 install -r requirements.txt

      Version latest:
      robotframework-requests         0.9.3

Refer Documentation:
   https://marketsquare.github.io/robotframework-requests/doc/RequestsLibrary.html

What is not changed:
     - The test cases under directory tests/ is not modified and is
       deprecated but you can continue using it with older package
       and configuration using

       git clone -b v3.0-stable https://github.com/openbmc/openbmc-test-automation

Tested:
      Upstream HW_CI test list, firmware code update and few other
      test suite like ipmi, certificate, dumps, ffdc and redfish
      test suites.

Note: I have not tested end to end, so it is likely there could be
      grey areas where it could fail but should be minor w.r.t
      response data format.

Resolves:  openbmc/openbmc-test-automation#2105

Change-Id: Ie03b25ff88948bcccb09e9d82f8da86e28c92697
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/dmtf_tools/test_redfishtool_certificate.robot b/redfish/dmtf_tools/test_redfishtool_certificate.robot
index 5c84b62..63d0280 100644
--- a/redfish/dmtf_tools/test_redfishtool_certificate.robot
+++ b/redfish/dmtf_tools/test_redfishtool_certificate.robot
@@ -6,6 +6,7 @@
 Library           OperatingSystem
 Library           String
 Library           Collections
+Library           JSONLibrary
 
 Resource          ../../lib/resource.robot
 Resource          ../../lib/bmc_redfish_resource.robot
@@ -284,8 +285,8 @@
     [Documentation]  Delete all CA certificate via Redfish.
 
     ${cmd_output}=  Redfishtool Get  /redfish/v1/Managers/bmc/Truststore/Certificates
-    ${json_object}=  To JSON  ${cmd_output}
-    ${cert_list}=  Set Variable  ${json_object["Members"]}
+    ${cmd_output}=  Convert String to JSON  ${cmd_output}
+    ${cert_list}=  Set Variable  ${cmd_output["Members"]}
     FOR  ${cert}  IN  @{cert_list}
       Redfishtool Delete  ${cert["@odata.id"]}  ${root_cmd_args}
     END
@@ -333,14 +334,13 @@
     ...  X-Auth-Token=${XAUTH_TOKEN}
     Set To Dictionary  ${kwargs}  headers  ${headers}
 
-    ${ret}=  Post Request  openbmc  ${uri}  &{kwargs}
-    ${content_json}=  To JSON  ${ret.content}
-    ${cert_id}=  Set Variable If  '${ret.status_code}' == '${HTTP_OK}'  ${content_json["Id"]}  -1
+    ${resp}=  POST On Session  openbmc  ${uri}  &{kwargs}
+    ${cert_id}=  Set Variable If  '${resp.status_code}' == '${HTTP_OK}'  ${resp.json()["Id"]}  -1
 
     Run Keyword If  '${status}' == 'ok'
-    ...  Should Be Equal As Strings  ${ret.status_code}  ${HTTP_OK}
+    ...  Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
     ...  ELSE IF  '${status}' == 'error'
-    ...  Should Be Equal As Strings  ${ret.status_code}  ${HTTP_INTERNAL_SERVER_ERROR}
+    ...  Should Be Equal As Strings  ${resp.status_code}  ${HTTP_INTERNAL_SERVER_ERROR}
 
     Delete All Sessions
 
@@ -409,9 +409,10 @@
 
     ${rc}  ${cmd_output}=  Run and Return RC and Output  ${cmd_args} GET ${uri}
     Run Keyword If  ${rc} != 0  Is HTTP error Expected  ${cmd_output}  ${expected_error}
-    ${json_object}=  To JSON  ${cmd_output}
 
-    [Return]  ${json_object["CertificateString"]}
+    ${cmd_output}=  Convert String to JSON  ${cmd_output}
+
+    [Return]  ${cmd_output["CertificateString"]}
 
 
 Suite Setup Execution