Retrieve the default adapter
161007
def DefaultAdapter(self):
    '''
    '''
    default_adapter = None

    for obj in mockobject.objects.keys():
        if obj.startswith('/org/bluez/') and 'dev_' not in obj:
            default_adapter = obj

    if default_adapter:
        return dbus.ObjectPath(default_adapter, variant_level=1)
    else:
        raise dbus.exceptions.DBusException(
            'No such adapter.', name='org.bluez.Error.NoSuchAdapter')
487128
def get_default_config(self):
        
        config = super(OpenvzCollector, self).get_default_config()
        config.update({
            'path': 'openvz',
            'bin': '/usr/sbin/vzlist',
            'keyname': 'hostname'
        })
        return config
101753
private function getDefaultCacheAdapter()
    {
        return new FileSystemCacheAdapter(
            $this->config->getCachePath(),
            $this->config->getFileLock(),
            $this->config->getMinCacheFileSize()
        );
    }
1367800
def GetDefault(self, fd=None, default=None):
    """"""
    if callable(self.default):
      return self.default(fd)

    if self.default is not None:
      # We can't return mutable objects here or the default might change for all
      # objects of this class.
      if isinstance(self.default, rdfvalue.RDFValue):
        default = self.default.Copy()
        default.attribute_instance = self
        return self(default)
      else:
        return self(self.default)

    if isinstance(default, rdfvalue.RDFValue):
      default = default.Copy()
      default.attribute_instance = self

    return default
899139
def adapters(self):
        
        # We do here some lazy loading.
        if not self._adapters:
            self._adapters = AdapterManager(self)
        return self._adapters
536580
def get_default_config(self):
        
        config = super(VMStatCollector, self).get_default_config()
        config.update({
            'path':     'vmstat'
        })
        return config
1314546
def get_default_config(self):
        
        config = super(OneWireCollector, self).get_default_config()
        config.update({
            'path': 'owfs',
            'owfs': '/mnt/1wire',
            # 'scan': {'temperature': 't'},
            # 'id:24.BB000000': {'file_with_value': 'alias'},
        })
        return config
189907
def get_default_config(self):
        
        config = super(NullHandler, self).get_default_config()

        config.update({
        })

        return config
571632
public function getAdapterType()
  {
    if($this->adapter instanceof Adapter)
    {
      $string = Str::factory(get_class($this->adapter));

      return $string->substr($string->findLast("_"))->replace(array("_", " "), "")->toString();
    }

    return "Unknown";
  }
690728
def get_default_config(self):
        
        config = super(KVMCollector, self).get_default_config()
        config.update({
            'path': 'kvm',
        })
        return config
716047
function loadAdapter(type, location) {
    var options = adapterConfig[type];
    try {
        var modulePath = adapterModulePath(type, options);

        global.JuttleAdapterAPI = JuttleAdapterAPI;

        var start = new Date();

        if (!options.builtin) {
            checkCompatible(type, modulePath, location);
        }

        var init = require(modulePath);

        var loaded = new Date();
        var adapter = init(options);

        global.JuttleAdapterAPI = undefined;

        if (adapter.name !== type) {
            throw new Error('adapter name ', adapter.name, ' != type ', type);
        }
        var initialized = new Date();

        logger.debug(adapter.name, 'adapter loaded in', (loaded - start), 'ms,',
                     'initialized in', (initialized - loaded), 'ms');

        register(adapter.name, adapter);

        return adapter;
    } catch (err) {
        logger.error('error loading adapter ' + type + ': ' + err.message);
        throw err;
    }
}
693162
public function getAdapter()
    {
        if (!$this->adapter) {
            throw new Exception\RuntimeException(sprintf(
                '"%s" unable to load adapter; adapter not found',
                __METHOD__
            ));
        }
        if (method_exists($this->adapter, 'setOptions')) {
            $this->adapter->setOptions($this->getAdapterOptions());
        }

        return $this->adapter;
    }
762270
def get_default_config(self):
        
        config = super(InterruptCollector, self).get_default_config()
        config.update({
            'path':     'interrupts'
        })
        return config
1349878
public function getAdapter()
    {
        if (null == $this->adapter) {
            $className = $this->getEntityDescriptor()->className();
            $repository = Orm::getRepository($className);
            $this->setAdapter($repository->getAdapter());
        }
        return $this->adapter;
    }
635843
public function getAdapter()
    {
        $className = $this->app->make('config')->get('antares/logger::adapter.default.model');
        return $this->app->make($className);
    }
890542
def get_default(self):
    

    if self.default is not NotImplemented:
      return self.default
    elif self.default_factory is not None:
      return self.default_factory()
    else:
      raise RuntimeError('{0!r} has no default value'.format(self.full_name))
921121
def get_default_config(self):
        
        config = super(SmartCollector, self).get_default_config()
        config.update({
            'path': 'smart',
            'bin': 'smartctl',
            'use_sudo':         False,
            'sudo_cmd':         '/usr/bin/sudo',
            'devices': '^disk[0-9]$|^sd[a-z]$|^hd[a-z]$',
        })
        return config