github.com/kchristidis/fabric@v1.0.4-0.20171028114726-837acd08cde1/bddtests/peer/admin_pb2.py (about)

     1  # Generated by the protocol buffer compiler.  DO NOT EDIT!
     2  # source: peer/admin.proto
     3  
     4  import sys
     5  _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
     6  from google.protobuf import descriptor as _descriptor
     7  from google.protobuf import message as _message
     8  from google.protobuf import reflection as _reflection
     9  from google.protobuf import symbol_database as _symbol_database
    10  from google.protobuf import descriptor_pb2
    11  # @@protoc_insertion_point(imports)
    12  
    13  _sym_db = _symbol_database.Default()
    14  
    15  
    16  from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
    17  
    18  
    19  DESCRIPTOR = _descriptor.FileDescriptor(
    20    name='peer/admin.proto',
    21    package='protos',
    22    syntax='proto3',
    23    serialized_pb=_b('\n\x10peer/admin.proto\x12\x06protos\x1a\x1bgoogle/protobuf/empty.proto\"\x9a\x01\n\x0cServerStatus\x12/\n\x06status\x18\x01 \x01(\x0e\x32\x1f.protos.ServerStatus.StatusCode\"Y\n\nStatusCode\x12\r\n\tUNDEFINED\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x05\"8\n\x0fLogLevelRequest\x12\x12\n\nlog_module\x18\x01 \x01(\t\x12\x11\n\tlog_level\x18\x02 \x01(\t\"9\n\x10LogLevelResponse\x12\x12\n\nlog_module\x18\x01 \x01(\t\x12\x11\n\tlog_level\x18\x02 \x01(\t2\xd5\x02\n\x05\x41\x64min\x12;\n\tGetStatus\x12\x16.google.protobuf.Empty\x1a\x14.protos.ServerStatus\"\x00\x12=\n\x0bStartServer\x12\x16.google.protobuf.Empty\x1a\x14.protos.ServerStatus\"\x00\x12<\n\nStopServer\x12\x16.google.protobuf.Empty\x1a\x14.protos.ServerStatus\"\x00\x12H\n\x11GetModuleLogLevel\x12\x17.protos.LogLevelRequest\x1a\x18.protos.LogLevelResponse\"\x00\x12H\n\x11SetModuleLogLevel\x12\x17.protos.LogLevelRequest\x1a\x18.protos.LogLevelResponse\"\x00\x42]\n\"org.hyperledger.fabric.protos.peerB\x0c\x41\x64minPackageZ)github.com/hyperledger/fabric/protos/peerb\x06proto3')
    24    ,
    25    dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,])
    26  _sym_db.RegisterFileDescriptor(DESCRIPTOR)
    27  
    28  
    29  
    30  _SERVERSTATUS_STATUSCODE = _descriptor.EnumDescriptor(
    31    name='StatusCode',
    32    full_name='protos.ServerStatus.StatusCode',
    33    filename=None,
    34    file=DESCRIPTOR,
    35    values=[
    36      _descriptor.EnumValueDescriptor(
    37        name='UNDEFINED', index=0, number=0,
    38        options=None,
    39        type=None),
    40      _descriptor.EnumValueDescriptor(
    41        name='STARTED', index=1, number=1,
    42        options=None,
    43        type=None),
    44      _descriptor.EnumValueDescriptor(
    45        name='STOPPED', index=2, number=2,
    46        options=None,
    47        type=None),
    48      _descriptor.EnumValueDescriptor(
    49        name='PAUSED', index=3, number=3,
    50        options=None,
    51        type=None),
    52      _descriptor.EnumValueDescriptor(
    53        name='ERROR', index=4, number=4,
    54        options=None,
    55        type=None),
    56      _descriptor.EnumValueDescriptor(
    57        name='UNKNOWN', index=5, number=5,
    58        options=None,
    59        type=None),
    60    ],
    61    containing_type=None,
    62    options=None,
    63    serialized_start=123,
    64    serialized_end=212,
    65  )
    66  _sym_db.RegisterEnumDescriptor(_SERVERSTATUS_STATUSCODE)
    67  
    68  
    69  _SERVERSTATUS = _descriptor.Descriptor(
    70    name='ServerStatus',
    71    full_name='protos.ServerStatus',
    72    filename=None,
    73    file=DESCRIPTOR,
    74    containing_type=None,
    75    fields=[
    76      _descriptor.FieldDescriptor(
    77        name='status', full_name='protos.ServerStatus.status', index=0,
    78        number=1, type=14, cpp_type=8, label=1,
    79        has_default_value=False, default_value=0,
    80        message_type=None, enum_type=None, containing_type=None,
    81        is_extension=False, extension_scope=None,
    82        options=None),
    83    ],
    84    extensions=[
    85    ],
    86    nested_types=[],
    87    enum_types=[
    88      _SERVERSTATUS_STATUSCODE,
    89    ],
    90    options=None,
    91    is_extendable=False,
    92    syntax='proto3',
    93    extension_ranges=[],
    94    oneofs=[
    95    ],
    96    serialized_start=58,
    97    serialized_end=212,
    98  )
    99  
   100  
   101  _LOGLEVELREQUEST = _descriptor.Descriptor(
   102    name='LogLevelRequest',
   103    full_name='protos.LogLevelRequest',
   104    filename=None,
   105    file=DESCRIPTOR,
   106    containing_type=None,
   107    fields=[
   108      _descriptor.FieldDescriptor(
   109        name='log_module', full_name='protos.LogLevelRequest.log_module', index=0,
   110        number=1, type=9, cpp_type=9, label=1,
   111        has_default_value=False, default_value=_b("").decode('utf-8'),
   112        message_type=None, enum_type=None, containing_type=None,
   113        is_extension=False, extension_scope=None,
   114        options=None),
   115      _descriptor.FieldDescriptor(
   116        name='log_level', full_name='protos.LogLevelRequest.log_level', index=1,
   117        number=2, type=9, cpp_type=9, label=1,
   118        has_default_value=False, default_value=_b("").decode('utf-8'),
   119        message_type=None, enum_type=None, containing_type=None,
   120        is_extension=False, extension_scope=None,
   121        options=None),
   122    ],
   123    extensions=[
   124    ],
   125    nested_types=[],
   126    enum_types=[
   127    ],
   128    options=None,
   129    is_extendable=False,
   130    syntax='proto3',
   131    extension_ranges=[],
   132    oneofs=[
   133    ],
   134    serialized_start=214,
   135    serialized_end=270,
   136  )
   137  
   138  
   139  _LOGLEVELRESPONSE = _descriptor.Descriptor(
   140    name='LogLevelResponse',
   141    full_name='protos.LogLevelResponse',
   142    filename=None,
   143    file=DESCRIPTOR,
   144    containing_type=None,
   145    fields=[
   146      _descriptor.FieldDescriptor(
   147        name='log_module', full_name='protos.LogLevelResponse.log_module', index=0,
   148        number=1, type=9, cpp_type=9, label=1,
   149        has_default_value=False, default_value=_b("").decode('utf-8'),
   150        message_type=None, enum_type=None, containing_type=None,
   151        is_extension=False, extension_scope=None,
   152        options=None),
   153      _descriptor.FieldDescriptor(
   154        name='log_level', full_name='protos.LogLevelResponse.log_level', index=1,
   155        number=2, type=9, cpp_type=9, label=1,
   156        has_default_value=False, default_value=_b("").decode('utf-8'),
   157        message_type=None, enum_type=None, containing_type=None,
   158        is_extension=False, extension_scope=None,
   159        options=None),
   160    ],
   161    extensions=[
   162    ],
   163    nested_types=[],
   164    enum_types=[
   165    ],
   166    options=None,
   167    is_extendable=False,
   168    syntax='proto3',
   169    extension_ranges=[],
   170    oneofs=[
   171    ],
   172    serialized_start=272,
   173    serialized_end=329,
   174  )
   175  
   176  _SERVERSTATUS.fields_by_name['status'].enum_type = _SERVERSTATUS_STATUSCODE
   177  _SERVERSTATUS_STATUSCODE.containing_type = _SERVERSTATUS
   178  DESCRIPTOR.message_types_by_name['ServerStatus'] = _SERVERSTATUS
   179  DESCRIPTOR.message_types_by_name['LogLevelRequest'] = _LOGLEVELREQUEST
   180  DESCRIPTOR.message_types_by_name['LogLevelResponse'] = _LOGLEVELRESPONSE
   181  
   182  ServerStatus = _reflection.GeneratedProtocolMessageType('ServerStatus', (_message.Message,), dict(
   183    DESCRIPTOR = _SERVERSTATUS,
   184    __module__ = 'peer.admin_pb2'
   185    # @@protoc_insertion_point(class_scope:protos.ServerStatus)
   186    ))
   187  _sym_db.RegisterMessage(ServerStatus)
   188  
   189  LogLevelRequest = _reflection.GeneratedProtocolMessageType('LogLevelRequest', (_message.Message,), dict(
   190    DESCRIPTOR = _LOGLEVELREQUEST,
   191    __module__ = 'peer.admin_pb2'
   192    # @@protoc_insertion_point(class_scope:protos.LogLevelRequest)
   193    ))
   194  _sym_db.RegisterMessage(LogLevelRequest)
   195  
   196  LogLevelResponse = _reflection.GeneratedProtocolMessageType('LogLevelResponse', (_message.Message,), dict(
   197    DESCRIPTOR = _LOGLEVELRESPONSE,
   198    __module__ = 'peer.admin_pb2'
   199    # @@protoc_insertion_point(class_scope:protos.LogLevelResponse)
   200    ))
   201  _sym_db.RegisterMessage(LogLevelResponse)
   202  
   203  
   204  DESCRIPTOR.has_options = True
   205  DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\"org.hyperledger.fabric.protos.peerB\014AdminPackageZ)github.com/hyperledger/fabric/protos/peer'))
   206  try:
   207    # THESE ELEMENTS WILL BE DEPRECATED.
   208    # Please use the generated *_pb2_grpc.py files instead.
   209    import grpc
   210    from grpc.framework.common import cardinality
   211    from grpc.framework.interfaces.face import utilities as face_utilities
   212    from grpc.beta import implementations as beta_implementations
   213    from grpc.beta import interfaces as beta_interfaces
   214  
   215  
   216    class AdminStub(object):
   217      """Interface exported by the server.
   218      """
   219  
   220      def __init__(self, channel):
   221        """Constructor.
   222  
   223        Args:
   224          channel: A grpc.Channel.
   225        """
   226        self.GetStatus = channel.unary_unary(
   227            '/protos.Admin/GetStatus',
   228            request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
   229            response_deserializer=ServerStatus.FromString,
   230            )
   231        self.StartServer = channel.unary_unary(
   232            '/protos.Admin/StartServer',
   233            request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
   234            response_deserializer=ServerStatus.FromString,
   235            )
   236        self.StopServer = channel.unary_unary(
   237            '/protos.Admin/StopServer',
   238            request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
   239            response_deserializer=ServerStatus.FromString,
   240            )
   241        self.GetModuleLogLevel = channel.unary_unary(
   242            '/protos.Admin/GetModuleLogLevel',
   243            request_serializer=LogLevelRequest.SerializeToString,
   244            response_deserializer=LogLevelResponse.FromString,
   245            )
   246        self.SetModuleLogLevel = channel.unary_unary(
   247            '/protos.Admin/SetModuleLogLevel',
   248            request_serializer=LogLevelRequest.SerializeToString,
   249            response_deserializer=LogLevelResponse.FromString,
   250            )
   251  
   252  
   253    class AdminServicer(object):
   254      """Interface exported by the server.
   255      """
   256  
   257      def GetStatus(self, request, context):
   258        """Return the serve status.
   259        """
   260        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
   261        context.set_details('Method not implemented!')
   262        raise NotImplementedError('Method not implemented!')
   263  
   264      def StartServer(self, request, context):
   265        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
   266        context.set_details('Method not implemented!')
   267        raise NotImplementedError('Method not implemented!')
   268  
   269      def StopServer(self, request, context):
   270        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
   271        context.set_details('Method not implemented!')
   272        raise NotImplementedError('Method not implemented!')
   273  
   274      def GetModuleLogLevel(self, request, context):
   275        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
   276        context.set_details('Method not implemented!')
   277        raise NotImplementedError('Method not implemented!')
   278  
   279      def SetModuleLogLevel(self, request, context):
   280        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
   281        context.set_details('Method not implemented!')
   282        raise NotImplementedError('Method not implemented!')
   283  
   284  
   285    def add_AdminServicer_to_server(servicer, server):
   286      rpc_method_handlers = {
   287          'GetStatus': grpc.unary_unary_rpc_method_handler(
   288              servicer.GetStatus,
   289              request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
   290              response_serializer=ServerStatus.SerializeToString,
   291          ),
   292          'StartServer': grpc.unary_unary_rpc_method_handler(
   293              servicer.StartServer,
   294              request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
   295              response_serializer=ServerStatus.SerializeToString,
   296          ),
   297          'StopServer': grpc.unary_unary_rpc_method_handler(
   298              servicer.StopServer,
   299              request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
   300              response_serializer=ServerStatus.SerializeToString,
   301          ),
   302          'GetModuleLogLevel': grpc.unary_unary_rpc_method_handler(
   303              servicer.GetModuleLogLevel,
   304              request_deserializer=LogLevelRequest.FromString,
   305              response_serializer=LogLevelResponse.SerializeToString,
   306          ),
   307          'SetModuleLogLevel': grpc.unary_unary_rpc_method_handler(
   308              servicer.SetModuleLogLevel,
   309              request_deserializer=LogLevelRequest.FromString,
   310              response_serializer=LogLevelResponse.SerializeToString,
   311          ),
   312      }
   313      generic_handler = grpc.method_handlers_generic_handler(
   314          'protos.Admin', rpc_method_handlers)
   315      server.add_generic_rpc_handlers((generic_handler,))
   316  
   317  
   318    class BetaAdminServicer(object):
   319      """The Beta API is deprecated for 0.15.0 and later.
   320  
   321      It is recommended to use the GA API (classes and functions in this
   322      file not marked beta) for all further purposes. This class was generated
   323      only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
   324      """Interface exported by the server.
   325      """
   326      def GetStatus(self, request, context):
   327        """Return the serve status.
   328        """
   329        context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
   330      def StartServer(self, request, context):
   331        context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
   332      def StopServer(self, request, context):
   333        context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
   334      def GetModuleLogLevel(self, request, context):
   335        context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
   336      def SetModuleLogLevel(self, request, context):
   337        context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
   338  
   339  
   340    class BetaAdminStub(object):
   341      """The Beta API is deprecated for 0.15.0 and later.
   342  
   343      It is recommended to use the GA API (classes and functions in this
   344      file not marked beta) for all further purposes. This class was generated
   345      only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
   346      """Interface exported by the server.
   347      """
   348      def GetStatus(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
   349        """Return the serve status.
   350        """
   351        raise NotImplementedError()
   352      GetStatus.future = None
   353      def StartServer(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
   354        raise NotImplementedError()
   355      StartServer.future = None
   356      def StopServer(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
   357        raise NotImplementedError()
   358      StopServer.future = None
   359      def GetModuleLogLevel(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
   360        raise NotImplementedError()
   361      GetModuleLogLevel.future = None
   362      def SetModuleLogLevel(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
   363        raise NotImplementedError()
   364      SetModuleLogLevel.future = None
   365  
   366  
   367    def beta_create_Admin_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
   368      """The Beta API is deprecated for 0.15.0 and later.
   369  
   370      It is recommended to use the GA API (classes and functions in this
   371      file not marked beta) for all further purposes. This function was
   372      generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
   373      request_deserializers = {
   374        ('protos.Admin', 'GetModuleLogLevel'): LogLevelRequest.FromString,
   375        ('protos.Admin', 'GetStatus'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
   376        ('protos.Admin', 'SetModuleLogLevel'): LogLevelRequest.FromString,
   377        ('protos.Admin', 'StartServer'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
   378        ('protos.Admin', 'StopServer'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
   379      }
   380      response_serializers = {
   381        ('protos.Admin', 'GetModuleLogLevel'): LogLevelResponse.SerializeToString,
   382        ('protos.Admin', 'GetStatus'): ServerStatus.SerializeToString,
   383        ('protos.Admin', 'SetModuleLogLevel'): LogLevelResponse.SerializeToString,
   384        ('protos.Admin', 'StartServer'): ServerStatus.SerializeToString,
   385        ('protos.Admin', 'StopServer'): ServerStatus.SerializeToString,
   386      }
   387      method_implementations = {
   388        ('protos.Admin', 'GetModuleLogLevel'): face_utilities.unary_unary_inline(servicer.GetModuleLogLevel),
   389        ('protos.Admin', 'GetStatus'): face_utilities.unary_unary_inline(servicer.GetStatus),
   390        ('protos.Admin', 'SetModuleLogLevel'): face_utilities.unary_unary_inline(servicer.SetModuleLogLevel),
   391        ('protos.Admin', 'StartServer'): face_utilities.unary_unary_inline(servicer.StartServer),
   392        ('protos.Admin', 'StopServer'): face_utilities.unary_unary_inline(servicer.StopServer),
   393      }
   394      server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
   395      return beta_implementations.server(method_implementations, options=server_options)
   396  
   397  
   398    def beta_create_Admin_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
   399      """The Beta API is deprecated for 0.15.0 and later.
   400  
   401      It is recommended to use the GA API (classes and functions in this
   402      file not marked beta) for all further purposes. This function was
   403      generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
   404      request_serializers = {
   405        ('protos.Admin', 'GetModuleLogLevel'): LogLevelRequest.SerializeToString,
   406        ('protos.Admin', 'GetStatus'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
   407        ('protos.Admin', 'SetModuleLogLevel'): LogLevelRequest.SerializeToString,
   408        ('protos.Admin', 'StartServer'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
   409        ('protos.Admin', 'StopServer'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
   410      }
   411      response_deserializers = {
   412        ('protos.Admin', 'GetModuleLogLevel'): LogLevelResponse.FromString,
   413        ('protos.Admin', 'GetStatus'): ServerStatus.FromString,
   414        ('protos.Admin', 'SetModuleLogLevel'): LogLevelResponse.FromString,
   415        ('protos.Admin', 'StartServer'): ServerStatus.FromString,
   416        ('protos.Admin', 'StopServer'): ServerStatus.FromString,
   417      }
   418      cardinalities = {
   419        'GetModuleLogLevel': cardinality.Cardinality.UNARY_UNARY,
   420        'GetStatus': cardinality.Cardinality.UNARY_UNARY,
   421        'SetModuleLogLevel': cardinality.Cardinality.UNARY_UNARY,
   422        'StartServer': cardinality.Cardinality.UNARY_UNARY,
   423        'StopServer': cardinality.Cardinality.UNARY_UNARY,
   424      }
   425      stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
   426      return beta_implementations.dynamic_stub(channel, 'protos.Admin', cardinalities, options=stub_options)
   427  except ImportError:
   428    pass
   429  # @@protoc_insertion_point(module_scope)