Esempio n. 1
0
 def startSlave(db_path, master, **kwargs):
     '''
         Mandatory parameter: master address
         Example:
             mongo = Mongo()
             mongo.startSlave("192.168.2.100:27020")
             
     '''
     slave = Replication(is_master=False, **kwargs)
     slave.dbPath(db_path)
     slave.source(master)
     slave.initParamaters()
     slave.start()
Esempio n. 2
0
 def startSlave(db_path, master, **kwargs):
     '''
         Mandatory parameter: master address
         Example:
             mongo = Mongo()
             mongo.startSlave("192.168.2.100:27020")
             
     '''
     slave = Replication(is_master=False, **kwargs)
     slave.dbPath(db_path)
     slave.source(master)
     slave.initParamaters()
     slave.start()
Esempio n. 3
0
 def startMaster(db_path, **kwargs):
     master = Replication(is_master=True, **kwargs)
     master.dbPath(db_path)
     master.initParamaters()
     master.start()
Esempio n. 4
0
 def startMaster(db_path, **kwargs):
     master = Replication(is_master=True, **kwargs)
     master.dbPath(db_path)
     master.initParamaters()
     master.start()