Fix POST on session input data type args as JSON

Changes:
    - amend arg type from data to JSON

Tested:
    Ran  templates/test_openbmc_setup.robot

Change-Id: Iaa7b17c6dcd19f83d68addcd7da0ff861bed1373
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/rest_client.robot b/lib/rest_client.robot
index 649352b..d5462fd 100644
--- a/lib/rest_client.robot
+++ b/lib/rest_client.robot
@@ -195,9 +195,9 @@
 
     ${headers}=  Create Dictionary  Content-Type=application/json
     @{credentials}=  Create List  ${rest_username}  ${rest_password}
-    ${data}=  create dictionary   data=@{credentials}
+    ${data}=  Create Dictionary   data=@{credentials}
     ${status}  ${resp}=  Run Keyword And Ignore Error  POST On Session  openbmc
-    ...  /login  data=${data}  headers=${headers}
+    ...  /login  json=${data}  headers=${headers}
 
     Should Be Equal  ${status}  PASS  msg=${resp}
     Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
@@ -213,7 +213,7 @@
     # If there is no active sesion it will throw the following exception
     # "Non-existing index or alias 'openbmc'"
     ${resp}=  POST On Session  openbmc
-    ...  /logout  data=${data}  headers=${headers}
+    ...  /logout  json=${data}  headers=${headers}
 
     Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
     ...  msg=${resp}