'This function will return consistency group id.
:param name: Name/id of the consistency group
:param project: Name of the project
:param tenant: Name of the tenant
:returns: id of the consistency group'

def consistencygroup_query(self, name, project, tenant):

    if common.is_uri(name):
        return name
    uris = self.list(project, tenant)
    for uri in uris:
        congroup = self.show(uri, project, tenant)
        if (congroup and (congroup['name'] == name)):
            return congroup['id']
    raise common.CoprHdError(common.CoprHdError.NOT_FOUND_ERR, (_('Consistency    Group    %s:    not    found') % name))
