Esempio n. 1
0
 def DeleteReplication(self, args):
     res = self.stub.DeleteReplication(
         replicate_control_pb2.ReplicationCommonReq(uuid=args.uuid,
                                                    operate_id=args.op_id,
                                                    role=args.role))
     print('delete replication result:%s' % res.ret)
     return res
Esempio n. 2
0
 def FailoverReplication(self, args):
     res = self.stub.FailoverReplication(
         replicate_control_pb2.ReplicationCommonReq(uuid=args.uuid,
                                                    operate_id=args.op_id,
                                                    role=args.role))
     print('failover replication result:%s' % res.ret)
     return res
Esempio n. 3
0
 def QueryReplication(self, args):
     res = self.stub.QueryReplication(
         replicate_control_pb2.ReplicationCommonReq(
             uuid=args.uuid, operate_id=args.operate_id))
     print('query replication result:%s' % res.ret)
     if (res.ret == 0):
         print res.element
     return res