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
 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
 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