Return the configuration of the RPM probes.
551738
def get_probes_config(self):
        """"""
        probes = {}

        probes_table = junos_views.junos_rpm_probes_config_table(self.device)
        probes_table.get()
        probes_table_items = probes_table.items()

        for probe_test in probes_table_items:
            test_name = py23_compat.text_type(probe_test[0])
            test_details = {
                p[0]: p[1] for p in probe_test[1]
            }
            probe_name = napalm_base.helpers.convert(
                py23_compat.text_type, test_details.pop('probe_name'))
            target = napalm_base.helpers.convert(
                py23_compat.text_type, test_details.pop('target', ''))
            test_interval = napalm_base.helpers.convert(int, test_details.pop('test_interval', '0'))
            probe_count = napalm_base.helpers.convert(int, test_details.pop('probe_count', '0'))
            probe_type = napalm_base.helpers.convert(
                py23_compat.text_type, test_details.pop('probe_type', ''))
            source = napalm_base.helpers.convert(
                py23_compat.text_type, test_details.pop('source_address', ''))
            if probe_name not in probes.keys():
                probes[probe_name] = {}
            probes[probe_name][test_name] = {
                'probe_type': probe_type,
                'target': target,
                'source': source,
                'probe_count': probe_count,
                'test_interval': test_interval
            }

        return probes
12410
def _get_mtime():
    
    return os.path.exists(RPM_PATH) and int(os.path.getmtime(RPM_PATH)) or 0
1040114
def get_configuration(self):
        
        mapping = {}
        settings = self.get_settings()
        for service in self.context.getService():
            uid = api.get_uid(service)
            setting = settings.get(uid, {})
            config = {
                "hidden": setting.get("hidden", False),
            }
            mapping[uid] = config
        return mapping
975184
function _getConfig () {
    return {
      paced: paced,
      rate: rate,
      deterministic: deterministic,
      time: configuredTime,
      master: master,
      port: port
    }
  }
790309
def config(self):
        """"""
        if self._config:
            return self._config
        else:
            self._config = p_config.ProsperConfig(self.config_path)
            return self._config
986458
def drive_rotational_speed_rpm(self):
        """"""
        drv_rot_speed_rpm = set()
        for member in self.get_members():
            if member.rotational_speed_rpm is not None:
                drv_rot_speed_rpm.add(member.rotational_speed_rpm)
        return drv_rot_speed_rpm
1360432
def get_configuration(self):
        
        mapping = {}
        settings = self.get_settings()
        for record in self.context.getAnalyses():
            uid = record.get("service_uid")
            setting = settings.get(uid, {})
            config = {
                "partition": record.get("partition"),
                "hidden": setting.get("hidden", False),
            }
            mapping[uid] = config
        return mapping
649402
def get_default_config(self):
        
        config = super(IODriveSNMPCollector, self).get_default_config()
        config.update({
            'path':     'iodrive',
            'timeout':  15,
        })
        return config
377767
def probe_sync(self):
        """"""

        done = threading.Event()
        result = {}

        def probe_done(adapter_id, status, reason):
            result['success'] = status
            result['failure_reason'] = reason
            done.set()

        self.probe_async(probe_done)
        done.wait()

        return result
840748
def drive_rotational_speed_rpm(self):
        """"""

        drv_rot_speed_rpm = set()
        for member in self._drives_list():
            if member.rotation_speed_rpm is not None:
                drv_rot_speed_rpm.add(member.rotation_speed_rpm)
        return drv_rot_speed_rpm
885789
def get_default_config(self):
        
        config = super(ApcupsdCollector, self).get_default_config()
        config.update({
            'path':     'apcupsd',
            'hostname': 'localhost',
            'port': 3551,
            'metrics': ['LINEV', 'LOADPCT', 'BCHARGE', 'TIMELEFT', 'BATTV',
                        'NUMXFERS', 'TONBATT', 'MAXLINEV', 'MINLINEV',
                        'OUTPUTV', 'ITEMP', 'LINEFREQ', 'CUMONBATT', ],
        })
        return config
982008
def get_attached_pipettes(self):
        
        api = object.__getattribute__(self, '_api')
        instrs = {}
        for mount, data in api.attached_instruments.items():
            instrs[mount.name.lower()] = {
                'model': data.get('name', None),
                'id': data.get('pipette_id', None),
                'mount_axis': Axis.by_mount(mount),
                'plunger_axis': Axis.of_plunger(mount)
            }
            if data.get('name'):
                instrs[mount.name.lower()]['tip_length'] \
                    = data.get('tip_length', None)

        return instrs
559442
def clean_probes(self, probe_ids):
        
        if isinstance(probe_ids, (tuple, list)):  # tuples & lists > x,y,z
            probe_ids = ",".join([str(_) for _ in probe_ids])

        return probe_ids
13132
def get_config(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    if not conn:
        return None
    try:
        cc = conn.describe_cache_clusters(name,
                                          show_cache_node_info=True)
    except boto.exception.BotoServerError as e:
        msg = 'Failed to get config for cache cluster {0}.'.format(name)
        log.error(msg)
        log.debug(e)
        return {}
    cc = cc['DescribeCacheClustersResponse']['DescribeCacheClustersResult']
    cc = cc['CacheClusters'][0]
    ret = odict.OrderedDict()
    attrs = ['engine', 'cache_parameter_group', 'cache_cluster_id',
             'cache_security_groups', 'replication_group_id',
             'auto_minor_version_upgrade', 'num_cache_nodes',
             'preferred_availability_zone', 'security_groups',
             'cache_subnet_group_name', 'engine_version', 'cache_node_type',
             'notification_configuration', 'preferred_maintenance_window',
             'configuration_endpoint', 'cache_cluster_status', 'cache_nodes']
    for key, val in six.iteritems(cc):
        _key = boto.utils.pythonize_name(key)
        if _key not in attrs:
            continue
        if _key == 'cache_parameter_group':
            if val:
                ret[_key] = val['CacheParameterGroupName']
            else:
                ret[_key] = None
        elif _key == 'cache_nodes':
            if val:
                ret[_key] = [k for k in val]
            else:
                ret[_key] = []
        elif _key == 'cache_security_groups':
            if val:
                ret[_key] = [k['CacheSecurityGroupName'] for k in val]
            else:
                ret[_key] = []
        elif _key == 'configuration_endpoint':
            if val:
                ret['port'] = val['Port']
                ret['address'] = val['Address']
            else:
                ret['port'] = None
                ret['address'] = None
        elif _key == 'notification_configuration':
            if val:
                ret['notification_topic_arn'] = val['TopicArn']
            else:
                ret['notification_topic_arn'] = None
        else:
            ret[_key] = val
    return ret
1084604
def metrics(self):
        
        return dict(
            (name, getattr(Metrics, config['type']))
            for name, config in six.iteritems(self._metrics)
        )
66226
def configuration(*args, **kwargs):
    """"""
    try:
        config_kwargs = {'mapping_class': kwargs.pop('mapping_class')}
    except KeyError:
        config_kwargs = {}
    cm = ConfigurationManager(*args, **kwargs)
    return cm.get_config(**config_kwargs)
682994
def source(self):
        """"""
        if hasattr(self, 'srpm'):
            rpm = self.from_package(self.srpm)
            # Source RPMs don't have epoch for some reason
            rpm.epoch = self.epoch
            return rpm