toolplane-python-client 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- toolplane/__init__.py +106 -0
- toolplane/common/__init__.py +93 -0
- toolplane/common/base_config.py +129 -0
- toolplane/common/base_connection_manager.py +171 -0
- toolplane/common/base_session_manager.py +321 -0
- toolplane/common/base_tool_manager.py +347 -0
- toolplane/common/constants.py +47 -0
- toolplane/common/utils.py +310 -0
- toolplane/core/__init__.py +67 -0
- toolplane/core/config.py +107 -0
- toolplane/core/connection.py +285 -0
- toolplane/core/errors.py +298 -0
- toolplane/core/machine.py +480 -0
- toolplane/core/request.py +775 -0
- toolplane/core/session.py +332 -0
- toolplane/core/session_context.py +514 -0
- toolplane/core/task.py +130 -0
- toolplane/core/tool.py +329 -0
- toolplane/http_core/__init__.py +37 -0
- toolplane/http_core/http_config.py +97 -0
- toolplane/http_core/http_connection.py +409 -0
- toolplane/http_core/http_machine.py +298 -0
- toolplane/http_core/http_request.py +748 -0
- toolplane/http_core/http_session.py +348 -0
- toolplane/http_core/http_session_context.py +491 -0
- toolplane/http_core/http_task.py +101 -0
- toolplane/http_core/http_tool.py +400 -0
- toolplane/interfaces/__init__.py +27 -0
- toolplane/interfaces/client_interface.py +122 -0
- toolplane/interfaces/connection_interface.py +193 -0
- toolplane/interfaces/event_interface.py +290 -0
- toolplane/interfaces/request_interface.py +439 -0
- toolplane/interfaces/session_interface.py +288 -0
- toolplane/interfaces/tool_interface.py +441 -0
- toolplane/proto/__init__.py +0 -0
- toolplane/proto/service_pb2.py +315 -0
- toolplane/proto/service_pb2_grpc.py +2240 -0
- toolplane/provider_cli.py +268 -0
- toolplane/provider_registry.py +77 -0
- toolplane/provider_runtime.py +302 -0
- toolplane/toolkits/__init__.py +0 -0
- toolplane/toolkits/standalone_tools/__init__.py +0 -0
- toolplane/toolkits/standalone_tools/create_directory.py +94 -0
- toolplane/toolkits/standalone_tools/create_file.py +124 -0
- toolplane/toolkits/standalone_tools/file_search.py +229 -0
- toolplane/toolkits/standalone_tools/grep_search.py +372 -0
- toolplane/toolkits/standalone_tools/launcher.py +146 -0
- toolplane/toolkits/standalone_tools/list_dir.py +395 -0
- toolplane/toolkits/standalone_tools/read_file.py +346 -0
- toolplane/toolkits/standalone_tools/replace_string_in_file.py +407 -0
- toolplane/toolkits/standalone_tools/run_tests.py +66 -0
- toolplane/toolkits/standalone_tools/semantic_search.py +485 -0
- toolplane/toolkits/standalone_tools/standalone_toolkit.py +979 -0
- toolplane/toolkits/standalone_tools/test_failure_analysis.py +618 -0
- toolplane/toolkits/standalone_tools/test_standalone_toolkit.py +517 -0
- toolplane/toolkits/swe/__init__.py +35 -0
- toolplane/toolkits/swe/create_directory.py +15 -0
- toolplane/toolkits/swe/create_file.py +15 -0
- toolplane/toolkits/swe/descriptions.py +273 -0
- toolplane/toolkits/swe/execute_bash.py +93 -0
- toolplane/toolkits/swe/file_editor.py +775 -0
- toolplane/toolkits/swe/file_search.py +16 -0
- toolplane/toolkits/swe/finish.py +50 -0
- toolplane/toolkits/swe/grep_search.py +19 -0
- toolplane/toolkits/swe/list_dir.py +407 -0
- toolplane/toolkits/swe/read_file.py +18 -0
- toolplane/toolkits/swe/replace_string_in_file.py +17 -0
- toolplane/toolkits/swe/search.py +260 -0
- toolplane/toolkits/swe/semantic_search.py +20 -0
- toolplane/toolkits/swe/str_replace_editor.py +647 -0
- toolplane/toolkits/swe/submit.py +29 -0
- toolplane/toolkits/swe/swe_toolkit.py +1296 -0
- toolplane/toolplane_client.py +686 -0
- toolplane/toolplane_http_client.py +681 -0
- toolplane/utils/__init__.py +3 -0
- toolplane/utils/schema.py +146 -0
- toolplane_python_client-0.1.0.dist-info/METADATA +543 -0
- toolplane_python_client-0.1.0.dist-info/RECORD +81 -0
- toolplane_python_client-0.1.0.dist-info/WHEEL +5 -0
- toolplane_python_client-0.1.0.dist-info/entry_points.txt +2 -0
- toolplane_python_client-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2240 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
from . import service_pb2 as proto_dot_service__pb2
|
|
7
|
+
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.80.0'
|
|
9
|
+
GRPC_VERSION = grpc.__version__
|
|
10
|
+
_version_not_supported = False
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from grpc._utilities import first_version_is_lower
|
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
15
|
+
except ImportError:
|
|
16
|
+
_version_not_supported = True
|
|
17
|
+
|
|
18
|
+
if _version_not_supported:
|
|
19
|
+
raise RuntimeError(
|
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
+
+ ' but the generated code in proto/service_pb2_grpc.py depends on'
|
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class ToolServiceStub(object):
|
|
29
|
+
"""======================
|
|
30
|
+
Tool Service
|
|
31
|
+
======================
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(self, channel):
|
|
35
|
+
"""Constructor.
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
channel: A grpc.Channel.
|
|
39
|
+
"""
|
|
40
|
+
self.RegisterTool = channel.unary_unary(
|
|
41
|
+
'/api.v1.ToolService/RegisterTool',
|
|
42
|
+
request_serializer=proto_dot_service__pb2.RegisterToolRequest.SerializeToString,
|
|
43
|
+
response_deserializer=proto_dot_service__pb2.RegisterToolResponse.FromString,
|
|
44
|
+
_registered_method=True)
|
|
45
|
+
self.ListTools = channel.unary_unary(
|
|
46
|
+
'/api.v1.ToolService/ListTools',
|
|
47
|
+
request_serializer=proto_dot_service__pb2.ListToolsRequest.SerializeToString,
|
|
48
|
+
response_deserializer=proto_dot_service__pb2.ListToolsResponse.FromString,
|
|
49
|
+
_registered_method=True)
|
|
50
|
+
self.GetTool = channel.unary_unary(
|
|
51
|
+
'/api.v1.ToolService/GetTool',
|
|
52
|
+
request_serializer=proto_dot_service__pb2.GetToolRequest.SerializeToString,
|
|
53
|
+
response_deserializer=proto_dot_service__pb2.GetToolResponse.FromString,
|
|
54
|
+
_registered_method=True)
|
|
55
|
+
self.GetToolById = channel.unary_unary(
|
|
56
|
+
'/api.v1.ToolService/GetToolById',
|
|
57
|
+
request_serializer=proto_dot_service__pb2.GetToolByIdRequest.SerializeToString,
|
|
58
|
+
response_deserializer=proto_dot_service__pb2.GetToolResponse.FromString,
|
|
59
|
+
_registered_method=True)
|
|
60
|
+
self.GetToolByName = channel.unary_unary(
|
|
61
|
+
'/api.v1.ToolService/GetToolByName',
|
|
62
|
+
request_serializer=proto_dot_service__pb2.GetToolByNameRequest.SerializeToString,
|
|
63
|
+
response_deserializer=proto_dot_service__pb2.GetToolResponse.FromString,
|
|
64
|
+
_registered_method=True)
|
|
65
|
+
self.DeleteTool = channel.unary_unary(
|
|
66
|
+
'/api.v1.ToolService/DeleteTool',
|
|
67
|
+
request_serializer=proto_dot_service__pb2.DeleteToolRequest.SerializeToString,
|
|
68
|
+
response_deserializer=proto_dot_service__pb2.DeleteToolResponse.FromString,
|
|
69
|
+
_registered_method=True)
|
|
70
|
+
self.UpdateToolPing = channel.unary_unary(
|
|
71
|
+
'/api.v1.ToolService/UpdateToolPing',
|
|
72
|
+
request_serializer=proto_dot_service__pb2.UpdateToolPingRequest.SerializeToString,
|
|
73
|
+
response_deserializer=proto_dot_service__pb2.Tool.FromString,
|
|
74
|
+
_registered_method=True)
|
|
75
|
+
self.StreamExecuteTool = channel.unary_stream(
|
|
76
|
+
'/api.v1.ToolService/StreamExecuteTool',
|
|
77
|
+
request_serializer=proto_dot_service__pb2.ExecuteToolRequest.SerializeToString,
|
|
78
|
+
response_deserializer=proto_dot_service__pb2.ExecuteToolChunk.FromString,
|
|
79
|
+
_registered_method=True)
|
|
80
|
+
self.ResumeStream = channel.unary_stream(
|
|
81
|
+
'/api.v1.ToolService/ResumeStream',
|
|
82
|
+
request_serializer=proto_dot_service__pb2.ResumeStreamRequest.SerializeToString,
|
|
83
|
+
response_deserializer=proto_dot_service__pb2.ExecuteToolChunk.FromString,
|
|
84
|
+
_registered_method=True)
|
|
85
|
+
self.InvokeTool = channel.unary_unary(
|
|
86
|
+
'/api.v1.ToolService/InvokeTool',
|
|
87
|
+
request_serializer=proto_dot_service__pb2.ExecuteToolRequest.SerializeToString,
|
|
88
|
+
response_deserializer=proto_dot_service__pb2.ExecuteToolResponse.FromString,
|
|
89
|
+
_registered_method=True)
|
|
90
|
+
self.ExecuteTool = channel.unary_unary(
|
|
91
|
+
'/api.v1.ToolService/ExecuteTool',
|
|
92
|
+
request_serializer=proto_dot_service__pb2.ExecuteToolRequest.SerializeToString,
|
|
93
|
+
response_deserializer=proto_dot_service__pb2.ExecuteToolResponse.FromString,
|
|
94
|
+
_registered_method=True)
|
|
95
|
+
self.HealthCheck = channel.unary_unary(
|
|
96
|
+
'/api.v1.ToolService/HealthCheck',
|
|
97
|
+
request_serializer=proto_dot_service__pb2.HealthCheckRequest.SerializeToString,
|
|
98
|
+
response_deserializer=proto_dot_service__pb2.HealthCheckResponse.FromString,
|
|
99
|
+
_registered_method=True)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class ToolServiceServicer(object):
|
|
103
|
+
"""======================
|
|
104
|
+
Tool Service
|
|
105
|
+
======================
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
def RegisterTool(self, request, context):
|
|
109
|
+
"""Tool management
|
|
110
|
+
"""
|
|
111
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
112
|
+
context.set_details('Method not implemented!')
|
|
113
|
+
raise NotImplementedError('Method not implemented!')
|
|
114
|
+
|
|
115
|
+
def ListTools(self, request, context):
|
|
116
|
+
"""Missing associated documentation comment in .proto file."""
|
|
117
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
118
|
+
context.set_details('Method not implemented!')
|
|
119
|
+
raise NotImplementedError('Method not implemented!')
|
|
120
|
+
|
|
121
|
+
def GetTool(self, request, context):
|
|
122
|
+
"""GetTool resolves a tool by ID or by name: exactly one of the reference
|
|
123
|
+
fields should be set; the ID wins when both are provided.
|
|
124
|
+
"""
|
|
125
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
126
|
+
context.set_details('Method not implemented!')
|
|
127
|
+
raise NotImplementedError('Method not implemented!')
|
|
128
|
+
|
|
129
|
+
def GetToolById(self, request, context):
|
|
130
|
+
"""Deprecated: use GetTool. Retained as a stable alias.
|
|
131
|
+
"""
|
|
132
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
133
|
+
context.set_details('Method not implemented!')
|
|
134
|
+
raise NotImplementedError('Method not implemented!')
|
|
135
|
+
|
|
136
|
+
def GetToolByName(self, request, context):
|
|
137
|
+
"""Deprecated: use GetTool. Retained as a stable alias.
|
|
138
|
+
"""
|
|
139
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
140
|
+
context.set_details('Method not implemented!')
|
|
141
|
+
raise NotImplementedError('Method not implemented!')
|
|
142
|
+
|
|
143
|
+
def DeleteTool(self, request, context):
|
|
144
|
+
"""Missing associated documentation comment in .proto file."""
|
|
145
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
146
|
+
context.set_details('Method not implemented!')
|
|
147
|
+
raise NotImplementedError('Method not implemented!')
|
|
148
|
+
|
|
149
|
+
def UpdateToolPing(self, request, context):
|
|
150
|
+
"""Missing associated documentation comment in .proto file."""
|
|
151
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
152
|
+
context.set_details('Method not implemented!')
|
|
153
|
+
raise NotImplementedError('Method not implemented!')
|
|
154
|
+
|
|
155
|
+
def StreamExecuteTool(self, request, context):
|
|
156
|
+
"""Consumer execution entrypoints create request-backed work on the control plane.
|
|
157
|
+
Request state, claim, and result lifecycle ownership stays in RequestsService.
|
|
158
|
+
"""
|
|
159
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
160
|
+
context.set_details('Method not implemented!')
|
|
161
|
+
raise NotImplementedError('Method not implemented!')
|
|
162
|
+
|
|
163
|
+
def ResumeStream(self, request, context):
|
|
164
|
+
"""Resume a broken stream from the last acknowledged sequence number.
|
|
165
|
+
The server retains a bounded chunk window; if the requested sequence has
|
|
166
|
+
fallen out of that window, this RPC fails with OUT_OF_RANGE.
|
|
167
|
+
"""
|
|
168
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
169
|
+
context.set_details('Method not implemented!')
|
|
170
|
+
raise NotImplementedError('Method not implemented!')
|
|
171
|
+
|
|
172
|
+
def InvokeTool(self, request, context):
|
|
173
|
+
"""InvokeTool is the v1 name for synchronous tool invocation. The call
|
|
174
|
+
creates the request and, when wait_timeout_seconds is positive, blocks
|
|
175
|
+
server-side until the request reaches a terminal state (returning
|
|
176
|
+
result/error) or the wait elapses (returning the in-flight state).
|
|
177
|
+
"""
|
|
178
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
179
|
+
context.set_details('Method not implemented!')
|
|
180
|
+
raise NotImplementedError('Method not implemented!')
|
|
181
|
+
|
|
182
|
+
def ExecuteTool(self, request, context):
|
|
183
|
+
"""Deprecated: use InvokeTool. Retained as a stable alias.
|
|
184
|
+
"""
|
|
185
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
186
|
+
context.set_details('Method not implemented!')
|
|
187
|
+
raise NotImplementedError('Method not implemented!')
|
|
188
|
+
|
|
189
|
+
def HealthCheck(self, request, context):
|
|
190
|
+
"""Health check (can be in any service or its own)
|
|
191
|
+
"""
|
|
192
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
193
|
+
context.set_details('Method not implemented!')
|
|
194
|
+
raise NotImplementedError('Method not implemented!')
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def add_ToolServiceServicer_to_server(servicer, server):
|
|
198
|
+
rpc_method_handlers = {
|
|
199
|
+
'RegisterTool': grpc.unary_unary_rpc_method_handler(
|
|
200
|
+
servicer.RegisterTool,
|
|
201
|
+
request_deserializer=proto_dot_service__pb2.RegisterToolRequest.FromString,
|
|
202
|
+
response_serializer=proto_dot_service__pb2.RegisterToolResponse.SerializeToString,
|
|
203
|
+
),
|
|
204
|
+
'ListTools': grpc.unary_unary_rpc_method_handler(
|
|
205
|
+
servicer.ListTools,
|
|
206
|
+
request_deserializer=proto_dot_service__pb2.ListToolsRequest.FromString,
|
|
207
|
+
response_serializer=proto_dot_service__pb2.ListToolsResponse.SerializeToString,
|
|
208
|
+
),
|
|
209
|
+
'GetTool': grpc.unary_unary_rpc_method_handler(
|
|
210
|
+
servicer.GetTool,
|
|
211
|
+
request_deserializer=proto_dot_service__pb2.GetToolRequest.FromString,
|
|
212
|
+
response_serializer=proto_dot_service__pb2.GetToolResponse.SerializeToString,
|
|
213
|
+
),
|
|
214
|
+
'GetToolById': grpc.unary_unary_rpc_method_handler(
|
|
215
|
+
servicer.GetToolById,
|
|
216
|
+
request_deserializer=proto_dot_service__pb2.GetToolByIdRequest.FromString,
|
|
217
|
+
response_serializer=proto_dot_service__pb2.GetToolResponse.SerializeToString,
|
|
218
|
+
),
|
|
219
|
+
'GetToolByName': grpc.unary_unary_rpc_method_handler(
|
|
220
|
+
servicer.GetToolByName,
|
|
221
|
+
request_deserializer=proto_dot_service__pb2.GetToolByNameRequest.FromString,
|
|
222
|
+
response_serializer=proto_dot_service__pb2.GetToolResponse.SerializeToString,
|
|
223
|
+
),
|
|
224
|
+
'DeleteTool': grpc.unary_unary_rpc_method_handler(
|
|
225
|
+
servicer.DeleteTool,
|
|
226
|
+
request_deserializer=proto_dot_service__pb2.DeleteToolRequest.FromString,
|
|
227
|
+
response_serializer=proto_dot_service__pb2.DeleteToolResponse.SerializeToString,
|
|
228
|
+
),
|
|
229
|
+
'UpdateToolPing': grpc.unary_unary_rpc_method_handler(
|
|
230
|
+
servicer.UpdateToolPing,
|
|
231
|
+
request_deserializer=proto_dot_service__pb2.UpdateToolPingRequest.FromString,
|
|
232
|
+
response_serializer=proto_dot_service__pb2.Tool.SerializeToString,
|
|
233
|
+
),
|
|
234
|
+
'StreamExecuteTool': grpc.unary_stream_rpc_method_handler(
|
|
235
|
+
servicer.StreamExecuteTool,
|
|
236
|
+
request_deserializer=proto_dot_service__pb2.ExecuteToolRequest.FromString,
|
|
237
|
+
response_serializer=proto_dot_service__pb2.ExecuteToolChunk.SerializeToString,
|
|
238
|
+
),
|
|
239
|
+
'ResumeStream': grpc.unary_stream_rpc_method_handler(
|
|
240
|
+
servicer.ResumeStream,
|
|
241
|
+
request_deserializer=proto_dot_service__pb2.ResumeStreamRequest.FromString,
|
|
242
|
+
response_serializer=proto_dot_service__pb2.ExecuteToolChunk.SerializeToString,
|
|
243
|
+
),
|
|
244
|
+
'InvokeTool': grpc.unary_unary_rpc_method_handler(
|
|
245
|
+
servicer.InvokeTool,
|
|
246
|
+
request_deserializer=proto_dot_service__pb2.ExecuteToolRequest.FromString,
|
|
247
|
+
response_serializer=proto_dot_service__pb2.ExecuteToolResponse.SerializeToString,
|
|
248
|
+
),
|
|
249
|
+
'ExecuteTool': grpc.unary_unary_rpc_method_handler(
|
|
250
|
+
servicer.ExecuteTool,
|
|
251
|
+
request_deserializer=proto_dot_service__pb2.ExecuteToolRequest.FromString,
|
|
252
|
+
response_serializer=proto_dot_service__pb2.ExecuteToolResponse.SerializeToString,
|
|
253
|
+
),
|
|
254
|
+
'HealthCheck': grpc.unary_unary_rpc_method_handler(
|
|
255
|
+
servicer.HealthCheck,
|
|
256
|
+
request_deserializer=proto_dot_service__pb2.HealthCheckRequest.FromString,
|
|
257
|
+
response_serializer=proto_dot_service__pb2.HealthCheckResponse.SerializeToString,
|
|
258
|
+
),
|
|
259
|
+
}
|
|
260
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
261
|
+
'api.v1.ToolService', rpc_method_handlers)
|
|
262
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
263
|
+
server.add_registered_method_handlers('api.v1.ToolService', rpc_method_handlers)
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
# This class is part of an EXPERIMENTAL API.
|
|
267
|
+
class ToolService(object):
|
|
268
|
+
"""======================
|
|
269
|
+
Tool Service
|
|
270
|
+
======================
|
|
271
|
+
"""
|
|
272
|
+
|
|
273
|
+
@staticmethod
|
|
274
|
+
def RegisterTool(request,
|
|
275
|
+
target,
|
|
276
|
+
options=(),
|
|
277
|
+
channel_credentials=None,
|
|
278
|
+
call_credentials=None,
|
|
279
|
+
insecure=False,
|
|
280
|
+
compression=None,
|
|
281
|
+
wait_for_ready=None,
|
|
282
|
+
timeout=None,
|
|
283
|
+
metadata=None):
|
|
284
|
+
return grpc.experimental.unary_unary(
|
|
285
|
+
request,
|
|
286
|
+
target,
|
|
287
|
+
'/api.v1.ToolService/RegisterTool',
|
|
288
|
+
proto_dot_service__pb2.RegisterToolRequest.SerializeToString,
|
|
289
|
+
proto_dot_service__pb2.RegisterToolResponse.FromString,
|
|
290
|
+
options,
|
|
291
|
+
channel_credentials,
|
|
292
|
+
insecure,
|
|
293
|
+
call_credentials,
|
|
294
|
+
compression,
|
|
295
|
+
wait_for_ready,
|
|
296
|
+
timeout,
|
|
297
|
+
metadata,
|
|
298
|
+
_registered_method=True)
|
|
299
|
+
|
|
300
|
+
@staticmethod
|
|
301
|
+
def ListTools(request,
|
|
302
|
+
target,
|
|
303
|
+
options=(),
|
|
304
|
+
channel_credentials=None,
|
|
305
|
+
call_credentials=None,
|
|
306
|
+
insecure=False,
|
|
307
|
+
compression=None,
|
|
308
|
+
wait_for_ready=None,
|
|
309
|
+
timeout=None,
|
|
310
|
+
metadata=None):
|
|
311
|
+
return grpc.experimental.unary_unary(
|
|
312
|
+
request,
|
|
313
|
+
target,
|
|
314
|
+
'/api.v1.ToolService/ListTools',
|
|
315
|
+
proto_dot_service__pb2.ListToolsRequest.SerializeToString,
|
|
316
|
+
proto_dot_service__pb2.ListToolsResponse.FromString,
|
|
317
|
+
options,
|
|
318
|
+
channel_credentials,
|
|
319
|
+
insecure,
|
|
320
|
+
call_credentials,
|
|
321
|
+
compression,
|
|
322
|
+
wait_for_ready,
|
|
323
|
+
timeout,
|
|
324
|
+
metadata,
|
|
325
|
+
_registered_method=True)
|
|
326
|
+
|
|
327
|
+
@staticmethod
|
|
328
|
+
def GetTool(request,
|
|
329
|
+
target,
|
|
330
|
+
options=(),
|
|
331
|
+
channel_credentials=None,
|
|
332
|
+
call_credentials=None,
|
|
333
|
+
insecure=False,
|
|
334
|
+
compression=None,
|
|
335
|
+
wait_for_ready=None,
|
|
336
|
+
timeout=None,
|
|
337
|
+
metadata=None):
|
|
338
|
+
return grpc.experimental.unary_unary(
|
|
339
|
+
request,
|
|
340
|
+
target,
|
|
341
|
+
'/api.v1.ToolService/GetTool',
|
|
342
|
+
proto_dot_service__pb2.GetToolRequest.SerializeToString,
|
|
343
|
+
proto_dot_service__pb2.GetToolResponse.FromString,
|
|
344
|
+
options,
|
|
345
|
+
channel_credentials,
|
|
346
|
+
insecure,
|
|
347
|
+
call_credentials,
|
|
348
|
+
compression,
|
|
349
|
+
wait_for_ready,
|
|
350
|
+
timeout,
|
|
351
|
+
metadata,
|
|
352
|
+
_registered_method=True)
|
|
353
|
+
|
|
354
|
+
@staticmethod
|
|
355
|
+
def GetToolById(request,
|
|
356
|
+
target,
|
|
357
|
+
options=(),
|
|
358
|
+
channel_credentials=None,
|
|
359
|
+
call_credentials=None,
|
|
360
|
+
insecure=False,
|
|
361
|
+
compression=None,
|
|
362
|
+
wait_for_ready=None,
|
|
363
|
+
timeout=None,
|
|
364
|
+
metadata=None):
|
|
365
|
+
return grpc.experimental.unary_unary(
|
|
366
|
+
request,
|
|
367
|
+
target,
|
|
368
|
+
'/api.v1.ToolService/GetToolById',
|
|
369
|
+
proto_dot_service__pb2.GetToolByIdRequest.SerializeToString,
|
|
370
|
+
proto_dot_service__pb2.GetToolResponse.FromString,
|
|
371
|
+
options,
|
|
372
|
+
channel_credentials,
|
|
373
|
+
insecure,
|
|
374
|
+
call_credentials,
|
|
375
|
+
compression,
|
|
376
|
+
wait_for_ready,
|
|
377
|
+
timeout,
|
|
378
|
+
metadata,
|
|
379
|
+
_registered_method=True)
|
|
380
|
+
|
|
381
|
+
@staticmethod
|
|
382
|
+
def GetToolByName(request,
|
|
383
|
+
target,
|
|
384
|
+
options=(),
|
|
385
|
+
channel_credentials=None,
|
|
386
|
+
call_credentials=None,
|
|
387
|
+
insecure=False,
|
|
388
|
+
compression=None,
|
|
389
|
+
wait_for_ready=None,
|
|
390
|
+
timeout=None,
|
|
391
|
+
metadata=None):
|
|
392
|
+
return grpc.experimental.unary_unary(
|
|
393
|
+
request,
|
|
394
|
+
target,
|
|
395
|
+
'/api.v1.ToolService/GetToolByName',
|
|
396
|
+
proto_dot_service__pb2.GetToolByNameRequest.SerializeToString,
|
|
397
|
+
proto_dot_service__pb2.GetToolResponse.FromString,
|
|
398
|
+
options,
|
|
399
|
+
channel_credentials,
|
|
400
|
+
insecure,
|
|
401
|
+
call_credentials,
|
|
402
|
+
compression,
|
|
403
|
+
wait_for_ready,
|
|
404
|
+
timeout,
|
|
405
|
+
metadata,
|
|
406
|
+
_registered_method=True)
|
|
407
|
+
|
|
408
|
+
@staticmethod
|
|
409
|
+
def DeleteTool(request,
|
|
410
|
+
target,
|
|
411
|
+
options=(),
|
|
412
|
+
channel_credentials=None,
|
|
413
|
+
call_credentials=None,
|
|
414
|
+
insecure=False,
|
|
415
|
+
compression=None,
|
|
416
|
+
wait_for_ready=None,
|
|
417
|
+
timeout=None,
|
|
418
|
+
metadata=None):
|
|
419
|
+
return grpc.experimental.unary_unary(
|
|
420
|
+
request,
|
|
421
|
+
target,
|
|
422
|
+
'/api.v1.ToolService/DeleteTool',
|
|
423
|
+
proto_dot_service__pb2.DeleteToolRequest.SerializeToString,
|
|
424
|
+
proto_dot_service__pb2.DeleteToolResponse.FromString,
|
|
425
|
+
options,
|
|
426
|
+
channel_credentials,
|
|
427
|
+
insecure,
|
|
428
|
+
call_credentials,
|
|
429
|
+
compression,
|
|
430
|
+
wait_for_ready,
|
|
431
|
+
timeout,
|
|
432
|
+
metadata,
|
|
433
|
+
_registered_method=True)
|
|
434
|
+
|
|
435
|
+
@staticmethod
|
|
436
|
+
def UpdateToolPing(request,
|
|
437
|
+
target,
|
|
438
|
+
options=(),
|
|
439
|
+
channel_credentials=None,
|
|
440
|
+
call_credentials=None,
|
|
441
|
+
insecure=False,
|
|
442
|
+
compression=None,
|
|
443
|
+
wait_for_ready=None,
|
|
444
|
+
timeout=None,
|
|
445
|
+
metadata=None):
|
|
446
|
+
return grpc.experimental.unary_unary(
|
|
447
|
+
request,
|
|
448
|
+
target,
|
|
449
|
+
'/api.v1.ToolService/UpdateToolPing',
|
|
450
|
+
proto_dot_service__pb2.UpdateToolPingRequest.SerializeToString,
|
|
451
|
+
proto_dot_service__pb2.Tool.FromString,
|
|
452
|
+
options,
|
|
453
|
+
channel_credentials,
|
|
454
|
+
insecure,
|
|
455
|
+
call_credentials,
|
|
456
|
+
compression,
|
|
457
|
+
wait_for_ready,
|
|
458
|
+
timeout,
|
|
459
|
+
metadata,
|
|
460
|
+
_registered_method=True)
|
|
461
|
+
|
|
462
|
+
@staticmethod
|
|
463
|
+
def StreamExecuteTool(request,
|
|
464
|
+
target,
|
|
465
|
+
options=(),
|
|
466
|
+
channel_credentials=None,
|
|
467
|
+
call_credentials=None,
|
|
468
|
+
insecure=False,
|
|
469
|
+
compression=None,
|
|
470
|
+
wait_for_ready=None,
|
|
471
|
+
timeout=None,
|
|
472
|
+
metadata=None):
|
|
473
|
+
return grpc.experimental.unary_stream(
|
|
474
|
+
request,
|
|
475
|
+
target,
|
|
476
|
+
'/api.v1.ToolService/StreamExecuteTool',
|
|
477
|
+
proto_dot_service__pb2.ExecuteToolRequest.SerializeToString,
|
|
478
|
+
proto_dot_service__pb2.ExecuteToolChunk.FromString,
|
|
479
|
+
options,
|
|
480
|
+
channel_credentials,
|
|
481
|
+
insecure,
|
|
482
|
+
call_credentials,
|
|
483
|
+
compression,
|
|
484
|
+
wait_for_ready,
|
|
485
|
+
timeout,
|
|
486
|
+
metadata,
|
|
487
|
+
_registered_method=True)
|
|
488
|
+
|
|
489
|
+
@staticmethod
|
|
490
|
+
def ResumeStream(request,
|
|
491
|
+
target,
|
|
492
|
+
options=(),
|
|
493
|
+
channel_credentials=None,
|
|
494
|
+
call_credentials=None,
|
|
495
|
+
insecure=False,
|
|
496
|
+
compression=None,
|
|
497
|
+
wait_for_ready=None,
|
|
498
|
+
timeout=None,
|
|
499
|
+
metadata=None):
|
|
500
|
+
return grpc.experimental.unary_stream(
|
|
501
|
+
request,
|
|
502
|
+
target,
|
|
503
|
+
'/api.v1.ToolService/ResumeStream',
|
|
504
|
+
proto_dot_service__pb2.ResumeStreamRequest.SerializeToString,
|
|
505
|
+
proto_dot_service__pb2.ExecuteToolChunk.FromString,
|
|
506
|
+
options,
|
|
507
|
+
channel_credentials,
|
|
508
|
+
insecure,
|
|
509
|
+
call_credentials,
|
|
510
|
+
compression,
|
|
511
|
+
wait_for_ready,
|
|
512
|
+
timeout,
|
|
513
|
+
metadata,
|
|
514
|
+
_registered_method=True)
|
|
515
|
+
|
|
516
|
+
@staticmethod
|
|
517
|
+
def InvokeTool(request,
|
|
518
|
+
target,
|
|
519
|
+
options=(),
|
|
520
|
+
channel_credentials=None,
|
|
521
|
+
call_credentials=None,
|
|
522
|
+
insecure=False,
|
|
523
|
+
compression=None,
|
|
524
|
+
wait_for_ready=None,
|
|
525
|
+
timeout=None,
|
|
526
|
+
metadata=None):
|
|
527
|
+
return grpc.experimental.unary_unary(
|
|
528
|
+
request,
|
|
529
|
+
target,
|
|
530
|
+
'/api.v1.ToolService/InvokeTool',
|
|
531
|
+
proto_dot_service__pb2.ExecuteToolRequest.SerializeToString,
|
|
532
|
+
proto_dot_service__pb2.ExecuteToolResponse.FromString,
|
|
533
|
+
options,
|
|
534
|
+
channel_credentials,
|
|
535
|
+
insecure,
|
|
536
|
+
call_credentials,
|
|
537
|
+
compression,
|
|
538
|
+
wait_for_ready,
|
|
539
|
+
timeout,
|
|
540
|
+
metadata,
|
|
541
|
+
_registered_method=True)
|
|
542
|
+
|
|
543
|
+
@staticmethod
|
|
544
|
+
def ExecuteTool(request,
|
|
545
|
+
target,
|
|
546
|
+
options=(),
|
|
547
|
+
channel_credentials=None,
|
|
548
|
+
call_credentials=None,
|
|
549
|
+
insecure=False,
|
|
550
|
+
compression=None,
|
|
551
|
+
wait_for_ready=None,
|
|
552
|
+
timeout=None,
|
|
553
|
+
metadata=None):
|
|
554
|
+
return grpc.experimental.unary_unary(
|
|
555
|
+
request,
|
|
556
|
+
target,
|
|
557
|
+
'/api.v1.ToolService/ExecuteTool',
|
|
558
|
+
proto_dot_service__pb2.ExecuteToolRequest.SerializeToString,
|
|
559
|
+
proto_dot_service__pb2.ExecuteToolResponse.FromString,
|
|
560
|
+
options,
|
|
561
|
+
channel_credentials,
|
|
562
|
+
insecure,
|
|
563
|
+
call_credentials,
|
|
564
|
+
compression,
|
|
565
|
+
wait_for_ready,
|
|
566
|
+
timeout,
|
|
567
|
+
metadata,
|
|
568
|
+
_registered_method=True)
|
|
569
|
+
|
|
570
|
+
@staticmethod
|
|
571
|
+
def HealthCheck(request,
|
|
572
|
+
target,
|
|
573
|
+
options=(),
|
|
574
|
+
channel_credentials=None,
|
|
575
|
+
call_credentials=None,
|
|
576
|
+
insecure=False,
|
|
577
|
+
compression=None,
|
|
578
|
+
wait_for_ready=None,
|
|
579
|
+
timeout=None,
|
|
580
|
+
metadata=None):
|
|
581
|
+
return grpc.experimental.unary_unary(
|
|
582
|
+
request,
|
|
583
|
+
target,
|
|
584
|
+
'/api.v1.ToolService/HealthCheck',
|
|
585
|
+
proto_dot_service__pb2.HealthCheckRequest.SerializeToString,
|
|
586
|
+
proto_dot_service__pb2.HealthCheckResponse.FromString,
|
|
587
|
+
options,
|
|
588
|
+
channel_credentials,
|
|
589
|
+
insecure,
|
|
590
|
+
call_credentials,
|
|
591
|
+
compression,
|
|
592
|
+
wait_for_ready,
|
|
593
|
+
timeout,
|
|
594
|
+
metadata,
|
|
595
|
+
_registered_method=True)
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
class SessionsServiceStub(object):
|
|
599
|
+
"""======================
|
|
600
|
+
Session Service
|
|
601
|
+
======================
|
|
602
|
+
"""
|
|
603
|
+
|
|
604
|
+
def __init__(self, channel):
|
|
605
|
+
"""Constructor.
|
|
606
|
+
|
|
607
|
+
Args:
|
|
608
|
+
channel: A grpc.Channel.
|
|
609
|
+
"""
|
|
610
|
+
self.CreateSession = channel.unary_unary(
|
|
611
|
+
'/api.v1.SessionsService/CreateSession',
|
|
612
|
+
request_serializer=proto_dot_service__pb2.CreateSessionRequest.SerializeToString,
|
|
613
|
+
response_deserializer=proto_dot_service__pb2.CreateSessionResponse.FromString,
|
|
614
|
+
_registered_method=True)
|
|
615
|
+
self.GetSession = channel.unary_unary(
|
|
616
|
+
'/api.v1.SessionsService/GetSession',
|
|
617
|
+
request_serializer=proto_dot_service__pb2.GetSessionRequest.SerializeToString,
|
|
618
|
+
response_deserializer=proto_dot_service__pb2.Session.FromString,
|
|
619
|
+
_registered_method=True)
|
|
620
|
+
self.ListSessions = channel.unary_unary(
|
|
621
|
+
'/api.v1.SessionsService/ListSessions',
|
|
622
|
+
request_serializer=proto_dot_service__pb2.ListSessionsRequest.SerializeToString,
|
|
623
|
+
response_deserializer=proto_dot_service__pb2.ListSessionsResponse.FromString,
|
|
624
|
+
_registered_method=True)
|
|
625
|
+
self.UpdateSession = channel.unary_unary(
|
|
626
|
+
'/api.v1.SessionsService/UpdateSession',
|
|
627
|
+
request_serializer=proto_dot_service__pb2.UpdateSessionRequest.SerializeToString,
|
|
628
|
+
response_deserializer=proto_dot_service__pb2.Session.FromString,
|
|
629
|
+
_registered_method=True)
|
|
630
|
+
self.DeleteSession = channel.unary_unary(
|
|
631
|
+
'/api.v1.SessionsService/DeleteSession',
|
|
632
|
+
request_serializer=proto_dot_service__pb2.DeleteSessionRequest.SerializeToString,
|
|
633
|
+
response_deserializer=proto_dot_service__pb2.DeleteSessionResponse.FromString,
|
|
634
|
+
_registered_method=True)
|
|
635
|
+
self.ListUserSessions = channel.unary_unary(
|
|
636
|
+
'/api.v1.SessionsService/ListUserSessions',
|
|
637
|
+
request_serializer=proto_dot_service__pb2.ListUserSessionsRequest.SerializeToString,
|
|
638
|
+
response_deserializer=proto_dot_service__pb2.ListUserSessionsResponse.FromString,
|
|
639
|
+
_registered_method=True)
|
|
640
|
+
self.BulkDeleteSessions = channel.unary_unary(
|
|
641
|
+
'/api.v1.SessionsService/BulkDeleteSessions',
|
|
642
|
+
request_serializer=proto_dot_service__pb2.BulkDeleteSessionsRequest.SerializeToString,
|
|
643
|
+
response_deserializer=proto_dot_service__pb2.BulkDeleteSessionsResponse.FromString,
|
|
644
|
+
_registered_method=True)
|
|
645
|
+
self.GetSessionStats = channel.unary_unary(
|
|
646
|
+
'/api.v1.SessionsService/GetSessionStats',
|
|
647
|
+
request_serializer=proto_dot_service__pb2.GetSessionStatsRequest.SerializeToString,
|
|
648
|
+
response_deserializer=proto_dot_service__pb2.GetSessionStatsResponse.FromString,
|
|
649
|
+
_registered_method=True)
|
|
650
|
+
self.InvalidateSession = channel.unary_unary(
|
|
651
|
+
'/api.v1.SessionsService/InvalidateSession',
|
|
652
|
+
request_serializer=proto_dot_service__pb2.InvalidateSessionRequest.SerializeToString,
|
|
653
|
+
response_deserializer=proto_dot_service__pb2.InvalidateSessionResponse.FromString,
|
|
654
|
+
_registered_method=True)
|
|
655
|
+
self.CreateApiKey = channel.unary_unary(
|
|
656
|
+
'/api.v1.SessionsService/CreateApiKey',
|
|
657
|
+
request_serializer=proto_dot_service__pb2.CreateApiKeyRequest.SerializeToString,
|
|
658
|
+
response_deserializer=proto_dot_service__pb2.ApiKey.FromString,
|
|
659
|
+
_registered_method=True)
|
|
660
|
+
self.ListApiKeys = channel.unary_unary(
|
|
661
|
+
'/api.v1.SessionsService/ListApiKeys',
|
|
662
|
+
request_serializer=proto_dot_service__pb2.ListApiKeysRequest.SerializeToString,
|
|
663
|
+
response_deserializer=proto_dot_service__pb2.ListApiKeysResponse.FromString,
|
|
664
|
+
_registered_method=True)
|
|
665
|
+
self.RevokeApiKey = channel.unary_unary(
|
|
666
|
+
'/api.v1.SessionsService/RevokeApiKey',
|
|
667
|
+
request_serializer=proto_dot_service__pb2.RevokeApiKeyRequest.SerializeToString,
|
|
668
|
+
response_deserializer=proto_dot_service__pb2.RevokeApiKeyResponse.FromString,
|
|
669
|
+
_registered_method=True)
|
|
670
|
+
self.ListAuditEvents = channel.unary_unary(
|
|
671
|
+
'/api.v1.SessionsService/ListAuditEvents',
|
|
672
|
+
request_serializer=proto_dot_service__pb2.ListAuditEventsRequest.SerializeToString,
|
|
673
|
+
response_deserializer=proto_dot_service__pb2.ListAuditEventsResponse.FromString,
|
|
674
|
+
_registered_method=True)
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
class SessionsServiceServicer(object):
|
|
678
|
+
"""======================
|
|
679
|
+
Session Service
|
|
680
|
+
======================
|
|
681
|
+
"""
|
|
682
|
+
|
|
683
|
+
def CreateSession(self, request, context):
|
|
684
|
+
"""Session management
|
|
685
|
+
"""
|
|
686
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
687
|
+
context.set_details('Method not implemented!')
|
|
688
|
+
raise NotImplementedError('Method not implemented!')
|
|
689
|
+
|
|
690
|
+
def GetSession(self, request, context):
|
|
691
|
+
"""Missing associated documentation comment in .proto file."""
|
|
692
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
693
|
+
context.set_details('Method not implemented!')
|
|
694
|
+
raise NotImplementedError('Method not implemented!')
|
|
695
|
+
|
|
696
|
+
def ListSessions(self, request, context):
|
|
697
|
+
"""Missing associated documentation comment in .proto file."""
|
|
698
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
699
|
+
context.set_details('Method not implemented!')
|
|
700
|
+
raise NotImplementedError('Method not implemented!')
|
|
701
|
+
|
|
702
|
+
def UpdateSession(self, request, context):
|
|
703
|
+
"""Missing associated documentation comment in .proto file."""
|
|
704
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
705
|
+
context.set_details('Method not implemented!')
|
|
706
|
+
raise NotImplementedError('Method not implemented!')
|
|
707
|
+
|
|
708
|
+
def DeleteSession(self, request, context):
|
|
709
|
+
"""Missing associated documentation comment in .proto file."""
|
|
710
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
711
|
+
context.set_details('Method not implemented!')
|
|
712
|
+
raise NotImplementedError('Method not implemented!')
|
|
713
|
+
|
|
714
|
+
def ListUserSessions(self, request, context):
|
|
715
|
+
"""Enhanced session management
|
|
716
|
+
"""
|
|
717
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
718
|
+
context.set_details('Method not implemented!')
|
|
719
|
+
raise NotImplementedError('Method not implemented!')
|
|
720
|
+
|
|
721
|
+
def BulkDeleteSessions(self, request, context):
|
|
722
|
+
"""Missing associated documentation comment in .proto file."""
|
|
723
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
724
|
+
context.set_details('Method not implemented!')
|
|
725
|
+
raise NotImplementedError('Method not implemented!')
|
|
726
|
+
|
|
727
|
+
def GetSessionStats(self, request, context):
|
|
728
|
+
"""Missing associated documentation comment in .proto file."""
|
|
729
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
730
|
+
context.set_details('Method not implemented!')
|
|
731
|
+
raise NotImplementedError('Method not implemented!')
|
|
732
|
+
|
|
733
|
+
def InvalidateSession(self, request, context):
|
|
734
|
+
"""InvalidateSession is the session-wide kill switch: it revokes every live
|
|
735
|
+
API key for the session so no credential authenticates again. Use it for
|
|
736
|
+
suspected key compromise; the session record itself is kept (use
|
|
737
|
+
DeleteSession to remove it).
|
|
738
|
+
"""
|
|
739
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
740
|
+
context.set_details('Method not implemented!')
|
|
741
|
+
raise NotImplementedError('Method not implemented!')
|
|
742
|
+
|
|
743
|
+
def CreateApiKey(self, request, context):
|
|
744
|
+
"""API key management
|
|
745
|
+
"""
|
|
746
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
747
|
+
context.set_details('Method not implemented!')
|
|
748
|
+
raise NotImplementedError('Method not implemented!')
|
|
749
|
+
|
|
750
|
+
def ListApiKeys(self, request, context):
|
|
751
|
+
"""Missing associated documentation comment in .proto file."""
|
|
752
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
753
|
+
context.set_details('Method not implemented!')
|
|
754
|
+
raise NotImplementedError('Method not implemented!')
|
|
755
|
+
|
|
756
|
+
def RevokeApiKey(self, request, context):
|
|
757
|
+
"""Missing associated documentation comment in .proto file."""
|
|
758
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
759
|
+
context.set_details('Method not implemented!')
|
|
760
|
+
raise NotImplementedError('Method not implemented!')
|
|
761
|
+
|
|
762
|
+
def ListAuditEvents(self, request, context):
|
|
763
|
+
"""List the durable audit trail: newest first, paged, filterable by
|
|
764
|
+
session, actor key, or event type. Admin capability gates the call —
|
|
765
|
+
the trail spans sessions when no session filter is given. System-
|
|
766
|
+
driven events and rows predating actor attribution carry an empty
|
|
767
|
+
actor_key_id; the trail is append-only and pruned on the audit
|
|
768
|
+
retention schedule.
|
|
769
|
+
"""
|
|
770
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
771
|
+
context.set_details('Method not implemented!')
|
|
772
|
+
raise NotImplementedError('Method not implemented!')
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
def add_SessionsServiceServicer_to_server(servicer, server):
|
|
776
|
+
rpc_method_handlers = {
|
|
777
|
+
'CreateSession': grpc.unary_unary_rpc_method_handler(
|
|
778
|
+
servicer.CreateSession,
|
|
779
|
+
request_deserializer=proto_dot_service__pb2.CreateSessionRequest.FromString,
|
|
780
|
+
response_serializer=proto_dot_service__pb2.CreateSessionResponse.SerializeToString,
|
|
781
|
+
),
|
|
782
|
+
'GetSession': grpc.unary_unary_rpc_method_handler(
|
|
783
|
+
servicer.GetSession,
|
|
784
|
+
request_deserializer=proto_dot_service__pb2.GetSessionRequest.FromString,
|
|
785
|
+
response_serializer=proto_dot_service__pb2.Session.SerializeToString,
|
|
786
|
+
),
|
|
787
|
+
'ListSessions': grpc.unary_unary_rpc_method_handler(
|
|
788
|
+
servicer.ListSessions,
|
|
789
|
+
request_deserializer=proto_dot_service__pb2.ListSessionsRequest.FromString,
|
|
790
|
+
response_serializer=proto_dot_service__pb2.ListSessionsResponse.SerializeToString,
|
|
791
|
+
),
|
|
792
|
+
'UpdateSession': grpc.unary_unary_rpc_method_handler(
|
|
793
|
+
servicer.UpdateSession,
|
|
794
|
+
request_deserializer=proto_dot_service__pb2.UpdateSessionRequest.FromString,
|
|
795
|
+
response_serializer=proto_dot_service__pb2.Session.SerializeToString,
|
|
796
|
+
),
|
|
797
|
+
'DeleteSession': grpc.unary_unary_rpc_method_handler(
|
|
798
|
+
servicer.DeleteSession,
|
|
799
|
+
request_deserializer=proto_dot_service__pb2.DeleteSessionRequest.FromString,
|
|
800
|
+
response_serializer=proto_dot_service__pb2.DeleteSessionResponse.SerializeToString,
|
|
801
|
+
),
|
|
802
|
+
'ListUserSessions': grpc.unary_unary_rpc_method_handler(
|
|
803
|
+
servicer.ListUserSessions,
|
|
804
|
+
request_deserializer=proto_dot_service__pb2.ListUserSessionsRequest.FromString,
|
|
805
|
+
response_serializer=proto_dot_service__pb2.ListUserSessionsResponse.SerializeToString,
|
|
806
|
+
),
|
|
807
|
+
'BulkDeleteSessions': grpc.unary_unary_rpc_method_handler(
|
|
808
|
+
servicer.BulkDeleteSessions,
|
|
809
|
+
request_deserializer=proto_dot_service__pb2.BulkDeleteSessionsRequest.FromString,
|
|
810
|
+
response_serializer=proto_dot_service__pb2.BulkDeleteSessionsResponse.SerializeToString,
|
|
811
|
+
),
|
|
812
|
+
'GetSessionStats': grpc.unary_unary_rpc_method_handler(
|
|
813
|
+
servicer.GetSessionStats,
|
|
814
|
+
request_deserializer=proto_dot_service__pb2.GetSessionStatsRequest.FromString,
|
|
815
|
+
response_serializer=proto_dot_service__pb2.GetSessionStatsResponse.SerializeToString,
|
|
816
|
+
),
|
|
817
|
+
'InvalidateSession': grpc.unary_unary_rpc_method_handler(
|
|
818
|
+
servicer.InvalidateSession,
|
|
819
|
+
request_deserializer=proto_dot_service__pb2.InvalidateSessionRequest.FromString,
|
|
820
|
+
response_serializer=proto_dot_service__pb2.InvalidateSessionResponse.SerializeToString,
|
|
821
|
+
),
|
|
822
|
+
'CreateApiKey': grpc.unary_unary_rpc_method_handler(
|
|
823
|
+
servicer.CreateApiKey,
|
|
824
|
+
request_deserializer=proto_dot_service__pb2.CreateApiKeyRequest.FromString,
|
|
825
|
+
response_serializer=proto_dot_service__pb2.ApiKey.SerializeToString,
|
|
826
|
+
),
|
|
827
|
+
'ListApiKeys': grpc.unary_unary_rpc_method_handler(
|
|
828
|
+
servicer.ListApiKeys,
|
|
829
|
+
request_deserializer=proto_dot_service__pb2.ListApiKeysRequest.FromString,
|
|
830
|
+
response_serializer=proto_dot_service__pb2.ListApiKeysResponse.SerializeToString,
|
|
831
|
+
),
|
|
832
|
+
'RevokeApiKey': grpc.unary_unary_rpc_method_handler(
|
|
833
|
+
servicer.RevokeApiKey,
|
|
834
|
+
request_deserializer=proto_dot_service__pb2.RevokeApiKeyRequest.FromString,
|
|
835
|
+
response_serializer=proto_dot_service__pb2.RevokeApiKeyResponse.SerializeToString,
|
|
836
|
+
),
|
|
837
|
+
'ListAuditEvents': grpc.unary_unary_rpc_method_handler(
|
|
838
|
+
servicer.ListAuditEvents,
|
|
839
|
+
request_deserializer=proto_dot_service__pb2.ListAuditEventsRequest.FromString,
|
|
840
|
+
response_serializer=proto_dot_service__pb2.ListAuditEventsResponse.SerializeToString,
|
|
841
|
+
),
|
|
842
|
+
}
|
|
843
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
844
|
+
'api.v1.SessionsService', rpc_method_handlers)
|
|
845
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
846
|
+
server.add_registered_method_handlers('api.v1.SessionsService', rpc_method_handlers)
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
# This class is part of an EXPERIMENTAL API.
|
|
850
|
+
class SessionsService(object):
|
|
851
|
+
"""======================
|
|
852
|
+
Session Service
|
|
853
|
+
======================
|
|
854
|
+
"""
|
|
855
|
+
|
|
856
|
+
@staticmethod
|
|
857
|
+
def CreateSession(request,
|
|
858
|
+
target,
|
|
859
|
+
options=(),
|
|
860
|
+
channel_credentials=None,
|
|
861
|
+
call_credentials=None,
|
|
862
|
+
insecure=False,
|
|
863
|
+
compression=None,
|
|
864
|
+
wait_for_ready=None,
|
|
865
|
+
timeout=None,
|
|
866
|
+
metadata=None):
|
|
867
|
+
return grpc.experimental.unary_unary(
|
|
868
|
+
request,
|
|
869
|
+
target,
|
|
870
|
+
'/api.v1.SessionsService/CreateSession',
|
|
871
|
+
proto_dot_service__pb2.CreateSessionRequest.SerializeToString,
|
|
872
|
+
proto_dot_service__pb2.CreateSessionResponse.FromString,
|
|
873
|
+
options,
|
|
874
|
+
channel_credentials,
|
|
875
|
+
insecure,
|
|
876
|
+
call_credentials,
|
|
877
|
+
compression,
|
|
878
|
+
wait_for_ready,
|
|
879
|
+
timeout,
|
|
880
|
+
metadata,
|
|
881
|
+
_registered_method=True)
|
|
882
|
+
|
|
883
|
+
@staticmethod
|
|
884
|
+
def GetSession(request,
|
|
885
|
+
target,
|
|
886
|
+
options=(),
|
|
887
|
+
channel_credentials=None,
|
|
888
|
+
call_credentials=None,
|
|
889
|
+
insecure=False,
|
|
890
|
+
compression=None,
|
|
891
|
+
wait_for_ready=None,
|
|
892
|
+
timeout=None,
|
|
893
|
+
metadata=None):
|
|
894
|
+
return grpc.experimental.unary_unary(
|
|
895
|
+
request,
|
|
896
|
+
target,
|
|
897
|
+
'/api.v1.SessionsService/GetSession',
|
|
898
|
+
proto_dot_service__pb2.GetSessionRequest.SerializeToString,
|
|
899
|
+
proto_dot_service__pb2.Session.FromString,
|
|
900
|
+
options,
|
|
901
|
+
channel_credentials,
|
|
902
|
+
insecure,
|
|
903
|
+
call_credentials,
|
|
904
|
+
compression,
|
|
905
|
+
wait_for_ready,
|
|
906
|
+
timeout,
|
|
907
|
+
metadata,
|
|
908
|
+
_registered_method=True)
|
|
909
|
+
|
|
910
|
+
@staticmethod
|
|
911
|
+
def ListSessions(request,
|
|
912
|
+
target,
|
|
913
|
+
options=(),
|
|
914
|
+
channel_credentials=None,
|
|
915
|
+
call_credentials=None,
|
|
916
|
+
insecure=False,
|
|
917
|
+
compression=None,
|
|
918
|
+
wait_for_ready=None,
|
|
919
|
+
timeout=None,
|
|
920
|
+
metadata=None):
|
|
921
|
+
return grpc.experimental.unary_unary(
|
|
922
|
+
request,
|
|
923
|
+
target,
|
|
924
|
+
'/api.v1.SessionsService/ListSessions',
|
|
925
|
+
proto_dot_service__pb2.ListSessionsRequest.SerializeToString,
|
|
926
|
+
proto_dot_service__pb2.ListSessionsResponse.FromString,
|
|
927
|
+
options,
|
|
928
|
+
channel_credentials,
|
|
929
|
+
insecure,
|
|
930
|
+
call_credentials,
|
|
931
|
+
compression,
|
|
932
|
+
wait_for_ready,
|
|
933
|
+
timeout,
|
|
934
|
+
metadata,
|
|
935
|
+
_registered_method=True)
|
|
936
|
+
|
|
937
|
+
@staticmethod
|
|
938
|
+
def UpdateSession(request,
|
|
939
|
+
target,
|
|
940
|
+
options=(),
|
|
941
|
+
channel_credentials=None,
|
|
942
|
+
call_credentials=None,
|
|
943
|
+
insecure=False,
|
|
944
|
+
compression=None,
|
|
945
|
+
wait_for_ready=None,
|
|
946
|
+
timeout=None,
|
|
947
|
+
metadata=None):
|
|
948
|
+
return grpc.experimental.unary_unary(
|
|
949
|
+
request,
|
|
950
|
+
target,
|
|
951
|
+
'/api.v1.SessionsService/UpdateSession',
|
|
952
|
+
proto_dot_service__pb2.UpdateSessionRequest.SerializeToString,
|
|
953
|
+
proto_dot_service__pb2.Session.FromString,
|
|
954
|
+
options,
|
|
955
|
+
channel_credentials,
|
|
956
|
+
insecure,
|
|
957
|
+
call_credentials,
|
|
958
|
+
compression,
|
|
959
|
+
wait_for_ready,
|
|
960
|
+
timeout,
|
|
961
|
+
metadata,
|
|
962
|
+
_registered_method=True)
|
|
963
|
+
|
|
964
|
+
@staticmethod
|
|
965
|
+
def DeleteSession(request,
|
|
966
|
+
target,
|
|
967
|
+
options=(),
|
|
968
|
+
channel_credentials=None,
|
|
969
|
+
call_credentials=None,
|
|
970
|
+
insecure=False,
|
|
971
|
+
compression=None,
|
|
972
|
+
wait_for_ready=None,
|
|
973
|
+
timeout=None,
|
|
974
|
+
metadata=None):
|
|
975
|
+
return grpc.experimental.unary_unary(
|
|
976
|
+
request,
|
|
977
|
+
target,
|
|
978
|
+
'/api.v1.SessionsService/DeleteSession',
|
|
979
|
+
proto_dot_service__pb2.DeleteSessionRequest.SerializeToString,
|
|
980
|
+
proto_dot_service__pb2.DeleteSessionResponse.FromString,
|
|
981
|
+
options,
|
|
982
|
+
channel_credentials,
|
|
983
|
+
insecure,
|
|
984
|
+
call_credentials,
|
|
985
|
+
compression,
|
|
986
|
+
wait_for_ready,
|
|
987
|
+
timeout,
|
|
988
|
+
metadata,
|
|
989
|
+
_registered_method=True)
|
|
990
|
+
|
|
991
|
+
@staticmethod
|
|
992
|
+
def ListUserSessions(request,
|
|
993
|
+
target,
|
|
994
|
+
options=(),
|
|
995
|
+
channel_credentials=None,
|
|
996
|
+
call_credentials=None,
|
|
997
|
+
insecure=False,
|
|
998
|
+
compression=None,
|
|
999
|
+
wait_for_ready=None,
|
|
1000
|
+
timeout=None,
|
|
1001
|
+
metadata=None):
|
|
1002
|
+
return grpc.experimental.unary_unary(
|
|
1003
|
+
request,
|
|
1004
|
+
target,
|
|
1005
|
+
'/api.v1.SessionsService/ListUserSessions',
|
|
1006
|
+
proto_dot_service__pb2.ListUserSessionsRequest.SerializeToString,
|
|
1007
|
+
proto_dot_service__pb2.ListUserSessionsResponse.FromString,
|
|
1008
|
+
options,
|
|
1009
|
+
channel_credentials,
|
|
1010
|
+
insecure,
|
|
1011
|
+
call_credentials,
|
|
1012
|
+
compression,
|
|
1013
|
+
wait_for_ready,
|
|
1014
|
+
timeout,
|
|
1015
|
+
metadata,
|
|
1016
|
+
_registered_method=True)
|
|
1017
|
+
|
|
1018
|
+
@staticmethod
|
|
1019
|
+
def BulkDeleteSessions(request,
|
|
1020
|
+
target,
|
|
1021
|
+
options=(),
|
|
1022
|
+
channel_credentials=None,
|
|
1023
|
+
call_credentials=None,
|
|
1024
|
+
insecure=False,
|
|
1025
|
+
compression=None,
|
|
1026
|
+
wait_for_ready=None,
|
|
1027
|
+
timeout=None,
|
|
1028
|
+
metadata=None):
|
|
1029
|
+
return grpc.experimental.unary_unary(
|
|
1030
|
+
request,
|
|
1031
|
+
target,
|
|
1032
|
+
'/api.v1.SessionsService/BulkDeleteSessions',
|
|
1033
|
+
proto_dot_service__pb2.BulkDeleteSessionsRequest.SerializeToString,
|
|
1034
|
+
proto_dot_service__pb2.BulkDeleteSessionsResponse.FromString,
|
|
1035
|
+
options,
|
|
1036
|
+
channel_credentials,
|
|
1037
|
+
insecure,
|
|
1038
|
+
call_credentials,
|
|
1039
|
+
compression,
|
|
1040
|
+
wait_for_ready,
|
|
1041
|
+
timeout,
|
|
1042
|
+
metadata,
|
|
1043
|
+
_registered_method=True)
|
|
1044
|
+
|
|
1045
|
+
@staticmethod
|
|
1046
|
+
def GetSessionStats(request,
|
|
1047
|
+
target,
|
|
1048
|
+
options=(),
|
|
1049
|
+
channel_credentials=None,
|
|
1050
|
+
call_credentials=None,
|
|
1051
|
+
insecure=False,
|
|
1052
|
+
compression=None,
|
|
1053
|
+
wait_for_ready=None,
|
|
1054
|
+
timeout=None,
|
|
1055
|
+
metadata=None):
|
|
1056
|
+
return grpc.experimental.unary_unary(
|
|
1057
|
+
request,
|
|
1058
|
+
target,
|
|
1059
|
+
'/api.v1.SessionsService/GetSessionStats',
|
|
1060
|
+
proto_dot_service__pb2.GetSessionStatsRequest.SerializeToString,
|
|
1061
|
+
proto_dot_service__pb2.GetSessionStatsResponse.FromString,
|
|
1062
|
+
options,
|
|
1063
|
+
channel_credentials,
|
|
1064
|
+
insecure,
|
|
1065
|
+
call_credentials,
|
|
1066
|
+
compression,
|
|
1067
|
+
wait_for_ready,
|
|
1068
|
+
timeout,
|
|
1069
|
+
metadata,
|
|
1070
|
+
_registered_method=True)
|
|
1071
|
+
|
|
1072
|
+
@staticmethod
|
|
1073
|
+
def InvalidateSession(request,
|
|
1074
|
+
target,
|
|
1075
|
+
options=(),
|
|
1076
|
+
channel_credentials=None,
|
|
1077
|
+
call_credentials=None,
|
|
1078
|
+
insecure=False,
|
|
1079
|
+
compression=None,
|
|
1080
|
+
wait_for_ready=None,
|
|
1081
|
+
timeout=None,
|
|
1082
|
+
metadata=None):
|
|
1083
|
+
return grpc.experimental.unary_unary(
|
|
1084
|
+
request,
|
|
1085
|
+
target,
|
|
1086
|
+
'/api.v1.SessionsService/InvalidateSession',
|
|
1087
|
+
proto_dot_service__pb2.InvalidateSessionRequest.SerializeToString,
|
|
1088
|
+
proto_dot_service__pb2.InvalidateSessionResponse.FromString,
|
|
1089
|
+
options,
|
|
1090
|
+
channel_credentials,
|
|
1091
|
+
insecure,
|
|
1092
|
+
call_credentials,
|
|
1093
|
+
compression,
|
|
1094
|
+
wait_for_ready,
|
|
1095
|
+
timeout,
|
|
1096
|
+
metadata,
|
|
1097
|
+
_registered_method=True)
|
|
1098
|
+
|
|
1099
|
+
@staticmethod
|
|
1100
|
+
def CreateApiKey(request,
|
|
1101
|
+
target,
|
|
1102
|
+
options=(),
|
|
1103
|
+
channel_credentials=None,
|
|
1104
|
+
call_credentials=None,
|
|
1105
|
+
insecure=False,
|
|
1106
|
+
compression=None,
|
|
1107
|
+
wait_for_ready=None,
|
|
1108
|
+
timeout=None,
|
|
1109
|
+
metadata=None):
|
|
1110
|
+
return grpc.experimental.unary_unary(
|
|
1111
|
+
request,
|
|
1112
|
+
target,
|
|
1113
|
+
'/api.v1.SessionsService/CreateApiKey',
|
|
1114
|
+
proto_dot_service__pb2.CreateApiKeyRequest.SerializeToString,
|
|
1115
|
+
proto_dot_service__pb2.ApiKey.FromString,
|
|
1116
|
+
options,
|
|
1117
|
+
channel_credentials,
|
|
1118
|
+
insecure,
|
|
1119
|
+
call_credentials,
|
|
1120
|
+
compression,
|
|
1121
|
+
wait_for_ready,
|
|
1122
|
+
timeout,
|
|
1123
|
+
metadata,
|
|
1124
|
+
_registered_method=True)
|
|
1125
|
+
|
|
1126
|
+
@staticmethod
|
|
1127
|
+
def ListApiKeys(request,
|
|
1128
|
+
target,
|
|
1129
|
+
options=(),
|
|
1130
|
+
channel_credentials=None,
|
|
1131
|
+
call_credentials=None,
|
|
1132
|
+
insecure=False,
|
|
1133
|
+
compression=None,
|
|
1134
|
+
wait_for_ready=None,
|
|
1135
|
+
timeout=None,
|
|
1136
|
+
metadata=None):
|
|
1137
|
+
return grpc.experimental.unary_unary(
|
|
1138
|
+
request,
|
|
1139
|
+
target,
|
|
1140
|
+
'/api.v1.SessionsService/ListApiKeys',
|
|
1141
|
+
proto_dot_service__pb2.ListApiKeysRequest.SerializeToString,
|
|
1142
|
+
proto_dot_service__pb2.ListApiKeysResponse.FromString,
|
|
1143
|
+
options,
|
|
1144
|
+
channel_credentials,
|
|
1145
|
+
insecure,
|
|
1146
|
+
call_credentials,
|
|
1147
|
+
compression,
|
|
1148
|
+
wait_for_ready,
|
|
1149
|
+
timeout,
|
|
1150
|
+
metadata,
|
|
1151
|
+
_registered_method=True)
|
|
1152
|
+
|
|
1153
|
+
@staticmethod
|
|
1154
|
+
def RevokeApiKey(request,
|
|
1155
|
+
target,
|
|
1156
|
+
options=(),
|
|
1157
|
+
channel_credentials=None,
|
|
1158
|
+
call_credentials=None,
|
|
1159
|
+
insecure=False,
|
|
1160
|
+
compression=None,
|
|
1161
|
+
wait_for_ready=None,
|
|
1162
|
+
timeout=None,
|
|
1163
|
+
metadata=None):
|
|
1164
|
+
return grpc.experimental.unary_unary(
|
|
1165
|
+
request,
|
|
1166
|
+
target,
|
|
1167
|
+
'/api.v1.SessionsService/RevokeApiKey',
|
|
1168
|
+
proto_dot_service__pb2.RevokeApiKeyRequest.SerializeToString,
|
|
1169
|
+
proto_dot_service__pb2.RevokeApiKeyResponse.FromString,
|
|
1170
|
+
options,
|
|
1171
|
+
channel_credentials,
|
|
1172
|
+
insecure,
|
|
1173
|
+
call_credentials,
|
|
1174
|
+
compression,
|
|
1175
|
+
wait_for_ready,
|
|
1176
|
+
timeout,
|
|
1177
|
+
metadata,
|
|
1178
|
+
_registered_method=True)
|
|
1179
|
+
|
|
1180
|
+
@staticmethod
|
|
1181
|
+
def ListAuditEvents(request,
|
|
1182
|
+
target,
|
|
1183
|
+
options=(),
|
|
1184
|
+
channel_credentials=None,
|
|
1185
|
+
call_credentials=None,
|
|
1186
|
+
insecure=False,
|
|
1187
|
+
compression=None,
|
|
1188
|
+
wait_for_ready=None,
|
|
1189
|
+
timeout=None,
|
|
1190
|
+
metadata=None):
|
|
1191
|
+
return grpc.experimental.unary_unary(
|
|
1192
|
+
request,
|
|
1193
|
+
target,
|
|
1194
|
+
'/api.v1.SessionsService/ListAuditEvents',
|
|
1195
|
+
proto_dot_service__pb2.ListAuditEventsRequest.SerializeToString,
|
|
1196
|
+
proto_dot_service__pb2.ListAuditEventsResponse.FromString,
|
|
1197
|
+
options,
|
|
1198
|
+
channel_credentials,
|
|
1199
|
+
insecure,
|
|
1200
|
+
call_credentials,
|
|
1201
|
+
compression,
|
|
1202
|
+
wait_for_ready,
|
|
1203
|
+
timeout,
|
|
1204
|
+
metadata,
|
|
1205
|
+
_registered_method=True)
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
class MachinesServiceStub(object):
|
|
1209
|
+
"""======================
|
|
1210
|
+
Machine Service
|
|
1211
|
+
======================
|
|
1212
|
+
"""
|
|
1213
|
+
|
|
1214
|
+
def __init__(self, channel):
|
|
1215
|
+
"""Constructor.
|
|
1216
|
+
|
|
1217
|
+
Args:
|
|
1218
|
+
channel: A grpc.Channel.
|
|
1219
|
+
"""
|
|
1220
|
+
self.RegisterMachine = channel.unary_unary(
|
|
1221
|
+
'/api.v1.MachinesService/RegisterMachine',
|
|
1222
|
+
request_serializer=proto_dot_service__pb2.RegisterMachineRequest.SerializeToString,
|
|
1223
|
+
response_deserializer=proto_dot_service__pb2.Machine.FromString,
|
|
1224
|
+
_registered_method=True)
|
|
1225
|
+
self.ListMachines = channel.unary_unary(
|
|
1226
|
+
'/api.v1.MachinesService/ListMachines',
|
|
1227
|
+
request_serializer=proto_dot_service__pb2.ListMachinesRequest.SerializeToString,
|
|
1228
|
+
response_deserializer=proto_dot_service__pb2.ListMachinesResponse.FromString,
|
|
1229
|
+
_registered_method=True)
|
|
1230
|
+
self.GetMachine = channel.unary_unary(
|
|
1231
|
+
'/api.v1.MachinesService/GetMachine',
|
|
1232
|
+
request_serializer=proto_dot_service__pb2.GetMachineRequest.SerializeToString,
|
|
1233
|
+
response_deserializer=proto_dot_service__pb2.Machine.FromString,
|
|
1234
|
+
_registered_method=True)
|
|
1235
|
+
self.UpdateMachinePing = channel.unary_unary(
|
|
1236
|
+
'/api.v1.MachinesService/UpdateMachinePing',
|
|
1237
|
+
request_serializer=proto_dot_service__pb2.UpdateMachinePingRequest.SerializeToString,
|
|
1238
|
+
response_deserializer=proto_dot_service__pb2.Machine.FromString,
|
|
1239
|
+
_registered_method=True)
|
|
1240
|
+
self.UnregisterMachine = channel.unary_unary(
|
|
1241
|
+
'/api.v1.MachinesService/UnregisterMachine',
|
|
1242
|
+
request_serializer=proto_dot_service__pb2.UnregisterMachineRequest.SerializeToString,
|
|
1243
|
+
response_deserializer=proto_dot_service__pb2.UnregisterMachineResponse.FromString,
|
|
1244
|
+
_registered_method=True)
|
|
1245
|
+
self.DrainMachine = channel.unary_unary(
|
|
1246
|
+
'/api.v1.MachinesService/DrainMachine',
|
|
1247
|
+
request_serializer=proto_dot_service__pb2.DrainMachineRequest.SerializeToString,
|
|
1248
|
+
response_deserializer=proto_dot_service__pb2.DrainMachineResponse.FromString,
|
|
1249
|
+
_registered_method=True)
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
class MachinesServiceServicer(object):
|
|
1253
|
+
"""======================
|
|
1254
|
+
Machine Service
|
|
1255
|
+
======================
|
|
1256
|
+
"""
|
|
1257
|
+
|
|
1258
|
+
def RegisterMachine(self, request, context):
|
|
1259
|
+
"""Machine management
|
|
1260
|
+
"""
|
|
1261
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1262
|
+
context.set_details('Method not implemented!')
|
|
1263
|
+
raise NotImplementedError('Method not implemented!')
|
|
1264
|
+
|
|
1265
|
+
def ListMachines(self, request, context):
|
|
1266
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1267
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1268
|
+
context.set_details('Method not implemented!')
|
|
1269
|
+
raise NotImplementedError('Method not implemented!')
|
|
1270
|
+
|
|
1271
|
+
def GetMachine(self, request, context):
|
|
1272
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1273
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1274
|
+
context.set_details('Method not implemented!')
|
|
1275
|
+
raise NotImplementedError('Method not implemented!')
|
|
1276
|
+
|
|
1277
|
+
def UpdateMachinePing(self, request, context):
|
|
1278
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1279
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1280
|
+
context.set_details('Method not implemented!')
|
|
1281
|
+
raise NotImplementedError('Method not implemented!')
|
|
1282
|
+
|
|
1283
|
+
def UnregisterMachine(self, request, context):
|
|
1284
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1285
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1286
|
+
context.set_details('Method not implemented!')
|
|
1287
|
+
raise NotImplementedError('Method not implemented!')
|
|
1288
|
+
|
|
1289
|
+
def DrainMachine(self, request, context):
|
|
1290
|
+
"""Drain a machine: finish in-flight work then unregister
|
|
1291
|
+
"""
|
|
1292
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1293
|
+
context.set_details('Method not implemented!')
|
|
1294
|
+
raise NotImplementedError('Method not implemented!')
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
def add_MachinesServiceServicer_to_server(servicer, server):
|
|
1298
|
+
rpc_method_handlers = {
|
|
1299
|
+
'RegisterMachine': grpc.unary_unary_rpc_method_handler(
|
|
1300
|
+
servicer.RegisterMachine,
|
|
1301
|
+
request_deserializer=proto_dot_service__pb2.RegisterMachineRequest.FromString,
|
|
1302
|
+
response_serializer=proto_dot_service__pb2.Machine.SerializeToString,
|
|
1303
|
+
),
|
|
1304
|
+
'ListMachines': grpc.unary_unary_rpc_method_handler(
|
|
1305
|
+
servicer.ListMachines,
|
|
1306
|
+
request_deserializer=proto_dot_service__pb2.ListMachinesRequest.FromString,
|
|
1307
|
+
response_serializer=proto_dot_service__pb2.ListMachinesResponse.SerializeToString,
|
|
1308
|
+
),
|
|
1309
|
+
'GetMachine': grpc.unary_unary_rpc_method_handler(
|
|
1310
|
+
servicer.GetMachine,
|
|
1311
|
+
request_deserializer=proto_dot_service__pb2.GetMachineRequest.FromString,
|
|
1312
|
+
response_serializer=proto_dot_service__pb2.Machine.SerializeToString,
|
|
1313
|
+
),
|
|
1314
|
+
'UpdateMachinePing': grpc.unary_unary_rpc_method_handler(
|
|
1315
|
+
servicer.UpdateMachinePing,
|
|
1316
|
+
request_deserializer=proto_dot_service__pb2.UpdateMachinePingRequest.FromString,
|
|
1317
|
+
response_serializer=proto_dot_service__pb2.Machine.SerializeToString,
|
|
1318
|
+
),
|
|
1319
|
+
'UnregisterMachine': grpc.unary_unary_rpc_method_handler(
|
|
1320
|
+
servicer.UnregisterMachine,
|
|
1321
|
+
request_deserializer=proto_dot_service__pb2.UnregisterMachineRequest.FromString,
|
|
1322
|
+
response_serializer=proto_dot_service__pb2.UnregisterMachineResponse.SerializeToString,
|
|
1323
|
+
),
|
|
1324
|
+
'DrainMachine': grpc.unary_unary_rpc_method_handler(
|
|
1325
|
+
servicer.DrainMachine,
|
|
1326
|
+
request_deserializer=proto_dot_service__pb2.DrainMachineRequest.FromString,
|
|
1327
|
+
response_serializer=proto_dot_service__pb2.DrainMachineResponse.SerializeToString,
|
|
1328
|
+
),
|
|
1329
|
+
}
|
|
1330
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
1331
|
+
'api.v1.MachinesService', rpc_method_handlers)
|
|
1332
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
1333
|
+
server.add_registered_method_handlers('api.v1.MachinesService', rpc_method_handlers)
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
# This class is part of an EXPERIMENTAL API.
|
|
1337
|
+
class MachinesService(object):
|
|
1338
|
+
"""======================
|
|
1339
|
+
Machine Service
|
|
1340
|
+
======================
|
|
1341
|
+
"""
|
|
1342
|
+
|
|
1343
|
+
@staticmethod
|
|
1344
|
+
def RegisterMachine(request,
|
|
1345
|
+
target,
|
|
1346
|
+
options=(),
|
|
1347
|
+
channel_credentials=None,
|
|
1348
|
+
call_credentials=None,
|
|
1349
|
+
insecure=False,
|
|
1350
|
+
compression=None,
|
|
1351
|
+
wait_for_ready=None,
|
|
1352
|
+
timeout=None,
|
|
1353
|
+
metadata=None):
|
|
1354
|
+
return grpc.experimental.unary_unary(
|
|
1355
|
+
request,
|
|
1356
|
+
target,
|
|
1357
|
+
'/api.v1.MachinesService/RegisterMachine',
|
|
1358
|
+
proto_dot_service__pb2.RegisterMachineRequest.SerializeToString,
|
|
1359
|
+
proto_dot_service__pb2.Machine.FromString,
|
|
1360
|
+
options,
|
|
1361
|
+
channel_credentials,
|
|
1362
|
+
insecure,
|
|
1363
|
+
call_credentials,
|
|
1364
|
+
compression,
|
|
1365
|
+
wait_for_ready,
|
|
1366
|
+
timeout,
|
|
1367
|
+
metadata,
|
|
1368
|
+
_registered_method=True)
|
|
1369
|
+
|
|
1370
|
+
@staticmethod
|
|
1371
|
+
def ListMachines(request,
|
|
1372
|
+
target,
|
|
1373
|
+
options=(),
|
|
1374
|
+
channel_credentials=None,
|
|
1375
|
+
call_credentials=None,
|
|
1376
|
+
insecure=False,
|
|
1377
|
+
compression=None,
|
|
1378
|
+
wait_for_ready=None,
|
|
1379
|
+
timeout=None,
|
|
1380
|
+
metadata=None):
|
|
1381
|
+
return grpc.experimental.unary_unary(
|
|
1382
|
+
request,
|
|
1383
|
+
target,
|
|
1384
|
+
'/api.v1.MachinesService/ListMachines',
|
|
1385
|
+
proto_dot_service__pb2.ListMachinesRequest.SerializeToString,
|
|
1386
|
+
proto_dot_service__pb2.ListMachinesResponse.FromString,
|
|
1387
|
+
options,
|
|
1388
|
+
channel_credentials,
|
|
1389
|
+
insecure,
|
|
1390
|
+
call_credentials,
|
|
1391
|
+
compression,
|
|
1392
|
+
wait_for_ready,
|
|
1393
|
+
timeout,
|
|
1394
|
+
metadata,
|
|
1395
|
+
_registered_method=True)
|
|
1396
|
+
|
|
1397
|
+
@staticmethod
|
|
1398
|
+
def GetMachine(request,
|
|
1399
|
+
target,
|
|
1400
|
+
options=(),
|
|
1401
|
+
channel_credentials=None,
|
|
1402
|
+
call_credentials=None,
|
|
1403
|
+
insecure=False,
|
|
1404
|
+
compression=None,
|
|
1405
|
+
wait_for_ready=None,
|
|
1406
|
+
timeout=None,
|
|
1407
|
+
metadata=None):
|
|
1408
|
+
return grpc.experimental.unary_unary(
|
|
1409
|
+
request,
|
|
1410
|
+
target,
|
|
1411
|
+
'/api.v1.MachinesService/GetMachine',
|
|
1412
|
+
proto_dot_service__pb2.GetMachineRequest.SerializeToString,
|
|
1413
|
+
proto_dot_service__pb2.Machine.FromString,
|
|
1414
|
+
options,
|
|
1415
|
+
channel_credentials,
|
|
1416
|
+
insecure,
|
|
1417
|
+
call_credentials,
|
|
1418
|
+
compression,
|
|
1419
|
+
wait_for_ready,
|
|
1420
|
+
timeout,
|
|
1421
|
+
metadata,
|
|
1422
|
+
_registered_method=True)
|
|
1423
|
+
|
|
1424
|
+
@staticmethod
|
|
1425
|
+
def UpdateMachinePing(request,
|
|
1426
|
+
target,
|
|
1427
|
+
options=(),
|
|
1428
|
+
channel_credentials=None,
|
|
1429
|
+
call_credentials=None,
|
|
1430
|
+
insecure=False,
|
|
1431
|
+
compression=None,
|
|
1432
|
+
wait_for_ready=None,
|
|
1433
|
+
timeout=None,
|
|
1434
|
+
metadata=None):
|
|
1435
|
+
return grpc.experimental.unary_unary(
|
|
1436
|
+
request,
|
|
1437
|
+
target,
|
|
1438
|
+
'/api.v1.MachinesService/UpdateMachinePing',
|
|
1439
|
+
proto_dot_service__pb2.UpdateMachinePingRequest.SerializeToString,
|
|
1440
|
+
proto_dot_service__pb2.Machine.FromString,
|
|
1441
|
+
options,
|
|
1442
|
+
channel_credentials,
|
|
1443
|
+
insecure,
|
|
1444
|
+
call_credentials,
|
|
1445
|
+
compression,
|
|
1446
|
+
wait_for_ready,
|
|
1447
|
+
timeout,
|
|
1448
|
+
metadata,
|
|
1449
|
+
_registered_method=True)
|
|
1450
|
+
|
|
1451
|
+
@staticmethod
|
|
1452
|
+
def UnregisterMachine(request,
|
|
1453
|
+
target,
|
|
1454
|
+
options=(),
|
|
1455
|
+
channel_credentials=None,
|
|
1456
|
+
call_credentials=None,
|
|
1457
|
+
insecure=False,
|
|
1458
|
+
compression=None,
|
|
1459
|
+
wait_for_ready=None,
|
|
1460
|
+
timeout=None,
|
|
1461
|
+
metadata=None):
|
|
1462
|
+
return grpc.experimental.unary_unary(
|
|
1463
|
+
request,
|
|
1464
|
+
target,
|
|
1465
|
+
'/api.v1.MachinesService/UnregisterMachine',
|
|
1466
|
+
proto_dot_service__pb2.UnregisterMachineRequest.SerializeToString,
|
|
1467
|
+
proto_dot_service__pb2.UnregisterMachineResponse.FromString,
|
|
1468
|
+
options,
|
|
1469
|
+
channel_credentials,
|
|
1470
|
+
insecure,
|
|
1471
|
+
call_credentials,
|
|
1472
|
+
compression,
|
|
1473
|
+
wait_for_ready,
|
|
1474
|
+
timeout,
|
|
1475
|
+
metadata,
|
|
1476
|
+
_registered_method=True)
|
|
1477
|
+
|
|
1478
|
+
@staticmethod
|
|
1479
|
+
def DrainMachine(request,
|
|
1480
|
+
target,
|
|
1481
|
+
options=(),
|
|
1482
|
+
channel_credentials=None,
|
|
1483
|
+
call_credentials=None,
|
|
1484
|
+
insecure=False,
|
|
1485
|
+
compression=None,
|
|
1486
|
+
wait_for_ready=None,
|
|
1487
|
+
timeout=None,
|
|
1488
|
+
metadata=None):
|
|
1489
|
+
return grpc.experimental.unary_unary(
|
|
1490
|
+
request,
|
|
1491
|
+
target,
|
|
1492
|
+
'/api.v1.MachinesService/DrainMachine',
|
|
1493
|
+
proto_dot_service__pb2.DrainMachineRequest.SerializeToString,
|
|
1494
|
+
proto_dot_service__pb2.DrainMachineResponse.FromString,
|
|
1495
|
+
options,
|
|
1496
|
+
channel_credentials,
|
|
1497
|
+
insecure,
|
|
1498
|
+
call_credentials,
|
|
1499
|
+
compression,
|
|
1500
|
+
wait_for_ready,
|
|
1501
|
+
timeout,
|
|
1502
|
+
metadata,
|
|
1503
|
+
_registered_method=True)
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
class RequestsServiceStub(object):
|
|
1507
|
+
"""======================
|
|
1508
|
+
Request Service
|
|
1509
|
+
======================
|
|
1510
|
+
"""
|
|
1511
|
+
|
|
1512
|
+
def __init__(self, channel):
|
|
1513
|
+
"""Constructor.
|
|
1514
|
+
|
|
1515
|
+
Args:
|
|
1516
|
+
channel: A grpc.Channel.
|
|
1517
|
+
"""
|
|
1518
|
+
self.CreateRequest = channel.unary_unary(
|
|
1519
|
+
'/api.v1.RequestsService/CreateRequest',
|
|
1520
|
+
request_serializer=proto_dot_service__pb2.CreateRequestRequest.SerializeToString,
|
|
1521
|
+
response_deserializer=proto_dot_service__pb2.Request.FromString,
|
|
1522
|
+
_registered_method=True)
|
|
1523
|
+
self.GetRequest = channel.unary_unary(
|
|
1524
|
+
'/api.v1.RequestsService/GetRequest',
|
|
1525
|
+
request_serializer=proto_dot_service__pb2.GetRequestRequest.SerializeToString,
|
|
1526
|
+
response_deserializer=proto_dot_service__pb2.Request.FromString,
|
|
1527
|
+
_registered_method=True)
|
|
1528
|
+
self.ListRequests = channel.unary_unary(
|
|
1529
|
+
'/api.v1.RequestsService/ListRequests',
|
|
1530
|
+
request_serializer=proto_dot_service__pb2.ListRequestsRequest.SerializeToString,
|
|
1531
|
+
response_deserializer=proto_dot_service__pb2.ListRequestsResponse.FromString,
|
|
1532
|
+
_registered_method=True)
|
|
1533
|
+
self.UpdateRequest = channel.unary_unary(
|
|
1534
|
+
'/api.v1.RequestsService/UpdateRequest',
|
|
1535
|
+
request_serializer=proto_dot_service__pb2.UpdateRequestRequest.SerializeToString,
|
|
1536
|
+
response_deserializer=proto_dot_service__pb2.Request.FromString,
|
|
1537
|
+
_registered_method=True)
|
|
1538
|
+
self.ClaimRequest = channel.unary_unary(
|
|
1539
|
+
'/api.v1.RequestsService/ClaimRequest',
|
|
1540
|
+
request_serializer=proto_dot_service__pb2.ClaimRequestRequest.SerializeToString,
|
|
1541
|
+
response_deserializer=proto_dot_service__pb2.Request.FromString,
|
|
1542
|
+
_registered_method=True)
|
|
1543
|
+
self.ClaimNextRequest = channel.unary_unary(
|
|
1544
|
+
'/api.v1.RequestsService/ClaimNextRequest',
|
|
1545
|
+
request_serializer=proto_dot_service__pb2.ClaimNextRequestRequest.SerializeToString,
|
|
1546
|
+
response_deserializer=proto_dot_service__pb2.ClaimNextRequestResponse.FromString,
|
|
1547
|
+
_registered_method=True)
|
|
1548
|
+
self.CancelRequest = channel.unary_unary(
|
|
1549
|
+
'/api.v1.RequestsService/CancelRequest',
|
|
1550
|
+
request_serializer=proto_dot_service__pb2.CancelRequestRequest.SerializeToString,
|
|
1551
|
+
response_deserializer=proto_dot_service__pb2.CancelRequestResponse.FromString,
|
|
1552
|
+
_registered_method=True)
|
|
1553
|
+
self.SubmitRequestResult = channel.unary_unary(
|
|
1554
|
+
'/api.v1.RequestsService/SubmitRequestResult',
|
|
1555
|
+
request_serializer=proto_dot_service__pb2.SubmitRequestResultRequest.SerializeToString,
|
|
1556
|
+
response_deserializer=proto_dot_service__pb2.SubmitRequestResultResponse.FromString,
|
|
1557
|
+
_registered_method=True)
|
|
1558
|
+
self.AppendRequestChunks = channel.unary_unary(
|
|
1559
|
+
'/api.v1.RequestsService/AppendRequestChunks',
|
|
1560
|
+
request_serializer=proto_dot_service__pb2.AppendRequestChunksRequest.SerializeToString,
|
|
1561
|
+
response_deserializer=proto_dot_service__pb2.AppendRequestChunksResponse.FromString,
|
|
1562
|
+
_registered_method=True)
|
|
1563
|
+
self.GetRequestChunks = channel.unary_unary(
|
|
1564
|
+
'/api.v1.RequestsService/GetRequestChunks',
|
|
1565
|
+
request_serializer=proto_dot_service__pb2.GetRequestChunksRequest.SerializeToString,
|
|
1566
|
+
response_deserializer=proto_dot_service__pb2.GetRequestChunksResponse.FromString,
|
|
1567
|
+
_registered_method=True)
|
|
1568
|
+
self.RenewRequestLease = channel.unary_unary(
|
|
1569
|
+
'/api.v1.RequestsService/RenewRequestLease',
|
|
1570
|
+
request_serializer=proto_dot_service__pb2.RenewRequestLeaseRequest.SerializeToString,
|
|
1571
|
+
response_deserializer=proto_dot_service__pb2.Request.FromString,
|
|
1572
|
+
_registered_method=True)
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
class RequestsServiceServicer(object):
|
|
1576
|
+
"""======================
|
|
1577
|
+
Request Service
|
|
1578
|
+
======================
|
|
1579
|
+
"""
|
|
1580
|
+
|
|
1581
|
+
def CreateRequest(self, request, context):
|
|
1582
|
+
"""Request management
|
|
1583
|
+
"""
|
|
1584
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1585
|
+
context.set_details('Method not implemented!')
|
|
1586
|
+
raise NotImplementedError('Method not implemented!')
|
|
1587
|
+
|
|
1588
|
+
def GetRequest(self, request, context):
|
|
1589
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1590
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1591
|
+
context.set_details('Method not implemented!')
|
|
1592
|
+
raise NotImplementedError('Method not implemented!')
|
|
1593
|
+
|
|
1594
|
+
def ListRequests(self, request, context):
|
|
1595
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1596
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1597
|
+
context.set_details('Method not implemented!')
|
|
1598
|
+
raise NotImplementedError('Method not implemented!')
|
|
1599
|
+
|
|
1600
|
+
def UpdateRequest(self, request, context):
|
|
1601
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1602
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1603
|
+
context.set_details('Method not implemented!')
|
|
1604
|
+
raise NotImplementedError('Method not implemented!')
|
|
1605
|
+
|
|
1606
|
+
def ClaimRequest(self, request, context):
|
|
1607
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1608
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1609
|
+
context.set_details('Method not implemented!')
|
|
1610
|
+
raise NotImplementedError('Method not implemented!')
|
|
1611
|
+
|
|
1612
|
+
def ClaimNextRequest(self, request, context):
|
|
1613
|
+
"""ClaimNextRequest atomically leases the oldest claimable pending request
|
|
1614
|
+
for the given machine and tool set. This is the provider poll primitive:
|
|
1615
|
+
one round-trip instead of a list-then-claim race, and an idle queue is a
|
|
1616
|
+
claimed=false response rather than an error. Machine-tool ownership is
|
|
1617
|
+
enforced: only requests whose tool the machine registered are leasable,
|
|
1618
|
+
and empty tool_names means every tool this machine registered (never
|
|
1619
|
+
every tool in the session).
|
|
1620
|
+
"""
|
|
1621
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1622
|
+
context.set_details('Method not implemented!')
|
|
1623
|
+
raise NotImplementedError('Method not implemented!')
|
|
1624
|
+
|
|
1625
|
+
def CancelRequest(self, request, context):
|
|
1626
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1627
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1628
|
+
context.set_details('Method not implemented!')
|
|
1629
|
+
raise NotImplementedError('Method not implemented!')
|
|
1630
|
+
|
|
1631
|
+
def SubmitRequestResult(self, request, context):
|
|
1632
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1633
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1634
|
+
context.set_details('Method not implemented!')
|
|
1635
|
+
raise NotImplementedError('Method not implemented!')
|
|
1636
|
+
|
|
1637
|
+
def AppendRequestChunks(self, request, context):
|
|
1638
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1639
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1640
|
+
context.set_details('Method not implemented!')
|
|
1641
|
+
raise NotImplementedError('Method not implemented!')
|
|
1642
|
+
|
|
1643
|
+
def GetRequestChunks(self, request, context):
|
|
1644
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1645
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1646
|
+
context.set_details('Method not implemented!')
|
|
1647
|
+
raise NotImplementedError('Method not implemented!')
|
|
1648
|
+
|
|
1649
|
+
def RenewRequestLease(self, request, context):
|
|
1650
|
+
"""RenewRequestLease extends the execution lease of a claimed/running request
|
|
1651
|
+
so long-running tools are not reclaimed mid-flight. Only the current lease
|
|
1652
|
+
holder may renew: machine_id and lease_epoch must match the request's
|
|
1653
|
+
current lease grant. Renewal moves the lease deadline (visible_at) forward
|
|
1654
|
+
but never past the request's absolute timeout (leased_at + timeout_seconds).
|
|
1655
|
+
The server rejects renewals with FAILED_PRECONDITION when the lease is
|
|
1656
|
+
stale, reclaimed, or expired.
|
|
1657
|
+
"""
|
|
1658
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1659
|
+
context.set_details('Method not implemented!')
|
|
1660
|
+
raise NotImplementedError('Method not implemented!')
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
def add_RequestsServiceServicer_to_server(servicer, server):
|
|
1664
|
+
rpc_method_handlers = {
|
|
1665
|
+
'CreateRequest': grpc.unary_unary_rpc_method_handler(
|
|
1666
|
+
servicer.CreateRequest,
|
|
1667
|
+
request_deserializer=proto_dot_service__pb2.CreateRequestRequest.FromString,
|
|
1668
|
+
response_serializer=proto_dot_service__pb2.Request.SerializeToString,
|
|
1669
|
+
),
|
|
1670
|
+
'GetRequest': grpc.unary_unary_rpc_method_handler(
|
|
1671
|
+
servicer.GetRequest,
|
|
1672
|
+
request_deserializer=proto_dot_service__pb2.GetRequestRequest.FromString,
|
|
1673
|
+
response_serializer=proto_dot_service__pb2.Request.SerializeToString,
|
|
1674
|
+
),
|
|
1675
|
+
'ListRequests': grpc.unary_unary_rpc_method_handler(
|
|
1676
|
+
servicer.ListRequests,
|
|
1677
|
+
request_deserializer=proto_dot_service__pb2.ListRequestsRequest.FromString,
|
|
1678
|
+
response_serializer=proto_dot_service__pb2.ListRequestsResponse.SerializeToString,
|
|
1679
|
+
),
|
|
1680
|
+
'UpdateRequest': grpc.unary_unary_rpc_method_handler(
|
|
1681
|
+
servicer.UpdateRequest,
|
|
1682
|
+
request_deserializer=proto_dot_service__pb2.UpdateRequestRequest.FromString,
|
|
1683
|
+
response_serializer=proto_dot_service__pb2.Request.SerializeToString,
|
|
1684
|
+
),
|
|
1685
|
+
'ClaimRequest': grpc.unary_unary_rpc_method_handler(
|
|
1686
|
+
servicer.ClaimRequest,
|
|
1687
|
+
request_deserializer=proto_dot_service__pb2.ClaimRequestRequest.FromString,
|
|
1688
|
+
response_serializer=proto_dot_service__pb2.Request.SerializeToString,
|
|
1689
|
+
),
|
|
1690
|
+
'ClaimNextRequest': grpc.unary_unary_rpc_method_handler(
|
|
1691
|
+
servicer.ClaimNextRequest,
|
|
1692
|
+
request_deserializer=proto_dot_service__pb2.ClaimNextRequestRequest.FromString,
|
|
1693
|
+
response_serializer=proto_dot_service__pb2.ClaimNextRequestResponse.SerializeToString,
|
|
1694
|
+
),
|
|
1695
|
+
'CancelRequest': grpc.unary_unary_rpc_method_handler(
|
|
1696
|
+
servicer.CancelRequest,
|
|
1697
|
+
request_deserializer=proto_dot_service__pb2.CancelRequestRequest.FromString,
|
|
1698
|
+
response_serializer=proto_dot_service__pb2.CancelRequestResponse.SerializeToString,
|
|
1699
|
+
),
|
|
1700
|
+
'SubmitRequestResult': grpc.unary_unary_rpc_method_handler(
|
|
1701
|
+
servicer.SubmitRequestResult,
|
|
1702
|
+
request_deserializer=proto_dot_service__pb2.SubmitRequestResultRequest.FromString,
|
|
1703
|
+
response_serializer=proto_dot_service__pb2.SubmitRequestResultResponse.SerializeToString,
|
|
1704
|
+
),
|
|
1705
|
+
'AppendRequestChunks': grpc.unary_unary_rpc_method_handler(
|
|
1706
|
+
servicer.AppendRequestChunks,
|
|
1707
|
+
request_deserializer=proto_dot_service__pb2.AppendRequestChunksRequest.FromString,
|
|
1708
|
+
response_serializer=proto_dot_service__pb2.AppendRequestChunksResponse.SerializeToString,
|
|
1709
|
+
),
|
|
1710
|
+
'GetRequestChunks': grpc.unary_unary_rpc_method_handler(
|
|
1711
|
+
servicer.GetRequestChunks,
|
|
1712
|
+
request_deserializer=proto_dot_service__pb2.GetRequestChunksRequest.FromString,
|
|
1713
|
+
response_serializer=proto_dot_service__pb2.GetRequestChunksResponse.SerializeToString,
|
|
1714
|
+
),
|
|
1715
|
+
'RenewRequestLease': grpc.unary_unary_rpc_method_handler(
|
|
1716
|
+
servicer.RenewRequestLease,
|
|
1717
|
+
request_deserializer=proto_dot_service__pb2.RenewRequestLeaseRequest.FromString,
|
|
1718
|
+
response_serializer=proto_dot_service__pb2.Request.SerializeToString,
|
|
1719
|
+
),
|
|
1720
|
+
}
|
|
1721
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
1722
|
+
'api.v1.RequestsService', rpc_method_handlers)
|
|
1723
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
1724
|
+
server.add_registered_method_handlers('api.v1.RequestsService', rpc_method_handlers)
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
# This class is part of an EXPERIMENTAL API.
|
|
1728
|
+
class RequestsService(object):
|
|
1729
|
+
"""======================
|
|
1730
|
+
Request Service
|
|
1731
|
+
======================
|
|
1732
|
+
"""
|
|
1733
|
+
|
|
1734
|
+
@staticmethod
|
|
1735
|
+
def CreateRequest(request,
|
|
1736
|
+
target,
|
|
1737
|
+
options=(),
|
|
1738
|
+
channel_credentials=None,
|
|
1739
|
+
call_credentials=None,
|
|
1740
|
+
insecure=False,
|
|
1741
|
+
compression=None,
|
|
1742
|
+
wait_for_ready=None,
|
|
1743
|
+
timeout=None,
|
|
1744
|
+
metadata=None):
|
|
1745
|
+
return grpc.experimental.unary_unary(
|
|
1746
|
+
request,
|
|
1747
|
+
target,
|
|
1748
|
+
'/api.v1.RequestsService/CreateRequest',
|
|
1749
|
+
proto_dot_service__pb2.CreateRequestRequest.SerializeToString,
|
|
1750
|
+
proto_dot_service__pb2.Request.FromString,
|
|
1751
|
+
options,
|
|
1752
|
+
channel_credentials,
|
|
1753
|
+
insecure,
|
|
1754
|
+
call_credentials,
|
|
1755
|
+
compression,
|
|
1756
|
+
wait_for_ready,
|
|
1757
|
+
timeout,
|
|
1758
|
+
metadata,
|
|
1759
|
+
_registered_method=True)
|
|
1760
|
+
|
|
1761
|
+
@staticmethod
|
|
1762
|
+
def GetRequest(request,
|
|
1763
|
+
target,
|
|
1764
|
+
options=(),
|
|
1765
|
+
channel_credentials=None,
|
|
1766
|
+
call_credentials=None,
|
|
1767
|
+
insecure=False,
|
|
1768
|
+
compression=None,
|
|
1769
|
+
wait_for_ready=None,
|
|
1770
|
+
timeout=None,
|
|
1771
|
+
metadata=None):
|
|
1772
|
+
return grpc.experimental.unary_unary(
|
|
1773
|
+
request,
|
|
1774
|
+
target,
|
|
1775
|
+
'/api.v1.RequestsService/GetRequest',
|
|
1776
|
+
proto_dot_service__pb2.GetRequestRequest.SerializeToString,
|
|
1777
|
+
proto_dot_service__pb2.Request.FromString,
|
|
1778
|
+
options,
|
|
1779
|
+
channel_credentials,
|
|
1780
|
+
insecure,
|
|
1781
|
+
call_credentials,
|
|
1782
|
+
compression,
|
|
1783
|
+
wait_for_ready,
|
|
1784
|
+
timeout,
|
|
1785
|
+
metadata,
|
|
1786
|
+
_registered_method=True)
|
|
1787
|
+
|
|
1788
|
+
@staticmethod
|
|
1789
|
+
def ListRequests(request,
|
|
1790
|
+
target,
|
|
1791
|
+
options=(),
|
|
1792
|
+
channel_credentials=None,
|
|
1793
|
+
call_credentials=None,
|
|
1794
|
+
insecure=False,
|
|
1795
|
+
compression=None,
|
|
1796
|
+
wait_for_ready=None,
|
|
1797
|
+
timeout=None,
|
|
1798
|
+
metadata=None):
|
|
1799
|
+
return grpc.experimental.unary_unary(
|
|
1800
|
+
request,
|
|
1801
|
+
target,
|
|
1802
|
+
'/api.v1.RequestsService/ListRequests',
|
|
1803
|
+
proto_dot_service__pb2.ListRequestsRequest.SerializeToString,
|
|
1804
|
+
proto_dot_service__pb2.ListRequestsResponse.FromString,
|
|
1805
|
+
options,
|
|
1806
|
+
channel_credentials,
|
|
1807
|
+
insecure,
|
|
1808
|
+
call_credentials,
|
|
1809
|
+
compression,
|
|
1810
|
+
wait_for_ready,
|
|
1811
|
+
timeout,
|
|
1812
|
+
metadata,
|
|
1813
|
+
_registered_method=True)
|
|
1814
|
+
|
|
1815
|
+
@staticmethod
|
|
1816
|
+
def UpdateRequest(request,
|
|
1817
|
+
target,
|
|
1818
|
+
options=(),
|
|
1819
|
+
channel_credentials=None,
|
|
1820
|
+
call_credentials=None,
|
|
1821
|
+
insecure=False,
|
|
1822
|
+
compression=None,
|
|
1823
|
+
wait_for_ready=None,
|
|
1824
|
+
timeout=None,
|
|
1825
|
+
metadata=None):
|
|
1826
|
+
return grpc.experimental.unary_unary(
|
|
1827
|
+
request,
|
|
1828
|
+
target,
|
|
1829
|
+
'/api.v1.RequestsService/UpdateRequest',
|
|
1830
|
+
proto_dot_service__pb2.UpdateRequestRequest.SerializeToString,
|
|
1831
|
+
proto_dot_service__pb2.Request.FromString,
|
|
1832
|
+
options,
|
|
1833
|
+
channel_credentials,
|
|
1834
|
+
insecure,
|
|
1835
|
+
call_credentials,
|
|
1836
|
+
compression,
|
|
1837
|
+
wait_for_ready,
|
|
1838
|
+
timeout,
|
|
1839
|
+
metadata,
|
|
1840
|
+
_registered_method=True)
|
|
1841
|
+
|
|
1842
|
+
@staticmethod
|
|
1843
|
+
def ClaimRequest(request,
|
|
1844
|
+
target,
|
|
1845
|
+
options=(),
|
|
1846
|
+
channel_credentials=None,
|
|
1847
|
+
call_credentials=None,
|
|
1848
|
+
insecure=False,
|
|
1849
|
+
compression=None,
|
|
1850
|
+
wait_for_ready=None,
|
|
1851
|
+
timeout=None,
|
|
1852
|
+
metadata=None):
|
|
1853
|
+
return grpc.experimental.unary_unary(
|
|
1854
|
+
request,
|
|
1855
|
+
target,
|
|
1856
|
+
'/api.v1.RequestsService/ClaimRequest',
|
|
1857
|
+
proto_dot_service__pb2.ClaimRequestRequest.SerializeToString,
|
|
1858
|
+
proto_dot_service__pb2.Request.FromString,
|
|
1859
|
+
options,
|
|
1860
|
+
channel_credentials,
|
|
1861
|
+
insecure,
|
|
1862
|
+
call_credentials,
|
|
1863
|
+
compression,
|
|
1864
|
+
wait_for_ready,
|
|
1865
|
+
timeout,
|
|
1866
|
+
metadata,
|
|
1867
|
+
_registered_method=True)
|
|
1868
|
+
|
|
1869
|
+
@staticmethod
|
|
1870
|
+
def ClaimNextRequest(request,
|
|
1871
|
+
target,
|
|
1872
|
+
options=(),
|
|
1873
|
+
channel_credentials=None,
|
|
1874
|
+
call_credentials=None,
|
|
1875
|
+
insecure=False,
|
|
1876
|
+
compression=None,
|
|
1877
|
+
wait_for_ready=None,
|
|
1878
|
+
timeout=None,
|
|
1879
|
+
metadata=None):
|
|
1880
|
+
return grpc.experimental.unary_unary(
|
|
1881
|
+
request,
|
|
1882
|
+
target,
|
|
1883
|
+
'/api.v1.RequestsService/ClaimNextRequest',
|
|
1884
|
+
proto_dot_service__pb2.ClaimNextRequestRequest.SerializeToString,
|
|
1885
|
+
proto_dot_service__pb2.ClaimNextRequestResponse.FromString,
|
|
1886
|
+
options,
|
|
1887
|
+
channel_credentials,
|
|
1888
|
+
insecure,
|
|
1889
|
+
call_credentials,
|
|
1890
|
+
compression,
|
|
1891
|
+
wait_for_ready,
|
|
1892
|
+
timeout,
|
|
1893
|
+
metadata,
|
|
1894
|
+
_registered_method=True)
|
|
1895
|
+
|
|
1896
|
+
@staticmethod
|
|
1897
|
+
def CancelRequest(request,
|
|
1898
|
+
target,
|
|
1899
|
+
options=(),
|
|
1900
|
+
channel_credentials=None,
|
|
1901
|
+
call_credentials=None,
|
|
1902
|
+
insecure=False,
|
|
1903
|
+
compression=None,
|
|
1904
|
+
wait_for_ready=None,
|
|
1905
|
+
timeout=None,
|
|
1906
|
+
metadata=None):
|
|
1907
|
+
return grpc.experimental.unary_unary(
|
|
1908
|
+
request,
|
|
1909
|
+
target,
|
|
1910
|
+
'/api.v1.RequestsService/CancelRequest',
|
|
1911
|
+
proto_dot_service__pb2.CancelRequestRequest.SerializeToString,
|
|
1912
|
+
proto_dot_service__pb2.CancelRequestResponse.FromString,
|
|
1913
|
+
options,
|
|
1914
|
+
channel_credentials,
|
|
1915
|
+
insecure,
|
|
1916
|
+
call_credentials,
|
|
1917
|
+
compression,
|
|
1918
|
+
wait_for_ready,
|
|
1919
|
+
timeout,
|
|
1920
|
+
metadata,
|
|
1921
|
+
_registered_method=True)
|
|
1922
|
+
|
|
1923
|
+
@staticmethod
|
|
1924
|
+
def SubmitRequestResult(request,
|
|
1925
|
+
target,
|
|
1926
|
+
options=(),
|
|
1927
|
+
channel_credentials=None,
|
|
1928
|
+
call_credentials=None,
|
|
1929
|
+
insecure=False,
|
|
1930
|
+
compression=None,
|
|
1931
|
+
wait_for_ready=None,
|
|
1932
|
+
timeout=None,
|
|
1933
|
+
metadata=None):
|
|
1934
|
+
return grpc.experimental.unary_unary(
|
|
1935
|
+
request,
|
|
1936
|
+
target,
|
|
1937
|
+
'/api.v1.RequestsService/SubmitRequestResult',
|
|
1938
|
+
proto_dot_service__pb2.SubmitRequestResultRequest.SerializeToString,
|
|
1939
|
+
proto_dot_service__pb2.SubmitRequestResultResponse.FromString,
|
|
1940
|
+
options,
|
|
1941
|
+
channel_credentials,
|
|
1942
|
+
insecure,
|
|
1943
|
+
call_credentials,
|
|
1944
|
+
compression,
|
|
1945
|
+
wait_for_ready,
|
|
1946
|
+
timeout,
|
|
1947
|
+
metadata,
|
|
1948
|
+
_registered_method=True)
|
|
1949
|
+
|
|
1950
|
+
@staticmethod
|
|
1951
|
+
def AppendRequestChunks(request,
|
|
1952
|
+
target,
|
|
1953
|
+
options=(),
|
|
1954
|
+
channel_credentials=None,
|
|
1955
|
+
call_credentials=None,
|
|
1956
|
+
insecure=False,
|
|
1957
|
+
compression=None,
|
|
1958
|
+
wait_for_ready=None,
|
|
1959
|
+
timeout=None,
|
|
1960
|
+
metadata=None):
|
|
1961
|
+
return grpc.experimental.unary_unary(
|
|
1962
|
+
request,
|
|
1963
|
+
target,
|
|
1964
|
+
'/api.v1.RequestsService/AppendRequestChunks',
|
|
1965
|
+
proto_dot_service__pb2.AppendRequestChunksRequest.SerializeToString,
|
|
1966
|
+
proto_dot_service__pb2.AppendRequestChunksResponse.FromString,
|
|
1967
|
+
options,
|
|
1968
|
+
channel_credentials,
|
|
1969
|
+
insecure,
|
|
1970
|
+
call_credentials,
|
|
1971
|
+
compression,
|
|
1972
|
+
wait_for_ready,
|
|
1973
|
+
timeout,
|
|
1974
|
+
metadata,
|
|
1975
|
+
_registered_method=True)
|
|
1976
|
+
|
|
1977
|
+
@staticmethod
|
|
1978
|
+
def GetRequestChunks(request,
|
|
1979
|
+
target,
|
|
1980
|
+
options=(),
|
|
1981
|
+
channel_credentials=None,
|
|
1982
|
+
call_credentials=None,
|
|
1983
|
+
insecure=False,
|
|
1984
|
+
compression=None,
|
|
1985
|
+
wait_for_ready=None,
|
|
1986
|
+
timeout=None,
|
|
1987
|
+
metadata=None):
|
|
1988
|
+
return grpc.experimental.unary_unary(
|
|
1989
|
+
request,
|
|
1990
|
+
target,
|
|
1991
|
+
'/api.v1.RequestsService/GetRequestChunks',
|
|
1992
|
+
proto_dot_service__pb2.GetRequestChunksRequest.SerializeToString,
|
|
1993
|
+
proto_dot_service__pb2.GetRequestChunksResponse.FromString,
|
|
1994
|
+
options,
|
|
1995
|
+
channel_credentials,
|
|
1996
|
+
insecure,
|
|
1997
|
+
call_credentials,
|
|
1998
|
+
compression,
|
|
1999
|
+
wait_for_ready,
|
|
2000
|
+
timeout,
|
|
2001
|
+
metadata,
|
|
2002
|
+
_registered_method=True)
|
|
2003
|
+
|
|
2004
|
+
@staticmethod
|
|
2005
|
+
def RenewRequestLease(request,
|
|
2006
|
+
target,
|
|
2007
|
+
options=(),
|
|
2008
|
+
channel_credentials=None,
|
|
2009
|
+
call_credentials=None,
|
|
2010
|
+
insecure=False,
|
|
2011
|
+
compression=None,
|
|
2012
|
+
wait_for_ready=None,
|
|
2013
|
+
timeout=None,
|
|
2014
|
+
metadata=None):
|
|
2015
|
+
return grpc.experimental.unary_unary(
|
|
2016
|
+
request,
|
|
2017
|
+
target,
|
|
2018
|
+
'/api.v1.RequestsService/RenewRequestLease',
|
|
2019
|
+
proto_dot_service__pb2.RenewRequestLeaseRequest.SerializeToString,
|
|
2020
|
+
proto_dot_service__pb2.Request.FromString,
|
|
2021
|
+
options,
|
|
2022
|
+
channel_credentials,
|
|
2023
|
+
insecure,
|
|
2024
|
+
call_credentials,
|
|
2025
|
+
compression,
|
|
2026
|
+
wait_for_ready,
|
|
2027
|
+
timeout,
|
|
2028
|
+
metadata,
|
|
2029
|
+
_registered_method=True)
|
|
2030
|
+
|
|
2031
|
+
|
|
2032
|
+
class TasksServiceStub(object):
|
|
2033
|
+
"""======================
|
|
2034
|
+
Task Service (Tasks)
|
|
2035
|
+
======================
|
|
2036
|
+
"""
|
|
2037
|
+
|
|
2038
|
+
def __init__(self, channel):
|
|
2039
|
+
"""Constructor.
|
|
2040
|
+
|
|
2041
|
+
Args:
|
|
2042
|
+
channel: A grpc.Channel.
|
|
2043
|
+
"""
|
|
2044
|
+
self.CreateTask = channel.unary_unary(
|
|
2045
|
+
'/api.v1.TasksService/CreateTask',
|
|
2046
|
+
request_serializer=proto_dot_service__pb2.CreateTaskRequest.SerializeToString,
|
|
2047
|
+
response_deserializer=proto_dot_service__pb2.Task.FromString,
|
|
2048
|
+
_registered_method=True)
|
|
2049
|
+
self.GetTask = channel.unary_unary(
|
|
2050
|
+
'/api.v1.TasksService/GetTask',
|
|
2051
|
+
request_serializer=proto_dot_service__pb2.GetTaskRequest.SerializeToString,
|
|
2052
|
+
response_deserializer=proto_dot_service__pb2.Task.FromString,
|
|
2053
|
+
_registered_method=True)
|
|
2054
|
+
self.ListTasks = channel.unary_unary(
|
|
2055
|
+
'/api.v1.TasksService/ListTasks',
|
|
2056
|
+
request_serializer=proto_dot_service__pb2.ListTasksRequest.SerializeToString,
|
|
2057
|
+
response_deserializer=proto_dot_service__pb2.ListTasksResponse.FromString,
|
|
2058
|
+
_registered_method=True)
|
|
2059
|
+
self.CancelTask = channel.unary_unary(
|
|
2060
|
+
'/api.v1.TasksService/CancelTask',
|
|
2061
|
+
request_serializer=proto_dot_service__pb2.CancelTaskRequest.SerializeToString,
|
|
2062
|
+
response_deserializer=proto_dot_service__pb2.CancelTaskResponse.FromString,
|
|
2063
|
+
_registered_method=True)
|
|
2064
|
+
|
|
2065
|
+
|
|
2066
|
+
class TasksServiceServicer(object):
|
|
2067
|
+
"""======================
|
|
2068
|
+
Task Service (Tasks)
|
|
2069
|
+
======================
|
|
2070
|
+
"""
|
|
2071
|
+
|
|
2072
|
+
def CreateTask(self, request, context):
|
|
2073
|
+
"""Task management
|
|
2074
|
+
"""
|
|
2075
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
2076
|
+
context.set_details('Method not implemented!')
|
|
2077
|
+
raise NotImplementedError('Method not implemented!')
|
|
2078
|
+
|
|
2079
|
+
def GetTask(self, request, context):
|
|
2080
|
+
"""Missing associated documentation comment in .proto file."""
|
|
2081
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
2082
|
+
context.set_details('Method not implemented!')
|
|
2083
|
+
raise NotImplementedError('Method not implemented!')
|
|
2084
|
+
|
|
2085
|
+
def ListTasks(self, request, context):
|
|
2086
|
+
"""Missing associated documentation comment in .proto file."""
|
|
2087
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
2088
|
+
context.set_details('Method not implemented!')
|
|
2089
|
+
raise NotImplementedError('Method not implemented!')
|
|
2090
|
+
|
|
2091
|
+
def CancelTask(self, request, context):
|
|
2092
|
+
"""Missing associated documentation comment in .proto file."""
|
|
2093
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
2094
|
+
context.set_details('Method not implemented!')
|
|
2095
|
+
raise NotImplementedError('Method not implemented!')
|
|
2096
|
+
|
|
2097
|
+
|
|
2098
|
+
def add_TasksServiceServicer_to_server(servicer, server):
|
|
2099
|
+
rpc_method_handlers = {
|
|
2100
|
+
'CreateTask': grpc.unary_unary_rpc_method_handler(
|
|
2101
|
+
servicer.CreateTask,
|
|
2102
|
+
request_deserializer=proto_dot_service__pb2.CreateTaskRequest.FromString,
|
|
2103
|
+
response_serializer=proto_dot_service__pb2.Task.SerializeToString,
|
|
2104
|
+
),
|
|
2105
|
+
'GetTask': grpc.unary_unary_rpc_method_handler(
|
|
2106
|
+
servicer.GetTask,
|
|
2107
|
+
request_deserializer=proto_dot_service__pb2.GetTaskRequest.FromString,
|
|
2108
|
+
response_serializer=proto_dot_service__pb2.Task.SerializeToString,
|
|
2109
|
+
),
|
|
2110
|
+
'ListTasks': grpc.unary_unary_rpc_method_handler(
|
|
2111
|
+
servicer.ListTasks,
|
|
2112
|
+
request_deserializer=proto_dot_service__pb2.ListTasksRequest.FromString,
|
|
2113
|
+
response_serializer=proto_dot_service__pb2.ListTasksResponse.SerializeToString,
|
|
2114
|
+
),
|
|
2115
|
+
'CancelTask': grpc.unary_unary_rpc_method_handler(
|
|
2116
|
+
servicer.CancelTask,
|
|
2117
|
+
request_deserializer=proto_dot_service__pb2.CancelTaskRequest.FromString,
|
|
2118
|
+
response_serializer=proto_dot_service__pb2.CancelTaskResponse.SerializeToString,
|
|
2119
|
+
),
|
|
2120
|
+
}
|
|
2121
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
2122
|
+
'api.v1.TasksService', rpc_method_handlers)
|
|
2123
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
2124
|
+
server.add_registered_method_handlers('api.v1.TasksService', rpc_method_handlers)
|
|
2125
|
+
|
|
2126
|
+
|
|
2127
|
+
# This class is part of an EXPERIMENTAL API.
|
|
2128
|
+
class TasksService(object):
|
|
2129
|
+
"""======================
|
|
2130
|
+
Task Service (Tasks)
|
|
2131
|
+
======================
|
|
2132
|
+
"""
|
|
2133
|
+
|
|
2134
|
+
@staticmethod
|
|
2135
|
+
def CreateTask(request,
|
|
2136
|
+
target,
|
|
2137
|
+
options=(),
|
|
2138
|
+
channel_credentials=None,
|
|
2139
|
+
call_credentials=None,
|
|
2140
|
+
insecure=False,
|
|
2141
|
+
compression=None,
|
|
2142
|
+
wait_for_ready=None,
|
|
2143
|
+
timeout=None,
|
|
2144
|
+
metadata=None):
|
|
2145
|
+
return grpc.experimental.unary_unary(
|
|
2146
|
+
request,
|
|
2147
|
+
target,
|
|
2148
|
+
'/api.v1.TasksService/CreateTask',
|
|
2149
|
+
proto_dot_service__pb2.CreateTaskRequest.SerializeToString,
|
|
2150
|
+
proto_dot_service__pb2.Task.FromString,
|
|
2151
|
+
options,
|
|
2152
|
+
channel_credentials,
|
|
2153
|
+
insecure,
|
|
2154
|
+
call_credentials,
|
|
2155
|
+
compression,
|
|
2156
|
+
wait_for_ready,
|
|
2157
|
+
timeout,
|
|
2158
|
+
metadata,
|
|
2159
|
+
_registered_method=True)
|
|
2160
|
+
|
|
2161
|
+
@staticmethod
|
|
2162
|
+
def GetTask(request,
|
|
2163
|
+
target,
|
|
2164
|
+
options=(),
|
|
2165
|
+
channel_credentials=None,
|
|
2166
|
+
call_credentials=None,
|
|
2167
|
+
insecure=False,
|
|
2168
|
+
compression=None,
|
|
2169
|
+
wait_for_ready=None,
|
|
2170
|
+
timeout=None,
|
|
2171
|
+
metadata=None):
|
|
2172
|
+
return grpc.experimental.unary_unary(
|
|
2173
|
+
request,
|
|
2174
|
+
target,
|
|
2175
|
+
'/api.v1.TasksService/GetTask',
|
|
2176
|
+
proto_dot_service__pb2.GetTaskRequest.SerializeToString,
|
|
2177
|
+
proto_dot_service__pb2.Task.FromString,
|
|
2178
|
+
options,
|
|
2179
|
+
channel_credentials,
|
|
2180
|
+
insecure,
|
|
2181
|
+
call_credentials,
|
|
2182
|
+
compression,
|
|
2183
|
+
wait_for_ready,
|
|
2184
|
+
timeout,
|
|
2185
|
+
metadata,
|
|
2186
|
+
_registered_method=True)
|
|
2187
|
+
|
|
2188
|
+
@staticmethod
|
|
2189
|
+
def ListTasks(request,
|
|
2190
|
+
target,
|
|
2191
|
+
options=(),
|
|
2192
|
+
channel_credentials=None,
|
|
2193
|
+
call_credentials=None,
|
|
2194
|
+
insecure=False,
|
|
2195
|
+
compression=None,
|
|
2196
|
+
wait_for_ready=None,
|
|
2197
|
+
timeout=None,
|
|
2198
|
+
metadata=None):
|
|
2199
|
+
return grpc.experimental.unary_unary(
|
|
2200
|
+
request,
|
|
2201
|
+
target,
|
|
2202
|
+
'/api.v1.TasksService/ListTasks',
|
|
2203
|
+
proto_dot_service__pb2.ListTasksRequest.SerializeToString,
|
|
2204
|
+
proto_dot_service__pb2.ListTasksResponse.FromString,
|
|
2205
|
+
options,
|
|
2206
|
+
channel_credentials,
|
|
2207
|
+
insecure,
|
|
2208
|
+
call_credentials,
|
|
2209
|
+
compression,
|
|
2210
|
+
wait_for_ready,
|
|
2211
|
+
timeout,
|
|
2212
|
+
metadata,
|
|
2213
|
+
_registered_method=True)
|
|
2214
|
+
|
|
2215
|
+
@staticmethod
|
|
2216
|
+
def CancelTask(request,
|
|
2217
|
+
target,
|
|
2218
|
+
options=(),
|
|
2219
|
+
channel_credentials=None,
|
|
2220
|
+
call_credentials=None,
|
|
2221
|
+
insecure=False,
|
|
2222
|
+
compression=None,
|
|
2223
|
+
wait_for_ready=None,
|
|
2224
|
+
timeout=None,
|
|
2225
|
+
metadata=None):
|
|
2226
|
+
return grpc.experimental.unary_unary(
|
|
2227
|
+
request,
|
|
2228
|
+
target,
|
|
2229
|
+
'/api.v1.TasksService/CancelTask',
|
|
2230
|
+
proto_dot_service__pb2.CancelTaskRequest.SerializeToString,
|
|
2231
|
+
proto_dot_service__pb2.CancelTaskResponse.FromString,
|
|
2232
|
+
options,
|
|
2233
|
+
channel_credentials,
|
|
2234
|
+
insecure,
|
|
2235
|
+
call_credentials,
|
|
2236
|
+
compression,
|
|
2237
|
+
wait_for_ready,
|
|
2238
|
+
timeout,
|
|
2239
|
+
metadata,
|
|
2240
|
+
_registered_method=True)
|