GUI: Verify coexitence of Static IPv6 and Linklocal

    Changes:
        Added test case for coexistence of static and linklocal

    Tested:
        Ran and tested on BMC Environment.

Change-Id: I2ca5de9b64528a1d678f970a26868c2351cfa3b0
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/lib/bmc_ipv6_utils.robot b/lib/bmc_ipv6_utils.robot
index 8e27824..5854029 100644
--- a/lib/bmc_ipv6_utils.robot
+++ b/lib/bmc_ipv6_utils.robot
@@ -87,3 +87,29 @@
     ...  /sbin/ip -6 route
 
     RETURN  ${cmd_output}
+
+
+Get Address Origin List And Address For Type
+    [Documentation]  Get address origin list and address for type.
+    [Arguments]  ${ipv6_address_type}
+
+    # Description of the argument(s):
+    # ipv6_address_type  Type of IPv6 address to be checked.
+
+    ${active_channel_config}=  Get Active Channel Config
+    ${ethernet_interface}=  Set Variable  ${active_channel_config['${CHANNEL_NUMBER}']['name']}
+    ${resp}=  Redfish.Get  ${REDFISH_NW_ETH_IFACE}${active_channel_config['${CHANNEL_NUMBER}']['name']}
+    @{ipv6_addresses}=  Get From Dictionary  ${resp.dict}  IPv6Addresses
+
+    ${ipv6_addressorigin_list}=  Create List
+    ${ipv6_slaac_addr}=  Set Variable  ${None}
+    FOR  ${ipv6_address}  IN  @{ipv6_addresses}
+        ${ipv6_addressorigin}=  Get From Dictionary  ${ipv6_address}  AddressOrigin
+        Append To List  ${ipv6_addressorigin_list}  ${ipv6_addressorigin}
+        IF  '${ipv6_addressorigin}' == '${ipv6_address_type}'
+            Set Test Variable  ${ipv6_type_addr}  ${ipv6_address['Address']}
+        END
+    END
+    Should Contain  ${ipv6_addressorigin_list}  ${ipv6_address_type}
+    Should Not Be Empty  ${ipv6_type_addr}  msg=${ipv6_address_type} address is not present
+    RETURN  @{ipv6_addressorigin_list}  ${ipv6_type_addr}