Fix depecrating robot syntax in test suites

Changes:
    - Run KeyWord If is deprecated since Robot
      Framework version 5.*, use IF instead
    - Keyword name Redfish.login does not follow case convention
    - TEMPLATE is in wrong place of Test Case.
      Recommended order of elements in Test Cases:
      DOCUMENTATION, TAGS, TIMEOUT, SETUP, TEMPLATE, KEYWORD, TEARDOWN

Tested:
     - Ran dry-run test
Change-Id: I7b861ea1f90b86f57a483b97d40d3104dc789cdb
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/account_service/test_ipmi_redfish_user.robot b/redfish/account_service/test_ipmi_redfish_user.robot
index 00176f8..79b0eed 100644
--- a/redfish/account_service/test_ipmi_redfish_user.robot
+++ b/redfish/account_service/test_ipmi_redfish_user.robot
@@ -282,8 +282,9 @@
     Run IPMI Standard Command  user enable ${random_userid}
 
     # Set given privilege and enable IPMI messaging for newly created user.
-    Run Keyword If  '${privilege}' != '0'
-    ...  Set Channel Access  ${random_userid}  ipmi=on privilege=${privilege}
+    IF  '${privilege}' != '0'
+        Set Channel Access  ${random_userid}  ipmi=on privilege=${privilege}
+    END
 
     RETURN  ${random_username}  ${random_userid}
 
@@ -335,5 +336,5 @@
 
         IF  ${is_empty} == ${True}  BREAK
     END
-    Run Keyword If  '${jj}' == '299'  Fail  msg=A free user ID could not be found.
+    IF  '${jj}' == '299'  Fail  msg=A free user ID could not be found.
     RETURN  ${random_userid}
diff --git a/redfish/account_service/test_ldap_configuration.robot b/redfish/account_service/test_ldap_configuration.robot
index 074dc17..0338772 100644
--- a/redfish/account_service/test_ldap_configuration.robot
+++ b/redfish/account_service/test_ldap_configuration.robot
@@ -766,8 +766,11 @@
     ${power_status}=  Redfish.Get Attribute  /redfish/v1/Chassis/${CHASSIS_ID}  PowerState
     Return From Keyword If  '${power_status}' == '${expected_power_status}'
 
-    Run Keyword If  '${power_status}' == 'Off'  Redfish Power On
-    ...  ELSE  Redfish Power Off
+    IF  '${power_status}' == 'Off'
+        Redfish Power On
+    ELSE
+        Redfish Power Off
+    END
 
 Update LDAP User Role And Host Poweroff
     [Documentation]  Update LDAP user role and do host poweroff.
diff --git a/redfish/account_service/test_user_account.robot b/redfish/account_service/test_user_account.robot
index 5ba7843..166d6b1 100644
--- a/redfish/account_service/test_user_account.robot
+++ b/redfish/account_service/test_user_account.robot
@@ -578,9 +578,14 @@
     Bmc Execute Command  ${cmd}
 
     # Verify login with created user.
-    ${status}=  Run Keyword If  '${login_check}' == '${True}'
-    ...  Verify Redfish User Login  ${username}  ${password}
-    Run Keyword If  '${login_check}' == '${True}'  Should Be Equal  ${status}  ${enabled}
+    IF  '${login_check}' == '${True}'
+        ${status}=  Run Keyword And Return Status
+        ...  Verify Redfish User Login  ${username}  ${password}
+    ELSE
+        ${status}=  Set Variable  ${False}
+    END
+
+    IF  '${login_check}' == '${True}'  Should Be Equal  ${status}  ${enabled}
 
     # Validate Role ID of created user.
     ${role_config}=  Redfish_Utils.Get Attribute
@@ -754,18 +759,20 @@
     # Patch basicauth to TRUE
     Configure AuthMethods  ${auth_method}=${TRUE}
 
-    Run Keyword IF  "${auth_method}" == "XToken"
-    ...    Check XToken Works Fine  ${HTTP_OK}
-    ...  ELSE
-    ...    Check BasicAuth Works Fine  ${HTTP_OK}
+    IF  "${auth_method}" == "XToken"
+        Check XToken Works Fine  ${HTTP_OK}
+    ELSE
+        Check BasicAuth Works Fine  ${HTTP_OK}
+    END
 
     # Patch basicauth to FALSE
     Configure AuthMethods  ${auth_method}=${FALSE}
 
-    Run Keyword IF  "${auth_method}" == "BasicAuth"
-    ...    Check BasicAuth Works Fine  ${HTTP_UNAUTHORIZED}
-    ...  ELSE
-    ...    Check XToken Works Fine  ${HTTP_UNAUTHORIZED}
+    IF  "${auth_method}" == "BasicAuth"
+        Check BasicAuth Works Fine  ${HTTP_UNAUTHORIZED}
+    ELSE
+        Check XToken Works Fine  ${HTTP_UNAUTHORIZED}
+    END
 
 Configure AuthMethods
     [Documentation]  Enable/disable authmethod types.