Fix deprecated Exit For Loop builtin for IPMI
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: I25903fb2937325b5c78ba412b44c16d6e9e1558a
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/ipmi/test_ipmi_network_configuration.robot b/ipmi/test_ipmi_network_configuration.robot
index 6fe622b..0861bc0 100644
--- a/ipmi/test_ipmi_network_configuration.robot
+++ b/ipmi/test_ipmi_network_configuration.robot
@@ -205,7 +205,7 @@
[Documentation] Restore the configuration to its pre-test state.
${length}= Get Length ${initial_lan_config}
- Return From Keyword If ${length} == ${0}
+ IF ${length} == ${0} RETURN
Set IPMI Inband Network Configuration ${ip_address} ${subnet_mask}
... ${initial_lan_config['Default Gateway IP']} login=${0}
@@ -227,9 +227,10 @@
@{network_configurations}= Get Network Configuration
FOR ${network_configuration} IN @{network_configurations}
- Run Keyword If '${network_configuration['Address']}' == '${ip_address}'
- ... Run Keywords Set Suite Variable ${subnet_mask} ${network_configuration['SubnetMask']} AND
- ... Exit For Loop
+ IF '${network_configuration['Address']}' == '${ip_address}'
+ Set Suite Variable ${subnet_mask} ${network_configuration['SubnetMask']}
+ BREAK
+ END
END
Test Teardown Execution