Added New VMI Testcase
Changes:
- Added new code "Enable DHCP When Host Poweroff And Verify On Poweron"
Tested:
- Ran successfully test_vmi.robot
Change-Id: I81a3d8c76bc8a67ec811f9f0afb6c478356a2e65
Signed-off-by: Megha G N <Megha.G.N@ibm.com>
diff --git a/openpower/ext_interfaces/test_vmi.robot b/openpower/ext_interfaces/test_vmi.robot
index 25b9d2f..1b9f5f0 100644
--- a/openpower/ext_interfaces/test_vmi.robot
+++ b/openpower/ext_interfaces/test_vmi.robot
@@ -29,6 +29,8 @@
&{DISABLE_DHCP} DHCPv4=&{DHCP_DISABLED}
${wait_time} 10s
+${default} 0.0.0.0
+
*** Test Cases ***
@@ -130,7 +132,6 @@
Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED}
Redfish Power Off stack_mode=skip
Redfish Power On
- ${default}= Set Variable 0.0.0.0
Verify VMI Network Interface Details ${default} DHCP ${default} ${default}
# Verifying persistency of static address.
@@ -262,7 +263,6 @@
Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask}
Set VMI IPv4 Origin ${True}
- ${default}= Set Variable 0.0.0.0
Verify VMI Network Interface Details ${default} DHCP ${default} ${default}
@@ -409,7 +409,6 @@
[Tags] Enable_And_Disable_DHCP_And_Verify
Set VMI IPv4 Origin ${True}
- ${default}= Set Variable 0.0.0.0
Verify VMI Network Interface Details ${default} DHCP ${default} ${default}
Set VMI IPv4 Origin ${False}
Verify VMI Network Interface Details ${default} Static ${default} ${default}
@@ -420,7 +419,6 @@
... each time when DHCP is enabled
[Tags] Multiple_Times_Enable_And_Disable_DHCP_And_Verify
- ${default}= Set Variable 0.0.0.0
FOR ${i} IN RANGE ${2}
Set VMI IPv4 Origin ${True}
Verify VMI Network Interface Details ${default} DHCP ${default} ${default}
@@ -452,6 +450,17 @@
${test_ipv4} 10.3.36.-10 ${test_netmask} ${HTTP_BAD_REQUEST}
+Enable DHCP When Host Is Off And Verify After Poweron
+ [Documentation] Enable DHCP when host is off and
+ ... check whether it is enabled after poweron.
+ [Tags] Enable_DHCP_When_Host_Is_Off_And_Verify_After_Poweron
+ [Setup] Redfish Power Off stack_mode=skip
+
+ Set VMI IPv4 Origin ${True}
+ Redfish Power On stack_mode=skip
+ Verify VMI Network Interface Details ${default} DHCP ${default} ${default}
+
+
*** Keywords ***
Suite Setup Execution
@@ -506,7 +515,6 @@
${dhcp_mode_before}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled
${dhcp_enabled}= Set Variable If ${dhcp_mode_before} == ${False} ${True} ${False}
- ${default}= Set Variable 0.0.0.0
${origin}= Set Variable If ${dhcp_mode_before} == ${False} DHCP Static
Set VMI IPv4 Origin ${dhcp_enabled} ${HTTP_ACCEPTED}