metal-stack-api 0.0.15__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.15.dist-info → metal_stack_api-0.0.16.dist-info}/METADATA +1 -1
- {metal_stack_api-0.0.15.dist-info → metal_stack_api-0.0.16.dist-info}/RECORD +29 -29
- 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/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/size_connecpy.py +144 -118
- metalstack/api/v2/tenant_connecpy.py +654 -538
- 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.15.dist-info → metal_stack_api-0.0.16.dist-info}/WHEEL +0 -0
- {metal_stack_api-0.0.15.dist-info → metal_stack_api-0.0.16.dist-info}/top_level.txt +0 -0
|
@@ -1,382 +1,444 @@
|
|
|
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/token.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.token_pb2 as metalstack_dot_api_dot_v2_dot_token__pb2
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class TokenService(Protocol):
|
|
18
|
-
async def
|
|
19
|
-
|
|
20
|
-
async def Update(self, req: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse: ...
|
|
21
|
-
async def List(self, req: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse: ...
|
|
22
|
-
async def Revoke(self, req: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse: ...
|
|
23
|
-
async def Refresh(self, req: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse: ...
|
|
19
|
+
async def get(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse:
|
|
20
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
24
21
|
|
|
22
|
+
async def create(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse:
|
|
23
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
super().__init__()
|
|
29
|
-
self._prefix = f"{server_path_prefix}/metalstack.api.v2.TokenService"
|
|
30
|
-
self._endpoints = {
|
|
31
|
-
"Get": Endpoint[metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest, metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse](
|
|
32
|
-
service_name="TokenService",
|
|
33
|
-
name="Get",
|
|
34
|
-
function=getattr(service, "Get"),
|
|
35
|
-
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest,
|
|
36
|
-
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse,
|
|
37
|
-
allowed_methods=("POST",),
|
|
38
|
-
),
|
|
39
|
-
"Create": Endpoint[metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest, metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse](
|
|
40
|
-
service_name="TokenService",
|
|
41
|
-
name="Create",
|
|
42
|
-
function=getattr(service, "Create"),
|
|
43
|
-
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest,
|
|
44
|
-
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse,
|
|
45
|
-
allowed_methods=("POST",),
|
|
46
|
-
),
|
|
47
|
-
"Update": Endpoint[metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest, metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse](
|
|
48
|
-
service_name="TokenService",
|
|
49
|
-
name="Update",
|
|
50
|
-
function=getattr(service, "Update"),
|
|
51
|
-
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest,
|
|
52
|
-
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse,
|
|
53
|
-
allowed_methods=("POST",),
|
|
54
|
-
),
|
|
55
|
-
"List": Endpoint[metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest, metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse](
|
|
56
|
-
service_name="TokenService",
|
|
57
|
-
name="List",
|
|
58
|
-
function=getattr(service, "List"),
|
|
59
|
-
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest,
|
|
60
|
-
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse,
|
|
61
|
-
allowed_methods=("POST",),
|
|
62
|
-
),
|
|
63
|
-
"Revoke": Endpoint[metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest, metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse](
|
|
64
|
-
service_name="TokenService",
|
|
65
|
-
name="Revoke",
|
|
66
|
-
function=getattr(service, "Revoke"),
|
|
67
|
-
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest,
|
|
68
|
-
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse,
|
|
69
|
-
allowed_methods=("POST",),
|
|
70
|
-
),
|
|
71
|
-
"Refresh": Endpoint[metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest, metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse](
|
|
72
|
-
service_name="TokenService",
|
|
73
|
-
name="Refresh",
|
|
74
|
-
function=getattr(service, "Refresh"),
|
|
75
|
-
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest,
|
|
76
|
-
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse,
|
|
77
|
-
allowed_methods=("POST",),
|
|
78
|
-
),
|
|
79
|
-
}
|
|
25
|
+
async def update(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse:
|
|
26
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
80
27
|
|
|
81
|
-
def
|
|
82
|
-
|
|
28
|
+
async def list(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse:
|
|
29
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
83
30
|
|
|
31
|
+
async def revoke(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse:
|
|
32
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
84
33
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
def Create(self, req: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse: ...
|
|
88
|
-
def Update(self, req: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse: ...
|
|
89
|
-
def List(self, req: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse: ...
|
|
90
|
-
def Revoke(self, req: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse: ...
|
|
91
|
-
def Refresh(self, req: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse: ...
|
|
34
|
+
async def refresh(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse:
|
|
35
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
92
36
|
|
|
93
37
|
|
|
94
|
-
class
|
|
95
|
-
def __init__(self, *,
|
|
96
|
-
super().__init__(
|
|
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
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
38
|
+
class TokenServiceASGIApplication(ConnecpyASGIApplication):
|
|
39
|
+
def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
40
|
+
super().__init__(
|
|
41
|
+
endpoints={
|
|
42
|
+
"/metalstack.api.v2.TokenService/Get": Endpoint.unary(
|
|
43
|
+
method=MethodInfo(
|
|
44
|
+
name="Get",
|
|
45
|
+
service_name="metalstack.api.v2.TokenService",
|
|
46
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest,
|
|
47
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse,
|
|
48
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
49
|
+
),
|
|
50
|
+
function=service.get,
|
|
51
|
+
),
|
|
52
|
+
"/metalstack.api.v2.TokenService/Create": Endpoint.unary(
|
|
53
|
+
method=MethodInfo(
|
|
54
|
+
name="Create",
|
|
55
|
+
service_name="metalstack.api.v2.TokenService",
|
|
56
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest,
|
|
57
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse,
|
|
58
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
59
|
+
),
|
|
60
|
+
function=service.create,
|
|
61
|
+
),
|
|
62
|
+
"/metalstack.api.v2.TokenService/Update": Endpoint.unary(
|
|
63
|
+
method=MethodInfo(
|
|
64
|
+
name="Update",
|
|
65
|
+
service_name="metalstack.api.v2.TokenService",
|
|
66
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest,
|
|
67
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse,
|
|
68
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
69
|
+
),
|
|
70
|
+
function=service.update,
|
|
71
|
+
),
|
|
72
|
+
"/metalstack.api.v2.TokenService/List": Endpoint.unary(
|
|
73
|
+
method=MethodInfo(
|
|
74
|
+
name="List",
|
|
75
|
+
service_name="metalstack.api.v2.TokenService",
|
|
76
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest,
|
|
77
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse,
|
|
78
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
79
|
+
),
|
|
80
|
+
function=service.list,
|
|
81
|
+
),
|
|
82
|
+
"/metalstack.api.v2.TokenService/Revoke": Endpoint.unary(
|
|
83
|
+
method=MethodInfo(
|
|
84
|
+
name="Revoke",
|
|
85
|
+
service_name="metalstack.api.v2.TokenService",
|
|
86
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest,
|
|
87
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse,
|
|
88
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
89
|
+
),
|
|
90
|
+
function=service.revoke,
|
|
91
|
+
),
|
|
92
|
+
"/metalstack.api.v2.TokenService/Refresh": Endpoint.unary(
|
|
93
|
+
method=MethodInfo(
|
|
94
|
+
name="Refresh",
|
|
95
|
+
service_name="metalstack.api.v2.TokenService",
|
|
96
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest,
|
|
97
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse,
|
|
98
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
99
|
+
),
|
|
100
|
+
function=service.refresh,
|
|
101
|
+
),
|
|
102
|
+
},
|
|
103
|
+
interceptors=interceptors,
|
|
104
|
+
read_max_bytes=read_max_bytes,
|
|
105
|
+
)
|
|
148
106
|
|
|
149
|
-
|
|
150
|
-
|
|
107
|
+
@property
|
|
108
|
+
def path(self):
|
|
109
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
110
|
+
return "/metalstack.api.v2.TokenService"
|
|
151
111
|
|
|
152
112
|
|
|
153
113
|
class TokenServiceClient(ConnecpyClient):
|
|
154
|
-
def
|
|
114
|
+
async def get(
|
|
155
115
|
self,
|
|
156
116
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest,
|
|
157
117
|
*,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
**kwargs,
|
|
118
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
119
|
+
timeout_ms: int | None = None,
|
|
161
120
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse:
|
|
162
|
-
|
|
163
|
-
return self._make_request(
|
|
164
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/Get",
|
|
165
|
-
ctx=ctx,
|
|
121
|
+
return await self.execute_unary(
|
|
166
122
|
request=request,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
123
|
+
method=MethodInfo(
|
|
124
|
+
name="Get",
|
|
125
|
+
service_name="metalstack.api.v2.TokenService",
|
|
126
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest,
|
|
127
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse,
|
|
128
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
129
|
+
),
|
|
130
|
+
headers=headers,
|
|
131
|
+
timeout_ms=timeout_ms,
|
|
170
132
|
)
|
|
171
133
|
|
|
172
|
-
def
|
|
134
|
+
async def create(
|
|
173
135
|
self,
|
|
174
136
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest,
|
|
175
137
|
*,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
**kwargs,
|
|
138
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
139
|
+
timeout_ms: int | None = None,
|
|
179
140
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse:
|
|
180
|
-
|
|
181
|
-
return self._make_request(
|
|
182
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/Create",
|
|
183
|
-
ctx=ctx,
|
|
141
|
+
return await self.execute_unary(
|
|
184
142
|
request=request,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
143
|
+
method=MethodInfo(
|
|
144
|
+
name="Create",
|
|
145
|
+
service_name="metalstack.api.v2.TokenService",
|
|
146
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest,
|
|
147
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse,
|
|
148
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
149
|
+
),
|
|
150
|
+
headers=headers,
|
|
151
|
+
timeout_ms=timeout_ms,
|
|
188
152
|
)
|
|
189
153
|
|
|
190
|
-
def
|
|
154
|
+
async def update(
|
|
191
155
|
self,
|
|
192
156
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest,
|
|
193
157
|
*,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
**kwargs,
|
|
158
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
159
|
+
timeout_ms: int | None = None,
|
|
197
160
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse:
|
|
198
|
-
|
|
199
|
-
return self._make_request(
|
|
200
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/Update",
|
|
201
|
-
ctx=ctx,
|
|
161
|
+
return await self.execute_unary(
|
|
202
162
|
request=request,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
163
|
+
method=MethodInfo(
|
|
164
|
+
name="Update",
|
|
165
|
+
service_name="metalstack.api.v2.TokenService",
|
|
166
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest,
|
|
167
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse,
|
|
168
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
169
|
+
),
|
|
170
|
+
headers=headers,
|
|
171
|
+
timeout_ms=timeout_ms,
|
|
206
172
|
)
|
|
207
173
|
|
|
208
|
-
def
|
|
174
|
+
async def list(
|
|
209
175
|
self,
|
|
210
176
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest,
|
|
211
177
|
*,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
**kwargs,
|
|
178
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
179
|
+
timeout_ms: int | None = None,
|
|
215
180
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse:
|
|
216
|
-
|
|
217
|
-
return self._make_request(
|
|
218
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/List",
|
|
219
|
-
ctx=ctx,
|
|
181
|
+
return await self.execute_unary(
|
|
220
182
|
request=request,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
183
|
+
method=MethodInfo(
|
|
184
|
+
name="List",
|
|
185
|
+
service_name="metalstack.api.v2.TokenService",
|
|
186
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest,
|
|
187
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse,
|
|
188
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
189
|
+
),
|
|
190
|
+
headers=headers,
|
|
191
|
+
timeout_ms=timeout_ms,
|
|
224
192
|
)
|
|
225
193
|
|
|
226
|
-
def
|
|
194
|
+
async def revoke(
|
|
227
195
|
self,
|
|
228
196
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest,
|
|
229
197
|
*,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
**kwargs,
|
|
198
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
199
|
+
timeout_ms: int | None = None,
|
|
233
200
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse:
|
|
234
|
-
|
|
235
|
-
return self._make_request(
|
|
236
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/Revoke",
|
|
237
|
-
ctx=ctx,
|
|
201
|
+
return await self.execute_unary(
|
|
238
202
|
request=request,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
203
|
+
method=MethodInfo(
|
|
204
|
+
name="Revoke",
|
|
205
|
+
service_name="metalstack.api.v2.TokenService",
|
|
206
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest,
|
|
207
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse,
|
|
208
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
209
|
+
),
|
|
210
|
+
headers=headers,
|
|
211
|
+
timeout_ms=timeout_ms,
|
|
242
212
|
)
|
|
243
213
|
|
|
244
|
-
def
|
|
214
|
+
async def refresh(
|
|
245
215
|
self,
|
|
246
216
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest,
|
|
247
217
|
*,
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
**kwargs,
|
|
218
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
219
|
+
timeout_ms: int | None = None,
|
|
251
220
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse:
|
|
252
|
-
|
|
253
|
-
return self._make_request(
|
|
254
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/Refresh",
|
|
255
|
-
ctx=ctx,
|
|
221
|
+
return await self.execute_unary(
|
|
256
222
|
request=request,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
223
|
+
method=MethodInfo(
|
|
224
|
+
name="Refresh",
|
|
225
|
+
service_name="metalstack.api.v2.TokenService",
|
|
226
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest,
|
|
227
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse,
|
|
228
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
229
|
+
),
|
|
230
|
+
headers=headers,
|
|
231
|
+
timeout_ms=timeout_ms,
|
|
260
232
|
)
|
|
261
233
|
|
|
262
234
|
|
|
263
|
-
class
|
|
264
|
-
|
|
235
|
+
class TokenServiceSync(Protocol):
|
|
236
|
+
def get(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse:
|
|
237
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
238
|
+
def create(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse:
|
|
239
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
240
|
+
def update(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse:
|
|
241
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
242
|
+
def list(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse:
|
|
243
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
244
|
+
def revoke(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse:
|
|
245
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
246
|
+
def refresh(self, request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse:
|
|
247
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class TokenServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
251
|
+
def __init__(self, service: TokenServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
252
|
+
super().__init__(
|
|
253
|
+
endpoints={
|
|
254
|
+
"/metalstack.api.v2.TokenService/Get": EndpointSync.unary(
|
|
255
|
+
method=MethodInfo(
|
|
256
|
+
name="Get",
|
|
257
|
+
service_name="metalstack.api.v2.TokenService",
|
|
258
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest,
|
|
259
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse,
|
|
260
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
261
|
+
),
|
|
262
|
+
function=service.get,
|
|
263
|
+
),
|
|
264
|
+
"/metalstack.api.v2.TokenService/Create": EndpointSync.unary(
|
|
265
|
+
method=MethodInfo(
|
|
266
|
+
name="Create",
|
|
267
|
+
service_name="metalstack.api.v2.TokenService",
|
|
268
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest,
|
|
269
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse,
|
|
270
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
271
|
+
),
|
|
272
|
+
function=service.create,
|
|
273
|
+
),
|
|
274
|
+
"/metalstack.api.v2.TokenService/Update": EndpointSync.unary(
|
|
275
|
+
method=MethodInfo(
|
|
276
|
+
name="Update",
|
|
277
|
+
service_name="metalstack.api.v2.TokenService",
|
|
278
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest,
|
|
279
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse,
|
|
280
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
281
|
+
),
|
|
282
|
+
function=service.update,
|
|
283
|
+
),
|
|
284
|
+
"/metalstack.api.v2.TokenService/List": EndpointSync.unary(
|
|
285
|
+
method=MethodInfo(
|
|
286
|
+
name="List",
|
|
287
|
+
service_name="metalstack.api.v2.TokenService",
|
|
288
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest,
|
|
289
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse,
|
|
290
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
291
|
+
),
|
|
292
|
+
function=service.list,
|
|
293
|
+
),
|
|
294
|
+
"/metalstack.api.v2.TokenService/Revoke": EndpointSync.unary(
|
|
295
|
+
method=MethodInfo(
|
|
296
|
+
name="Revoke",
|
|
297
|
+
service_name="metalstack.api.v2.TokenService",
|
|
298
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest,
|
|
299
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse,
|
|
300
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
301
|
+
),
|
|
302
|
+
function=service.revoke,
|
|
303
|
+
),
|
|
304
|
+
"/metalstack.api.v2.TokenService/Refresh": EndpointSync.unary(
|
|
305
|
+
method=MethodInfo(
|
|
306
|
+
name="Refresh",
|
|
307
|
+
service_name="metalstack.api.v2.TokenService",
|
|
308
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest,
|
|
309
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse,
|
|
310
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
311
|
+
),
|
|
312
|
+
function=service.refresh,
|
|
313
|
+
),
|
|
314
|
+
},
|
|
315
|
+
interceptors=interceptors,
|
|
316
|
+
read_max_bytes=read_max_bytes,
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
@property
|
|
320
|
+
def path(self):
|
|
321
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
322
|
+
return "/metalstack.api.v2.TokenService"
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
class TokenServiceClientSync(ConnecpyClientSync):
|
|
326
|
+
def get(
|
|
265
327
|
self,
|
|
266
328
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest,
|
|
267
329
|
*,
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
271
|
-
**kwargs,
|
|
330
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
331
|
+
timeout_ms: int | None = None,
|
|
272
332
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse:
|
|
273
|
-
|
|
274
|
-
return await self._make_request(
|
|
275
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/Get",
|
|
276
|
-
ctx=ctx,
|
|
333
|
+
return self.execute_unary(
|
|
277
334
|
request=request,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
335
|
+
method=MethodInfo(
|
|
336
|
+
name="Get",
|
|
337
|
+
service_name="metalstack.api.v2.TokenService",
|
|
338
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetRequest,
|
|
339
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceGetResponse,
|
|
340
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
341
|
+
),
|
|
342
|
+
headers=headers,
|
|
343
|
+
timeout_ms=timeout_ms,
|
|
282
344
|
)
|
|
283
345
|
|
|
284
|
-
|
|
346
|
+
def create(
|
|
285
347
|
self,
|
|
286
348
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest,
|
|
287
349
|
*,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
291
|
-
**kwargs,
|
|
350
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
351
|
+
timeout_ms: int | None = None,
|
|
292
352
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse:
|
|
293
|
-
|
|
294
|
-
return await self._make_request(
|
|
295
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/Create",
|
|
296
|
-
ctx=ctx,
|
|
353
|
+
return self.execute_unary(
|
|
297
354
|
request=request,
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
355
|
+
method=MethodInfo(
|
|
356
|
+
name="Create",
|
|
357
|
+
service_name="metalstack.api.v2.TokenService",
|
|
358
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateRequest,
|
|
359
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceCreateResponse,
|
|
360
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
361
|
+
),
|
|
362
|
+
headers=headers,
|
|
363
|
+
timeout_ms=timeout_ms,
|
|
302
364
|
)
|
|
303
365
|
|
|
304
|
-
|
|
366
|
+
def update(
|
|
305
367
|
self,
|
|
306
368
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest,
|
|
307
369
|
*,
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
311
|
-
**kwargs,
|
|
370
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
371
|
+
timeout_ms: int | None = None,
|
|
312
372
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse:
|
|
313
|
-
|
|
314
|
-
return await self._make_request(
|
|
315
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/Update",
|
|
316
|
-
ctx=ctx,
|
|
373
|
+
return self.execute_unary(
|
|
317
374
|
request=request,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
375
|
+
method=MethodInfo(
|
|
376
|
+
name="Update",
|
|
377
|
+
service_name="metalstack.api.v2.TokenService",
|
|
378
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateRequest,
|
|
379
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceUpdateResponse,
|
|
380
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
381
|
+
),
|
|
382
|
+
headers=headers,
|
|
383
|
+
timeout_ms=timeout_ms,
|
|
322
384
|
)
|
|
323
385
|
|
|
324
|
-
|
|
386
|
+
def list(
|
|
325
387
|
self,
|
|
326
388
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest,
|
|
327
389
|
*,
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
331
|
-
**kwargs,
|
|
390
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
391
|
+
timeout_ms: int | None = None,
|
|
332
392
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse:
|
|
333
|
-
|
|
334
|
-
return await self._make_request(
|
|
335
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/List",
|
|
336
|
-
ctx=ctx,
|
|
393
|
+
return self.execute_unary(
|
|
337
394
|
request=request,
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
395
|
+
method=MethodInfo(
|
|
396
|
+
name="List",
|
|
397
|
+
service_name="metalstack.api.v2.TokenService",
|
|
398
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListRequest,
|
|
399
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceListResponse,
|
|
400
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
401
|
+
),
|
|
402
|
+
headers=headers,
|
|
403
|
+
timeout_ms=timeout_ms,
|
|
342
404
|
)
|
|
343
405
|
|
|
344
|
-
|
|
406
|
+
def revoke(
|
|
345
407
|
self,
|
|
346
408
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest,
|
|
347
409
|
*,
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
351
|
-
**kwargs,
|
|
410
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
411
|
+
timeout_ms: int | None = None,
|
|
352
412
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse:
|
|
353
|
-
|
|
354
|
-
return await self._make_request(
|
|
355
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/Revoke",
|
|
356
|
-
ctx=ctx,
|
|
413
|
+
return self.execute_unary(
|
|
357
414
|
request=request,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
415
|
+
method=MethodInfo(
|
|
416
|
+
name="Revoke",
|
|
417
|
+
service_name="metalstack.api.v2.TokenService",
|
|
418
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeRequest,
|
|
419
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRevokeResponse,
|
|
420
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
421
|
+
),
|
|
422
|
+
headers=headers,
|
|
423
|
+
timeout_ms=timeout_ms,
|
|
362
424
|
)
|
|
363
425
|
|
|
364
|
-
|
|
426
|
+
def refresh(
|
|
365
427
|
self,
|
|
366
428
|
request: metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest,
|
|
367
429
|
*,
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
371
|
-
**kwargs,
|
|
430
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
431
|
+
timeout_ms: int | None = None,
|
|
372
432
|
) -> metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse:
|
|
373
|
-
|
|
374
|
-
return await self._make_request(
|
|
375
|
-
url=f"{server_path_prefix}/metalstack.api.v2.TokenService/Refresh",
|
|
376
|
-
ctx=ctx,
|
|
433
|
+
return self.execute_unary(
|
|
377
434
|
request=request,
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
435
|
+
method=MethodInfo(
|
|
436
|
+
name="Refresh",
|
|
437
|
+
service_name="metalstack.api.v2.TokenService",
|
|
438
|
+
input=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshRequest,
|
|
439
|
+
output=metalstack_dot_api_dot_v2_dot_token__pb2.TokenServiceRefreshResponse,
|
|
440
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
441
|
+
),
|
|
442
|
+
headers=headers,
|
|
443
|
+
timeout_ms=timeout_ms,
|
|
382
444
|
)
|