fm-weck 1.4.8__py3-none-any.whl → 1.5.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.
- fm_weck/__init__.py +1 -1
- fm_weck/capture.py +31 -0
- fm_weck/cli.py +279 -22
- fm_weck/engine.py +144 -12
- fm_weck/exceptions.py +58 -0
- fm_weck/file_util.py +5 -0
- fm_weck/grpc_service/__init__.py +9 -0
- fm_weck/grpc_service/fm_weck_client.py +148 -0
- fm_weck/grpc_service/fm_weck_server.py +175 -0
- fm_weck/grpc_service/proto/__init__.py +0 -0
- fm_weck/grpc_service/proto/fm_weck_service.proto +139 -0
- fm_weck/grpc_service/proto/fm_weck_service_pb2.py +73 -0
- fm_weck/grpc_service/proto/fm_weck_service_pb2.pyi +151 -0
- fm_weck/grpc_service/proto/fm_weck_service_pb2_grpc.py +331 -0
- fm_weck/grpc_service/proto/generate_protocol_files.sh +18 -0
- fm_weck/grpc_service/request_handling.py +332 -0
- fm_weck/grpc_service/run_store.py +38 -0
- fm_weck/grpc_service/server_utils.py +27 -0
- fm_weck/image_mgr.py +3 -1
- fm_weck/resources/Containerfile +1 -2
- fm_weck/resources/__init__.py +26 -8
- fm_weck/resources/c_program_example.c +627 -0
- fm_weck/run_result.py +1 -1
- fm_weck/serve.py +21 -14
- fm_weck/smoke_test_mode.py +82 -0
- {fm_weck-1.4.8.dist-info → fm_weck-1.5.1.dist-info}/METADATA +3 -1
- {fm_weck-1.4.8.dist-info → fm_weck-1.5.1.dist-info}/RECORD +29 -14
- {fm_weck-1.4.8.dist-info → fm_weck-1.5.1.dist-info}/WHEEL +0 -0
- {fm_weck-1.4.8.dist-info → fm_weck-1.5.1.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# This file is part of fm-weck: executing fm-tools in containerized environments.
|
|
2
|
+
# https://gitlab.com/sosy-lab/software/fm-weck
|
|
3
|
+
#
|
|
4
|
+
# SPDX-FileCopyrightText: 2024 Dirk Beyer <https://www.sosy-lab.org>
|
|
5
|
+
#
|
|
6
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
|
|
8
|
+
from google.protobuf.internal import containers as _containers
|
|
9
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
10
|
+
from google.protobuf import descriptor as _descriptor
|
|
11
|
+
from google.protobuf import message as _message
|
|
12
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
13
|
+
|
|
14
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
15
|
+
|
|
16
|
+
class ErrorCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
17
|
+
__slots__ = ()
|
|
18
|
+
EC_RUN_NOT_TERMINATED: _ClassVar[ErrorCode]
|
|
19
|
+
EC_RUN_NOT_FOUND: _ClassVar[ErrorCode]
|
|
20
|
+
EC_RUN_CANCELLED: _ClassVar[ErrorCode]
|
|
21
|
+
EC_RUN_FAILED: _ClassVar[ErrorCode]
|
|
22
|
+
EC_UNKNOWN_ERROR: _ClassVar[ErrorCode]
|
|
23
|
+
EC_RUN_NOT_TERMINATED: ErrorCode
|
|
24
|
+
EC_RUN_NOT_FOUND: ErrorCode
|
|
25
|
+
EC_RUN_CANCELLED: ErrorCode
|
|
26
|
+
EC_RUN_FAILED: ErrorCode
|
|
27
|
+
EC_UNKNOWN_ERROR: ErrorCode
|
|
28
|
+
|
|
29
|
+
class ToolType(_message.Message):
|
|
30
|
+
__slots__ = ("tool_version", "tool_file", "tool_id")
|
|
31
|
+
TOOL_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
32
|
+
TOOL_FILE_FIELD_NUMBER: _ClassVar[int]
|
|
33
|
+
TOOL_ID_FIELD_NUMBER: _ClassVar[int]
|
|
34
|
+
tool_version: str
|
|
35
|
+
tool_file: File
|
|
36
|
+
tool_id: str
|
|
37
|
+
def __init__(self, tool_version: _Optional[str] = ..., tool_file: _Optional[_Union[File, _Mapping]] = ..., tool_id: _Optional[str] = ...) -> None: ...
|
|
38
|
+
|
|
39
|
+
class Property(_message.Message):
|
|
40
|
+
__slots__ = ("property_id", "property_file")
|
|
41
|
+
PROPERTY_ID_FIELD_NUMBER: _ClassVar[int]
|
|
42
|
+
PROPERTY_FILE_FIELD_NUMBER: _ClassVar[int]
|
|
43
|
+
property_id: str
|
|
44
|
+
property_file: File
|
|
45
|
+
def __init__(self, property_id: _Optional[str] = ..., property_file: _Optional[_Union[File, _Mapping]] = ...) -> None: ...
|
|
46
|
+
|
|
47
|
+
class RunRequest(_message.Message):
|
|
48
|
+
__slots__ = ("tool", "property", "c_program", "data_model")
|
|
49
|
+
TOOL_FIELD_NUMBER: _ClassVar[int]
|
|
50
|
+
PROPERTY_FIELD_NUMBER: _ClassVar[int]
|
|
51
|
+
C_PROGRAM_FIELD_NUMBER: _ClassVar[int]
|
|
52
|
+
DATA_MODEL_FIELD_NUMBER: _ClassVar[int]
|
|
53
|
+
tool: ToolType
|
|
54
|
+
property: Property
|
|
55
|
+
c_program: bytes
|
|
56
|
+
data_model: str
|
|
57
|
+
def __init__(self, tool: _Optional[_Union[ToolType, _Mapping]] = ..., property: _Optional[_Union[Property, _Mapping]] = ..., c_program: _Optional[bytes] = ..., data_model: _Optional[str] = ...) -> None: ...
|
|
58
|
+
|
|
59
|
+
class ExpertRunRequest(_message.Message):
|
|
60
|
+
__slots__ = ("tool", "command")
|
|
61
|
+
TOOL_FIELD_NUMBER: _ClassVar[int]
|
|
62
|
+
COMMAND_FIELD_NUMBER: _ClassVar[int]
|
|
63
|
+
tool: ToolType
|
|
64
|
+
command: _containers.RepeatedScalarFieldContainer[str]
|
|
65
|
+
def __init__(self, tool: _Optional[_Union[ToolType, _Mapping]] = ..., command: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
66
|
+
|
|
67
|
+
class RunResult(_message.Message):
|
|
68
|
+
__slots__ = ("run_id", "success", "output", "filenames")
|
|
69
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
70
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
|
71
|
+
OUTPUT_FIELD_NUMBER: _ClassVar[int]
|
|
72
|
+
FILENAMES_FIELD_NUMBER: _ClassVar[int]
|
|
73
|
+
run_id: RunID
|
|
74
|
+
success: bool
|
|
75
|
+
output: str
|
|
76
|
+
filenames: _containers.RepeatedScalarFieldContainer[str]
|
|
77
|
+
def __init__(self, run_id: _Optional[_Union[RunID, _Mapping]] = ..., success: bool = ..., output: _Optional[str] = ..., filenames: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
78
|
+
|
|
79
|
+
class WaitRunResult(_message.Message):
|
|
80
|
+
__slots__ = ("timeout", "error", "run_result")
|
|
81
|
+
TIMEOUT_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
83
|
+
RUN_RESULT_FIELD_NUMBER: _ClassVar[int]
|
|
84
|
+
timeout: bool
|
|
85
|
+
error: ErrorCode
|
|
86
|
+
run_result: RunResult
|
|
87
|
+
def __init__(self, timeout: bool = ..., error: _Optional[_Union[ErrorCode, str]] = ..., run_result: _Optional[_Union[RunResult, _Mapping]] = ...) -> None: ...
|
|
88
|
+
|
|
89
|
+
class CancelRunRequest(_message.Message):
|
|
90
|
+
__slots__ = ("run_id", "timeout", "cleanup_on_success")
|
|
91
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
92
|
+
TIMEOUT_FIELD_NUMBER: _ClassVar[int]
|
|
93
|
+
CLEANUP_ON_SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
|
94
|
+
run_id: RunID
|
|
95
|
+
timeout: int
|
|
96
|
+
cleanup_on_success: bool
|
|
97
|
+
def __init__(self, run_id: _Optional[_Union[RunID, _Mapping]] = ..., timeout: _Optional[int] = ..., cleanup_on_success: bool = ...) -> None: ...
|
|
98
|
+
|
|
99
|
+
class CancelRunResult(_message.Message):
|
|
100
|
+
__slots__ = ("timeout", "error", "run_result")
|
|
101
|
+
TIMEOUT_FIELD_NUMBER: _ClassVar[int]
|
|
102
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
103
|
+
RUN_RESULT_FIELD_NUMBER: _ClassVar[int]
|
|
104
|
+
timeout: bool
|
|
105
|
+
error: ErrorCode
|
|
106
|
+
run_result: RunResult
|
|
107
|
+
def __init__(self, timeout: bool = ..., error: _Optional[_Union[ErrorCode, str]] = ..., run_result: _Optional[_Union[RunResult, _Mapping]] = ...) -> None: ...
|
|
108
|
+
|
|
109
|
+
class CleanUpResponse(_message.Message):
|
|
110
|
+
__slots__ = ("success", "error")
|
|
111
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
|
112
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
113
|
+
success: bool
|
|
114
|
+
error: ErrorCode
|
|
115
|
+
def __init__(self, success: bool = ..., error: _Optional[_Union[ErrorCode, str]] = ...) -> None: ...
|
|
116
|
+
|
|
117
|
+
class RunID(_message.Message):
|
|
118
|
+
__slots__ = ("run_id",)
|
|
119
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
120
|
+
run_id: str
|
|
121
|
+
def __init__(self, run_id: _Optional[str] = ...) -> None: ...
|
|
122
|
+
|
|
123
|
+
class WaitParameters(_message.Message):
|
|
124
|
+
__slots__ = ("timeout", "run_id")
|
|
125
|
+
TIMEOUT_FIELD_NUMBER: _ClassVar[int]
|
|
126
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
127
|
+
timeout: int
|
|
128
|
+
run_id: RunID
|
|
129
|
+
def __init__(self, timeout: _Optional[int] = ..., run_id: _Optional[_Union[RunID, _Mapping]] = ...) -> None: ...
|
|
130
|
+
|
|
131
|
+
class FileQuery(_message.Message):
|
|
132
|
+
__slots__ = ("run_id", "filenames", "name_patterns")
|
|
133
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
134
|
+
FILENAMES_FIELD_NUMBER: _ClassVar[int]
|
|
135
|
+
NAME_PATTERNS_FIELD_NUMBER: _ClassVar[int]
|
|
136
|
+
run_id: RunID
|
|
137
|
+
filenames: _containers.RepeatedScalarFieldContainer[str]
|
|
138
|
+
name_patterns: _containers.RepeatedScalarFieldContainer[str]
|
|
139
|
+
def __init__(self, run_id: _Optional[_Union[RunID, _Mapping]] = ..., filenames: _Optional[_Iterable[str]] = ..., name_patterns: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
140
|
+
|
|
141
|
+
class File(_message.Message):
|
|
142
|
+
__slots__ = ("name", "file")
|
|
143
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
144
|
+
FILE_FIELD_NUMBER: _ClassVar[int]
|
|
145
|
+
name: str
|
|
146
|
+
file: bytes
|
|
147
|
+
def __init__(self, name: _Optional[str] = ..., file: _Optional[bytes] = ...) -> None: ...
|
|
148
|
+
|
|
149
|
+
class Empty(_message.Message):
|
|
150
|
+
__slots__ = ()
|
|
151
|
+
def __init__(self) -> None: ...
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# This file is part of fm-weck: executing fm-tools in containerized environments.
|
|
2
|
+
# https://gitlab.com/sosy-lab/software/fm-weck
|
|
3
|
+
#
|
|
4
|
+
# SPDX-FileCopyrightText: 2024 Dirk Beyer <https://www.sosy-lab.org>
|
|
5
|
+
#
|
|
6
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
|
|
8
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
9
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
10
|
+
import grpc
|
|
11
|
+
import warnings
|
|
12
|
+
|
|
13
|
+
from . import fm_weck_service_pb2 as fm__weck__service__pb2
|
|
14
|
+
|
|
15
|
+
GRPC_GENERATED_VERSION = '1.71.0'
|
|
16
|
+
GRPC_VERSION = grpc.__version__
|
|
17
|
+
_version_not_supported = False
|
|
18
|
+
|
|
19
|
+
try:
|
|
20
|
+
from grpc._utilities import first_version_is_lower
|
|
21
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
22
|
+
except ImportError:
|
|
23
|
+
_version_not_supported = True
|
|
24
|
+
|
|
25
|
+
if _version_not_supported:
|
|
26
|
+
raise RuntimeError(
|
|
27
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
28
|
+
+ f' but the generated code in fm_weck_service_pb2_grpc.py depends on'
|
|
29
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
30
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
31
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class FmWeckRemoteStub(object):
|
|
36
|
+
"""This service runs fm-weck remotely.
|
|
37
|
+
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, channel):
|
|
41
|
+
"""Constructor.
|
|
42
|
+
|
|
43
|
+
Args:
|
|
44
|
+
channel: A grpc.Channel.
|
|
45
|
+
"""
|
|
46
|
+
self.startRun = channel.unary_unary(
|
|
47
|
+
'/FmWeckRemote/startRun',
|
|
48
|
+
request_serializer=fm__weck__service__pb2.RunRequest.SerializeToString,
|
|
49
|
+
response_deserializer=fm__weck__service__pb2.RunID.FromString,
|
|
50
|
+
_registered_method=True)
|
|
51
|
+
self.startExpertRun = channel.unary_unary(
|
|
52
|
+
'/FmWeckRemote/startExpertRun',
|
|
53
|
+
request_serializer=fm__weck__service__pb2.ExpertRunRequest.SerializeToString,
|
|
54
|
+
response_deserializer=fm__weck__service__pb2.RunID.FromString,
|
|
55
|
+
_registered_method=True)
|
|
56
|
+
self.cancelRun = channel.unary_unary(
|
|
57
|
+
'/FmWeckRemote/cancelRun',
|
|
58
|
+
request_serializer=fm__weck__service__pb2.CancelRunRequest.SerializeToString,
|
|
59
|
+
response_deserializer=fm__weck__service__pb2.CancelRunResult.FromString,
|
|
60
|
+
_registered_method=True)
|
|
61
|
+
self.cleanupRun = channel.unary_unary(
|
|
62
|
+
'/FmWeckRemote/cleanupRun',
|
|
63
|
+
request_serializer=fm__weck__service__pb2.RunID.SerializeToString,
|
|
64
|
+
response_deserializer=fm__weck__service__pb2.CleanUpResponse.FromString,
|
|
65
|
+
_registered_method=True)
|
|
66
|
+
self.waitOnRun = channel.unary_unary(
|
|
67
|
+
'/FmWeckRemote/waitOnRun',
|
|
68
|
+
request_serializer=fm__weck__service__pb2.WaitParameters.SerializeToString,
|
|
69
|
+
response_deserializer=fm__weck__service__pb2.WaitRunResult.FromString,
|
|
70
|
+
_registered_method=True)
|
|
71
|
+
self.queryFiles = channel.unary_stream(
|
|
72
|
+
'/FmWeckRemote/queryFiles',
|
|
73
|
+
request_serializer=fm__weck__service__pb2.FileQuery.SerializeToString,
|
|
74
|
+
response_deserializer=fm__weck__service__pb2.File.FromString,
|
|
75
|
+
_registered_method=True)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class FmWeckRemoteServicer(object):
|
|
79
|
+
"""This service runs fm-weck remotely.
|
|
80
|
+
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
def startRun(self, request, context):
|
|
84
|
+
"""Runs a verification task for a given C program.
|
|
85
|
+
"""
|
|
86
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
87
|
+
context.set_details('Method not implemented!')
|
|
88
|
+
raise NotImplementedError('Method not implemented!')
|
|
89
|
+
|
|
90
|
+
def startExpertRun(self, request, context):
|
|
91
|
+
"""Runs a tool in expert mode
|
|
92
|
+
"""
|
|
93
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
94
|
+
context.set_details('Method not implemented!')
|
|
95
|
+
raise NotImplementedError('Method not implemented!')
|
|
96
|
+
|
|
97
|
+
def cancelRun(self, request, context):
|
|
98
|
+
"""Cancels a previously started run.
|
|
99
|
+
"""
|
|
100
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
101
|
+
context.set_details('Method not implemented!')
|
|
102
|
+
raise NotImplementedError('Method not implemented!')
|
|
103
|
+
|
|
104
|
+
def cleanupRun(self, request, context):
|
|
105
|
+
"""Cleans up files of a finished run.
|
|
106
|
+
"""
|
|
107
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
108
|
+
context.set_details('Method not implemented!')
|
|
109
|
+
raise NotImplementedError('Method not implemented!')
|
|
110
|
+
|
|
111
|
+
def waitOnRun(self, request, context):
|
|
112
|
+
"""Gets the result of a previously started run using its unique ID.
|
|
113
|
+
"""
|
|
114
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
115
|
+
context.set_details('Method not implemented!')
|
|
116
|
+
raise NotImplementedError('Method not implemented!')
|
|
117
|
+
|
|
118
|
+
def queryFiles(self, request, context):
|
|
119
|
+
"""Query for a number of result files.
|
|
120
|
+
"""
|
|
121
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
122
|
+
context.set_details('Method not implemented!')
|
|
123
|
+
raise NotImplementedError('Method not implemented!')
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def add_FmWeckRemoteServicer_to_server(servicer, server):
|
|
127
|
+
rpc_method_handlers = {
|
|
128
|
+
'startRun': grpc.unary_unary_rpc_method_handler(
|
|
129
|
+
servicer.startRun,
|
|
130
|
+
request_deserializer=fm__weck__service__pb2.RunRequest.FromString,
|
|
131
|
+
response_serializer=fm__weck__service__pb2.RunID.SerializeToString,
|
|
132
|
+
),
|
|
133
|
+
'startExpertRun': grpc.unary_unary_rpc_method_handler(
|
|
134
|
+
servicer.startExpertRun,
|
|
135
|
+
request_deserializer=fm__weck__service__pb2.ExpertRunRequest.FromString,
|
|
136
|
+
response_serializer=fm__weck__service__pb2.RunID.SerializeToString,
|
|
137
|
+
),
|
|
138
|
+
'cancelRun': grpc.unary_unary_rpc_method_handler(
|
|
139
|
+
servicer.cancelRun,
|
|
140
|
+
request_deserializer=fm__weck__service__pb2.CancelRunRequest.FromString,
|
|
141
|
+
response_serializer=fm__weck__service__pb2.CancelRunResult.SerializeToString,
|
|
142
|
+
),
|
|
143
|
+
'cleanupRun': grpc.unary_unary_rpc_method_handler(
|
|
144
|
+
servicer.cleanupRun,
|
|
145
|
+
request_deserializer=fm__weck__service__pb2.RunID.FromString,
|
|
146
|
+
response_serializer=fm__weck__service__pb2.CleanUpResponse.SerializeToString,
|
|
147
|
+
),
|
|
148
|
+
'waitOnRun': grpc.unary_unary_rpc_method_handler(
|
|
149
|
+
servicer.waitOnRun,
|
|
150
|
+
request_deserializer=fm__weck__service__pb2.WaitParameters.FromString,
|
|
151
|
+
response_serializer=fm__weck__service__pb2.WaitRunResult.SerializeToString,
|
|
152
|
+
),
|
|
153
|
+
'queryFiles': grpc.unary_stream_rpc_method_handler(
|
|
154
|
+
servicer.queryFiles,
|
|
155
|
+
request_deserializer=fm__weck__service__pb2.FileQuery.FromString,
|
|
156
|
+
response_serializer=fm__weck__service__pb2.File.SerializeToString,
|
|
157
|
+
),
|
|
158
|
+
}
|
|
159
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
160
|
+
'FmWeckRemote', rpc_method_handlers)
|
|
161
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
162
|
+
server.add_registered_method_handlers('FmWeckRemote', rpc_method_handlers)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
# This class is part of an EXPERIMENTAL API.
|
|
166
|
+
class FmWeckRemote(object):
|
|
167
|
+
"""This service runs fm-weck remotely.
|
|
168
|
+
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
@staticmethod
|
|
172
|
+
def startRun(request,
|
|
173
|
+
target,
|
|
174
|
+
options=(),
|
|
175
|
+
channel_credentials=None,
|
|
176
|
+
call_credentials=None,
|
|
177
|
+
insecure=False,
|
|
178
|
+
compression=None,
|
|
179
|
+
wait_for_ready=None,
|
|
180
|
+
timeout=None,
|
|
181
|
+
metadata=None):
|
|
182
|
+
return grpc.experimental.unary_unary(
|
|
183
|
+
request,
|
|
184
|
+
target,
|
|
185
|
+
'/FmWeckRemote/startRun',
|
|
186
|
+
fm__weck__service__pb2.RunRequest.SerializeToString,
|
|
187
|
+
fm__weck__service__pb2.RunID.FromString,
|
|
188
|
+
options,
|
|
189
|
+
channel_credentials,
|
|
190
|
+
insecure,
|
|
191
|
+
call_credentials,
|
|
192
|
+
compression,
|
|
193
|
+
wait_for_ready,
|
|
194
|
+
timeout,
|
|
195
|
+
metadata,
|
|
196
|
+
_registered_method=True)
|
|
197
|
+
|
|
198
|
+
@staticmethod
|
|
199
|
+
def startExpertRun(request,
|
|
200
|
+
target,
|
|
201
|
+
options=(),
|
|
202
|
+
channel_credentials=None,
|
|
203
|
+
call_credentials=None,
|
|
204
|
+
insecure=False,
|
|
205
|
+
compression=None,
|
|
206
|
+
wait_for_ready=None,
|
|
207
|
+
timeout=None,
|
|
208
|
+
metadata=None):
|
|
209
|
+
return grpc.experimental.unary_unary(
|
|
210
|
+
request,
|
|
211
|
+
target,
|
|
212
|
+
'/FmWeckRemote/startExpertRun',
|
|
213
|
+
fm__weck__service__pb2.ExpertRunRequest.SerializeToString,
|
|
214
|
+
fm__weck__service__pb2.RunID.FromString,
|
|
215
|
+
options,
|
|
216
|
+
channel_credentials,
|
|
217
|
+
insecure,
|
|
218
|
+
call_credentials,
|
|
219
|
+
compression,
|
|
220
|
+
wait_for_ready,
|
|
221
|
+
timeout,
|
|
222
|
+
metadata,
|
|
223
|
+
_registered_method=True)
|
|
224
|
+
|
|
225
|
+
@staticmethod
|
|
226
|
+
def cancelRun(request,
|
|
227
|
+
target,
|
|
228
|
+
options=(),
|
|
229
|
+
channel_credentials=None,
|
|
230
|
+
call_credentials=None,
|
|
231
|
+
insecure=False,
|
|
232
|
+
compression=None,
|
|
233
|
+
wait_for_ready=None,
|
|
234
|
+
timeout=None,
|
|
235
|
+
metadata=None):
|
|
236
|
+
return grpc.experimental.unary_unary(
|
|
237
|
+
request,
|
|
238
|
+
target,
|
|
239
|
+
'/FmWeckRemote/cancelRun',
|
|
240
|
+
fm__weck__service__pb2.CancelRunRequest.SerializeToString,
|
|
241
|
+
fm__weck__service__pb2.CancelRunResult.FromString,
|
|
242
|
+
options,
|
|
243
|
+
channel_credentials,
|
|
244
|
+
insecure,
|
|
245
|
+
call_credentials,
|
|
246
|
+
compression,
|
|
247
|
+
wait_for_ready,
|
|
248
|
+
timeout,
|
|
249
|
+
metadata,
|
|
250
|
+
_registered_method=True)
|
|
251
|
+
|
|
252
|
+
@staticmethod
|
|
253
|
+
def cleanupRun(request,
|
|
254
|
+
target,
|
|
255
|
+
options=(),
|
|
256
|
+
channel_credentials=None,
|
|
257
|
+
call_credentials=None,
|
|
258
|
+
insecure=False,
|
|
259
|
+
compression=None,
|
|
260
|
+
wait_for_ready=None,
|
|
261
|
+
timeout=None,
|
|
262
|
+
metadata=None):
|
|
263
|
+
return grpc.experimental.unary_unary(
|
|
264
|
+
request,
|
|
265
|
+
target,
|
|
266
|
+
'/FmWeckRemote/cleanupRun',
|
|
267
|
+
fm__weck__service__pb2.RunID.SerializeToString,
|
|
268
|
+
fm__weck__service__pb2.CleanUpResponse.FromString,
|
|
269
|
+
options,
|
|
270
|
+
channel_credentials,
|
|
271
|
+
insecure,
|
|
272
|
+
call_credentials,
|
|
273
|
+
compression,
|
|
274
|
+
wait_for_ready,
|
|
275
|
+
timeout,
|
|
276
|
+
metadata,
|
|
277
|
+
_registered_method=True)
|
|
278
|
+
|
|
279
|
+
@staticmethod
|
|
280
|
+
def waitOnRun(request,
|
|
281
|
+
target,
|
|
282
|
+
options=(),
|
|
283
|
+
channel_credentials=None,
|
|
284
|
+
call_credentials=None,
|
|
285
|
+
insecure=False,
|
|
286
|
+
compression=None,
|
|
287
|
+
wait_for_ready=None,
|
|
288
|
+
timeout=None,
|
|
289
|
+
metadata=None):
|
|
290
|
+
return grpc.experimental.unary_unary(
|
|
291
|
+
request,
|
|
292
|
+
target,
|
|
293
|
+
'/FmWeckRemote/waitOnRun',
|
|
294
|
+
fm__weck__service__pb2.WaitParameters.SerializeToString,
|
|
295
|
+
fm__weck__service__pb2.WaitRunResult.FromString,
|
|
296
|
+
options,
|
|
297
|
+
channel_credentials,
|
|
298
|
+
insecure,
|
|
299
|
+
call_credentials,
|
|
300
|
+
compression,
|
|
301
|
+
wait_for_ready,
|
|
302
|
+
timeout,
|
|
303
|
+
metadata,
|
|
304
|
+
_registered_method=True)
|
|
305
|
+
|
|
306
|
+
@staticmethod
|
|
307
|
+
def queryFiles(request,
|
|
308
|
+
target,
|
|
309
|
+
options=(),
|
|
310
|
+
channel_credentials=None,
|
|
311
|
+
call_credentials=None,
|
|
312
|
+
insecure=False,
|
|
313
|
+
compression=None,
|
|
314
|
+
wait_for_ready=None,
|
|
315
|
+
timeout=None,
|
|
316
|
+
metadata=None):
|
|
317
|
+
return grpc.experimental.unary_stream(
|
|
318
|
+
request,
|
|
319
|
+
target,
|
|
320
|
+
'/FmWeckRemote/queryFiles',
|
|
321
|
+
fm__weck__service__pb2.FileQuery.SerializeToString,
|
|
322
|
+
fm__weck__service__pb2.File.FromString,
|
|
323
|
+
options,
|
|
324
|
+
channel_credentials,
|
|
325
|
+
insecure,
|
|
326
|
+
call_credentials,
|
|
327
|
+
compression,
|
|
328
|
+
wait_for_ready,
|
|
329
|
+
timeout,
|
|
330
|
+
metadata,
|
|
331
|
+
_registered_method=True)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# This file is part of fm-weck: executing fm-tools in containerized environments.
|
|
2
|
+
# https://gitlab.com/sosy-lab/software/fm-weck
|
|
3
|
+
#
|
|
4
|
+
# SPDX-FileCopyrightText: 2024 Dirk Beyer <https://www.sosy-lab.org>
|
|
5
|
+
#
|
|
6
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
|
|
8
|
+
#!/bin/bash
|
|
9
|
+
|
|
10
|
+
script_dir="$(dirname "$(realpath "$0")")"
|
|
11
|
+
|
|
12
|
+
cd "$script_dir" || exit
|
|
13
|
+
|
|
14
|
+
python -m grpc_tools.protoc -I./ --python_out=./ --pyi_out=./ --grpc_python_out=./ ./fm_weck_service.proto
|
|
15
|
+
|
|
16
|
+
sed -i 's/^import fm_weck_service_pb2 as fm__weck__service__pb2/from . import fm_weck_service_pb2 as fm__weck__service__pb2/' fm_weck_service_pb2_grpc.py
|
|
17
|
+
|
|
18
|
+
reuse annotate -y 2024 -l Apache-2.0 -c "Dirk Beyer <https://www.sosy-lab.org>" --template header --skip-existing --skip-unrecognised ./fm_weck_service_pb2_grpc.py ./fm_weck_service_pb2.pyi ./fm_weck_service_pb2.py
|