metal-stack-api 0.0.15__py3-none-any.whl → 0.0.17__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.17.dist-info}/METADATA +1 -1
- {metal_stack_api-0.0.15.dist-info → metal_stack_api-0.0.17.dist-info}/RECORD +32 -32
- 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 +195 -216
- metalstack/api/v2/filesystem_pb2.py +47 -47
- metalstack/api/v2/filesystem_pb2.pyi +10 -2
- metalstack/api/v2/filesystem_pb2_grpc.py +0 -44
- 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.17.dist-info}/WHEEL +0 -0
- {metal_stack_api-0.0.15.dist-info → metal_stack_api-0.0.17.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/infra/v2/switch.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.infra.v2.switch_pb2 as metalstack_dot_infra_dot_v2_dot_switch__pb2
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class SwitchService(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 SwitchServiceSync(Protocol):
|
|
41
|
-
def Register(self, req: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, ctx: ServiceContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse: ...
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
class SwitchServiceServerSync(ConnecpyServer):
|
|
45
|
-
def __init__(self, *, service: SwitchServiceSync, server_path_prefix=""):
|
|
46
|
-
super().__init__()
|
|
47
|
-
self._prefix = f"{server_path_prefix}/metalstack.infra.v2.SwitchService"
|
|
48
|
-
self._endpoints = {
|
|
49
|
-
"Register": Endpoint[metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse](
|
|
50
|
-
service_name="SwitchService",
|
|
51
|
-
name="Register",
|
|
52
|
-
function=getattr(service, "Register"),
|
|
53
|
-
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
54
|
-
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse,
|
|
55
|
-
allowed_methods=("POST",),
|
|
56
|
-
),
|
|
57
|
-
}
|
|
19
|
+
async def register(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse:
|
|
20
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class SwitchServiceASGIApplication(ConnecpyASGIApplication):
|
|
24
|
+
def __init__(self, service: SwitchService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
25
|
+
super().__init__(
|
|
26
|
+
endpoints={
|
|
27
|
+
"/metalstack.infra.v2.SwitchService/Register": Endpoint.unary(
|
|
28
|
+
method=MethodInfo(
|
|
29
|
+
name="Register",
|
|
30
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
31
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
32
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse,
|
|
33
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
34
|
+
),
|
|
35
|
+
function=service.register,
|
|
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.infra.v2.SwitchService"
|
|
61
46
|
|
|
62
47
|
|
|
63
48
|
class SwitchServiceClient(ConnecpyClient):
|
|
64
|
-
def
|
|
49
|
+
async def register(
|
|
65
50
|
self,
|
|
66
51
|
request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
67
52
|
*,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
**kwargs,
|
|
53
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
54
|
+
timeout_ms: int | None = None,
|
|
71
55
|
) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse:
|
|
72
|
-
|
|
73
|
-
return self._make_request(
|
|
74
|
-
url=f"{server_path_prefix}/metalstack.infra.v2.SwitchService/Register",
|
|
75
|
-
ctx=ctx,
|
|
56
|
+
return await self.execute_unary(
|
|
76
57
|
request=request,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
method=MethodInfo(
|
|
59
|
+
name="Register",
|
|
60
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
61
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
62
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse,
|
|
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 SwitchServiceSync(Protocol):
|
|
71
|
+
def register(self, request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse:
|
|
72
|
+
raise ConnecpyException(Code.UNIMPLEMENTED, "Not implemented")
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class SwitchServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
76
|
+
def __init__(self, service: SwitchServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
77
|
+
super().__init__(
|
|
78
|
+
endpoints={
|
|
79
|
+
"/metalstack.infra.v2.SwitchService/Register": EndpointSync.unary(
|
|
80
|
+
method=MethodInfo(
|
|
81
|
+
name="Register",
|
|
82
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
83
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
84
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse,
|
|
85
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
86
|
+
),
|
|
87
|
+
function=service.register,
|
|
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.infra.v2.SwitchService"
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class SwitchServiceClientSync(ConnecpyClientSync):
|
|
101
|
+
def register(
|
|
85
102
|
self,
|
|
86
103
|
request: metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
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_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse:
|
|
93
|
-
|
|
94
|
-
return await self._make_request(
|
|
95
|
-
url=f"{server_path_prefix}/metalstack.infra.v2.SwitchService/Register",
|
|
96
|
-
ctx=ctx,
|
|
108
|
+
return self.execute_unary(
|
|
97
109
|
request=request,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
110
|
+
method=MethodInfo(
|
|
111
|
+
name="Register",
|
|
112
|
+
service_name="metalstack.infra.v2.SwitchService",
|
|
113
|
+
input=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterRequest,
|
|
114
|
+
output=metalstack_dot_infra_dot_v2_dot_switch__pb2.SwitchServiceRegisterResponse,
|
|
115
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
116
|
+
),
|
|
117
|
+
headers=headers,
|
|
118
|
+
timeout_ms=timeout_ms,
|
|
102
119
|
)
|
|
File without changes
|
|
File without changes
|