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,102 +1,119 @@
|
|
|
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/health.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.health_pb2 as metalstack_dot_api_dot_v2_dot_health__pb2
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class HealthService(Protocol):
|
|
18
|
-
async def
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class HealthServiceSync(Protocol):
|
|
41
|
-
def Get(self, req: metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse: ...
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
class HealthServiceServerSync(ConnecpyServer):
|
|
45
|
-
def __init__(self, *, service: HealthServiceSync, server_path_prefix=""):
|
|
46
|
-
super().__init__()
|
|
47
|
-
self._prefix = f"{server_path_prefix}/metalstack.api.v2.HealthService"
|
|
48
|
-
self._endpoints = {
|
|
49
|
-
"Get": Endpoint[metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest, metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse](
|
|
50
|
-
service_name="HealthService",
|
|
51
|
-
name="Get",
|
|
52
|
-
function=getattr(service, "Get"),
|
|
53
|
-
input=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
|
|
54
|
-
output=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse,
|
|
55
|
-
allowed_methods=("POST",),
|
|
56
|
-
),
|
|
57
|
-
}
|
|
19
|
+
async def get(self, request: metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse:
|
|
20
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class HealthServiceASGIApplication(ConnecpyASGIApplication):
|
|
24
|
+
def __init__(self, service: HealthService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
25
|
+
super().__init__(
|
|
26
|
+
endpoints={
|
|
27
|
+
"/metalstack.api.v2.HealthService/Get": Endpoint.unary(
|
|
28
|
+
method=MethodInfo(
|
|
29
|
+
name="Get",
|
|
30
|
+
service_name="metalstack.api.v2.HealthService",
|
|
31
|
+
input=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
|
|
32
|
+
output=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse,
|
|
33
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
34
|
+
),
|
|
35
|
+
function=service.get,
|
|
36
|
+
),
|
|
37
|
+
},
|
|
38
|
+
interceptors=interceptors,
|
|
39
|
+
read_max_bytes=read_max_bytes,
|
|
40
|
+
)
|
|
58
41
|
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
@property
|
|
43
|
+
def path(self):
|
|
44
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
45
|
+
return "/metalstack.api.v2.HealthService"
|
|
61
46
|
|
|
62
47
|
|
|
63
48
|
class HealthServiceClient(ConnecpyClient):
|
|
64
|
-
def
|
|
49
|
+
async def get(
|
|
65
50
|
self,
|
|
66
51
|
request: metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
|
|
67
52
|
*,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
**kwargs,
|
|
53
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
54
|
+
timeout_ms: int | None = None,
|
|
71
55
|
) -> metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse:
|
|
72
|
-
|
|
73
|
-
return self._make_request(
|
|
74
|
-
url=f"{server_path_prefix}/metalstack.api.v2.HealthService/Get",
|
|
75
|
-
ctx=ctx,
|
|
56
|
+
return await self.execute_unary(
|
|
76
57
|
request=request,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
method=MethodInfo(
|
|
59
|
+
name="Get",
|
|
60
|
+
service_name="metalstack.api.v2.HealthService",
|
|
61
|
+
input=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
|
|
62
|
+
output=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse,
|
|
63
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
64
|
+
),
|
|
65
|
+
headers=headers,
|
|
66
|
+
timeout_ms=timeout_ms,
|
|
80
67
|
)
|
|
81
68
|
|
|
82
69
|
|
|
83
|
-
class
|
|
84
|
-
|
|
70
|
+
class HealthServiceSync(Protocol):
|
|
71
|
+
def get(self, request: metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse:
|
|
72
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class HealthServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
76
|
+
def __init__(self, service: HealthServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
77
|
+
super().__init__(
|
|
78
|
+
endpoints={
|
|
79
|
+
"/metalstack.api.v2.HealthService/Get": EndpointSync.unary(
|
|
80
|
+
method=MethodInfo(
|
|
81
|
+
name="Get",
|
|
82
|
+
service_name="metalstack.api.v2.HealthService",
|
|
83
|
+
input=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
|
|
84
|
+
output=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse,
|
|
85
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
86
|
+
),
|
|
87
|
+
function=service.get,
|
|
88
|
+
),
|
|
89
|
+
},
|
|
90
|
+
interceptors=interceptors,
|
|
91
|
+
read_max_bytes=read_max_bytes,
|
|
92
|
+
)
|
|
93
|
+
|
|
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.HealthService"
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class HealthServiceClientSync(ConnecpyClientSync):
|
|
101
|
+
def get(
|
|
85
102
|
self,
|
|
86
103
|
request: metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
|
|
87
104
|
*,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
91
|
-
**kwargs,
|
|
105
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
106
|
+
timeout_ms: int | None = None,
|
|
92
107
|
) -> metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse:
|
|
93
|
-
|
|
94
|
-
return await self._make_request(
|
|
95
|
-
url=f"{server_path_prefix}/metalstack.api.v2.HealthService/Get",
|
|
96
|
-
ctx=ctx,
|
|
108
|
+
return self.execute_unary(
|
|
97
109
|
request=request,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
110
|
+
method=MethodInfo(
|
|
111
|
+
name="Get",
|
|
112
|
+
service_name="metalstack.api.v2.HealthService",
|
|
113
|
+
input=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
|
|
114
|
+
output=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse,
|
|
115
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
116
|
+
),
|
|
117
|
+
headers=headers,
|
|
118
|
+
timeout_ms=timeout_ms,
|
|
102
119
|
)
|
|
@@ -1,214 +1,249 @@
|
|
|
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/image.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.image_pb2 as metalstack_dot_api_dot_v2_dot_image__pb2
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class ImageService(Protocol):
|
|
18
|
-
async def
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
super().__init__()
|
|
67
|
-
self._prefix = f"{server_path_prefix}/metalstack.api.v2.ImageService"
|
|
68
|
-
self._endpoints = {
|
|
69
|
-
"Get": Endpoint[metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest, metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse](
|
|
70
|
-
service_name="ImageService",
|
|
71
|
-
name="Get",
|
|
72
|
-
function=getattr(service, "Get"),
|
|
73
|
-
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest,
|
|
74
|
-
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse,
|
|
75
|
-
allowed_methods=("POST",),
|
|
76
|
-
),
|
|
77
|
-
"List": Endpoint[metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListRequest, metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse](
|
|
78
|
-
service_name="ImageService",
|
|
79
|
-
name="List",
|
|
80
|
-
function=getattr(service, "List"),
|
|
81
|
-
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListRequest,
|
|
82
|
-
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse,
|
|
83
|
-
allowed_methods=("POST",),
|
|
84
|
-
),
|
|
85
|
-
"Latest": Endpoint[metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestRequest, metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse](
|
|
86
|
-
service_name="ImageService",
|
|
87
|
-
name="Latest",
|
|
88
|
-
function=getattr(service, "Latest"),
|
|
89
|
-
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestRequest,
|
|
90
|
-
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse,
|
|
91
|
-
allowed_methods=("POST",),
|
|
92
|
-
),
|
|
93
|
-
}
|
|
19
|
+
async def get(self, request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse:
|
|
20
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
|
+
|
|
22
|
+
async def list(self, request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse:
|
|
23
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
24
|
+
|
|
25
|
+
async def latest(self, request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse:
|
|
26
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ImageServiceASGIApplication(ConnecpyASGIApplication):
|
|
30
|
+
def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
31
|
+
super().__init__(
|
|
32
|
+
endpoints={
|
|
33
|
+
"/metalstack.api.v2.ImageService/Get": Endpoint.unary(
|
|
34
|
+
method=MethodInfo(
|
|
35
|
+
name="Get",
|
|
36
|
+
service_name="metalstack.api.v2.ImageService",
|
|
37
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest,
|
|
38
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse,
|
|
39
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
40
|
+
),
|
|
41
|
+
function=service.get,
|
|
42
|
+
),
|
|
43
|
+
"/metalstack.api.v2.ImageService/List": Endpoint.unary(
|
|
44
|
+
method=MethodInfo(
|
|
45
|
+
name="List",
|
|
46
|
+
service_name="metalstack.api.v2.ImageService",
|
|
47
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListRequest,
|
|
48
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse,
|
|
49
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
50
|
+
),
|
|
51
|
+
function=service.list,
|
|
52
|
+
),
|
|
53
|
+
"/metalstack.api.v2.ImageService/Latest": Endpoint.unary(
|
|
54
|
+
method=MethodInfo(
|
|
55
|
+
name="Latest",
|
|
56
|
+
service_name="metalstack.api.v2.ImageService",
|
|
57
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestRequest,
|
|
58
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse,
|
|
59
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
60
|
+
),
|
|
61
|
+
function=service.latest,
|
|
62
|
+
),
|
|
63
|
+
},
|
|
64
|
+
interceptors=interceptors,
|
|
65
|
+
read_max_bytes=read_max_bytes,
|
|
66
|
+
)
|
|
94
67
|
|
|
95
|
-
|
|
96
|
-
|
|
68
|
+
@property
|
|
69
|
+
def path(self):
|
|
70
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
71
|
+
return "/metalstack.api.v2.ImageService"
|
|
97
72
|
|
|
98
73
|
|
|
99
74
|
class ImageServiceClient(ConnecpyClient):
|
|
100
|
-
def
|
|
75
|
+
async def get(
|
|
101
76
|
self,
|
|
102
77
|
request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest,
|
|
103
78
|
*,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
**kwargs,
|
|
79
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
80
|
+
timeout_ms: int | None = None,
|
|
107
81
|
) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse:
|
|
108
|
-
|
|
109
|
-
return self._make_request(
|
|
110
|
-
url=f"{server_path_prefix}/metalstack.api.v2.ImageService/Get",
|
|
111
|
-
ctx=ctx,
|
|
82
|
+
return await self.execute_unary(
|
|
112
83
|
request=request,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
84
|
+
method=MethodInfo(
|
|
85
|
+
name="Get",
|
|
86
|
+
service_name="metalstack.api.v2.ImageService",
|
|
87
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest,
|
|
88
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse,
|
|
89
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
90
|
+
),
|
|
91
|
+
headers=headers,
|
|
92
|
+
timeout_ms=timeout_ms,
|
|
116
93
|
)
|
|
117
94
|
|
|
118
|
-
def
|
|
95
|
+
async def list(
|
|
119
96
|
self,
|
|
120
97
|
request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListRequest,
|
|
121
98
|
*,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
**kwargs,
|
|
99
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
100
|
+
timeout_ms: int | None = None,
|
|
125
101
|
) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse:
|
|
126
|
-
|
|
127
|
-
return self._make_request(
|
|
128
|
-
url=f"{server_path_prefix}/metalstack.api.v2.ImageService/List",
|
|
129
|
-
ctx=ctx,
|
|
102
|
+
return await self.execute_unary(
|
|
130
103
|
request=request,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
104
|
+
method=MethodInfo(
|
|
105
|
+
name="List",
|
|
106
|
+
service_name="metalstack.api.v2.ImageService",
|
|
107
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListRequest,
|
|
108
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse,
|
|
109
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
110
|
+
),
|
|
111
|
+
headers=headers,
|
|
112
|
+
timeout_ms=timeout_ms,
|
|
134
113
|
)
|
|
135
114
|
|
|
136
|
-
def
|
|
115
|
+
async def latest(
|
|
137
116
|
self,
|
|
138
117
|
request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestRequest,
|
|
139
118
|
*,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
**kwargs,
|
|
119
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
120
|
+
timeout_ms: int | None = None,
|
|
143
121
|
) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse:
|
|
144
|
-
|
|
145
|
-
return self._make_request(
|
|
146
|
-
url=f"{server_path_prefix}/metalstack.api.v2.ImageService/Latest",
|
|
147
|
-
ctx=ctx,
|
|
122
|
+
return await self.execute_unary(
|
|
148
123
|
request=request,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
124
|
+
method=MethodInfo(
|
|
125
|
+
name="Latest",
|
|
126
|
+
service_name="metalstack.api.v2.ImageService",
|
|
127
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestRequest,
|
|
128
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse,
|
|
129
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
130
|
+
),
|
|
131
|
+
headers=headers,
|
|
132
|
+
timeout_ms=timeout_ms,
|
|
152
133
|
)
|
|
153
134
|
|
|
154
135
|
|
|
155
|
-
class
|
|
156
|
-
|
|
136
|
+
class ImageServiceSync(Protocol):
|
|
137
|
+
def get(self, request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse:
|
|
138
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
139
|
+
def list(self, request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse:
|
|
140
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
141
|
+
def latest(self, request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse:
|
|
142
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class ImageServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
146
|
+
def __init__(self, service: ImageServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
147
|
+
super().__init__(
|
|
148
|
+
endpoints={
|
|
149
|
+
"/metalstack.api.v2.ImageService/Get": EndpointSync.unary(
|
|
150
|
+
method=MethodInfo(
|
|
151
|
+
name="Get",
|
|
152
|
+
service_name="metalstack.api.v2.ImageService",
|
|
153
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest,
|
|
154
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse,
|
|
155
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
156
|
+
),
|
|
157
|
+
function=service.get,
|
|
158
|
+
),
|
|
159
|
+
"/metalstack.api.v2.ImageService/List": EndpointSync.unary(
|
|
160
|
+
method=MethodInfo(
|
|
161
|
+
name="List",
|
|
162
|
+
service_name="metalstack.api.v2.ImageService",
|
|
163
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListRequest,
|
|
164
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse,
|
|
165
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
166
|
+
),
|
|
167
|
+
function=service.list,
|
|
168
|
+
),
|
|
169
|
+
"/metalstack.api.v2.ImageService/Latest": EndpointSync.unary(
|
|
170
|
+
method=MethodInfo(
|
|
171
|
+
name="Latest",
|
|
172
|
+
service_name="metalstack.api.v2.ImageService",
|
|
173
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestRequest,
|
|
174
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse,
|
|
175
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
176
|
+
),
|
|
177
|
+
function=service.latest,
|
|
178
|
+
),
|
|
179
|
+
},
|
|
180
|
+
interceptors=interceptors,
|
|
181
|
+
read_max_bytes=read_max_bytes,
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
@property
|
|
185
|
+
def path(self):
|
|
186
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
187
|
+
return "/metalstack.api.v2.ImageService"
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class ImageServiceClientSync(ConnecpyClientSync):
|
|
191
|
+
def get(
|
|
157
192
|
self,
|
|
158
193
|
request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest,
|
|
159
194
|
*,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
163
|
-
**kwargs,
|
|
195
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
196
|
+
timeout_ms: int | None = None,
|
|
164
197
|
) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse:
|
|
165
|
-
|
|
166
|
-
return await self._make_request(
|
|
167
|
-
url=f"{server_path_prefix}/metalstack.api.v2.ImageService/Get",
|
|
168
|
-
ctx=ctx,
|
|
198
|
+
return self.execute_unary(
|
|
169
199
|
request=request,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
200
|
+
method=MethodInfo(
|
|
201
|
+
name="Get",
|
|
202
|
+
service_name="metalstack.api.v2.ImageService",
|
|
203
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetRequest,
|
|
204
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceGetResponse,
|
|
205
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
206
|
+
),
|
|
207
|
+
headers=headers,
|
|
208
|
+
timeout_ms=timeout_ms,
|
|
174
209
|
)
|
|
175
210
|
|
|
176
|
-
|
|
211
|
+
def list(
|
|
177
212
|
self,
|
|
178
213
|
request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListRequest,
|
|
179
214
|
*,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
183
|
-
**kwargs,
|
|
215
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
216
|
+
timeout_ms: int | None = None,
|
|
184
217
|
) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse:
|
|
185
|
-
|
|
186
|
-
return await self._make_request(
|
|
187
|
-
url=f"{server_path_prefix}/metalstack.api.v2.ImageService/List",
|
|
188
|
-
ctx=ctx,
|
|
218
|
+
return self.execute_unary(
|
|
189
219
|
request=request,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
220
|
+
method=MethodInfo(
|
|
221
|
+
name="List",
|
|
222
|
+
service_name="metalstack.api.v2.ImageService",
|
|
223
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListRequest,
|
|
224
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceListResponse,
|
|
225
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
226
|
+
),
|
|
227
|
+
headers=headers,
|
|
228
|
+
timeout_ms=timeout_ms,
|
|
194
229
|
)
|
|
195
230
|
|
|
196
|
-
|
|
231
|
+
def latest(
|
|
197
232
|
self,
|
|
198
233
|
request: metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestRequest,
|
|
199
234
|
*,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
session: Union[httpx.AsyncClient, None] = None,
|
|
203
|
-
**kwargs,
|
|
235
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
236
|
+
timeout_ms: int | None = None,
|
|
204
237
|
) -> metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse:
|
|
205
|
-
|
|
206
|
-
return await self._make_request(
|
|
207
|
-
url=f"{server_path_prefix}/metalstack.api.v2.ImageService/Latest",
|
|
208
|
-
ctx=ctx,
|
|
238
|
+
return self.execute_unary(
|
|
209
239
|
request=request,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
240
|
+
method=MethodInfo(
|
|
241
|
+
name="Latest",
|
|
242
|
+
service_name="metalstack.api.v2.ImageService",
|
|
243
|
+
input=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestRequest,
|
|
244
|
+
output=metalstack_dot_api_dot_v2_dot_image__pb2.ImageServiceLatestResponse,
|
|
245
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
246
|
+
),
|
|
247
|
+
headers=headers,
|
|
248
|
+
timeout_ms=timeout_ms,
|
|
214
249
|
)
|