'Retrieves UUID of project based on its name.
:param name: name of project
:returns: UUID of project
:raises CoprHdError: - when project name is not found'

def project_query(self, name):

    if common.is_uri(name):
        return name
    (tenant_name, project_name) = common.get_parent_child_from_xpath(name)
    tenant_obj = tenant.Tenant(self.ipaddr, self.port)
    tenant_uri = tenant_obj.tenant_query(tenant_name)
    projects = self.project_list(tenant_uri)
    if projects:
        for project in projects:
            if project:
                project_detail = self.project_show_by_uri(project['id'])
                if (project_detail and (project_detail['name'] == project_name)):
                    return project_detail['id']
    raise common.CoprHdError(common.CoprHdError.NOT_FOUND_ERR, (_('Project:    %s    not    found') % project_name))
