Esempio n. 1
0
    def __init_mongos(self, params):
        cfg = params.copy()

        log_path = cfg.setdefault(
            'logpath',
            os.path.join(orchestration_mkdtemp(prefix='mongo-'), 'mongos.log'))
        self.__init_logpath(log_path)

        # use keyFile
        if self.auth_key:
            cfg['keyFile'] = self.key_file

        if 'port' not in cfg:
            cfg['port'] = process.PortPool().port(check=True)

        self.__init_test_commands(cfg)

        return process.write_config(cfg), cfg
Esempio n. 2
0
    def __init_mongos(self, params):
        cfg = params.copy()

        log_path = cfg.setdefault(
            'logpath',
            os.path.join(orchestration_mkdtemp(prefix='mongo-'), 'mongos.log'))
        self.__init_logpath(log_path)

        # use keyFile
        if self.auth_key:
            cfg['keyFile'] = self.key_file

        if 'port' not in cfg:
            cfg['port'] = process.PortPool().port(check=True)

        self.__init_test_commands(cfg)

        return process.write_config(cfg), cfg
Esempio n. 3
0
 def __init_db(self, dbpath):
     if not dbpath:
         dbpath = orchestration_mkdtemp(prefix="mongo-")
     if not os.path.exists(dbpath):
         os.makedirs(dbpath)
     return dbpath
Esempio n. 4
0
 def __init_db(self, dbpath):
     if not dbpath:
         dbpath = orchestration_mkdtemp(prefix="mongo-")
     if not os.path.exists(dbpath):
         os.makedirs(dbpath)
     return dbpath