Test to connect via redfish Session service

Change-Id: I243b64534fae57749743c0056e685e411dfa9705
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/service_root/test_service_root.robot b/redfish/service_root/test_service_root.robot
index 4879786..92390af 100644
--- a/redfish/service_root/test_service_root.robot
+++ b/redfish/service_root/test_service_root.robot
@@ -93,6 +93,24 @@
     List Should Not Contain Value  ${resp}  ${session_info["location"]}
 
 
+Redfish Login Via SessionService
+    [Documentation]  Login to BMC via redfish session service.
+    [Tags]   Redfish_Login_Via_SessionService
+
+    Create Session  openbmc  https://${OPENBMC_HOST}
+    ${headers}=  Create Dictionary  Content-Type=application/json
+    ${data}=  Create Dictionary  UserName=${OPENBMC_USERNAME}  Password=${OPENBMC_PASSWORD}
+
+    ${resp}=  Post Request  openbmc  /redfish/v1/SessionService/Sessions  data=${data}  headers=${headers}
+    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_CREATED}
+
+    ${content}=  To JSON  ${resp.content}
+    ${headers}=  Create Dictionary   Content-Type=application/json
+    ...  X-Auth-Token=${resp.headers["X-Auth-Token"]}
+    ${resp}=  Delete Request  openbmc  /redfish/v1/SessionService/Sessions/${content["Id"]}  headers=${headers}
+    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
+
+
 *** Keywords ***
 
 GET And Verify Redfish Response