metalstack.cloud 0.15.2__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 (111) 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. metalstack_cloud-0.15.2.dist-info/METADATA +26 -0
  7. metalstack_cloud-0.15.2.dist-info/RECORD +111 -0
  8. metalstack_cloud-0.15.2.dist-info/WHEEL +5 -0
  9. metalstack_cloud-0.15.2.dist-info/top_level.txt +2 -0
  10. metalstackcloud/__init__.py +0 -0
  11. metalstackcloud/admin/__init__.py +0 -0
  12. metalstackcloud/admin/v1/__init__.py +0 -0
  13. metalstackcloud/admin/v1/cluster_connecpy.py +214 -0
  14. metalstackcloud/admin/v1/cluster_pb2.py +70 -0
  15. metalstackcloud/admin/v1/cluster_pb2.pyi +93 -0
  16. metalstackcloud/admin/v1/cluster_pb2_grpc.py +169 -0
  17. metalstackcloud/admin/v1/machine_pb2.py +42 -0
  18. metalstackcloud/admin/v1/machine_pb2.pyi +76 -0
  19. metalstackcloud/admin/v1/machine_pb2_grpc.py +4 -0
  20. metalstackcloud/admin/v1/payment_connecpy.py +158 -0
  21. metalstackcloud/admin/v1/payment_pb2.py +51 -0
  22. metalstackcloud/admin/v1/payment_pb2.pyi +33 -0
  23. metalstackcloud/admin/v1/payment_pb2_grpc.py +125 -0
  24. metalstackcloud/admin/v1/project_connecpy.py +102 -0
  25. metalstackcloud/admin/v1/project_pb2.py +49 -0
  26. metalstackcloud/admin/v1/project_pb2.pyi +34 -0
  27. metalstackcloud/admin/v1/project_pb2_grpc.py +81 -0
  28. metalstackcloud/admin/v1/storage_connecpy.py +214 -0
  29. metalstackcloud/admin/v1/storage_pb2.py +75 -0
  30. metalstackcloud/admin/v1/storage_pb2.pyi +149 -0
  31. metalstackcloud/admin/v1/storage_pb2_grpc.py +169 -0
  32. metalstackcloud/admin/v1/tenant_connecpy.py +270 -0
  33. metalstackcloud/admin/v1/tenant_pb2.py +66 -0
  34. metalstackcloud/admin/v1/tenant_pb2.pyi +72 -0
  35. metalstackcloud/admin/v1/tenant_pb2_grpc.py +213 -0
  36. metalstackcloud/admin/v1/token_connecpy.py +158 -0
  37. metalstackcloud/admin/v1/token_pb2.py +56 -0
  38. metalstackcloud/admin/v1/token_pb2.pyi +34 -0
  39. metalstackcloud/admin/v1/token_pb2_grpc.py +125 -0
  40. metalstackcloud/api/__init__.py +0 -0
  41. metalstackcloud/api/v1/__init__.py +0 -0
  42. metalstackcloud/api/v1/asset_connecpy.py +102 -0
  43. metalstackcloud/api/v1/asset_pb2.py +76 -0
  44. metalstackcloud/api/v1/asset_pb2.pyi +132 -0
  45. metalstackcloud/api/v1/asset_pb2_grpc.py +81 -0
  46. metalstackcloud/api/v1/audit_connecpy.py +158 -0
  47. metalstackcloud/api/v1/audit_pb2.py +84 -0
  48. metalstackcloud/api/v1/audit_pb2.pyi +95 -0
  49. metalstackcloud/api/v1/audit_pb2_grpc.py +125 -0
  50. metalstackcloud/api/v1/cluster_connecpy.py +494 -0
  51. metalstackcloud/api/v1/cluster_pb2.py +183 -0
  52. metalstackcloud/api/v1/cluster_pb2.pyi +311 -0
  53. metalstackcloud/api/v1/cluster_pb2_grpc.py +389 -0
  54. metalstackcloud/api/v1/common_pb2.py +52 -0
  55. metalstackcloud/api/v1/common_pb2.pyi +98 -0
  56. metalstackcloud/api/v1/common_pb2_grpc.py +4 -0
  57. metalstackcloud/api/v1/health_connecpy.py +102 -0
  58. metalstackcloud/api/v1/health_pb2.py +58 -0
  59. metalstackcloud/api/v1/health_pb2.pyi +74 -0
  60. metalstackcloud/api/v1/health_pb2_grpc.py +81 -0
  61. metalstackcloud/api/v1/ip_connecpy.py +326 -0
  62. metalstackcloud/api/v1/ip_pb2.py +110 -0
  63. metalstackcloud/api/v1/ip_pb2.pyi +122 -0
  64. metalstackcloud/api/v1/ip_pb2_grpc.py +257 -0
  65. metalstackcloud/api/v1/method_connecpy.py +158 -0
  66. metalstackcloud/api/v1/method_pb2.py +62 -0
  67. metalstackcloud/api/v1/method_pb2.pyi +50 -0
  68. metalstackcloud/api/v1/method_pb2_grpc.py +128 -0
  69. metalstackcloud/api/v1/payment_connecpy.py +550 -0
  70. metalstackcloud/api/v1/payment_pb2.py +134 -0
  71. metalstackcloud/api/v1/payment_pb2.pyi +291 -0
  72. metalstackcloud/api/v1/payment_pb2_grpc.py +433 -0
  73. metalstackcloud/api/v1/project_connecpy.py +718 -0
  74. metalstackcloud/api/v1/project_pb2.py +156 -0
  75. metalstackcloud/api/v1/project_pb2.pyi +234 -0
  76. metalstackcloud/api/v1/project_pb2_grpc.py +565 -0
  77. metalstackcloud/api/v1/snapshot_connecpy.py +214 -0
  78. metalstackcloud/api/v1/snapshot_pb2.py +75 -0
  79. metalstackcloud/api/v1/snapshot_pb2.pyi +109 -0
  80. metalstackcloud/api/v1/snapshot_pb2_grpc.py +169 -0
  81. metalstackcloud/api/v1/tenant_connecpy.py +774 -0
  82. metalstackcloud/api/v1/tenant_pb2.py +159 -0
  83. metalstackcloud/api/v1/tenant_pb2.pyi +305 -0
  84. metalstackcloud/api/v1/tenant_pb2_grpc.py +609 -0
  85. metalstackcloud/api/v1/token_connecpy.py +326 -0
  86. metalstackcloud/api/v1/token_pb2.py +131 -0
  87. metalstackcloud/api/v1/token_pb2.pyi +175 -0
  88. metalstackcloud/api/v1/token_pb2_grpc.py +257 -0
  89. metalstackcloud/api/v1/user_connecpy.py +102 -0
  90. metalstackcloud/api/v1/user_pb2.py +48 -0
  91. metalstackcloud/api/v1/user_pb2.pyi +42 -0
  92. metalstackcloud/api/v1/user_pb2_grpc.py +81 -0
  93. metalstackcloud/api/v1/version_connecpy.py +102 -0
  94. metalstackcloud/api/v1/version_pb2.py +46 -0
  95. metalstackcloud/api/v1/version_pb2.pyi +29 -0
  96. metalstackcloud/api/v1/version_pb2_grpc.py +81 -0
  97. metalstackcloud/api/v1/volume_connecpy.py +270 -0
  98. metalstackcloud/api/v1/volume_pb2.py +91 -0
  99. metalstackcloud/api/v1/volume_pb2.pyi +165 -0
  100. metalstackcloud/api/v1/volume_pb2_grpc.py +213 -0
  101. metalstackcloud/client.py +139 -0
  102. metalstackcloud/status/__init__.py +0 -0
  103. metalstackcloud/status/v1/__init__.py +0 -0
  104. metalstackcloud/status/v1/message_connecpy.py +102 -0
  105. metalstackcloud/status/v1/message_pb2.py +51 -0
  106. metalstackcloud/status/v1/message_pb2.pyi +65 -0
  107. metalstackcloud/status/v1/message_pb2_grpc.py +84 -0
  108. metalstackcloud/status/v1/status_connecpy.py +102 -0
  109. metalstackcloud/status/v1/status_pb2.py +45 -0
  110. metalstackcloud/status/v1/status_pb2.pyi +24 -0
  111. metalstackcloud/status/v1/status_pb2_grpc.py +84 -0
@@ -0,0 +1,214 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by https://github.com/i2y/connecpy/protoc-gen-connecpy. DO NOT EDIT!
3
+ # source: api/v1/snapshot.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 metalstackcloud.api.v1.snapshot_pb2 as api_dot_v1_dot_snapshot__pb2
15
+
16
+
17
+ class SnapshotService(Protocol):
18
+ async def Get(self, req: api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest, ctx: ServiceContext) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse: ...
19
+ async def List(self, req: api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest, ctx: ServiceContext) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse: ...
20
+ async def Delete(self, req: api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest, ctx: ServiceContext) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse: ...
21
+
22
+
23
+ class SnapshotServiceServer(ConnecpyServer):
24
+ def __init__(self, *, service: SnapshotService, server_path_prefix=""):
25
+ super().__init__()
26
+ self._prefix = f"{server_path_prefix}/api.v1.SnapshotService"
27
+ self._endpoints = {
28
+ "Get": Endpoint[api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest, api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse](
29
+ service_name="SnapshotService",
30
+ name="Get",
31
+ function=getattr(service, "Get"),
32
+ input=api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest,
33
+ output=api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse,
34
+ allowed_methods=("POST",),
35
+ ),
36
+ "List": Endpoint[api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest, api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse](
37
+ service_name="SnapshotService",
38
+ name="List",
39
+ function=getattr(service, "List"),
40
+ input=api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest,
41
+ output=api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse,
42
+ allowed_methods=("POST",),
43
+ ),
44
+ "Delete": Endpoint[api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest, api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse](
45
+ service_name="SnapshotService",
46
+ name="Delete",
47
+ function=getattr(service, "Delete"),
48
+ input=api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest,
49
+ output=api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse,
50
+ allowed_methods=("POST",),
51
+ ),
52
+ }
53
+
54
+ def serviceName(self):
55
+ return "api.v1.SnapshotService"
56
+
57
+
58
+ class SnapshotServiceSync(Protocol):
59
+ def Get(self, req: api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest, ctx: ServiceContext) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse: ...
60
+ def List(self, req: api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest, ctx: ServiceContext) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse: ...
61
+ def Delete(self, req: api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest, ctx: ServiceContext) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse: ...
62
+
63
+
64
+ class SnapshotServiceServerSync(ConnecpyServer):
65
+ def __init__(self, *, service: SnapshotServiceSync, server_path_prefix=""):
66
+ super().__init__()
67
+ self._prefix = f"{server_path_prefix}/api.v1.SnapshotService"
68
+ self._endpoints = {
69
+ "Get": Endpoint[api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest, api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse](
70
+ service_name="SnapshotService",
71
+ name="Get",
72
+ function=getattr(service, "Get"),
73
+ input=api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest,
74
+ output=api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse,
75
+ allowed_methods=("POST",),
76
+ ),
77
+ "List": Endpoint[api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest, api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse](
78
+ service_name="SnapshotService",
79
+ name="List",
80
+ function=getattr(service, "List"),
81
+ input=api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest,
82
+ output=api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse,
83
+ allowed_methods=("POST",),
84
+ ),
85
+ "Delete": Endpoint[api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest, api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse](
86
+ service_name="SnapshotService",
87
+ name="Delete",
88
+ function=getattr(service, "Delete"),
89
+ input=api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest,
90
+ output=api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse,
91
+ allowed_methods=("POST",),
92
+ ),
93
+ }
94
+
95
+ def serviceName(self):
96
+ return "api.v1.SnapshotService"
97
+
98
+
99
+ class SnapshotServiceClient(ConnecpyClient):
100
+ def Get(
101
+ self,
102
+ request: api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest,
103
+ *,
104
+ ctx: Optional[ClientContext] = None,
105
+ server_path_prefix: str = "",
106
+ **kwargs,
107
+ ) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse:
108
+ method = "POST"
109
+ return self._make_request(
110
+ url=f"{server_path_prefix}/api.v1.SnapshotService/Get",
111
+ ctx=ctx,
112
+ request=request,
113
+ response_class=api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse,
114
+ method=method,
115
+ **kwargs,
116
+ )
117
+
118
+ def List(
119
+ self,
120
+ request: api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest,
121
+ *,
122
+ ctx: Optional[ClientContext] = None,
123
+ server_path_prefix: str = "",
124
+ **kwargs,
125
+ ) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse:
126
+ method = "POST"
127
+ return self._make_request(
128
+ url=f"{server_path_prefix}/api.v1.SnapshotService/List",
129
+ ctx=ctx,
130
+ request=request,
131
+ response_class=api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse,
132
+ method=method,
133
+ **kwargs,
134
+ )
135
+
136
+ def Delete(
137
+ self,
138
+ request: api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest,
139
+ *,
140
+ ctx: Optional[ClientContext] = None,
141
+ server_path_prefix: str = "",
142
+ **kwargs,
143
+ ) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse:
144
+ method = "POST"
145
+ return self._make_request(
146
+ url=f"{server_path_prefix}/api.v1.SnapshotService/Delete",
147
+ ctx=ctx,
148
+ request=request,
149
+ response_class=api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse,
150
+ method=method,
151
+ **kwargs,
152
+ )
153
+
154
+
155
+ class AsyncSnapshotServiceClient(AsyncConnecpyClient):
156
+ async def Get(
157
+ self,
158
+ request: api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest,
159
+ *,
160
+ ctx: Optional[ClientContext] = None,
161
+ server_path_prefix: str = "",
162
+ session: Union[httpx.AsyncClient, None] = None,
163
+ **kwargs,
164
+ ) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse:
165
+ method = "POST"
166
+ return await self._make_request(
167
+ url=f"{server_path_prefix}/api.v1.SnapshotService/Get",
168
+ ctx=ctx,
169
+ request=request,
170
+ response_class=api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse,
171
+ method=method,
172
+ session=session,
173
+ **kwargs,
174
+ )
175
+
176
+ async def List(
177
+ self,
178
+ request: api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest,
179
+ *,
180
+ ctx: Optional[ClientContext] = None,
181
+ server_path_prefix: str = "",
182
+ session: Union[httpx.AsyncClient, None] = None,
183
+ **kwargs,
184
+ ) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse:
185
+ method = "POST"
186
+ return await self._make_request(
187
+ url=f"{server_path_prefix}/api.v1.SnapshotService/List",
188
+ ctx=ctx,
189
+ request=request,
190
+ response_class=api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse,
191
+ method=method,
192
+ session=session,
193
+ **kwargs,
194
+ )
195
+
196
+ async def Delete(
197
+ self,
198
+ request: api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest,
199
+ *,
200
+ ctx: Optional[ClientContext] = None,
201
+ server_path_prefix: str = "",
202
+ session: Union[httpx.AsyncClient, None] = None,
203
+ **kwargs,
204
+ ) -> api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse:
205
+ method = "POST"
206
+ return await self._make_request(
207
+ url=f"{server_path_prefix}/api.v1.SnapshotService/Delete",
208
+ ctx=ctx,
209
+ request=request,
210
+ response_class=api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse,
211
+ method=method,
212
+ session=session,
213
+ **kwargs,
214
+ )
@@ -0,0 +1,75 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: api/v1/snapshot.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
+ 'api/v1/snapshot.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from metalstackcloud.api.v1 import common_pb2 as api_dot_v1_dot_common__pb2
26
+ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
27
+ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
28
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
29
+
30
+
31
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x61pi/v1/snapshot.proto\x12\x06\x61pi.v1\x1a\x13\x61pi/v1/common.proto\x1a\x1b\x62uf/validate/validate.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\x04\n\x08Snapshot\x12\x12\n\x04uuid\x18\x01 \x01(\tR\x04uuid\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x18\n\x07project\x18\x04 \x01(\tR\x07project\x12\x1c\n\tpartition\x18\x05 \x01(\tR\tpartition\x12#\n\rstorage_class\x18\x06 \x01(\tR\x0cstorageClass\x12\x12\n\x04size\x18\x07 \x01(\x04R\x04size\x12\x14\n\x05usage\x18\x08 \x01(\x04R\x05usage\x12\x14\n\x05state\x18\t \x01(\tR\x05state\x12,\n\x12source_volume_uuid\x18\n \x01(\tR\x10sourceVolumeUuid\x12,\n\x12source_volume_name\x18\x0b \x01(\tR\x10sourceVolumeName\x12#\n\rreplica_count\x18\x0c \x01(\rR\x0creplicaCount\x12*\n\x11primary_node_uuid\x18\r \x01(\tR\x0fprimaryNodeUuid\x12\x37\n\tretention\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationR\tretention\x12:\n\nstatistics\x18\x0f \x01(\x0b\x32\x1a.api.v1.SnapshotStatisticsR\nstatistics\x12\x39\n\ncreated_at\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\"\xf9\x01\n\x12SnapshotStatistics\x12+\n\x11physical_capacity\x18\x01 \x01(\x04R\x10physicalCapacity\x12\x36\n\x17physical_owned_capacity\x18\x02 \x01(\x04R\x15physicalOwnedCapacity\x12\x32\n\x15physical_owned_memory\x18\x03 \x01(\x04R\x13physicalOwnedMemory\x12\'\n\x0fphysical_memory\x18\x04 \x01(\x04R\x0ephysicalMemory\x12!\n\x0cuser_written\x18\x05 \x01(\x04R\x0buserWritten\"_\n\x19SnapshotServiceGetRequest\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\x12$\n\x07project\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x07project\"\xc1\x01\n\x1aSnapshotServiceListRequest\x12!\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x04uuid\x88\x01\x01\x12$\n\x07project\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x07project\x12!\n\tpartition\x18\x03 \x01(\tH\x01R\tpartition\x88\x01\x01\x12\x17\n\x04name\x18\x04 \x01(\tH\x02R\x04name\x88\x01\x01\x42\x07\n\x05_uuidB\x0c\n\n_partitionB\x07\n\x05_name\"b\n\x1cSnapshotServiceDeleteRequest\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\x12$\n\x07project\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x07project\"J\n\x1aSnapshotServiceGetResponse\x12,\n\x08snapshot\x18\x01 \x01(\x0b\x32\x10.api.v1.SnapshotR\x08snapshot\"M\n\x1bSnapshotServiceListResponse\x12.\n\tsnapshots\x18\x01 \x03(\x0b\x32\x10.api.v1.SnapshotR\tsnapshots\"M\n\x1dSnapshotServiceDeleteResponse\x12,\n\x08snapshot\x18\x01 \x01(\x0b\x32\x10.api.v1.SnapshotR\x08snapshot2\xa9\x02\n\x0fSnapshotService\x12Y\n\x03Get\x12!.api.v1.SnapshotServiceGetRequest\x1a\".api.v1.SnapshotServiceGetResponse\"\x0b\xca\xf3\x18\x03\x01\x02\x03\xe8\xf3\x18\x02\x12\\\n\x04List\x12\".api.v1.SnapshotServiceListRequest\x1a#.api.v1.SnapshotServiceListResponse\"\x0b\xca\xf3\x18\x03\x01\x02\x03\xe8\xf3\x18\x02\x12]\n\x06\x44\x65lete\x12$.api.v1.SnapshotServiceDeleteRequest\x1a%.api.v1.SnapshotServiceDeleteResponse\"\x06\xca\xf3\x18\x02\x01\x02\x42\x86\x01\n\ncom.api.v1B\rSnapshotProtoP\x01Z0github.com/metal-stack-cloud/api/go/api/v1;apiv1\xa2\x02\x03\x41XX\xaa\x02\x06\x41pi.V1\xca\x02\x06\x41pi\\V1\xe2\x02\x12\x41pi\\V1\\GPBMetadata\xea\x02\x07\x41pi::V1b\x06proto3')
32
+
33
+ _globals = globals()
34
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
35
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'api.v1.snapshot_pb2', _globals)
36
+ if not _descriptor._USE_C_DESCRIPTORS:
37
+ _globals['DESCRIPTOR']._loaded_options = None
38
+ _globals['DESCRIPTOR']._serialized_options = b'\n\ncom.api.v1B\rSnapshotProtoP\001Z0github.com/metal-stack-cloud/api/go/api/v1;apiv1\242\002\003AXX\252\002\006Api.V1\312\002\006Api\\V1\342\002\022Api\\V1\\GPBMetadata\352\002\007Api::V1'
39
+ _globals['_SNAPSHOTSERVICEGETREQUEST'].fields_by_name['uuid']._loaded_options = None
40
+ _globals['_SNAPSHOTSERVICEGETREQUEST'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
41
+ _globals['_SNAPSHOTSERVICEGETREQUEST'].fields_by_name['project']._loaded_options = None
42
+ _globals['_SNAPSHOTSERVICEGETREQUEST'].fields_by_name['project']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
43
+ _globals['_SNAPSHOTSERVICELISTREQUEST'].fields_by_name['uuid']._loaded_options = None
44
+ _globals['_SNAPSHOTSERVICELISTREQUEST'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
45
+ _globals['_SNAPSHOTSERVICELISTREQUEST'].fields_by_name['project']._loaded_options = None
46
+ _globals['_SNAPSHOTSERVICELISTREQUEST'].fields_by_name['project']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
47
+ _globals['_SNAPSHOTSERVICEDELETEREQUEST'].fields_by_name['uuid']._loaded_options = None
48
+ _globals['_SNAPSHOTSERVICEDELETEREQUEST'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
49
+ _globals['_SNAPSHOTSERVICEDELETEREQUEST'].fields_by_name['project']._loaded_options = None
50
+ _globals['_SNAPSHOTSERVICEDELETEREQUEST'].fields_by_name['project']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
51
+ _globals['_SNAPSHOTSERVICE'].methods_by_name['Get']._loaded_options = None
52
+ _globals['_SNAPSHOTSERVICE'].methods_by_name['Get']._serialized_options = b'\312\363\030\003\001\002\003\350\363\030\002'
53
+ _globals['_SNAPSHOTSERVICE'].methods_by_name['List']._loaded_options = None
54
+ _globals['_SNAPSHOTSERVICE'].methods_by_name['List']._serialized_options = b'\312\363\030\003\001\002\003\350\363\030\002'
55
+ _globals['_SNAPSHOTSERVICE'].methods_by_name['Delete']._loaded_options = None
56
+ _globals['_SNAPSHOTSERVICE'].methods_by_name['Delete']._serialized_options = b'\312\363\030\002\001\002'
57
+ _globals['_SNAPSHOT']._serialized_start=149
58
+ _globals['_SNAPSHOT']._serialized_end=739
59
+ _globals['_SNAPSHOTSTATISTICS']._serialized_start=742
60
+ _globals['_SNAPSHOTSTATISTICS']._serialized_end=991
61
+ _globals['_SNAPSHOTSERVICEGETREQUEST']._serialized_start=993
62
+ _globals['_SNAPSHOTSERVICEGETREQUEST']._serialized_end=1088
63
+ _globals['_SNAPSHOTSERVICELISTREQUEST']._serialized_start=1091
64
+ _globals['_SNAPSHOTSERVICELISTREQUEST']._serialized_end=1284
65
+ _globals['_SNAPSHOTSERVICEDELETEREQUEST']._serialized_start=1286
66
+ _globals['_SNAPSHOTSERVICEDELETEREQUEST']._serialized_end=1384
67
+ _globals['_SNAPSHOTSERVICEGETRESPONSE']._serialized_start=1386
68
+ _globals['_SNAPSHOTSERVICEGETRESPONSE']._serialized_end=1460
69
+ _globals['_SNAPSHOTSERVICELISTRESPONSE']._serialized_start=1462
70
+ _globals['_SNAPSHOTSERVICELISTRESPONSE']._serialized_end=1539
71
+ _globals['_SNAPSHOTSERVICEDELETERESPONSE']._serialized_start=1541
72
+ _globals['_SNAPSHOTSERVICEDELETERESPONSE']._serialized_end=1618
73
+ _globals['_SNAPSHOTSERVICE']._serialized_start=1621
74
+ _globals['_SNAPSHOTSERVICE']._serialized_end=1918
75
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,109 @@
1
+ import datetime
2
+
3
+ from api.v1 import common_pb2 as _common_pb2
4
+ from buf.validate import validate_pb2 as _validate_pb2
5
+ from google.protobuf import duration_pb2 as _duration_pb2
6
+ from google.protobuf import timestamp_pb2 as _timestamp_pb2
7
+ from google.protobuf.internal import containers as _containers
8
+ from google.protobuf import descriptor as _descriptor
9
+ from google.protobuf import message as _message
10
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
11
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
12
+
13
+ DESCRIPTOR: _descriptor.FileDescriptor
14
+
15
+ class Snapshot(_message.Message):
16
+ __slots__ = ("uuid", "name", "description", "project", "partition", "storage_class", "size", "usage", "state", "source_volume_uuid", "source_volume_name", "replica_count", "primary_node_uuid", "retention", "statistics", "created_at")
17
+ UUID_FIELD_NUMBER: _ClassVar[int]
18
+ NAME_FIELD_NUMBER: _ClassVar[int]
19
+ DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
20
+ PROJECT_FIELD_NUMBER: _ClassVar[int]
21
+ PARTITION_FIELD_NUMBER: _ClassVar[int]
22
+ STORAGE_CLASS_FIELD_NUMBER: _ClassVar[int]
23
+ SIZE_FIELD_NUMBER: _ClassVar[int]
24
+ USAGE_FIELD_NUMBER: _ClassVar[int]
25
+ STATE_FIELD_NUMBER: _ClassVar[int]
26
+ SOURCE_VOLUME_UUID_FIELD_NUMBER: _ClassVar[int]
27
+ SOURCE_VOLUME_NAME_FIELD_NUMBER: _ClassVar[int]
28
+ REPLICA_COUNT_FIELD_NUMBER: _ClassVar[int]
29
+ PRIMARY_NODE_UUID_FIELD_NUMBER: _ClassVar[int]
30
+ RETENTION_FIELD_NUMBER: _ClassVar[int]
31
+ STATISTICS_FIELD_NUMBER: _ClassVar[int]
32
+ CREATED_AT_FIELD_NUMBER: _ClassVar[int]
33
+ uuid: str
34
+ name: str
35
+ description: str
36
+ project: str
37
+ partition: str
38
+ storage_class: str
39
+ size: int
40
+ usage: int
41
+ state: str
42
+ source_volume_uuid: str
43
+ source_volume_name: str
44
+ replica_count: int
45
+ primary_node_uuid: str
46
+ retention: _duration_pb2.Duration
47
+ statistics: SnapshotStatistics
48
+ created_at: _timestamp_pb2.Timestamp
49
+ def __init__(self, uuid: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., project: _Optional[str] = ..., partition: _Optional[str] = ..., storage_class: _Optional[str] = ..., size: _Optional[int] = ..., usage: _Optional[int] = ..., state: _Optional[str] = ..., source_volume_uuid: _Optional[str] = ..., source_volume_name: _Optional[str] = ..., replica_count: _Optional[int] = ..., primary_node_uuid: _Optional[str] = ..., retention: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., statistics: _Optional[_Union[SnapshotStatistics, _Mapping]] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
50
+
51
+ class SnapshotStatistics(_message.Message):
52
+ __slots__ = ("physical_capacity", "physical_owned_capacity", "physical_owned_memory", "physical_memory", "user_written")
53
+ PHYSICAL_CAPACITY_FIELD_NUMBER: _ClassVar[int]
54
+ PHYSICAL_OWNED_CAPACITY_FIELD_NUMBER: _ClassVar[int]
55
+ PHYSICAL_OWNED_MEMORY_FIELD_NUMBER: _ClassVar[int]
56
+ PHYSICAL_MEMORY_FIELD_NUMBER: _ClassVar[int]
57
+ USER_WRITTEN_FIELD_NUMBER: _ClassVar[int]
58
+ physical_capacity: int
59
+ physical_owned_capacity: int
60
+ physical_owned_memory: int
61
+ physical_memory: int
62
+ user_written: int
63
+ def __init__(self, physical_capacity: _Optional[int] = ..., physical_owned_capacity: _Optional[int] = ..., physical_owned_memory: _Optional[int] = ..., physical_memory: _Optional[int] = ..., user_written: _Optional[int] = ...) -> None: ...
64
+
65
+ class SnapshotServiceGetRequest(_message.Message):
66
+ __slots__ = ("uuid", "project")
67
+ UUID_FIELD_NUMBER: _ClassVar[int]
68
+ PROJECT_FIELD_NUMBER: _ClassVar[int]
69
+ uuid: str
70
+ project: str
71
+ def __init__(self, uuid: _Optional[str] = ..., project: _Optional[str] = ...) -> None: ...
72
+
73
+ class SnapshotServiceListRequest(_message.Message):
74
+ __slots__ = ("uuid", "project", "partition", "name")
75
+ UUID_FIELD_NUMBER: _ClassVar[int]
76
+ PROJECT_FIELD_NUMBER: _ClassVar[int]
77
+ PARTITION_FIELD_NUMBER: _ClassVar[int]
78
+ NAME_FIELD_NUMBER: _ClassVar[int]
79
+ uuid: str
80
+ project: str
81
+ partition: str
82
+ name: str
83
+ def __init__(self, uuid: _Optional[str] = ..., project: _Optional[str] = ..., partition: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
84
+
85
+ class SnapshotServiceDeleteRequest(_message.Message):
86
+ __slots__ = ("uuid", "project")
87
+ UUID_FIELD_NUMBER: _ClassVar[int]
88
+ PROJECT_FIELD_NUMBER: _ClassVar[int]
89
+ uuid: str
90
+ project: str
91
+ def __init__(self, uuid: _Optional[str] = ..., project: _Optional[str] = ...) -> None: ...
92
+
93
+ class SnapshotServiceGetResponse(_message.Message):
94
+ __slots__ = ("snapshot",)
95
+ SNAPSHOT_FIELD_NUMBER: _ClassVar[int]
96
+ snapshot: Snapshot
97
+ def __init__(self, snapshot: _Optional[_Union[Snapshot, _Mapping]] = ...) -> None: ...
98
+
99
+ class SnapshotServiceListResponse(_message.Message):
100
+ __slots__ = ("snapshots",)
101
+ SNAPSHOTS_FIELD_NUMBER: _ClassVar[int]
102
+ snapshots: _containers.RepeatedCompositeFieldContainer[Snapshot]
103
+ def __init__(self, snapshots: _Optional[_Iterable[_Union[Snapshot, _Mapping]]] = ...) -> None: ...
104
+
105
+ class SnapshotServiceDeleteResponse(_message.Message):
106
+ __slots__ = ("snapshot",)
107
+ SNAPSHOT_FIELD_NUMBER: _ClassVar[int]
108
+ snapshot: Snapshot
109
+ def __init__(self, snapshot: _Optional[_Union[Snapshot, _Mapping]] = ...) -> None: ...
@@ -0,0 +1,169 @@
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 metalstackcloud.api.v1 import snapshot_pb2 as api_dot_v1_dot_snapshot__pb2
6
+
7
+
8
+ class SnapshotServiceStub(object):
9
+ """SnapshotService serves snapshot 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
+ '/api.v1.SnapshotService/Get',
20
+ request_serializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest.SerializeToString,
21
+ response_deserializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse.FromString,
22
+ _registered_method=True)
23
+ self.List = channel.unary_unary(
24
+ '/api.v1.SnapshotService/List',
25
+ request_serializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest.SerializeToString,
26
+ response_deserializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse.FromString,
27
+ _registered_method=True)
28
+ self.Delete = channel.unary_unary(
29
+ '/api.v1.SnapshotService/Delete',
30
+ request_serializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest.SerializeToString,
31
+ response_deserializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse.FromString,
32
+ _registered_method=True)
33
+
34
+
35
+ class SnapshotServiceServicer(object):
36
+ """SnapshotService serves snapshot related functions
37
+ """
38
+
39
+ def Get(self, request, context):
40
+ """Get a snapshot
41
+ """
42
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
43
+ context.set_details('Method not implemented!')
44
+ raise NotImplementedError('Method not implemented!')
45
+
46
+ def List(self, request, context):
47
+ """List snapshots
48
+ """
49
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
50
+ context.set_details('Method not implemented!')
51
+ raise NotImplementedError('Method not implemented!')
52
+
53
+ def Delete(self, request, context):
54
+ """Delete a snapshot
55
+ """
56
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
57
+ context.set_details('Method not implemented!')
58
+ raise NotImplementedError('Method not implemented!')
59
+
60
+
61
+ def add_SnapshotServiceServicer_to_server(servicer, server):
62
+ rpc_method_handlers = {
63
+ 'Get': grpc.unary_unary_rpc_method_handler(
64
+ servicer.Get,
65
+ request_deserializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest.FromString,
66
+ response_serializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse.SerializeToString,
67
+ ),
68
+ 'List': grpc.unary_unary_rpc_method_handler(
69
+ servicer.List,
70
+ request_deserializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest.FromString,
71
+ response_serializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse.SerializeToString,
72
+ ),
73
+ 'Delete': grpc.unary_unary_rpc_method_handler(
74
+ servicer.Delete,
75
+ request_deserializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest.FromString,
76
+ response_serializer=api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse.SerializeToString,
77
+ ),
78
+ }
79
+ generic_handler = grpc.method_handlers_generic_handler(
80
+ 'api.v1.SnapshotService', rpc_method_handlers)
81
+ server.add_generic_rpc_handlers((generic_handler,))
82
+ server.add_registered_method_handlers('api.v1.SnapshotService', rpc_method_handlers)
83
+
84
+
85
+ # This class is part of an EXPERIMENTAL API.
86
+ class SnapshotService(object):
87
+ """SnapshotService serves snapshot related functions
88
+ """
89
+
90
+ @staticmethod
91
+ def Get(request,
92
+ target,
93
+ options=(),
94
+ channel_credentials=None,
95
+ call_credentials=None,
96
+ insecure=False,
97
+ compression=None,
98
+ wait_for_ready=None,
99
+ timeout=None,
100
+ metadata=None):
101
+ return grpc.experimental.unary_unary(
102
+ request,
103
+ target,
104
+ '/api.v1.SnapshotService/Get',
105
+ api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetRequest.SerializeToString,
106
+ api_dot_v1_dot_snapshot__pb2.SnapshotServiceGetResponse.FromString,
107
+ options,
108
+ channel_credentials,
109
+ insecure,
110
+ call_credentials,
111
+ compression,
112
+ wait_for_ready,
113
+ timeout,
114
+ metadata,
115
+ _registered_method=True)
116
+
117
+ @staticmethod
118
+ def List(request,
119
+ target,
120
+ options=(),
121
+ channel_credentials=None,
122
+ call_credentials=None,
123
+ insecure=False,
124
+ compression=None,
125
+ wait_for_ready=None,
126
+ timeout=None,
127
+ metadata=None):
128
+ return grpc.experimental.unary_unary(
129
+ request,
130
+ target,
131
+ '/api.v1.SnapshotService/List',
132
+ api_dot_v1_dot_snapshot__pb2.SnapshotServiceListRequest.SerializeToString,
133
+ api_dot_v1_dot_snapshot__pb2.SnapshotServiceListResponse.FromString,
134
+ options,
135
+ channel_credentials,
136
+ insecure,
137
+ call_credentials,
138
+ compression,
139
+ wait_for_ready,
140
+ timeout,
141
+ metadata,
142
+ _registered_method=True)
143
+
144
+ @staticmethod
145
+ def Delete(request,
146
+ target,
147
+ options=(),
148
+ channel_credentials=None,
149
+ call_credentials=None,
150
+ insecure=False,
151
+ compression=None,
152
+ wait_for_ready=None,
153
+ timeout=None,
154
+ metadata=None):
155
+ return grpc.experimental.unary_unary(
156
+ request,
157
+ target,
158
+ '/api.v1.SnapshotService/Delete',
159
+ api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteRequest.SerializeToString,
160
+ api_dot_v1_dot_snapshot__pb2.SnapshotServiceDeleteResponse.FromString,
161
+ options,
162
+ channel_credentials,
163
+ insecure,
164
+ call_credentials,
165
+ compression,
166
+ wait_for_ready,
167
+ timeout,
168
+ metadata,
169
+ _registered_method=True)