Fix robot codes with latest directives

Changes:
   - Run KeyWord If is deprecated since Robot
     Framework version 5.*, use 'IF' instead

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

Change-Id: Ia7075ebf97e7300a82b032628e550d0caa4e86a8
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/lib/external_intf/vmi_utils.robot b/lib/external_intf/vmi_utils.robot
index 836e9c8..6d53a6e 100644
--- a/lib/external_intf/vmi_utils.robot
+++ b/lib/external_intf/vmi_utils.robot
@@ -57,8 +57,10 @@
 
     Return From Keyword If  ${valid_status_code} != ${HTTP_ACCEPTED}
     ${host_power_state}  ${host_state}=   Redfish Get Host State
-    Run Keyword If  '${host_power_state}' == 'On' and '${host_state}' == 'Enabled'
-    ...  Verify VMI Network Interface Details  ${ip}  Static  ${gateway}  ${netmask}  ${interface}
+    IF  '${host_power_state}' == 'On' and '${host_state}' == 'Enabled'
+        Verify VMI Network Interface Details  ${ip}  Static  ${gateway}  ${netmask}  ${interface}
+    END
+
 
 Verify VMI Network Interface Details
     [Documentation]  Verify VMI network interface details.
@@ -144,7 +146,7 @@
     ${ip_exists}=  Set Variable If  ${ip_resp["IPv4Addresses"]} == @{empty}  ${False}  ${True}
     ${static_exists}=  Set Variable If  ${ip_resp["IPv4StaticAddresses"]} == @{empty}  ${False}  ${True}
 
-    ${vmi_ip}=  Run Keyword If   ${ip_exists} == ${True}
+    ${vmi_ip}=  Set Variable If   ${ip_exists} == ${True}
     ...  Create Dictionary  DHCPv4=${${ip_resp["DHCPv4"]["DHCPEnabled"]}}  Id=${ip_resp["Id"]}
     ...  Description=${ip_resp["Description"]}  IPv4_Address=${ip_resp["IPv4Addresses"][0]["Address"]}
     ...  IPv4_AddressOrigin=${ip_resp["IPv4Addresses"][0]["AddressOrigin"]}  Name=${ip_resp["Name"]}