68 lines
2.3 KiB
Python
68 lines
2.3 KiB
Python
# pylint: skip-file
|
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
import grpc
|
|
|
|
import api_pb2 as api__pb2
|
|
|
|
|
|
class AFTLogStub(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.AddFirmwareInfo = channel.unary_unary(
|
|
'/aftl.AFTLog/AddFirmwareInfo',
|
|
request_serializer=api__pb2.AddFirmwareInfoRequest.SerializeToString,
|
|
response_deserializer=api__pb2.AddFirmwareInfoResponse.FromString,
|
|
)
|
|
self.AddFirmwareImage = channel.stream_unary(
|
|
'/aftl.AFTLog/AddFirmwareImage',
|
|
request_serializer=api__pb2.AddFirmwareImageRequest.SerializeToString,
|
|
response_deserializer=api__pb2.AddFirmwareImageResponse.FromString,
|
|
)
|
|
|
|
|
|
class AFTLogServicer(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def AddFirmwareInfo(self, request, context):
|
|
"""Insert a new VBMeta structure into the log.
|
|
This request will effectively create 2 log entries:
|
|
- VBMeta itself
|
|
- Vendor annotations, including a reference to the VBMeta leaf.
|
|
"""
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def AddFirmwareImage(self, request_iterator, context):
|
|
"""Upload (or copy) the complete firmware image.
|
|
"""
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_AFTLogServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'AddFirmwareInfo': grpc.unary_unary_rpc_method_handler(
|
|
servicer.AddFirmwareInfo,
|
|
request_deserializer=api__pb2.AddFirmwareInfoRequest.FromString,
|
|
response_serializer=api__pb2.AddFirmwareInfoResponse.SerializeToString,
|
|
),
|
|
'AddFirmwareImage': grpc.stream_unary_rpc_method_handler(
|
|
servicer.AddFirmwareImage,
|
|
request_deserializer=api__pb2.AddFirmwareImageRequest.FromString,
|
|
response_serializer=api__pb2.AddFirmwareImageResponse.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'aftl.AFTLog', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|