Exemplo 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()
Exemplo 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()
Exemplo n.º 3
0
 def startMaster(db_path, **kwargs):
     master = Replication(is_master=True, **kwargs)
     master.dbPath(db_path)
     master.initParamaters()
     master.start()
Exemplo n.º 4
0
 def slaveStatus(**kwargs):
     slave = Replication(is_master=False, **kwargs)
     return slave.slaveInfo()
Exemplo n.º 5
0
 def masterStatus(**kwargs):
     master = Replication(is_master=True, **kwargs)
     return master.masterInfo()
Exemplo n.º 6
0
 def startMaster(db_path, **kwargs):
     master = Replication(is_master=True, **kwargs)
     master.dbPath(db_path)
     master.initParamaters()
     master.start()
Exemplo n.º 7
0
 def slaveStatus(**kwargs):
     slave = Replication(is_master=False, **kwargs)
     return slave.slaveInfo()
Exemplo n.º 8
0
 def masterStatus(**kwargs):
     master = Replication(is_master=True, **kwargs)
     return master.masterInfo()