'Given a list of resources, retrieve the default quotas.
Use the class quotas named `_DEFAULT_QUOTA_NAME` as default quotas,
if it exists.
:param context: The request context, for access checks.
:param resources: A dictionary of the registered resources.
:param project_id: The id of the current project'

def get_defaults(self, context, resources, project_id=None):

    quotas = {}
    default_quotas = {}
    if CONF.use_default_quota_class:
        default_quotas = db.quota_class_get_defaults(context)
    for resource in resources.values():
        if default_quotas:
            if (resource.name not in default_quotas):
                versionutils.report_deprecated_feature(LOG, (_('Default    quota    for    resource:    %(res)s    is    set    by    the    default    quota    flag:    quota_%(res)s,    it    is    now    deprecated.    Please    use    the    default    quota    class    for    default    quota.') % {'res': resource.name}))
        quotas[resource.name] = default_quotas.get(resource.name, resource.default)
    return quotas
