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