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,158 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by https://github.com/i2y/connecpy/protoc-gen-connecpy. DO NOT EDIT!
3
+ # source: metalstack/api/v2/size.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.size_pb2 as metalstack_dot_api_dot_v2_dot_size__pb2
15
+
16
+
17
+ class SizeService(Protocol):
18
+ async def Get(self, req: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse: ...
19
+ async def List(self, req: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse: ...
20
+
21
+
22
+ class SizeServiceServer(ConnecpyServer):
23
+ def __init__(self, *, service: SizeService, server_path_prefix=""):
24
+ super().__init__()
25
+ self._prefix = f"{server_path_prefix}/metalstack.api.v2.SizeService"
26
+ self._endpoints = {
27
+ "Get": Endpoint[metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest, metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse](
28
+ service_name="SizeService",
29
+ name="Get",
30
+ function=getattr(service, "Get"),
31
+ input=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest,
32
+ output=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse,
33
+ allowed_methods=("POST",),
34
+ ),
35
+ "List": Endpoint[metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest, metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse](
36
+ service_name="SizeService",
37
+ name="List",
38
+ function=getattr(service, "List"),
39
+ input=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest,
40
+ output=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse,
41
+ allowed_methods=("POST",),
42
+ ),
43
+ }
44
+
45
+ def serviceName(self):
46
+ return "metalstack.api.v2.SizeService"
47
+
48
+
49
+ class SizeServiceSync(Protocol):
50
+ def Get(self, req: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse: ...
51
+ def List(self, req: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse: ...
52
+
53
+
54
+ class SizeServiceServerSync(ConnecpyServer):
55
+ def __init__(self, *, service: SizeServiceSync, server_path_prefix=""):
56
+ super().__init__()
57
+ self._prefix = f"{server_path_prefix}/metalstack.api.v2.SizeService"
58
+ self._endpoints = {
59
+ "Get": Endpoint[metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest, metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse](
60
+ service_name="SizeService",
61
+ name="Get",
62
+ function=getattr(service, "Get"),
63
+ input=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest,
64
+ output=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse,
65
+ allowed_methods=("POST",),
66
+ ),
67
+ "List": Endpoint[metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest, metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse](
68
+ service_name="SizeService",
69
+ name="List",
70
+ function=getattr(service, "List"),
71
+ input=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest,
72
+ output=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse,
73
+ allowed_methods=("POST",),
74
+ ),
75
+ }
76
+
77
+ def serviceName(self):
78
+ return "metalstack.api.v2.SizeService"
79
+
80
+
81
+ class SizeServiceClient(ConnecpyClient):
82
+ def Get(
83
+ self,
84
+ request: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest,
85
+ *,
86
+ ctx: Optional[ClientContext] = None,
87
+ server_path_prefix: str = "",
88
+ **kwargs,
89
+ ) -> metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse:
90
+ method = "POST"
91
+ return self._make_request(
92
+ url=f"{server_path_prefix}/metalstack.api.v2.SizeService/Get",
93
+ ctx=ctx,
94
+ request=request,
95
+ response_class=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse,
96
+ method=method,
97
+ **kwargs,
98
+ )
99
+
100
+ def List(
101
+ self,
102
+ request: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest,
103
+ *,
104
+ ctx: Optional[ClientContext] = None,
105
+ server_path_prefix: str = "",
106
+ **kwargs,
107
+ ) -> metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse:
108
+ method = "POST"
109
+ return self._make_request(
110
+ url=f"{server_path_prefix}/metalstack.api.v2.SizeService/List",
111
+ ctx=ctx,
112
+ request=request,
113
+ response_class=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse,
114
+ method=method,
115
+ **kwargs,
116
+ )
117
+
118
+
119
+ class AsyncSizeServiceClient(AsyncConnecpyClient):
120
+ async def Get(
121
+ self,
122
+ request: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest,
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_size__pb2.SizeServiceGetResponse:
129
+ method = "POST"
130
+ return await self._make_request(
131
+ url=f"{server_path_prefix}/metalstack.api.v2.SizeService/Get",
132
+ ctx=ctx,
133
+ request=request,
134
+ response_class=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse,
135
+ method=method,
136
+ session=session,
137
+ **kwargs,
138
+ )
139
+
140
+ async def List(
141
+ self,
142
+ request: metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest,
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_size__pb2.SizeServiceListResponse:
149
+ method = "POST"
150
+ return await self._make_request(
151
+ url=f"{server_path_prefix}/metalstack.api.v2.SizeService/List",
152
+ ctx=ctx,
153
+ request=request,
154
+ response_class=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse,
155
+ method=method,
156
+ session=session,
157
+ **kwargs,
158
+ )
@@ -0,0 +1,85 @@
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/size.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/size.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\x1cmetalstack/api/v2/size.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emetalstack/api/v2/common.proto\"3\n\x15SizeServiceGetRequest\x12\x1a\n\x02id\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01R\x02id\"L\n\x16SizeServiceListRequest\x12\x32\n\x05query\x18\x01 \x01(\x0b\x32\x1c.metalstack.api.v2.SizeQueryR\x05query\"E\n\x16SizeServiceGetResponse\x12+\n\x04size\x18\x01 \x01(\x0b\x32\x17.metalstack.api.v2.SizeR\x04size\"H\n\x17SizeServiceListResponse\x12-\n\x05sizes\x18\x01 \x03(\x0b\x32\x17.metalstack.api.v2.SizeR\x05sizes\"\x85\x02\n\x04Size\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\x04name\x18\x04 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x00R\x04name\x88\x01\x01\x12\x31\n\x0b\x64\x65scription\x18\x05 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x01R\x0b\x64\x65scription\x88\x01\x01\x12\x43\n\x0b\x63onstraints\x18\x06 \x03(\x0b\x32!.metalstack.api.v2.SizeConstraintR\x0b\x63onstraintsB\x07\n\x05_nameB\x0e\n\x0c_description\"\xb9\x01\n\x0eSizeConstraint\x12\x43\n\x04type\x18\x01 \x01(\x0e\x32%.metalstack.api.v2.SizeConstraintTypeB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x04type\x12\x10\n\x03min\x18\x02 \x01(\x04R\x03min\x12\x10\n\x03max\x18\x03 \x01(\x04R\x03max\x12/\n\nidentifier\x18\x04 \x01(\tB\n\xbaH\x07r\x05\x10\x00\x18\x80\x01H\x00R\nidentifier\x88\x01\x01\x42\r\n\x0b_identifier\"\xd7\x01\n\tSizeQuery\x12\x1f\n\x02id\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x00R\x02id\x88\x01\x01\x12#\n\x04name\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x01R\x04name\x88\x01\x01\x12\x31\n\x0b\x64\x65scription\x18\x03 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x01H\x02R\x0b\x64\x65scription\x88\x01\x01\x12\x31\n\x06labels\x18\x04 \x01(\x0b\x32\x19.metalstack.api.v2.LabelsR\x06labelsB\x05\n\x03_idB\x07\n\x05_nameB\x0e\n\x0c_description*\xe8\x01\n\x12SizeConstraintType\x12$\n SIZE_CONSTRAINT_TYPE_UNSPECIFIED\x10\x00\x12)\n\x1aSIZE_CONSTRAINT_TYPE_CORES\x10\x01\x1a\t\x82\xb2\x19\x05\x63ores\x12+\n\x1bSIZE_CONSTRAINT_TYPE_MEMORY\x10\x02\x1a\n\x82\xb2\x19\x06memory\x12-\n\x1cSIZE_CONSTRAINT_TYPE_STORAGE\x10\x03\x1a\x0b\x82\xb2\x19\x07storage\x12%\n\x18SIZE_CONSTRAINT_TYPE_GPU\x10\x04\x1a\x07\x82\xb2\x19\x03gpu2\xdc\x01\n\x0bSizeService\x12\x64\n\x03Get\x12(.metalstack.api.v2.SizeServiceGetRequest\x1a).metalstack.api.v2.SizeServiceGetResponse\"\x08\xd8\xf3\x18\x03\xe0\xf3\x18\x02\x12g\n\x04List\x12).metalstack.api.v2.SizeServiceListRequest\x1a*.metalstack.api.v2.SizeServiceListResponse\"\x08\xd8\xf3\x18\x03\xe0\xf3\x18\x02\x42\xbf\x01\n\x15\x63om.metalstack.api.v2B\tSizeProtoP\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.size_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\tSizeProtoP\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['_SIZECONSTRAINTTYPE'].values_by_name["SIZE_CONSTRAINT_TYPE_CORES"]._loaded_options = None
38
+ _globals['_SIZECONSTRAINTTYPE'].values_by_name["SIZE_CONSTRAINT_TYPE_CORES"]._serialized_options = b'\202\262\031\005cores'
39
+ _globals['_SIZECONSTRAINTTYPE'].values_by_name["SIZE_CONSTRAINT_TYPE_MEMORY"]._loaded_options = None
40
+ _globals['_SIZECONSTRAINTTYPE'].values_by_name["SIZE_CONSTRAINT_TYPE_MEMORY"]._serialized_options = b'\202\262\031\006memory'
41
+ _globals['_SIZECONSTRAINTTYPE'].values_by_name["SIZE_CONSTRAINT_TYPE_STORAGE"]._loaded_options = None
42
+ _globals['_SIZECONSTRAINTTYPE'].values_by_name["SIZE_CONSTRAINT_TYPE_STORAGE"]._serialized_options = b'\202\262\031\007storage'
43
+ _globals['_SIZECONSTRAINTTYPE'].values_by_name["SIZE_CONSTRAINT_TYPE_GPU"]._loaded_options = None
44
+ _globals['_SIZECONSTRAINTTYPE'].values_by_name["SIZE_CONSTRAINT_TYPE_GPU"]._serialized_options = b'\202\262\031\003gpu'
45
+ _globals['_SIZESERVICEGETREQUEST'].fields_by_name['id']._loaded_options = None
46
+ _globals['_SIZESERVICEGETREQUEST'].fields_by_name['id']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
47
+ _globals['_SIZE'].fields_by_name['id']._loaded_options = None
48
+ _globals['_SIZE'].fields_by_name['id']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
49
+ _globals['_SIZE'].fields_by_name['name']._loaded_options = None
50
+ _globals['_SIZE'].fields_by_name['name']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
51
+ _globals['_SIZE'].fields_by_name['description']._loaded_options = None
52
+ _globals['_SIZE'].fields_by_name['description']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
53
+ _globals['_SIZECONSTRAINT'].fields_by_name['type']._loaded_options = None
54
+ _globals['_SIZECONSTRAINT'].fields_by_name['type']._serialized_options = b'\272H\005\202\001\002\020\001'
55
+ _globals['_SIZECONSTRAINT'].fields_by_name['identifier']._loaded_options = None
56
+ _globals['_SIZECONSTRAINT'].fields_by_name['identifier']._serialized_options = b'\272H\007r\005\020\000\030\200\001'
57
+ _globals['_SIZEQUERY'].fields_by_name['id']._loaded_options = None
58
+ _globals['_SIZEQUERY'].fields_by_name['id']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
59
+ _globals['_SIZEQUERY'].fields_by_name['name']._loaded_options = None
60
+ _globals['_SIZEQUERY'].fields_by_name['name']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
61
+ _globals['_SIZEQUERY'].fields_by_name['description']._loaded_options = None
62
+ _globals['_SIZEQUERY'].fields_by_name['description']._serialized_options = b'\272H\007r\005\020\002\030\200\001'
63
+ _globals['_SIZESERVICE'].methods_by_name['Get']._loaded_options = None
64
+ _globals['_SIZESERVICE'].methods_by_name['Get']._serialized_options = b'\330\363\030\003\340\363\030\002'
65
+ _globals['_SIZESERVICE'].methods_by_name['List']._loaded_options = None
66
+ _globals['_SIZESERVICE'].methods_by_name['List']._serialized_options = b'\330\363\030\003\340\363\030\002'
67
+ _globals['_SIZECONSTRAINTTYPE']._serialized_start=1059
68
+ _globals['_SIZECONSTRAINTTYPE']._serialized_end=1291
69
+ _globals['_SIZESERVICEGETREQUEST']._serialized_start=112
70
+ _globals['_SIZESERVICEGETREQUEST']._serialized_end=163
71
+ _globals['_SIZESERVICELISTREQUEST']._serialized_start=165
72
+ _globals['_SIZESERVICELISTREQUEST']._serialized_end=241
73
+ _globals['_SIZESERVICEGETRESPONSE']._serialized_start=243
74
+ _globals['_SIZESERVICEGETRESPONSE']._serialized_end=312
75
+ _globals['_SIZESERVICELISTRESPONSE']._serialized_start=314
76
+ _globals['_SIZESERVICELISTRESPONSE']._serialized_end=386
77
+ _globals['_SIZE']._serialized_start=389
78
+ _globals['_SIZE']._serialized_end=650
79
+ _globals['_SIZECONSTRAINT']._serialized_start=653
80
+ _globals['_SIZECONSTRAINT']._serialized_end=838
81
+ _globals['_SIZEQUERY']._serialized_start=841
82
+ _globals['_SIZEQUERY']._serialized_end=1056
83
+ _globals['_SIZESERVICE']._serialized_start=1294
84
+ _globals['_SIZESERVICE']._serialized_end=1514
85
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,85 @@
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.internal import enum_type_wrapper as _enum_type_wrapper
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
8
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
9
+
10
+ DESCRIPTOR: _descriptor.FileDescriptor
11
+
12
+ class SizeConstraintType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
13
+ __slots__ = ()
14
+ SIZE_CONSTRAINT_TYPE_UNSPECIFIED: _ClassVar[SizeConstraintType]
15
+ SIZE_CONSTRAINT_TYPE_CORES: _ClassVar[SizeConstraintType]
16
+ SIZE_CONSTRAINT_TYPE_MEMORY: _ClassVar[SizeConstraintType]
17
+ SIZE_CONSTRAINT_TYPE_STORAGE: _ClassVar[SizeConstraintType]
18
+ SIZE_CONSTRAINT_TYPE_GPU: _ClassVar[SizeConstraintType]
19
+ SIZE_CONSTRAINT_TYPE_UNSPECIFIED: SizeConstraintType
20
+ SIZE_CONSTRAINT_TYPE_CORES: SizeConstraintType
21
+ SIZE_CONSTRAINT_TYPE_MEMORY: SizeConstraintType
22
+ SIZE_CONSTRAINT_TYPE_STORAGE: SizeConstraintType
23
+ SIZE_CONSTRAINT_TYPE_GPU: SizeConstraintType
24
+
25
+ class SizeServiceGetRequest(_message.Message):
26
+ __slots__ = ("id",)
27
+ ID_FIELD_NUMBER: _ClassVar[int]
28
+ id: str
29
+ def __init__(self, id: _Optional[str] = ...) -> None: ...
30
+
31
+ class SizeServiceListRequest(_message.Message):
32
+ __slots__ = ("query",)
33
+ QUERY_FIELD_NUMBER: _ClassVar[int]
34
+ query: SizeQuery
35
+ def __init__(self, query: _Optional[_Union[SizeQuery, _Mapping]] = ...) -> None: ...
36
+
37
+ class SizeServiceGetResponse(_message.Message):
38
+ __slots__ = ("size",)
39
+ SIZE_FIELD_NUMBER: _ClassVar[int]
40
+ size: Size
41
+ def __init__(self, size: _Optional[_Union[Size, _Mapping]] = ...) -> None: ...
42
+
43
+ class SizeServiceListResponse(_message.Message):
44
+ __slots__ = ("sizes",)
45
+ SIZES_FIELD_NUMBER: _ClassVar[int]
46
+ sizes: _containers.RepeatedCompositeFieldContainer[Size]
47
+ def __init__(self, sizes: _Optional[_Iterable[_Union[Size, _Mapping]]] = ...) -> None: ...
48
+
49
+ class Size(_message.Message):
50
+ __slots__ = ("id", "meta", "name", "description", "constraints")
51
+ ID_FIELD_NUMBER: _ClassVar[int]
52
+ META_FIELD_NUMBER: _ClassVar[int]
53
+ NAME_FIELD_NUMBER: _ClassVar[int]
54
+ DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
55
+ CONSTRAINTS_FIELD_NUMBER: _ClassVar[int]
56
+ id: str
57
+ meta: _common_pb2.Meta
58
+ name: str
59
+ description: str
60
+ constraints: _containers.RepeatedCompositeFieldContainer[SizeConstraint]
61
+ def __init__(self, id: _Optional[str] = ..., meta: _Optional[_Union[_common_pb2.Meta, _Mapping]] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., constraints: _Optional[_Iterable[_Union[SizeConstraint, _Mapping]]] = ...) -> None: ...
62
+
63
+ class SizeConstraint(_message.Message):
64
+ __slots__ = ("type", "min", "max", "identifier")
65
+ TYPE_FIELD_NUMBER: _ClassVar[int]
66
+ MIN_FIELD_NUMBER: _ClassVar[int]
67
+ MAX_FIELD_NUMBER: _ClassVar[int]
68
+ IDENTIFIER_FIELD_NUMBER: _ClassVar[int]
69
+ type: SizeConstraintType
70
+ min: int
71
+ max: int
72
+ identifier: str
73
+ def __init__(self, type: _Optional[_Union[SizeConstraintType, str]] = ..., min: _Optional[int] = ..., max: _Optional[int] = ..., identifier: _Optional[str] = ...) -> None: ...
74
+
75
+ class SizeQuery(_message.Message):
76
+ __slots__ = ("id", "name", "description", "labels")
77
+ ID_FIELD_NUMBER: _ClassVar[int]
78
+ NAME_FIELD_NUMBER: _ClassVar[int]
79
+ DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
80
+ LABELS_FIELD_NUMBER: _ClassVar[int]
81
+ id: str
82
+ name: str
83
+ description: str
84
+ labels: _common_pb2.Labels
85
+ def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., labels: _Optional[_Union[_common_pb2.Labels, _Mapping]] = ...) -> None: ...
@@ -0,0 +1,125 @@
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 size_pb2 as metalstack_dot_api_dot_v2_dot_size__pb2
6
+
7
+
8
+ class SizeServiceStub(object):
9
+ """SizeService serves size 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.api.v2.SizeService/Get',
20
+ request_serializer=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest.SerializeToString,
21
+ response_deserializer=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse.FromString,
22
+ _registered_method=True)
23
+ self.List = channel.unary_unary(
24
+ '/metalstack.api.v2.SizeService/List',
25
+ request_serializer=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest.SerializeToString,
26
+ response_deserializer=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse.FromString,
27
+ _registered_method=True)
28
+
29
+
30
+ class SizeServiceServicer(object):
31
+ """SizeService serves size related functions
32
+ """
33
+
34
+ def Get(self, request, context):
35
+ """Get a size
36
+ """
37
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
38
+ context.set_details('Method not implemented!')
39
+ raise NotImplementedError('Method not implemented!')
40
+
41
+ def List(self, request, context):
42
+ """List all sizes
43
+ """
44
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
45
+ context.set_details('Method not implemented!')
46
+ raise NotImplementedError('Method not implemented!')
47
+
48
+
49
+ def add_SizeServiceServicer_to_server(servicer, server):
50
+ rpc_method_handlers = {
51
+ 'Get': grpc.unary_unary_rpc_method_handler(
52
+ servicer.Get,
53
+ request_deserializer=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest.FromString,
54
+ response_serializer=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse.SerializeToString,
55
+ ),
56
+ 'List': grpc.unary_unary_rpc_method_handler(
57
+ servicer.List,
58
+ request_deserializer=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest.FromString,
59
+ response_serializer=metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse.SerializeToString,
60
+ ),
61
+ }
62
+ generic_handler = grpc.method_handlers_generic_handler(
63
+ 'metalstack.api.v2.SizeService', rpc_method_handlers)
64
+ server.add_generic_rpc_handlers((generic_handler,))
65
+ server.add_registered_method_handlers('metalstack.api.v2.SizeService', rpc_method_handlers)
66
+
67
+
68
+ # This class is part of an EXPERIMENTAL API.
69
+ class SizeService(object):
70
+ """SizeService serves size related functions
71
+ """
72
+
73
+ @staticmethod
74
+ def Get(request,
75
+ target,
76
+ options=(),
77
+ channel_credentials=None,
78
+ call_credentials=None,
79
+ insecure=False,
80
+ compression=None,
81
+ wait_for_ready=None,
82
+ timeout=None,
83
+ metadata=None):
84
+ return grpc.experimental.unary_unary(
85
+ request,
86
+ target,
87
+ '/metalstack.api.v2.SizeService/Get',
88
+ metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetRequest.SerializeToString,
89
+ metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceGetResponse.FromString,
90
+ options,
91
+ channel_credentials,
92
+ insecure,
93
+ call_credentials,
94
+ compression,
95
+ wait_for_ready,
96
+ timeout,
97
+ metadata,
98
+ _registered_method=True)
99
+
100
+ @staticmethod
101
+ def List(request,
102
+ target,
103
+ options=(),
104
+ channel_credentials=None,
105
+ call_credentials=None,
106
+ insecure=False,
107
+ compression=None,
108
+ wait_for_ready=None,
109
+ timeout=None,
110
+ metadata=None):
111
+ return grpc.experimental.unary_unary(
112
+ request,
113
+ target,
114
+ '/metalstack.api.v2.SizeService/List',
115
+ metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListRequest.SerializeToString,
116
+ metalstack_dot_api_dot_v2_dot_size__pb2.SizeServiceListResponse.FromString,
117
+ options,
118
+ channel_credentials,
119
+ insecure,
120
+ call_credentials,
121
+ compression,
122
+ wait_for_ready,
123
+ timeout,
124
+ metadata,
125
+ _registered_method=True)