Fix deprecrated Run Keyword If for systems

Changes:
 - Run Keyword If is deprecated since
   Robot Framework version 5.*, use IF and END or Inline IF

Tested:
 - Checked using robot dry-run to make sure the
   syntax is not broken

Change-Id: I9bd9ba2706772fb288c62fa43016eaa343fc7324
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/openpower/ext_interfaces/test_client_identifier.robot b/openpower/ext_interfaces/test_client_identifier.robot
index 99c9924..7195fcd 100644
--- a/openpower/ext_interfaces/test_client_identifier.robot
+++ b/openpower/ext_interfaces/test_client_identifier.robot
@@ -100,11 +100,12 @@
 
     ${before_reboot_xauth_token}=  Set Variable  ${XAUTH_TOKEN}
 
-    Run Keyword If  '${reboot_flag}' == 'True'
-    ...  Run Keywords  Redfish BMC Reset Operation  AND
-    ...  Set Global Variable  ${XAUTH_TOKEN}  ${before_reboot_xauth_token}  AND
-    ...  Is BMC Standby  AND
-    ...  Verify A Session Created With ClientID  ${client_ids}  ${session_info}
+    IF  '${reboot_flag}' == 'True'
+       Redfish BMC Reset Operation
+       Set Global Variable  ${XAUTH_TOKEN}  ${before_reboot_xauth_token}
+       Is BMC Standby
+       Verify A Session Created With ClientID  ${client_ids}  ${session_info}
+    END
 
     Redfish Delete List Of Session  ${session_info}
 
diff --git a/openpower/ext_interfaces/test_discovery.robot b/openpower/ext_interfaces/test_discovery.robot
index d2e8a5f..863d282 100644
--- a/openpower/ext_interfaces/test_discovery.robot
+++ b/openpower/ext_interfaces/test_discovery.robot
@@ -167,7 +167,7 @@
     #               If the value is False, skip the step to disable the AvahiDaemon.
 
     Verify Existence Of BMC Record From List  ${service_type}
-    Run Keyword If  '${skip}' == 'True'  Set AvahiDaemon Service  command=stop
+    IF  '${skip}' == 'True'  Set AvahiDaemon Service  command=stop
     Redfish OBMC Reboot (off)
     Verify AvahiDaemon Service Status  message=start
     Login To OS  ${AVAHI_CLIENT}  ${AVAHI_CLIENT_USERNAME}  ${AVAHI_CLIENT_PASSWORD}
diff --git a/openpower/ext_interfaces/test_lock_management.robot b/openpower/ext_interfaces/test_lock_management.robot
index 2ff19d9..023e1a5 100644
--- a/openpower/ext_interfaces/test_lock_management.robot
+++ b/openpower/ext_interfaces/test_lock_management.robot
@@ -464,10 +464,11 @@
     ...  expected_status=any
     Should Be Equal As Strings  ${resp.status_code}  ${status_code}
 
-    Run Keyword If  ${status_code} == ${HTTP_BAD_REQUEST}
-    ...    Valid Value  ${BAD_REQUEST}  ['${resp.content}']
-    ...  ELSE
-    ...    Run Keyword And Return  Return Description Of Response  ${resp.content}
+    IF  ${status_code} == ${HTTP_BAD_REQUEST}
+        Valid Value  ${BAD_REQUEST}  ['${resp.content}']
+    ELSE
+        Run Keyword And Return  Return Description Of Response  ${resp.content}
+    END
 
     RETURN  ${resp}
 
@@ -487,10 +488,11 @@
     ...   expected_status=any
     Should Be Equal As Strings  ${resp.status_code}  ${status_code}
 
-    Run Keyword If  ${status_code} == ${HTTP_CONFLICT}
-    ...    Should Be Equal As Strings  ${CONFLICT_RQUEST}  ${resp.content}
-    ...  ELSE
-    ...    Run Keyword And Return  Return Description Of Response  ${resp.content}
+    IF  ${status_code} == ${HTTP_CONFLICT}
+        Should Be Equal As Strings  ${CONFLICT_RQUEST}  ${resp.content}
+    ELSE
+        Run Keyword And Return  Return Description Of Response  ${resp.content}
+    END
 
     RETURN  ${resp}
 
@@ -509,8 +511,9 @@
     ${resp}=  Redfish Post Request
     ...  /ibm/v1/HMC/LockService/Actions/LockService.AcquireLock  data=${lock_dict_param}
     Should Be Equal As Strings  ${resp.status_code}  ${status_code}
-    Run Keyword If  '${message}' != '${EMPTY}'
-    ...  Valid Value  message  ['${resp.content}']
+    IF  '${message}' != '${EMPTY}'
+        Valid Value  message  ['${resp.content}']
+    END
 
     RETURN  ${resp}
 
@@ -666,15 +669,17 @@
 
     ${before_reboot_xauth_token}=  Set Variable  ${XAUTH_TOKEN}
 
-    Run Keyword If  '${reboot_flag}' == 'True'
-    ...  Run Keywords  Redfish BMC Reset Operation  AND
-    ...  Set Global Variable  ${XAUTH_TOKEN}  ${before_reboot_xauth_token}  AND
-    ...  Wait Until Keyword Succeeds  3 min  10 sec  Redfish BMC Match States  match_state=Enabled  AND
-    ...  Is BMC Standby  AND
-    ...  Verify Lock On Resource  ${session_info}  ${trans_id_emptylist}
+    IF  '${reboot_flag}' == 'True'
+        Redfish BMC Reset Operation
+        Set Global Variable  ${XAUTH_TOKEN}  ${before_reboot_xauth_token}
+        Wait Until Keyword Succeeds  3 min  10 sec  Redfish BMC Match States  match_state=Enabled
+        Is BMC Standby
+        Verify Lock On Resource  ${session_info}  ${trans_id_emptylist}
+    END
 
-    Run Keyword If  '${reboot_flag}' == 'False'
-    ...  Release Locks On Resource  ${session_info}  ${trans_id_list}  Transaction  ${HTTP_OK}
+    IF  '${reboot_flag}' == 'False'
+        Release Locks On Resource  ${session_info}  ${trans_id_list}  Transaction  ${HTTP_OK}
+    END
 
     ${trans_id_emptylist}=  Create List
     Verify Lock On Resource  ${session_info}  ${trans_id_emptylist}
@@ -930,12 +935,14 @@
     ${session_info}=  Create Redfish Session With ClientID  ${client_id}
     ${before_reboot_xauth_token}=  Set Variable  ${XAUTH_TOKEN}
 
-    Run Keyword If  '${reboot_flag}' == 'True'
-    ...  Run Keywords  Redfish BMC Reset Operation  AND
-    ...  Set Global Variable  ${XAUTH_TOKEN}  ${before_reboot_xauth_token}  AND
-    ...  Wait Until Keyword Succeeds  3 min  10 sec  Redfish BMC Match States  match_state=Enabled  AND
-    ...  Is BMC Standby  AND
-    ...  Post Reboot Acquire Lock  ${session_info}  ${lock_type}
+    IF  '${reboot_flag}' == 'True'
+        Redfish BMC Reset Operation
+        Set Global Variable  ${XAUTH_TOKEN}  ${before_reboot_xauth_token}
+        Wait Until Keyword Succeeds  3 min  10 sec  Redfish BMC Match States  match_state=Enabled
+        Is BMC Standby
+        Post Reboot Acquire Lock  ${session_info}  ${lock_type}
+    END
+
     Redfish Delete Session  ${session_info}
 
 
diff --git a/openpower/vpd/test_vpd_tool.robot b/openpower/vpd/test_vpd_tool.robot
index 060f47f..862cbb7 100644
--- a/openpower/vpd/test_vpd_tool.robot
+++ b/openpower/vpd/test_vpd_tool.robot
@@ -220,8 +220,8 @@
     # component       VPD component (e.g. System,Chassis etc).
     # field           VPD field (e.g. Serialnumber,LocationCode etc).
 
-    ${component_url}=  Run Keyword If
-    ...  '${component}' == 'System'  Set Variable  /system
+    ${component_url}=  Set Variable If
+    ...  '${component}' == 'System'  /system
 
     # Get VPD details of given component via vpd-tool.
     ${vpd_records}=  Vpdtool  -o -O ${component_url}