Update IPMI robot test code with latest directives

Changes:
   - Run KeyWord If is deprecated since Robot
     Framework version 5.*, use 'IF' instead
   - Exit For Loop If is deprecated since Robot
     Framework version 5.*, use
     IF  '${var}' == 'EXIT'  BREAK

Tested:
     - Checked using robot dry-run to make sure the
     syntax is not broken
Change-Id: If2fd8636b388250fc4dbc4576169f7250983c4ef
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ipmi/test_ipmi_fru.robot b/ipmi/test_ipmi_fru.robot
index 7dd8ff3..fe55d1a 100644
--- a/ipmi/test_ipmi_fru.robot
+++ b/ipmi/test_ipmi_fru.robot
@@ -83,7 +83,7 @@
     ${key_map}=  Get Dictionary Items   ${ipmi_redfish_fru_field_map}
 
     FOR    ${key}    ${value}    IN    @{key_map}
-      Exit For Loop IF    "${value}" == "${EMPTY}"
+      IF  "${value}" == "${EMPTY}"  BREAK
       FOR  ${ipmi_fru_component}  IN  ${ipmi_fru_component_obj}
         FOR  ${redfish_fru_component}  IN  ${redfish_fru_component_obj}
             IF  '${ipmi_fru_component['product_name']}' == '${redfish_fru_component['Name']}'
diff --git a/ipmi/test_ipmi_payload.robot b/ipmi/test_ipmi_payload.robot
index b8f7889..34433d9 100644
--- a/ipmi/test_ipmi_payload.robot
+++ b/ipmi/test_ipmi_payload.robot
@@ -49,7 +49,7 @@
     [Tags]  Test_Activate_Payload
 
     ${payload_status}=  Get Payload Activation Status
-    Run Keyword If  '${payload_status}' == '01'  Deactivate Payload
+    IF  '${payload_status}' == '01'  Deactivate Payload
 
     Activate Payload
 
@@ -62,7 +62,7 @@
     [Tags]  Test_Deactivate_Payload
 
     ${payload_status}=  Get Payload Activation Status
-    Run Keyword If  '${payload_status}' == '00'  Activate Payload
+    IF  '${payload_status}' == '00'  Activate Payload
 
     Deactivate Payload
 
@@ -362,13 +362,15 @@
     ${get_user_access_payload}=  Get User Access Payload For Given Channel  ${user_id}
     @{get_user_access_cmd_resp_list}=  Split String  ${get_user_access_payload}
 
-    Run Keyword If  '${standard_payload}' == 'Disabled'
-    ...  Should Be Equal  ${get_user_access_cmd_resp_list}[0]  00
-    ...  ELSE
-    ...  Should Be Equal  ${get_user_access_cmd_resp_list}[0]  02
+    IF  '${standard_payload}' == 'Disabled'
+        Should Be Equal  ${get_user_access_cmd_resp_list}[0]  00
+    ELSE
+        Should Be Equal  ${get_user_access_cmd_resp_list}[0]  02
+    END
 
-    Run Keyword If  '${standard_payload}' == 'Disabled'
-    ...  Verify Sol Activate Disabled  ${user_name}
+    IF  '${standard_payload}' == 'Disabled'
+        Verify Sol Activate Disabled  ${user_name}
+    END
 
 
 Verify Sol Activate Disabled
diff --git a/ipmi/test_ipmi_poh_counter.robot b/ipmi/test_ipmi_poh_counter.robot
index ba6fed1..2f0e061 100644
--- a/ipmi/test_ipmi_poh_counter.robot
+++ b/ipmi/test_ipmi_poh_counter.robot
@@ -156,8 +156,7 @@
 
     # If Host state is 'On' then the condition will not be executed.
     # Host may take approx 5 - 6 minutes to complete power ON process.
-    Run Keyword If  '${current_host_state}' == 'Off'
-    ...  IPMI Power On
+    IF  '${current_host_state}' == 'Off'   IPMI Power On
 
 
 Suite Teardown Execution
diff --git a/ipmi/test_ipmi_sel.robot b/ipmi/test_ipmi_sel.robot
index 49b5f30..5c2c25f 100644
--- a/ipmi/test_ipmi_sel.robot
+++ b/ipmi/test_ipmi_sel.robot
@@ -478,7 +478,7 @@
     [Documentation]  Install tarball for error log creation.
 
     ${status}=  Run Keyword And Return Status  Logging Test Binary Exist
-    Run Keyword If  ${status} == ${False}  Install Tarball
+    IF  ${status} == ${False}  Install Tarball
 
 
 Test Setup Execution
diff --git a/ipmi/test_ipmi_sensor.robot b/ipmi/test_ipmi_sensor.robot
index 1bf219c..f5e25f9 100644
--- a/ipmi/test_ipmi_sensor.robot
+++ b/ipmi/test_ipmi_sensor.robot
@@ -391,12 +391,13 @@
     ${sensor_name}=  Set Variable  ${sensor_list[0]}
     ${sensor_id}=  Get Sensor Id For Sensor  ${sensor_name}
 
-     Run Keyword If  '${status}' == 'Absent'
-     ...  Run IPMI Command
-     ...  0x04 0x30 ${sensor_id} 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
-     ...  ELSE IF  '${status}' == 'Enabled'
-     ...  Run IPMI Command
-     ...  0x04 0x30 ${sensor_id} 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
+     IF  '${status}' == 'Absent'
+         Run IPMI Command
+         ...  0x04 0x30 ${sensor_id} 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
+     ELSE IF  '${status}' == 'Enabled'
+         Run IPMI Command
+         ...  0x04 0x30 ${sensor_id} 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
+     END
 
      # Redfish cpu components have "-" instead of "_" (e.g.: dcm0-cpu0).
      ${cpu_name}=  Replace String  ${sensor_name}  _  -
diff --git a/ipmi/test_ipmi_sol.robot b/ipmi/test_ipmi_sol.robot
index b602fc4..3f3a7d9 100644
--- a/ipmi/test_ipmi_sol.robot
+++ b/ipmi/test_ipmi_sol.robot
@@ -144,16 +144,17 @@
     ${status}=  Run Keyword And Return Status  Wait Until Keyword Succeeds  10 mins  15 secs
     ...  Check IPMI SOL Output Content  ${SOL_BIOS_OUTPUT}
 
-    Run Keyword If  '${status}' == 'False'
-    ...  Run Keywords  IPMI Power Off  AND  FAIL  msg=BIOS not loaded.
+    IF  '${status}' == 'False'
+        IPMI Power Off
+        FAIL  msg=BIOS not loaded.
+    END
 
     # SOL_LOGIN_OUTPUT - SOL output login prompt
     # Once host reboot completes, SOL console may take maximum of 15 minutes to get the login prompt.
     ${status}=  Run Keyword And Return Status  Wait Until Keyword Succeeds  15 mins  15 secs
     ...  Check IPMI SOL Output Content  ${SOL_LOGIN_OUTPUT}
 
-    Run Keyword If  '${status}' == 'False'
-    ...  IPMI Power Off
+    IF  '${status}' == 'False'  IPMI Power Off
 
 
 Verify Deactivate Non Existing SOL
@@ -361,16 +362,17 @@
     ${status}=  Run Keyword And Return Status  Wait Until Keyword Succeeds  10 mins  15 secs
     ...  Check IPMI SOL Output Content  ${SOL_BIOS_OUTPUT}
 
-    Run Keyword If  '${status}' == 'False'
-    ...  Run Keywords  IPMI Power Off  AND  FAIL  msg=BIOS not loaded.
+    IF  '${status}' == 'False'
+        IPMI Power Off
+        FAIL  msg=BIOS not loaded.
+    END
 
     # SOL_LOGIN_OUTPUT - SOL output login prompt
     # Once host reboot completes, SOL console may take maximum of 15 minutes to get the login prompt.
     ${status}=  Run Keyword And Return Status  Wait Until Keyword Succeeds  15 mins  15 secs
     ...  Check IPMI SOL Output Content  ${SOL_LOGIN_OUTPUT}
 
-    Run Keyword If  '${status}' == 'False'
-    ...  IPMI Power Off
+    IF  '${status}' == 'False'  IPMI Power Off
 
 
 Get SOL Setting
diff --git a/ipmi/test_ipmi_watchdog.robot b/ipmi/test_ipmi_watchdog.robot
index 9f0a02a..5c3dcf3 100644
--- a/ipmi/test_ipmi_watchdog.robot
+++ b/ipmi/test_ipmi_watchdog.robot
@@ -273,10 +273,12 @@
     IF  '${sel_event}' == 'Hard reset' or '${sel_event}' == 'Power cycle'
         # If timer expire action is 'Hard Reset' then the host/chassis immediately powering on after
         # timer expires. So, verify host is rebooting by expecting that host is unpingable.
-        Run Keyword If  '${sel_event}' == 'Power cycle'
-        ...  Wait Until Keyword Succeeds  1 min  10 sec  Verify Host Power State  ['off']
-        ...  ELSE
-        ...  Wait Until Keyword Succeeds  20 sec  5 sec  Is Host Unpingable  ${OS_HOST}
+        IF  '${sel_event}' == 'Power cycle'
+            Wait Until Keyword Succeeds  1 min  10 sec  Verify Host Power State  ['off']
+        ELSE
+            Wait Until Keyword Succeeds  20 sec  5 sec  Is Host Unpingable  ${OS_HOST}
+        END
+
         Wait Until Keyword Succeeds  5 min  30 sec  Verify Host Power State  ['on']
         Wait Until Keyword Succeeds  7 min  30 sec  OS Execute Command  uptime
     ELSE