metal-stack-api 0.0.33__py3-none-any.whl → 0.0.35__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.33.dist-info → metal_stack_api-0.0.35.dist-info}/METADATA +1 -1
- {metal_stack_api-0.0.33.dist-info → metal_stack_api-0.0.35.dist-info}/RECORD +12 -9
- metalstack/admin/v2/project_connect.py +119 -0
- metalstack/admin/v2/project_pb2.py +48 -0
- metalstack/admin/v2/project_pb2.pyi +24 -0
- metalstack/admin/v2/token_pb2.py +7 -7
- metalstack/admin/v2/token_pb2.pyi +4 -4
- metalstack/api/v2/method_pb2.py +10 -8
- metalstack/api/v2/method_pb2.pyi +4 -2
- metalstack/client/client.py +4 -0
- {metal_stack_api-0.0.33.dist-info → metal_stack_api-0.0.35.dist-info}/WHEEL +0 -0
- {metal_stack_api-0.0.33.dist-info → metal_stack_api-0.0.35.dist-info}/top_level.txt +0 -0
|
@@ -19,6 +19,9 @@ metalstack/admin/v2/network_pb2.pyi,sha256=TOL1oqTO8L6zC85YfBRUOBJUiDD506uQ-5UDj
|
|
|
19
19
|
metalstack/admin/v2/partition_connect.py,sha256=k9JOkdrQY0Qci0w125mgTYRY6CMKrBRwK55HFeYLWgY,16233
|
|
20
20
|
metalstack/admin/v2/partition_pb2.py,sha256=BXOx8EsPfIs6Yxk3YhT-IfF6P8XTgfKlJfN4Vndtza4,9956
|
|
21
21
|
metalstack/admin/v2/partition_pb2.pyi,sha256=lBAmofSPCNOI07dbaQ3Huo3PJJA2zzFQ62WxQB-LDLY,5740
|
|
22
|
+
metalstack/admin/v2/project_connect.py,sha256=P8pehzWB2RBzN7-ZrlrHr4hYshpwkxBM0u5AX77G6io,5420
|
|
23
|
+
metalstack/admin/v2/project_pb2.py,sha256=1YucBz_zxd0NvJru1Lo78RMWyuQog6eVmMl9bNr-WkU,3534
|
|
24
|
+
metalstack/admin/v2/project_pb2.pyi,sha256=3-yMLvCmlE4yte_o_DjNNqV-UDUIlpYjuNA90ExxaiE,1190
|
|
22
25
|
metalstack/admin/v2/size_connect.py,sha256=EeDMcsNDo9nN7LetIkaB5sxGMk1CqZGfFtWzabgi_gg,12009
|
|
23
26
|
metalstack/admin/v2/size_pb2.py,sha256=RfNZRLJZy_fQ9LU9I5I6L5MWylPzPDrl2m8q9VQ1Kow,6457
|
|
24
27
|
metalstack/admin/v2/size_pb2.pyi,sha256=xMbYS7HghgaPMCOpAwmdadGBOp_BU7TvF4QTJuMaMMs,2664
|
|
@@ -29,8 +32,8 @@ metalstack/admin/v2/tenant_connect.py,sha256=yxL56ifI-VSE1O-We4V8naqc0QXKhlkqZaG
|
|
|
29
32
|
metalstack/admin/v2/tenant_pb2.py,sha256=LbMSxlil9NdM20e2Cg1q8Edd2PGdvf8lXSt8sqZpQnQ,5680
|
|
30
33
|
metalstack/admin/v2/tenant_pb2.pyi,sha256=ZI3HryRUf7bWAwKMWsfDa55fS6FVrsxStMyV4sU3cz0,2303
|
|
31
34
|
metalstack/admin/v2/token_connect.py,sha256=h547_mZfaAbloKf-WmNdTIbGjJnlLMLy7Rtl_vAk4K8,12080
|
|
32
|
-
metalstack/admin/v2/token_pb2.py,sha256=
|
|
33
|
-
metalstack/admin/v2/token_pb2.pyi,sha256=
|
|
35
|
+
metalstack/admin/v2/token_pb2.py,sha256=aTbnaDK9su8mHgpaOnoVLbU0ZDFitS6qdOKszsNmUio,5508
|
|
36
|
+
metalstack/admin/v2/token_pb2.pyi,sha256=jFRWVkOtdAYualwNnk3-FM3iZ0ku-2c7SXzfm02XvRE,2171
|
|
34
37
|
metalstack/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
38
|
metalstack/api/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
39
|
metalstack/api/v2/common_pb2.py,sha256=YUozzWnuUgW4HQsiZlnoOd700wG69pKU06Lo3oJb9YA,7319
|
|
@@ -51,8 +54,8 @@ metalstack/api/v2/machine_connect.py,sha256=KUcyR-z-j4RDpnIJw30VsJbr5Mdv9fHbVkxN
|
|
|
51
54
|
metalstack/api/v2/machine_pb2.py,sha256=wGYHS_bM0EiF5Mql1f0xlpLE2ogdhHRmWKKPkJLOTnA,58869
|
|
52
55
|
metalstack/api/v2/machine_pb2.pyi,sha256=7GqAH0O9teg-oes8OXKrYF1SagSUn_4qO1OXq6lK4HI,32440
|
|
53
56
|
metalstack/api/v2/method_connect.py,sha256=_NVufSXlHvIatC6Fud1jryH1_7m0VBo7IMHIPbov8xM,8954
|
|
54
|
-
metalstack/api/v2/method_pb2.py,sha256=
|
|
55
|
-
metalstack/api/v2/method_pb2.pyi,sha256=
|
|
57
|
+
metalstack/api/v2/method_pb2.py,sha256=EsRrhxBwK8jx-wOobivvzYrYr81CglDTOnMiU8AwG3U,5929
|
|
58
|
+
metalstack/api/v2/method_pb2.pyi,sha256=JCdhpSxg9WfnFtCWFkMLbrG_wqP7EDmgtAO_58aRnRU,2791
|
|
56
59
|
metalstack/api/v2/network_connect.py,sha256=S1MQi3laJxJ3N2KSB2ta1OdzMjG6HvbVgQabTAcYnnw,22639
|
|
57
60
|
metalstack/api/v2/network_pb2.py,sha256=2hKEaxeDtT21qhmYbzu2H0R8R1TchtWVIka3zj1YHHA,26950
|
|
58
61
|
metalstack/api/v2/network_pb2.pyi,sha256=Wy7-gUAHdgwiq2q0hpLYXRu2sx5k-lqAixSaqjtWDa8,12423
|
|
@@ -82,7 +85,7 @@ metalstack/api/v2/version_connect.py,sha256=0a65vkFDevDjanQYevOPcBAsoREbN2-GzD25
|
|
|
82
85
|
metalstack/api/v2/version_pb2.py,sha256=_KuCtJ-y0GL-bd4DLn6D229ivoMdYoUZ57bkGIBuWEA,3071
|
|
83
86
|
metalstack/api/v2/version_pb2.pyi,sha256=JfQ_tYwDG6P9aH7y7-iEHmtuWsLKsrpLKAVJIzHehRM,1172
|
|
84
87
|
metalstack/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
85
|
-
metalstack/client/client.py,sha256=
|
|
88
|
+
metalstack/client/client.py,sha256=6EWAIeWZx1Ct6gVGv0ZO7VhFUGf4dZ0RtOae7HY-3ow,6495
|
|
86
89
|
metalstack/infra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
87
90
|
metalstack/infra/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
91
|
metalstack/infra/v2/bmc_connect.py,sha256=OJQQnWJmYANeDoCcwQDR-wQUiyZ0bNlNsOxDFFnaklk,5332
|
|
@@ -91,7 +94,7 @@ metalstack/infra/v2/bmc_pb2.pyi,sha256=e4FGBnDQhg6K_zlhoC170lw-0OSlSdHK3So6r3Reh
|
|
|
91
94
|
metalstack/infra/v2/switch_connect.py,sha256=TftYMAVcYhwFaenInmBK21CnGTyN5pXNDrKQLDWFTz4,12319
|
|
92
95
|
metalstack/infra/v2/switch_pb2.py,sha256=YSGPr501YDAIWGLGCXuGJxVYyU-hUYQCHRWz8huxxxY,7736
|
|
93
96
|
metalstack/infra/v2/switch_pb2.pyi,sha256=SSUHCM5ImRTV1U1X_uEA51qWZYtEd-_ZesVESiKeWNw,4309
|
|
94
|
-
metal_stack_api-0.0.
|
|
95
|
-
metal_stack_api-0.0.
|
|
96
|
-
metal_stack_api-0.0.
|
|
97
|
-
metal_stack_api-0.0.
|
|
97
|
+
metal_stack_api-0.0.35.dist-info/METADATA,sha256=5_P7WPqh-qjO0I_iGB00f4OYnqLwg3FnW3n9swE0BiA,874
|
|
98
|
+
metal_stack_api-0.0.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
99
|
+
metal_stack_api-0.0.35.dist-info/top_level.txt,sha256=OqZoCBTOYMgPJJ3GbO1ZfY7eRpW9Ljc5g3Ajlu44n2I,11
|
|
100
|
+
metal_stack_api-0.0.35.dist-info/RECORD,,
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
|
|
3
|
+
# source: metalstack/admin/v2/project.proto
|
|
4
|
+
|
|
5
|
+
from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
|
|
6
|
+
from typing import Protocol
|
|
7
|
+
|
|
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
|
+
import metalstack.admin.v2.project_pb2 as metalstack_dot_admin_dot_v2_dot_project__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ProjectService(Protocol):
|
|
19
|
+
async def list(self, request: metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListResponse:
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ProjectServiceASGIApplication(ConnectASGIApplication):
|
|
24
|
+
def __init__(self, service: ProjectService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
25
|
+
super().__init__(
|
|
26
|
+
endpoints={
|
|
27
|
+
"/metalstack.admin.v2.ProjectService/List": Endpoint.unary(
|
|
28
|
+
method=MethodInfo(
|
|
29
|
+
name="List",
|
|
30
|
+
service_name="metalstack.admin.v2.ProjectService",
|
|
31
|
+
input=metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListRequest,
|
|
32
|
+
output=metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListResponse,
|
|
33
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
34
|
+
),
|
|
35
|
+
function=service.list,
|
|
36
|
+
),
|
|
37
|
+
},
|
|
38
|
+
interceptors=interceptors,
|
|
39
|
+
read_max_bytes=read_max_bytes,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def path(self) -> str:
|
|
44
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
45
|
+
return "/metalstack.admin.v2.ProjectService"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class ProjectServiceClient(ConnectClient):
|
|
49
|
+
async def list(
|
|
50
|
+
self,
|
|
51
|
+
request: metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListRequest,
|
|
52
|
+
*,
|
|
53
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
54
|
+
timeout_ms: int | None = None,
|
|
55
|
+
) -> metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListResponse:
|
|
56
|
+
return await self.execute_unary(
|
|
57
|
+
request=request,
|
|
58
|
+
method=MethodInfo(
|
|
59
|
+
name="List",
|
|
60
|
+
service_name="metalstack.admin.v2.ProjectService",
|
|
61
|
+
input=metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListRequest,
|
|
62
|
+
output=metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListResponse,
|
|
63
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
64
|
+
),
|
|
65
|
+
headers=headers,
|
|
66
|
+
timeout_ms=timeout_ms,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class ProjectServiceSync(Protocol):
|
|
71
|
+
def list(self, request: metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListRequest, ctx: RequestContext) -> metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListResponse:
|
|
72
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class ProjectServiceWSGIApplication(ConnectWSGIApplication):
|
|
76
|
+
def __init__(self, service: ProjectServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
77
|
+
super().__init__(
|
|
78
|
+
endpoints={
|
|
79
|
+
"/metalstack.admin.v2.ProjectService/List": EndpointSync.unary(
|
|
80
|
+
method=MethodInfo(
|
|
81
|
+
name="List",
|
|
82
|
+
service_name="metalstack.admin.v2.ProjectService",
|
|
83
|
+
input=metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListRequest,
|
|
84
|
+
output=metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListResponse,
|
|
85
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
86
|
+
),
|
|
87
|
+
function=service.list,
|
|
88
|
+
),
|
|
89
|
+
},
|
|
90
|
+
interceptors=interceptors,
|
|
91
|
+
read_max_bytes=read_max_bytes,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def path(self) -> str:
|
|
96
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
97
|
+
return "/metalstack.admin.v2.ProjectService"
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class ProjectServiceClientSync(ConnectClientSync):
|
|
101
|
+
def list(
|
|
102
|
+
self,
|
|
103
|
+
request: metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListRequest,
|
|
104
|
+
*,
|
|
105
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
106
|
+
timeout_ms: int | None = None,
|
|
107
|
+
) -> metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListResponse:
|
|
108
|
+
return self.execute_unary(
|
|
109
|
+
request=request,
|
|
110
|
+
method=MethodInfo(
|
|
111
|
+
name="List",
|
|
112
|
+
service_name="metalstack.admin.v2.ProjectService",
|
|
113
|
+
input=metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListRequest,
|
|
114
|
+
output=metalstack_dot_admin_dot_v2_dot_project__pb2.ProjectServiceListResponse,
|
|
115
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
116
|
+
),
|
|
117
|
+
headers=headers,
|
|
118
|
+
timeout_ms=timeout_ms,
|
|
119
|
+
)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: metalstack/admin/v2/project.proto
|
|
5
|
+
# Protobuf Python Version: 6.32.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
32,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'metalstack/admin/v2/project.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
|
|
26
|
+
from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common__pb2
|
|
27
|
+
from metalstack.api.v2 import project_pb2 as metalstack_dot_api_dot_v2_dot_project__pb2
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!metalstack/admin/v2/project.proto\x12\x13metalstack.admin.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1fmetalstack/api/v2/project.proto\"\x92\x01\n\x19ProjectServiceListRequest\x12\'\n\x06tenant\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x00R\x06tenant\x88\x01\x01\x12\x36\n\x06labels\x18\x02 \x01(\x0b\x32\x19.metalstack.api.v2.LabelsH\x01R\x06labels\x88\x01\x01\x42\t\n\x07_tenantB\t\n\x07_labels\"T\n\x1aProjectServiceListResponse\x12\x36\n\x08projects\x18\x01 \x03(\x0b\x32\x1a.metalstack.api.v2.ProjectR\x08projects2\x85\x01\n\x0eProjectService\x12s\n\x04List\x12..metalstack.admin.v2.ProjectServiceListRequest\x1a/.metalstack.admin.v2.ProjectServiceListResponse\"\n\xd2\xf3\x18\x02\x01\x02\xe0\xf3\x18\x02\x42\xd0\x01\n\x17\x63om.metalstack.admin.v2B\x0cProjectProtoP\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
|
+
_globals = globals()
|
|
33
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
34
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'metalstack.admin.v2.project_pb2', _globals)
|
|
35
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
36
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
37
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\027com.metalstack.admin.v2B\014ProjectProtoP\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
|
+
_globals['_PROJECTSERVICELISTREQUEST'].fields_by_name['tenant']._loaded_options = None
|
|
39
|
+
_globals['_PROJECTSERVICELISTREQUEST'].fields_by_name['tenant']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
|
|
40
|
+
_globals['_PROJECTSERVICE'].methods_by_name['List']._loaded_options = None
|
|
41
|
+
_globals['_PROJECTSERVICE'].methods_by_name['List']._serialized_options = b'\322\363\030\002\001\002\340\363\030\002'
|
|
42
|
+
_globals['_PROJECTSERVICELISTREQUEST']._serialized_start=153
|
|
43
|
+
_globals['_PROJECTSERVICELISTREQUEST']._serialized_end=299
|
|
44
|
+
_globals['_PROJECTSERVICELISTRESPONSE']._serialized_start=301
|
|
45
|
+
_globals['_PROJECTSERVICELISTRESPONSE']._serialized_end=385
|
|
46
|
+
_globals['_PROJECTSERVICE']._serialized_start=388
|
|
47
|
+
_globals['_PROJECTSERVICE']._serialized_end=521
|
|
48
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from buf.validate import validate_pb2 as _validate_pb2
|
|
2
|
+
from metalstack.api.v2 import common_pb2 as _common_pb2
|
|
3
|
+
from metalstack.api.v2 import project_pb2 as _project_pb2
|
|
4
|
+
from google.protobuf.internal import containers as _containers
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import message as _message
|
|
7
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
8
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
9
|
+
|
|
10
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
11
|
+
|
|
12
|
+
class ProjectServiceListRequest(_message.Message):
|
|
13
|
+
__slots__ = ("tenant", "labels")
|
|
14
|
+
TENANT_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
LABELS_FIELD_NUMBER: _ClassVar[int]
|
|
16
|
+
tenant: str
|
|
17
|
+
labels: _common_pb2.Labels
|
|
18
|
+
def __init__(self, tenant: _Optional[str] = ..., labels: _Optional[_Union[_common_pb2.Labels, _Mapping]] = ...) -> None: ...
|
|
19
|
+
|
|
20
|
+
class ProjectServiceListResponse(_message.Message):
|
|
21
|
+
__slots__ = ("projects",)
|
|
22
|
+
PROJECTS_FIELD_NUMBER: _ClassVar[int]
|
|
23
|
+
projects: _containers.RepeatedCompositeFieldContainer[_project_pb2.Project]
|
|
24
|
+
def __init__(self, projects: _Optional[_Iterable[_Union[_project_pb2.Project, _Mapping]]] = ...) -> None: ...
|
metalstack/admin/v2/token_pb2.py
CHANGED
|
@@ -27,7 +27,7 @@ from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common
|
|
|
27
27
|
from metalstack.api.v2 import token_pb2 as metalstack_dot_api_dot_v2_dot_token__pb2
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fmetalstack/admin/v2/token.proto\x12\x13metalstack.admin.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1dmetalstack/api/v2/token.proto\";\n\x17TokenServiceListRequest\x12\x17\n\x04user\x18\x01 \x01(\tH\x00R\x04user\x88\x01\x01\x42\x07\n\x05_user\"L\n\x18TokenServiceListResponse\x12\x30\n\x06tokens\x18\x01 \x03(\x0b\x32\x18.metalstack.api.v2.TokenR\x06tokens\"Y\n\x19TokenServiceRevokeRequest\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\x12\x1e\n\x04user\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x04R\x04user\"\x1c\n\x1aTokenServiceRevokeResponse\"
|
|
30
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fmetalstack/admin/v2/token.proto\x12\x13metalstack.admin.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1dmetalstack/api/v2/token.proto\";\n\x17TokenServiceListRequest\x12\x17\n\x04user\x18\x01 \x01(\tH\x00R\x04user\x88\x01\x01\x42\x07\n\x05_user\"L\n\x18TokenServiceListResponse\x12\x30\n\x06tokens\x18\x01 \x03(\x0b\x32\x18.metalstack.api.v2.TokenR\x06tokens\"Y\n\x19TokenServiceRevokeRequest\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\x12\x1e\n\x04user\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x04R\x04user\"\x1c\n\x1aTokenServiceRevokeResponse\"\xa9\x01\n\x19TokenServiceCreateRequest\x12#\n\x04user\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x04H\x00R\x04user\x88\x01\x01\x12^\n\x14token_create_request\x18\x02 \x01(\x0b\x32,.metalstack.api.v2.TokenServiceCreateRequestR\x12tokenCreateRequestB\x07\n\x05_user\"d\n\x1aTokenServiceCreateResponse\x12.\n\x05token\x18\x01 \x01(\x0b\x32\x18.metalstack.api.v2.TokenR\x05token\x12\x16\n\x06secret\x18\x02 \x01(\tR\x06secret2\xdf\x02\n\x0cTokenService\x12k\n\x04List\x12,.metalstack.admin.v2.TokenServiceListRequest\x1a-.metalstack.admin.v2.TokenServiceListResponse\"\x06\xd2\xf3\x18\x02\x01\x02\x12p\n\x06Revoke\x12..metalstack.admin.v2.TokenServiceRevokeRequest\x1a/.metalstack.admin.v2.TokenServiceRevokeResponse\"\x05\xd2\xf3\x18\x01\x01\x12p\n\x06\x43reate\x12..metalstack.admin.v2.TokenServiceCreateRequest\x1a/.metalstack.admin.v2.TokenServiceCreateResponse\"\x05\xd2\xf3\x18\x01\x01\x42\xce\x01\n\x17\x63om.metalstack.admin.v2B\nTokenProtoP\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
31
|
|
|
32
32
|
_globals = globals()
|
|
33
33
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -55,10 +55,10 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
55
55
|
_globals['_TOKENSERVICEREVOKEREQUEST']._serialized_end=376
|
|
56
56
|
_globals['_TOKENSERVICEREVOKERESPONSE']._serialized_start=378
|
|
57
57
|
_globals['_TOKENSERVICEREVOKERESPONSE']._serialized_end=406
|
|
58
|
-
_globals['_TOKENSERVICECREATEREQUEST']._serialized_start=
|
|
59
|
-
_globals['_TOKENSERVICECREATEREQUEST']._serialized_end=
|
|
60
|
-
_globals['_TOKENSERVICECREATERESPONSE']._serialized_start=
|
|
61
|
-
_globals['_TOKENSERVICECREATERESPONSE']._serialized_end=
|
|
62
|
-
_globals['_TOKENSERVICE']._serialized_start=
|
|
63
|
-
_globals['_TOKENSERVICE']._serialized_end=
|
|
58
|
+
_globals['_TOKENSERVICECREATEREQUEST']._serialized_start=409
|
|
59
|
+
_globals['_TOKENSERVICECREATEREQUEST']._serialized_end=578
|
|
60
|
+
_globals['_TOKENSERVICECREATERESPONSE']._serialized_start=580
|
|
61
|
+
_globals['_TOKENSERVICECREATERESPONSE']._serialized_end=680
|
|
62
|
+
_globals['_TOKENSERVICE']._serialized_start=683
|
|
63
|
+
_globals['_TOKENSERVICE']._serialized_end=1034
|
|
64
64
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -34,12 +34,12 @@ class TokenServiceRevokeResponse(_message.Message):
|
|
|
34
34
|
def __init__(self) -> None: ...
|
|
35
35
|
|
|
36
36
|
class TokenServiceCreateRequest(_message.Message):
|
|
37
|
-
__slots__ = ("user", "
|
|
37
|
+
__slots__ = ("user", "token_create_request")
|
|
38
38
|
USER_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
-
|
|
39
|
+
TOKEN_CREATE_REQUEST_FIELD_NUMBER: _ClassVar[int]
|
|
40
40
|
user: str
|
|
41
|
-
|
|
42
|
-
def __init__(self, user: _Optional[str] = ...,
|
|
41
|
+
token_create_request: _token_pb2.TokenServiceCreateRequest
|
|
42
|
+
def __init__(self, user: _Optional[str] = ..., token_create_request: _Optional[_Union[_token_pb2.TokenServiceCreateRequest, _Mapping]] = ...) -> None: ...
|
|
43
43
|
|
|
44
44
|
class TokenServiceCreateResponse(_message.Message):
|
|
45
45
|
__slots__ = ("token", "secret")
|
metalstack/api/v2/method_pb2.py
CHANGED
|
@@ -27,7 +27,7 @@ from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common
|
|
|
27
27
|
from metalstack.api.v2 import token_pb2 as metalstack_dot_api_dot_v2_dot_token__pb2
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emetalstack/api/v2/method.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1dmetalstack/api/v2/token.proto\"\x1a\n\x18MethodServiceListRequest\"5\n\x19MethodServiceListResponse\x12\x18\n\x07methods\x18\x01 \x03(\tR\x07methods\"%\n#MethodServiceTokenScopedListRequest\"\
|
|
30
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emetalstack/api/v2/method.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a\x1dmetalstack/api/v2/token.proto\"\x1a\n\x18MethodServiceListRequest\"5\n\x19MethodServiceListResponse\x12\x18\n\x07methods\x18\x01 \x03(\tR\x07methods\"%\n#MethodServiceTokenScopedListRequest\"\xc0\x05\n$MethodServiceTokenScopedListResponse\x12\x45\n\x0bpermissions\x18\x01 \x03(\x0b\x32#.metalstack.api.v2.MethodPermissionR\x0bpermissions\x12n\n\rproject_roles\x18\x03 \x03(\x0b\x32I.metalstack.api.v2.MethodServiceTokenScopedListResponse.ProjectRolesEntryR\x0cprojectRoles\x12k\n\x0ctenant_roles\x18\x04 \x03(\x0b\x32H.metalstack.api.v2.MethodServiceTokenScopedListResponse.TenantRolesEntryR\x0btenantRoles\x12J\n\nadmin_role\x18\x05 \x01(\x0e\x32\x1c.metalstack.api.v2.AdminRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x00R\tadminRole\x88\x01\x01\x12J\n\ninfra_role\x18\x06 \x01(\x0e\x32\x1c.metalstack.api.v2.InfraRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x01R\tinfraRole\x88\x01\x01\x1a_\n\x11ProjectRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x34\n\x05value\x18\x02 \x01(\x0e\x32\x1e.metalstack.api.v2.ProjectRoleR\x05value:\x02\x38\x01\x1a]\n\x10TenantRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x33\n\x05value\x18\x02 \x01(\x0e\x32\x1d.metalstack.api.v2.TenantRoleR\x05value:\x02\x38\x01\x42\r\n\x0b_admin_roleB\r\n\x0b_infra_role2\x83\x02\n\rMethodService\x12g\n\x04List\x12+.metalstack.api.v2.MethodServiceListRequest\x1a,.metalstack.api.v2.MethodServiceListResponse\"\x04\xd8\xf3\x18\x01\x12\x88\x01\n\x0fTokenScopedList\x12\x36.metalstack.api.v2.MethodServiceTokenScopedListRequest\x1a\x37.metalstack.api.v2.MethodServiceTokenScopedListResponse\"\x04\xd8\xf3\x18\x03\x42\xc1\x01\n\x15\x63om.metalstack.api.v2B\x0bMethodProtoP\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)
|
|
@@ -41,6 +41,8 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
41
41
|
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE_TENANTROLESENTRY']._serialized_options = b'8\001'
|
|
42
42
|
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE'].fields_by_name['admin_role']._loaded_options = None
|
|
43
43
|
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE'].fields_by_name['admin_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
44
|
+
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE'].fields_by_name['infra_role']._loaded_options = None
|
|
45
|
+
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE'].fields_by_name['infra_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
44
46
|
_globals['_METHODSERVICE'].methods_by_name['List']._loaded_options = None
|
|
45
47
|
_globals['_METHODSERVICE'].methods_by_name['List']._serialized_options = b'\330\363\030\001'
|
|
46
48
|
_globals['_METHODSERVICE'].methods_by_name['TokenScopedList']._loaded_options = None
|
|
@@ -52,11 +54,11 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
52
54
|
_globals['_METHODSERVICETOKENSCOPEDLISTREQUEST']._serialized_start=228
|
|
53
55
|
_globals['_METHODSERVICETOKENSCOPEDLISTREQUEST']._serialized_end=265
|
|
54
56
|
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE']._serialized_start=268
|
|
55
|
-
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE']._serialized_end=
|
|
56
|
-
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE_PROJECTROLESENTRY']._serialized_start=
|
|
57
|
-
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE_PROJECTROLESENTRY']._serialized_end=
|
|
58
|
-
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE_TENANTROLESENTRY']._serialized_start=
|
|
59
|
-
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE_TENANTROLESENTRY']._serialized_end=
|
|
60
|
-
_globals['_METHODSERVICE']._serialized_start=
|
|
61
|
-
_globals['_METHODSERVICE']._serialized_end=
|
|
57
|
+
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE']._serialized_end=972
|
|
58
|
+
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE_PROJECTROLESENTRY']._serialized_start=752
|
|
59
|
+
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE_PROJECTROLESENTRY']._serialized_end=847
|
|
60
|
+
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE_TENANTROLESENTRY']._serialized_start=849
|
|
61
|
+
_globals['_METHODSERVICETOKENSCOPEDLISTRESPONSE_TENANTROLESENTRY']._serialized_end=942
|
|
62
|
+
_globals['_METHODSERVICE']._serialized_start=975
|
|
63
|
+
_globals['_METHODSERVICE']._serialized_end=1234
|
|
62
64
|
# @@protoc_insertion_point(module_scope)
|
metalstack/api/v2/method_pb2.pyi
CHANGED
|
@@ -24,7 +24,7 @@ class MethodServiceTokenScopedListRequest(_message.Message):
|
|
|
24
24
|
def __init__(self) -> None: ...
|
|
25
25
|
|
|
26
26
|
class MethodServiceTokenScopedListResponse(_message.Message):
|
|
27
|
-
__slots__ = ("permissions", "project_roles", "tenant_roles", "admin_role")
|
|
27
|
+
__slots__ = ("permissions", "project_roles", "tenant_roles", "admin_role", "infra_role")
|
|
28
28
|
class ProjectRolesEntry(_message.Message):
|
|
29
29
|
__slots__ = ("key", "value")
|
|
30
30
|
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
@@ -43,8 +43,10 @@ class MethodServiceTokenScopedListResponse(_message.Message):
|
|
|
43
43
|
PROJECT_ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
44
44
|
TENANT_ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
45
45
|
ADMIN_ROLE_FIELD_NUMBER: _ClassVar[int]
|
|
46
|
+
INFRA_ROLE_FIELD_NUMBER: _ClassVar[int]
|
|
46
47
|
permissions: _containers.RepeatedCompositeFieldContainer[_token_pb2.MethodPermission]
|
|
47
48
|
project_roles: _containers.ScalarMap[str, _common_pb2.ProjectRole]
|
|
48
49
|
tenant_roles: _containers.ScalarMap[str, _common_pb2.TenantRole]
|
|
49
50
|
admin_role: _common_pb2.AdminRole
|
|
50
|
-
|
|
51
|
+
infra_role: _common_pb2.InfraRole
|
|
52
|
+
def __init__(self, permissions: _Optional[_Iterable[_Union[_token_pb2.MethodPermission, _Mapping]]] = ..., project_roles: _Optional[_Mapping[str, _common_pb2.ProjectRole]] = ..., tenant_roles: _Optional[_Mapping[str, _common_pb2.TenantRole]] = ..., admin_role: _Optional[_Union[_common_pb2.AdminRole, str]] = ..., infra_role: _Optional[_Union[_common_pb2.InfraRole, str]] = ...) -> None: ...
|
metalstack/client/client.py
CHANGED
|
@@ -8,6 +8,7 @@ import metalstack.admin.v2.ip_connect as admin_ip_connect
|
|
|
8
8
|
import metalstack.admin.v2.machine_connect as admin_machine_connect
|
|
9
9
|
import metalstack.admin.v2.network_connect as admin_network_connect
|
|
10
10
|
import metalstack.admin.v2.partition_connect as admin_partition_connect
|
|
11
|
+
import metalstack.admin.v2.project_connect as admin_project_connect
|
|
11
12
|
import metalstack.admin.v2.size_connect as admin_size_connect
|
|
12
13
|
import metalstack.admin.v2.switch_connect as admin_switch_connect
|
|
13
14
|
import metalstack.admin.v2.tenant_connect as admin_tenant_connect
|
|
@@ -79,6 +80,9 @@ class Client:
|
|
|
79
80
|
def partition(self):
|
|
80
81
|
return admin_partition_connect.PartitionServiceClientSync(address=self._baseurl, session=self._session)
|
|
81
82
|
|
|
83
|
+
def project(self):
|
|
84
|
+
return admin_project_connect.ProjectServiceClientSync(address=self._baseurl, session=self._session)
|
|
85
|
+
|
|
82
86
|
def size(self):
|
|
83
87
|
return admin_size_connect.SizeServiceClientSync(address=self._baseurl, session=self._session)
|
|
84
88
|
|
|
File without changes
|
|
File without changes
|