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,257 @@
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.admin.v2 import network_pb2 as metalstack_dot_admin_dot_v2_dot_network__pb2
6
+
7
+
8
+ class NetworkServiceStub(object):
9
+ """NetworkService serves network address related functions
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.admin.v2.NetworkService/Get',
20
+ request_serializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceGetRequest.SerializeToString,
21
+ response_deserializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceGetResponse.FromString,
22
+ _registered_method=True)
23
+ self.Create = channel.unary_unary(
24
+ '/metalstack.admin.v2.NetworkService/Create',
25
+ request_serializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceCreateRequest.SerializeToString,
26
+ response_deserializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceCreateResponse.FromString,
27
+ _registered_method=True)
28
+ self.Update = channel.unary_unary(
29
+ '/metalstack.admin.v2.NetworkService/Update',
30
+ request_serializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceUpdateRequest.SerializeToString,
31
+ response_deserializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceUpdateResponse.FromString,
32
+ _registered_method=True)
33
+ self.Delete = channel.unary_unary(
34
+ '/metalstack.admin.v2.NetworkService/Delete',
35
+ request_serializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceDeleteRequest.SerializeToString,
36
+ response_deserializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceDeleteResponse.FromString,
37
+ _registered_method=True)
38
+ self.List = channel.unary_unary(
39
+ '/metalstack.admin.v2.NetworkService/List',
40
+ request_serializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceListRequest.SerializeToString,
41
+ response_deserializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceListResponse.FromString,
42
+ _registered_method=True)
43
+
44
+
45
+ class NetworkServiceServicer(object):
46
+ """NetworkService serves network address related functions
47
+ """
48
+
49
+ def Get(self, request, context):
50
+ """Get a network
51
+ """
52
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
53
+ context.set_details('Method not implemented!')
54
+ raise NotImplementedError('Method not implemented!')
55
+
56
+ def Create(self, request, context):
57
+ """Create a network
58
+ """
59
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
60
+ context.set_details('Method not implemented!')
61
+ raise NotImplementedError('Method not implemented!')
62
+
63
+ def Update(self, request, context):
64
+ """Update a network
65
+ """
66
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
67
+ context.set_details('Method not implemented!')
68
+ raise NotImplementedError('Method not implemented!')
69
+
70
+ def Delete(self, request, context):
71
+ """Delete a network
72
+ """
73
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
74
+ context.set_details('Method not implemented!')
75
+ raise NotImplementedError('Method not implemented!')
76
+
77
+ def List(self, request, context):
78
+ """List all networks
79
+ """
80
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
81
+ context.set_details('Method not implemented!')
82
+ raise NotImplementedError('Method not implemented!')
83
+
84
+
85
+ def add_NetworkServiceServicer_to_server(servicer, server):
86
+ rpc_method_handlers = {
87
+ 'Get': grpc.unary_unary_rpc_method_handler(
88
+ servicer.Get,
89
+ request_deserializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceGetRequest.FromString,
90
+ response_serializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceGetResponse.SerializeToString,
91
+ ),
92
+ 'Create': grpc.unary_unary_rpc_method_handler(
93
+ servicer.Create,
94
+ request_deserializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceCreateRequest.FromString,
95
+ response_serializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceCreateResponse.SerializeToString,
96
+ ),
97
+ 'Update': grpc.unary_unary_rpc_method_handler(
98
+ servicer.Update,
99
+ request_deserializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceUpdateRequest.FromString,
100
+ response_serializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceUpdateResponse.SerializeToString,
101
+ ),
102
+ 'Delete': grpc.unary_unary_rpc_method_handler(
103
+ servicer.Delete,
104
+ request_deserializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceDeleteRequest.FromString,
105
+ response_serializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceDeleteResponse.SerializeToString,
106
+ ),
107
+ 'List': grpc.unary_unary_rpc_method_handler(
108
+ servicer.List,
109
+ request_deserializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceListRequest.FromString,
110
+ response_serializer=metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceListResponse.SerializeToString,
111
+ ),
112
+ }
113
+ generic_handler = grpc.method_handlers_generic_handler(
114
+ 'metalstack.admin.v2.NetworkService', rpc_method_handlers)
115
+ server.add_generic_rpc_handlers((generic_handler,))
116
+ server.add_registered_method_handlers('metalstack.admin.v2.NetworkService', rpc_method_handlers)
117
+
118
+
119
+ # This class is part of an EXPERIMENTAL API.
120
+ class NetworkService(object):
121
+ """NetworkService serves network address related functions
122
+ """
123
+
124
+ @staticmethod
125
+ def Get(request,
126
+ target,
127
+ options=(),
128
+ channel_credentials=None,
129
+ call_credentials=None,
130
+ insecure=False,
131
+ compression=None,
132
+ wait_for_ready=None,
133
+ timeout=None,
134
+ metadata=None):
135
+ return grpc.experimental.unary_unary(
136
+ request,
137
+ target,
138
+ '/metalstack.admin.v2.NetworkService/Get',
139
+ metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceGetRequest.SerializeToString,
140
+ metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceGetResponse.FromString,
141
+ options,
142
+ channel_credentials,
143
+ insecure,
144
+ call_credentials,
145
+ compression,
146
+ wait_for_ready,
147
+ timeout,
148
+ metadata,
149
+ _registered_method=True)
150
+
151
+ @staticmethod
152
+ def Create(request,
153
+ target,
154
+ options=(),
155
+ channel_credentials=None,
156
+ call_credentials=None,
157
+ insecure=False,
158
+ compression=None,
159
+ wait_for_ready=None,
160
+ timeout=None,
161
+ metadata=None):
162
+ return grpc.experimental.unary_unary(
163
+ request,
164
+ target,
165
+ '/metalstack.admin.v2.NetworkService/Create',
166
+ metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceCreateRequest.SerializeToString,
167
+ metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceCreateResponse.FromString,
168
+ options,
169
+ channel_credentials,
170
+ insecure,
171
+ call_credentials,
172
+ compression,
173
+ wait_for_ready,
174
+ timeout,
175
+ metadata,
176
+ _registered_method=True)
177
+
178
+ @staticmethod
179
+ def Update(request,
180
+ target,
181
+ options=(),
182
+ channel_credentials=None,
183
+ call_credentials=None,
184
+ insecure=False,
185
+ compression=None,
186
+ wait_for_ready=None,
187
+ timeout=None,
188
+ metadata=None):
189
+ return grpc.experimental.unary_unary(
190
+ request,
191
+ target,
192
+ '/metalstack.admin.v2.NetworkService/Update',
193
+ metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceUpdateRequest.SerializeToString,
194
+ metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceUpdateResponse.FromString,
195
+ options,
196
+ channel_credentials,
197
+ insecure,
198
+ call_credentials,
199
+ compression,
200
+ wait_for_ready,
201
+ timeout,
202
+ metadata,
203
+ _registered_method=True)
204
+
205
+ @staticmethod
206
+ def Delete(request,
207
+ target,
208
+ options=(),
209
+ channel_credentials=None,
210
+ call_credentials=None,
211
+ insecure=False,
212
+ compression=None,
213
+ wait_for_ready=None,
214
+ timeout=None,
215
+ metadata=None):
216
+ return grpc.experimental.unary_unary(
217
+ request,
218
+ target,
219
+ '/metalstack.admin.v2.NetworkService/Delete',
220
+ metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceDeleteRequest.SerializeToString,
221
+ metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceDeleteResponse.FromString,
222
+ options,
223
+ channel_credentials,
224
+ insecure,
225
+ call_credentials,
226
+ compression,
227
+ wait_for_ready,
228
+ timeout,
229
+ metadata,
230
+ _registered_method=True)
231
+
232
+ @staticmethod
233
+ def List(request,
234
+ target,
235
+ options=(),
236
+ channel_credentials=None,
237
+ call_credentials=None,
238
+ insecure=False,
239
+ compression=None,
240
+ wait_for_ready=None,
241
+ timeout=None,
242
+ metadata=None):
243
+ return grpc.experimental.unary_unary(
244
+ request,
245
+ target,
246
+ '/metalstack.admin.v2.NetworkService/List',
247
+ metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceListRequest.SerializeToString,
248
+ metalstack_dot_admin_dot_v2_dot_network__pb2.NetworkServiceListResponse.FromString,
249
+ options,
250
+ channel_credentials,
251
+ insecure,
252
+ call_credentials,
253
+ compression,
254
+ wait_for_ready,
255
+ timeout,
256
+ metadata,
257
+ _registered_method=True)
@@ -0,0 +1,270 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by https://github.com/i2y/connecpy/protoc-gen-connecpy. DO NOT EDIT!
3
+ # source: metalstack/admin/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.admin.v2.partition_pb2 as metalstack_dot_admin_dot_v2_dot_partition__pb2
15
+
16
+
17
+ class PartitionService(Protocol):
18
+ async def Create(self, req: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateRequest, ctx: ServiceContext) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse: ...
19
+ async def Update(self, req: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateRequest, ctx: ServiceContext) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse: ...
20
+ async def Delete(self, req: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteRequest, ctx: ServiceContext) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse: ...
21
+ async def Capacity(self, req: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityRequest, ctx: ServiceContext) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse: ...
22
+
23
+
24
+ class PartitionServiceServer(ConnecpyServer):
25
+ def __init__(self, *, service: PartitionService, server_path_prefix=""):
26
+ super().__init__()
27
+ self._prefix = f"{server_path_prefix}/metalstack.admin.v2.PartitionService"
28
+ self._endpoints = {
29
+ "Create": Endpoint[metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateRequest, metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse](
30
+ service_name="PartitionService",
31
+ name="Create",
32
+ function=getattr(service, "Create"),
33
+ input=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateRequest,
34
+ output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse,
35
+ allowed_methods=("POST",),
36
+ ),
37
+ "Update": Endpoint[metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateRequest, metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse](
38
+ service_name="PartitionService",
39
+ name="Update",
40
+ function=getattr(service, "Update"),
41
+ input=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateRequest,
42
+ output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse,
43
+ allowed_methods=("POST",),
44
+ ),
45
+ "Delete": Endpoint[metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteRequest, metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse](
46
+ service_name="PartitionService",
47
+ name="Delete",
48
+ function=getattr(service, "Delete"),
49
+ input=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteRequest,
50
+ output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse,
51
+ allowed_methods=("POST",),
52
+ ),
53
+ "Capacity": Endpoint[metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityRequest, metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse](
54
+ service_name="PartitionService",
55
+ name="Capacity",
56
+ function=getattr(service, "Capacity"),
57
+ input=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityRequest,
58
+ output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse,
59
+ allowed_methods=("POST",),
60
+ ),
61
+ }
62
+
63
+ def serviceName(self):
64
+ return "metalstack.admin.v2.PartitionService"
65
+
66
+
67
+ class PartitionServiceSync(Protocol):
68
+ def Create(self, req: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateRequest, ctx: ServiceContext) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse: ...
69
+ def Update(self, req: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateRequest, ctx: ServiceContext) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse: ...
70
+ def Delete(self, req: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteRequest, ctx: ServiceContext) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse: ...
71
+ def Capacity(self, req: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityRequest, ctx: ServiceContext) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse: ...
72
+
73
+
74
+ class PartitionServiceServerSync(ConnecpyServer):
75
+ def __init__(self, *, service: PartitionServiceSync, server_path_prefix=""):
76
+ super().__init__()
77
+ self._prefix = f"{server_path_prefix}/metalstack.admin.v2.PartitionService"
78
+ self._endpoints = {
79
+ "Create": Endpoint[metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateRequest, metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse](
80
+ service_name="PartitionService",
81
+ name="Create",
82
+ function=getattr(service, "Create"),
83
+ input=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateRequest,
84
+ output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse,
85
+ allowed_methods=("POST",),
86
+ ),
87
+ "Update": Endpoint[metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateRequest, metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse](
88
+ service_name="PartitionService",
89
+ name="Update",
90
+ function=getattr(service, "Update"),
91
+ input=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateRequest,
92
+ output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse,
93
+ allowed_methods=("POST",),
94
+ ),
95
+ "Delete": Endpoint[metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteRequest, metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse](
96
+ service_name="PartitionService",
97
+ name="Delete",
98
+ function=getattr(service, "Delete"),
99
+ input=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteRequest,
100
+ output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse,
101
+ allowed_methods=("POST",),
102
+ ),
103
+ "Capacity": Endpoint[metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityRequest, metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse](
104
+ service_name="PartitionService",
105
+ name="Capacity",
106
+ function=getattr(service, "Capacity"),
107
+ input=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityRequest,
108
+ output=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse,
109
+ allowed_methods=("POST",),
110
+ ),
111
+ }
112
+
113
+ def serviceName(self):
114
+ return "metalstack.admin.v2.PartitionService"
115
+
116
+
117
+ class PartitionServiceClient(ConnecpyClient):
118
+ def Create(
119
+ self,
120
+ request: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateRequest,
121
+ *,
122
+ ctx: Optional[ClientContext] = None,
123
+ server_path_prefix: str = "",
124
+ **kwargs,
125
+ ) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse:
126
+ method = "POST"
127
+ return self._make_request(
128
+ url=f"{server_path_prefix}/metalstack.admin.v2.PartitionService/Create",
129
+ ctx=ctx,
130
+ request=request,
131
+ response_class=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse,
132
+ method=method,
133
+ **kwargs,
134
+ )
135
+
136
+ def Update(
137
+ self,
138
+ request: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateRequest,
139
+ *,
140
+ ctx: Optional[ClientContext] = None,
141
+ server_path_prefix: str = "",
142
+ **kwargs,
143
+ ) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse:
144
+ method = "POST"
145
+ return self._make_request(
146
+ url=f"{server_path_prefix}/metalstack.admin.v2.PartitionService/Update",
147
+ ctx=ctx,
148
+ request=request,
149
+ response_class=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse,
150
+ method=method,
151
+ **kwargs,
152
+ )
153
+
154
+ def Delete(
155
+ self,
156
+ request: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteRequest,
157
+ *,
158
+ ctx: Optional[ClientContext] = None,
159
+ server_path_prefix: str = "",
160
+ **kwargs,
161
+ ) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse:
162
+ method = "POST"
163
+ return self._make_request(
164
+ url=f"{server_path_prefix}/metalstack.admin.v2.PartitionService/Delete",
165
+ ctx=ctx,
166
+ request=request,
167
+ response_class=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse,
168
+ method=method,
169
+ **kwargs,
170
+ )
171
+
172
+ def Capacity(
173
+ self,
174
+ request: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityRequest,
175
+ *,
176
+ ctx: Optional[ClientContext] = None,
177
+ server_path_prefix: str = "",
178
+ **kwargs,
179
+ ) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse:
180
+ method = "POST"
181
+ return self._make_request(
182
+ url=f"{server_path_prefix}/metalstack.admin.v2.PartitionService/Capacity",
183
+ ctx=ctx,
184
+ request=request,
185
+ response_class=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse,
186
+ method=method,
187
+ **kwargs,
188
+ )
189
+
190
+
191
+ class AsyncPartitionServiceClient(AsyncConnecpyClient):
192
+ async def Create(
193
+ self,
194
+ request: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateRequest,
195
+ *,
196
+ ctx: Optional[ClientContext] = None,
197
+ server_path_prefix: str = "",
198
+ session: Union[httpx.AsyncClient, None] = None,
199
+ **kwargs,
200
+ ) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse:
201
+ method = "POST"
202
+ return await self._make_request(
203
+ url=f"{server_path_prefix}/metalstack.admin.v2.PartitionService/Create",
204
+ ctx=ctx,
205
+ request=request,
206
+ response_class=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCreateResponse,
207
+ method=method,
208
+ session=session,
209
+ **kwargs,
210
+ )
211
+
212
+ async def Update(
213
+ self,
214
+ request: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateRequest,
215
+ *,
216
+ ctx: Optional[ClientContext] = None,
217
+ server_path_prefix: str = "",
218
+ session: Union[httpx.AsyncClient, None] = None,
219
+ **kwargs,
220
+ ) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse:
221
+ method = "POST"
222
+ return await self._make_request(
223
+ url=f"{server_path_prefix}/metalstack.admin.v2.PartitionService/Update",
224
+ ctx=ctx,
225
+ request=request,
226
+ response_class=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceUpdateResponse,
227
+ method=method,
228
+ session=session,
229
+ **kwargs,
230
+ )
231
+
232
+ async def Delete(
233
+ self,
234
+ request: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteRequest,
235
+ *,
236
+ ctx: Optional[ClientContext] = None,
237
+ server_path_prefix: str = "",
238
+ session: Union[httpx.AsyncClient, None] = None,
239
+ **kwargs,
240
+ ) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse:
241
+ method = "POST"
242
+ return await self._make_request(
243
+ url=f"{server_path_prefix}/metalstack.admin.v2.PartitionService/Delete",
244
+ ctx=ctx,
245
+ request=request,
246
+ response_class=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceDeleteResponse,
247
+ method=method,
248
+ session=session,
249
+ **kwargs,
250
+ )
251
+
252
+ async def Capacity(
253
+ self,
254
+ request: metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityRequest,
255
+ *,
256
+ ctx: Optional[ClientContext] = None,
257
+ server_path_prefix: str = "",
258
+ session: Union[httpx.AsyncClient, None] = None,
259
+ **kwargs,
260
+ ) -> metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse:
261
+ method = "POST"
262
+ return await self._make_request(
263
+ url=f"{server_path_prefix}/metalstack.admin.v2.PartitionService/Capacity",
264
+ ctx=ctx,
265
+ request=request,
266
+ response_class=metalstack_dot_admin_dot_v2_dot_partition__pb2.PartitionServiceCapacityResponse,
267
+ method=method,
268
+ session=session,
269
+ **kwargs,
270
+ )
@@ -0,0 +1,72 @@
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/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/admin/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
+ from metalstack.api.v2 import partition_pb2 as metalstack_dot_api_dot_v2_dot_partition__pb2
28
+
29
+
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#metalstack/admin/v2/partition.proto\x12\x13metalstack.admin.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\x1a!metalstack/api/v2/partition.proto\"[\n\x1dPartitionServiceCreateRequest\x12:\n\tpartition\x18\x01 \x01(\x0b\x32\x1c.metalstack.api.v2.PartitionR\tpartition\"[\n\x1dPartitionServiceUpdateRequest\x12:\n\tpartition\x18\x01 \x01(\x0b\x32\x1c.metalstack.api.v2.PartitionR\tpartition\";\n\x1dPartitionServiceDeleteRequest\x12\x1a\n\x02id\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x02id\"\\\n\x1ePartitionServiceCreateResponse\x12:\n\tpartition\x18\x01 \x01(\x0b\x32\x1c.metalstack.api.v2.PartitionR\tpartition\"\\\n\x1ePartitionServiceUpdateResponse\x12:\n\tpartition\x18\x01 \x01(\x0b\x32\x1c.metalstack.api.v2.PartitionR\tpartition\"\\\n\x1ePartitionServiceDeleteResponse\x12:\n\tpartition\x18\x01 \x01(\x0b\x32\x1c.metalstack.api.v2.PartitionR\tpartition\"\xac\x01\n\x1fPartitionServiceCapacityRequest\x12\x1f\n\x02id\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x00R\x02id\x88\x01\x01\x12#\n\x04size\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x01R\x04size\x88\x01\x01\x12\'\n\x07project\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x02R\x07project\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_sizeB\n\n\x08_project\"\x83\x04\n PartitionServiceCapacityResponse\x12\x12\n\x04size\x18\x01 \x01(\tR\x04size\x12\x14\n\x05total\x18\x02 \x01(\x03R\x05total\x12\x1f\n\x0bphoned_home\x18\x03 \x01(\x03R\nphonedHome\x12\x18\n\x07waiting\x18\x04 \x01(\x03R\x07waiting\x12\x14\n\x05other\x18\x05 \x01(\x03R\x05other\x12%\n\x0eother_machines\x18\x06 \x03(\tR\rotherMachines\x12\x1c\n\tallocated\x18\x07 \x01(\x03R\tallocated\x12 \n\x0b\x61llocatable\x18\x08 \x01(\x03R\x0b\x61llocatable\x12\x12\n\x04\x66ree\x18\t \x01(\x03R\x04\x66ree\x12 \n\x0bunavailable\x18\n \x01(\x03R\x0bunavailable\x12\x16\n\x06\x66\x61ulty\x18\x0b \x01(\x03R\x06\x66\x61ulty\x12\'\n\x0f\x66\x61ulty_machines\x18\x0c \x03(\tR\x0e\x66\x61ultyMachines\x12\"\n\x0creservations\x18\r \x01(\x03R\x0creservations\x12+\n\x11used_reservations\x18\x0e \x01(\x03R\x10usedReservations\x12\x35\n\x16remaining_reservations\x18\x0f \x01(\x03R\x15remainingReservations2\x92\x04\n\x10PartitionService\x12|\n\x06\x43reate\x12\x32.metalstack.admin.v2.PartitionServiceCreateRequest\x1a\x33.metalstack.admin.v2.PartitionServiceCreateResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12|\n\x06Update\x12\x32.metalstack.admin.v2.PartitionServiceUpdateRequest\x1a\x33.metalstack.admin.v2.PartitionServiceUpdateResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12|\n\x06\x44\x65lete\x12\x32.metalstack.admin.v2.PartitionServiceDeleteRequest\x1a\x33.metalstack.admin.v2.PartitionServiceDeleteResponse\"\t\xd2\xf3\x18\x01\x01\xe0\xf3\x18\x01\x12\x83\x01\n\x08\x43\x61pacity\x12\x34.metalstack.admin.v2.PartitionServiceCapacityRequest\x1a\x35.metalstack.admin.v2.PartitionServiceCapacityResponse\"\n\xd2\xf3\x18\x02\x02\x01\xe0\xf3\x18\x02\x42\xd2\x01\n\x17\x63om.metalstack.admin.v2B\x0ePartitionProtoP\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.partition_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\016PartitionProtoP\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['_PARTITIONSERVICEDELETEREQUEST'].fields_by_name['id']._loaded_options = None
39
+ _globals['_PARTITIONSERVICEDELETEREQUEST'].fields_by_name['id']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
40
+ _globals['_PARTITIONSERVICECAPACITYREQUEST'].fields_by_name['id']._loaded_options = None
41
+ _globals['_PARTITIONSERVICECAPACITYREQUEST'].fields_by_name['id']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
42
+ _globals['_PARTITIONSERVICECAPACITYREQUEST'].fields_by_name['size']._loaded_options = None
43
+ _globals['_PARTITIONSERVICECAPACITYREQUEST'].fields_by_name['size']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
44
+ _globals['_PARTITIONSERVICECAPACITYREQUEST'].fields_by_name['project']._loaded_options = None
45
+ _globals['_PARTITIONSERVICECAPACITYREQUEST'].fields_by_name['project']._serialized_options = b'\272H\005r\003\260\001\001'
46
+ _globals['_PARTITIONSERVICE'].methods_by_name['Create']._loaded_options = None
47
+ _globals['_PARTITIONSERVICE'].methods_by_name['Create']._serialized_options = b'\322\363\030\001\001\340\363\030\001'
48
+ _globals['_PARTITIONSERVICE'].methods_by_name['Update']._loaded_options = None
49
+ _globals['_PARTITIONSERVICE'].methods_by_name['Update']._serialized_options = b'\322\363\030\001\001\340\363\030\001'
50
+ _globals['_PARTITIONSERVICE'].methods_by_name['Delete']._loaded_options = None
51
+ _globals['_PARTITIONSERVICE'].methods_by_name['Delete']._serialized_options = b'\322\363\030\001\001\340\363\030\001'
52
+ _globals['_PARTITIONSERVICE'].methods_by_name['Capacity']._loaded_options = None
53
+ _globals['_PARTITIONSERVICE'].methods_by_name['Capacity']._serialized_options = b'\322\363\030\002\002\001\340\363\030\002'
54
+ _globals['_PARTITIONSERVICECREATEREQUEST']._serialized_start=156
55
+ _globals['_PARTITIONSERVICECREATEREQUEST']._serialized_end=247
56
+ _globals['_PARTITIONSERVICEUPDATEREQUEST']._serialized_start=249
57
+ _globals['_PARTITIONSERVICEUPDATEREQUEST']._serialized_end=340
58
+ _globals['_PARTITIONSERVICEDELETEREQUEST']._serialized_start=342
59
+ _globals['_PARTITIONSERVICEDELETEREQUEST']._serialized_end=401
60
+ _globals['_PARTITIONSERVICECREATERESPONSE']._serialized_start=403
61
+ _globals['_PARTITIONSERVICECREATERESPONSE']._serialized_end=495
62
+ _globals['_PARTITIONSERVICEUPDATERESPONSE']._serialized_start=497
63
+ _globals['_PARTITIONSERVICEUPDATERESPONSE']._serialized_end=589
64
+ _globals['_PARTITIONSERVICEDELETERESPONSE']._serialized_start=591
65
+ _globals['_PARTITIONSERVICEDELETERESPONSE']._serialized_end=683
66
+ _globals['_PARTITIONSERVICECAPACITYREQUEST']._serialized_start=686
67
+ _globals['_PARTITIONSERVICECAPACITYREQUEST']._serialized_end=858
68
+ _globals['_PARTITIONSERVICECAPACITYRESPONSE']._serialized_start=861
69
+ _globals['_PARTITIONSERVICECAPACITYRESPONSE']._serialized_end=1376
70
+ _globals['_PARTITIONSERVICE']._serialized_start=1379
71
+ _globals['_PARTITIONSERVICE']._serialized_end=1909
72
+ # @@protoc_insertion_point(module_scope)