Redfish 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: I34a0ac5ae5d225bf34d3a63e862cfe99a295eeda
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/update_service/test_firmware_inventory.robot b/redfish/update_service/test_firmware_inventory.robot
index 001c2cb..1938791 100644
--- a/redfish/update_service/test_firmware_inventory.robot
+++ b/redfish/update_service/test_firmware_inventory.robot
@@ -327,14 +327,16 @@
Verify Firmware Version Same In Firmware Inventory And Managers
- Run Keyword If 'backup_image' == '${image}'
- ... Verify Firmware Version Is Not Same In Firmware Inventory And Managers
+ IF 'backup_image' == '${image}'
+ Verify Firmware Version Is Not Same In Firmware Inventory And Managers
+ END
- Run Keyword If 'switch_backup_image' == '${image}'
- ... Run Keywords Set Backup Firmware Image As Functional AND
- ... Verify Firmware Version Same In Firmware Inventory And Managers AND
- ... Set Backup Firmware Image As Functional AND
- ... Verify Firmware Version Same In Firmware Inventory And Managers
+ IF 'switch_backup_image' == '${image}'
+ Set Backup Firmware Image As Functional
+ Verify Firmware Version Same In Firmware Inventory And Managers
+ Set Backup Firmware Image As Functional
+ Verify Firmware Version Same In Firmware Inventory And Managers
+ END
Verify Active Software Image And Firmware Inventory Is Same
diff --git a/redfish/update_service/test_redfish_bmc_code_update.robot b/redfish/update_service/test_redfish_bmc_code_update.robot
index 6f754c2..f36423a 100644
--- a/redfish/update_service/test_redfish_bmc_code_update.robot
+++ b/redfish/update_service/test_redfish_bmc_code_update.robot
@@ -363,15 +363,16 @@
Run mkdir certificate_dir
END
- Run Keyword If '${operation}' == 'host_name'
- ... Run Configure BMC Hostname In Loop count=${count}
- ... ELSE IF '${operation}' == 'kernel_panic'
- ... Run Keywords Kernel Panic BMC Reset Operation AND
- ... Is BMC Unpingable
- ... ELSE IF '${operation}' == 'https_certificate'
- ... Redfish Update Certificate Upload In Loop count=${count}
- ... ELSE
- ... Fail msg=Operation not handled.
+ IF '${operation}' == 'host_name'
+ Run Configure BMC Hostname In Loop count=${count}
+ ELSE IF '${operation}' == 'kernel_panic'
+ Kernel Panic BMC Reset Operation
+ Is BMC Unpingable
+ ELSE IF '${operation}' == 'https_certificate'
+ Redfish Update Certificate Upload In Loop count=${count}
+ ELSE
+ Fail msg=Operation not handled.
+ END
Get Active Firmware Image
@@ -458,10 +459,11 @@
... ${before_update_activeswimage['ActiveSoftwareImage']['@odata.id']}
... ${after_update_activeswimage['ActiveSoftwareImage']['@odata.id']}
- Run Keyword If '${operation}' == 'kernel_panic'
- ... Should Be True ${status}
- ... ELSE
- ... Should Not Be True ${status}
+ IF '${operation}' == 'kernel_panic'
+ Should Be True ${status}
+ ELSE
+ Should Not Be True ${status}
+ END
Verify Get ApplyTime OnReset