Added vmi multiple interface testcases
-Configure_VMI_First_Interface_In_Static_And_Second_In_Dynamic_And_Verify
-Configure_VMI_First_Interface_In_Dynamic_And_Second_In_Static_And_Verify
-copied Variables from vmi suite to library
Change-Id: Ibf86bb07baae38776408ba873c5e95460297d615
Signed-off-by: shrsuman123 <shrsuman@in.ibm.com>
diff --git a/lib/external_intf/vmi_utils.robot b/lib/external_intf/vmi_utils.robot
index e3f400a..fddafd7 100644
--- a/lib/external_intf/vmi_utils.robot
+++ b/lib/external_intf/vmi_utils.robot
@@ -11,6 +11,12 @@
*** Variables ***
+&{DHCP_ENABLED} DHCPEnabled=${True}
+&{DHCP_DISABLED} DHCPEnabled=${False}
+
+&{ENABLE_DHCP} DHCPv4=&{DHCP_ENABLED}
+&{DISABLE_DHCP} DHCPv4=&{DHCP_DISABLED}
+
${wait_time} 10s
*** Keywords ***
diff --git a/openpower/ext_interfaces/test_vmi_multiple_interfaces.robot b/openpower/ext_interfaces/test_vmi_multiple_interfaces.robot
index 834cecf..723101d 100644
--- a/openpower/ext_interfaces/test_vmi_multiple_interfaces.robot
+++ b/openpower/ext_interfaces/test_vmi_multiple_interfaces.robot
@@ -57,6 +57,35 @@
Verify VMI Network Interface Details ${default} DHCP ${default} ${default}
Verify VMI Network Interface Details ${default} DHCP ${default} ${default} ${interface_list}[1]
+Configure VMI First Interface In Static And Second In Dynamic And Verify
+ [Documentation] Configure VMI first interface in static mode and second interface in dynamic mode
+ ... and verify first gets static ip details and second gets dynamic ip details.
+ [Tags] Configure_VMI_First_Interface_In_Static_And_Second_In_Dynamic_And_Verify
+ [Teardown] Run keywords Delete VMI IPv4 Address AND
+ ... Set VMI IPv4 Origin ${False} ${HTTP_ACCEPTED} ${interface_list}[1]
+ ... AND Test Teardown
+
+ Set Static IPv4 Address To VMI And Verify ${test_ipv4_1} ${test_gateway_1}
+ ... ${test_netmask_1}
+ Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED} ${interface_list}[1]
+ ${default}= Set Variable 0.0.0.0
+ Verify VMI Network Interface Details ${test_ipv4_1} Static ${test_gateway_1} ${test_netmask_1}
+ Verify VMI Network Interface Details ${default} DHCP ${default} ${default} ${interface_list}[1]
+
+Configure VMI First Interface In Dynamic And Second In Static And Verify
+ [Documentation] Configure VMI first interface in dynamic mode and second interface in static mode
+ ... and verify first gets dynamic ip details and second gets static ip details.
+ [Tags] Configure_VMI_First_Interface_In_Dynamic_And_Second_In_Static_And_Verify
+ [Teardown] Run keywords Set VMI IPv4 Origin ${False} AND
+ ... Delete VMI IPv4 Address IPv4StaticAddresses ${HTTP_ACCEPTED} ${interface_list}[1]
+ ... AND Test Teardown
+
+ Set VMI IPv4 Origin ${True}
+ ${default}= Set Variable 0.0.0.0
+ Set Static IPv4 Address To VMI And Verify ${test_ipv4_1} ${test_gateway_1}
+ ... ${test_netmask_1} ${HTTP_ACCEPTED} ${interface_list}[1]
+ Verify VMI Network Interface Details ${default} DHCP ${default} ${default}
+
*** Keywords ***
Suite Setup Execution