Verify IPMI commands can run when multiple IP addresses are configured.

Resolves openbmc/openbmc-test-automation#1269

Change-Id: Idfe6b6f64bed8a8937b854f5a63c4a475cf279f0
Signed-off-by: manasarm <manashsarma@in.ibm.com>
diff --git a/extended/test_network.robot b/extended/test_network.robot
index 6008e65..cfa25ef 100644
--- a/extended/test_network.robot
+++ b/extended/test_network.robot
@@ -1,6 +1,7 @@
 *** Settings ***
 Documentation  Network interface and functionalities test module on BMC.
 
+Resource  ../lib/ipmi_client.robot
 Resource  ../lib/rest_client.robot
 Resource  ../lib/utils.robot
 Resource  ../lib/bmc_network_utils.robot
@@ -21,6 +22,8 @@
 # our network, so this is chosen to avoid IP conflict.
 
 ${valid_ip}          10.6.6.6
+${valid_ip2}         10.6.6.7
+@{valid_ips}         ${valid_ip}  ${valid_ip2}
 ${valid_gateway}     10.6.6.1
 ${valid_prefix_len}  ${24}
 ${broadcast_ip}      10.6.6.255
@@ -389,8 +392,33 @@
     ${hostname}=  Read Attribute  ${NETWORK_MANAGER}/config  HostName
     Validate Hostname On BMC  ${hostname}
 
+Run IPMI With Multiple IPs Configured
+    [Documentation]  Test out-of-band IPMI command with multiple IPs configured.
+    [Tags]  Run_IPMI_With_Multiple_IPs_Configured
+    [Teardown]  Clear IP Address
+
+    # Configure two IPs and verify.
+
+    :FOR  ${loc_valid_ip}  IN  @{valid_ips}
+    \  Configure Network Settings  ${loc_valid_ip}  ${valid_prefix_len}
+    \  ...  ${valid_gateway}  valid
+
+    @{ip_uri_list}=  Get IPv4 URI List
+    @{ip_list}=  Get List Of IP Address Via REST  @{ip_uri_list}
+
+    List Should Contain Sub List  ${ip_list}  ${valid_ips}
+    ...  msg=IP address is not configured.
+
+    Run External IPMI Standard Command  chassis bootparam get 5
+
 *** Keywords ***
 
+Clear IP Address
+    [Documentation]  Delete the IPs
+    @{ip_uri_list}=  Get IPv4 URI List
+    :FOR  ${loc_valid_ip}  IN  @{valid_ips}
+    \  Delete IP And Object  ${loc_valid_ip}  @{ip_uri_list}
+
 Test Setup Execution
     [Documentation]  Network setup.
     Open Connection And Login