Replace deprecated keywords for lib

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: I4e1418fad55b736d35e47c1fca1175baaab2f0b4
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/lib/dmtf_redfishtool_utils.robot b/lib/dmtf_redfishtool_utils.robot
index caf7f31..484aefb 100644
--- a/lib/dmtf_redfishtool_utils.robot
+++ b/lib/dmtf_redfishtool_utils.robot
@@ -25,7 +25,7 @@
     ${cmd}=  Catenate  ${cmd_args} GET ${uri}
     Log  ${cmd}
     ${rc}  ${cmd_output}=  Run and Return RC and Output  ${cmd}
-    Run Keyword If  ${rc} != 0  Is HTTP error Expected  ${cmd_output}  ${expected_error}
+    IF  ${rc} != 0  Is HTTP error Expected  ${cmd_output}  ${expected_error}
 
     RETURN  ${cmd_output}
 
@@ -44,7 +44,7 @@
     ${cmd}=  Catenate  ${cmd_args} PATCH ${uri} --data=${payload}
     Log  ${cmd}
     ${rc}  ${cmd_output}=  Run and Return RC and Output  ${cmd}
-    Run Keyword If  ${rc} != 0  Is HTTP error Expected  ${cmd_output}  ${expected_error}
+    IF  ${rc} != 0  Is HTTP error Expected  ${cmd_output}  ${expected_error}
 
     RETURN  ${cmd_output}
 
@@ -64,7 +64,7 @@
     ${cmd}=  Catenate  ${cmd_args} POST ${uri} --data=${payload}
     Log  ${cmd}
     ${rc}  ${cmd_output}=  Run and Return RC and Output  ${cmd}
-    Run Keyword If  ${rc} != 0  Is HTTP error Expected  ${cmd_output}  ${expected_error}
+    IF  ${rc} != 0  Is HTTP error Expected  ${cmd_output}  ${expected_error}
 
     RETURN  ${cmd_output}
 
@@ -82,7 +82,7 @@
     ${cmd}=  Catenate  ${cmd_args} DELETE ${uri}
     Log  ${cmd}
     ${rc}  ${cmd_output}=  Run and Return RC and Output  ${cmd}
-    Run Keyword If  ${rc} != 0  Is HTTP error Expected  ${cmd_output}  ${expected_error}
+    IF  ${rc} != 0  Is HTTP error Expected  ${cmd_output}  ${expected_error}
 
     RETURN  ${cmd_output}
 
@@ -100,7 +100,7 @@
     Return From Keyword IF  ${cmd_rsp_status} == True
     ${matches}=  Get Regexp Matches  ${error_expected}  200|204
     ${rsp_status}=  Run Keyword And Return Status  Should Be Empty  ${matches}
-    Run Keyword If  ${rsp_status} == False
+    IF  ${rsp_status} == False
     ...  Fail  msg=${cmd_output}
     @{words} =  Split String  ${error_expected}  ,
     @{errorString}=  Split String  ${cmd_output}  ${SPACE}
@@ -108,10 +108,12 @@
       ${status}=  Run Keyword And Return Status  Should Contain Any  ${errorString}  ${error}
       Return From Keyword If  ${status} == True
     END
-    ${rsp_code}=  Run Keyword If  ${status} == False  Get Regexp Matches  ${cmd_output}  [0-9][0-9][0-9]
+    ${rsp_code}=  Set Variable If  ${status} == False  Get Regexp Matches  ${cmd_output}  [0-9][0-9][0-9]
     ${rsp_code_status}=  Run Keyword And Return Status  Should Not Be Empty  ${rsp_code}
-    Run Keyword If  ${rsp_code_status} == True
-    ...    Fail  msg=Getting status code as ${rsp_code[0]} instead of ${error_expected}, status code mismatch.
-    ...  ELSE
-    ...    Fail  msg=${cmd_output}
+
+    IF  ${rsp_code_status} == True
+        Fail  msg=Getting status code as ${rsp_code[0]} instead of ${error_expected}, status code mismatch.
+    ELSE
+        Fail  msg=${cmd_output}
+    END