Added test verify dhcpv4 in presence of static ipv6 on eth1
Changes:
- Added the test case:
Verify Eth1 DHCPv4 Functions Properly In The Presence Of Static IPv6
Tested:
Ran and Tested on BMC Environment.
Change-Id: Ic4dffa23e8258262da4e29af32fa899e34b96149
Signed-off-by: Abhijith Naik <Abhijith.Naik@ibm.com>
diff --git a/lib/bmc_network_utils.robot b/lib/bmc_network_utils.robot
index 2a59ff6..06f617a 100644
--- a/lib/bmc_network_utils.robot
+++ b/lib/bmc_network_utils.robot
@@ -993,3 +993,20 @@
Should Be Equal ${status} ${True}
... msg=Not allowing the configuration of a valid MAC.
END
+
+
+Set DHCPEnabled To Enable Or Disable
+ [Documentation] Enable or Disable DHCP on the interface.
+ [Arguments] ${dhcp_enabled}=${False} ${interface}=${ethernet_interface}
+ ... ${valid_status_code}=[${HTTP_OK},${HTTP_ACCEPTED},${HTTP_NO_CONTENT}]
+
+ # Description of argument(s):
+ # dhcp_enabled False for disabling DHCP and True for Enabling DHCP.
+ # interface eth0 or eth1. Default is eth1.
+ # valid_status_code Expected valid status code from Patch request.
+ # Default is HTTP_OK.
+
+ ${data}= Set Variable If ${dhcp_enabled} == ${False} ${DISABLE_DHCP} ${ENABLE_DHCP}
+ ${resp}= Redfish.Patch
+ ... /redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/${interface}
+ ... body=${data} valid_status_codes=${valid_status_code}
\ No newline at end of file