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/lib/code_update_utils.robot b/lib/code_update_utils.robot
index 484b66d..c94d56d 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -60,8 +60,7 @@
     ${resp}=  OpenBMC Get Request  ${software_object}/attr/${attribute_name}
     ...  quiet=${1}
     Return From Keyword If  ${resp.status_code} != ${HTTP_OK}
-    ${content}=  To JSON  ${resp.content}
-    [Return]  ${content["data"]}
+    [Return]  ${resp.json()["data"]}
 
 
 Get Software Objects Id
@@ -103,8 +102,7 @@
     ${pnor_details}=  Get Software Objects  ${VERSION_PURPOSE_HOST}
     FOR  ${pnor}  IN  @{pnor_details}
         ${resp}=  OpenBMC Get Request  ${pnor}  quiet=${1}
-        ${json}=  To JSON  ${resp.content}
-        Append To List  ${software}  ${json["data"]}
+        Append To List  ${software}  ${resp.json()["data"]}
     END
     [Return]  ${software}
 
@@ -338,8 +336,7 @@
     # Description of argument(s):
     # software_object  The URI to the software image to delete.
 
-    ${arglist}=  Create List
-    ${args}=  Create Dictionary  data=${arglist}
+    ${args}=  Set Variable   {"data": []}
     ${resp}=  OpenBMC Post Request  ${software_object}/action/Delete
     ...  data=${args}
     Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
@@ -374,9 +371,8 @@
 Delete All Non Running BMC Images
     [Documentation]  Delete all BMC images that are not running on the BMC.
 
-    @{datalist}=  Create List
-    ${data}=  Create Dictionary  data=@{datalist}
-    Call Method  ${SOFTWARE_VERSION_URI}  DeleteAll  data=${data}
+    ${args}=  Set Variable   {"data": []}
+    Call Method  ${SOFTWARE_VERSION_URI}  DeleteAll  data=${args}
 
 
 Check Error And Collect FFDC
@@ -497,8 +493,7 @@
 
     FOR  ${uri}  IN  @{installed_images}
       ${resp}=  OpenBMC Get Request  ${uri}
-      ${json}=  To JSON  ${resp.content}
-      Log  ${json["data"]}
+      Log  ${resp.json()["data"]}
     END