Fix for deprecated Exit For Loop keyword
Changes:
- Exit For Loop If is deprecated since
Robot Framework version 5.*, use IF and BREAK instead
Tested:
- Checked using robot dry-run to make sure the
syntax is not broken
Change-Id: Ib12fecbc996ba14f4cabd7677f85a90fa3f2b39b
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/redfish/managers/test_bmc_dumps.robot b/redfish/managers/test_bmc_dumps.robot
index a080e14..d4f92a6 100644
--- a/redfish/managers/test_bmc_dumps.robot
+++ b/redfish/managers/test_bmc_dumps.robot
@@ -251,7 +251,7 @@
FOR ${n} IN RANGE 0 ${MAX_DUMP_COUNT}
Create User Initiated BMC Dump Via Redfish
${dump_space}= Get Disk Usage For Dumps
- Exit For Loop If ${dump_space} >= (${BMC_DUMP_TOTAL_SIZE} - ${BMC_DUMP_MIN_SPACE_REQD})
+ IF ${dump_space} >= (${BMC_DUMP_TOTAL_SIZE} - ${BMC_DUMP_MIN_SPACE_REQD}) BREAK
END
# Check error while creating dump when dump size is full.
diff --git a/redfish/managers/test_bmc_network_conf.robot b/redfish/managers/test_bmc_network_conf.robot
index 653e88a..ec4854f 100644
--- a/redfish/managers/test_bmc_network_conf.robot
+++ b/redfish/managers/test_bmc_network_conf.robot
@@ -834,7 +834,7 @@
FOR ${network_configuration} IN @{network_configurations}
${ip_found}= Set Variable If '${network_configuration['Address']}' == '${ip_address}' ${True}
... ${False}
- Exit For Loop If ${ip_found}
+ IF ${ip_found} BREAK
END
Run Keyword If '${ip_found}' == '${False}'
... Fail msg=Configured IP address not found on EthernetInterface URI.
diff --git a/redfish/managers/test_multiple_interfaces.robot b/redfish/managers/test_multiple_interfaces.robot
index 6643654..9ac6a17 100644
--- a/redfish/managers/test_multiple_interfaces.robot
+++ b/redfish/managers/test_multiple_interfaces.robot
@@ -235,10 +235,11 @@
${network_configurations}= Get Network Configuration Using Channel Number ${SECONDARY_CHANNEL_NUMBER}
FOR ${network_configuration} IN @{network_configurations}
- Run Keyword If '${network_configuration['Address']}' == '${OPENBMC_HOST_ETH1}'
- ... Run Keywords Set Suite Variable ${eth1_subnet_mask} ${network_configuration['SubnetMask']}
- ... AND Set Suite Variable ${eth1_gateway} ${network_configuration['Gateway']}
- ... AND Exit For Loop
+ IF '${network_configuration['Address']}' == '${OPENBMC_HOST_ETH1}'
+ Set Suite Variable ${eth1_subnet_mask} ${network_configuration['SubnetMask']}
+ Set Suite Variable ${eth1_gateway} ${network_configuration['Gateway']}
+ BREAK
+ END
END
diff --git a/redfish/managers/test_multiple_interfaces_dhcp.robot b/redfish/managers/test_multiple_interfaces_dhcp.robot
index 632291b..7e3c610 100644
--- a/redfish/managers/test_multiple_interfaces_dhcp.robot
+++ b/redfish/managers/test_multiple_interfaces_dhcp.robot
@@ -233,17 +233,19 @@
# Get the configuration of eth1
${network_configurations}= Get Network Configuration Using Channel Number ${2}
FOR ${network_configuration} IN @{network_configurations}
- Run Keyword If '${network_configuration['Address']}' == '${OPENBMC_HOST_ETH1}'
- ... Run Keywords Set Suite Variable ${eth1_subnet_mask} ${network_configuration['SubnetMask']}
- ... AND Set Suite Variable ${eth1_gateway} ${network_configuration['Gateway']}
- ... AND Exit For Loop
+ IF '${network_configuration['Address']}' == '${OPENBMC_HOST_ETH1}'
+ Set Suite Variable ${eth1_subnet_mask} ${network_configuration['SubnetMask']}
+ Set Suite Variable ${eth1_gateway} ${network_configuration['Gateway']}
+ BREAK
+ END
END
# Get the configuration of eth0
${network_configurations}= Get Network Configuration Using Channel Number ${1}
FOR ${network_configuration} IN @{network_configurations}
- Run Keyword If '${network_configuration['Address']}' == '${OPENBMC_HOST}'
- ... Run Keywords Set Suite Variable ${eth0_subnet_mask} ${network_configuration['SubnetMask']}
- ... AND Set Suite Variable ${eth0_gateway} ${network_configuration['Gateway']}
- ... AND Exit For Loop
+ IF '${network_configuration['Address']}' == '${OPENBMC_HOST}'
+ Set Suite Variable ${eth0_subnet_mask} ${network_configuration['SubnetMask']}
+ Set Suite Variable ${eth0_gateway} ${network_configuration['Gateway']}
+ BREAK
+ END
END