(self, project_id, resource)
return quota
Retrieve Quota information for the given project_id.

        :param id: project id.
        :param resource: resource name.
Retrieve Quota information for the given project_id.
Retrieve Quota information for the given project_id .
def get_one(self, project_id, resource):
        """Retrieve Quota information for the given project_id.

        :param id: project id.
        :param resource: resource name.
        """
        context = pecan.request.context
        policy.enforce(context, 'quota:get', action='quota:get')

        if not context.is_admin and project_id != context.project_id:
            raise exception.NotAuthorized()

        try:
            quota = objects.Quota.get_quota_by_project_id_resource(context,
                                                                   project_id,
                                                                   resource)
            quota = Quota.convert(quota)
        except exception.QuotaNotFound:
            # If explicit quota was not set for the project, use default limit
            quota = Quota(project_id=project_id,
                          hard_limit=CONF.quotas.max_clusters_per_project)
        return quota
def get_one ( self , project_id , resource ) : context = pecan . request . context policy . enforce ( context , 'quota:get' , action = 'quota:get' ) if not context . is_admin and project_id != context . project_id : raise exception . NotAuthorized ( ) try : quota = objects . Quota . get_quota_by_project_id_resource ( context , project_id , resource ) quota = Quota . convert ( quota ) except exception . QuotaNotFound : # If explicit quota was not set for the project, use default limit quota = Quota ( project_id = project_id , hard_limit = CONF . quotas . max_clusters_per_project ) return quota