1# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! 2"""Client and server classes corresponding to protobuf-defined services.""" 3import grpc 4 5from chromiumos.longrunning import operations_pb2 as chromiumos_dot_longrunning_dot_operations__pb2 6from chromiumos.test.api import cros_test_cli_pb2 as chromiumos_dot_test_dot_api_dot_cros__test__cli__pb2 7 8 9class ExecutionServiceStub(object): 10 """Stable (build-agnostic) testing interface for executing tests and 11 extracting results. 12 """ 13 14 def __init__(self, channel): 15 """Constructor. 16 17 Args: 18 channel: A grpc.Channel. 19 """ 20 self.RunTests = channel.unary_unary( 21 '/chromiumos.test.api.ExecutionService/RunTests', 22 request_serializer=chromiumos_dot_test_dot_api_dot_cros__test__cli__pb2.CrosTestRequest.SerializeToString, 23 response_deserializer=chromiumos_dot_longrunning_dot_operations__pb2.Operation.FromString, 24 ) 25 26 27class ExecutionServiceServicer(object): 28 """Stable (build-agnostic) testing interface for executing tests and 29 extracting results. 30 """ 31 32 def RunTests(self, request, context): 33 """Provides the ability to run tests as specified per the request. 34 """ 35 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 36 context.set_details('Method not implemented!') 37 raise NotImplementedError('Method not implemented!') 38 39 40def add_ExecutionServiceServicer_to_server(servicer, server): 41 rpc_method_handlers = { 42 'RunTests': grpc.unary_unary_rpc_method_handler( 43 servicer.RunTests, 44 request_deserializer=chromiumos_dot_test_dot_api_dot_cros__test__cli__pb2.CrosTestRequest.FromString, 45 response_serializer=chromiumos_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, 46 ), 47 } 48 generic_handler = grpc.method_handlers_generic_handler( 49 'chromiumos.test.api.ExecutionService', rpc_method_handlers) 50 server.add_generic_rpc_handlers((generic_handler,)) 51 52 53 # This class is part of an EXPERIMENTAL API. 54class ExecutionService(object): 55 """Stable (build-agnostic) testing interface for executing tests and 56 extracting results. 57 """ 58 59 @staticmethod 60 def RunTests(request, 61 target, 62 options=(), 63 channel_credentials=None, 64 call_credentials=None, 65 insecure=False, 66 compression=None, 67 wait_for_ready=None, 68 timeout=None, 69 metadata=None): 70 return grpc.experimental.unary_unary(request, target, '/chromiumos.test.api.ExecutionService/RunTests', 71 chromiumos_dot_test_dot_api_dot_cros__test__cli__pb2.CrosTestRequest.SerializeToString, 72 chromiumos_dot_longrunning_dot_operations__pb2.Operation.FromString, 73 options, channel_credentials, 74 insecure, call_credentials, compression, wait_for_ready, timeout, metadata) 75