Code enhancement on creating an session and verifying
the session information

Change-Id: I3af9f71f34f7d837a8777d0a5e5b667a9eecd203
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/openpower/ext_interfaces/test_client_identifier.robot b/openpower/ext_interfaces/test_client_identifier.robot
index 53525c9..8a9b231 100644
--- a/openpower/ext_interfaces/test_client_identifier.robot
+++ b/openpower/ext_interfaces/test_client_identifier.robot
@@ -158,11 +158,12 @@
     #               (e.g. True or False).
 
     ${client_ids}=  Split String  ${client_id}  ,
-    ${session_info}=  Create A Session With ClientID  ${client_ids}
+    ${session_info}=  Create Session With List Of ClientID  ${client_ids}
     Verify A Session Created With ClientID  ${client_ids}  ${session_info}
     Run Keyword If  '${reboot_flag}' == 'True'
     ...  Run Keywords  Redfish OBMC Reboot (off)  AND
     ...  Verify A Session Created With ClientID  ${client_ids}  ${session_info}
+    Redfish Delete List Of Session  ${session_info}
 
 
 Set Client Origin IP
@@ -217,8 +218,8 @@
     [Arguments]  ${client_ids}  ${session_ids}
 
     # Description of argument(s):
-    # client_id    External client name.
-    # session_id   This value is a session id.
+    # client_ids    External client name.
+    # session_ids   This value is a session id.
 
     # {
     #   "@odata.id": "/redfish/v1/SessionService/Sessions/H8q2ZKucSJ",
@@ -236,18 +237,15 @@
     #   "UserName": "root"
     # }
 
-    FOR  ${client}  IN  @{client_ids}
-      ${session_id}=  Get Session Information By ClientID  ${client}  ${session_ids}
-      ${resp}=  Redfish Get Request  /redfish/v1/SessionService/Sessions/${session_id}
+    FOR  ${client}  ${session}  IN ZIP  ${client_ids}  ${session_ids}
+      ${resp}=  Redfish Get Request  /redfish/v1/SessionService/Sessions/${session["Id"]}
       ${sessions}=     To Json    ${resp.content}
-      #Set Test Variable  ${sessions}  ${content["data"]}
       Rprint Vars  sessions
-      Log  ${sessions}
       @{words} =  Split String  ${sessions["ClientOriginIPAddress"]}  :
       ${ip_address}=  Get Running System IP
       Set Test Variable  ${temp_ipaddr}  ${words}[-1]
       Valid Value  client  ['${sessions["Oem"]["OpenBMC"]["ClientID"]}']
-      Valid Value  sessions["Id"]  ['${session_id}']
+      Valid Value  session["Id"]  ['${sessions["Id"]}']
       Valid Value  temp_ipaddr  ${ip_address}
     END