From deafd56f3e99e86743f56a5b51aa898612d7b861 Mon Sep 17 00:00:00 2001 From: vsoch Date: Sat, 30 Mar 2024 15:11:44 -0600 Subject: [PATCH] linting Signed-off-by: vsoch --- docs/algorithms.md | 4 +- plugins/README.md | 2 +- python/v1/rainbow/protos/memory_pb2.py | 43 +-- python/v1/rainbow/protos/memory_pb2_grpc.py | 121 ++++--- python/v1/rainbow/protos/rainbow_pb2.py | 78 ++--- python/v1/rainbow/protos/rainbow_pb2_grpc.py | 319 +++++++++++-------- 6 files changed, 325 insertions(+), 242 deletions(-) diff --git a/docs/algorithms.md b/docs/algorithms.md index e3a03c8..f72d23b 100644 --- a/docs/algorithms.md +++ b/docs/algorithms.md @@ -119,7 +119,7 @@ I understand this is likely not perfect for what everyone wants, but I believe i ## Match Algorithms -### Match +### Match The expliciy "match" type is going to look exactly at the type of a subsystem node, and return true (match) if it matches what the subsystem needs. For example, given this task: @@ -146,5 +146,3 @@ We would look for a node of type "shm" in the io subystem that is directly attac This algorithm speaks for itself. Given a listing of contender clusters (where all clusters have a match) we randomly choose. [home](/README.md#rainbow-scheduler) - - diff --git a/plugins/README.md b/plugins/README.md index 1a318c0..fa41810 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -3,4 +3,4 @@ - [backends](backends): are for the graph backend used - [algorithms](algorithms): is the algorithm used to match a subsystem to a slot (loaded by graphs) - Each graph can choose a different default, if desired - - [selection](selection): is the final cluster selection algorithm (e.g., selecting cluster from a final matched list) \ No newline at end of file + - [selection](selection): is the final cluster selection algorithm (e.g., selecting cluster from a final matched list) diff --git a/python/v1/rainbow/protos/memory_pb2.py b/python/v1/rainbow/protos/memory_pb2.py index 2551b04..4540da6 100644 --- a/python/v1/rainbow/protos/memory_pb2.py +++ b/python/v1/rainbow/protos/memory_pb2.py @@ -7,33 +7,36 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cmemory.proto\x12\x07service\"C\n\x0fRegisterRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\t\x12\x11\n\tsubsystem\x18\x03 \x01(\t\"2\n\x0eSatisfyRequest\x12\x0f\n\x07payload\x18\x01 \x01(\t\x12\x0f\n\x07matcher\x18\x02 \x01(\t\"\xb3\x01\n\x0fSatisfyResponse\x12\x10\n\x08\x63lusters\x18\x01 \x03(\t\x12\x33\n\x06status\x18\x02 \x01(\x0e\x32#.service.SatisfyResponse.ResultType\"Y\n\nResultType\x12\x1b\n\x17RESULT_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13RESULT_TYPE_SUCCESS\x10\x01\x12\x15\n\x11RESULT_TYPE_ERROR\x10\x02\"\x93\x01\n\x08Response\x12,\n\x06status\x18\x01 \x01(\x0e\x32\x1c.service.Response.ResultType\"Y\n\nResultType\x12\x1b\n\x17RESULT_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13RESULT_TYPE_SUCCESS\x10\x01\x12\x15\n\x11RESULT_TYPE_ERROR\x10\x02\x32\x88\x01\n\x0bMemoryGraph\x12>\n\x07Satisfy\x12\x17.service.SatisfyRequest\x1a\x18.service.SatisfyResponse\"\x00\x12\x39\n\x08Register\x12\x18.service.RegisterRequest\x1a\x11.service.Response\"\x00\x42@Z>github.com/converged-computing/rainbow/backends/memory/serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x0cmemory.proto\x12\x07service"C\n\x0fRegisterRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\t\x12\x11\n\tsubsystem\x18\x03 \x01(\t"2\n\x0eSatisfyRequest\x12\x0f\n\x07payload\x18\x01 \x01(\t\x12\x0f\n\x07matcher\x18\x02 \x01(\t"\xb3\x01\n\x0fSatisfyResponse\x12\x10\n\x08\x63lusters\x18\x01 \x03(\t\x12\x33\n\x06status\x18\x02 \x01(\x0e\x32#.service.SatisfyResponse.ResultType"Y\n\nResultType\x12\x1b\n\x17RESULT_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13RESULT_TYPE_SUCCESS\x10\x01\x12\x15\n\x11RESULT_TYPE_ERROR\x10\x02"\x93\x01\n\x08Response\x12,\n\x06status\x18\x01 \x01(\x0e\x32\x1c.service.Response.ResultType"Y\n\nResultType\x12\x1b\n\x17RESULT_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13RESULT_TYPE_SUCCESS\x10\x01\x12\x15\n\x11RESULT_TYPE_ERROR\x10\x02\x32\x88\x01\n\x0bMemoryGraph\x12>\n\x07Satisfy\x12\x17.service.SatisfyRequest\x1a\x18.service.SatisfyResponse"\x00\x12\x39\n\x08Register\x12\x18.service.RegisterRequest\x1a\x11.service.Response"\x00\x42@Z>github.com/converged-computing/rainbow/backends/memory/serviceb\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'memory_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "memory_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'Z>github.com/converged-computing/rainbow/backends/memory/service' - _globals['_REGISTERREQUEST']._serialized_start=25 - _globals['_REGISTERREQUEST']._serialized_end=92 - _globals['_SATISFYREQUEST']._serialized_start=94 - _globals['_SATISFYREQUEST']._serialized_end=144 - _globals['_SATISFYRESPONSE']._serialized_start=147 - _globals['_SATISFYRESPONSE']._serialized_end=326 - _globals['_SATISFYRESPONSE_RESULTTYPE']._serialized_start=237 - _globals['_SATISFYRESPONSE_RESULTTYPE']._serialized_end=326 - _globals['_RESPONSE']._serialized_start=329 - _globals['_RESPONSE']._serialized_end=476 - _globals['_RESPONSE_RESULTTYPE']._serialized_start=237 - _globals['_RESPONSE_RESULTTYPE']._serialized_end=326 - _globals['_MEMORYGRAPH']._serialized_start=479 - _globals['_MEMORYGRAPH']._serialized_end=615 + _globals["DESCRIPTOR"]._options = None + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"Z>github.com/converged-computing/rainbow/backends/memory/service" + _globals["_REGISTERREQUEST"]._serialized_start = 25 + _globals["_REGISTERREQUEST"]._serialized_end = 92 + _globals["_SATISFYREQUEST"]._serialized_start = 94 + _globals["_SATISFYREQUEST"]._serialized_end = 144 + _globals["_SATISFYRESPONSE"]._serialized_start = 147 + _globals["_SATISFYRESPONSE"]._serialized_end = 326 + _globals["_SATISFYRESPONSE_RESULTTYPE"]._serialized_start = 237 + _globals["_SATISFYRESPONSE_RESULTTYPE"]._serialized_end = 326 + _globals["_RESPONSE"]._serialized_start = 329 + _globals["_RESPONSE"]._serialized_end = 476 + _globals["_RESPONSE_RESULTTYPE"]._serialized_start = 237 + _globals["_RESPONSE_RESULTTYPE"]._serialized_end = 326 + _globals["_MEMORYGRAPH"]._serialized_start = 479 + _globals["_MEMORYGRAPH"]._serialized_end = 615 # @@protoc_insertion_point(module_scope) diff --git a/python/v1/rainbow/protos/memory_pb2_grpc.py b/python/v1/rainbow/protos/memory_pb2_grpc.py index 5c24f6f..16d6b76 100644 --- a/python/v1/rainbow/protos/memory_pb2_grpc.py +++ b/python/v1/rainbow/protos/memory_pb2_grpc.py @@ -15,15 +15,15 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Satisfy = channel.unary_unary( - '/service.MemoryGraph/Satisfy', - request_serializer=memory__pb2.SatisfyRequest.SerializeToString, - response_deserializer=memory__pb2.SatisfyResponse.FromString, - ) + "/service.MemoryGraph/Satisfy", + request_serializer=memory__pb2.SatisfyRequest.SerializeToString, + response_deserializer=memory__pb2.SatisfyResponse.FromString, + ) self.Register = channel.unary_unary( - '/service.MemoryGraph/Register', - request_serializer=memory__pb2.RegisterRequest.SerializeToString, - response_deserializer=memory__pb2.Response.FromString, - ) + "/service.MemoryGraph/Register", + request_serializer=memory__pb2.RegisterRequest.SerializeToString, + response_deserializer=memory__pb2.Response.FromString, + ) class MemoryGraphServicer(object): @@ -32,68 +32,93 @@ class MemoryGraphServicer(object): def Satisfy(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def Register(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_MemoryGraphServicer_to_server(servicer, server): rpc_method_handlers = { - 'Satisfy': grpc.unary_unary_rpc_method_handler( - servicer.Satisfy, - request_deserializer=memory__pb2.SatisfyRequest.FromString, - response_serializer=memory__pb2.SatisfyResponse.SerializeToString, - ), - 'Register': grpc.unary_unary_rpc_method_handler( - servicer.Register, - request_deserializer=memory__pb2.RegisterRequest.FromString, - response_serializer=memory__pb2.Response.SerializeToString, - ), + "Satisfy": grpc.unary_unary_rpc_method_handler( + servicer.Satisfy, + request_deserializer=memory__pb2.SatisfyRequest.FromString, + response_serializer=memory__pb2.SatisfyResponse.SerializeToString, + ), + "Register": grpc.unary_unary_rpc_method_handler( + servicer.Register, + request_deserializer=memory__pb2.RegisterRequest.FromString, + response_serializer=memory__pb2.Response.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'service.MemoryGraph', rpc_method_handlers) + "service.MemoryGraph", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class MemoryGraph(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Satisfy(request, + def Satisfy( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/service.MemoryGraph/Satisfy', + "/service.MemoryGraph/Satisfy", memory__pb2.SatisfyRequest.SerializeToString, memory__pb2.SatisfyResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def Register(request, + def Register( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/service.MemoryGraph/Register', + "/service.MemoryGraph/Register", memory__pb2.RegisterRequest.SerializeToString, memory__pb2.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/python/v1/rainbow/protos/rainbow_pb2.py b/python/v1/rainbow/protos/rainbow_pb2.py index 2091e9a..3e66da7 100644 --- a/python/v1/rainbow/protos/rainbow_pb2.py +++ b/python/v1/rainbow/protos/rainbow_pb2.py @@ -7,6 +7,7 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -14,45 +15,48 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rrainbow.proto\x12\x1e\x63onvergedcomputing.org.grpc.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"{\n\x0fRegisterRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06secret\x18\x02 \x01(\t\x12\r\n\x05nodes\x18\x03 \x01(\t\x12\x11\n\tsubsystem\x18\x04 \x01(\t\x12(\n\x04sent\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xcf\x01\n\x10SubmitJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12J\n\x08\x63lusters\x18\x02 \x03(\x0b\x32\x38.convergedcomputing.org.grpc.v1.SubmitJobRequest.Cluster\x12\x0f\n\x07jobspec\x18\x03 \x01(\t\x12(\n\x04sent\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a&\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"p\n\x12ReceiveJobsRequest\x12\x0f\n\x07\x63luster\x18\x01 \x01(\t\x12\x0e\n\x06secret\x18\x02 \x01(\t\x12\x0f\n\x07maxJobs\x18\x03 \x01(\x05\x12(\n\x04sent\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"n\n\x11\x41\x63\x63\x65ptJobsRequest\x12\x0f\n\x07\x63luster\x18\x01 \x01(\t\x12\x0e\n\x06secret\x18\x02 \x01(\t\x12\x0e\n\x06jobids\x18\x03 \x03(\x05\x12(\n\x04sent\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8e\x02\n\x10RegisterResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\x12\x0e\n\x06secret\x18\x03 \x01(\t\x12K\n\x06status\x18\x04 \x01(\x0e\x32;.convergedcomputing.org.grpc.v1.RegisterResponse.ResultType\"z\n\nResultType\x12\x18\n\x14REGISTER_UNSPECIFIED\x10\x00\x12\x14\n\x10REGISTER_SUCCESS\x10\x01\x12\x12\n\x0eREGISTER_ERROR\x10\x02\x12\x13\n\x0fREGISTER_DENIED\x10\x03\x12\x13\n\x0fREGISTER_EXISTS\x10\x04\"\xf4\x01\n\x11SubmitJobResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\r\n\x05jobid\x18\x02 \x01(\x05\x12\x0f\n\x07\x63luster\x18\x03 \x01(\t\x12L\n\x06status\x18\x04 \x01(\x0e\x32<.convergedcomputing.org.grpc.v1.SubmitJobResponse.ResultType\"]\n\nResultType\x12\x16\n\x12SUBMIT_UNSPECIFIED\x10\x00\x12\x12\n\x0eSUBMIT_SUCCESS\x10\x01\x12\x10\n\x0cSUBMIT_ERROR\x10\x02\x12\x11\n\rSUBMIT_DENIED\x10\x03\"\xe8\x02\n\x13ReceiveJobsResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12K\n\x04jobs\x18\x02 \x03(\x0b\x32=.convergedcomputing.org.grpc.v1.ReceiveJobsResponse.JobsEntry\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.convergedcomputing.org.grpc.v1.ReceiveJobsResponse.ResultType\x1a+\n\tJobsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"s\n\nResultType\x12\x1a\n\x16REQUEST_JOBS_NORESULTS\x10\x00\x12\x18\n\x14REQUEST_JOBS_SUCCESS\x10\x01\x12\x16\n\x12REQUEST_JOBS_ERROR\x10\x02\x12\x17\n\x13REQUEST_JOBS_DENIED\x10\x03\"\xd7\x01\n\x12\x41\x63\x63\x65ptJobsResponse\x12M\n\x06status\x18\x01 \x01(\x0e\x32=.convergedcomputing.org.grpc.v1.AcceptJobsResponse.ResultType\"r\n\nResultType\x12\x1b\n\x17RESULT_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13RESULT_TYPE_PARTIAL\x10\x01\x12\x17\n\x13RESULT_TYPE_SUCCESS\x10\x02\x12\x15\n\x11RESULT_TYPE_ERROR\x10\x03\x32\xd8\x04\n\x10RainbowScheduler\x12m\n\x08Register\x12/.convergedcomputing.org.grpc.v1.RegisterRequest\x1a\x30.convergedcomputing.org.grpc.v1.RegisterResponse\x12v\n\x11RegisterSubsystem\x12/.convergedcomputing.org.grpc.v1.RegisterRequest\x1a\x30.convergedcomputing.org.grpc.v1.RegisterResponse\x12p\n\tSubmitJob\x12\x30.convergedcomputing.org.grpc.v1.SubmitJobRequest\x1a\x31.convergedcomputing.org.grpc.v1.SubmitJobResponse\x12v\n\x0bReceiveJobs\x12\x32.convergedcomputing.org.grpc.v1.ReceiveJobsRequest\x1a\x33.convergedcomputing.org.grpc.v1.ReceiveJobsResponse\x12s\n\nAcceptJobs\x12\x31.convergedcomputing.org.grpc.v1.AcceptJobsRequest\x1a\x32.convergedcomputing.org.grpc.v1.AcceptJobsResponseB3Z1github.com/converged-computing/rainbow/pkg/api/v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\rrainbow.proto\x12\x1e\x63onvergedcomputing.org.grpc.v1\x1a\x1fgoogle/protobuf/timestamp.proto"{\n\x0fRegisterRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06secret\x18\x02 \x01(\t\x12\r\n\x05nodes\x18\x03 \x01(\t\x12\x11\n\tsubsystem\x18\x04 \x01(\t\x12(\n\x04sent\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xcf\x01\n\x10SubmitJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12J\n\x08\x63lusters\x18\x02 \x03(\x0b\x32\x38.convergedcomputing.org.grpc.v1.SubmitJobRequest.Cluster\x12\x0f\n\x07jobspec\x18\x03 \x01(\t\x12(\n\x04sent\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a&\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t"p\n\x12ReceiveJobsRequest\x12\x0f\n\x07\x63luster\x18\x01 \x01(\t\x12\x0e\n\x06secret\x18\x02 \x01(\t\x12\x0f\n\x07maxJobs\x18\x03 \x01(\x05\x12(\n\x04sent\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"n\n\x11\x41\x63\x63\x65ptJobsRequest\x12\x0f\n\x07\x63luster\x18\x01 \x01(\t\x12\x0e\n\x06secret\x18\x02 \x01(\t\x12\x0e\n\x06jobids\x18\x03 \x03(\x05\x12(\n\x04sent\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x8e\x02\n\x10RegisterResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\x12\x0e\n\x06secret\x18\x03 \x01(\t\x12K\n\x06status\x18\x04 \x01(\x0e\x32;.convergedcomputing.org.grpc.v1.RegisterResponse.ResultType"z\n\nResultType\x12\x18\n\x14REGISTER_UNSPECIFIED\x10\x00\x12\x14\n\x10REGISTER_SUCCESS\x10\x01\x12\x12\n\x0eREGISTER_ERROR\x10\x02\x12\x13\n\x0fREGISTER_DENIED\x10\x03\x12\x13\n\x0fREGISTER_EXISTS\x10\x04"\xf4\x01\n\x11SubmitJobResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\r\n\x05jobid\x18\x02 \x01(\x05\x12\x0f\n\x07\x63luster\x18\x03 \x01(\t\x12L\n\x06status\x18\x04 \x01(\x0e\x32<.convergedcomputing.org.grpc.v1.SubmitJobResponse.ResultType"]\n\nResultType\x12\x16\n\x12SUBMIT_UNSPECIFIED\x10\x00\x12\x12\n\x0eSUBMIT_SUCCESS\x10\x01\x12\x10\n\x0cSUBMIT_ERROR\x10\x02\x12\x11\n\rSUBMIT_DENIED\x10\x03"\xe8\x02\n\x13ReceiveJobsResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12K\n\x04jobs\x18\x02 \x03(\x0b\x32=.convergedcomputing.org.grpc.v1.ReceiveJobsResponse.JobsEntry\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.convergedcomputing.org.grpc.v1.ReceiveJobsResponse.ResultType\x1a+\n\tJobsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"s\n\nResultType\x12\x1a\n\x16REQUEST_JOBS_NORESULTS\x10\x00\x12\x18\n\x14REQUEST_JOBS_SUCCESS\x10\x01\x12\x16\n\x12REQUEST_JOBS_ERROR\x10\x02\x12\x17\n\x13REQUEST_JOBS_DENIED\x10\x03"\xd7\x01\n\x12\x41\x63\x63\x65ptJobsResponse\x12M\n\x06status\x18\x01 \x01(\x0e\x32=.convergedcomputing.org.grpc.v1.AcceptJobsResponse.ResultType"r\n\nResultType\x12\x1b\n\x17RESULT_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13RESULT_TYPE_PARTIAL\x10\x01\x12\x17\n\x13RESULT_TYPE_SUCCESS\x10\x02\x12\x15\n\x11RESULT_TYPE_ERROR\x10\x03\x32\xd8\x04\n\x10RainbowScheduler\x12m\n\x08Register\x12/.convergedcomputing.org.grpc.v1.RegisterRequest\x1a\x30.convergedcomputing.org.grpc.v1.RegisterResponse\x12v\n\x11RegisterSubsystem\x12/.convergedcomputing.org.grpc.v1.RegisterRequest\x1a\x30.convergedcomputing.org.grpc.v1.RegisterResponse\x12p\n\tSubmitJob\x12\x30.convergedcomputing.org.grpc.v1.SubmitJobRequest\x1a\x31.convergedcomputing.org.grpc.v1.SubmitJobResponse\x12v\n\x0bReceiveJobs\x12\x32.convergedcomputing.org.grpc.v1.ReceiveJobsRequest\x1a\x33.convergedcomputing.org.grpc.v1.ReceiveJobsResponse\x12s\n\nAcceptJobs\x12\x31.convergedcomputing.org.grpc.v1.AcceptJobsRequest\x1a\x32.convergedcomputing.org.grpc.v1.AcceptJobsResponseB3Z1github.com/converged-computing/rainbow/pkg/api/v1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'rainbow_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "rainbow_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'Z1github.com/converged-computing/rainbow/pkg/api/v1' - _globals['_RECEIVEJOBSRESPONSE_JOBSENTRY']._options = None - _globals['_RECEIVEJOBSRESPONSE_JOBSENTRY']._serialized_options = b'8\001' - _globals['_REGISTERREQUEST']._serialized_start=82 - _globals['_REGISTERREQUEST']._serialized_end=205 - _globals['_SUBMITJOBREQUEST']._serialized_start=208 - _globals['_SUBMITJOBREQUEST']._serialized_end=415 - _globals['_SUBMITJOBREQUEST_CLUSTER']._serialized_start=377 - _globals['_SUBMITJOBREQUEST_CLUSTER']._serialized_end=415 - _globals['_RECEIVEJOBSREQUEST']._serialized_start=417 - _globals['_RECEIVEJOBSREQUEST']._serialized_end=529 - _globals['_ACCEPTJOBSREQUEST']._serialized_start=531 - _globals['_ACCEPTJOBSREQUEST']._serialized_end=641 - _globals['_REGISTERRESPONSE']._serialized_start=644 - _globals['_REGISTERRESPONSE']._serialized_end=914 - _globals['_REGISTERRESPONSE_RESULTTYPE']._serialized_start=792 - _globals['_REGISTERRESPONSE_RESULTTYPE']._serialized_end=914 - _globals['_SUBMITJOBRESPONSE']._serialized_start=917 - _globals['_SUBMITJOBRESPONSE']._serialized_end=1161 - _globals['_SUBMITJOBRESPONSE_RESULTTYPE']._serialized_start=1068 - _globals['_SUBMITJOBRESPONSE_RESULTTYPE']._serialized_end=1161 - _globals['_RECEIVEJOBSRESPONSE']._serialized_start=1164 - _globals['_RECEIVEJOBSRESPONSE']._serialized_end=1524 - _globals['_RECEIVEJOBSRESPONSE_JOBSENTRY']._serialized_start=1364 - _globals['_RECEIVEJOBSRESPONSE_JOBSENTRY']._serialized_end=1407 - _globals['_RECEIVEJOBSRESPONSE_RESULTTYPE']._serialized_start=1409 - _globals['_RECEIVEJOBSRESPONSE_RESULTTYPE']._serialized_end=1524 - _globals['_ACCEPTJOBSRESPONSE']._serialized_start=1527 - _globals['_ACCEPTJOBSRESPONSE']._serialized_end=1742 - _globals['_ACCEPTJOBSRESPONSE_RESULTTYPE']._serialized_start=1628 - _globals['_ACCEPTJOBSRESPONSE_RESULTTYPE']._serialized_end=1742 - _globals['_RAINBOWSCHEDULER']._serialized_start=1745 - _globals['_RAINBOWSCHEDULER']._serialized_end=2345 + _globals["DESCRIPTOR"]._options = None + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"Z1github.com/converged-computing/rainbow/pkg/api/v1" + _globals["_RECEIVEJOBSRESPONSE_JOBSENTRY"]._options = None + _globals["_RECEIVEJOBSRESPONSE_JOBSENTRY"]._serialized_options = b"8\001" + _globals["_REGISTERREQUEST"]._serialized_start = 82 + _globals["_REGISTERREQUEST"]._serialized_end = 205 + _globals["_SUBMITJOBREQUEST"]._serialized_start = 208 + _globals["_SUBMITJOBREQUEST"]._serialized_end = 415 + _globals["_SUBMITJOBREQUEST_CLUSTER"]._serialized_start = 377 + _globals["_SUBMITJOBREQUEST_CLUSTER"]._serialized_end = 415 + _globals["_RECEIVEJOBSREQUEST"]._serialized_start = 417 + _globals["_RECEIVEJOBSREQUEST"]._serialized_end = 529 + _globals["_ACCEPTJOBSREQUEST"]._serialized_start = 531 + _globals["_ACCEPTJOBSREQUEST"]._serialized_end = 641 + _globals["_REGISTERRESPONSE"]._serialized_start = 644 + _globals["_REGISTERRESPONSE"]._serialized_end = 914 + _globals["_REGISTERRESPONSE_RESULTTYPE"]._serialized_start = 792 + _globals["_REGISTERRESPONSE_RESULTTYPE"]._serialized_end = 914 + _globals["_SUBMITJOBRESPONSE"]._serialized_start = 917 + _globals["_SUBMITJOBRESPONSE"]._serialized_end = 1161 + _globals["_SUBMITJOBRESPONSE_RESULTTYPE"]._serialized_start = 1068 + _globals["_SUBMITJOBRESPONSE_RESULTTYPE"]._serialized_end = 1161 + _globals["_RECEIVEJOBSRESPONSE"]._serialized_start = 1164 + _globals["_RECEIVEJOBSRESPONSE"]._serialized_end = 1524 + _globals["_RECEIVEJOBSRESPONSE_JOBSENTRY"]._serialized_start = 1364 + _globals["_RECEIVEJOBSRESPONSE_JOBSENTRY"]._serialized_end = 1407 + _globals["_RECEIVEJOBSRESPONSE_RESULTTYPE"]._serialized_start = 1409 + _globals["_RECEIVEJOBSRESPONSE_RESULTTYPE"]._serialized_end = 1524 + _globals["_ACCEPTJOBSRESPONSE"]._serialized_start = 1527 + _globals["_ACCEPTJOBSRESPONSE"]._serialized_end = 1742 + _globals["_ACCEPTJOBSRESPONSE_RESULTTYPE"]._serialized_start = 1628 + _globals["_ACCEPTJOBSRESPONSE_RESULTTYPE"]._serialized_end = 1742 + _globals["_RAINBOWSCHEDULER"]._serialized_start = 1745 + _globals["_RAINBOWSCHEDULER"]._serialized_end = 2345 # @@protoc_insertion_point(module_scope) diff --git a/python/v1/rainbow/protos/rainbow_pb2_grpc.py b/python/v1/rainbow/protos/rainbow_pb2_grpc.py index 2117808..581d9ea 100644 --- a/python/v1/rainbow/protos/rainbow_pb2_grpc.py +++ b/python/v1/rainbow/protos/rainbow_pb2_grpc.py @@ -6,8 +6,7 @@ class RainbowSchedulerStub(object): - """RainbowSchedulerService provides API endpoints for interacting with the central scheduler service - """ + """RainbowSchedulerService provides API endpoints for interacting with the central scheduler service""" def __init__(self, channel): """Constructor. @@ -16,191 +15,245 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Register = channel.unary_unary( - '/convergedcomputing.org.grpc.v1.RainbowScheduler/Register', - request_serializer=rainbow__pb2.RegisterRequest.SerializeToString, - response_deserializer=rainbow__pb2.RegisterResponse.FromString, - ) + "/convergedcomputing.org.grpc.v1.RainbowScheduler/Register", + request_serializer=rainbow__pb2.RegisterRequest.SerializeToString, + response_deserializer=rainbow__pb2.RegisterResponse.FromString, + ) self.RegisterSubsystem = channel.unary_unary( - '/convergedcomputing.org.grpc.v1.RainbowScheduler/RegisterSubsystem', - request_serializer=rainbow__pb2.RegisterRequest.SerializeToString, - response_deserializer=rainbow__pb2.RegisterResponse.FromString, - ) + "/convergedcomputing.org.grpc.v1.RainbowScheduler/RegisterSubsystem", + request_serializer=rainbow__pb2.RegisterRequest.SerializeToString, + response_deserializer=rainbow__pb2.RegisterResponse.FromString, + ) self.SubmitJob = channel.unary_unary( - '/convergedcomputing.org.grpc.v1.RainbowScheduler/SubmitJob', - request_serializer=rainbow__pb2.SubmitJobRequest.SerializeToString, - response_deserializer=rainbow__pb2.SubmitJobResponse.FromString, - ) + "/convergedcomputing.org.grpc.v1.RainbowScheduler/SubmitJob", + request_serializer=rainbow__pb2.SubmitJobRequest.SerializeToString, + response_deserializer=rainbow__pb2.SubmitJobResponse.FromString, + ) self.ReceiveJobs = channel.unary_unary( - '/convergedcomputing.org.grpc.v1.RainbowScheduler/ReceiveJobs', - request_serializer=rainbow__pb2.ReceiveJobsRequest.SerializeToString, - response_deserializer=rainbow__pb2.ReceiveJobsResponse.FromString, - ) + "/convergedcomputing.org.grpc.v1.RainbowScheduler/ReceiveJobs", + request_serializer=rainbow__pb2.ReceiveJobsRequest.SerializeToString, + response_deserializer=rainbow__pb2.ReceiveJobsResponse.FromString, + ) self.AcceptJobs = channel.unary_unary( - '/convergedcomputing.org.grpc.v1.RainbowScheduler/AcceptJobs', - request_serializer=rainbow__pb2.AcceptJobsRequest.SerializeToString, - response_deserializer=rainbow__pb2.AcceptJobsResponse.FromString, - ) + "/convergedcomputing.org.grpc.v1.RainbowScheduler/AcceptJobs", + request_serializer=rainbow__pb2.AcceptJobsRequest.SerializeToString, + response_deserializer=rainbow__pb2.AcceptJobsResponse.FromString, + ) class RainbowSchedulerServicer(object): - """RainbowSchedulerService provides API endpoints for interacting with the central scheduler service - """ + """RainbowSchedulerService provides API endpoints for interacting with the central scheduler service""" def Register(self, request, context): - """Register cluster - request to register a new cluster - """ + """Register cluster - request to register a new cluster""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def RegisterSubsystem(self, request, context): - """Register cluster - request to register a new cluster - """ + """Register cluster - request to register a new cluster""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def SubmitJob(self, request, context): - """Job Submission - request for submitting a job to a named cluster - """ + """Job Submission - request for submitting a job to a named cluster""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def ReceiveJobs(self, request, context): - """Request Job - ask the rainbow scheduler for up to max jobs - """ + """Request Job - ask the rainbow scheduler for up to max jobs""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def AcceptJobs(self, request, context): - """Accept Jobs - accept some number of jobs - """ + """Accept Jobs - accept some number of jobs""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_RainbowSchedulerServicer_to_server(servicer, server): rpc_method_handlers = { - 'Register': grpc.unary_unary_rpc_method_handler( - servicer.Register, - request_deserializer=rainbow__pb2.RegisterRequest.FromString, - response_serializer=rainbow__pb2.RegisterResponse.SerializeToString, - ), - 'RegisterSubsystem': grpc.unary_unary_rpc_method_handler( - servicer.RegisterSubsystem, - request_deserializer=rainbow__pb2.RegisterRequest.FromString, - response_serializer=rainbow__pb2.RegisterResponse.SerializeToString, - ), - 'SubmitJob': grpc.unary_unary_rpc_method_handler( - servicer.SubmitJob, - request_deserializer=rainbow__pb2.SubmitJobRequest.FromString, - response_serializer=rainbow__pb2.SubmitJobResponse.SerializeToString, - ), - 'ReceiveJobs': grpc.unary_unary_rpc_method_handler( - servicer.ReceiveJobs, - request_deserializer=rainbow__pb2.ReceiveJobsRequest.FromString, - response_serializer=rainbow__pb2.ReceiveJobsResponse.SerializeToString, - ), - 'AcceptJobs': grpc.unary_unary_rpc_method_handler( - servicer.AcceptJobs, - request_deserializer=rainbow__pb2.AcceptJobsRequest.FromString, - response_serializer=rainbow__pb2.AcceptJobsResponse.SerializeToString, - ), + "Register": grpc.unary_unary_rpc_method_handler( + servicer.Register, + request_deserializer=rainbow__pb2.RegisterRequest.FromString, + response_serializer=rainbow__pb2.RegisterResponse.SerializeToString, + ), + "RegisterSubsystem": grpc.unary_unary_rpc_method_handler( + servicer.RegisterSubsystem, + request_deserializer=rainbow__pb2.RegisterRequest.FromString, + response_serializer=rainbow__pb2.RegisterResponse.SerializeToString, + ), + "SubmitJob": grpc.unary_unary_rpc_method_handler( + servicer.SubmitJob, + request_deserializer=rainbow__pb2.SubmitJobRequest.FromString, + response_serializer=rainbow__pb2.SubmitJobResponse.SerializeToString, + ), + "ReceiveJobs": grpc.unary_unary_rpc_method_handler( + servicer.ReceiveJobs, + request_deserializer=rainbow__pb2.ReceiveJobsRequest.FromString, + response_serializer=rainbow__pb2.ReceiveJobsResponse.SerializeToString, + ), + "AcceptJobs": grpc.unary_unary_rpc_method_handler( + servicer.AcceptJobs, + request_deserializer=rainbow__pb2.AcceptJobsRequest.FromString, + response_serializer=rainbow__pb2.AcceptJobsResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'convergedcomputing.org.grpc.v1.RainbowScheduler', rpc_method_handlers) + "convergedcomputing.org.grpc.v1.RainbowScheduler", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class RainbowScheduler(object): - """RainbowSchedulerService provides API endpoints for interacting with the central scheduler service - """ + """RainbowSchedulerService provides API endpoints for interacting with the central scheduler service""" @staticmethod - def Register(request, + def Register( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/convergedcomputing.org.grpc.v1.RainbowScheduler/Register', + "/convergedcomputing.org.grpc.v1.RainbowScheduler/Register", rainbow__pb2.RegisterRequest.SerializeToString, rainbow__pb2.RegisterResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def RegisterSubsystem(request, + def RegisterSubsystem( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/convergedcomputing.org.grpc.v1.RainbowScheduler/RegisterSubsystem', + "/convergedcomputing.org.grpc.v1.RainbowScheduler/RegisterSubsystem", rainbow__pb2.RegisterRequest.SerializeToString, rainbow__pb2.RegisterResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def SubmitJob(request, + def SubmitJob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/convergedcomputing.org.grpc.v1.RainbowScheduler/SubmitJob', + "/convergedcomputing.org.grpc.v1.RainbowScheduler/SubmitJob", rainbow__pb2.SubmitJobRequest.SerializeToString, rainbow__pb2.SubmitJobResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def ReceiveJobs(request, + def ReceiveJobs( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/convergedcomputing.org.grpc.v1.RainbowScheduler/ReceiveJobs', + "/convergedcomputing.org.grpc.v1.RainbowScheduler/ReceiveJobs", rainbow__pb2.ReceiveJobsRequest.SerializeToString, rainbow__pb2.ReceiveJobsResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def AcceptJobs(request, + def AcceptJobs( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/convergedcomputing.org.grpc.v1.RainbowScheduler/AcceptJobs', + "/convergedcomputing.org.grpc.v1.RainbowScheduler/AcceptJobs", rainbow__pb2.AcceptJobsRequest.SerializeToString, rainbow__pb2.AcceptJobsResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + )