Improve REST success rate by retry attempt

The changes involves:
    - Increase retry login session Authentication
    - Add delete sessions in utils

Resolves openbmc/openbmc-test-automation#94

Change-Id: Icad3044bbe0e9c345ed3633b5e72d6e170e3ed52
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/rest_client.robot b/lib/rest_client.robot
index bd2db37..3d7a36c 100644
--- a/lib/rest_client.robot
+++ b/lib/rest_client.robot
@@ -100,7 +100,7 @@
     [Return]    ${ret}
 
 Initialize OpenBMC
-    Create Session    openbmc    ${AUTH_URI}  timeout=5   max_retries=1
+    Create Session    openbmc    ${AUTH_URI}  timeout=5   max_retries=3
     ${headers}=     Create Dictionary   Content-Type=application/json
     @{credentials} =   Create List     ${OPENBMC_USERNAME}      ${OPENBMC_PASSWORD}
     ${data} =   create dictionary   data=@{credentials}
@@ -132,7 +132,7 @@
     [Arguments]    ${uri}      ${attr}    &{kwargs}
     ${base_uri}=    Catenate    SEPARATOR=    ${DBUS_PREFIX}    ${uri}
     ${resp} =       openbmc put request    ${base_uri}/attr/${attr}     &{kwargs}
-    should be equal as strings      ${resp.status_code}     ${HTTP_OK}  
+    should be equal as strings      ${resp.status_code}     ${HTTP_OK}
     ${json} =   to json         ${resp.content}
 
 Read Properties
diff --git a/lib/utils.robot b/lib/utils.robot
index 2a4a01f..572c901 100644
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -207,4 +207,7 @@
     Return From Keyword If   '${alive}' == '${False}'    ${False}
     [return]    ${True}
 
+Flush REST Sessions
+    [Documentation]   Removes all the active session objects
+    Delete All Sessions