'Get specific quota by project or default quota if doesn\'t exists.'

def get_by_project_or_default(self, context, project_id, resource_name):

    try:
        val = self.get_by_project(context, project_id, resource_name).hard_limit
    except exception.ProjectQuotaNotFound:
        val = self.get_defaults(context, project_id)[resource_name]
    return val
