Adding a test case to enable DHCPv6

    Changes:
        - Added a keyword for Enabling/ Disabling DHCPv6
        - Added a test case to enable DHCPv6

    Tested:
        Ran and tested on BMC Environment

Change-Id: I960ce48345d7a837d23dc02a9edac3a298f786b9
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/redfish/managers/test_bmc_ipv6.robot b/redfish/managers/test_bmc_ipv6.robot
index a970936..ce2d0a0 100644
--- a/redfish/managers/test_bmc_ipv6.robot
+++ b/redfish/managers/test_bmc_ipv6.robot
@@ -114,6 +114,13 @@
     Set SLAACv6 Configuration State And Verify  ${True}
 
 
+Enable DHCPv6 Property On BMC And Verify
+    [Documentation]  Enable DHCPv6 property on BMC and verify.
+    [Tags]  Enable_DHCPv6_Property_On_BMC_And_Verify
+
+    Set And Verify DHCPv6 Property  Enabled
+
+
 *** Keywords ***
 
 Suite Setup Execution
@@ -493,3 +500,22 @@
 
     Run Keyword If  '${slaac_verify['IPv6AutoConfigEnabled']}' != '${slaac_state}'
     ...  Fail  msg=SLAACv6 not set properly.
+
+Set And Verify DHCPv6 Property
+    [Documentation]  Set DHCPv6 attribute and verify.
+    [Arguments]  ${dhcpv6_operating_mode}=${Disabled}
+
+    # Description of argument(s):
+    # dhcpv6_operating_mode    Enabled if user wants to enable DHCPv6('Enabled' or 'Disabled').
+
+    ${data}=  Set Variable If  '${dhcpv6_operating_mode}' == 'Disabled'  ${DISABLE_DHCPv6}  ${ENABLE_DHCPv6}
+    ${active_channel_config}=  Get Active Channel Config
+    ${ethernet_interface}=  Set Variable  ${active_channel_config['${CHANNEL_NUMBER}']['name']}
+
+    Redfish.Patch  ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
+    ...  body=${data}  valid_status_codes=[${HTTP_OK},${HTTP_NO_CONTENT}]
+
+    ${resp}=  Redfish.Get  ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
+    ${dhcpv6_verify}=  Get From Dictionary  ${resp.dict}  DHCPv6
+
+    Should Be Equal  '${dhcpv6_verify['OperatingMode']}'  '${dhcpv6_operating_mode}'