get_config implementation for FortiOS.
182102
def get_config(self, retrieve="all"):
        """"""
        get_startup = retrieve == "all" or retrieve == "startup"
        get_running = retrieve == "all" or retrieve == "running"
        get_candidate = retrieve == "all" or retrieve == "candidate"

        if retrieve == "all" or get_running:
            result = self._execute_command_with_vdom('show')
            text_result = '\n'.join(result)

            return {
                'startup': u"",
                'running': py23_compat.text_type(text_result),
                'candidate': u"",
            }

        elif get_startup or get_candidate:
            return {
                'startup': u"",
                'running': u"",
                'candidate': u"",
            }
854001
function getConfigSettings(packageJsonFile) {
  // Locate and read package.json
  const pkg = JSON.parse(fs.readFileSync(packageJsonFile));

  return {
    searchDir:
      getConfigSetting(pkg, 'searchDir', true) || getDefaultValue('searchDir'),
    outputFile:
      getConfigSetting(pkg, 'outputFile') || getDefaultValue('outputFile'),
    pattern: getConfigSetting(pkg, 'pattern') || getDefaultValue('pattern'),
  };
}
90519
def get_values(self, config_manager, ignore_mismatches, obj_hook=DotDict):
        """"""
        if self.delayed_parser_instantiation:
            try:
                app = config_manager._get_option('admin.application')
                source = "%s%s" % (app.value.app_name, file_name_extension)
                self.config_obj = configobj.ConfigObj(source)
                self.delayed_parser_instantiation = False
            except AttributeError:
                # we don't have enough information to get the ini file
                # yet.  we'll ignore the error for now
                return obj_hook()  # return empty dict of the obj_hook type
        if isinstance(self.config_obj, obj_hook):
            return self.config_obj
        return obj_hook(initializer=self.config_obj)
481082
def get_config(config_file):
    """"""
    config_path = os.path.abspath(config_file)

    try:
        with open(config_path, 'r') as data:
            config = yaml.safe_load(data)
    except IOError as exc:
        sys.exit(str(exc))

    return config
1025725
def get_database_configuration():
    """"""
    db_config = get_database_config_file()
    if db_config is None:
        return None
    with open(db_config, 'r') as ymlfile:
        cfg = yaml.load(ymlfile)
    return cfg
1249334
def load_config(name, base='conf'):
    """"""
    fname = pjoin(base, name + '.json')
    if not os.path.exists(fname):
        return {}
    try:
        with open(fname) as f:
            cfg = json.load(f)
    except Exception as e:
        warn("Couldn't load %s: %s" % (fname, e))
        cfg = {}
    return cfg
206377
def get_config(self, model):
        """"""
        if not inspect.isclass(model):
            model = model.__class__
        return self.configs.get(self.get_model_name(model))
11775
def read_config(cls, configparser):
        """"""
        config = dict()
        section = cls.__name__
        option = "prefixes"
        if configparser.has_option(section, option):
            value = configparser.get(section, option)
            names = [x.strip().lower() for x in value.split(",")]
        else:
            names = []
        config[option] = names
        return config
617359
def _load_config():
    """"""
    fname = _get_config_fname()
    if fname is None or not op.isfile(fname):
        return dict()
    with open(fname, 'r') as fid:
        config = json.load(fid)
    return config
1272609
def get_config(self,sec,opt):
    
    return string.strip(self.__cp.get(sec,opt))
366145
def get_config_var_data(self, index, offset):
        """"""

        if index == 0 or index > len(self.config_database.entries):
            return [Error.INVALID_ARRAY_KEY, b'']

        entry = self.config_database.entries[index - 1]
        if not entry.valid:
            return [ConfigDatabaseError.OBSOLETE_ENTRY, b'']

        if offset >= len(entry.data):
            return [Error.INVALID_ARRAY_KEY, b'']

        data_chunk = entry.data[offset:offset + 16]
        return [Error.NO_ERROR, data_chunk]
438647
def get(self, *args, **kw):
        """"""
        if not self._loaded:
            self.load_config()
        return super(FedmsgConfig, self).get(*args, **kw)
493104
def _read_config(self):
        """"""

        try:
            self.config = self.componentmodel.find_one(
                {'name': self.uniquename})
        except ServerSelectionTimeoutError:  # pragma: no cover
            self.log("No database access! Check if mongodb is running "
                     "correctly.", lvl=critical)
        if self.config:
            self.log("Configuration read.", lvl=verbose)
        else:
            self.log("No configuration found.", lvl=warn)
944386
function config(env /*: ?env */) {
  const isProd = env && env.prod;
  const config = isProd ? prod : dev;
  return config(env);
}
457391
def get_config():
    
    app_module = os.getenv('APP_MODULE')
    if not app_module:
        err = 'Unable to bootstrap application APP_MODULE is not defined'
        raise x.BootstrapException(err)

    app_config = os.getenv('APP_CONFIG')
    if not app_module:
        err = 'Unable to bootstrap application APP_CONFIG is not defined'
        raise x.BootstrapException(err)

    try:
        config_class = import_string(app_config)
    except ImportError:
        err = 'Failed imported config file [{}]'
        raise x.BootstrapException(err.format(app_config))

    # and return
    config = config_class()
    return config
209146
def getConfig(self, key):
        
        if hasattr(self, key):
            return getattr(self, key)
        else:
            return False
1220201
def config_get(self, pattern='*'):
        
        result = {}
        for name, value in self.redis_config.items():
            if fnmatch.fnmatch(name, pattern):
                try:
                    result[name] = int(value)
                except ValueError:
                    result[name] = value
        return result