metal-stack-api 0.0.14__py3-none-any.whl → 0.0.16__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.
- {metal_stack_api-0.0.14.dist-info → metal_stack_api-0.0.16.dist-info}/METADATA +1 -1
- {metal_stack_api-0.0.14.dist-info → metal_stack_api-0.0.16.dist-info}/RECORD +35 -35
- metalstack/admin/v2/filesystem_connecpy.py +195 -160
- metalstack/admin/v2/image_connecpy.py +241 -197
- metalstack/admin/v2/ip_connecpy.py +144 -118
- metalstack/admin/v2/machine_connecpy.py +144 -118
- metalstack/admin/v2/network_connecpy.py +291 -238
- metalstack/admin/v2/partition_connecpy.py +241 -197
- metalstack/admin/v2/size_connecpy.py +195 -160
- metalstack/admin/v2/tenant_connecpy.py +144 -118
- metalstack/admin/v2/tenant_pb2.py +10 -10
- metalstack/admin/v2/tenant_pb2.pyi +2 -4
- metalstack/admin/v2/token_connecpy.py +144 -118
- metalstack/api/v2/filesystem_connecpy.py +241 -197
- metalstack/api/v2/health_connecpy.py +93 -76
- metalstack/api/v2/image_connecpy.py +195 -160
- metalstack/api/v2/ip_connecpy.py +291 -238
- metalstack/api/v2/machine_connecpy.py +291 -238
- metalstack/api/v2/method_connecpy.py +144 -118
- metalstack/api/v2/network_connecpy.py +341 -279
- metalstack/api/v2/partition_connecpy.py +144 -118
- metalstack/api/v2/project_connecpy.py +654 -538
- metalstack/api/v2/project_pb2.py +51 -51
- metalstack/api/v2/project_pb2.pyi +12 -6
- metalstack/api/v2/size_connecpy.py +144 -118
- metalstack/api/v2/tenant_connecpy.py +654 -538
- metalstack/api/v2/tenant_pb2.py +46 -46
- metalstack/api/v2/tenant_pb2.pyi +8 -6
- metalstack/api/v2/token_connecpy.py +341 -279
- metalstack/api/v2/user_connecpy.py +93 -76
- metalstack/api/v2/version_connecpy.py +93 -76
- metalstack/infra/v2/bmc_connecpy.py +93 -76
- metalstack/infra/v2/switch_connecpy.py +93 -76
- {metal_stack_api-0.0.14.dist-info → metal_stack_api-0.0.16.dist-info}/WHEEL +0 -0
- {metal_stack_api-0.0.14.dist-info → metal_stack_api-0.0.16.dist-info}/top_level.txt +0 -0
|
@@ -1,326 +1,379 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by https://github.com/i2y/connecpy/protoc-gen-connecpy. DO NOT EDIT!
|
|
2
|
+
# Generated by https://github.com/i2y/connecpy/v2/protoc-gen-connecpy. DO NOT EDIT!
|
|
3
3
|
# source: metalstack/api/v2/machine.proto
|
|
4
4
|
|
|
5
|
-
from
|
|
5
|
+
from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
|
|
6
|
+
from typing import Protocol
|
|
6
7
|
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
from connecpy.
|
|
10
|
-
from connecpy.
|
|
11
|
-
from connecpy.
|
|
12
|
-
from connecpy.
|
|
13
|
-
from connecpy.
|
|
8
|
+
from connecpy.client import ConnecpyClient, ConnecpyClientSync
|
|
9
|
+
from connecpy.code import Code
|
|
10
|
+
from connecpy.exceptions import ConnecpyException
|
|
11
|
+
from connecpy.interceptor import Interceptor, InterceptorSync
|
|
12
|
+
from connecpy.method import IdempotencyLevel, MethodInfo
|
|
13
|
+
from connecpy.request import Headers, RequestContext
|
|
14
|
+
from connecpy.server import ConnecpyASGIApplication, ConnecpyWSGIApplication, Endpoint, EndpointSync
|
|
14
15
|
import metalstack.api.v2.machine_pb2 as metalstack_dot_api_dot_v2_dot_machine__pb2
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class MachineService(Protocol):
|
|
18
|
-
async def
|
|
19
|
-
|
|
20
|
-
async def Update(self, req: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse: ...
|
|
21
|
-
async def List(self, req: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse: ...
|
|
22
|
-
async def Delete(self, req: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse: ...
|
|
19
|
+
async def get(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse:
|
|
20
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
23
21
|
|
|
22
|
+
async def create(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse:
|
|
23
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
super().__init__()
|
|
28
|
-
self._prefix = f"{server_path_prefix}/metalstack.api.v2.MachineService"
|
|
29
|
-
self._endpoints = {
|
|
30
|
-
"Get": Endpoint[metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest, metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse](
|
|
31
|
-
service_name="MachineService",
|
|
32
|
-
name="Get",
|
|
33
|
-
function=getattr(service, "Get"),
|
|
34
|
-
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest,
|
|
35
|
-
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse,
|
|
36
|
-
allowed_methods=("POST",),
|
|
37
|
-
),
|
|
38
|
-
"Create": Endpoint[metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest, metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse](
|
|
39
|
-
service_name="MachineService",
|
|
40
|
-
name="Create",
|
|
41
|
-
function=getattr(service, "Create"),
|
|
42
|
-
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest,
|
|
43
|
-
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse,
|
|
44
|
-
allowed_methods=("POST",),
|
|
45
|
-
),
|
|
46
|
-
"Update": Endpoint[metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest, metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse](
|
|
47
|
-
service_name="MachineService",
|
|
48
|
-
name="Update",
|
|
49
|
-
function=getattr(service, "Update"),
|
|
50
|
-
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest,
|
|
51
|
-
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse,
|
|
52
|
-
allowed_methods=("POST",),
|
|
53
|
-
),
|
|
54
|
-
"List": Endpoint[metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest, metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse](
|
|
55
|
-
service_name="MachineService",
|
|
56
|
-
name="List",
|
|
57
|
-
function=getattr(service, "List"),
|
|
58
|
-
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest,
|
|
59
|
-
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse,
|
|
60
|
-
allowed_methods=("POST",),
|
|
61
|
-
),
|
|
62
|
-
"Delete": Endpoint[metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest, metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse](
|
|
63
|
-
service_name="MachineService",
|
|
64
|
-
name="Delete",
|
|
65
|
-
function=getattr(service, "Delete"),
|
|
66
|
-
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest,
|
|
67
|
-
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse,
|
|
68
|
-
allowed_methods=("POST",),
|
|
69
|
-
),
|
|
70
|
-
}
|
|
25
|
+
async def update(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse:
|
|
26
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
71
27
|
|
|
72
|
-
def
|
|
73
|
-
|
|
28
|
+
async def list(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse:
|
|
29
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
74
30
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
def Get(self, req: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse: ...
|
|
78
|
-
def Create(self, req: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse: ...
|
|
79
|
-
def Update(self, req: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse: ...
|
|
80
|
-
def List(self, req: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse: ...
|
|
81
|
-
def Delete(self, req: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse: ...
|
|
31
|
+
async def delete(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse:
|
|
32
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
82
33
|
|
|
83
34
|
|
|
84
|
-
class
|
|
85
|
-
def __init__(self, *,
|
|
86
|
-
super().__init__(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
35
|
+
class MachineServiceASGIApplication(ConnecpyASGIApplication):
|
|
36
|
+
def __init__(self, service: MachineService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
37
|
+
super().__init__(
|
|
38
|
+
endpoints={
|
|
39
|
+
"/metalstack.api.v2.MachineService/Get": Endpoint.unary(
|
|
40
|
+
method=MethodInfo(
|
|
41
|
+
name="Get",
|
|
42
|
+
service_name="metalstack.api.v2.MachineService",
|
|
43
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest,
|
|
44
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse,
|
|
45
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
46
|
+
),
|
|
47
|
+
function=service.get,
|
|
48
|
+
),
|
|
49
|
+
"/metalstack.api.v2.MachineService/Create": Endpoint.unary(
|
|
50
|
+
method=MethodInfo(
|
|
51
|
+
name="Create",
|
|
52
|
+
service_name="metalstack.api.v2.MachineService",
|
|
53
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest,
|
|
54
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse,
|
|
55
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
56
|
+
),
|
|
57
|
+
function=service.create,
|
|
58
|
+
),
|
|
59
|
+
"/metalstack.api.v2.MachineService/Update": Endpoint.unary(
|
|
60
|
+
method=MethodInfo(
|
|
61
|
+
name="Update",
|
|
62
|
+
service_name="metalstack.api.v2.MachineService",
|
|
63
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest,
|
|
64
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse,
|
|
65
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
66
|
+
),
|
|
67
|
+
function=service.update,
|
|
68
|
+
),
|
|
69
|
+
"/metalstack.api.v2.MachineService/List": Endpoint.unary(
|
|
70
|
+
method=MethodInfo(
|
|
71
|
+
name="List",
|
|
72
|
+
service_name="metalstack.api.v2.MachineService",
|
|
73
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest,
|
|
74
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse,
|
|
75
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
76
|
+
),
|
|
77
|
+
function=service.list,
|
|
78
|
+
),
|
|
79
|
+
"/metalstack.api.v2.MachineService/Delete": Endpoint.unary(
|
|
80
|
+
method=MethodInfo(
|
|
81
|
+
name="Delete",
|
|
82
|
+
service_name="metalstack.api.v2.MachineService",
|
|
83
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest,
|
|
84
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse,
|
|
85
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
86
|
+
),
|
|
87
|
+
function=service.delete,
|
|
88
|
+
),
|
|
89
|
+
},
|
|
90
|
+
interceptors=interceptors,
|
|
91
|
+
read_max_bytes=read_max_bytes,
|
|
92
|
+
)
|
|
130
93
|
|
|
131
|
-
|
|
132
|
-
|
|
94
|
+
@property
|
|
95
|
+
def path(self):
|
|
96
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
97
|
+
return "/metalstack.api.v2.MachineService"
|
|
133
98
|
|
|
134
99
|
|
|
135
100
|
class MachineServiceClient(ConnecpyClient):
|
|
136
|
-
def
|
|
101
|
+
async def get(
|
|
137
102
|
self,
|
|
138
103
|
request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest,
|
|
139
104
|
*,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
**kwargs,
|
|
105
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
106
|
+
timeout_ms: int | None = None,
|
|
143
107
|
) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse:
|
|
144
|
-
|
|
145
|
-
return self._make_request(
|
|
146
|
-
url=f"{server_path_prefix}/metalstack.api.v2.MachineService/Get",
|
|
147
|
-
ctx=ctx,
|
|
108
|
+
return await self.execute_unary(
|
|
148
109
|
request=request,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
110
|
+
method=MethodInfo(
|
|
111
|
+
name="Get",
|
|
112
|
+
service_name="metalstack.api.v2.MachineService",
|
|
113
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest,
|
|
114
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse,
|
|
115
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
116
|
+
),
|
|
117
|
+
headers=headers,
|
|
118
|
+
timeout_ms=timeout_ms,
|
|
152
119
|
)
|
|
153
120
|
|
|
154
|
-
def
|
|
121
|
+
async def create(
|
|
155
122
|
self,
|
|
156
123
|
request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest,
|
|
157
124
|
*,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
**kwargs,
|
|
125
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
126
|
+
timeout_ms: int | None = None,
|
|
161
127
|
) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse:
|
|
162
|
-
|
|
163
|
-
return self._make_request(
|
|
164
|
-
url=f"{server_path_prefix}/metalstack.api.v2.MachineService/Create",
|
|
165
|
-
ctx=ctx,
|
|
128
|
+
return await self.execute_unary(
|
|
166
129
|
request=request,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
130
|
+
method=MethodInfo(
|
|
131
|
+
name="Create",
|
|
132
|
+
service_name="metalstack.api.v2.MachineService",
|
|
133
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest,
|
|
134
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse,
|
|
135
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
136
|
+
),
|
|
137
|
+
headers=headers,
|
|
138
|
+
timeout_ms=timeout_ms,
|
|
170
139
|
)
|
|
171
140
|
|
|
172
|
-
def
|
|
141
|
+
async def update(
|
|
173
142
|
self,
|
|
174
143
|
request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest,
|
|
175
144
|
*,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
**kwargs,
|
|
145
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
146
|
+
timeout_ms: int | None = None,
|
|
179
147
|
) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse:
|
|
180
|
-
|
|
181
|
-
return self._make_request(
|
|
182
|
-
url=f"{server_path_prefix}/metalstack.api.v2.MachineService/Update",
|
|
183
|
-
ctx=ctx,
|
|
148
|
+
return await self.execute_unary(
|
|
184
149
|
request=request,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
150
|
+
method=MethodInfo(
|
|
151
|
+
name="Update",
|
|
152
|
+
service_name="metalstack.api.v2.MachineService",
|
|
153
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest,
|
|
154
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse,
|
|
155
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
156
|
+
),
|
|
157
|
+
headers=headers,
|
|
158
|
+
timeout_ms=timeout_ms,
|
|
188
159
|
)
|
|
189
160
|
|
|
190
|
-
def
|
|
161
|
+
async def list(
|
|
191
162
|
self,
|
|
192
163
|
request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest,
|
|
193
164
|
*,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
**kwargs,
|
|
165
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
166
|
+
timeout_ms: int | None = None,
|
|
197
167
|
) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse:
|
|
198
|
-
|
|
199
|
-
return self._make_request(
|
|
200
|
-
url=f"{server_path_prefix}/metalstack.api.v2.MachineService/List",
|
|
201
|
-
ctx=ctx,
|
|
168
|
+
return await self.execute_unary(
|
|
202
169
|
request=request,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
170
|
+
method=MethodInfo(
|
|
171
|
+
name="List",
|
|
172
|
+
service_name="metalstack.api.v2.MachineService",
|
|
173
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest,
|
|
174
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse,
|
|
175
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
176
|
+
),
|
|
177
|
+
headers=headers,
|
|
178
|
+
timeout_ms=timeout_ms,
|
|
206
179
|
)
|
|
207
180
|
|
|
208
|
-
def
|
|
181
|
+
async def delete(
|
|
209
182
|
self,
|
|
210
183
|
request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest,
|
|
211
184
|
*,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
**kwargs,
|
|
185
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
186
|
+
timeout_ms: int | None = None,
|
|
215
187
|
) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse:
|
|
216
|
-
|
|
217
|
-
return self._make_request(
|
|
218
|
-
url=f"{server_path_prefix}/metalstack.api.v2.MachineService/Delete",
|
|
219
|
-
ctx=ctx,
|
|
188
|
+
return await self.execute_unary(
|
|
220
189
|
request=request,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
190
|
+
method=MethodInfo(
|
|
191
|
+
name="Delete",
|
|
192
|
+
service_name="metalstack.api.v2.MachineService",
|
|
193
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest,
|
|
194
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse,
|
|
195
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
196
|
+
),
|
|
197
|
+
headers=headers,
|
|
198
|
+
timeout_ms=timeout_ms,
|
|
224
199
|
)
|
|
225
200
|
|
|
226
201
|
|
|
227
|
-
class
|
|
228
|
-
|
|
202
|
+
class MachineServiceSync(Protocol):
|
|
203
|
+
def get(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse:
|
|
204
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
205
|
+
def create(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse:
|
|
206
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
207
|
+
def update(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse:
|
|
208
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
209
|
+
def list(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse:
|
|
210
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
211
|
+
def delete(self, request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse:
|
|
212
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
class MachineServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
216
|
+
def __init__(self, service: MachineServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
217
|
+
super().__init__(
|
|
218
|
+
endpoints={
|
|
219
|
+
"/metalstack.api.v2.MachineService/Get": EndpointSync.unary(
|
|
220
|
+
method=MethodInfo(
|
|
221
|
+
name="Get",
|
|
222
|
+
service_name="metalstack.api.v2.MachineService",
|
|
223
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest,
|
|
224
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse,
|
|
225
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
226
|
+
),
|
|
227
|
+
function=service.get,
|
|
228
|
+
),
|
|
229
|
+
"/metalstack.api.v2.MachineService/Create": EndpointSync.unary(
|
|
230
|
+
method=MethodInfo(
|
|
231
|
+
name="Create",
|
|
232
|
+
service_name="metalstack.api.v2.MachineService",
|
|
233
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest,
|
|
234
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse,
|
|
235
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
236
|
+
),
|
|
237
|
+
function=service.create,
|
|
238
|
+
),
|
|
239
|
+
"/metalstack.api.v2.MachineService/Update": EndpointSync.unary(
|
|
240
|
+
method=MethodInfo(
|
|
241
|
+
name="Update",
|
|
242
|
+
service_name="metalstack.api.v2.MachineService",
|
|
243
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest,
|
|
244
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse,
|
|
245
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
246
|
+
),
|
|
247
|
+
function=service.update,
|
|
248
|
+
),
|
|
249
|
+
"/metalstack.api.v2.MachineService/List": EndpointSync.unary(
|
|
250
|
+
method=MethodInfo(
|
|
251
|
+
name="List",
|
|
252
|
+
service_name="metalstack.api.v2.MachineService",
|
|
253
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest,
|
|
254
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse,
|
|
255
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
256
|
+
),
|
|
257
|
+
function=service.list,
|
|
258
|
+
),
|
|
259
|
+
"/metalstack.api.v2.MachineService/Delete": EndpointSync.unary(
|
|
260
|
+
method=MethodInfo(
|
|
261
|
+
name="Delete",
|
|
262
|
+
service_name="metalstack.api.v2.MachineService",
|
|
263
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest,
|
|
264
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse,
|
|
265
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
266
|
+
),
|
|
267
|
+
function=service.delete,
|
|
268
|
+
),
|
|
269
|
+
},
|
|
270
|
+
interceptors=interceptors,
|
|
271
|
+
read_max_bytes=read_max_bytes,
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
@property
|
|
275
|
+
def path(self):
|
|
276
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
277
|
+
return "/metalstack.api.v2.MachineService"
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
class MachineServiceClientSync(ConnecpyClientSync):
|
|
281
|
+
def get(
|
|
229
282
|
self,
|
|
230
283
|
request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest,
|
|
231
284
|
*,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
235
|
-
**kwargs,
|
|
285
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
286
|
+
timeout_ms: int | None = None,
|
|
236
287
|
) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse:
|
|
237
|
-
|
|
238
|
-
return await self._make_request(
|
|
239
|
-
url=f"{server_path_prefix}/metalstack.api.v2.MachineService/Get",
|
|
240
|
-
ctx=ctx,
|
|
288
|
+
return self.execute_unary(
|
|
241
289
|
request=request,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
290
|
+
method=MethodInfo(
|
|
291
|
+
name="Get",
|
|
292
|
+
service_name="metalstack.api.v2.MachineService",
|
|
293
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetRequest,
|
|
294
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceGetResponse,
|
|
295
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
296
|
+
),
|
|
297
|
+
headers=headers,
|
|
298
|
+
timeout_ms=timeout_ms,
|
|
246
299
|
)
|
|
247
300
|
|
|
248
|
-
|
|
301
|
+
def create(
|
|
249
302
|
self,
|
|
250
303
|
request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest,
|
|
251
304
|
*,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
255
|
-
**kwargs,
|
|
305
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
306
|
+
timeout_ms: int | None = None,
|
|
256
307
|
) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse:
|
|
257
|
-
|
|
258
|
-
return await self._make_request(
|
|
259
|
-
url=f"{server_path_prefix}/metalstack.api.v2.MachineService/Create",
|
|
260
|
-
ctx=ctx,
|
|
308
|
+
return self.execute_unary(
|
|
261
309
|
request=request,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
310
|
+
method=MethodInfo(
|
|
311
|
+
name="Create",
|
|
312
|
+
service_name="metalstack.api.v2.MachineService",
|
|
313
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateRequest,
|
|
314
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceCreateResponse,
|
|
315
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
316
|
+
),
|
|
317
|
+
headers=headers,
|
|
318
|
+
timeout_ms=timeout_ms,
|
|
266
319
|
)
|
|
267
320
|
|
|
268
|
-
|
|
321
|
+
def update(
|
|
269
322
|
self,
|
|
270
323
|
request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest,
|
|
271
324
|
*,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
275
|
-
**kwargs,
|
|
325
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
326
|
+
timeout_ms: int | None = None,
|
|
276
327
|
) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse:
|
|
277
|
-
|
|
278
|
-
return await self._make_request(
|
|
279
|
-
url=f"{server_path_prefix}/metalstack.api.v2.MachineService/Update",
|
|
280
|
-
ctx=ctx,
|
|
328
|
+
return self.execute_unary(
|
|
281
329
|
request=request,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
330
|
+
method=MethodInfo(
|
|
331
|
+
name="Update",
|
|
332
|
+
service_name="metalstack.api.v2.MachineService",
|
|
333
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateRequest,
|
|
334
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceUpdateResponse,
|
|
335
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
336
|
+
),
|
|
337
|
+
headers=headers,
|
|
338
|
+
timeout_ms=timeout_ms,
|
|
286
339
|
)
|
|
287
340
|
|
|
288
|
-
|
|
341
|
+
def list(
|
|
289
342
|
self,
|
|
290
343
|
request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest,
|
|
291
344
|
*,
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
295
|
-
**kwargs,
|
|
345
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
346
|
+
timeout_ms: int | None = None,
|
|
296
347
|
) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse:
|
|
297
|
-
|
|
298
|
-
return await self._make_request(
|
|
299
|
-
url=f"{server_path_prefix}/metalstack.api.v2.MachineService/List",
|
|
300
|
-
ctx=ctx,
|
|
348
|
+
return self.execute_unary(
|
|
301
349
|
request=request,
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
350
|
+
method=MethodInfo(
|
|
351
|
+
name="List",
|
|
352
|
+
service_name="metalstack.api.v2.MachineService",
|
|
353
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListRequest,
|
|
354
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceListResponse,
|
|
355
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
356
|
+
),
|
|
357
|
+
headers=headers,
|
|
358
|
+
timeout_ms=timeout_ms,
|
|
306
359
|
)
|
|
307
360
|
|
|
308
|
-
|
|
361
|
+
def delete(
|
|
309
362
|
self,
|
|
310
363
|
request: metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest,
|
|
311
364
|
*,
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
315
|
-
**kwargs,
|
|
365
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
366
|
+
timeout_ms: int | None = None,
|
|
316
367
|
) -> metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse:
|
|
317
|
-
|
|
318
|
-
return await self._make_request(
|
|
319
|
-
url=f"{server_path_prefix}/metalstack.api.v2.MachineService/Delete",
|
|
320
|
-
ctx=ctx,
|
|
368
|
+
return self.execute_unary(
|
|
321
369
|
request=request,
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
370
|
+
method=MethodInfo(
|
|
371
|
+
name="Delete",
|
|
372
|
+
service_name="metalstack.api.v2.MachineService",
|
|
373
|
+
input=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteRequest,
|
|
374
|
+
output=metalstack_dot_api_dot_v2_dot_machine__pb2.MachineServiceDeleteResponse,
|
|
375
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
376
|
+
),
|
|
377
|
+
headers=headers,
|
|
378
|
+
timeout_ms=timeout_ms,
|
|
326
379
|
)
|