'Check IPv6 address exist'

def is_ipv6_exist(self, addr, masklen):

    addrs = self.intf_info['am6CfgAddr']
    if (not addrs):
        return False
    for address in addrs:
        if (address['ifIp6Addr'] == addr.upper()):
            if ((address['addrPrefixLen'] == masklen) and (address['addrType6'] == 'global')):
                return True
            else:
                self.module.fail_json(msg='Error:    Input    IPv6    address    or    mask    is    invalid.')
    return False
