Creates datastore Config.

    Returns:
      A datastore_rpc.Configuration instance.
541706
def _create_config(self, options):
    
    return datastore.CreateConfig(deadline=options["deadline"],
                                  force_writes=self.force_writes)
801955
def _construct_config(self, basedir, port, name=None, isreplset=False):
        """"""
        if isreplset:
            return self._construct_replset(basedir=basedir, portstart=port,
                                           name=name,
                                           num_nodes=list(range(
                                               self.args['config'])),
                                           arbiter=False, extra='--configsvr')
        else:
            datapath = self._create_paths(basedir, name)
            self._construct_mongod(os.path.join(datapath, 'db'),
                                   os.path.join(datapath, 'mongod.log'),
                                   port, replset=None, extra='--configsvr')
699131
def create_config_file(self, vmdk_location, description):
        
        description = description
        format = "vmdk"
        user_bucket = {
            "S3Bucket": self.bucket_name,
            "S3Key": vmdk_location
        }
        parent_obj = {'Description': description, 'Format': format, 'UserBucket': user_bucket}
        obj_list = [parent_obj]

        temp_fd, temp_file = tempfile.mkstemp()
        print 'creating tmp file for {} at {}'.format(vmdk_location, temp_file)

        with os.fdopen(temp_fd, 'w') as f:
            json.dump(obj_list, f)
        return temp_fd, temp_file
35154
def _create_config(cls):
        
        return cls.app_config.objects.create(
            namespace=cls.auto_setup['namespace'], **cls.auto_setup['config_fields']
        )
936808
def configurationStore(self):
        """"""
        url = self._url + "/configstore"

        return ConfigurationStore(url=url,
                                  securityHandler=self._securityHandler,
                                  proxy_url=self._proxy_url,
                                  proxy_port=self._proxy_port)
4490
def create_default_config():
    
    config = configparser.RawConfigParser()
    config.add_section('global')
    config.set('global', 'env_source_rc', False)
    config.add_section('shell')
    config.set('shell', 'bash', "true")
    config.set('shell', 'zsh', "true")
    config.set('shell', 'gui', "true")
    return config
1176935
function(config) {
    this._config = this._defaultConfig();
    if (!config) return true;
    
    var datastore;
    
    switch(config.adapter) {
    case 'disk':
      datastore = this._adapters.disk.connection();
      break;
      
    case 'redis':
      datastore = this._adapters.redis.connection(config.redis);
      break;
      
    case 'memory':
    default:
      return true; // Memory adapter by default
    }
    
    // Set connection
    this._config.connections.datastore = datastore;
    return true;
  }
318064
def create(self):
        
        data = values.of({})

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return ConfigurationInstance(self._version, payload, )
229852
def configure_rpc(cls, scheme=None):
        
        scheme = scheme or cls._meta.scheme

        if not scheme:
            return

        if isinstance(scheme, basestring):
            scheme = importlib.import_module(scheme)

        cls.scheme_name = scheme.__name__

        methods = getattr(scheme, '__all__', None) \
            or [m for m in dir(scheme) if not m.startswith('_')]

        for mname in methods:
            method = getattr(scheme, mname)
            if hasattr(method, '__call__'):
                cls.methods["{0}.{1}".format(
                    cls.scheme_name, method.__name__)] = method
811244
def to_configs(self):
        
        config_obj = reda.configs.configManager.ConfigManager()
        config_obj.add_to_configs(self.data[['a', 'b', 'm', 'n']].values)
        return config_obj
644877
def new_from_bundle_config(self, config):
        
        identity = Identity.from_dict(config['identity'])

        ds = self._db.dataset(identity.vid, exception=False)

        if not ds:
            ds = self._db.new_dataset(**identity.dict)

        b = Bundle(ds, self)
        b.commit()
        b.state = Bundle.STATES.NEW
        b.set_last_access(Bundle.STATES.NEW)

        # b.set_file_system(source_url=self._fs.source(ds.name),
        #                   build_url=self._fs.build(ds.name))

        return b
282809
def configure(self, config):
        
        connections = ConnectionParams.many_from_config(config)
        for connection in connections:
            self._connections.append(connection)
392362
def setup(
            self):
        

        return self.arguments, self.settings, self.log, self.dbConn
1094698
def initdb(config):
    
    engine = sa.engine_from_config(config, 'sqlalchemy.')
    Session.configure(bind=engine)
189838
def init_app(self, app, datastore=None):
        

        datastore = datastore or self.datastore

        for key, value in default_config.items():
            app.config.setdefault(key, value)

        providers = dict()

        for key, config in app.config.items():
            if not key.startswith('SOCIAL_') or config is None or key in default_config:
                continue

            suffix = key.lower().replace('social_', '')
            default_module_name = 'flask_social.providers.%s' % suffix
            module_name = config.get('module', default_module_name)
            module = import_module(module_name)
            config = update_recursive(module.config, config)

            providers[config['id']] = OAuthRemoteApp(**config)
            providers[config['id']].tokengetter(_get_token)

        state = _get_state(app, datastore, providers)

        app.register_blueprint(create_blueprint(state, __name__))
        app.extensions['social'] = state

        return state
965442
@Override
    protected DatabaseConfig createDatabaseConfig() {
        DatabaseConfig dbConfig = new DatabaseConfig();
        dbConfig.setAllowCreate(true);
        dbConfig.setTemporary(false);
        return dbConfig;
    }
763035
def CopyConfig(self):
    
    newconf = self.MakeNewConfig()
    newconf.raw_data = copy.deepcopy(self.raw_data)
    newconf.files = copy.deepcopy(self.files)
    newconf.secondary_config_parsers = copy.deepcopy(
        self.secondary_config_parsers)
    newconf.writeback = copy.deepcopy(self.writeback)
    newconf.writeback_data = copy.deepcopy(self.writeback_data)
    newconf.global_override = copy.deepcopy(self.global_override)
    newconf.context_descriptions = copy.deepcopy(self.context_descriptions)
    newconf.constants = copy.deepcopy(self.constants)
    newconf.initialized = copy.deepcopy(self.initialized)
    return newconf