Script fix for test_bmc_network_conf.robot file
Changes:
- Added sleep 3 sec Configure Static Name Servers keyword
- Added Wait Until Keyword Succeeds.
- Created a new keyword CLI Get and Verify Name Servers in
bmc_network_utils.robot.
Tested:
- Ran redfish/managers/test_bmc_network_conf.robot successfully.
Change-Id: Ieec8b1d65e374da73adcccebbdc310e8ba5703bf
Signed-off-by: KothaiSrini <kothais@ami.com>
diff --git a/lib/bmc_network_utils.robot b/lib/bmc_network_utils.robot
index 698809c..772b892 100644
--- a/lib/bmc_network_utils.robot
+++ b/lib/bmc_network_utils.robot
@@ -418,6 +418,21 @@
[Return] ${nameservers}
+CLI Get and Verify Name Servers
+ [Documentation] Get and Verify the nameserver IPs from /etc/resolv.conf and compare with redfish nameserver.
+ [Arguments] ${static_name_servers}
+ ... ${valid_status_codes}=${HTTP_OK}
+
+ # Description of Argument(s):
+ # static_name_servers: Address for static name server
+
+ ${cli_nameservers}= CLI Get Nameservers
+ ${cmd_status}= Run Keyword And Return Status
+ ... List Should Contain Sub List ${cli_nameservers} ${static_name_servers}
+
+ Run Keyword If '${valid_status_codes}' == '${HTTP_OK}'
+ ... Should Be True ${cmd_status}
+ ... ELSE Should Be True ${cmd_status}
Get Network Configuration
[Documentation] Get network configuration.