Added testcases verify network response when Host is up and running.
Change-Id: I0f96a3a44bfb3d40d9a19625b6a9a24d6db4c71d
Signed-off-by: Anves Kumar rayankula <anvesr77@in.ibm.com>
diff --git a/redfish/managers/test_bmc_network_conf.robot b/redfish/managers/test_bmc_network_conf.robot
index c51a1f1..ea4fc73 100644
--- a/redfish/managers/test_bmc_network_conf.robot
+++ b/redfish/managers/test_bmc_network_conf.robot
@@ -615,6 +615,16 @@
Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
... body=&{payload} valid_status_codes=[${HTTP_BAD_REQUEST}]
+
+Test Network Response On Specified Host State
+ [Documentation] Verifying the BMC network response when host is on and off.
+ [Tags] Test_Network_Response_On_Specified_Host_State
+ [Template] Verify Network Response On Specified Host State
+
+ # host_state
+ on
+ off
+
*** Keywords ***
Test Setup Execution
@@ -837,3 +847,24 @@
Delete IP Address ${ip}
END
Validate Network Config On BMC
+
+Verify Network Response On Specified Host State
+ [Documentation] Verifying the BMC network response when host is on and off.
+ [Arguments] ${host_state}
+
+ # Description of argument(s):
+ # host_state if host_state is on then host is booted to operating system.
+ # if host_state is off then host is power off.
+ # (eg. on, off).
+
+ ${active_channel_config}= Get Active Channel Config
+ ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
+
+ Run Keyword If '${host_state}' == 'on'
+ ... Redfish Power On stack_mode=skip
+ ... ELSE
+ ... Redfish Power off stack_mode=skip
+
+ Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
+ Ping Host ${OPENBMC_HOST}
+