Example #1
0
def early_adopter_create_UpdateStream_stub(host, port):
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    method_invocation_descriptions = {
        "StreamKeyRange":
        utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamKeyRangeRequest.SerializeToString,
            binlogdata_pb2.StreamKeyRangeResponse.FromString,
        ),
        "StreamTables":
        utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamTablesRequest.SerializeToString,
            binlogdata_pb2.StreamTablesResponse.FromString,
        ),
        "StreamUpdate":
        utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamUpdateRequest.SerializeToString,
            binlogdata_pb2.StreamUpdateResponse.FromString,
        ),
    }
    return implementations.insecure_stub("binlogservice.UpdateStream",
                                         method_invocation_descriptions, host,
                                         port)
Example #2
0
def early_adopter_create_MysqlCtl_stub(host, port):
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    method_invocation_descriptions = {
        "RunMysqlUpgrade":
        utilities.unary_unary_invocation_description(
            mysqlctl_pb2.RunMysqlUpgradeRequest.SerializeToString,
            mysqlctl_pb2.RunMysqlUpgradeResponse.FromString,
        ),
        "Shutdown":
        utilities.unary_unary_invocation_description(
            mysqlctl_pb2.ShutdownRequest.SerializeToString,
            mysqlctl_pb2.ShutdownResponse.FromString,
        ),
        "Start":
        utilities.unary_unary_invocation_description(
            mysqlctl_pb2.StartRequest.SerializeToString,
            mysqlctl_pb2.StartResponse.FromString,
        ),
    }
    return implementations.insecure_stub("mysqlctl.MysqlCtl",
                                         method_invocation_descriptions, host,
                                         port)
Example #3
0
 def setUp(self):
     self.server = implementations.insecure_server(SERVICE_NAME,
                                                   _SERVICE_DESCRIPTIONS, 0)
     self.server.start()
     port = self.server.port()
     self.stub = implementations.insecure_stub(SERVICE_NAME,
                                               _INVOCATION_DESCRIPTIONS,
                                               'localhost', port)
def early_adopter_create_Query_stub(host, port):
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  method_invocation_descriptions = {
    "Begin": utilities.unary_unary_invocation_description(
      query_pb2.BeginRequest.SerializeToString,
      query_pb2.BeginResponse.FromString,
    ),
    "Commit": utilities.unary_unary_invocation_description(
      query_pb2.CommitRequest.SerializeToString,
      query_pb2.CommitResponse.FromString,
    ),
    "Execute": utilities.unary_unary_invocation_description(
      query_pb2.ExecuteRequest.SerializeToString,
      query_pb2.ExecuteResponse.FromString,
    ),
    "ExecuteBatch": utilities.unary_unary_invocation_description(
      query_pb2.ExecuteBatchRequest.SerializeToString,
      query_pb2.ExecuteBatchResponse.FromString,
    ),
    "GetSessionId": utilities.unary_unary_invocation_description(
      query_pb2.GetSessionIdRequest.SerializeToString,
      query_pb2.GetSessionIdResponse.FromString,
    ),
    "Rollback": utilities.unary_unary_invocation_description(
      query_pb2.RollbackRequest.SerializeToString,
      query_pb2.RollbackResponse.FromString,
    ),
    "SplitQuery": utilities.unary_unary_invocation_description(
      query_pb2.SplitQueryRequest.SerializeToString,
      query_pb2.SplitQueryResponse.FromString,
    ),
    "StreamExecute": utilities.unary_stream_invocation_description(
      query_pb2.StreamExecuteRequest.SerializeToString,
      query_pb2.StreamExecuteResponse.FromString,
    ),
    "StreamHealth": utilities.unary_stream_invocation_description(
      query_pb2.StreamHealthRequest.SerializeToString,
      query_pb2.StreamHealthResponse.FromString,
    ),
  }
  return implementations.insecure_stub("queryservice.Query", method_invocation_descriptions, host, port)
Example #5
0
 def setUp(self):
     self.server = implementations.insecure_server(methods.SERVICE_NAME,
                                                   methods.SERVER_METHODS,
                                                   0)
     self.server.start()
     port = self.server.port()
     self.stub = implementations.insecure_stub(methods.SERVICE_NAME,
                                               methods.CLIENT_METHODS,
                                               'localhost', port)
Example #6
0
def early_adopter_create_Vtctl_stub(host, port):
  import vtctl_pb2
  import vtctl_pb2
  method_invocation_descriptions = {
    "ExecuteVtctlCommand": utilities.unary_stream_invocation_description(
      vtctl_pb2.ExecuteVtctlCommandArgs.SerializeToString,
      vtctl_pb2.LoggerEvent.FromString,
    ),
  }
  return implementations.insecure_stub(method_invocation_descriptions, host, port)
def early_adopter_create_Vtworker_stub(host, port):
  import vtworkerdata_pb2
  import vtworkerdata_pb2
  method_invocation_descriptions = {
    "ExecuteVtworkerCommand": utilities.unary_stream_invocation_description(
      vtworkerdata_pb2.ExecuteVtworkerCommandRequest.SerializeToString,
      vtworkerdata_pb2.ExecuteVtworkerCommandResponse.FromString,
    ),
  }
  return implementations.insecure_stub("vtworkerservice.Vtworker", method_invocation_descriptions, host, port)
Example #8
0
def early_adopter_create_Greeter_stub(host, port):
    import helloworld_pb2
    import helloworld_pb2
    method_invocation_descriptions = {
        "SayHello":
        utilities.unary_unary_invocation_description(
            helloworld_pb2.HelloRequest.SerializeToString,
            helloworld_pb2.HelloReply.FromString,
        ),
    }
    return implementations.insecure_stub(method_invocation_descriptions, host,
                                         port)
Example #9
0
def early_adopter_create_Vtctl_stub(host, port):
    import vtctl_pb2
    import vtctl_pb2
    method_invocation_descriptions = {
        "ExecuteVtctlCommand":
        utilities.unary_stream_invocation_description(
            vtctl_pb2.ExecuteVtctlCommandArgs.SerializeToString,
            vtctl_pb2.LoggerEvent.FromString,
        ),
    }
    return implementations.insecure_stub(method_invocation_descriptions, host,
                                         port)
Example #10
0
def early_adopter_create_Vtworker_stub(host, port):
    import vtworkerdata_pb2
    import vtworkerdata_pb2
    method_invocation_descriptions = {
        "ExecuteVtworkerCommand":
        utilities.unary_stream_invocation_description(
            vtworkerdata_pb2.ExecuteVtworkerCommandRequest.SerializeToString,
            vtworkerdata_pb2.ExecuteVtworkerCommandResponse.FromString,
        ),
    }
    return implementations.insecure_stub("vtworkerservice.Vtworker",
                                         method_invocation_descriptions, host,
                                         port)
Example #11
0
def _stub(args):
  if args.use_tls:
    if args.use_test_ca:
      root_certificates = resources.test_root_certificates()
    else:
      root_certificates = resources.prod_root_certificates()

    stub = implementations.secure_stub(
        methods.CLIENT_METHODS, args.server_host, args.server_port,
        root_certificates, None, None,
        server_host_override=args.server_host_override)
  else:
    stub = implementations.insecure_stub(
        methods.CLIENT_METHODS, args.server_host, args.server_port)
  return stub
Example #12
0
def _stub(args):
    if args.use_tls:
        if args.use_test_ca:
            root_certificates = resources.test_root_certificates()
        else:
            root_certificates = resources.prod_root_certificates()
        # TODO(nathaniel): server host override.

        stub = implementations.secure_stub(methods.CLIENT_METHODS,
                                           args.server_host, args.server_port,
                                           root_certificates, None, None)
    else:
        stub = implementations.insecure_stub(methods.CLIENT_METHODS,
                                             args.server_host,
                                             args.server_port)
    return stub
def early_adopter_create_Automation_stub(host, port):
  import automation_pb2
  import automation_pb2
  import automation_pb2
  import automation_pb2
  method_invocation_descriptions = {
    "EnqueueClusterOperation": utilities.unary_unary_invocation_description(
      automation_pb2.EnqueueClusterOperationRequest.SerializeToString,
      automation_pb2.EnqueueClusterOperationResponse.FromString,
    ),
    "GetClusterOperationDetails": utilities.unary_unary_invocation_description(
      automation_pb2.GetClusterOperationDetailsRequest.SerializeToString,
      automation_pb2.GetClusterOperationDetailsResponse.FromString,
    ),
  }
  return implementations.insecure_stub("automationservice.Automation", method_invocation_descriptions, host, port)
Example #14
0
def early_adopter_create_Automation_stub(host, port):
    import automation_pb2
    import automation_pb2
    import automation_pb2
    import automation_pb2
    method_invocation_descriptions = {
        "EnqueueClusterOperation":
        utilities.unary_unary_invocation_description(
            automation_pb2.EnqueueClusterOperationRequest.SerializeToString,
            automation_pb2.EnqueueClusterOperationResponse.FromString,
        ),
        "GetClusterOperationDetails":
        utilities.unary_unary_invocation_description(
            automation_pb2.GetClusterOperationDetailsRequest.SerializeToString,
            automation_pb2.GetClusterOperationDetailsResponse.FromString,
        ),
    }
    return implementations.insecure_stub("automationservice.Automation",
                                         method_invocation_descriptions, host,
                                         port)
def early_adopter_create_ScannerRPC_stub(host, port):
  import common.message_pb2
  import common.message_pb2
  import common.message_pb2
  import common.message_pb2
  import common.message_pb2
  import common.message_pb2
  method_invocation_descriptions = {
    "CheckRunningJob": utilities.unary_unary_invocation_description(
      common.message_pb2.JobList.SerializeToString,
      common.message_pb2.ResultList.FromString,
    ),
    "ConfirmAliveScanner": utilities.unary_unary_invocation_description(
      common.message_pb2.Node.SerializeToString,
      common.message_pb2.Result.FromString,
    ),
    "SendJobList": utilities.unary_unary_invocation_description(
      common.message_pb2.JobList.SerializeToString,
      common.message_pb2.Result.FromString,
    ),
  }
  return implementations.insecure_stub(method_invocation_descriptions, host, port)
def early_adopter_create_ControllerRPC_stub(host, port):
  import common.message_pb2
  import common.message_pb2
  import common.message_pb2
  import common.message_pb2
  import common.message_pb2
  import common.message_pb2
  method_invocation_descriptions = {
    "Heartbeat": utilities.unary_unary_invocation_description(
      common.message_pb2.Node.SerializeToString,
      common.message_pb2.Result.FromString,
    ),
    "RegisterScanner": utilities.unary_unary_invocation_description(
      common.message_pb2.Node.SerializeToString,
      common.message_pb2.Result.FromString,
    ),
    "SendReport": utilities.unary_unary_invocation_description(
      common.message_pb2.Report.SerializeToString,
      common.message_pb2.Result.FromString,
    ),
  }
  return implementations.insecure_stub(method_invocation_descriptions, host, port)
Example #17
0
def early_adopter_create_MysqlCtl_stub(host, port):
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  method_invocation_descriptions = {
    "RunMysqlUpgrade": utilities.unary_unary_invocation_description(
      mysqlctl_pb2.RunMysqlUpgradeRequest.SerializeToString,
      mysqlctl_pb2.RunMysqlUpgradeResponse.FromString,
    ),
    "Shutdown": utilities.unary_unary_invocation_description(
      mysqlctl_pb2.ShutdownRequest.SerializeToString,
      mysqlctl_pb2.ShutdownResponse.FromString,
    ),
    "Start": utilities.unary_unary_invocation_description(
      mysqlctl_pb2.StartRequest.SerializeToString,
      mysqlctl_pb2.StartResponse.FromString,
    ),
  }
  return implementations.insecure_stub("mysqlctl.MysqlCtl", method_invocation_descriptions, host, port)
Example #18
0
def _stub(args):
    if args.use_tls:
        if args.use_test_ca:
            root_certificates = resources.test_root_certificates()
        else:
            root_certificates = resources.prod_root_certificates()

        stub = implementations.secure_stub(
            methods.SERVICE_NAME,
            methods.CLIENT_METHODS,
            args.server_host,
            args.server_port,
            root_certificates,
            None,
            None,
            server_host_override=args.server_host_override)
    else:
        stub = implementations.insecure_stub(methods.SERVICE_NAME,
                                             methods.CLIENT_METHODS,
                                             args.server_host,
                                             args.server_port)
    return stub
def early_adopter_create_UpdateStream_stub(host, port):
  import binlogdata_pb2
  import binlogdata_pb2
  import binlogdata_pb2
  import binlogdata_pb2
  import binlogdata_pb2
  import binlogdata_pb2
  method_invocation_descriptions = {
    "StreamKeyRange": utilities.unary_stream_invocation_description(
      binlogdata_pb2.StreamKeyRangeRequest.SerializeToString,
      binlogdata_pb2.StreamKeyRangeResponse.FromString,
    ),
    "StreamTables": utilities.unary_stream_invocation_description(
      binlogdata_pb2.StreamTablesRequest.SerializeToString,
      binlogdata_pb2.StreamTablesResponse.FromString,
    ),
    "StreamUpdate": utilities.unary_stream_invocation_description(
      binlogdata_pb2.StreamUpdateRequest.SerializeToString,
      binlogdata_pb2.StreamUpdateResponse.FromString,
    ),
  }
  return implementations.insecure_stub("binlogservice.UpdateStream", method_invocation_descriptions, host, port)
Example #20
0
def early_adopter_create_Vitess_stub(host, port):
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    method_invocation_descriptions = {
        "Begin":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.BeginRequest.SerializeToString,
            vtgate_pb2.BeginResponse.FromString,
        ),
        "Commit":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.CommitRequest.SerializeToString,
            vtgate_pb2.CommitResponse.FromString,
        ),
        "Execute":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteRequest.SerializeToString,
            vtgate_pb2.ExecuteResponse.FromString,
        ),
        "ExecuteBatchKeyspaceIds":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.SerializeToString,
            vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.FromString,
        ),
        "ExecuteBatchShards":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteBatchShardsRequest.SerializeToString,
            vtgate_pb2.ExecuteBatchShardsResponse.FromString,
        ),
        "ExecuteEntityIds":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteEntityIdsRequest.SerializeToString,
            vtgate_pb2.ExecuteEntityIdsResponse.FromString,
        ),
        "ExecuteKeyRanges":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteKeyRangesRequest.SerializeToString,
            vtgate_pb2.ExecuteKeyRangesResponse.FromString,
        ),
        "ExecuteKeyspaceIds":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteKeyspaceIdsRequest.SerializeToString,
            vtgate_pb2.ExecuteKeyspaceIdsResponse.FromString,
        ),
        "ExecuteShards":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteShardsRequest.SerializeToString,
            vtgate_pb2.ExecuteShardsResponse.FromString,
        ),
        "GetSrvKeyspace":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.GetSrvKeyspaceRequest.SerializeToString,
            vtgate_pb2.GetSrvKeyspaceResponse.FromString,
        ),
        "Rollback":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.RollbackRequest.SerializeToString,
            vtgate_pb2.RollbackResponse.FromString,
        ),
        "SplitQuery":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.SplitQueryRequest.SerializeToString,
            vtgate_pb2.SplitQueryResponse.FromString,
        ),
        "StreamExecute":
        utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteRequest.SerializeToString,
            vtgate_pb2.StreamExecuteResponse.FromString,
        ),
        "StreamExecuteKeyRanges":
        utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteKeyRangesRequest.SerializeToString,
            vtgate_pb2.StreamExecuteKeyRangesResponse.FromString,
        ),
        "StreamExecuteKeyspaceIds":
        utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteKeyspaceIdsRequest.SerializeToString,
            vtgate_pb2.StreamExecuteKeyspaceIdsResponse.FromString,
        ),
        "StreamExecuteShards":
        utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteShardsRequest.SerializeToString,
            vtgate_pb2.StreamExecuteShardsResponse.FromString,
        ),
    }
    return implementations.insecure_stub("vtgateservice.Vitess",
                                         method_invocation_descriptions, host,
                                         port)
def early_adopter_create_Vitess_stub(host, port):
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  method_invocation_descriptions = {
    "Begin": utilities.unary_unary_invocation_description(
      vtgate_pb2.BeginRequest.SerializeToString,
      vtgate_pb2.BeginResponse.FromString,
    ),
    "Commit": utilities.unary_unary_invocation_description(
      vtgate_pb2.CommitRequest.SerializeToString,
      vtgate_pb2.CommitResponse.FromString,
    ),
    "Execute": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteRequest.SerializeToString,
      vtgate_pb2.ExecuteResponse.FromString,
    ),
    "ExecuteBatchKeyspaceIds": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.SerializeToString,
      vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.FromString,
    ),
    "ExecuteBatchShards": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteBatchShardsRequest.SerializeToString,
      vtgate_pb2.ExecuteBatchShardsResponse.FromString,
    ),
    "ExecuteEntityIds": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteEntityIdsRequest.SerializeToString,
      vtgate_pb2.ExecuteEntityIdsResponse.FromString,
    ),
    "ExecuteKeyRanges": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteKeyRangesRequest.SerializeToString,
      vtgate_pb2.ExecuteKeyRangesResponse.FromString,
    ),
    "ExecuteKeyspaceIds": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteKeyspaceIdsRequest.SerializeToString,
      vtgate_pb2.ExecuteKeyspaceIdsResponse.FromString,
    ),
    "ExecuteShards": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteShardsRequest.SerializeToString,
      vtgate_pb2.ExecuteShardsResponse.FromString,
    ),
    "GetSrvKeyspace": utilities.unary_unary_invocation_description(
      vtgate_pb2.GetSrvKeyspaceRequest.SerializeToString,
      vtgate_pb2.GetSrvKeyspaceResponse.FromString,
    ),
    "Rollback": utilities.unary_unary_invocation_description(
      vtgate_pb2.RollbackRequest.SerializeToString,
      vtgate_pb2.RollbackResponse.FromString,
    ),
    "SplitQuery": utilities.unary_unary_invocation_description(
      vtgate_pb2.SplitQueryRequest.SerializeToString,
      vtgate_pb2.SplitQueryResponse.FromString,
    ),
    "StreamExecute": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteRequest.SerializeToString,
      vtgate_pb2.StreamExecuteResponse.FromString,
    ),
    "StreamExecuteKeyRanges": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteKeyRangesRequest.SerializeToString,
      vtgate_pb2.StreamExecuteKeyRangesResponse.FromString,
    ),
    "StreamExecuteKeyspaceIds": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteKeyspaceIdsRequest.SerializeToString,
      vtgate_pb2.StreamExecuteKeyspaceIdsResponse.FromString,
    ),
    "StreamExecuteShards": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteShardsRequest.SerializeToString,
      vtgate_pb2.StreamExecuteShardsResponse.FromString,
    ),
  }
  return implementations.insecure_stub("vtgateservice.Vitess", method_invocation_descriptions, host, port)
def early_adopter_create_TabletManager_stub(host, port):
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  method_invocation_descriptions = {
    "ApplySchema": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ApplySchemaRequest.SerializeToString,
      tabletmanagerdata_pb2.ApplySchemaResponse.FromString,
    ),
    "Backup": utilities.unary_stream_invocation_description(
      tabletmanagerdata_pb2.BackupRequest.SerializeToString,
      tabletmanagerdata_pb2.BackupResponse.FromString,
    ),
    "ChangeType": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ChangeTypeRequest.SerializeToString,
      tabletmanagerdata_pb2.ChangeTypeResponse.FromString,
    ),
    "DemoteMaster": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.DemoteMasterRequest.SerializeToString,
      tabletmanagerdata_pb2.DemoteMasterResponse.FromString,
    ),
    "ExecuteFetchAsApp": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ExecuteFetchAsAppRequest.SerializeToString,
      tabletmanagerdata_pb2.ExecuteFetchAsAppResponse.FromString,
    ),
    "ExecuteFetchAsDba": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ExecuteFetchAsDbaRequest.SerializeToString,
      tabletmanagerdata_pb2.ExecuteFetchAsDbaResponse.FromString,
    ),
    "ExecuteHook": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ExecuteHookRequest.SerializeToString,
      tabletmanagerdata_pb2.ExecuteHookResponse.FromString,
    ),
    "GetPermissions": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.GetPermissionsRequest.SerializeToString,
      tabletmanagerdata_pb2.GetPermissionsResponse.FromString,
    ),
    "GetSchema": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.GetSchemaRequest.SerializeToString,
      tabletmanagerdata_pb2.GetSchemaResponse.FromString,
    ),
    "GetSlaves": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.GetSlavesRequest.SerializeToString,
      tabletmanagerdata_pb2.GetSlavesResponse.FromString,
    ),
    "InitMaster": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.InitMasterRequest.SerializeToString,
      tabletmanagerdata_pb2.InitMasterResponse.FromString,
    ),
    "InitSlave": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.InitSlaveRequest.SerializeToString,
      tabletmanagerdata_pb2.InitSlaveResponse.FromString,
    ),
    "MasterPosition": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.MasterPositionRequest.SerializeToString,
      tabletmanagerdata_pb2.MasterPositionResponse.FromString,
    ),
    "Ping": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.PingRequest.SerializeToString,
      tabletmanagerdata_pb2.PingResponse.FromString,
    ),
    "PopulateReparentJournal": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.PopulateReparentJournalRequest.SerializeToString,
      tabletmanagerdata_pb2.PopulateReparentJournalResponse.FromString,
    ),
    "PreflightSchema": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.PreflightSchemaRequest.SerializeToString,
      tabletmanagerdata_pb2.PreflightSchemaResponse.FromString,
    ),
    "PromoteSlave": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.PromoteSlaveRequest.SerializeToString,
      tabletmanagerdata_pb2.PromoteSlaveResponse.FromString,
    ),
    "PromoteSlaveWhenCaughtUp": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpRequest.SerializeToString,
      tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpResponse.FromString,
    ),
    "RefreshState": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.RefreshStateRequest.SerializeToString,
      tabletmanagerdata_pb2.RefreshStateResponse.FromString,
    ),
    "ReloadSchema": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ReloadSchemaRequest.SerializeToString,
      tabletmanagerdata_pb2.ReloadSchemaResponse.FromString,
    ),
    "ResetReplication": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ResetReplicationRequest.SerializeToString,
      tabletmanagerdata_pb2.ResetReplicationResponse.FromString,
    ),
    "RunBlpUntil": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.RunBlpUntilRequest.SerializeToString,
      tabletmanagerdata_pb2.RunBlpUntilResponse.FromString,
    ),
    "RunHealthCheck": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.RunHealthCheckRequest.SerializeToString,
      tabletmanagerdata_pb2.RunHealthCheckResponse.FromString,
    ),
    "Scrap": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ScrapRequest.SerializeToString,
      tabletmanagerdata_pb2.ScrapResponse.FromString,
    ),
    "SetMaster": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SetMasterRequest.SerializeToString,
      tabletmanagerdata_pb2.SetMasterResponse.FromString,
    ),
    "SetReadOnly": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SetReadOnlyRequest.SerializeToString,
      tabletmanagerdata_pb2.SetReadOnlyResponse.FromString,
    ),
    "SetReadWrite": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SetReadWriteRequest.SerializeToString,
      tabletmanagerdata_pb2.SetReadWriteResponse.FromString,
    ),
    "SlaveStatus": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SlaveStatusRequest.SerializeToString,
      tabletmanagerdata_pb2.SlaveStatusResponse.FromString,
    ),
    "SlaveWasPromoted": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SlaveWasPromotedRequest.SerializeToString,
      tabletmanagerdata_pb2.SlaveWasPromotedResponse.FromString,
    ),
    "SlaveWasRestarted": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SlaveWasRestartedRequest.SerializeToString,
      tabletmanagerdata_pb2.SlaveWasRestartedResponse.FromString,
    ),
    "Sleep": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SleepRequest.SerializeToString,
      tabletmanagerdata_pb2.SleepResponse.FromString,
    ),
    "StartBlp": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StartBlpRequest.SerializeToString,
      tabletmanagerdata_pb2.StartBlpResponse.FromString,
    ),
    "StartSlave": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StartSlaveRequest.SerializeToString,
      tabletmanagerdata_pb2.StartSlaveResponse.FromString,
    ),
    "StopBlp": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StopBlpRequest.SerializeToString,
      tabletmanagerdata_pb2.StopBlpResponse.FromString,
    ),
    "StopReplicationAndGetStatus": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StopReplicationAndGetStatusRequest.SerializeToString,
      tabletmanagerdata_pb2.StopReplicationAndGetStatusResponse.FromString,
    ),
    "StopSlave": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StopSlaveRequest.SerializeToString,
      tabletmanagerdata_pb2.StopSlaveResponse.FromString,
    ),
    "StopSlaveMinimum": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StopSlaveMinimumRequest.SerializeToString,
      tabletmanagerdata_pb2.StopSlaveMinimumResponse.FromString,
    ),
    "TabletExternallyElected": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.TabletExternallyElectedRequest.SerializeToString,
      tabletmanagerdata_pb2.TabletExternallyElectedResponse.FromString,
    ),
    "TabletExternallyReparented": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.TabletExternallyReparentedRequest.SerializeToString,
      tabletmanagerdata_pb2.TabletExternallyReparentedResponse.FromString,
    ),
    "WaitBlpPosition": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.WaitBlpPositionRequest.SerializeToString,
      tabletmanagerdata_pb2.WaitBlpPositionResponse.FromString,
    ),
  }
  return implementations.insecure_stub("tabletmanagerservice.TabletManager", method_invocation_descriptions, host, port)
def early_adopter_create_TabletManager_stub(host, port):
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    method_invocation_descriptions = {
        "ApplySchema":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ApplySchemaRequest.SerializeToString,
            tabletmanagerdata_pb2.ApplySchemaResponse.FromString,
        ),
        "Backup":
        utilities.unary_stream_invocation_description(
            tabletmanagerdata_pb2.BackupRequest.SerializeToString,
            tabletmanagerdata_pb2.BackupResponse.FromString,
        ),
        "ChangeType":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ChangeTypeRequest.SerializeToString,
            tabletmanagerdata_pb2.ChangeTypeResponse.FromString,
        ),
        "DemoteMaster":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.DemoteMasterRequest.SerializeToString,
            tabletmanagerdata_pb2.DemoteMasterResponse.FromString,
        ),
        "ExecuteFetchAsApp":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ExecuteFetchAsAppRequest.SerializeToString,
            tabletmanagerdata_pb2.ExecuteFetchAsAppResponse.FromString,
        ),
        "ExecuteFetchAsDba":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ExecuteFetchAsDbaRequest.SerializeToString,
            tabletmanagerdata_pb2.ExecuteFetchAsDbaResponse.FromString,
        ),
        "ExecuteHook":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ExecuteHookRequest.SerializeToString,
            tabletmanagerdata_pb2.ExecuteHookResponse.FromString,
        ),
        "GetPermissions":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.GetPermissionsRequest.SerializeToString,
            tabletmanagerdata_pb2.GetPermissionsResponse.FromString,
        ),
        "GetSchema":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.GetSchemaRequest.SerializeToString,
            tabletmanagerdata_pb2.GetSchemaResponse.FromString,
        ),
        "GetSlaves":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.GetSlavesRequest.SerializeToString,
            tabletmanagerdata_pb2.GetSlavesResponse.FromString,
        ),
        "InitMaster":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.InitMasterRequest.SerializeToString,
            tabletmanagerdata_pb2.InitMasterResponse.FromString,
        ),
        "InitSlave":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.InitSlaveRequest.SerializeToString,
            tabletmanagerdata_pb2.InitSlaveResponse.FromString,
        ),
        "MasterPosition":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.MasterPositionRequest.SerializeToString,
            tabletmanagerdata_pb2.MasterPositionResponse.FromString,
        ),
        "Ping":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.PingRequest.SerializeToString,
            tabletmanagerdata_pb2.PingResponse.FromString,
        ),
        "PopulateReparentJournal":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.PopulateReparentJournalRequest.
            SerializeToString,
            tabletmanagerdata_pb2.PopulateReparentJournalResponse.FromString,
        ),
        "PreflightSchema":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.PreflightSchemaRequest.SerializeToString,
            tabletmanagerdata_pb2.PreflightSchemaResponse.FromString,
        ),
        "PromoteSlave":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.PromoteSlaveRequest.SerializeToString,
            tabletmanagerdata_pb2.PromoteSlaveResponse.FromString,
        ),
        "PromoteSlaveWhenCaughtUp":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpRequest.
            SerializeToString,
            tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpResponse.FromString,
        ),
        "RefreshState":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.RefreshStateRequest.SerializeToString,
            tabletmanagerdata_pb2.RefreshStateResponse.FromString,
        ),
        "ReloadSchema":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ReloadSchemaRequest.SerializeToString,
            tabletmanagerdata_pb2.ReloadSchemaResponse.FromString,
        ),
        "ResetReplication":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ResetReplicationRequest.SerializeToString,
            tabletmanagerdata_pb2.ResetReplicationResponse.FromString,
        ),
        "RunBlpUntil":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.RunBlpUntilRequest.SerializeToString,
            tabletmanagerdata_pb2.RunBlpUntilResponse.FromString,
        ),
        "RunHealthCheck":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.RunHealthCheckRequest.SerializeToString,
            tabletmanagerdata_pb2.RunHealthCheckResponse.FromString,
        ),
        "Scrap":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ScrapRequest.SerializeToString,
            tabletmanagerdata_pb2.ScrapResponse.FromString,
        ),
        "SetMaster":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SetMasterRequest.SerializeToString,
            tabletmanagerdata_pb2.SetMasterResponse.FromString,
        ),
        "SetReadOnly":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SetReadOnlyRequest.SerializeToString,
            tabletmanagerdata_pb2.SetReadOnlyResponse.FromString,
        ),
        "SetReadWrite":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SetReadWriteRequest.SerializeToString,
            tabletmanagerdata_pb2.SetReadWriteResponse.FromString,
        ),
        "SlaveStatus":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SlaveStatusRequest.SerializeToString,
            tabletmanagerdata_pb2.SlaveStatusResponse.FromString,
        ),
        "SlaveWasPromoted":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SlaveWasPromotedRequest.SerializeToString,
            tabletmanagerdata_pb2.SlaveWasPromotedResponse.FromString,
        ),
        "SlaveWasRestarted":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SlaveWasRestartedRequest.SerializeToString,
            tabletmanagerdata_pb2.SlaveWasRestartedResponse.FromString,
        ),
        "Sleep":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SleepRequest.SerializeToString,
            tabletmanagerdata_pb2.SleepResponse.FromString,
        ),
        "StartBlp":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StartBlpRequest.SerializeToString,
            tabletmanagerdata_pb2.StartBlpResponse.FromString,
        ),
        "StartSlave":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StartSlaveRequest.SerializeToString,
            tabletmanagerdata_pb2.StartSlaveResponse.FromString,
        ),
        "StopBlp":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StopBlpRequest.SerializeToString,
            tabletmanagerdata_pb2.StopBlpResponse.FromString,
        ),
        "StopReplicationAndGetStatus":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StopReplicationAndGetStatusRequest.
            SerializeToString,
            tabletmanagerdata_pb2.StopReplicationAndGetStatusResponse.
            FromString,
        ),
        "StopSlave":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StopSlaveRequest.SerializeToString,
            tabletmanagerdata_pb2.StopSlaveResponse.FromString,
        ),
        "StopSlaveMinimum":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StopSlaveMinimumRequest.SerializeToString,
            tabletmanagerdata_pb2.StopSlaveMinimumResponse.FromString,
        ),
        "TabletExternallyElected":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.TabletExternallyElectedRequest.
            SerializeToString,
            tabletmanagerdata_pb2.TabletExternallyElectedResponse.FromString,
        ),
        "TabletExternallyReparented":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.TabletExternallyReparentedRequest.
            SerializeToString,
            tabletmanagerdata_pb2.TabletExternallyReparentedResponse.
            FromString,
        ),
        "WaitBlpPosition":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.WaitBlpPositionRequest.SerializeToString,
            tabletmanagerdata_pb2.WaitBlpPositionResponse.FromString,
        ),
    }
    return implementations.insecure_stub("tabletmanagerservice.TabletManager",
                                         method_invocation_descriptions, host,
                                         port)
Example #24
0
 def setUp(self):
   self.server = implementations.insecure_server(methods.SERVER_METHODS, 0)
   self.server.start()
   port = self.server.port()
   self.stub = implementations.insecure_stub(
       methods.CLIENT_METHODS, 'localhost', port)
Example #25
0
def early_adopter_create_Query_stub(host, port):
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    method_invocation_descriptions = {
        "Begin":
        utilities.unary_unary_invocation_description(
            query_pb2.BeginRequest.SerializeToString,
            query_pb2.BeginResponse.FromString,
        ),
        "Commit":
        utilities.unary_unary_invocation_description(
            query_pb2.CommitRequest.SerializeToString,
            query_pb2.CommitResponse.FromString,
        ),
        "Execute":
        utilities.unary_unary_invocation_description(
            query_pb2.ExecuteRequest.SerializeToString,
            query_pb2.ExecuteResponse.FromString,
        ),
        "ExecuteBatch":
        utilities.unary_unary_invocation_description(
            query_pb2.ExecuteBatchRequest.SerializeToString,
            query_pb2.ExecuteBatchResponse.FromString,
        ),
        "GetSessionId":
        utilities.unary_unary_invocation_description(
            query_pb2.GetSessionIdRequest.SerializeToString,
            query_pb2.GetSessionIdResponse.FromString,
        ),
        "Rollback":
        utilities.unary_unary_invocation_description(
            query_pb2.RollbackRequest.SerializeToString,
            query_pb2.RollbackResponse.FromString,
        ),
        "SplitQuery":
        utilities.unary_unary_invocation_description(
            query_pb2.SplitQueryRequest.SerializeToString,
            query_pb2.SplitQueryResponse.FromString,
        ),
        "StreamExecute":
        utilities.unary_stream_invocation_description(
            query_pb2.StreamExecuteRequest.SerializeToString,
            query_pb2.StreamExecuteResponse.FromString,
        ),
        "StreamHealth":
        utilities.unary_stream_invocation_description(
            query_pb2.StreamHealthRequest.SerializeToString,
            query_pb2.StreamHealthResponse.FromString,
        ),
    }
    return implementations.insecure_stub("queryservice.Query",
                                         method_invocation_descriptions, host,
                                         port)
Example #26
0
 def setUp(self):
   self.server = implementations.insecure_server(_SERVICE_DESCRIPTIONS, 0)
   self.server.start()
   port = self.server.port()
   self.stub = implementations.insecure_stub(_INVOCATION_DESCRIPTIONS, 'localhost', port)