def is_neutron():
    legacy_class = oslo_config.cfg.CONF.network_api_class
    use_neutron = oslo_config.cfg.CONF.use_neutron

    if legacy_class not in (NEUTRON_NET_API, NOVA_NET_API):
        # Someone actually used this option, this gets a pass for now,
        # but will just go away once deleted.
        return None
    elif legacy_class == NEUTRON_NET_API and not use_neutron:
        # If they specified neutron via class, we should respect that
        LOG.warn(_LW("Config mismatch. The network_api_class specifies %s, "
                     "however use_neutron is not set to True. Using Neutron "
                     "networking for now, however please set use_neutron to "
                     "True in your configuration as network_api_class is "
                     "deprecated and will be removed."), legacy_class)
        return True
    elif use_neutron:
        return True
    else:
        return False
Returns the default object for usersettings.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/network/__init__.py/is_neutron--crossover with--dataset/ETHPy150Open mishbahr/django-usersettings2/usersettings/models.py/UserSettings.get_default