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,229 @@
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 LVMType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
13
+ __slots__ = ()
14
+ LVM_TYPE_UNSPECIFIED: _ClassVar[LVMType]
15
+ LVM_TYPE_LINEAR: _ClassVar[LVMType]
16
+ LVM_TYPE_STRIPED: _ClassVar[LVMType]
17
+ LVM_TYPE_RAID1: _ClassVar[LVMType]
18
+
19
+ class Format(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
20
+ __slots__ = ()
21
+ FORMAT_UNSPECIFIED: _ClassVar[Format]
22
+ FORMAT_VFAT: _ClassVar[Format]
23
+ FORMAT_EXT3: _ClassVar[Format]
24
+ FORMAT_EXT4: _ClassVar[Format]
25
+ FORMAT_SWAP: _ClassVar[Format]
26
+ FORMAT_TMPFS: _ClassVar[Format]
27
+ FORMAT_NONE: _ClassVar[Format]
28
+
29
+ class GPTType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
30
+ __slots__ = ()
31
+ GPT_TYPE_UNSPECIFIED: _ClassVar[GPTType]
32
+ GPT_TYPE_BOOT: _ClassVar[GPTType]
33
+ GPT_TYPE_LINUX: _ClassVar[GPTType]
34
+ GPT_TYPE_LINUX_RAID: _ClassVar[GPTType]
35
+ GPT_TYPE_LINUX_LVM: _ClassVar[GPTType]
36
+
37
+ class RaidLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
38
+ __slots__ = ()
39
+ RAID_LEVEL_UNSPECIFIED: _ClassVar[RaidLevel]
40
+ RAID_LEVEL_0: _ClassVar[RaidLevel]
41
+ RAID_LEVEL_1: _ClassVar[RaidLevel]
42
+ LVM_TYPE_UNSPECIFIED: LVMType
43
+ LVM_TYPE_LINEAR: LVMType
44
+ LVM_TYPE_STRIPED: LVMType
45
+ LVM_TYPE_RAID1: LVMType
46
+ FORMAT_UNSPECIFIED: Format
47
+ FORMAT_VFAT: Format
48
+ FORMAT_EXT3: Format
49
+ FORMAT_EXT4: Format
50
+ FORMAT_SWAP: Format
51
+ FORMAT_TMPFS: Format
52
+ FORMAT_NONE: Format
53
+ GPT_TYPE_UNSPECIFIED: GPTType
54
+ GPT_TYPE_BOOT: GPTType
55
+ GPT_TYPE_LINUX: GPTType
56
+ GPT_TYPE_LINUX_RAID: GPTType
57
+ GPT_TYPE_LINUX_LVM: GPTType
58
+ RAID_LEVEL_UNSPECIFIED: RaidLevel
59
+ RAID_LEVEL_0: RaidLevel
60
+ RAID_LEVEL_1: RaidLevel
61
+
62
+ class FilesystemServiceGetRequest(_message.Message):
63
+ __slots__ = ("id",)
64
+ ID_FIELD_NUMBER: _ClassVar[int]
65
+ id: str
66
+ def __init__(self, id: _Optional[str] = ...) -> None: ...
67
+
68
+ class FilesystemServiceListRequest(_message.Message):
69
+ __slots__ = ("id",)
70
+ ID_FIELD_NUMBER: _ClassVar[int]
71
+ id: str
72
+ def __init__(self, id: _Optional[str] = ...) -> None: ...
73
+
74
+ class FilesystemServiceGetResponse(_message.Message):
75
+ __slots__ = ("filesystem_layout",)
76
+ FILESYSTEM_LAYOUT_FIELD_NUMBER: _ClassVar[int]
77
+ filesystem_layout: FilesystemLayout
78
+ def __init__(self, filesystem_layout: _Optional[_Union[FilesystemLayout, _Mapping]] = ...) -> None: ...
79
+
80
+ class FilesystemServiceListResponse(_message.Message):
81
+ __slots__ = ("filesystem_layouts",)
82
+ FILESYSTEM_LAYOUTS_FIELD_NUMBER: _ClassVar[int]
83
+ filesystem_layouts: _containers.RepeatedCompositeFieldContainer[FilesystemLayout]
84
+ def __init__(self, filesystem_layouts: _Optional[_Iterable[_Union[FilesystemLayout, _Mapping]]] = ...) -> None: ...
85
+
86
+ class FilesystemServiceTryRequest(_message.Message):
87
+ __slots__ = ("size", "image")
88
+ SIZE_FIELD_NUMBER: _ClassVar[int]
89
+ IMAGE_FIELD_NUMBER: _ClassVar[int]
90
+ size: str
91
+ image: str
92
+ def __init__(self, size: _Optional[str] = ..., image: _Optional[str] = ...) -> None: ...
93
+
94
+ class FilesystemServiceMatchRequest(_message.Message):
95
+ __slots__ = ("machine", "filesystem_layout_id")
96
+ MACHINE_FIELD_NUMBER: _ClassVar[int]
97
+ FILESYSTEM_LAYOUT_ID_FIELD_NUMBER: _ClassVar[int]
98
+ machine: str
99
+ filesystem_layout_id: str
100
+ def __init__(self, machine: _Optional[str] = ..., filesystem_layout_id: _Optional[str] = ...) -> None: ...
101
+
102
+ class FilesystemServiceTryResponse(_message.Message):
103
+ __slots__ = ("filesystem_layout",)
104
+ FILESYSTEM_LAYOUT_FIELD_NUMBER: _ClassVar[int]
105
+ filesystem_layout: FilesystemLayout
106
+ def __init__(self, filesystem_layout: _Optional[_Union[FilesystemLayout, _Mapping]] = ...) -> None: ...
107
+
108
+ class FilesystemServiceMatchResponse(_message.Message):
109
+ __slots__ = ("filesystem_layout",)
110
+ FILESYSTEM_LAYOUT_FIELD_NUMBER: _ClassVar[int]
111
+ filesystem_layout: FilesystemLayout
112
+ def __init__(self, filesystem_layout: _Optional[_Union[FilesystemLayout, _Mapping]] = ...) -> None: ...
113
+
114
+ class FilesystemLayout(_message.Message):
115
+ __slots__ = ("id", "meta", "name", "description", "filesystems", "disks", "raid", "volume_groups", "logical_volumes", "constraints")
116
+ ID_FIELD_NUMBER: _ClassVar[int]
117
+ META_FIELD_NUMBER: _ClassVar[int]
118
+ NAME_FIELD_NUMBER: _ClassVar[int]
119
+ DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
120
+ FILESYSTEMS_FIELD_NUMBER: _ClassVar[int]
121
+ DISKS_FIELD_NUMBER: _ClassVar[int]
122
+ RAID_FIELD_NUMBER: _ClassVar[int]
123
+ VOLUME_GROUPS_FIELD_NUMBER: _ClassVar[int]
124
+ LOGICAL_VOLUMES_FIELD_NUMBER: _ClassVar[int]
125
+ CONSTRAINTS_FIELD_NUMBER: _ClassVar[int]
126
+ id: str
127
+ meta: _common_pb2.Meta
128
+ name: str
129
+ description: str
130
+ filesystems: _containers.RepeatedCompositeFieldContainer[Filesystem]
131
+ disks: _containers.RepeatedCompositeFieldContainer[Disk]
132
+ raid: _containers.RepeatedCompositeFieldContainer[Raid]
133
+ volume_groups: _containers.RepeatedCompositeFieldContainer[VolumeGroup]
134
+ logical_volumes: _containers.RepeatedCompositeFieldContainer[LogicalVolume]
135
+ constraints: FilesystemLayoutConstraints
136
+ def __init__(self, id: _Optional[str] = ..., meta: _Optional[_Union[_common_pb2.Meta, _Mapping]] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., filesystems: _Optional[_Iterable[_Union[Filesystem, _Mapping]]] = ..., disks: _Optional[_Iterable[_Union[Disk, _Mapping]]] = ..., raid: _Optional[_Iterable[_Union[Raid, _Mapping]]] = ..., volume_groups: _Optional[_Iterable[_Union[VolumeGroup, _Mapping]]] = ..., logical_volumes: _Optional[_Iterable[_Union[LogicalVolume, _Mapping]]] = ..., constraints: _Optional[_Union[FilesystemLayoutConstraints, _Mapping]] = ...) -> None: ...
137
+
138
+ class FilesystemLayoutConstraints(_message.Message):
139
+ __slots__ = ("sizes", "images")
140
+ class ImagesEntry(_message.Message):
141
+ __slots__ = ("key", "value")
142
+ KEY_FIELD_NUMBER: _ClassVar[int]
143
+ VALUE_FIELD_NUMBER: _ClassVar[int]
144
+ key: str
145
+ value: str
146
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
147
+ SIZES_FIELD_NUMBER: _ClassVar[int]
148
+ IMAGES_FIELD_NUMBER: _ClassVar[int]
149
+ sizes: _containers.RepeatedScalarFieldContainer[str]
150
+ images: _containers.ScalarMap[str, str]
151
+ def __init__(self, sizes: _Optional[_Iterable[str]] = ..., images: _Optional[_Mapping[str, str]] = ...) -> None: ...
152
+
153
+ class Filesystem(_message.Message):
154
+ __slots__ = ("device", "format", "name", "description", "path", "label", "mount_options", "create_options")
155
+ DEVICE_FIELD_NUMBER: _ClassVar[int]
156
+ FORMAT_FIELD_NUMBER: _ClassVar[int]
157
+ NAME_FIELD_NUMBER: _ClassVar[int]
158
+ DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
159
+ PATH_FIELD_NUMBER: _ClassVar[int]
160
+ LABEL_FIELD_NUMBER: _ClassVar[int]
161
+ MOUNT_OPTIONS_FIELD_NUMBER: _ClassVar[int]
162
+ CREATE_OPTIONS_FIELD_NUMBER: _ClassVar[int]
163
+ device: str
164
+ format: Format
165
+ name: str
166
+ description: str
167
+ path: str
168
+ label: str
169
+ mount_options: _containers.RepeatedScalarFieldContainer[str]
170
+ create_options: _containers.RepeatedScalarFieldContainer[str]
171
+ def __init__(self, device: _Optional[str] = ..., format: _Optional[_Union[Format, str]] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., path: _Optional[str] = ..., label: _Optional[str] = ..., mount_options: _Optional[_Iterable[str]] = ..., create_options: _Optional[_Iterable[str]] = ...) -> None: ...
172
+
173
+ class Disk(_message.Message):
174
+ __slots__ = ("device", "partitions", "wipe_on_reinstall")
175
+ DEVICE_FIELD_NUMBER: _ClassVar[int]
176
+ PARTITIONS_FIELD_NUMBER: _ClassVar[int]
177
+ WIPE_ON_REINSTALL_FIELD_NUMBER: _ClassVar[int]
178
+ device: str
179
+ partitions: _containers.RepeatedCompositeFieldContainer[DiskPartition]
180
+ wipe_on_reinstall: bool
181
+ def __init__(self, device: _Optional[str] = ..., partitions: _Optional[_Iterable[_Union[DiskPartition, _Mapping]]] = ..., wipe_on_reinstall: bool = ...) -> None: ...
182
+
183
+ class Raid(_message.Message):
184
+ __slots__ = ("array_name", "devices", "level", "create_options", "spares")
185
+ ARRAY_NAME_FIELD_NUMBER: _ClassVar[int]
186
+ DEVICES_FIELD_NUMBER: _ClassVar[int]
187
+ LEVEL_FIELD_NUMBER: _ClassVar[int]
188
+ CREATE_OPTIONS_FIELD_NUMBER: _ClassVar[int]
189
+ SPARES_FIELD_NUMBER: _ClassVar[int]
190
+ array_name: str
191
+ devices: _containers.RepeatedScalarFieldContainer[str]
192
+ level: RaidLevel
193
+ create_options: _containers.RepeatedScalarFieldContainer[str]
194
+ spares: int
195
+ def __init__(self, array_name: _Optional[str] = ..., devices: _Optional[_Iterable[str]] = ..., level: _Optional[_Union[RaidLevel, str]] = ..., create_options: _Optional[_Iterable[str]] = ..., spares: _Optional[int] = ...) -> None: ...
196
+
197
+ class DiskPartition(_message.Message):
198
+ __slots__ = ("number", "label", "size", "gpt_type")
199
+ NUMBER_FIELD_NUMBER: _ClassVar[int]
200
+ LABEL_FIELD_NUMBER: _ClassVar[int]
201
+ SIZE_FIELD_NUMBER: _ClassVar[int]
202
+ GPT_TYPE_FIELD_NUMBER: _ClassVar[int]
203
+ number: int
204
+ label: str
205
+ size: int
206
+ gpt_type: GPTType
207
+ def __init__(self, number: _Optional[int] = ..., label: _Optional[str] = ..., size: _Optional[int] = ..., gpt_type: _Optional[_Union[GPTType, str]] = ...) -> None: ...
208
+
209
+ class VolumeGroup(_message.Message):
210
+ __slots__ = ("name", "devices", "tags")
211
+ NAME_FIELD_NUMBER: _ClassVar[int]
212
+ DEVICES_FIELD_NUMBER: _ClassVar[int]
213
+ TAGS_FIELD_NUMBER: _ClassVar[int]
214
+ name: str
215
+ devices: _containers.RepeatedScalarFieldContainer[str]
216
+ tags: _containers.RepeatedScalarFieldContainer[str]
217
+ def __init__(self, name: _Optional[str] = ..., devices: _Optional[_Iterable[str]] = ..., tags: _Optional[_Iterable[str]] = ...) -> None: ...
218
+
219
+ class LogicalVolume(_message.Message):
220
+ __slots__ = ("name", "volume_group", "size", "lvm_type")
221
+ NAME_FIELD_NUMBER: _ClassVar[int]
222
+ VOLUME_GROUP_FIELD_NUMBER: _ClassVar[int]
223
+ SIZE_FIELD_NUMBER: _ClassVar[int]
224
+ LVM_TYPE_FIELD_NUMBER: _ClassVar[int]
225
+ name: str
226
+ volume_group: str
227
+ size: int
228
+ lvm_type: LVMType
229
+ def __init__(self, name: _Optional[str] = ..., volume_group: _Optional[str] = ..., size: _Optional[int] = ..., lvm_type: _Optional[_Union[LVMType, str]] = ...) -> None: ...
@@ -0,0 +1,213 @@
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 filesystem_pb2 as metalstack_dot_api_dot_v2_dot_filesystem__pb2
6
+
7
+
8
+ class FilesystemServiceStub(object):
9
+ """FilesystemService serves filesystem 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.FilesystemService/Get',
20
+ request_serializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetRequest.SerializeToString,
21
+ response_deserializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetResponse.FromString,
22
+ _registered_method=True)
23
+ self.List = channel.unary_unary(
24
+ '/metalstack.api.v2.FilesystemService/List',
25
+ request_serializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListRequest.SerializeToString,
26
+ response_deserializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListResponse.FromString,
27
+ _registered_method=True)
28
+ self.Try = channel.unary_unary(
29
+ '/metalstack.api.v2.FilesystemService/Try',
30
+ request_serializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceTryRequest.SerializeToString,
31
+ response_deserializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceTryResponse.FromString,
32
+ _registered_method=True)
33
+ self.Match = channel.unary_unary(
34
+ '/metalstack.api.v2.FilesystemService/Match',
35
+ request_serializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchRequest.SerializeToString,
36
+ response_deserializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchResponse.FromString,
37
+ _registered_method=True)
38
+
39
+
40
+ class FilesystemServiceServicer(object):
41
+ """FilesystemService serves filesystem related functions
42
+ """
43
+
44
+ def Get(self, request, context):
45
+ """Get a filesystem
46
+ """
47
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
48
+ context.set_details('Method not implemented!')
49
+ raise NotImplementedError('Method not implemented!')
50
+
51
+ def List(self, request, context):
52
+ """List all filesystems
53
+ """
54
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
55
+ context.set_details('Method not implemented!')
56
+ raise NotImplementedError('Method not implemented!')
57
+
58
+ def Try(self, request, context):
59
+ """Try a filesystems
60
+ """
61
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
62
+ context.set_details('Method not implemented!')
63
+ raise NotImplementedError('Method not implemented!')
64
+
65
+ def Match(self, request, context):
66
+ """Match a filesystems
67
+ """
68
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
69
+ context.set_details('Method not implemented!')
70
+ raise NotImplementedError('Method not implemented!')
71
+
72
+
73
+ def add_FilesystemServiceServicer_to_server(servicer, server):
74
+ rpc_method_handlers = {
75
+ 'Get': grpc.unary_unary_rpc_method_handler(
76
+ servicer.Get,
77
+ request_deserializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetRequest.FromString,
78
+ response_serializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetResponse.SerializeToString,
79
+ ),
80
+ 'List': grpc.unary_unary_rpc_method_handler(
81
+ servicer.List,
82
+ request_deserializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListRequest.FromString,
83
+ response_serializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListResponse.SerializeToString,
84
+ ),
85
+ 'Try': grpc.unary_unary_rpc_method_handler(
86
+ servicer.Try,
87
+ request_deserializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceTryRequest.FromString,
88
+ response_serializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceTryResponse.SerializeToString,
89
+ ),
90
+ 'Match': grpc.unary_unary_rpc_method_handler(
91
+ servicer.Match,
92
+ request_deserializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchRequest.FromString,
93
+ response_serializer=metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchResponse.SerializeToString,
94
+ ),
95
+ }
96
+ generic_handler = grpc.method_handlers_generic_handler(
97
+ 'metalstack.api.v2.FilesystemService', rpc_method_handlers)
98
+ server.add_generic_rpc_handlers((generic_handler,))
99
+ server.add_registered_method_handlers('metalstack.api.v2.FilesystemService', rpc_method_handlers)
100
+
101
+
102
+ # This class is part of an EXPERIMENTAL API.
103
+ class FilesystemService(object):
104
+ """FilesystemService serves filesystem related functions
105
+ """
106
+
107
+ @staticmethod
108
+ def Get(request,
109
+ target,
110
+ options=(),
111
+ channel_credentials=None,
112
+ call_credentials=None,
113
+ insecure=False,
114
+ compression=None,
115
+ wait_for_ready=None,
116
+ timeout=None,
117
+ metadata=None):
118
+ return grpc.experimental.unary_unary(
119
+ request,
120
+ target,
121
+ '/metalstack.api.v2.FilesystemService/Get',
122
+ metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetRequest.SerializeToString,
123
+ metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceGetResponse.FromString,
124
+ options,
125
+ channel_credentials,
126
+ insecure,
127
+ call_credentials,
128
+ compression,
129
+ wait_for_ready,
130
+ timeout,
131
+ metadata,
132
+ _registered_method=True)
133
+
134
+ @staticmethod
135
+ def List(request,
136
+ target,
137
+ options=(),
138
+ channel_credentials=None,
139
+ call_credentials=None,
140
+ insecure=False,
141
+ compression=None,
142
+ wait_for_ready=None,
143
+ timeout=None,
144
+ metadata=None):
145
+ return grpc.experimental.unary_unary(
146
+ request,
147
+ target,
148
+ '/metalstack.api.v2.FilesystemService/List',
149
+ metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListRequest.SerializeToString,
150
+ metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceListResponse.FromString,
151
+ options,
152
+ channel_credentials,
153
+ insecure,
154
+ call_credentials,
155
+ compression,
156
+ wait_for_ready,
157
+ timeout,
158
+ metadata,
159
+ _registered_method=True)
160
+
161
+ @staticmethod
162
+ def Try(request,
163
+ target,
164
+ options=(),
165
+ channel_credentials=None,
166
+ call_credentials=None,
167
+ insecure=False,
168
+ compression=None,
169
+ wait_for_ready=None,
170
+ timeout=None,
171
+ metadata=None):
172
+ return grpc.experimental.unary_unary(
173
+ request,
174
+ target,
175
+ '/metalstack.api.v2.FilesystemService/Try',
176
+ metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceTryRequest.SerializeToString,
177
+ metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceTryResponse.FromString,
178
+ options,
179
+ channel_credentials,
180
+ insecure,
181
+ call_credentials,
182
+ compression,
183
+ wait_for_ready,
184
+ timeout,
185
+ metadata,
186
+ _registered_method=True)
187
+
188
+ @staticmethod
189
+ def Match(request,
190
+ target,
191
+ options=(),
192
+ channel_credentials=None,
193
+ call_credentials=None,
194
+ insecure=False,
195
+ compression=None,
196
+ wait_for_ready=None,
197
+ timeout=None,
198
+ metadata=None):
199
+ return grpc.experimental.unary_unary(
200
+ request,
201
+ target,
202
+ '/metalstack.api.v2.FilesystemService/Match',
203
+ metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchRequest.SerializeToString,
204
+ metalstack_dot_api_dot_v2_dot_filesystem__pb2.FilesystemServiceMatchResponse.FromString,
205
+ options,
206
+ channel_credentials,
207
+ insecure,
208
+ call_credentials,
209
+ compression,
210
+ wait_for_ready,
211
+ timeout,
212
+ metadata,
213
+ _registered_method=True)
@@ -0,0 +1,102 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by https://github.com/i2y/connecpy/protoc-gen-connecpy. DO NOT EDIT!
3
+ # source: metalstack/api/v2/health.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.health_pb2 as metalstack_dot_api_dot_v2_dot_health__pb2
15
+
16
+
17
+ class HealthService(Protocol):
18
+ async def Get(self, req: metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse: ...
19
+
20
+
21
+ class HealthServiceServer(ConnecpyServer):
22
+ def __init__(self, *, service: HealthService, server_path_prefix=""):
23
+ super().__init__()
24
+ self._prefix = f"{server_path_prefix}/metalstack.api.v2.HealthService"
25
+ self._endpoints = {
26
+ "Get": Endpoint[metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest, metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse](
27
+ service_name="HealthService",
28
+ name="Get",
29
+ function=getattr(service, "Get"),
30
+ input=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
31
+ output=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse,
32
+ allowed_methods=("POST",),
33
+ ),
34
+ }
35
+
36
+ def serviceName(self):
37
+ return "metalstack.api.v2.HealthService"
38
+
39
+
40
+ class HealthServiceSync(Protocol):
41
+ def Get(self, req: metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest, ctx: ServiceContext) -> metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse: ...
42
+
43
+
44
+ class HealthServiceServerSync(ConnecpyServer):
45
+ def __init__(self, *, service: HealthServiceSync, server_path_prefix=""):
46
+ super().__init__()
47
+ self._prefix = f"{server_path_prefix}/metalstack.api.v2.HealthService"
48
+ self._endpoints = {
49
+ "Get": Endpoint[metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest, metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse](
50
+ service_name="HealthService",
51
+ name="Get",
52
+ function=getattr(service, "Get"),
53
+ input=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
54
+ output=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse,
55
+ allowed_methods=("POST",),
56
+ ),
57
+ }
58
+
59
+ def serviceName(self):
60
+ return "metalstack.api.v2.HealthService"
61
+
62
+
63
+ class HealthServiceClient(ConnecpyClient):
64
+ def Get(
65
+ self,
66
+ request: metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
67
+ *,
68
+ ctx: Optional[ClientContext] = None,
69
+ server_path_prefix: str = "",
70
+ **kwargs,
71
+ ) -> metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse:
72
+ method = "POST"
73
+ return self._make_request(
74
+ url=f"{server_path_prefix}/metalstack.api.v2.HealthService/Get",
75
+ ctx=ctx,
76
+ request=request,
77
+ response_class=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse,
78
+ method=method,
79
+ **kwargs,
80
+ )
81
+
82
+
83
+ class AsyncHealthServiceClient(AsyncConnecpyClient):
84
+ async def Get(
85
+ self,
86
+ request: metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetRequest,
87
+ *,
88
+ ctx: Optional[ClientContext] = None,
89
+ server_path_prefix: str = "",
90
+ session: Union[httpx.AsyncClient, None] = None,
91
+ **kwargs,
92
+ ) -> metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse:
93
+ method = "POST"
94
+ return await self._make_request(
95
+ url=f"{server_path_prefix}/metalstack.api.v2.HealthService/Get",
96
+ ctx=ctx,
97
+ request=request,
98
+ response_class=metalstack_dot_api_dot_v2_dot_health__pb2.HealthServiceGetResponse,
99
+ method=method,
100
+ session=session,
101
+ **kwargs,
102
+ )
@@ -0,0 +1,70 @@
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/health.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/health.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common__pb2
26
+
27
+
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emetalstack/api/v2/health.proto\x12\x11metalstack.api.v2\x1a\x1emetalstack/api/v2/common.proto\"E\n\x06Health\x12;\n\x08services\x18\x01 \x03(\x0b\x32\x1f.metalstack.api.v2.HealthStatusR\x08services\"\xc6\x02\n\x0cHealthStatus\x12.\n\x04name\x18\x01 \x01(\x0e\x32\x1a.metalstack.api.v2.ServiceR\x04name\x12\x38\n\x06status\x18\x02 \x01(\x0e\x32 .metalstack.api.v2.ServiceStatusR\x06status\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\x12O\n\npartitions\x18\x04 \x03(\x0b\x32/.metalstack.api.v2.HealthStatus.PartitionsEntryR\npartitions\x1a\x61\n\x0fPartitionsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32\".metalstack.api.v2.PartitionHealthR\x05value:\x02\x38\x01\"e\n\x0fPartitionHealth\x12\x38\n\x06status\x18\x01 \x01(\x0e\x32 .metalstack.api.v2.ServiceStatusR\x06status\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\"\x19\n\x17HealthServiceGetRequest\"M\n\x18HealthServiceGetResponse\x12\x31\n\x06health\x18\x01 \x01(\x0b\x32\x19.metalstack.api.v2.HealthR\x06health*\x86\x01\n\rServiceStatus\x12\x1e\n\x1aSERVICE_STATUS_UNSPECIFIED\x10\x00\x12\x1b\n\x17SERVICE_STATUS_DEGRADED\x10\x01\x12\x1c\n\x18SERVICE_STATUS_UNHEALTHY\x10\x02\x12\x1a\n\x16SERVICE_STATUS_HEALTHY\x10\x03*\xe6\x01\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x1a\n\x0cSERVICE_IPAM\x10\x01\x1a\x08\x82\xb2\x19\x04ipam\x12\"\n\x0fSERVICE_RETHINK\x10\x02\x1a\r\x82\xb2\x19\trethinkdb\x12&\n\x12SERVICE_MASTERDATA\x10\x03\x1a\x0e\x82\xb2\x19\nmasterdata\x12\"\n\x10SERVICE_MACHINES\x10\x04\x1a\x0c\x82\xb2\x19\x08machines\x12\x1c\n\rSERVICE_AUDIT\x10\x05\x1a\t\x82\xb2\x19\x05\x61udit\x12\x18\n\x0bSERVICE_VPN\x10\x06\x1a\x07\x82\xb2\x19\x03vpn2y\n\rHealthService\x12h\n\x03Get\x12*.metalstack.api.v2.HealthServiceGetRequest\x1a+.metalstack.api.v2.HealthServiceGetResponse\"\x08\xd8\xf3\x18\x01\xe0\xf3\x18\x02\x42\xc1\x01\n\x15\x63om.metalstack.api.v2B\x0bHealthProtoP\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')
29
+
30
+ _globals = globals()
31
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'metalstack.api.v2.health_pb2', _globals)
33
+ if not _descriptor._USE_C_DESCRIPTORS:
34
+ _globals['DESCRIPTOR']._loaded_options = None
35
+ _globals['DESCRIPTOR']._serialized_options = b'\n\025com.metalstack.api.v2B\013HealthProtoP\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'
36
+ _globals['_SERVICE'].values_by_name["SERVICE_IPAM"]._loaded_options = None
37
+ _globals['_SERVICE'].values_by_name["SERVICE_IPAM"]._serialized_options = b'\202\262\031\004ipam'
38
+ _globals['_SERVICE'].values_by_name["SERVICE_RETHINK"]._loaded_options = None
39
+ _globals['_SERVICE'].values_by_name["SERVICE_RETHINK"]._serialized_options = b'\202\262\031\trethinkdb'
40
+ _globals['_SERVICE'].values_by_name["SERVICE_MASTERDATA"]._loaded_options = None
41
+ _globals['_SERVICE'].values_by_name["SERVICE_MASTERDATA"]._serialized_options = b'\202\262\031\nmasterdata'
42
+ _globals['_SERVICE'].values_by_name["SERVICE_MACHINES"]._loaded_options = None
43
+ _globals['_SERVICE'].values_by_name["SERVICE_MACHINES"]._serialized_options = b'\202\262\031\010machines'
44
+ _globals['_SERVICE'].values_by_name["SERVICE_AUDIT"]._loaded_options = None
45
+ _globals['_SERVICE'].values_by_name["SERVICE_AUDIT"]._serialized_options = b'\202\262\031\005audit'
46
+ _globals['_SERVICE'].values_by_name["SERVICE_VPN"]._loaded_options = None
47
+ _globals['_SERVICE'].values_by_name["SERVICE_VPN"]._serialized_options = b'\202\262\031\003vpn'
48
+ _globals['_HEALTHSTATUS_PARTITIONSENTRY']._loaded_options = None
49
+ _globals['_HEALTHSTATUS_PARTITIONSENTRY']._serialized_options = b'8\001'
50
+ _globals['_HEALTHSERVICE'].methods_by_name['Get']._loaded_options = None
51
+ _globals['_HEALTHSERVICE'].methods_by_name['Get']._serialized_options = b'\330\363\030\001\340\363\030\002'
52
+ _globals['_SERVICESTATUS']._serialized_start=695
53
+ _globals['_SERVICESTATUS']._serialized_end=829
54
+ _globals['_SERVICE']._serialized_start=832
55
+ _globals['_SERVICE']._serialized_end=1062
56
+ _globals['_HEALTH']._serialized_start=85
57
+ _globals['_HEALTH']._serialized_end=154
58
+ _globals['_HEALTHSTATUS']._serialized_start=157
59
+ _globals['_HEALTHSTATUS']._serialized_end=483
60
+ _globals['_HEALTHSTATUS_PARTITIONSENTRY']._serialized_start=386
61
+ _globals['_HEALTHSTATUS_PARTITIONSENTRY']._serialized_end=483
62
+ _globals['_PARTITIONHEALTH']._serialized_start=485
63
+ _globals['_PARTITIONHEALTH']._serialized_end=586
64
+ _globals['_HEALTHSERVICEGETREQUEST']._serialized_start=588
65
+ _globals['_HEALTHSERVICEGETREQUEST']._serialized_end=613
66
+ _globals['_HEALTHSERVICEGETRESPONSE']._serialized_start=615
67
+ _globals['_HEALTHSERVICEGETRESPONSE']._serialized_end=692
68
+ _globals['_HEALTHSERVICE']._serialized_start=1064
69
+ _globals['_HEALTHSERVICE']._serialized_end=1185
70
+ # @@protoc_insertion_point(module_scope)