agentfense 0.2.1__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.
- agentfense/__init__.py +191 -0
- agentfense/_async/__init__.py +21 -0
- agentfense/_async/client.py +679 -0
- agentfense/_async/sandbox.py +667 -0
- agentfense/_gen/__init__.py +0 -0
- agentfense/_gen/codebase_pb2.py +78 -0
- agentfense/_gen/codebase_pb2.pyi +141 -0
- agentfense/_gen/codebase_pb2_grpc.py +366 -0
- agentfense/_gen/common_pb2.py +47 -0
- agentfense/_gen/common_pb2.pyi +68 -0
- agentfense/_gen/common_pb2_grpc.py +24 -0
- agentfense/_gen/sandbox_pb2.py +123 -0
- agentfense/_gen/sandbox_pb2.pyi +255 -0
- agentfense/_gen/sandbox_pb2_grpc.py +678 -0
- agentfense/_shared.py +238 -0
- agentfense/client.py +751 -0
- agentfense/exceptions.py +333 -0
- agentfense/presets.py +192 -0
- agentfense/sandbox.py +672 -0
- agentfense/types.py +256 -0
- agentfense/utils.py +286 -0
- agentfense-0.2.1.dist-info/METADATA +378 -0
- agentfense-0.2.1.dist-info/RECORD +25 -0
- agentfense-0.2.1.dist-info/WHEEL +5 -0
- agentfense-0.2.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,678 @@
|
|
|
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 common_pb2 as common__pb2
|
|
7
|
+
from . import sandbox_pb2 as sandbox__pb2
|
|
8
|
+
|
|
9
|
+
GRPC_GENERATED_VERSION = '1.76.0'
|
|
10
|
+
GRPC_VERSION = grpc.__version__
|
|
11
|
+
_version_not_supported = False
|
|
12
|
+
|
|
13
|
+
try:
|
|
14
|
+
from grpc._utilities import first_version_is_lower
|
|
15
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
16
|
+
except ImportError:
|
|
17
|
+
_version_not_supported = True
|
|
18
|
+
|
|
19
|
+
if _version_not_supported:
|
|
20
|
+
raise RuntimeError(
|
|
21
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
22
|
+
+ ' but the generated code in sandbox_pb2_grpc.py depends on'
|
|
23
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
24
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
25
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class SandboxServiceStub(object):
|
|
30
|
+
"""SandboxService manages sandbox lifecycle and execution
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def __init__(self, channel):
|
|
34
|
+
"""Constructor.
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
channel: A grpc.Channel.
|
|
38
|
+
"""
|
|
39
|
+
self.CreateSandbox = channel.unary_unary(
|
|
40
|
+
'/sandbox.v1.SandboxService/CreateSandbox',
|
|
41
|
+
request_serializer=sandbox__pb2.CreateSandboxRequest.SerializeToString,
|
|
42
|
+
response_deserializer=sandbox__pb2.Sandbox.FromString,
|
|
43
|
+
_registered_method=True)
|
|
44
|
+
self.GetSandbox = channel.unary_unary(
|
|
45
|
+
'/sandbox.v1.SandboxService/GetSandbox',
|
|
46
|
+
request_serializer=sandbox__pb2.GetSandboxRequest.SerializeToString,
|
|
47
|
+
response_deserializer=sandbox__pb2.Sandbox.FromString,
|
|
48
|
+
_registered_method=True)
|
|
49
|
+
self.ListSandboxes = channel.unary_unary(
|
|
50
|
+
'/sandbox.v1.SandboxService/ListSandboxes',
|
|
51
|
+
request_serializer=sandbox__pb2.ListSandboxesRequest.SerializeToString,
|
|
52
|
+
response_deserializer=sandbox__pb2.ListSandboxesResponse.FromString,
|
|
53
|
+
_registered_method=True)
|
|
54
|
+
self.StartSandbox = channel.unary_unary(
|
|
55
|
+
'/sandbox.v1.SandboxService/StartSandbox',
|
|
56
|
+
request_serializer=sandbox__pb2.StartSandboxRequest.SerializeToString,
|
|
57
|
+
response_deserializer=sandbox__pb2.Sandbox.FromString,
|
|
58
|
+
_registered_method=True)
|
|
59
|
+
self.StopSandbox = channel.unary_unary(
|
|
60
|
+
'/sandbox.v1.SandboxService/StopSandbox',
|
|
61
|
+
request_serializer=sandbox__pb2.StopSandboxRequest.SerializeToString,
|
|
62
|
+
response_deserializer=sandbox__pb2.Sandbox.FromString,
|
|
63
|
+
_registered_method=True)
|
|
64
|
+
self.DestroySandbox = channel.unary_unary(
|
|
65
|
+
'/sandbox.v1.SandboxService/DestroySandbox',
|
|
66
|
+
request_serializer=sandbox__pb2.DestroySandboxRequest.SerializeToString,
|
|
67
|
+
response_deserializer=common__pb2.Empty.FromString,
|
|
68
|
+
_registered_method=True)
|
|
69
|
+
self.Exec = channel.unary_unary(
|
|
70
|
+
'/sandbox.v1.SandboxService/Exec',
|
|
71
|
+
request_serializer=sandbox__pb2.ExecRequest.SerializeToString,
|
|
72
|
+
response_deserializer=sandbox__pb2.ExecResult.FromString,
|
|
73
|
+
_registered_method=True)
|
|
74
|
+
self.ExecStream = channel.unary_stream(
|
|
75
|
+
'/sandbox.v1.SandboxService/ExecStream',
|
|
76
|
+
request_serializer=sandbox__pb2.ExecRequest.SerializeToString,
|
|
77
|
+
response_deserializer=sandbox__pb2.ExecOutput.FromString,
|
|
78
|
+
_registered_method=True)
|
|
79
|
+
self.CreateSession = channel.unary_unary(
|
|
80
|
+
'/sandbox.v1.SandboxService/CreateSession',
|
|
81
|
+
request_serializer=sandbox__pb2.CreateSessionRequest.SerializeToString,
|
|
82
|
+
response_deserializer=sandbox__pb2.Session.FromString,
|
|
83
|
+
_registered_method=True)
|
|
84
|
+
self.GetSession = channel.unary_unary(
|
|
85
|
+
'/sandbox.v1.SandboxService/GetSession',
|
|
86
|
+
request_serializer=sandbox__pb2.GetSessionRequest.SerializeToString,
|
|
87
|
+
response_deserializer=sandbox__pb2.Session.FromString,
|
|
88
|
+
_registered_method=True)
|
|
89
|
+
self.ListSessions = channel.unary_unary(
|
|
90
|
+
'/sandbox.v1.SandboxService/ListSessions',
|
|
91
|
+
request_serializer=sandbox__pb2.ListSessionsRequest.SerializeToString,
|
|
92
|
+
response_deserializer=sandbox__pb2.ListSessionsResponse.FromString,
|
|
93
|
+
_registered_method=True)
|
|
94
|
+
self.DestroySession = channel.unary_unary(
|
|
95
|
+
'/sandbox.v1.SandboxService/DestroySession',
|
|
96
|
+
request_serializer=sandbox__pb2.DestroySessionRequest.SerializeToString,
|
|
97
|
+
response_deserializer=common__pb2.Empty.FromString,
|
|
98
|
+
_registered_method=True)
|
|
99
|
+
self.SessionExec = channel.unary_unary(
|
|
100
|
+
'/sandbox.v1.SandboxService/SessionExec',
|
|
101
|
+
request_serializer=sandbox__pb2.SessionExecRequest.SerializeToString,
|
|
102
|
+
response_deserializer=sandbox__pb2.ExecResult.FromString,
|
|
103
|
+
_registered_method=True)
|
|
104
|
+
self.SessionExecStream = channel.unary_stream(
|
|
105
|
+
'/sandbox.v1.SandboxService/SessionExecStream',
|
|
106
|
+
request_serializer=sandbox__pb2.SessionExecRequest.SerializeToString,
|
|
107
|
+
response_deserializer=sandbox__pb2.ExecOutput.FromString,
|
|
108
|
+
_registered_method=True)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class SandboxServiceServicer(object):
|
|
112
|
+
"""SandboxService manages sandbox lifecycle and execution
|
|
113
|
+
"""
|
|
114
|
+
|
|
115
|
+
def CreateSandbox(self, request, context):
|
|
116
|
+
"""CreateSandbox creates a new sandbox with specified configuration
|
|
117
|
+
"""
|
|
118
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
119
|
+
context.set_details('Method not implemented!')
|
|
120
|
+
raise NotImplementedError('Method not implemented!')
|
|
121
|
+
|
|
122
|
+
def GetSandbox(self, request, context):
|
|
123
|
+
"""GetSandbox retrieves information about a sandbox
|
|
124
|
+
"""
|
|
125
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
126
|
+
context.set_details('Method not implemented!')
|
|
127
|
+
raise NotImplementedError('Method not implemented!')
|
|
128
|
+
|
|
129
|
+
def ListSandboxes(self, request, context):
|
|
130
|
+
"""ListSandboxes lists all sandboxes
|
|
131
|
+
"""
|
|
132
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
133
|
+
context.set_details('Method not implemented!')
|
|
134
|
+
raise NotImplementedError('Method not implemented!')
|
|
135
|
+
|
|
136
|
+
def StartSandbox(self, request, context):
|
|
137
|
+
"""StartSandbox starts a pending sandbox
|
|
138
|
+
"""
|
|
139
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
140
|
+
context.set_details('Method not implemented!')
|
|
141
|
+
raise NotImplementedError('Method not implemented!')
|
|
142
|
+
|
|
143
|
+
def StopSandbox(self, request, context):
|
|
144
|
+
"""StopSandbox stops a running sandbox
|
|
145
|
+
"""
|
|
146
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
147
|
+
context.set_details('Method not implemented!')
|
|
148
|
+
raise NotImplementedError('Method not implemented!')
|
|
149
|
+
|
|
150
|
+
def DestroySandbox(self, request, context):
|
|
151
|
+
"""DestroySandbox destroys a sandbox and releases resources
|
|
152
|
+
"""
|
|
153
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
154
|
+
context.set_details('Method not implemented!')
|
|
155
|
+
raise NotImplementedError('Method not implemented!')
|
|
156
|
+
|
|
157
|
+
def Exec(self, request, context):
|
|
158
|
+
"""Exec executes a command in a sandbox
|
|
159
|
+
"""
|
|
160
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
161
|
+
context.set_details('Method not implemented!')
|
|
162
|
+
raise NotImplementedError('Method not implemented!')
|
|
163
|
+
|
|
164
|
+
def ExecStream(self, request, context):
|
|
165
|
+
"""ExecStream executes a command and streams output
|
|
166
|
+
"""
|
|
167
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
168
|
+
context.set_details('Method not implemented!')
|
|
169
|
+
raise NotImplementedError('Method not implemented!')
|
|
170
|
+
|
|
171
|
+
def CreateSession(self, request, context):
|
|
172
|
+
"""============================================
|
|
173
|
+
Session Management - Stateful Shell Sessions
|
|
174
|
+
============================================
|
|
175
|
+
|
|
176
|
+
CreateSession creates a new shell session within a sandbox
|
|
177
|
+
"""
|
|
178
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
179
|
+
context.set_details('Method not implemented!')
|
|
180
|
+
raise NotImplementedError('Method not implemented!')
|
|
181
|
+
|
|
182
|
+
def GetSession(self, request, context):
|
|
183
|
+
"""GetSession retrieves information about a session
|
|
184
|
+
"""
|
|
185
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
186
|
+
context.set_details('Method not implemented!')
|
|
187
|
+
raise NotImplementedError('Method not implemented!')
|
|
188
|
+
|
|
189
|
+
def ListSessions(self, request, context):
|
|
190
|
+
"""ListSessions lists all sessions for a sandbox
|
|
191
|
+
"""
|
|
192
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
193
|
+
context.set_details('Method not implemented!')
|
|
194
|
+
raise NotImplementedError('Method not implemented!')
|
|
195
|
+
|
|
196
|
+
def DestroySession(self, request, context):
|
|
197
|
+
"""DestroySession destroys a session and kills all its child processes
|
|
198
|
+
"""
|
|
199
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
200
|
+
context.set_details('Method not implemented!')
|
|
201
|
+
raise NotImplementedError('Method not implemented!')
|
|
202
|
+
|
|
203
|
+
def SessionExec(self, request, context):
|
|
204
|
+
"""SessionExec executes a command within a session (stateful)
|
|
205
|
+
"""
|
|
206
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
207
|
+
context.set_details('Method not implemented!')
|
|
208
|
+
raise NotImplementedError('Method not implemented!')
|
|
209
|
+
|
|
210
|
+
def SessionExecStream(self, request, context):
|
|
211
|
+
"""SessionExecStream executes a command within a session and streams output
|
|
212
|
+
"""
|
|
213
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
214
|
+
context.set_details('Method not implemented!')
|
|
215
|
+
raise NotImplementedError('Method not implemented!')
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def add_SandboxServiceServicer_to_server(servicer, server):
|
|
219
|
+
rpc_method_handlers = {
|
|
220
|
+
'CreateSandbox': grpc.unary_unary_rpc_method_handler(
|
|
221
|
+
servicer.CreateSandbox,
|
|
222
|
+
request_deserializer=sandbox__pb2.CreateSandboxRequest.FromString,
|
|
223
|
+
response_serializer=sandbox__pb2.Sandbox.SerializeToString,
|
|
224
|
+
),
|
|
225
|
+
'GetSandbox': grpc.unary_unary_rpc_method_handler(
|
|
226
|
+
servicer.GetSandbox,
|
|
227
|
+
request_deserializer=sandbox__pb2.GetSandboxRequest.FromString,
|
|
228
|
+
response_serializer=sandbox__pb2.Sandbox.SerializeToString,
|
|
229
|
+
),
|
|
230
|
+
'ListSandboxes': grpc.unary_unary_rpc_method_handler(
|
|
231
|
+
servicer.ListSandboxes,
|
|
232
|
+
request_deserializer=sandbox__pb2.ListSandboxesRequest.FromString,
|
|
233
|
+
response_serializer=sandbox__pb2.ListSandboxesResponse.SerializeToString,
|
|
234
|
+
),
|
|
235
|
+
'StartSandbox': grpc.unary_unary_rpc_method_handler(
|
|
236
|
+
servicer.StartSandbox,
|
|
237
|
+
request_deserializer=sandbox__pb2.StartSandboxRequest.FromString,
|
|
238
|
+
response_serializer=sandbox__pb2.Sandbox.SerializeToString,
|
|
239
|
+
),
|
|
240
|
+
'StopSandbox': grpc.unary_unary_rpc_method_handler(
|
|
241
|
+
servicer.StopSandbox,
|
|
242
|
+
request_deserializer=sandbox__pb2.StopSandboxRequest.FromString,
|
|
243
|
+
response_serializer=sandbox__pb2.Sandbox.SerializeToString,
|
|
244
|
+
),
|
|
245
|
+
'DestroySandbox': grpc.unary_unary_rpc_method_handler(
|
|
246
|
+
servicer.DestroySandbox,
|
|
247
|
+
request_deserializer=sandbox__pb2.DestroySandboxRequest.FromString,
|
|
248
|
+
response_serializer=common__pb2.Empty.SerializeToString,
|
|
249
|
+
),
|
|
250
|
+
'Exec': grpc.unary_unary_rpc_method_handler(
|
|
251
|
+
servicer.Exec,
|
|
252
|
+
request_deserializer=sandbox__pb2.ExecRequest.FromString,
|
|
253
|
+
response_serializer=sandbox__pb2.ExecResult.SerializeToString,
|
|
254
|
+
),
|
|
255
|
+
'ExecStream': grpc.unary_stream_rpc_method_handler(
|
|
256
|
+
servicer.ExecStream,
|
|
257
|
+
request_deserializer=sandbox__pb2.ExecRequest.FromString,
|
|
258
|
+
response_serializer=sandbox__pb2.ExecOutput.SerializeToString,
|
|
259
|
+
),
|
|
260
|
+
'CreateSession': grpc.unary_unary_rpc_method_handler(
|
|
261
|
+
servicer.CreateSession,
|
|
262
|
+
request_deserializer=sandbox__pb2.CreateSessionRequest.FromString,
|
|
263
|
+
response_serializer=sandbox__pb2.Session.SerializeToString,
|
|
264
|
+
),
|
|
265
|
+
'GetSession': grpc.unary_unary_rpc_method_handler(
|
|
266
|
+
servicer.GetSession,
|
|
267
|
+
request_deserializer=sandbox__pb2.GetSessionRequest.FromString,
|
|
268
|
+
response_serializer=sandbox__pb2.Session.SerializeToString,
|
|
269
|
+
),
|
|
270
|
+
'ListSessions': grpc.unary_unary_rpc_method_handler(
|
|
271
|
+
servicer.ListSessions,
|
|
272
|
+
request_deserializer=sandbox__pb2.ListSessionsRequest.FromString,
|
|
273
|
+
response_serializer=sandbox__pb2.ListSessionsResponse.SerializeToString,
|
|
274
|
+
),
|
|
275
|
+
'DestroySession': grpc.unary_unary_rpc_method_handler(
|
|
276
|
+
servicer.DestroySession,
|
|
277
|
+
request_deserializer=sandbox__pb2.DestroySessionRequest.FromString,
|
|
278
|
+
response_serializer=common__pb2.Empty.SerializeToString,
|
|
279
|
+
),
|
|
280
|
+
'SessionExec': grpc.unary_unary_rpc_method_handler(
|
|
281
|
+
servicer.SessionExec,
|
|
282
|
+
request_deserializer=sandbox__pb2.SessionExecRequest.FromString,
|
|
283
|
+
response_serializer=sandbox__pb2.ExecResult.SerializeToString,
|
|
284
|
+
),
|
|
285
|
+
'SessionExecStream': grpc.unary_stream_rpc_method_handler(
|
|
286
|
+
servicer.SessionExecStream,
|
|
287
|
+
request_deserializer=sandbox__pb2.SessionExecRequest.FromString,
|
|
288
|
+
response_serializer=sandbox__pb2.ExecOutput.SerializeToString,
|
|
289
|
+
),
|
|
290
|
+
}
|
|
291
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
292
|
+
'sandbox.v1.SandboxService', rpc_method_handlers)
|
|
293
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
294
|
+
server.add_registered_method_handlers('sandbox.v1.SandboxService', rpc_method_handlers)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
# This class is part of an EXPERIMENTAL API.
|
|
298
|
+
class SandboxService(object):
|
|
299
|
+
"""SandboxService manages sandbox lifecycle and execution
|
|
300
|
+
"""
|
|
301
|
+
|
|
302
|
+
@staticmethod
|
|
303
|
+
def CreateSandbox(request,
|
|
304
|
+
target,
|
|
305
|
+
options=(),
|
|
306
|
+
channel_credentials=None,
|
|
307
|
+
call_credentials=None,
|
|
308
|
+
insecure=False,
|
|
309
|
+
compression=None,
|
|
310
|
+
wait_for_ready=None,
|
|
311
|
+
timeout=None,
|
|
312
|
+
metadata=None):
|
|
313
|
+
return grpc.experimental.unary_unary(
|
|
314
|
+
request,
|
|
315
|
+
target,
|
|
316
|
+
'/sandbox.v1.SandboxService/CreateSandbox',
|
|
317
|
+
sandbox__pb2.CreateSandboxRequest.SerializeToString,
|
|
318
|
+
sandbox__pb2.Sandbox.FromString,
|
|
319
|
+
options,
|
|
320
|
+
channel_credentials,
|
|
321
|
+
insecure,
|
|
322
|
+
call_credentials,
|
|
323
|
+
compression,
|
|
324
|
+
wait_for_ready,
|
|
325
|
+
timeout,
|
|
326
|
+
metadata,
|
|
327
|
+
_registered_method=True)
|
|
328
|
+
|
|
329
|
+
@staticmethod
|
|
330
|
+
def GetSandbox(request,
|
|
331
|
+
target,
|
|
332
|
+
options=(),
|
|
333
|
+
channel_credentials=None,
|
|
334
|
+
call_credentials=None,
|
|
335
|
+
insecure=False,
|
|
336
|
+
compression=None,
|
|
337
|
+
wait_for_ready=None,
|
|
338
|
+
timeout=None,
|
|
339
|
+
metadata=None):
|
|
340
|
+
return grpc.experimental.unary_unary(
|
|
341
|
+
request,
|
|
342
|
+
target,
|
|
343
|
+
'/sandbox.v1.SandboxService/GetSandbox',
|
|
344
|
+
sandbox__pb2.GetSandboxRequest.SerializeToString,
|
|
345
|
+
sandbox__pb2.Sandbox.FromString,
|
|
346
|
+
options,
|
|
347
|
+
channel_credentials,
|
|
348
|
+
insecure,
|
|
349
|
+
call_credentials,
|
|
350
|
+
compression,
|
|
351
|
+
wait_for_ready,
|
|
352
|
+
timeout,
|
|
353
|
+
metadata,
|
|
354
|
+
_registered_method=True)
|
|
355
|
+
|
|
356
|
+
@staticmethod
|
|
357
|
+
def ListSandboxes(request,
|
|
358
|
+
target,
|
|
359
|
+
options=(),
|
|
360
|
+
channel_credentials=None,
|
|
361
|
+
call_credentials=None,
|
|
362
|
+
insecure=False,
|
|
363
|
+
compression=None,
|
|
364
|
+
wait_for_ready=None,
|
|
365
|
+
timeout=None,
|
|
366
|
+
metadata=None):
|
|
367
|
+
return grpc.experimental.unary_unary(
|
|
368
|
+
request,
|
|
369
|
+
target,
|
|
370
|
+
'/sandbox.v1.SandboxService/ListSandboxes',
|
|
371
|
+
sandbox__pb2.ListSandboxesRequest.SerializeToString,
|
|
372
|
+
sandbox__pb2.ListSandboxesResponse.FromString,
|
|
373
|
+
options,
|
|
374
|
+
channel_credentials,
|
|
375
|
+
insecure,
|
|
376
|
+
call_credentials,
|
|
377
|
+
compression,
|
|
378
|
+
wait_for_ready,
|
|
379
|
+
timeout,
|
|
380
|
+
metadata,
|
|
381
|
+
_registered_method=True)
|
|
382
|
+
|
|
383
|
+
@staticmethod
|
|
384
|
+
def StartSandbox(request,
|
|
385
|
+
target,
|
|
386
|
+
options=(),
|
|
387
|
+
channel_credentials=None,
|
|
388
|
+
call_credentials=None,
|
|
389
|
+
insecure=False,
|
|
390
|
+
compression=None,
|
|
391
|
+
wait_for_ready=None,
|
|
392
|
+
timeout=None,
|
|
393
|
+
metadata=None):
|
|
394
|
+
return grpc.experimental.unary_unary(
|
|
395
|
+
request,
|
|
396
|
+
target,
|
|
397
|
+
'/sandbox.v1.SandboxService/StartSandbox',
|
|
398
|
+
sandbox__pb2.StartSandboxRequest.SerializeToString,
|
|
399
|
+
sandbox__pb2.Sandbox.FromString,
|
|
400
|
+
options,
|
|
401
|
+
channel_credentials,
|
|
402
|
+
insecure,
|
|
403
|
+
call_credentials,
|
|
404
|
+
compression,
|
|
405
|
+
wait_for_ready,
|
|
406
|
+
timeout,
|
|
407
|
+
metadata,
|
|
408
|
+
_registered_method=True)
|
|
409
|
+
|
|
410
|
+
@staticmethod
|
|
411
|
+
def StopSandbox(request,
|
|
412
|
+
target,
|
|
413
|
+
options=(),
|
|
414
|
+
channel_credentials=None,
|
|
415
|
+
call_credentials=None,
|
|
416
|
+
insecure=False,
|
|
417
|
+
compression=None,
|
|
418
|
+
wait_for_ready=None,
|
|
419
|
+
timeout=None,
|
|
420
|
+
metadata=None):
|
|
421
|
+
return grpc.experimental.unary_unary(
|
|
422
|
+
request,
|
|
423
|
+
target,
|
|
424
|
+
'/sandbox.v1.SandboxService/StopSandbox',
|
|
425
|
+
sandbox__pb2.StopSandboxRequest.SerializeToString,
|
|
426
|
+
sandbox__pb2.Sandbox.FromString,
|
|
427
|
+
options,
|
|
428
|
+
channel_credentials,
|
|
429
|
+
insecure,
|
|
430
|
+
call_credentials,
|
|
431
|
+
compression,
|
|
432
|
+
wait_for_ready,
|
|
433
|
+
timeout,
|
|
434
|
+
metadata,
|
|
435
|
+
_registered_method=True)
|
|
436
|
+
|
|
437
|
+
@staticmethod
|
|
438
|
+
def DestroySandbox(request,
|
|
439
|
+
target,
|
|
440
|
+
options=(),
|
|
441
|
+
channel_credentials=None,
|
|
442
|
+
call_credentials=None,
|
|
443
|
+
insecure=False,
|
|
444
|
+
compression=None,
|
|
445
|
+
wait_for_ready=None,
|
|
446
|
+
timeout=None,
|
|
447
|
+
metadata=None):
|
|
448
|
+
return grpc.experimental.unary_unary(
|
|
449
|
+
request,
|
|
450
|
+
target,
|
|
451
|
+
'/sandbox.v1.SandboxService/DestroySandbox',
|
|
452
|
+
sandbox__pb2.DestroySandboxRequest.SerializeToString,
|
|
453
|
+
common__pb2.Empty.FromString,
|
|
454
|
+
options,
|
|
455
|
+
channel_credentials,
|
|
456
|
+
insecure,
|
|
457
|
+
call_credentials,
|
|
458
|
+
compression,
|
|
459
|
+
wait_for_ready,
|
|
460
|
+
timeout,
|
|
461
|
+
metadata,
|
|
462
|
+
_registered_method=True)
|
|
463
|
+
|
|
464
|
+
@staticmethod
|
|
465
|
+
def Exec(request,
|
|
466
|
+
target,
|
|
467
|
+
options=(),
|
|
468
|
+
channel_credentials=None,
|
|
469
|
+
call_credentials=None,
|
|
470
|
+
insecure=False,
|
|
471
|
+
compression=None,
|
|
472
|
+
wait_for_ready=None,
|
|
473
|
+
timeout=None,
|
|
474
|
+
metadata=None):
|
|
475
|
+
return grpc.experimental.unary_unary(
|
|
476
|
+
request,
|
|
477
|
+
target,
|
|
478
|
+
'/sandbox.v1.SandboxService/Exec',
|
|
479
|
+
sandbox__pb2.ExecRequest.SerializeToString,
|
|
480
|
+
sandbox__pb2.ExecResult.FromString,
|
|
481
|
+
options,
|
|
482
|
+
channel_credentials,
|
|
483
|
+
insecure,
|
|
484
|
+
call_credentials,
|
|
485
|
+
compression,
|
|
486
|
+
wait_for_ready,
|
|
487
|
+
timeout,
|
|
488
|
+
metadata,
|
|
489
|
+
_registered_method=True)
|
|
490
|
+
|
|
491
|
+
@staticmethod
|
|
492
|
+
def ExecStream(request,
|
|
493
|
+
target,
|
|
494
|
+
options=(),
|
|
495
|
+
channel_credentials=None,
|
|
496
|
+
call_credentials=None,
|
|
497
|
+
insecure=False,
|
|
498
|
+
compression=None,
|
|
499
|
+
wait_for_ready=None,
|
|
500
|
+
timeout=None,
|
|
501
|
+
metadata=None):
|
|
502
|
+
return grpc.experimental.unary_stream(
|
|
503
|
+
request,
|
|
504
|
+
target,
|
|
505
|
+
'/sandbox.v1.SandboxService/ExecStream',
|
|
506
|
+
sandbox__pb2.ExecRequest.SerializeToString,
|
|
507
|
+
sandbox__pb2.ExecOutput.FromString,
|
|
508
|
+
options,
|
|
509
|
+
channel_credentials,
|
|
510
|
+
insecure,
|
|
511
|
+
call_credentials,
|
|
512
|
+
compression,
|
|
513
|
+
wait_for_ready,
|
|
514
|
+
timeout,
|
|
515
|
+
metadata,
|
|
516
|
+
_registered_method=True)
|
|
517
|
+
|
|
518
|
+
@staticmethod
|
|
519
|
+
def CreateSession(request,
|
|
520
|
+
target,
|
|
521
|
+
options=(),
|
|
522
|
+
channel_credentials=None,
|
|
523
|
+
call_credentials=None,
|
|
524
|
+
insecure=False,
|
|
525
|
+
compression=None,
|
|
526
|
+
wait_for_ready=None,
|
|
527
|
+
timeout=None,
|
|
528
|
+
metadata=None):
|
|
529
|
+
return grpc.experimental.unary_unary(
|
|
530
|
+
request,
|
|
531
|
+
target,
|
|
532
|
+
'/sandbox.v1.SandboxService/CreateSession',
|
|
533
|
+
sandbox__pb2.CreateSessionRequest.SerializeToString,
|
|
534
|
+
sandbox__pb2.Session.FromString,
|
|
535
|
+
options,
|
|
536
|
+
channel_credentials,
|
|
537
|
+
insecure,
|
|
538
|
+
call_credentials,
|
|
539
|
+
compression,
|
|
540
|
+
wait_for_ready,
|
|
541
|
+
timeout,
|
|
542
|
+
metadata,
|
|
543
|
+
_registered_method=True)
|
|
544
|
+
|
|
545
|
+
@staticmethod
|
|
546
|
+
def GetSession(request,
|
|
547
|
+
target,
|
|
548
|
+
options=(),
|
|
549
|
+
channel_credentials=None,
|
|
550
|
+
call_credentials=None,
|
|
551
|
+
insecure=False,
|
|
552
|
+
compression=None,
|
|
553
|
+
wait_for_ready=None,
|
|
554
|
+
timeout=None,
|
|
555
|
+
metadata=None):
|
|
556
|
+
return grpc.experimental.unary_unary(
|
|
557
|
+
request,
|
|
558
|
+
target,
|
|
559
|
+
'/sandbox.v1.SandboxService/GetSession',
|
|
560
|
+
sandbox__pb2.GetSessionRequest.SerializeToString,
|
|
561
|
+
sandbox__pb2.Session.FromString,
|
|
562
|
+
options,
|
|
563
|
+
channel_credentials,
|
|
564
|
+
insecure,
|
|
565
|
+
call_credentials,
|
|
566
|
+
compression,
|
|
567
|
+
wait_for_ready,
|
|
568
|
+
timeout,
|
|
569
|
+
metadata,
|
|
570
|
+
_registered_method=True)
|
|
571
|
+
|
|
572
|
+
@staticmethod
|
|
573
|
+
def ListSessions(request,
|
|
574
|
+
target,
|
|
575
|
+
options=(),
|
|
576
|
+
channel_credentials=None,
|
|
577
|
+
call_credentials=None,
|
|
578
|
+
insecure=False,
|
|
579
|
+
compression=None,
|
|
580
|
+
wait_for_ready=None,
|
|
581
|
+
timeout=None,
|
|
582
|
+
metadata=None):
|
|
583
|
+
return grpc.experimental.unary_unary(
|
|
584
|
+
request,
|
|
585
|
+
target,
|
|
586
|
+
'/sandbox.v1.SandboxService/ListSessions',
|
|
587
|
+
sandbox__pb2.ListSessionsRequest.SerializeToString,
|
|
588
|
+
sandbox__pb2.ListSessionsResponse.FromString,
|
|
589
|
+
options,
|
|
590
|
+
channel_credentials,
|
|
591
|
+
insecure,
|
|
592
|
+
call_credentials,
|
|
593
|
+
compression,
|
|
594
|
+
wait_for_ready,
|
|
595
|
+
timeout,
|
|
596
|
+
metadata,
|
|
597
|
+
_registered_method=True)
|
|
598
|
+
|
|
599
|
+
@staticmethod
|
|
600
|
+
def DestroySession(request,
|
|
601
|
+
target,
|
|
602
|
+
options=(),
|
|
603
|
+
channel_credentials=None,
|
|
604
|
+
call_credentials=None,
|
|
605
|
+
insecure=False,
|
|
606
|
+
compression=None,
|
|
607
|
+
wait_for_ready=None,
|
|
608
|
+
timeout=None,
|
|
609
|
+
metadata=None):
|
|
610
|
+
return grpc.experimental.unary_unary(
|
|
611
|
+
request,
|
|
612
|
+
target,
|
|
613
|
+
'/sandbox.v1.SandboxService/DestroySession',
|
|
614
|
+
sandbox__pb2.DestroySessionRequest.SerializeToString,
|
|
615
|
+
common__pb2.Empty.FromString,
|
|
616
|
+
options,
|
|
617
|
+
channel_credentials,
|
|
618
|
+
insecure,
|
|
619
|
+
call_credentials,
|
|
620
|
+
compression,
|
|
621
|
+
wait_for_ready,
|
|
622
|
+
timeout,
|
|
623
|
+
metadata,
|
|
624
|
+
_registered_method=True)
|
|
625
|
+
|
|
626
|
+
@staticmethod
|
|
627
|
+
def SessionExec(request,
|
|
628
|
+
target,
|
|
629
|
+
options=(),
|
|
630
|
+
channel_credentials=None,
|
|
631
|
+
call_credentials=None,
|
|
632
|
+
insecure=False,
|
|
633
|
+
compression=None,
|
|
634
|
+
wait_for_ready=None,
|
|
635
|
+
timeout=None,
|
|
636
|
+
metadata=None):
|
|
637
|
+
return grpc.experimental.unary_unary(
|
|
638
|
+
request,
|
|
639
|
+
target,
|
|
640
|
+
'/sandbox.v1.SandboxService/SessionExec',
|
|
641
|
+
sandbox__pb2.SessionExecRequest.SerializeToString,
|
|
642
|
+
sandbox__pb2.ExecResult.FromString,
|
|
643
|
+
options,
|
|
644
|
+
channel_credentials,
|
|
645
|
+
insecure,
|
|
646
|
+
call_credentials,
|
|
647
|
+
compression,
|
|
648
|
+
wait_for_ready,
|
|
649
|
+
timeout,
|
|
650
|
+
metadata,
|
|
651
|
+
_registered_method=True)
|
|
652
|
+
|
|
653
|
+
@staticmethod
|
|
654
|
+
def SessionExecStream(request,
|
|
655
|
+
target,
|
|
656
|
+
options=(),
|
|
657
|
+
channel_credentials=None,
|
|
658
|
+
call_credentials=None,
|
|
659
|
+
insecure=False,
|
|
660
|
+
compression=None,
|
|
661
|
+
wait_for_ready=None,
|
|
662
|
+
timeout=None,
|
|
663
|
+
metadata=None):
|
|
664
|
+
return grpc.experimental.unary_stream(
|
|
665
|
+
request,
|
|
666
|
+
target,
|
|
667
|
+
'/sandbox.v1.SandboxService/SessionExecStream',
|
|
668
|
+
sandbox__pb2.SessionExecRequest.SerializeToString,
|
|
669
|
+
sandbox__pb2.ExecOutput.FromString,
|
|
670
|
+
options,
|
|
671
|
+
channel_credentials,
|
|
672
|
+
insecure,
|
|
673
|
+
call_credentials,
|
|
674
|
+
compression,
|
|
675
|
+
wait_for_ready,
|
|
676
|
+
timeout,
|
|
677
|
+
metadata,
|
|
678
|
+
_registered_method=True)
|