Test IP and Netmask configured on BMC
Changes:
- Added test case to verify IP and netmask.
- Added Keyword for validation.
Tested: On Master
Change-Id: I67bf3e6e814b8db6c6deb58491de55a04ae37c36
Signed-off-by: Prashanth Katti <prkatti1@in.ibm.com>
diff --git a/redfish/managers/test_bmc_network_conf.robot b/redfish/managers/test_bmc_network_conf.robot
index f0593d9..5e4b70c 100644
--- a/redfish/managers/test_bmc_network_conf.robot
+++ b/redfish/managers/test_bmc_network_conf.robot
@@ -41,6 +41,14 @@
${macaddr}= Get From Dictionary ${resp.dict} MACAddress
Validate MAC On BMC ${macaddr}
+Verify All Configured IP And Netmask
+ [Documentation] Verify all configured IP and netmask on BMC.
+ [Tags] Verify_All_Configured_IP_And_Netmask
+
+ : FOR ${network_configuration} IN @{network_configurations}
+ \ Verify IP And Netmask On BMC ${network_configuration['Address']}
+ ... ${network_configuration['SubnetMask']}
+
*** Keywords ***
Test Setup Execution
@@ -135,6 +143,21 @@
... Should Contain ${route_info} ${gateway_ip}
... msg=Gateway IP address not matching.
+Verify IP And Netmask On BMC
+ [Documentation] Verify IP and netmask on BMC.
+ [Arguments] ${ip} ${netmask}
+
+ # Description of the argument(s):
+ # ip IP address to be verified.
+ # netmask netmask value to be verified.
+
+ ${prefix_length}= Netmask Prefix Length ${netmask}
+ @{ip_data}= Get BMC IP Info
+
+ ${ip_with_netmask}= Catenate ${ip}/${prefix_length}
+ Should Contain ${ip_data} ${ip_with_netmask}
+ ... msg=IP and netmask pair does not exist.
+
Test Teardown Execution
[Documentation] Test teardown execution.