metal-stack-api 0.0.21__py3-none-any.whl → 0.0.23__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.21.dist-info → metal_stack_api-0.0.23.dist-info}/METADATA +3 -2
- metal_stack_api-0.0.23.dist-info/RECORD +97 -0
- {metal_stack_api-0.0.21.dist-info → metal_stack_api-0.0.23.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 +20 -18
- 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.21.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.21.dist-info → metal_stack_api-0.0.23.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
|
|
3
|
+
from buf.validate import validate_pb2 as _validate_pb2
|
|
4
|
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
|
5
|
+
from metalstack.api.v2 import common_pb2 as _common_pb2
|
|
6
|
+
from metalstack.api.v2 import predefined_rules_pb2 as _predefined_rules_pb2
|
|
7
|
+
from metalstack.api.v2 import switch_pb2 as _switch_pb2
|
|
8
|
+
from google.protobuf.internal import containers as _containers
|
|
9
|
+
from google.protobuf import descriptor as _descriptor
|
|
10
|
+
from google.protobuf import message as _message
|
|
11
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
12
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
13
|
+
|
|
14
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
15
|
+
|
|
16
|
+
class SwitchServiceGetRequest(_message.Message):
|
|
17
|
+
__slots__ = ("id",)
|
|
18
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
+
id: str
|
|
20
|
+
def __init__(self, id: _Optional[str] = ...) -> None: ...
|
|
21
|
+
|
|
22
|
+
class SwitchServiceGetResponse(_message.Message):
|
|
23
|
+
__slots__ = ("switch",)
|
|
24
|
+
SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
25
|
+
switch: _switch_pb2.Switch
|
|
26
|
+
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
|
|
27
|
+
|
|
28
|
+
class SwitchServiceListRequest(_message.Message):
|
|
29
|
+
__slots__ = ("query",)
|
|
30
|
+
QUERY_FIELD_NUMBER: _ClassVar[int]
|
|
31
|
+
query: _switch_pb2.SwitchQuery
|
|
32
|
+
def __init__(self, query: _Optional[_Union[_switch_pb2.SwitchQuery, _Mapping]] = ...) -> None: ...
|
|
33
|
+
|
|
34
|
+
class SwitchServiceListResponse(_message.Message):
|
|
35
|
+
__slots__ = ("switches",)
|
|
36
|
+
SWITCHES_FIELD_NUMBER: _ClassVar[int]
|
|
37
|
+
switches: _containers.RepeatedCompositeFieldContainer[_switch_pb2.Switch]
|
|
38
|
+
def __init__(self, switches: _Optional[_Iterable[_Union[_switch_pb2.Switch, _Mapping]]] = ...) -> None: ...
|
|
39
|
+
|
|
40
|
+
class SwitchServiceUpdateRequest(_message.Message):
|
|
41
|
+
__slots__ = ("id", "update_meta", "updated_at", "description", "rack_id", "replace_mode", "management_ip", "management_user", "console_command", "nics", "os")
|
|
42
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
43
|
+
UPDATE_META_FIELD_NUMBER: _ClassVar[int]
|
|
44
|
+
UPDATED_AT_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
46
|
+
RACK_ID_FIELD_NUMBER: _ClassVar[int]
|
|
47
|
+
REPLACE_MODE_FIELD_NUMBER: _ClassVar[int]
|
|
48
|
+
MANAGEMENT_IP_FIELD_NUMBER: _ClassVar[int]
|
|
49
|
+
MANAGEMENT_USER_FIELD_NUMBER: _ClassVar[int]
|
|
50
|
+
CONSOLE_COMMAND_FIELD_NUMBER: _ClassVar[int]
|
|
51
|
+
NICS_FIELD_NUMBER: _ClassVar[int]
|
|
52
|
+
OS_FIELD_NUMBER: _ClassVar[int]
|
|
53
|
+
id: str
|
|
54
|
+
update_meta: _common_pb2.UpdateMeta
|
|
55
|
+
updated_at: _timestamp_pb2.Timestamp
|
|
56
|
+
description: str
|
|
57
|
+
rack_id: str
|
|
58
|
+
replace_mode: _switch_pb2.SwitchReplaceMode
|
|
59
|
+
management_ip: str
|
|
60
|
+
management_user: str
|
|
61
|
+
console_command: str
|
|
62
|
+
nics: _containers.RepeatedCompositeFieldContainer[_switch_pb2.SwitchNic]
|
|
63
|
+
os: _switch_pb2.SwitchOS
|
|
64
|
+
def __init__(self, id: _Optional[str] = ..., update_meta: _Optional[_Union[_common_pb2.UpdateMeta, _Mapping]] = ..., updated_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., description: _Optional[str] = ..., rack_id: _Optional[str] = ..., replace_mode: _Optional[_Union[_switch_pb2.SwitchReplaceMode, str]] = ..., management_ip: _Optional[str] = ..., management_user: _Optional[str] = ..., console_command: _Optional[str] = ..., nics: _Optional[_Iterable[_Union[_switch_pb2.SwitchNic, _Mapping]]] = ..., os: _Optional[_Union[_switch_pb2.SwitchOS, _Mapping]] = ...) -> None: ...
|
|
65
|
+
|
|
66
|
+
class SwitchServiceUpdateResponse(_message.Message):
|
|
67
|
+
__slots__ = ("switch",)
|
|
68
|
+
SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
69
|
+
switch: _switch_pb2.Switch
|
|
70
|
+
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
|
|
71
|
+
|
|
72
|
+
class SwitchServiceDeleteRequest(_message.Message):
|
|
73
|
+
__slots__ = ("id", "force")
|
|
74
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
75
|
+
FORCE_FIELD_NUMBER: _ClassVar[int]
|
|
76
|
+
id: str
|
|
77
|
+
force: bool
|
|
78
|
+
def __init__(self, id: _Optional[str] = ..., force: _Optional[bool] = ...) -> None: ...
|
|
79
|
+
|
|
80
|
+
class SwitchServiceDeleteResponse(_message.Message):
|
|
81
|
+
__slots__ = ("switch",)
|
|
82
|
+
SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
83
|
+
switch: _switch_pb2.Switch
|
|
84
|
+
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
|
|
85
|
+
|
|
86
|
+
class SwitchServiceMigrateRequest(_message.Message):
|
|
87
|
+
__slots__ = ("old_switch", "new_switch")
|
|
88
|
+
OLD_SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
89
|
+
NEW_SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
90
|
+
old_switch: str
|
|
91
|
+
new_switch: str
|
|
92
|
+
def __init__(self, old_switch: _Optional[str] = ..., new_switch: _Optional[str] = ...) -> None: ...
|
|
93
|
+
|
|
94
|
+
class SwitchServiceMigrateResponse(_message.Message):
|
|
95
|
+
__slots__ = ("switch",)
|
|
96
|
+
SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
97
|
+
switch: _switch_pb2.Switch
|
|
98
|
+
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
|
|
99
|
+
|
|
100
|
+
class SwitchServicePortRequest(_message.Message):
|
|
101
|
+
__slots__ = ("id", "nic_name", "status")
|
|
102
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
103
|
+
NIC_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
104
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
105
|
+
id: str
|
|
106
|
+
nic_name: str
|
|
107
|
+
status: _switch_pb2.SwitchPortStatus
|
|
108
|
+
def __init__(self, id: _Optional[str] = ..., nic_name: _Optional[str] = ..., status: _Optional[_Union[_switch_pb2.SwitchPortStatus, str]] = ...) -> None: ...
|
|
109
|
+
|
|
110
|
+
class SwitchServicePortResponse(_message.Message):
|
|
111
|
+
__slots__ = ("switch",)
|
|
112
|
+
SWITCH_FIELD_NUMBER: _ClassVar[int]
|
|
113
|
+
switch: _switch_pb2.Switch
|
|
114
|
+
def __init__(self, switch: _Optional[_Union[_switch_pb2.Switch, _Mapping]] = ...) -> None: ...
|
|
@@ -1,30 +1,30 @@
|
|
|
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/admin/v2/tenant.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.admin.v2.tenant_pb2 as metalstack_dot_admin_dot_v2_dot_tenant__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class TenantService(Protocol):
|
|
19
19
|
async def create(self, request: metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceCreateResponse:
|
|
20
|
-
raise
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
21
|
|
|
22
22
|
async def list(self, request: metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceListRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceListResponse:
|
|
23
|
-
raise
|
|
23
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class TenantServiceASGIApplication(
|
|
27
|
-
def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
26
|
+
class TenantServiceASGIApplication(ConnectASGIApplication):
|
|
27
|
+
def __init__(self, service: TenantService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
28
28
|
super().__init__(
|
|
29
29
|
endpoints={
|
|
30
30
|
"/metalstack.admin.v2.TenantService/Create": Endpoint.unary(
|
|
@@ -53,12 +53,12 @@ class TenantServiceASGIApplication(ConnecpyASGIApplication):
|
|
|
53
53
|
)
|
|
54
54
|
|
|
55
55
|
@property
|
|
56
|
-
def path(self):
|
|
56
|
+
def path(self) -> str:
|
|
57
57
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
58
58
|
return "/metalstack.admin.v2.TenantService"
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
class TenantServiceClient(
|
|
61
|
+
class TenantServiceClient(ConnectClient):
|
|
62
62
|
async def create(
|
|
63
63
|
self,
|
|
64
64
|
request: metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceCreateRequest,
|
|
@@ -102,13 +102,13 @@ class TenantServiceClient(ConnecpyClient):
|
|
|
102
102
|
|
|
103
103
|
class TenantServiceSync(Protocol):
|
|
104
104
|
def create(self, request: metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceCreateRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceCreateResponse:
|
|
105
|
-
raise
|
|
105
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
106
106
|
def list(self, request: metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceListRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceListResponse:
|
|
107
|
-
raise
|
|
107
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
class TenantServiceWSGIApplication(
|
|
111
|
-
def __init__(self, service: TenantServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
110
|
+
class TenantServiceWSGIApplication(ConnectWSGIApplication):
|
|
111
|
+
def __init__(self, service: TenantServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
112
112
|
super().__init__(
|
|
113
113
|
endpoints={
|
|
114
114
|
"/metalstack.admin.v2.TenantService/Create": EndpointSync.unary(
|
|
@@ -137,12 +137,12 @@ class TenantServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
|
137
137
|
)
|
|
138
138
|
|
|
139
139
|
@property
|
|
140
|
-
def path(self):
|
|
140
|
+
def path(self) -> str:
|
|
141
141
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
142
142
|
return "/metalstack.admin.v2.TenantService"
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
class TenantServiceClientSync(
|
|
145
|
+
class TenantServiceClientSync(ConnectClientSync):
|
|
146
146
|
def create(
|
|
147
147
|
self,
|
|
148
148
|
request: metalstack_dot_admin_dot_v2_dot_tenant__pb2.TenantServiceCreateRequest,
|
|
@@ -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/admin/v2/tenant.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/admin/v2/tenant.proto'
|
|
19
19
|
)
|
|
@@ -24,10 +24,11 @@ _sym_db = _symbol_database.Default()
|
|
|
24
24
|
|
|
25
25
|
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
|
|
26
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
|
|
27
28
|
from metalstack.api.v2 import tenant_pb2 as metalstack_dot_api_dot_v2_dot_tenant__pb2
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n metalstack/admin/v2/tenant.proto\x12\x13metalstack.admin.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1emetalstack/api/v2/tenant.proto\"\
|
|
31
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n metalstack/admin/v2/tenant.proto\x12\x13metalstack.admin.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a(metalstack/api/v2/predefined_rules.proto\x1a\x1emetalstack/api/v2/tenant.proto\"\xe2\x01\n\x1aTenantServiceCreateRequest\x12\x1f\n\x04name\x18\x01 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01R\x04name\x12\x32\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x0b\xbaH\x08r\x06\xc8\xb3\xae\xb1\x02\x01H\x00R\x0b\x64\x65scription\x88\x01\x01\x12\"\n\x05\x65mail\x18\x03 \x01(\tB\x07\xbaH\x04r\x02`\x01H\x01R\x05\x65mail\x88\x01\x01\x12\"\n\navatar_url\x18\x04 \x01(\tH\x02R\tavatarUrl\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x08\n\x06_emailB\r\n\x0b_avatar_url\"P\n\x1bTenantServiceCreateResponse\x12\x31\n\x06tenant\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.TenantR\x06tenant\"\xc6\x01\n\x18TenantServiceListRequest\x12\x19\n\x05login\x18\x01 \x01(\tH\x00R\x05login\x88\x01\x01\x12$\n\x04name\x18\x02 \x01(\tB\x0b\xbaH\x08r\x06\xc0\xb3\xae\xb1\x02\x01H\x01R\x04name\x88\x01\x01\x12\x19\n\x05\x65mail\x18\x03 \x01(\tH\x02R\x05\x65mail\x88\x01\x01\x12\x31\n\x06paging\x18\x07 \x01(\x0b\x32\x19.metalstack.api.v2.PagingR\x06pagingB\x08\n\x06_loginB\x07\n\x05_nameB\x08\n\x06_email\"\x80\x01\n\x19TenantServiceListResponse\x12\x33\n\x07tenants\x18\x01 \x03(\x0b\x32\x19.metalstack.api.v2.TenantR\x07tenants\x12 \n\tnext_page\x18\x02 \x01(\x04H\x00R\x08nextPage\x88\x01\x01\x42\x0c\n\n_next_page2\xf2\x01\n\rTenantService\x12r\n\x06\x43reate\x12/.metalstack.admin.v2.TenantServiceCreateRequest\x1a\x30.metalstack.admin.v2.TenantServiceCreateResponse\"\x05\xd2\xf3\x18\x01\x01\x12m\n\x04List\x12-.metalstack.admin.v2.TenantServiceListRequest\x1a..metalstack.admin.v2.TenantServiceListResponse\"\x06\xd2\xf3\x18\x02\x01\x02\x42\xcf\x01\n\x17\x63om.metalstack.admin.v2B\x0bTenantProtoP\x01Z9github.com/metal-stack/api/go/metalstack/admin/v2;adminv2\xa2\x02\x03MAX\xaa\x02\x13Metalstack.Admin.V2\xca\x02\x13Metalstack\\Admin\\V2\xe2\x02\x1fMetalstack\\Admin\\V2\\GPBMetadata\xea\x02\x15Metalstack::Admin::V2b\x06proto3')
|
|
31
32
|
|
|
32
33
|
_globals = globals()
|
|
33
34
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -36,23 +37,25 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
36
37
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
37
38
|
_globals['DESCRIPTOR']._serialized_options = b'\n\027com.metalstack.admin.v2B\013TenantProtoP\001Z9github.com/metal-stack/api/go/metalstack/admin/v2;adminv2\242\002\003MAX\252\002\023Metalstack.Admin.V2\312\002\023Metalstack\\Admin\\V2\342\002\037Metalstack\\Admin\\V2\\GPBMetadata\352\002\025Metalstack::Admin::V2'
|
|
38
39
|
_globals['_TENANTSERVICECREATEREQUEST'].fields_by_name['name']._loaded_options = None
|
|
39
|
-
_globals['_TENANTSERVICECREATEREQUEST'].fields_by_name['name']._serialized_options = b'\272H\
|
|
40
|
+
_globals['_TENANTSERVICECREATEREQUEST'].fields_by_name['name']._serialized_options = b'\272H\010r\006\300\263\256\261\002\001'
|
|
40
41
|
_globals['_TENANTSERVICECREATEREQUEST'].fields_by_name['description']._loaded_options = None
|
|
41
|
-
_globals['_TENANTSERVICECREATEREQUEST'].fields_by_name['description']._serialized_options = b'\272H\
|
|
42
|
+
_globals['_TENANTSERVICECREATEREQUEST'].fields_by_name['description']._serialized_options = b'\272H\010r\006\310\263\256\261\002\001'
|
|
42
43
|
_globals['_TENANTSERVICECREATEREQUEST'].fields_by_name['email']._loaded_options = None
|
|
43
44
|
_globals['_TENANTSERVICECREATEREQUEST'].fields_by_name['email']._serialized_options = b'\272H\004r\002`\001'
|
|
45
|
+
_globals['_TENANTSERVICELISTREQUEST'].fields_by_name['name']._loaded_options = None
|
|
46
|
+
_globals['_TENANTSERVICELISTREQUEST'].fields_by_name['name']._serialized_options = b'\272H\010r\006\300\263\256\261\002\001'
|
|
44
47
|
_globals['_TENANTSERVICE'].methods_by_name['Create']._loaded_options = None
|
|
45
48
|
_globals['_TENANTSERVICE'].methods_by_name['Create']._serialized_options = b'\322\363\030\001\001'
|
|
46
49
|
_globals['_TENANTSERVICE'].methods_by_name['List']._loaded_options = None
|
|
47
50
|
_globals['_TENANTSERVICE'].methods_by_name['List']._serialized_options = b'\322\363\030\002\001\002'
|
|
48
|
-
_globals['_TENANTSERVICECREATEREQUEST']._serialized_start=
|
|
49
|
-
_globals['_TENANTSERVICECREATEREQUEST']._serialized_end=
|
|
50
|
-
_globals['_TENANTSERVICECREATERESPONSE']._serialized_start=
|
|
51
|
-
_globals['_TENANTSERVICECREATERESPONSE']._serialized_end=
|
|
52
|
-
_globals['_TENANTSERVICELISTREQUEST']._serialized_start=
|
|
53
|
-
_globals['_TENANTSERVICELISTREQUEST']._serialized_end=
|
|
54
|
-
_globals['_TENANTSERVICELISTRESPONSE']._serialized_start=
|
|
55
|
-
_globals['_TENANTSERVICELISTRESPONSE']._serialized_end=
|
|
56
|
-
_globals['_TENANTSERVICE']._serialized_start=
|
|
57
|
-
_globals['_TENANTSERVICE']._serialized_end=
|
|
51
|
+
_globals['_TENANTSERVICECREATEREQUEST']._serialized_start=193
|
|
52
|
+
_globals['_TENANTSERVICECREATEREQUEST']._serialized_end=419
|
|
53
|
+
_globals['_TENANTSERVICECREATERESPONSE']._serialized_start=421
|
|
54
|
+
_globals['_TENANTSERVICECREATERESPONSE']._serialized_end=501
|
|
55
|
+
_globals['_TENANTSERVICELISTREQUEST']._serialized_start=504
|
|
56
|
+
_globals['_TENANTSERVICELISTREQUEST']._serialized_end=702
|
|
57
|
+
_globals['_TENANTSERVICELISTRESPONSE']._serialized_start=705
|
|
58
|
+
_globals['_TENANTSERVICELISTRESPONSE']._serialized_end=833
|
|
59
|
+
_globals['_TENANTSERVICE']._serialized_start=836
|
|
60
|
+
_globals['_TENANTSERVICE']._serialized_end=1078
|
|
58
61
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from buf.validate import validate_pb2 as _validate_pb2
|
|
2
2
|
from metalstack.api.v2 import common_pb2 as _common_pb2
|
|
3
|
+
from metalstack.api.v2 import predefined_rules_pb2 as _predefined_rules_pb2
|
|
3
4
|
from metalstack.api.v2 import tenant_pb2 as _tenant_pb2
|
|
4
5
|
from google.protobuf.internal import containers as _containers
|
|
5
6
|
from google.protobuf import descriptor as _descriptor
|
|
@@ -1,30 +1,30 @@
|
|
|
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/admin/v2/token.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.admin.v2.token_pb2 as metalstack_dot_admin_dot_v2_dot_token__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class TokenService(Protocol):
|
|
19
19
|
async def list(self, request: metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceListRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceListResponse:
|
|
20
|
-
raise
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
21
|
|
|
22
22
|
async def revoke(self, request: metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceRevokeRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceRevokeResponse:
|
|
23
|
-
raise
|
|
23
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class TokenServiceASGIApplication(
|
|
27
|
-
def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
26
|
+
class TokenServiceASGIApplication(ConnectASGIApplication):
|
|
27
|
+
def __init__(self, service: TokenService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
28
28
|
super().__init__(
|
|
29
29
|
endpoints={
|
|
30
30
|
"/metalstack.admin.v2.TokenService/List": Endpoint.unary(
|
|
@@ -53,12 +53,12 @@ class TokenServiceASGIApplication(ConnecpyASGIApplication):
|
|
|
53
53
|
)
|
|
54
54
|
|
|
55
55
|
@property
|
|
56
|
-
def path(self):
|
|
56
|
+
def path(self) -> str:
|
|
57
57
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
58
58
|
return "/metalstack.admin.v2.TokenService"
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
class TokenServiceClient(
|
|
61
|
+
class TokenServiceClient(ConnectClient):
|
|
62
62
|
async def list(
|
|
63
63
|
self,
|
|
64
64
|
request: metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceListRequest,
|
|
@@ -102,13 +102,13 @@ class TokenServiceClient(ConnecpyClient):
|
|
|
102
102
|
|
|
103
103
|
class TokenServiceSync(Protocol):
|
|
104
104
|
def list(self, request: metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceListRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceListResponse:
|
|
105
|
-
raise
|
|
105
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
106
106
|
def revoke(self, request: metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceRevokeRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceRevokeResponse:
|
|
107
|
-
raise
|
|
107
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
class TokenServiceWSGIApplication(
|
|
111
|
-
def __init__(self, service: TokenServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
110
|
+
class TokenServiceWSGIApplication(ConnectWSGIApplication):
|
|
111
|
+
def __init__(self, service: TokenServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
112
112
|
super().__init__(
|
|
113
113
|
endpoints={
|
|
114
114
|
"/metalstack.admin.v2.TokenService/List": EndpointSync.unary(
|
|
@@ -137,12 +137,12 @@ class TokenServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
|
137
137
|
)
|
|
138
138
|
|
|
139
139
|
@property
|
|
140
|
-
def path(self):
|
|
140
|
+
def path(self) -> str:
|
|
141
141
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
142
142
|
return "/metalstack.admin.v2.TokenService"
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
class TokenServiceClientSync(
|
|
145
|
+
class TokenServiceClientSync(ConnectClientSync):
|
|
146
146
|
def list(
|
|
147
147
|
self,
|
|
148
148
|
request: metalstack_dot_admin_dot_v2_dot_token__pb2.TokenServiceListRequest,
|
metalstack/admin/v2/token_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/admin/v2/token.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/admin/v2/token.proto'
|
|
19
19
|
)
|
metalstack/api/v2/common_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/common.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/common.proto'
|
|
19
19
|
)
|
|
@@ -27,7 +27,7 @@ from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor
|
|
|
27
27
|
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emetalstack/api/v2/common.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto\x1a google/protobuf/descriptor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"O\n\x06Paging\x12\x17\n\x04page\x18\x01 \x01(\x04H\x00R\x04page\x88\x01\x01\x12\x19\n\x05\x63ount\x18\x02 \x01(\x04H\x01R\x05\x63ount\x88\x01\x01\x42\x07\n\x05_pageB\x08\n\x06_count\"\x9c\x01\n\x06Labels\x12W\n\x06labels\x18\x01 \x03(\x0b\x32%.metalstack.api.v2.Labels.LabelsEntryB\x18\xbaH\x15\x9a\x01\x12\"\x07r\x05\x10\x01\x18\x80\x02*\x07r\x05\x10\x00\x18\x80\x02R\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xdf\x01\n\x04Meta\x12\x36\n\x06labels\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.LabelsH\x00R\x06labels\x88\x01\x01\x12\x39\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x1e\n\ngeneration\x18\x04 \x01(\x04R\ngenerationB\t\n\x07_labels\"Y\n\x0cUpdateLabels\x12\x31\n\x06update\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.LabelsR\x06update\x12\x16\n\x06remove\x18\x02 \x03(\tR\x06remove\"\
|
|
30
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emetalstack/api/v2/common.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto\x1a google/protobuf/descriptor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"O\n\x06Paging\x12\x17\n\x04page\x18\x01 \x01(\x04H\x00R\x04page\x88\x01\x01\x12\x19\n\x05\x63ount\x18\x02 \x01(\x04H\x01R\x05\x63ount\x88\x01\x01\x42\x07\n\x05_pageB\x08\n\x06_count\"\x9c\x01\n\x06Labels\x12W\n\x06labels\x18\x01 \x03(\x0b\x32%.metalstack.api.v2.Labels.LabelsEntryB\x18\xbaH\x15\x9a\x01\x12\"\x07r\x05\x10\x01\x18\x80\x02*\x07r\x05\x10\x00\x18\x80\x02R\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xdf\x01\n\x04Meta\x12\x36\n\x06labels\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.LabelsH\x00R\x06labels\x88\x01\x01\x12\x39\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x1e\n\ngeneration\x18\x04 \x01(\x04R\ngenerationB\t\n\x07_labels\"Y\n\x0cUpdateLabels\x12\x31\n\x06update\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.LabelsR\x06update\x12\x16\n\x06remove\x18\x02 \x03(\tR\x06remove\"\xaa\x01\n\nUpdateMeta\x12\x39\n\nupdated_at\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x61\n\x10locking_strategy\x18\x02 \x01(\x0e\x32,.metalstack.api.v2.OptimisticLockingStrategyB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x0flockingStrategy*\x87\x01\n\nTenantRole\x12\x1b\n\x17TENANT_ROLE_UNSPECIFIED\x10\x00\x12\x15\n\x11TENANT_ROLE_OWNER\x10\x01\x12\x16\n\x12TENANT_ROLE_EDITOR\x10\x02\x12\x16\n\x12TENANT_ROLE_VIEWER\x10\x03\x12\x15\n\x11TENANT_ROLE_GUEST\x10\x04*u\n\x0bProjectRole\x12\x1c\n\x18PROJECT_ROLE_UNSPECIFIED\x10\x00\x12\x16\n\x12PROJECT_ROLE_OWNER\x10\x01\x12\x17\n\x13PROJECT_ROLE_EDITOR\x10\x02\x12\x17\n\x13PROJECT_ROLE_VIEWER\x10\x03*U\n\tAdminRole\x12\x1a\n\x16\x41\x44MIN_ROLE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44MIN_ROLE_EDITOR\x10\x01\x12\x15\n\x11\x41\x44MIN_ROLE_VIEWER\x10\x02*U\n\tInfraRole\x12\x1a\n\x16INFRA_ROLE_UNSPECIFIED\x10\x00\x12\x15\n\x11INFRA_ROLE_EDITOR\x10\x01\x12\x15\n\x11INFRA_ROLE_VIEWER\x10\x02*T\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x15\n\x11VISIBILITY_PUBLIC\x10\x01\x12\x13\n\x0fVISIBILITY_SELF\x10\x03*R\n\x08\x41uditing\x12\x18\n\x14\x41UDITING_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41UDITING_INCLUDED\x10\x01\x12\x15\n\x11\x41UDITING_EXCLUDED\x10\x02*\x98\x01\n\x19OptimisticLockingStrategy\x12+\n\'OPTIMISTIC_LOCKING_STRATEGY_UNSPECIFIED\x10\x00\x12&\n\"OPTIMISTIC_LOCKING_STRATEGY_CLIENT\x10\x01\x12&\n\"OPTIMISTIC_LOCKING_STRATEGY_SERVER\x10\x02:b\n\x0ctenant_roles\x12\x1e.google.protobuf.MethodOptions\x18\xb8\x8e\x03 \x03(\x0e\x32\x1d.metalstack.api.v2.TenantRoleR\x0btenantRoles:e\n\rproject_roles\x12\x1e.google.protobuf.MethodOptions\x18\xb9\x8e\x03 \x03(\x0e\x32\x1e.metalstack.api.v2.ProjectRoleR\x0cprojectRoles:_\n\x0b\x61\x64min_roles\x12\x1e.google.protobuf.MethodOptions\x18\xba\x8e\x03 \x03(\x0e\x32\x1c.metalstack.api.v2.AdminRoleR\nadminRoles:_\n\nvisibility\x12\x1e.google.protobuf.MethodOptions\x18\xbb\x8e\x03 \x01(\x0e\x32\x1d.metalstack.api.v2.VisibilityR\nvisibility:Y\n\x08\x61uditing\x12\x1e.google.protobuf.MethodOptions\x18\xbc\x8e\x03 \x01(\x0e\x32\x1b.metalstack.api.v2.AuditingR\x08\x61uditing:_\n\x0binfra_roles\x12\x1e.google.protobuf.MethodOptions\x18\xbd\x8e\x03 \x03(\x0e\x32\x1c.metalstack.api.v2.InfraRoleR\ninfraRoles:O\n\x11\x65num_string_value\x12!.google.protobuf.EnumValueOptions\x18\xa0\x96\x03 \x01(\tR\x0f\x65numStringValueB\xc1\x01\n\x15\x63om.metalstack.api.v2B\x0b\x43ommonProtoP\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
31
|
|
|
32
32
|
_globals = globals()
|
|
33
33
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -39,20 +39,22 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
39
39
|
_globals['_LABELS_LABELSENTRY']._serialized_options = b'8\001'
|
|
40
40
|
_globals['_LABELS'].fields_by_name['labels']._loaded_options = None
|
|
41
41
|
_globals['_LABELS'].fields_by_name['labels']._serialized_options = b'\272H\025\232\001\022\"\007r\005\020\001\030\200\002*\007r\005\020\000\030\200\002'
|
|
42
|
-
_globals['
|
|
43
|
-
_globals['
|
|
44
|
-
_globals['
|
|
45
|
-
_globals['
|
|
46
|
-
_globals['
|
|
47
|
-
_globals['
|
|
48
|
-
_globals['
|
|
49
|
-
_globals['
|
|
50
|
-
_globals['
|
|
51
|
-
_globals['
|
|
52
|
-
_globals['
|
|
53
|
-
_globals['
|
|
54
|
-
_globals['
|
|
55
|
-
_globals['
|
|
42
|
+
_globals['_UPDATEMETA'].fields_by_name['locking_strategy']._loaded_options = None
|
|
43
|
+
_globals['_UPDATEMETA'].fields_by_name['locking_strategy']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
44
|
+
_globals['_TENANTROLE']._serialized_start=880
|
|
45
|
+
_globals['_TENANTROLE']._serialized_end=1015
|
|
46
|
+
_globals['_PROJECTROLE']._serialized_start=1017
|
|
47
|
+
_globals['_PROJECTROLE']._serialized_end=1134
|
|
48
|
+
_globals['_ADMINROLE']._serialized_start=1136
|
|
49
|
+
_globals['_ADMINROLE']._serialized_end=1221
|
|
50
|
+
_globals['_INFRAROLE']._serialized_start=1223
|
|
51
|
+
_globals['_INFRAROLE']._serialized_end=1308
|
|
52
|
+
_globals['_VISIBILITY']._serialized_start=1310
|
|
53
|
+
_globals['_VISIBILITY']._serialized_end=1394
|
|
54
|
+
_globals['_AUDITING']._serialized_start=1396
|
|
55
|
+
_globals['_AUDITING']._serialized_end=1478
|
|
56
|
+
_globals['_OPTIMISTICLOCKINGSTRATEGY']._serialized_start=1481
|
|
57
|
+
_globals['_OPTIMISTICLOCKINGSTRATEGY']._serialized_end=1633
|
|
56
58
|
_globals['_PAGING']._serialized_start=149
|
|
57
59
|
_globals['_PAGING']._serialized_end=228
|
|
58
60
|
_globals['_LABELS']._serialized_start=231
|
|
@@ -64,5 +66,5 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
64
66
|
_globals['_UPDATELABELS']._serialized_start=615
|
|
65
67
|
_globals['_UPDATELABELS']._serialized_end=704
|
|
66
68
|
_globals['_UPDATEMETA']._serialized_start=707
|
|
67
|
-
_globals['_UPDATEMETA']._serialized_end=
|
|
69
|
+
_globals['_UPDATEMETA']._serialized_end=877
|
|
68
70
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,33 +1,33 @@
|
|
|
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/filesystem.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.filesystem_pb2 as metalstack_dot_api_dot_v2_dot_filesystem__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class FilesystemService(Protocol):
|
|
19
19
|
async def get(self, request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetResponse:
|
|
20
|
-
raise
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
21
|
|
|
22
22
|
async def list(self, request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListResponse:
|
|
23
|
-
raise
|
|
23
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
24
24
|
|
|
25
25
|
async def match(self, request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchResponse:
|
|
26
|
-
raise
|
|
26
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
class FilesystemServiceASGIApplication(
|
|
30
|
-
def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None):
|
|
29
|
+
class FilesystemServiceASGIApplication(ConnectASGIApplication):
|
|
30
|
+
def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
31
31
|
super().__init__(
|
|
32
32
|
endpoints={
|
|
33
33
|
"/metalstack.api.v2.FilesystemService/Get": Endpoint.unary(
|
|
@@ -66,12 +66,12 @@ class FilesystemServiceASGIApplication(ConnecpyASGIApplication):
|
|
|
66
66
|
)
|
|
67
67
|
|
|
68
68
|
@property
|
|
69
|
-
def path(self):
|
|
69
|
+
def path(self) -> str:
|
|
70
70
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
71
71
|
return "/metalstack.api.v2.FilesystemService"
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
class FilesystemServiceClient(
|
|
74
|
+
class FilesystemServiceClient(ConnectClient):
|
|
75
75
|
async def get(
|
|
76
76
|
self,
|
|
77
77
|
request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetRequest,
|
|
@@ -135,15 +135,15 @@ class FilesystemServiceClient(ConnecpyClient):
|
|
|
135
135
|
|
|
136
136
|
class FilesystemServiceSync(Protocol):
|
|
137
137
|
def get(self, request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetResponse:
|
|
138
|
-
raise
|
|
138
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
139
139
|
def list(self, request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListResponse:
|
|
140
|
-
raise
|
|
140
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
141
141
|
def match(self, request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchRequest, ctx: RequestContext) -> metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchResponse:
|
|
142
|
-
raise
|
|
142
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
class FilesystemServiceWSGIApplication(
|
|
146
|
-
def __init__(self, service: FilesystemServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None):
|
|
145
|
+
class FilesystemServiceWSGIApplication(ConnectWSGIApplication):
|
|
146
|
+
def __init__(self, service: FilesystemServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
147
147
|
super().__init__(
|
|
148
148
|
endpoints={
|
|
149
149
|
"/metalstack.api.v2.FilesystemService/Get": EndpointSync.unary(
|
|
@@ -182,12 +182,12 @@ class FilesystemServiceWSGIApplication(ConnecpyWSGIApplication):
|
|
|
182
182
|
)
|
|
183
183
|
|
|
184
184
|
@property
|
|
185
|
-
def path(self):
|
|
185
|
+
def path(self) -> str:
|
|
186
186
|
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
187
187
|
return "/metalstack.api.v2.FilesystemService"
|
|
188
188
|
|
|
189
189
|
|
|
190
|
-
class FilesystemServiceClientSync(
|
|
190
|
+
class FilesystemServiceClientSync(ConnectClientSync):
|
|
191
191
|
def get(
|
|
192
192
|
self,
|
|
193
193
|
request: metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetRequest,
|