metal-stack-api 0.0.3__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.
Files changed (107) hide show
  1. buf/__init__.py +0 -0
  2. buf/validate/__init__.py +0 -0
  3. buf/validate/validate_pb2.py +450 -0
  4. buf/validate/validate_pb2.pyi +631 -0
  5. buf/validate/validate_pb2_grpc.py +4 -0
  6. metal_stack_api-0.0.3.dist-info/METADATA +26 -0
  7. metal_stack_api-0.0.3.dist-info/RECORD +107 -0
  8. metal_stack_api-0.0.3.dist-info/WHEEL +5 -0
  9. metal_stack_api-0.0.3.dist-info/top_level.txt +2 -0
  10. metalstack/__init__.py +0 -0
  11. metalstack/admin/__init__.py +0 -0
  12. metalstack/admin/v2/__init__.py +0 -0
  13. metalstack/admin/v2/filesystem_connecpy.py +214 -0
  14. metalstack/admin/v2/filesystem_pb2.py +60 -0
  15. metalstack/admin/v2/filesystem_pb2.pyi +45 -0
  16. metalstack/admin/v2/filesystem_pb2_grpc.py +169 -0
  17. metalstack/admin/v2/image_connecpy.py +270 -0
  18. metalstack/admin/v2/image_pb2.py +66 -0
  19. metalstack/admin/v2/image_pb2.pyi +58 -0
  20. metalstack/admin/v2/image_pb2_grpc.py +213 -0
  21. metalstack/admin/v2/ip_connecpy.py +158 -0
  22. metalstack/admin/v2/ip_pb2.py +53 -0
  23. metalstack/admin/v2/ip_pb2.pyi +39 -0
  24. metalstack/admin/v2/ip_pb2_grpc.py +125 -0
  25. metalstack/admin/v2/network_connecpy.py +326 -0
  26. metalstack/admin/v2/network_pb2.py +104 -0
  27. metalstack/admin/v2/network_pb2.pyi +122 -0
  28. metalstack/admin/v2/network_pb2_grpc.py +257 -0
  29. metalstack/admin/v2/partition_connecpy.py +270 -0
  30. metalstack/admin/v2/partition_pb2.py +72 -0
  31. metalstack/admin/v2/partition_pb2.pyi +90 -0
  32. metalstack/admin/v2/partition_pb2_grpc.py +213 -0
  33. metalstack/admin/v2/size_connecpy.py +214 -0
  34. metalstack/admin/v2/size_pb2.py +66 -0
  35. metalstack/admin/v2/size_pb2.pyi +54 -0
  36. metalstack/admin/v2/size_pb2_grpc.py +169 -0
  37. metalstack/admin/v2/tenant_connecpy.py +158 -0
  38. metalstack/admin/v2/tenant_pb2.py +58 -0
  39. metalstack/admin/v2/tenant_pb2.pyi +50 -0
  40. metalstack/admin/v2/tenant_pb2_grpc.py +125 -0
  41. metalstack/admin/v2/token_connecpy.py +158 -0
  42. metalstack/admin/v2/token_pb2.py +56 -0
  43. metalstack/admin/v2/token_pb2.pyi +34 -0
  44. metalstack/admin/v2/token_pb2_grpc.py +125 -0
  45. metalstack/api/__init__.py +0 -0
  46. metalstack/api/v2/__init__.py +0 -0
  47. metalstack/api/v2/common_pb2.py +66 -0
  48. metalstack/api/v2/common_pb2.pyi +128 -0
  49. metalstack/api/v2/common_pb2_grpc.py +4 -0
  50. metalstack/api/v2/filesystem_connecpy.py +270 -0
  51. metalstack/api/v2/filesystem_pb2.py +167 -0
  52. metalstack/api/v2/filesystem_pb2.pyi +229 -0
  53. metalstack/api/v2/filesystem_pb2_grpc.py +213 -0
  54. metalstack/api/v2/health_connecpy.py +102 -0
  55. metalstack/api/v2/health_pb2.py +70 -0
  56. metalstack/api/v2/health_pb2.pyi +80 -0
  57. metalstack/api/v2/health_pb2_grpc.py +81 -0
  58. metalstack/api/v2/image_connecpy.py +214 -0
  59. metalstack/api/v2/image_pb2.py +106 -0
  60. metalstack/api/v2/image_pb2.pyi +115 -0
  61. metalstack/api/v2/image_pb2_grpc.py +169 -0
  62. metalstack/api/v2/ip_connecpy.py +326 -0
  63. metalstack/api/v2/ip_pb2.py +159 -0
  64. metalstack/api/v2/ip_pb2.pyi +170 -0
  65. metalstack/api/v2/ip_pb2_grpc.py +257 -0
  66. metalstack/api/v2/methods_connecpy.py +158 -0
  67. metalstack/api/v2/methods_pb2.py +62 -0
  68. metalstack/api/v2/methods_pb2.pyi +50 -0
  69. metalstack/api/v2/methods_pb2_grpc.py +128 -0
  70. metalstack/api/v2/network_connecpy.py +382 -0
  71. metalstack/api/v2/network_pb2.py +191 -0
  72. metalstack/api/v2/network_pb2.pyi +247 -0
  73. metalstack/api/v2/network_pb2_grpc.py +301 -0
  74. metalstack/api/v2/partition_connecpy.py +158 -0
  75. metalstack/api/v2/partition_pb2.py +81 -0
  76. metalstack/api/v2/partition_pb2.pyi +79 -0
  77. metalstack/api/v2/partition_pb2_grpc.py +125 -0
  78. metalstack/api/v2/project_connecpy.py +718 -0
  79. metalstack/api/v2/project_pb2.py +156 -0
  80. metalstack/api/v2/project_pb2.pyi +230 -0
  81. metalstack/api/v2/project_pb2_grpc.py +565 -0
  82. metalstack/api/v2/size_connecpy.py +158 -0
  83. metalstack/api/v2/size_pb2.py +85 -0
  84. metalstack/api/v2/size_pb2.pyi +85 -0
  85. metalstack/api/v2/size_pb2_grpc.py +125 -0
  86. metalstack/api/v2/tenant_connecpy.py +718 -0
  87. metalstack/api/v2/tenant_pb2.py +140 -0
  88. metalstack/api/v2/tenant_pb2.pyi +236 -0
  89. metalstack/api/v2/tenant_pb2_grpc.py +565 -0
  90. metalstack/api/v2/token_connecpy.py +326 -0
  91. metalstack/api/v2/token_pb2.py +143 -0
  92. metalstack/api/v2/token_pb2.pyi +175 -0
  93. metalstack/api/v2/token_pb2_grpc.py +257 -0
  94. metalstack/api/v2/user_connecpy.py +102 -0
  95. metalstack/api/v2/user_pb2.py +48 -0
  96. metalstack/api/v2/user_pb2.pyi +38 -0
  97. metalstack/api/v2/user_pb2_grpc.py +81 -0
  98. metalstack/api/v2/version_connecpy.py +102 -0
  99. metalstack/api/v2/version_pb2.py +46 -0
  100. metalstack/api/v2/version_pb2.pyi +29 -0
  101. metalstack/api/v2/version_pb2_grpc.py +81 -0
  102. metalstack/infra/__init__.py +0 -0
  103. metalstack/infra/v2/__init__.py +0 -0
  104. metalstack/infra/v2/bmc_connecpy.py +102 -0
  105. metalstack/infra/v2/bmc_pb2.py +44 -0
  106. metalstack/infra/v2/bmc_pb2.pyi +14 -0
  107. metalstack/infra/v2/bmc_pb2_grpc.py +81 -0
@@ -0,0 +1,301 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
5
+ from metalstack.api.v2 import network_pb2 as metalstack_dot_api_dot_v2_dot_network__pb2
6
+
7
+
8
+ class NetworkServiceStub(object):
9
+ """NetworkService serves network address related functions for end users, e.g. with project scope
10
+ """
11
+
12
+ def __init__(self, channel):
13
+ """Constructor.
14
+
15
+ Args:
16
+ channel: A grpc.Channel.
17
+ """
18
+ self.Get = channel.unary_unary(
19
+ '/metalstack.api.v2.NetworkService/Get',
20
+ request_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceGetRequest.SerializeToString,
21
+ response_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceGetResponse.FromString,
22
+ _registered_method=True)
23
+ self.Create = channel.unary_unary(
24
+ '/metalstack.api.v2.NetworkService/Create',
25
+ request_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceCreateRequest.SerializeToString,
26
+ response_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceCreateResponse.FromString,
27
+ _registered_method=True)
28
+ self.Update = channel.unary_unary(
29
+ '/metalstack.api.v2.NetworkService/Update',
30
+ request_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceUpdateRequest.SerializeToString,
31
+ response_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceUpdateResponse.FromString,
32
+ _registered_method=True)
33
+ self.List = channel.unary_unary(
34
+ '/metalstack.api.v2.NetworkService/List',
35
+ request_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListRequest.SerializeToString,
36
+ response_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListResponse.FromString,
37
+ _registered_method=True)
38
+ self.ListBaseNetworks = channel.unary_unary(
39
+ '/metalstack.api.v2.NetworkService/ListBaseNetworks',
40
+ request_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListBaseNetworksRequest.SerializeToString,
41
+ response_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListBaseNetworksResponse.FromString,
42
+ _registered_method=True)
43
+ self.Delete = channel.unary_unary(
44
+ '/metalstack.api.v2.NetworkService/Delete',
45
+ request_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceDeleteRequest.SerializeToString,
46
+ response_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceDeleteResponse.FromString,
47
+ _registered_method=True)
48
+
49
+
50
+ class NetworkServiceServicer(object):
51
+ """NetworkService serves network address related functions for end users, e.g. with project scope
52
+ """
53
+
54
+ def Get(self, request, context):
55
+ """Get a network
56
+ """
57
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
58
+ context.set_details('Method not implemented!')
59
+ raise NotImplementedError('Method not implemented!')
60
+
61
+ def Create(self, request, context):
62
+ """Create a child network from a super network.
63
+ """
64
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
65
+ context.set_details('Method not implemented!')
66
+ raise NotImplementedError('Method not implemented!')
67
+
68
+ def Update(self, request, context):
69
+ """Update a network
70
+ """
71
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
72
+ context.set_details('Method not implemented!')
73
+ raise NotImplementedError('Method not implemented!')
74
+
75
+ def List(self, request, context):
76
+ """List all project networks
77
+ """
78
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
79
+ context.set_details('Method not implemented!')
80
+ raise NotImplementedError('Method not implemented!')
81
+
82
+ def ListBaseNetworks(self, request, context):
83
+ """ListBaseNetworks all base networks that can be used for either child network or ip allocation
84
+ """
85
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
86
+ context.set_details('Method not implemented!')
87
+ raise NotImplementedError('Method not implemented!')
88
+
89
+ def Delete(self, request, context):
90
+ """Delete a network
91
+ """
92
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
93
+ context.set_details('Method not implemented!')
94
+ raise NotImplementedError('Method not implemented!')
95
+
96
+
97
+ def add_NetworkServiceServicer_to_server(servicer, server):
98
+ rpc_method_handlers = {
99
+ 'Get': grpc.unary_unary_rpc_method_handler(
100
+ servicer.Get,
101
+ request_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceGetRequest.FromString,
102
+ response_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceGetResponse.SerializeToString,
103
+ ),
104
+ 'Create': grpc.unary_unary_rpc_method_handler(
105
+ servicer.Create,
106
+ request_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceCreateRequest.FromString,
107
+ response_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceCreateResponse.SerializeToString,
108
+ ),
109
+ 'Update': grpc.unary_unary_rpc_method_handler(
110
+ servicer.Update,
111
+ request_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceUpdateRequest.FromString,
112
+ response_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceUpdateResponse.SerializeToString,
113
+ ),
114
+ 'List': grpc.unary_unary_rpc_method_handler(
115
+ servicer.List,
116
+ request_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListRequest.FromString,
117
+ response_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListResponse.SerializeToString,
118
+ ),
119
+ 'ListBaseNetworks': grpc.unary_unary_rpc_method_handler(
120
+ servicer.ListBaseNetworks,
121
+ request_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListBaseNetworksRequest.FromString,
122
+ response_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListBaseNetworksResponse.SerializeToString,
123
+ ),
124
+ 'Delete': grpc.unary_unary_rpc_method_handler(
125
+ servicer.Delete,
126
+ request_deserializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceDeleteRequest.FromString,
127
+ response_serializer=metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceDeleteResponse.SerializeToString,
128
+ ),
129
+ }
130
+ generic_handler = grpc.method_handlers_generic_handler(
131
+ 'metalstack.api.v2.NetworkService', rpc_method_handlers)
132
+ server.add_generic_rpc_handlers((generic_handler,))
133
+ server.add_registered_method_handlers('metalstack.api.v2.NetworkService', rpc_method_handlers)
134
+
135
+
136
+ # This class is part of an EXPERIMENTAL API.
137
+ class NetworkService(object):
138
+ """NetworkService serves network address related functions for end users, e.g. with project scope
139
+ """
140
+
141
+ @staticmethod
142
+ def Get(request,
143
+ target,
144
+ options=(),
145
+ channel_credentials=None,
146
+ call_credentials=None,
147
+ insecure=False,
148
+ compression=None,
149
+ wait_for_ready=None,
150
+ timeout=None,
151
+ metadata=None):
152
+ return grpc.experimental.unary_unary(
153
+ request,
154
+ target,
155
+ '/metalstack.api.v2.NetworkService/Get',
156
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceGetRequest.SerializeToString,
157
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceGetResponse.FromString,
158
+ options,
159
+ channel_credentials,
160
+ insecure,
161
+ call_credentials,
162
+ compression,
163
+ wait_for_ready,
164
+ timeout,
165
+ metadata,
166
+ _registered_method=True)
167
+
168
+ @staticmethod
169
+ def Create(request,
170
+ target,
171
+ options=(),
172
+ channel_credentials=None,
173
+ call_credentials=None,
174
+ insecure=False,
175
+ compression=None,
176
+ wait_for_ready=None,
177
+ timeout=None,
178
+ metadata=None):
179
+ return grpc.experimental.unary_unary(
180
+ request,
181
+ target,
182
+ '/metalstack.api.v2.NetworkService/Create',
183
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceCreateRequest.SerializeToString,
184
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceCreateResponse.FromString,
185
+ options,
186
+ channel_credentials,
187
+ insecure,
188
+ call_credentials,
189
+ compression,
190
+ wait_for_ready,
191
+ timeout,
192
+ metadata,
193
+ _registered_method=True)
194
+
195
+ @staticmethod
196
+ def Update(request,
197
+ target,
198
+ options=(),
199
+ channel_credentials=None,
200
+ call_credentials=None,
201
+ insecure=False,
202
+ compression=None,
203
+ wait_for_ready=None,
204
+ timeout=None,
205
+ metadata=None):
206
+ return grpc.experimental.unary_unary(
207
+ request,
208
+ target,
209
+ '/metalstack.api.v2.NetworkService/Update',
210
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceUpdateRequest.SerializeToString,
211
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceUpdateResponse.FromString,
212
+ options,
213
+ channel_credentials,
214
+ insecure,
215
+ call_credentials,
216
+ compression,
217
+ wait_for_ready,
218
+ timeout,
219
+ metadata,
220
+ _registered_method=True)
221
+
222
+ @staticmethod
223
+ def List(request,
224
+ target,
225
+ options=(),
226
+ channel_credentials=None,
227
+ call_credentials=None,
228
+ insecure=False,
229
+ compression=None,
230
+ wait_for_ready=None,
231
+ timeout=None,
232
+ metadata=None):
233
+ return grpc.experimental.unary_unary(
234
+ request,
235
+ target,
236
+ '/metalstack.api.v2.NetworkService/List',
237
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListRequest.SerializeToString,
238
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListResponse.FromString,
239
+ options,
240
+ channel_credentials,
241
+ insecure,
242
+ call_credentials,
243
+ compression,
244
+ wait_for_ready,
245
+ timeout,
246
+ metadata,
247
+ _registered_method=True)
248
+
249
+ @staticmethod
250
+ def ListBaseNetworks(request,
251
+ target,
252
+ options=(),
253
+ channel_credentials=None,
254
+ call_credentials=None,
255
+ insecure=False,
256
+ compression=None,
257
+ wait_for_ready=None,
258
+ timeout=None,
259
+ metadata=None):
260
+ return grpc.experimental.unary_unary(
261
+ request,
262
+ target,
263
+ '/metalstack.api.v2.NetworkService/ListBaseNetworks',
264
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListBaseNetworksRequest.SerializeToString,
265
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceListBaseNetworksResponse.FromString,
266
+ options,
267
+ channel_credentials,
268
+ insecure,
269
+ call_credentials,
270
+ compression,
271
+ wait_for_ready,
272
+ timeout,
273
+ metadata,
274
+ _registered_method=True)
275
+
276
+ @staticmethod
277
+ def Delete(request,
278
+ target,
279
+ options=(),
280
+ channel_credentials=None,
281
+ call_credentials=None,
282
+ insecure=False,
283
+ compression=None,
284
+ wait_for_ready=None,
285
+ timeout=None,
286
+ metadata=None):
287
+ return grpc.experimental.unary_unary(
288
+ request,
289
+ target,
290
+ '/metalstack.api.v2.NetworkService/Delete',
291
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceDeleteRequest.SerializeToString,
292
+ metalstack_dot_api_dot_v2_dot_network__pb2.NetworkServiceDeleteResponse.FromString,
293
+ options,
294
+ channel_credentials,
295
+ insecure,
296
+ call_credentials,
297
+ compression,
298
+ wait_for_ready,
299
+ timeout,
300
+ metadata,
301
+ _registered_method=True)
@@ -0,0 +1,158 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by https://github.com/i2y/connecpy/protoc-gen-connecpy. DO NOT EDIT!
3
+ # source: metalstack/api/v2/partition.proto
4
+
5
+ from typing import Optional, Protocol, Union
6
+
7
+ import httpx
8
+
9
+ from connecpy.async_client import AsyncConnecpyClient
10
+ from connecpy.base import Endpoint
11
+ from connecpy.server import ConnecpyServer
12
+ from connecpy.client import ConnecpyClient
13
+ from connecpy.context import ClientContext, ServiceContext
14
+ import metalstack.api.v2.partition_pb2 as metalstack_dot_api_dot_v2_dot_partition__pb2
15
+
16
+
17
+ class PartitionService(Protocol):
18
+ async def Get(self, req: metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse: ...
19
+ async def List(self, req: metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse: ...
20
+
21
+
22
+ class PartitionServiceServer(ConnecpyServer):
23
+ def __init__(self, *, service: PartitionService, server_path_prefix=""):
24
+ super().__init__()
25
+ self._prefix = f"{server_path_prefix}/metalstack.api.v2.PartitionService"
26
+ self._endpoints = {
27
+ "Get": Endpoint[metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetRequest, metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse](
28
+ service_name="PartitionService",
29
+ name="Get",
30
+ function=getattr(service, "Get"),
31
+ input=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetRequest,
32
+ output=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse,
33
+ allowed_methods=("POST",),
34
+ ),
35
+ "List": Endpoint[metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListRequest, metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse](
36
+ service_name="PartitionService",
37
+ name="List",
38
+ function=getattr(service, "List"),
39
+ input=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListRequest,
40
+ output=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse,
41
+ allowed_methods=("POST",),
42
+ ),
43
+ }
44
+
45
+ def serviceName(self):
46
+ return "metalstack.api.v2.PartitionService"
47
+
48
+
49
+ class PartitionServiceSync(Protocol):
50
+ def Get(self, req: metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse: ...
51
+ def List(self, req: metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse: ...
52
+
53
+
54
+ class PartitionServiceServerSync(ConnecpyServer):
55
+ def __init__(self, *, service: PartitionServiceSync, server_path_prefix=""):
56
+ super().__init__()
57
+ self._prefix = f"{server_path_prefix}/metalstack.api.v2.PartitionService"
58
+ self._endpoints = {
59
+ "Get": Endpoint[metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetRequest, metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse](
60
+ service_name="PartitionService",
61
+ name="Get",
62
+ function=getattr(service, "Get"),
63
+ input=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetRequest,
64
+ output=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse,
65
+ allowed_methods=("POST",),
66
+ ),
67
+ "List": Endpoint[metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListRequest, metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse](
68
+ service_name="PartitionService",
69
+ name="List",
70
+ function=getattr(service, "List"),
71
+ input=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListRequest,
72
+ output=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse,
73
+ allowed_methods=("POST",),
74
+ ),
75
+ }
76
+
77
+ def serviceName(self):
78
+ return "metalstack.api.v2.PartitionService"
79
+
80
+
81
+ class PartitionServiceClient(ConnecpyClient):
82
+ def Get(
83
+ self,
84
+ request: metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetRequest,
85
+ *,
86
+ ctx: Optional[ClientContext] = None,
87
+ server_path_prefix: str = "",
88
+ **kwargs,
89
+ ) -> metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse:
90
+ method = "POST"
91
+ return self._make_request(
92
+ url=f"{server_path_prefix}/metalstack.api.v2.PartitionService/Get",
93
+ ctx=ctx,
94
+ request=request,
95
+ response_class=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse,
96
+ method=method,
97
+ **kwargs,
98
+ )
99
+
100
+ def List(
101
+ self,
102
+ request: metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListRequest,
103
+ *,
104
+ ctx: Optional[ClientContext] = None,
105
+ server_path_prefix: str = "",
106
+ **kwargs,
107
+ ) -> metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse:
108
+ method = "POST"
109
+ return self._make_request(
110
+ url=f"{server_path_prefix}/metalstack.api.v2.PartitionService/List",
111
+ ctx=ctx,
112
+ request=request,
113
+ response_class=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse,
114
+ method=method,
115
+ **kwargs,
116
+ )
117
+
118
+
119
+ class AsyncPartitionServiceClient(AsyncConnecpyClient):
120
+ async def Get(
121
+ self,
122
+ request: metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetRequest,
123
+ *,
124
+ ctx: Optional[ClientContext] = None,
125
+ server_path_prefix: str = "",
126
+ session: Union[httpx.AsyncClient, None] = None,
127
+ **kwargs,
128
+ ) -> metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse:
129
+ method = "POST"
130
+ return await self._make_request(
131
+ url=f"{server_path_prefix}/metalstack.api.v2.PartitionService/Get",
132
+ ctx=ctx,
133
+ request=request,
134
+ response_class=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceGetResponse,
135
+ method=method,
136
+ session=session,
137
+ **kwargs,
138
+ )
139
+
140
+ async def List(
141
+ self,
142
+ request: metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListRequest,
143
+ *,
144
+ ctx: Optional[ClientContext] = None,
145
+ server_path_prefix: str = "",
146
+ session: Union[httpx.AsyncClient, None] = None,
147
+ **kwargs,
148
+ ) -> metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse:
149
+ method = "POST"
150
+ return await self._make_request(
151
+ url=f"{server_path_prefix}/metalstack.api.v2.PartitionService/List",
152
+ ctx=ctx,
153
+ request=request,
154
+ response_class=metalstack_dot_api_dot_v2_dot_partition__pb2.PartitionServiceListResponse,
155
+ method=method,
156
+ session=session,
157
+ **kwargs,
158
+ )
@@ -0,0 +1,81 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: metalstack/api/v2/partition.proto
5
+ # Protobuf Python Version: 6.31.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
+ 31,
16
+ 1,
17
+ '',
18
+ 'metalstack/api/v2/partition.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
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!metalstack/api/v2/partition.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\"\xa2\x03\n\tPartition\x12\x1a\n\x02id\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x02id\x12+\n\x04meta\x18\x02 \x01(\x0b\x32\x17.metalstack.api.v2.MetaR\x04meta\x12*\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x01R\x0b\x64\x65scription\x12\\\n\x12\x62oot_configuration\x18\x04 \x01(\x0b\x32-.metalstack.api.v2.PartitionBootConfigurationR\x11\x62ootConfiguration\x12\x45\n\ndns_server\x18\x05 \x03(\x0b\x32\x1c.metalstack.api.v2.DNSServerB\x08\xbaH\x05\x92\x01\x02\x10\x03R\tdnsServer\x12\x45\n\nntp_server\x18\x06 \x03(\x0b\x32\x1c.metalstack.api.v2.NTPServerB\x08\xbaH\x05\x92\x01\x02\x10\nR\tntpServer\x12\x34\n\x16mgmt_service_addresses\x18\x07 \x03(\tR\x14mgmtServiceAddresses\"8\n\x0ePartitionQuery\x12\x1f\n\x02id\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x00R\x02id\x88\x01\x01\x42\x05\n\x03_id\"\xee\x01\n\x1aPartitionBootConfiguration\x12U\n\timage_url\x18\x01 \x01(\tB8\xbaH5\xba\x01\x32\n\tvalid_url\x12\x17url must be a valid URI\x1a\x0cthis.isUri()R\x08imageUrl\x12W\n\nkernel_url\x18\x02 \x01(\tB8\xbaH5\xba\x01\x32\n\tvalid_url\x12\x17url must be a valid URI\x1a\x0cthis.isUri()R\tkernelUrl\x12 \n\x0b\x63ommandline\x18\x03 \x01(\tR\x0b\x63ommandline\"$\n\tDNSServer\x12\x17\n\x02ip\x18\x01 \x01(\tB\x07\xbaH\x04r\x02p\x01R\x02ip\"/\n\tNTPServer\x12\"\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x02R\x07\x61\x64\x64ress\"8\n\x1aPartitionServiceGetRequest\x12\x1a\n\x02id\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x02id\"V\n\x1bPartitionServiceListRequest\x12\x37\n\x05query\x18\x01 \x01(\x0b\x32!.metalstack.api.v2.PartitionQueryR\x05query\"Y\n\x1bPartitionServiceGetResponse\x12:\n\tpartition\x18\x01 \x01(\x0b\x32\x1c.metalstack.api.v2.PartitionR\tpartition\"\\\n\x1cPartitionServiceListResponse\x12<\n\npartitions\x18\x01 \x03(\x0b\x32\x1c.metalstack.api.v2.PartitionR\npartitions2\xf5\x01\n\x10PartitionService\x12n\n\x03Get\x12-.metalstack.api.v2.PartitionServiceGetRequest\x1a..metalstack.api.v2.PartitionServiceGetResponse\"\x08\xd8\xf3\x18\x03\xe0\xf3\x18\x02\x12q\n\x04List\x12..metalstack.api.v2.PartitionServiceListRequest\x1a/.metalstack.api.v2.PartitionServiceListResponse\"\x08\xd8\xf3\x18\x03\xe0\xf3\x18\x02\x42\xc4\x01\n\x15\x63om.metalstack.api.v2B\x0ePartitionProtoP\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')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'metalstack.api.v2.partition_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals['DESCRIPTOR']._loaded_options = None
36
+ _globals['DESCRIPTOR']._serialized_options = b'\n\025com.metalstack.api.v2B\016PartitionProtoP\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'
37
+ _globals['_PARTITION'].fields_by_name['id']._loaded_options = None
38
+ _globals['_PARTITION'].fields_by_name['id']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
39
+ _globals['_PARTITION'].fields_by_name['description']._loaded_options = None
40
+ _globals['_PARTITION'].fields_by_name['description']._serialized_options = b'\272H\005r\003\030\200\001'
41
+ _globals['_PARTITION'].fields_by_name['dns_server']._loaded_options = None
42
+ _globals['_PARTITION'].fields_by_name['dns_server']._serialized_options = b'\272H\005\222\001\002\020\003'
43
+ _globals['_PARTITION'].fields_by_name['ntp_server']._loaded_options = None
44
+ _globals['_PARTITION'].fields_by_name['ntp_server']._serialized_options = b'\272H\005\222\001\002\020\n'
45
+ _globals['_PARTITIONQUERY'].fields_by_name['id']._loaded_options = None
46
+ _globals['_PARTITIONQUERY'].fields_by_name['id']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
47
+ _globals['_PARTITIONBOOTCONFIGURATION'].fields_by_name['image_url']._loaded_options = None
48
+ _globals['_PARTITIONBOOTCONFIGURATION'].fields_by_name['image_url']._serialized_options = b'\272H5\272\0012\n\tvalid_url\022\027url must be a valid URI\032\014this.isUri()'
49
+ _globals['_PARTITIONBOOTCONFIGURATION'].fields_by_name['kernel_url']._loaded_options = None
50
+ _globals['_PARTITIONBOOTCONFIGURATION'].fields_by_name['kernel_url']._serialized_options = b'\272H5\272\0012\n\tvalid_url\022\027url must be a valid URI\032\014this.isUri()'
51
+ _globals['_DNSSERVER'].fields_by_name['ip']._loaded_options = None
52
+ _globals['_DNSSERVER'].fields_by_name['ip']._serialized_options = b'\272H\004r\002p\001'
53
+ _globals['_NTPSERVER'].fields_by_name['address']._loaded_options = None
54
+ _globals['_NTPSERVER'].fields_by_name['address']._serialized_options = b'\272H\005r\003\030\200\002'
55
+ _globals['_PARTITIONSERVICEGETREQUEST'].fields_by_name['id']._loaded_options = None
56
+ _globals['_PARTITIONSERVICEGETREQUEST'].fields_by_name['id']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
57
+ _globals['_PARTITIONSERVICE'].methods_by_name['Get']._loaded_options = None
58
+ _globals['_PARTITIONSERVICE'].methods_by_name['Get']._serialized_options = b'\330\363\030\003\340\363\030\002'
59
+ _globals['_PARTITIONSERVICE'].methods_by_name['List']._loaded_options = None
60
+ _globals['_PARTITIONSERVICE'].methods_by_name['List']._serialized_options = b'\330\363\030\003\340\363\030\002'
61
+ _globals['_PARTITION']._serialized_start=118
62
+ _globals['_PARTITION']._serialized_end=536
63
+ _globals['_PARTITIONQUERY']._serialized_start=538
64
+ _globals['_PARTITIONQUERY']._serialized_end=594
65
+ _globals['_PARTITIONBOOTCONFIGURATION']._serialized_start=597
66
+ _globals['_PARTITIONBOOTCONFIGURATION']._serialized_end=835
67
+ _globals['_DNSSERVER']._serialized_start=837
68
+ _globals['_DNSSERVER']._serialized_end=873
69
+ _globals['_NTPSERVER']._serialized_start=875
70
+ _globals['_NTPSERVER']._serialized_end=922
71
+ _globals['_PARTITIONSERVICEGETREQUEST']._serialized_start=924
72
+ _globals['_PARTITIONSERVICEGETREQUEST']._serialized_end=980
73
+ _globals['_PARTITIONSERVICELISTREQUEST']._serialized_start=982
74
+ _globals['_PARTITIONSERVICELISTREQUEST']._serialized_end=1068
75
+ _globals['_PARTITIONSERVICEGETRESPONSE']._serialized_start=1070
76
+ _globals['_PARTITIONSERVICEGETRESPONSE']._serialized_end=1159
77
+ _globals['_PARTITIONSERVICELISTRESPONSE']._serialized_start=1161
78
+ _globals['_PARTITIONSERVICELISTRESPONSE']._serialized_end=1253
79
+ _globals['_PARTITIONSERVICE']._serialized_start=1256
80
+ _globals['_PARTITIONSERVICE']._serialized_end=1501
81
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,79 @@
1
+ from buf.validate import validate_pb2 as _validate_pb2
2
+ from metalstack.api.v2 import common_pb2 as _common_pb2
3
+ from google.protobuf.internal import containers as _containers
4
+ from google.protobuf import descriptor as _descriptor
5
+ from google.protobuf import message as _message
6
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
7
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
8
+
9
+ DESCRIPTOR: _descriptor.FileDescriptor
10
+
11
+ class Partition(_message.Message):
12
+ __slots__ = ("id", "meta", "description", "boot_configuration", "dns_server", "ntp_server", "mgmt_service_addresses")
13
+ ID_FIELD_NUMBER: _ClassVar[int]
14
+ META_FIELD_NUMBER: _ClassVar[int]
15
+ DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
16
+ BOOT_CONFIGURATION_FIELD_NUMBER: _ClassVar[int]
17
+ DNS_SERVER_FIELD_NUMBER: _ClassVar[int]
18
+ NTP_SERVER_FIELD_NUMBER: _ClassVar[int]
19
+ MGMT_SERVICE_ADDRESSES_FIELD_NUMBER: _ClassVar[int]
20
+ id: str
21
+ meta: _common_pb2.Meta
22
+ description: str
23
+ boot_configuration: PartitionBootConfiguration
24
+ dns_server: _containers.RepeatedCompositeFieldContainer[DNSServer]
25
+ ntp_server: _containers.RepeatedCompositeFieldContainer[NTPServer]
26
+ mgmt_service_addresses: _containers.RepeatedScalarFieldContainer[str]
27
+ def __init__(self, id: _Optional[str] = ..., meta: _Optional[_Union[_common_pb2.Meta, _Mapping]] = ..., description: _Optional[str] = ..., boot_configuration: _Optional[_Union[PartitionBootConfiguration, _Mapping]] = ..., dns_server: _Optional[_Iterable[_Union[DNSServer, _Mapping]]] = ..., ntp_server: _Optional[_Iterable[_Union[NTPServer, _Mapping]]] = ..., mgmt_service_addresses: _Optional[_Iterable[str]] = ...) -> None: ...
28
+
29
+ class PartitionQuery(_message.Message):
30
+ __slots__ = ("id",)
31
+ ID_FIELD_NUMBER: _ClassVar[int]
32
+ id: str
33
+ def __init__(self, id: _Optional[str] = ...) -> None: ...
34
+
35
+ class PartitionBootConfiguration(_message.Message):
36
+ __slots__ = ("image_url", "kernel_url", "commandline")
37
+ IMAGE_URL_FIELD_NUMBER: _ClassVar[int]
38
+ KERNEL_URL_FIELD_NUMBER: _ClassVar[int]
39
+ COMMANDLINE_FIELD_NUMBER: _ClassVar[int]
40
+ image_url: str
41
+ kernel_url: str
42
+ commandline: str
43
+ def __init__(self, image_url: _Optional[str] = ..., kernel_url: _Optional[str] = ..., commandline: _Optional[str] = ...) -> None: ...
44
+
45
+ class DNSServer(_message.Message):
46
+ __slots__ = ("ip",)
47
+ IP_FIELD_NUMBER: _ClassVar[int]
48
+ ip: str
49
+ def __init__(self, ip: _Optional[str] = ...) -> None: ...
50
+
51
+ class NTPServer(_message.Message):
52
+ __slots__ = ("address",)
53
+ ADDRESS_FIELD_NUMBER: _ClassVar[int]
54
+ address: str
55
+ def __init__(self, address: _Optional[str] = ...) -> None: ...
56
+
57
+ class PartitionServiceGetRequest(_message.Message):
58
+ __slots__ = ("id",)
59
+ ID_FIELD_NUMBER: _ClassVar[int]
60
+ id: str
61
+ def __init__(self, id: _Optional[str] = ...) -> None: ...
62
+
63
+ class PartitionServiceListRequest(_message.Message):
64
+ __slots__ = ("query",)
65
+ QUERY_FIELD_NUMBER: _ClassVar[int]
66
+ query: PartitionQuery
67
+ def __init__(self, query: _Optional[_Union[PartitionQuery, _Mapping]] = ...) -> None: ...
68
+
69
+ class PartitionServiceGetResponse(_message.Message):
70
+ __slots__ = ("partition",)
71
+ PARTITION_FIELD_NUMBER: _ClassVar[int]
72
+ partition: Partition
73
+ def __init__(self, partition: _Optional[_Union[Partition, _Mapping]] = ...) -> None: ...
74
+
75
+ class PartitionServiceListResponse(_message.Message):
76
+ __slots__ = ("partitions",)
77
+ PARTITIONS_FIELD_NUMBER: _ClassVar[int]
78
+ partitions: _containers.RepeatedCompositeFieldContainer[Partition]
79
+ def __init__(self, partitions: _Optional[_Iterable[_Union[Partition, _Mapping]]] = ...) -> None: ...