metal-stack-api 0.0.22__py3-none-any.whl → 0.0.24__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.22.dist-info → metal_stack_api-0.0.24.dist-info}/METADATA +3 -2
- metal_stack_api-0.0.24.dist-info/RECORD +97 -0
- {metal_stack_api-0.0.22.dist-info → metal_stack_api-0.0.24.dist-info}/top_level.txt +0 -1
- metalstack/admin/v2/{filesystem_connecpy.py → filesystem_connect.py} +22 -22
- metalstack/admin/v2/filesystem_pb2.py +20 -19
- metalstack/admin/v2/filesystem_pb2.pyi +1 -0
- metalstack/admin/v2/{image_connecpy.py → image_connect.py} +24 -24
- metalstack/admin/v2/image_pb2.py +24 -23
- metalstack/admin/v2/image_pb2.pyi +1 -0
- metalstack/admin/v2/{ip_connecpy.py → ip_connect.py} +20 -20
- metalstack/admin/v2/ip_pb2.py +2 -2
- metalstack/admin/v2/{machine_connecpy.py → machine_connect.py} +20 -20
- metalstack/admin/v2/machine_pb2.py +15 -14
- metalstack/admin/v2/machine_pb2.pyi +1 -0
- metalstack/admin/v2/{network_connecpy.py → network_connect.py} +26 -26
- metalstack/admin/v2/network_pb2.py +45 -36
- metalstack/admin/v2/network_pb2.pyi +1 -0
- metalstack/admin/v2/{partition_connecpy.py → partition_connect.py} +24 -24
- metalstack/admin/v2/partition_pb2.py +23 -22
- metalstack/admin/v2/partition_pb2.pyi +1 -0
- metalstack/admin/v2/{size_connecpy.py → size_connect.py} +22 -22
- metalstack/admin/v2/size_pb2.py +20 -19
- metalstack/admin/v2/size_pb2.pyi +1 -0
- metalstack/admin/v2/switch_connect.py +444 -0
- metalstack/admin/v2/switch_pb2.py +108 -0
- metalstack/admin/v2/switch_pb2.pyi +114 -0
- metalstack/admin/v2/{tenant_connecpy.py → tenant_connect.py} +20 -20
- metalstack/admin/v2/tenant_pb2.py +18 -15
- metalstack/admin/v2/tenant_pb2.pyi +1 -0
- metalstack/admin/v2/{token_connecpy.py → token_connect.py} +20 -20
- metalstack/admin/v2/token_pb2.py +2 -2
- metalstack/api/v2/common_pb2.py +2 -2
- metalstack/api/v2/{filesystem_connecpy.py → filesystem_connect.py} +22 -22
- metalstack/api/v2/filesystem_pb2.py +54 -53
- metalstack/api/v2/filesystem_pb2.pyi +1 -0
- metalstack/api/v2/{health_connecpy.py → health_connect.py} +18 -18
- metalstack/api/v2/health_pb2.py +2 -2
- metalstack/api/v2/{image_connecpy.py → image_connect.py} +22 -22
- metalstack/api/v2/image_pb2.py +32 -31
- metalstack/api/v2/image_pb2.pyi +1 -0
- metalstack/api/v2/{ip_connecpy.py → ip_connect.py} +26 -26
- metalstack/api/v2/ip_pb2.py +41 -40
- metalstack/api/v2/ip_pb2.pyi +1 -0
- metalstack/api/v2/{machine_connecpy.py → machine_connect.py} +26 -26
- metalstack/api/v2/machine_pb2.py +122 -121
- metalstack/api/v2/machine_pb2.pyi +1 -0
- metalstack/api/v2/{method_connecpy.py → method_connect.py} +20 -20
- metalstack/api/v2/method_pb2.py +2 -2
- metalstack/api/v2/{network_connecpy.py → network_connect.py} +28 -28
- metalstack/api/v2/network_pb2.py +73 -66
- metalstack/api/v2/network_pb2.pyi +1 -0
- metalstack/api/v2/{partition_connecpy.py → partition_connect.py} +20 -20
- metalstack/api/v2/partition_pb2.py +25 -24
- metalstack/api/v2/partition_pb2.pyi +1 -0
- metalstack/api/v2/predefined_rules_pb2.py +50 -0
- metalstack/api/v2/predefined_rules_pb2.pyi +19 -0
- metalstack/api/v2/{project_connecpy.py → project_connect.py} +40 -40
- metalstack/api/v2/project_pb2.py +69 -64
- metalstack/api/v2/project_pb2.pyi +1 -0
- metalstack/api/v2/{size_connecpy.py → size_connect.py} +20 -20
- metalstack/api/v2/size_pb2.py +26 -25
- metalstack/api/v2/size_pb2.pyi +1 -0
- metalstack/api/v2/switch_pb2.py +62 -41
- metalstack/api/v2/switch_pb2.pyi +54 -11
- metalstack/api/v2/{tenant_connecpy.py → tenant_connect.py} +40 -40
- metalstack/api/v2/tenant_pb2.py +69 -64
- metalstack/api/v2/tenant_pb2.pyi +1 -0
- metalstack/api/v2/{token_connecpy.py → token_connect.py} +28 -28
- metalstack/api/v2/token_pb2.py +51 -50
- metalstack/api/v2/token_pb2.pyi +1 -0
- metalstack/api/v2/{user_connecpy.py → user_connect.py} +18 -18
- metalstack/api/v2/user_pb2.py +15 -11
- metalstack/api/v2/user_pb2.pyi +2 -0
- metalstack/api/v2/{version_connecpy.py → version_connect.py} +18 -18
- metalstack/api/v2/version_pb2.py +2 -2
- metalstack/client/client.py +56 -52
- metalstack/infra/v2/{bmc_connecpy.py → bmc_connect.py} +18 -18
- metalstack/infra/v2/bmc_pb2.py +2 -2
- metalstack/infra/v2/{switch_connecpy.py → switch_connect.py} +83 -18
- metalstack/infra/v2/switch_pb2.py +28 -10
- metalstack/infra/v2/switch_pb2.pyi +51 -0
- buf/__init__.py +0 -0
- buf/validate/__init__.py +0 -0
- buf/validate/validate_pb2.py +0 -450
- buf/validate/validate_pb2.pyi +0 -627
- buf/validate/validate_pb2_grpc.py +0 -4
- metal_stack_api-0.0.22.dist-info/RECORD +0 -124
- metalstack/admin/v2/filesystem_pb2_grpc.py +0 -169
- metalstack/admin/v2/image_pb2_grpc.py +0 -213
- metalstack/admin/v2/ip_pb2_grpc.py +0 -125
- metalstack/admin/v2/machine_pb2_grpc.py +0 -125
- metalstack/admin/v2/network_pb2_grpc.py +0 -257
- metalstack/admin/v2/partition_pb2_grpc.py +0 -213
- metalstack/admin/v2/size_pb2_grpc.py +0 -169
- metalstack/admin/v2/tenant_pb2_grpc.py +0 -125
- metalstack/admin/v2/token_pb2_grpc.py +0 -125
- metalstack/api/v2/common_pb2_grpc.py +0 -4
- metalstack/api/v2/filesystem_pb2_grpc.py +0 -169
- metalstack/api/v2/health_pb2_grpc.py +0 -81
- metalstack/api/v2/image_pb2_grpc.py +0 -169
- metalstack/api/v2/ip_pb2_grpc.py +0 -257
- metalstack/api/v2/machine_pb2_grpc.py +0 -257
- metalstack/api/v2/method_pb2_grpc.py +0 -128
- metalstack/api/v2/network_pb2_grpc.py +0 -301
- metalstack/api/v2/partition_pb2_grpc.py +0 -125
- metalstack/api/v2/project_pb2_grpc.py +0 -565
- metalstack/api/v2/size_pb2_grpc.py +0 -125
- metalstack/api/v2/switch_pb2_grpc.py +0 -4
- metalstack/api/v2/tenant_pb2_grpc.py +0 -565
- metalstack/api/v2/token_pb2_grpc.py +0 -301
- metalstack/api/v2/user_pb2_grpc.py +0 -81
- metalstack/api/v2/version_pb2_grpc.py +0 -81
- metalstack/infra/v2/bmc_pb2_grpc.py +0 -81
- metalstack/infra/v2/switch_pb2_grpc.py +0 -81
- {metal_stack_api-0.0.22.dist-info → metal_stack_api-0.0.24.dist-info}/WHEEL +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by https://github.com/
|
|
2
|
+
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
|
|
3
3
|
# source: metalstack/api/v2/user.proto
|
|
4
4
|
|
|
5
5
|
from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
|
|
6
6
|
from typing import Protocol
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
8
|
+
from connectrpc.client import ConnectClient, ConnectClientSync
|
|
9
|
+
from connectrpc.code import Code
|
|
10
|
+
from connectrpc.errors import ConnectError
|
|
11
|
+
from connectrpc.interceptor import Interceptor, InterceptorSync
|
|
12
|
+
from connectrpc.method import IdempotencyLevel, MethodInfo
|
|
13
|
+
from connectrpc.request import Headers, RequestContext
|
|
14
|
+
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
|
|
15
15
|
import metalstack.api.v2.user_pb2 as metalstack_dot_api_dot_v2_dot_user__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class UserService(Protocol):
|
|
19
19
|
async def get(self, request: metalstack_dot_api_dot_v2_dot_user__pb2.UserServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_user__pb2.UserServiceGetResponse:
|
|
20
|
-
raise
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class UserServiceASGIApplication(
|
|
24
|
-
def __init__(self, service: UserService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
23
|
+
class UserServiceASGIApplication(ConnectASGIApplication):
|
|
24
|
+
def __init__(self, service: UserService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
25
25
|
super().__init__(
|
|
26
26
|
endpoints={
|
|
27
27
|
"/metalstack.api.v2.UserService/Get": Endpoint.unary(
|
|
@@ -40,12 +40,12 @@ class UserServiceASGIApplication(ConnecpyASGIApplication):
|
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
@property
|
|
43
|
-
def path(self):
|
|
43
|
+
def path(self) -> str:
|
|
44
44
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
45
45
|
return "/metalstack.api.v2.UserService"
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
class UserServiceClient(
|
|
48
|
+
class UserServiceClient(ConnectClient):
|
|
49
49
|
async def get(
|
|
50
50
|
self,
|
|
51
51
|
request: metalstack_dot_api_dot_v2_dot_user__pb2.UserServiceGetRequest,
|
|
@@ -69,11 +69,11 @@ class UserServiceClient(ConnecpyClient):
|
|
|
69
69
|
|
|
70
70
|
class UserServiceSync(Protocol):
|
|
71
71
|
def get(self, request: metalstack_dot_api_dot_v2_dot_user__pb2.UserServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_user__pb2.UserServiceGetResponse:
|
|
72
|
-
raise
|
|
72
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
class UserServiceWSGIApplication(
|
|
76
|
-
def __init__(self, service: UserServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
75
|
+
class UserServiceWSGIApplication(ConnectWSGIApplication):
|
|
76
|
+
def __init__(self, service: UserServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
77
77
|
super().__init__(
|
|
78
78
|
endpoints={
|
|
79
79
|
"/metalstack.api.v2.UserService/Get": EndpointSync.unary(
|
|
@@ -92,12 +92,12 @@ class UserServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
|
92
92
|
)
|
|
93
93
|
|
|
94
94
|
@property
|
|
95
|
-
def path(self):
|
|
95
|
+
def path(self) -> str:
|
|
96
96
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
97
97
|
return "/metalstack.api.v2.UserService"
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
class UserServiceClientSync(
|
|
100
|
+
class UserServiceClientSync(ConnectClientSync):
|
|
101
101
|
def get(
|
|
102
102
|
self,
|
|
103
103
|
request: metalstack_dot_api_dot_v2_dot_user__pb2.UserServiceGetRequest,
|
metalstack/api/v2/user_pb2.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
4
|
# source: metalstack/api/v2/user.proto
|
|
5
|
-
# Protobuf Python Version: 6.32.
|
|
5
|
+
# Protobuf Python Version: 6.32.1
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -13,7 +13,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
15
|
32,
|
|
16
|
-
|
|
16
|
+
1,
|
|
17
17
|
'',
|
|
18
18
|
'metalstack/api/v2/user.proto'
|
|
19
19
|
)
|
|
@@ -22,12 +22,14 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
22
22
|
_sym_db = _symbol_database.Default()
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
|
|
25
26
|
from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common__pb2
|
|
27
|
+
from metalstack.api.v2 import predefined_rules_pb2 as metalstack_dot_api_dot_v2_dot_predefined__rules__pb2
|
|
26
28
|
from metalstack.api.v2 import project_pb2 as metalstack_dot_api_dot_v2_dot_project__pb2
|
|
27
29
|
from metalstack.api.v2 import tenant_pb2 as metalstack_dot_api_dot_v2_dot_tenant__pb2
|
|
28
30
|
|
|
29
31
|
|
|
30
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cmetalstack/api/v2/user.proto\x12\x11metalstack.api.v2\x1a\x1emetalstack/api/v2/common.proto\x1a\x1fmetalstack/api/v2/project.proto\x1a\x1emetalstack/api/v2/tenant.proto\"\
|
|
32
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cmetalstack/api/v2/user.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a(metalstack/api/v2/predefined_rules.proto\x1a\x1fmetalstack/api/v2/project.proto\x1a\x1emetalstack/api/v2/tenant.proto\"\xa1\x02\n\x04User\x12\x14\n\x05login\x18\x01 \x01(\tR\x05login\x12\x1f\n\x04name\x18\x02 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01R\x04name\x12\x14\n\x05\x65mail\x18\x03 \x01(\tR\x05\x65mail\x12\x1d\n\navatar_url\x18\x05 \x01(\tR\tavatarUrl\x12\x33\n\x07tenants\x18\x08 \x03(\x0b\x32\x19.metalstack.api.v2.TenantR\x07tenants\x12\x36\n\x08projects\x18\t \x03(\x0b\x32\x1a.metalstack.api.v2.ProjectR\x08projects\x12@\n\x0e\x64\x65\x66\x61ult_tenant\x18\n \x01(\x0b\x32\x19.metalstack.api.v2.TenantR\rdefaultTenant\"\x17\n\x15UserServiceGetRequest\"E\n\x16UserServiceGetResponse\x12+\n\x04user\x18\x01 \x01(\x0b\x32\x17.metalstack.api.v2.UserR\x04user2s\n\x0bUserService\x12\x64\n\x03Get\x12(.metalstack.api.v2.UserServiceGetRequest\x1a).metalstack.api.v2.UserServiceGetResponse\"\x08\xd8\xf3\x18\x03\xe0\xf3\x18\x01\x42\xbf\x01\n\x15\x63om.metalstack.api.v2B\tUserProtoP\x01Z5github.com/metal-stack/api/go/metalstack/api/v2;apiv2\xa2\x02\x03MAX\xaa\x02\x11Metalstack.Api.V2\xca\x02\x11Metalstack\\Api\\V2\xe2\x02\x1dMetalstack\\Api\\V2\\GPBMetadata\xea\x02\x13Metalstack::Api::V2b\x06proto3')
|
|
31
33
|
|
|
32
34
|
_globals = globals()
|
|
33
35
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -35,14 +37,16 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'metalstack.api.v2.user_pb2'
|
|
|
35
37
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
36
38
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
37
39
|
_globals['DESCRIPTOR']._serialized_options = b'\n\025com.metalstack.api.v2B\tUserProtoP\001Z5github.com/metal-stack/api/go/metalstack/api/v2;apiv2\242\002\003MAX\252\002\021Metalstack.Api.V2\312\002\021Metalstack\\Api\\V2\342\002\035Metalstack\\Api\\V2\\GPBMetadata\352\002\023Metalstack::Api::V2'
|
|
40
|
+
_globals['_USER'].fields_by_name['name']._loaded_options = None
|
|
41
|
+
_globals['_USER'].fields_by_name['name']._serialized_options = b'\272H\010r\006\300\263\256\261\002\001'
|
|
38
42
|
_globals['_USERSERVICE'].methods_by_name['Get']._loaded_options = None
|
|
39
43
|
_globals['_USERSERVICE'].methods_by_name['Get']._serialized_options = b'\330\363\030\003\340\363\030\001'
|
|
40
|
-
_globals['_USER']._serialized_start=
|
|
41
|
-
_globals['_USER']._serialized_end=
|
|
42
|
-
_globals['_USERSERVICEGETREQUEST']._serialized_start=
|
|
43
|
-
_globals['_USERSERVICEGETREQUEST']._serialized_end=
|
|
44
|
-
_globals['_USERSERVICEGETRESPONSE']._serialized_start=
|
|
45
|
-
_globals['_USERSERVICEGETRESPONSE']._serialized_end=
|
|
46
|
-
_globals['_USERSERVICE']._serialized_start=
|
|
47
|
-
_globals['_USERSERVICE']._serialized_end=
|
|
44
|
+
_globals['_USER']._serialized_start=220
|
|
45
|
+
_globals['_USER']._serialized_end=509
|
|
46
|
+
_globals['_USERSERVICEGETREQUEST']._serialized_start=511
|
|
47
|
+
_globals['_USERSERVICEGETREQUEST']._serialized_end=534
|
|
48
|
+
_globals['_USERSERVICEGETRESPONSE']._serialized_start=536
|
|
49
|
+
_globals['_USERSERVICEGETRESPONSE']._serialized_end=605
|
|
50
|
+
_globals['_USERSERVICE']._serialized_start=607
|
|
51
|
+
_globals['_USERSERVICE']._serialized_end=722
|
|
48
52
|
# @@protoc_insertion_point(module_scope)
|
metalstack/api/v2/user_pb2.pyi
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
from buf.validate import validate_pb2 as _validate_pb2
|
|
1
2
|
from metalstack.api.v2 import common_pb2 as _common_pb2
|
|
3
|
+
from metalstack.api.v2 import predefined_rules_pb2 as _predefined_rules_pb2
|
|
2
4
|
from metalstack.api.v2 import project_pb2 as _project_pb2
|
|
3
5
|
from metalstack.api.v2 import tenant_pb2 as _tenant_pb2
|
|
4
6
|
from google.protobuf.internal import containers as _containers
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by https://github.com/
|
|
2
|
+
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
|
|
3
3
|
# source: metalstack/api/v2/version.proto
|
|
4
4
|
|
|
5
5
|
from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
|
|
6
6
|
from typing import Protocol
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
8
|
+
from connectrpc.client import ConnectClient, ConnectClientSync
|
|
9
|
+
from connectrpc.code import Code
|
|
10
|
+
from connectrpc.errors import ConnectError
|
|
11
|
+
from connectrpc.interceptor import Interceptor, InterceptorSync
|
|
12
|
+
from connectrpc.method import IdempotencyLevel, MethodInfo
|
|
13
|
+
from connectrpc.request import Headers, RequestContext
|
|
14
|
+
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
|
|
15
15
|
import metalstack.api.v2.version_pb2 as metalstack_dot_api_dot_v2_dot_version__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class VersionService(Protocol):
|
|
19
19
|
async def get(self, request: metalstack_dot_api_dot_v2_dot_version__pb2.VersionServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_version__pb2.VersionServiceGetResponse:
|
|
20
|
-
raise
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class VersionServiceASGIApplication(
|
|
24
|
-
def __init__(self, service: VersionService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
23
|
+
class VersionServiceASGIApplication(ConnectASGIApplication):
|
|
24
|
+
def __init__(self, service: VersionService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
25
25
|
super().__init__(
|
|
26
26
|
endpoints={
|
|
27
27
|
"/metalstack.api.v2.VersionService/Get": Endpoint.unary(
|
|
@@ -40,12 +40,12 @@ class VersionServiceASGIApplication(ConnecpyASGIApplication):
|
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
@property
|
|
43
|
-
def path(self):
|
|
43
|
+
def path(self) -> str:
|
|
44
44
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
45
45
|
return "/metalstack.api.v2.VersionService"
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
class VersionServiceClient(
|
|
48
|
+
class VersionServiceClient(ConnectClient):
|
|
49
49
|
async def get(
|
|
50
50
|
self,
|
|
51
51
|
request: metalstack_dot_api_dot_v2_dot_version__pb2.VersionServiceGetRequest,
|
|
@@ -69,11 +69,11 @@ class VersionServiceClient(ConnecpyClient):
|
|
|
69
69
|
|
|
70
70
|
class VersionServiceSync(Protocol):
|
|
71
71
|
def get(self, request: metalstack_dot_api_dot_v2_dot_version__pb2.VersionServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_version__pb2.VersionServiceGetResponse:
|
|
72
|
-
raise
|
|
72
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
class VersionServiceWSGIApplication(
|
|
76
|
-
def __init__(self, service: VersionServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
75
|
+
class VersionServiceWSGIApplication(ConnectWSGIApplication):
|
|
76
|
+
def __init__(self, service: VersionServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
77
77
|
super().__init__(
|
|
78
78
|
endpoints={
|
|
79
79
|
"/metalstack.api.v2.VersionService/Get": EndpointSync.unary(
|
|
@@ -92,12 +92,12 @@ class VersionServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
|
92
92
|
)
|
|
93
93
|
|
|
94
94
|
@property
|
|
95
|
-
def path(self):
|
|
95
|
+
def path(self) -> str:
|
|
96
96
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
97
97
|
return "/metalstack.api.v2.VersionService"
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
class VersionServiceClientSync(
|
|
100
|
+
class VersionServiceClientSync(ConnectClientSync):
|
|
101
101
|
def get(
|
|
102
102
|
self,
|
|
103
103
|
request: metalstack_dot_api_dot_v2_dot_version__pb2.VersionServiceGetRequest,
|
metalstack/api/v2/version_pb2.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
4
|
# source: metalstack/api/v2/version.proto
|
|
5
|
-
# Protobuf Python Version: 6.32.
|
|
5
|
+
# Protobuf Python Version: 6.32.1
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -13,7 +13,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
15
|
32,
|
|
16
|
-
|
|
16
|
+
1,
|
|
17
17
|
'',
|
|
18
18
|
'metalstack/api/v2/version.proto'
|
|
19
19
|
)
|
metalstack/client/client.py
CHANGED
|
@@ -2,33 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
4
|
|
|
5
|
-
import metalstack.admin.v2.
|
|
6
|
-
import metalstack.admin.v2.
|
|
7
|
-
import metalstack.admin.v2.
|
|
8
|
-
import metalstack.admin.v2.
|
|
9
|
-
import metalstack.admin.v2.
|
|
10
|
-
import metalstack.admin.v2.
|
|
11
|
-
import metalstack.admin.v2.
|
|
12
|
-
import metalstack.admin.v2.
|
|
13
|
-
import metalstack.admin.v2.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import metalstack.api.v2.
|
|
17
|
-
import metalstack.api.v2.
|
|
18
|
-
import metalstack.api.v2.
|
|
19
|
-
import metalstack.api.v2.
|
|
20
|
-
import metalstack.api.v2.
|
|
21
|
-
import metalstack.api.v2.
|
|
22
|
-
import metalstack.api.v2.
|
|
23
|
-
import metalstack.api.v2.
|
|
24
|
-
import metalstack.api.v2.
|
|
25
|
-
import metalstack.api.v2.
|
|
26
|
-
import metalstack.api.v2.
|
|
27
|
-
import metalstack.api.v2.
|
|
28
|
-
import metalstack.api.v2.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
import metalstack.infra.v2.
|
|
5
|
+
import metalstack.admin.v2.filesystem_connect as admin_filesystem_connect
|
|
6
|
+
import metalstack.admin.v2.image_connect as admin_image_connect
|
|
7
|
+
import metalstack.admin.v2.ip_connect as admin_ip_connect
|
|
8
|
+
import metalstack.admin.v2.machine_connect as admin_machine_connect
|
|
9
|
+
import metalstack.admin.v2.network_connect as admin_network_connect
|
|
10
|
+
import metalstack.admin.v2.partition_connect as admin_partition_connect
|
|
11
|
+
import metalstack.admin.v2.size_connect as admin_size_connect
|
|
12
|
+
import metalstack.admin.v2.switch_connect as admin_switch_connect
|
|
13
|
+
import metalstack.admin.v2.tenant_connect as admin_tenant_connect
|
|
14
|
+
import metalstack.admin.v2.token_connect as admin_token_connect
|
|
15
|
+
|
|
16
|
+
import metalstack.api.v2.filesystem_connect as api_filesystem_connect
|
|
17
|
+
import metalstack.api.v2.health_connect as api_health_connect
|
|
18
|
+
import metalstack.api.v2.image_connect as api_image_connect
|
|
19
|
+
import metalstack.api.v2.ip_connect as api_ip_connect
|
|
20
|
+
import metalstack.api.v2.machine_connect as api_machine_connect
|
|
21
|
+
import metalstack.api.v2.method_connect as api_method_connect
|
|
22
|
+
import metalstack.api.v2.network_connect as api_network_connect
|
|
23
|
+
import metalstack.api.v2.partition_connect as api_partition_connect
|
|
24
|
+
import metalstack.api.v2.project_connect as api_project_connect
|
|
25
|
+
import metalstack.api.v2.size_connect as api_size_connect
|
|
26
|
+
import metalstack.api.v2.tenant_connect as api_tenant_connect
|
|
27
|
+
import metalstack.api.v2.token_connect as api_token_connect
|
|
28
|
+
import metalstack.api.v2.user_connect as api_user_connect
|
|
29
|
+
import metalstack.api.v2.version_connect as api_version_connect
|
|
30
|
+
|
|
31
|
+
import metalstack.infra.v2.bmc_connect as infra_bmc_connect
|
|
32
|
+
import metalstack.infra.v2.switch_connect as infra_switch_connect
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
|
|
@@ -61,31 +62,34 @@ class Client:
|
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
def filesystem(self):
|
|
64
|
-
return
|
|
65
|
+
return admin_filesystem_connect.FilesystemServiceClientSync(address=self._baseurl, session=self._session)
|
|
65
66
|
|
|
66
67
|
def image(self):
|
|
67
|
-
return
|
|
68
|
+
return admin_image_connect.ImageServiceClientSync(address=self._baseurl, session=self._session)
|
|
68
69
|
|
|
69
70
|
def ip(self):
|
|
70
|
-
return
|
|
71
|
+
return admin_ip_connect.IPServiceClientSync(address=self._baseurl, session=self._session)
|
|
71
72
|
|
|
72
73
|
def machine(self):
|
|
73
|
-
return
|
|
74
|
+
return admin_machine_connect.MachineServiceClientSync(address=self._baseurl, session=self._session)
|
|
74
75
|
|
|
75
76
|
def network(self):
|
|
76
|
-
return
|
|
77
|
+
return admin_network_connect.NetworkServiceClientSync(address=self._baseurl, session=self._session)
|
|
77
78
|
|
|
78
79
|
def partition(self):
|
|
79
|
-
return
|
|
80
|
+
return admin_partition_connect.PartitionServiceClientSync(address=self._baseurl, session=self._session)
|
|
80
81
|
|
|
81
82
|
def size(self):
|
|
82
|
-
return
|
|
83
|
+
return admin_size_connect.SizeServiceClientSync(address=self._baseurl, session=self._session)
|
|
84
|
+
|
|
85
|
+
def switch(self):
|
|
86
|
+
return admin_switch_connect.SwitchServiceClientSync(address=self._baseurl, session=self._session)
|
|
83
87
|
|
|
84
88
|
def tenant(self):
|
|
85
|
-
return
|
|
89
|
+
return admin_tenant_connect.TenantServiceClientSync(address=self._baseurl, session=self._session)
|
|
86
90
|
|
|
87
91
|
def token(self):
|
|
88
|
-
return
|
|
92
|
+
return admin_token_connect.TokenServiceClientSync(address=self._baseurl, session=self._session)
|
|
89
93
|
|
|
90
94
|
|
|
91
95
|
class _Apiv2:
|
|
@@ -95,46 +99,46 @@ class Client:
|
|
|
95
99
|
|
|
96
100
|
|
|
97
101
|
def filesystem(self):
|
|
98
|
-
return
|
|
102
|
+
return api_filesystem_connect.FilesystemServiceClientSync(address=self._baseurl, session=self._session)
|
|
99
103
|
|
|
100
104
|
def health(self):
|
|
101
|
-
return
|
|
105
|
+
return api_health_connect.HealthServiceClientSync(address=self._baseurl, session=self._session)
|
|
102
106
|
|
|
103
107
|
def image(self):
|
|
104
|
-
return
|
|
108
|
+
return api_image_connect.ImageServiceClientSync(address=self._baseurl, session=self._session)
|
|
105
109
|
|
|
106
110
|
def ip(self):
|
|
107
|
-
return
|
|
111
|
+
return api_ip_connect.IPServiceClientSync(address=self._baseurl, session=self._session)
|
|
108
112
|
|
|
109
113
|
def machine(self):
|
|
110
|
-
return
|
|
114
|
+
return api_machine_connect.MachineServiceClientSync(address=self._baseurl, session=self._session)
|
|
111
115
|
|
|
112
116
|
def method(self):
|
|
113
|
-
return
|
|
117
|
+
return api_method_connect.MethodServiceClientSync(address=self._baseurl, session=self._session)
|
|
114
118
|
|
|
115
119
|
def network(self):
|
|
116
|
-
return
|
|
120
|
+
return api_network_connect.NetworkServiceClientSync(address=self._baseurl, session=self._session)
|
|
117
121
|
|
|
118
122
|
def partition(self):
|
|
119
|
-
return
|
|
123
|
+
return api_partition_connect.PartitionServiceClientSync(address=self._baseurl, session=self._session)
|
|
120
124
|
|
|
121
125
|
def project(self):
|
|
122
|
-
return
|
|
126
|
+
return api_project_connect.ProjectServiceClientSync(address=self._baseurl, session=self._session)
|
|
123
127
|
|
|
124
128
|
def size(self):
|
|
125
|
-
return
|
|
129
|
+
return api_size_connect.SizeServiceClientSync(address=self._baseurl, session=self._session)
|
|
126
130
|
|
|
127
131
|
def tenant(self):
|
|
128
|
-
return
|
|
132
|
+
return api_tenant_connect.TenantServiceClientSync(address=self._baseurl, session=self._session)
|
|
129
133
|
|
|
130
134
|
def token(self):
|
|
131
|
-
return
|
|
135
|
+
return api_token_connect.TokenServiceClientSync(address=self._baseurl, session=self._session)
|
|
132
136
|
|
|
133
137
|
def user(self):
|
|
134
|
-
return
|
|
138
|
+
return api_user_connect.UserServiceClientSync(address=self._baseurl, session=self._session)
|
|
135
139
|
|
|
136
140
|
def version(self):
|
|
137
|
-
return
|
|
141
|
+
return api_version_connect.VersionServiceClientSync(address=self._baseurl, session=self._session)
|
|
138
142
|
|
|
139
143
|
|
|
140
144
|
class _Infrav2:
|
|
@@ -144,9 +148,9 @@ class Client:
|
|
|
144
148
|
|
|
145
149
|
|
|
146
150
|
def bmc(self):
|
|
147
|
-
return
|
|
151
|
+
return infra_bmc_connect.BMCServiceClientSync(address=self._baseurl, session=self._session)
|
|
148
152
|
|
|
149
153
|
def switch(self):
|
|
150
|
-
return
|
|
154
|
+
return infra_switch_connect.SwitchServiceClientSync(address=self._baseurl, session=self._session)
|
|
151
155
|
|
|
152
156
|
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by https://github.com/
|
|
2
|
+
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
|
|
3
3
|
# source: metalstack/infra/v2/bmc.proto
|
|
4
4
|
|
|
5
5
|
from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
|
|
6
6
|
from typing import Protocol
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
8
|
+
from connectrpc.client import ConnectClient, ConnectClientSync
|
|
9
|
+
from connectrpc.code import Code
|
|
10
|
+
from connectrpc.errors import ConnectError
|
|
11
|
+
from connectrpc.interceptor import Interceptor, InterceptorSync
|
|
12
|
+
from connectrpc.method import IdempotencyLevel, MethodInfo
|
|
13
|
+
from connectrpc.request import Headers, RequestContext
|
|
14
|
+
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
|
|
15
15
|
import metalstack.infra.v2.bmc_pb2 as metalstack_dot_infra_dot_v2_dot_bmc__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class BMCService(Protocol):
|
|
19
19
|
async def update_b_m_c_info(self, request: metalstack_dot_infra_dot_v2_dot_bmc__pb2.UpdateBMCInfoRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_bmc__pb2.UpdateBMCInfoResponse:
|
|
20
|
-
raise
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class BMCServiceASGIApplication(
|
|
24
|
-
def __init__(self, service: BMCService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
23
|
+
class BMCServiceASGIApplication(ConnectASGIApplication):
|
|
24
|
+
def __init__(self, service: BMCService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
25
25
|
super().__init__(
|
|
26
26
|
endpoints={
|
|
27
27
|
"/metalstack.infra.v2.BMCService/UpdateBMCInfo": Endpoint.unary(
|
|
@@ -40,12 +40,12 @@ class BMCServiceASGIApplication(ConnecpyASGIApplication):
|
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
@property
|
|
43
|
-
def path(self):
|
|
43
|
+
def path(self) -> str:
|
|
44
44
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
45
45
|
return "/metalstack.infra.v2.BMCService"
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
class BMCServiceClient(
|
|
48
|
+
class BMCServiceClient(ConnectClient):
|
|
49
49
|
async def update_b_m_c_info(
|
|
50
50
|
self,
|
|
51
51
|
request: metalstack_dot_infra_dot_v2_dot_bmc__pb2.UpdateBMCInfoRequest,
|
|
@@ -69,11 +69,11 @@ class BMCServiceClient(ConnecpyClient):
|
|
|
69
69
|
|
|
70
70
|
class BMCServiceSync(Protocol):
|
|
71
71
|
def update_b_m_c_info(self, request: metalstack_dot_infra_dot_v2_dot_bmc__pb2.UpdateBMCInfoRequest, ctx: RequestContext) -> metalstack_dot_infra_dot_v2_dot_bmc__pb2.UpdateBMCInfoResponse:
|
|
72
|
-
raise
|
|
72
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
class BMCServiceWSGIApplication(
|
|
76
|
-
def __init__(self, service: BMCServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
75
|
+
class BMCServiceWSGIApplication(ConnectWSGIApplication):
|
|
76
|
+
def __init__(self, service: BMCServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
77
77
|
super().__init__(
|
|
78
78
|
endpoints={
|
|
79
79
|
"/metalstack.infra.v2.BMCService/UpdateBMCInfo": EndpointSync.unary(
|
|
@@ -92,12 +92,12 @@ class BMCServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
|
92
92
|
)
|
|
93
93
|
|
|
94
94
|
@property
|
|
95
|
-
def path(self):
|
|
95
|
+
def path(self) -> str:
|
|
96
96
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
97
97
|
return "/metalstack.infra.v2.BMCService"
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
class BMCServiceClientSync(
|
|
100
|
+
class BMCServiceClientSync(ConnectClientSync):
|
|
101
101
|
def update_b_m_c_info(
|
|
102
102
|
self,
|
|
103
103
|
request: metalstack_dot_infra_dot_v2_dot_bmc__pb2.UpdateBMCInfoRequest,
|
metalstack/infra/v2/bmc_pb2.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
4
|
# source: metalstack/infra/v2/bmc.proto
|
|
5
|
-
# Protobuf Python Version: 6.32.
|
|
5
|
+
# Protobuf Python Version: 6.32.1
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -13,7 +13,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
15
|
32,
|
|
16
|
-
|
|
16
|
+
1,
|
|
17
17
|
'',
|
|
18
18
|
'metalstack/infra/v2/bmc.proto'
|
|
19
19
|
)
|