Return dictionary of Interface Configuration (ifconfig).
        
        @return: Dictionary of if configurations keyed by if name.
767812
def getIfConfig(self):
        
        conf = {}
        try:
            out = subprocess.Popen([ipCmd, "addr", "show"], 
                                   stdout=subprocess.PIPE).communicate()[0]
        except:
            raise Exception('Execution of command %s failed.' % ipCmd)
        for line in out.splitlines():
            mobj = re.match('^\d+: (\S+):\s+<(\S*)>\s+(\S.*\S)\s*$', line)
            if mobj:
                iface = mobj.group(1)
                conf[iface] = {}
                continue
            mobj = re.match('^\s{4}link\/(.*\S)\s*$', line)
            if mobj:
                arr = mobj.group(1).split()
                if len(arr) > 0:
                    conf[iface]['type'] = arr[0]
                if len(arr) > 1:
                    conf[iface]['hwaddr'] = arr[1]
                continue
            mobj = re.match('^\s+(inet|inet6)\s+([\d\.\:A-Za-z]+)\/(\d+)($|\s+.*\S)\s*$', line)
            if mobj:
                proto = mobj.group(1)
                if not conf[iface].has_key(proto):
                    conf[iface][proto] = []
                addrinfo = {}
                addrinfo['addr'] = mobj.group(2).lower()
                addrinfo['mask'] = int(mobj.group(3))
                arr = mobj.group(4).split()
                if len(arr) > 0 and arr[0] == 'brd':
                    addrinfo['brd'] = arr[1]
                conf[iface][proto].append(addrinfo)
                continue
        return conf
1328936
def getConfig(self, type='online', format='elegant'):
        
        return list(list(self.dumpConfigDict[type](format).values())[0].values())[0]
1203081
def _parse_local_interface(self, config):
        
        match = re.search(r'local-interface (\w+)', config)
        value = match.group(1) if match else None
        return dict(local_interface=value)
674059
def configuration(self):
        ''''''
        with self._mutex:
            if not self._configuration:
                self._configuration = utils.nvlist_to_dict(self._obj.get_configuration())
        return self._configuration
729313
private Configuration getConfigurationInternal(final String[] keys) {

		Configuration conf = new Configuration();

		synchronized (this.confData) {

			final Iterator<String> it = this.confData.keySet().iterator();

			while (it.hasNext()) {

				final String key = it.next();
				boolean found = false;
				if (keys != null) {
					for (int i = 0; i < keys.length; i++) {
						if (key.equals(keys[i])) {
							found = true;
							break;
						}
					}

					if (found) {
						conf.setString(key, this.confData.get(key));
					}
				} else {
					conf.setString(key, this.confData.get(key));
				}
			}
		}

		return conf;
	}
23905
def get_override_configuration(self):
        
        res = {}
        properties = self.__class__.properties
        for prop, entry in list(properties.items()):
            if entry.override:
                res[prop] = getattr(self, prop)
        return res
324351
def get_interfaces(self):
        """"""
        result = {}

        interfaces = junos_views.junos_iface_table(self.device)
        interfaces.get()

        # convert all the tuples to our pre-defined dict structure
        for iface in interfaces.keys():
            result[iface] = {
                'is_up': interfaces[iface]['is_up'],
                'is_enabled': interfaces[iface]['is_enabled'],
                'description': (interfaces[iface]['description'] or u''),
                'last_flapped': float((interfaces[iface]['last_flapped'] or -1)),
                'mac_address': napalm_base.helpers.convert(
                    napalm_base.helpers.mac,
                    interfaces[iface]['mac_address'],
                    py23_compat.text_type(interfaces[iface]['mac_address'])),
                'speed': -1
            }
            # result[iface]['last_flapped'] = float(result[iface]['last_flapped'])

            match = re.search(r'(\d+)(\w*)', interfaces[iface]['speed'] or u'')
            if match is None:
                continue
            speed_value = napalm_base.helpers.convert(int, match.group(1), -1)
            if speed_value == -1:
                continue
            speed_unit = match.group(2)
            if speed_unit.lower() == 'gbps':
                speed_value *= 1000
            result[iface]['speed'] = speed_value

        return result
850451
def conf_sets(self):
        ''''''
        with self._mutex:
            if not self._conf_sets:
                self._parse_configuration()
        return self._conf_sets
788730
def as_dict(self, use_preliminary=False):
        
        config = dict()
        for key in self.config.keys:
            if use_preliminary and key in self.preliminary_config:
                value = self.preliminary_config[key]
            else:
                value = self.config.get_config_value(key)
            config[key] = value
        return config
1150912
def config(self):
        

        return dict((optname, getattr(self, optname))
                    for optname, _ in CFG_OPTIONS if hasattr(self, optname))
483191
def hwaddr_interfaces():
    '''
    
    '''
    # Provides:
    #   hwaddr_interfaces
    ret = {}
    ifaces = _get_interfaces()
    for face in ifaces:
        if 'hwaddr' in ifaces[face]:
            ret[face] = ifaces[face]['hwaddr']
    return {'hwaddr_interfaces': ret}
387769
def config(self):
        
        return {
            key: self.__dict__[key]
            for key in dir(self)
            if key.isupper()
        }
542673
def get_config(self):
        ''
        return (self.bus.read_byte_data(self.address, self.CONTROL_PORT0), self.bus.read_byte_data(self.address, self.CONTROL_PORT1));
745951
@SuppressWarnings("unchecked")
    public Dictionary<String, String> updateDictionaryConfig(Dictionary<String, String> dictionary, boolean returnCopy)
    {
        if (returnCopy)
            dictionary = BaseBundleActivator.putAll(dictionary, null);
        if (dictionary == null)
            dictionary = new Hashtable<String, String>();
        try {
            String servicePid = dictionary.get(BundleConstants.SERVICE_PID);
            if (servicePid != null)
            {
                ServiceReference caRef = context.getServiceReference(ConfigurationAdmin.class.getName());
                if (caRef != null)
                {
                    ConfigurationAdmin configAdmin = (ConfigurationAdmin)context.getService(caRef);
                    Configuration config = configAdmin.getConfiguration(servicePid);

                    configProperties = config.getProperties();
                    if (configProperties == null)
                        configProperties = new Hashtable<String, String>();
                    // First, move all settings to dictionary
                    dictionary = BaseBundleActivator.putAll(configProperties, dictionary);
                    dictionary.put(BaseWebappServlet.ALIAS, this.calculateWebAlias(dictionary));
                    // Next, move all saveable settings to the config dictionary (and save them)
                    Enumeration<String> keys = dictionary.keys();
                    while (keys.hasMoreElements())
                    {
                        String key = keys.nextElement();
                        if (isPersistentProperty(key))
                            configProperties.put(key, dictionary.get(key)); // Make sure all the fully qualified keys are persisted
                    }
                    // push the configuration dictionary to the ConfigAdminService
                    config.update(configProperties);
                }
            }
            if (dictionary.get(BaseWebappServlet.ALIAS) == null)
                dictionary.put(BaseWebappServlet.ALIAS, this.calculateWebAlias(dictionary));
        } catch (IOException e) {
            e.printStackTrace();
        }
        return dictionary;
    }
73695
def as_dict(self):
        
        #TODO/FIXME: add selected information
        if self.hidden:
            rdict = {}
        else:
            def_selected = self.selected()
            comps = [
                {
                    'name': comp.name,
                    'default': comp.name in self.defaults,
                    'options': comp.get_ordered_options() if isinstance(comp, Optionable) else None
                }
                for comp in self
            ]
            rdict = {
                'name': self.name,
                'required': self.required,
                'multiple': self.multiple,
                'args': self.in_name,
                'returns': self.out_name,
                'components': comps
            }
        return rdict
407178
def get_configuration():
    
    root = getLogger()
    name_levels = [('', logging.getLevelName(root.level))]
    name_levels.extend(
        (name, logging.getLevelName(logger.level))
        for name, logger
        in root.manager.loggerDict.items()
        if hasattr(logger, 'level')
    )

    config_string = ','.join('%s:%s' % x for x in name_levels)

    return dict(config_string=config_string, log_json=SLogger.manager.log_json)
774826
private Dictionary<String,String> getConfiguration() {
        Dictionary<String,String> config = new Hashtable<String,String>();
        for (ConfigKey key : ConfigKey.values()) {
            String value = getConfiguration(key);
            if (value != null) {
                config.put(key.getKeyValue(),value);
            }
        }
        String jolokiaId = NetworkUtil.replaceExpression(config.get(ConfigKey.AGENT_ID.getKeyValue()));
        if (jolokiaId == null) {
            config.put(ConfigKey.AGENT_ID.getKeyValue(),
                       NetworkUtil.getAgentId(hashCode(),"osgi"));
        }
        config.put(ConfigKey.AGENT_TYPE.getKeyValue(),"osgi");
        return config;
    }