• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2import grpc
3
4import api_pb2 as api__pb2
5
6
7class AFTLogStub(object):
8  # missing associated documentation comment in .proto file
9  pass
10
11  def __init__(self, channel):
12    """Constructor.
13
14    Args:
15      channel: A grpc.Channel.
16    """
17    self.AddVBMeta = channel.unary_unary(
18        '/aftl.AFTLog/AddVBMeta',
19        request_serializer=api__pb2.AddVBMetaRequest.SerializeToString,
20        response_deserializer=api__pb2.AddVBMetaResponse.FromString,
21        )
22    self.AnnotateVBMetaWithBuild = channel.stream_unary(
23        '/aftl.AFTLog/AnnotateVBMetaWithBuild',
24        request_serializer=api__pb2.AnnotateVBMetaWithBuildResponse.SerializeToString,
25        response_deserializer=api__pb2.AnnotateVBMetaWithBuildResponse.FromString,
26        )
27
28
29class AFTLogServicer(object):
30  # missing associated documentation comment in .proto file
31  pass
32
33  def AddVBMeta(self, request, context):
34    """Insert a new VBMeta structure into the log.
35    This request will effectively create 2 log entries:
36    - VBMeta itself
37    - Vendor annotations, which includes a reference to the VBMeta.
38    """
39    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
40    context.set_details('Method not implemented!')
41    raise NotImplementedError('Method not implemented!')
42
43  def AnnotateVBMetaWithBuild(self, request_iterator, context):
44    """Upload (or copy) the complete firmware image.
45    """
46    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
47    context.set_details('Method not implemented!')
48    raise NotImplementedError('Method not implemented!')
49
50
51def add_AFTLogServicer_to_server(servicer, server):
52  rpc_method_handlers = {
53      'AddVBMeta': grpc.unary_unary_rpc_method_handler(
54          servicer.AddVBMeta,
55          request_deserializer=api__pb2.AddVBMetaRequest.FromString,
56          response_serializer=api__pb2.AddVBMetaResponse.SerializeToString,
57      ),
58      'AnnotateVBMetaWithBuild': grpc.stream_unary_rpc_method_handler(
59          servicer.AnnotateVBMetaWithBuild,
60          request_deserializer=api__pb2.AnnotateVBMetaWithBuildResponse.FromString,
61          response_serializer=api__pb2.AnnotateVBMetaWithBuildResponse.SerializeToString,
62      ),
63  }
64  generic_handler = grpc.method_handlers_generic_handler(
65      'aftl.AFTLog', rpc_method_handlers)
66  server.add_generic_rpc_handlers((generic_handler,))
67