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,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 metalstackcloud.api.v1 import volume_pb2 as api_dot_v1_dot_volume__pb2
6
+
7
+
8
+ class VolumeServiceStub(object):
9
+ """VolumeService serves volume 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.VolumeService/Get',
20
+ request_serializer=api_dot_v1_dot_volume__pb2.VolumeServiceGetRequest.SerializeToString,
21
+ response_deserializer=api_dot_v1_dot_volume__pb2.VolumeServiceGetResponse.FromString,
22
+ _registered_method=True)
23
+ self.List = channel.unary_unary(
24
+ '/api.v1.VolumeService/List',
25
+ request_serializer=api_dot_v1_dot_volume__pb2.VolumeServiceListRequest.SerializeToString,
26
+ response_deserializer=api_dot_v1_dot_volume__pb2.VolumeServiceListResponse.FromString,
27
+ _registered_method=True)
28
+ self.Delete = channel.unary_unary(
29
+ '/api.v1.VolumeService/Delete',
30
+ request_serializer=api_dot_v1_dot_volume__pb2.VolumeServiceDeleteRequest.SerializeToString,
31
+ response_deserializer=api_dot_v1_dot_volume__pb2.VolumeServiceDeleteResponse.FromString,
32
+ _registered_method=True)
33
+ self.Update = channel.unary_unary(
34
+ '/api.v1.VolumeService/Update',
35
+ request_serializer=api_dot_v1_dot_volume__pb2.VolumeServiceUpdateRequest.SerializeToString,
36
+ response_deserializer=api_dot_v1_dot_volume__pb2.VolumeServiceUpdateResponse.FromString,
37
+ _registered_method=True)
38
+
39
+
40
+ class VolumeServiceServicer(object):
41
+ """VolumeService serves volume related functions
42
+ """
43
+
44
+ def Get(self, request, context):
45
+ """Get a volume
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 the volumes
53
+ """
54
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
55
+ context.set_details('Method not implemented!')
56
+ raise NotImplementedError('Method not implemented!')
57
+
58
+ def Delete(self, request, context):
59
+ """Delete a volume
60
+ """
61
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
62
+ context.set_details('Method not implemented!')
63
+ raise NotImplementedError('Method not implemented!')
64
+
65
+ def Update(self, request, context):
66
+ """Update a volume
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_VolumeServiceServicer_to_server(servicer, server):
74
+ rpc_method_handlers = {
75
+ 'Get': grpc.unary_unary_rpc_method_handler(
76
+ servicer.Get,
77
+ request_deserializer=api_dot_v1_dot_volume__pb2.VolumeServiceGetRequest.FromString,
78
+ response_serializer=api_dot_v1_dot_volume__pb2.VolumeServiceGetResponse.SerializeToString,
79
+ ),
80
+ 'List': grpc.unary_unary_rpc_method_handler(
81
+ servicer.List,
82
+ request_deserializer=api_dot_v1_dot_volume__pb2.VolumeServiceListRequest.FromString,
83
+ response_serializer=api_dot_v1_dot_volume__pb2.VolumeServiceListResponse.SerializeToString,
84
+ ),
85
+ 'Delete': grpc.unary_unary_rpc_method_handler(
86
+ servicer.Delete,
87
+ request_deserializer=api_dot_v1_dot_volume__pb2.VolumeServiceDeleteRequest.FromString,
88
+ response_serializer=api_dot_v1_dot_volume__pb2.VolumeServiceDeleteResponse.SerializeToString,
89
+ ),
90
+ 'Update': grpc.unary_unary_rpc_method_handler(
91
+ servicer.Update,
92
+ request_deserializer=api_dot_v1_dot_volume__pb2.VolumeServiceUpdateRequest.FromString,
93
+ response_serializer=api_dot_v1_dot_volume__pb2.VolumeServiceUpdateResponse.SerializeToString,
94
+ ),
95
+ }
96
+ generic_handler = grpc.method_handlers_generic_handler(
97
+ 'api.v1.VolumeService', rpc_method_handlers)
98
+ server.add_generic_rpc_handlers((generic_handler,))
99
+ server.add_registered_method_handlers('api.v1.VolumeService', rpc_method_handlers)
100
+
101
+
102
+ # This class is part of an EXPERIMENTAL API.
103
+ class VolumeService(object):
104
+ """VolumeService serves volume 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
+ '/api.v1.VolumeService/Get',
122
+ api_dot_v1_dot_volume__pb2.VolumeServiceGetRequest.SerializeToString,
123
+ api_dot_v1_dot_volume__pb2.VolumeServiceGetResponse.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
+ '/api.v1.VolumeService/List',
149
+ api_dot_v1_dot_volume__pb2.VolumeServiceListRequest.SerializeToString,
150
+ api_dot_v1_dot_volume__pb2.VolumeServiceListResponse.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 Delete(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
+ '/api.v1.VolumeService/Delete',
176
+ api_dot_v1_dot_volume__pb2.VolumeServiceDeleteRequest.SerializeToString,
177
+ api_dot_v1_dot_volume__pb2.VolumeServiceDeleteResponse.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 Update(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
+ '/api.v1.VolumeService/Update',
203
+ api_dot_v1_dot_volume__pb2.VolumeServiceUpdateRequest.SerializeToString,
204
+ api_dot_v1_dot_volume__pb2.VolumeServiceUpdateResponse.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,139 @@
1
+ # Code generated by generate.go. DO NOT EDIT.
2
+
3
+ import httpx
4
+
5
+ import metalstackcloud.admin.v1.cluster_connecpy as admin_cluster_connecpy
6
+ import metalstackcloud.admin.v1.payment_connecpy as admin_payment_connecpy
7
+ import metalstackcloud.admin.v1.project_connecpy as admin_project_connecpy
8
+ import metalstackcloud.admin.v1.storage_connecpy as admin_storage_connecpy
9
+ import metalstackcloud.admin.v1.tenant_connecpy as admin_tenant_connecpy
10
+ import metalstackcloud.admin.v1.token_connecpy as admin_token_connecpy
11
+
12
+ import metalstackcloud.api.v1.asset_connecpy as api_asset_connecpy
13
+ import metalstackcloud.api.v1.audit_connecpy as api_audit_connecpy
14
+ import metalstackcloud.api.v1.cluster_connecpy as api_cluster_connecpy
15
+ import metalstackcloud.api.v1.health_connecpy as api_health_connecpy
16
+ import metalstackcloud.api.v1.ip_connecpy as api_ip_connecpy
17
+ import metalstackcloud.api.v1.method_connecpy as api_method_connecpy
18
+ import metalstackcloud.api.v1.payment_connecpy as api_payment_connecpy
19
+ import metalstackcloud.api.v1.project_connecpy as api_project_connecpy
20
+ import metalstackcloud.api.v1.snapshot_connecpy as api_snapshot_connecpy
21
+ import metalstackcloud.api.v1.tenant_connecpy as api_tenant_connecpy
22
+ import metalstackcloud.api.v1.token_connecpy as api_token_connecpy
23
+ import metalstackcloud.api.v1.user_connecpy as api_user_connecpy
24
+ import metalstackcloud.api.v1.version_connecpy as api_version_connecpy
25
+ import metalstackcloud.api.v1.volume_connecpy as api_volume_connecpy
26
+
27
+ import metalstackcloud.status.v1.message_connecpy as status_message_connecpy
28
+ import metalstackcloud.status.v1.status_connecpy as status_status_connecpy
29
+
30
+
31
+
32
+ class Client:
33
+ def __init__(self, baseurl: str, token: str, timeout: int = 10):
34
+ self._baseurl = baseurl
35
+
36
+ headers = {}
37
+ if token:
38
+ headers["Authorization"] = "Bearer " + token
39
+
40
+ self._session = httpx.Client(headers=headers, timeout=timeout)
41
+
42
+
43
+ def adminv1(self):
44
+ return self._Adminv1(baseurl=self._baseurl, session=self._session)
45
+
46
+ def apiv1(self):
47
+ return self._Apiv1(baseurl=self._baseurl, session=self._session)
48
+
49
+ def statusv1(self):
50
+ return self._Statusv1(baseurl=self._baseurl, session=self._session)
51
+
52
+
53
+
54
+ class _Adminv1:
55
+ def __init__(self, baseurl: str, session=None):
56
+ self._baseurl = baseurl
57
+ self._session = session
58
+
59
+
60
+ def cluster(self):
61
+ return admin_cluster_connecpy.ClusterServiceClient(address=self._baseurl, session=self._session)
62
+
63
+ def payment(self):
64
+ return admin_payment_connecpy.PaymentServiceClient(address=self._baseurl, session=self._session)
65
+
66
+ def project(self):
67
+ return admin_project_connecpy.ProjectServiceClient(address=self._baseurl, session=self._session)
68
+
69
+ def storage(self):
70
+ return admin_storage_connecpy.StorageServiceClient(address=self._baseurl, session=self._session)
71
+
72
+ def tenant(self):
73
+ return admin_tenant_connecpy.TenantServiceClient(address=self._baseurl, session=self._session)
74
+
75
+ def token(self):
76
+ return admin_token_connecpy.TokenServiceClient(address=self._baseurl, session=self._session)
77
+
78
+
79
+ class _Apiv1:
80
+ def __init__(self, baseurl: str, session=None):
81
+ self._baseurl = baseurl
82
+ self._session = session
83
+
84
+
85
+ def asset(self):
86
+ return api_asset_connecpy.AssetServiceClient(address=self._baseurl, session=self._session)
87
+
88
+ def audit(self):
89
+ return api_audit_connecpy.AuditServiceClient(address=self._baseurl, session=self._session)
90
+
91
+ def cluster(self):
92
+ return api_cluster_connecpy.ClusterServiceClient(address=self._baseurl, session=self._session)
93
+
94
+ def health(self):
95
+ return api_health_connecpy.HealthServiceClient(address=self._baseurl, session=self._session)
96
+
97
+ def ip(self):
98
+ return api_ip_connecpy.IPServiceClient(address=self._baseurl, session=self._session)
99
+
100
+ def method(self):
101
+ return api_method_connecpy.MethodServiceClient(address=self._baseurl, session=self._session)
102
+
103
+ def payment(self):
104
+ return api_payment_connecpy.PaymentServiceClient(address=self._baseurl, session=self._session)
105
+
106
+ def project(self):
107
+ return api_project_connecpy.ProjectServiceClient(address=self._baseurl, session=self._session)
108
+
109
+ def snapshot(self):
110
+ return api_snapshot_connecpy.SnapshotServiceClient(address=self._baseurl, session=self._session)
111
+
112
+ def tenant(self):
113
+ return api_tenant_connecpy.TenantServiceClient(address=self._baseurl, session=self._session)
114
+
115
+ def token(self):
116
+ return api_token_connecpy.TokenServiceClient(address=self._baseurl, session=self._session)
117
+
118
+ def user(self):
119
+ return api_user_connecpy.UserServiceClient(address=self._baseurl, session=self._session)
120
+
121
+ def version(self):
122
+ return api_version_connecpy.VersionServiceClient(address=self._baseurl, session=self._session)
123
+
124
+ def volume(self):
125
+ return api_volume_connecpy.VolumeServiceClient(address=self._baseurl, session=self._session)
126
+
127
+
128
+ class _Statusv1:
129
+ def __init__(self, baseurl: str, session=None):
130
+ self._baseurl = baseurl
131
+ self._session = session
132
+
133
+
134
+ def message(self):
135
+ return status_message_connecpy.MessageServiceClient(address=self._baseurl, session=self._session)
136
+
137
+ def status(self):
138
+ return status_status_connecpy.StatusServiceClient(address=self._baseurl, session=self._session)
139
+
File without changes
File without changes
@@ -0,0 +1,102 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by https://github.com/i2y/connecpy/protoc-gen-connecpy. DO NOT EDIT!
3
+ # source: status/v1/message.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.status.v1.message_pb2 as status_dot_v1_dot_message__pb2
15
+
16
+
17
+ class MessageService(Protocol):
18
+ async def Watch(self, req: status_dot_v1_dot_message__pb2.MessageServiceWatchRequest, ctx: ServiceContext) -> status_dot_v1_dot_message__pb2.MessageServiceWatchResponse: ...
19
+
20
+
21
+ class MessageServiceServer(ConnecpyServer):
22
+ def __init__(self, *, service: MessageService, server_path_prefix=""):
23
+ super().__init__()
24
+ self._prefix = f"{server_path_prefix}/status.v1.MessageService"
25
+ self._endpoints = {
26
+ "Watch": Endpoint[status_dot_v1_dot_message__pb2.MessageServiceWatchRequest, status_dot_v1_dot_message__pb2.MessageServiceWatchResponse](
27
+ service_name="MessageService",
28
+ name="Watch",
29
+ function=getattr(service, "Watch"),
30
+ input=status_dot_v1_dot_message__pb2.MessageServiceWatchRequest,
31
+ output=status_dot_v1_dot_message__pb2.MessageServiceWatchResponse,
32
+ allowed_methods=("POST",),
33
+ ),
34
+ }
35
+
36
+ def serviceName(self):
37
+ return "status.v1.MessageService"
38
+
39
+
40
+ class MessageServiceSync(Protocol):
41
+ def Watch(self, req: status_dot_v1_dot_message__pb2.MessageServiceWatchRequest, ctx: ServiceContext) -> status_dot_v1_dot_message__pb2.MessageServiceWatchResponse: ...
42
+
43
+
44
+ class MessageServiceServerSync(ConnecpyServer):
45
+ def __init__(self, *, service: MessageServiceSync, server_path_prefix=""):
46
+ super().__init__()
47
+ self._prefix = f"{server_path_prefix}/status.v1.MessageService"
48
+ self._endpoints = {
49
+ "Watch": Endpoint[status_dot_v1_dot_message__pb2.MessageServiceWatchRequest, status_dot_v1_dot_message__pb2.MessageServiceWatchResponse](
50
+ service_name="MessageService",
51
+ name="Watch",
52
+ function=getattr(service, "Watch"),
53
+ input=status_dot_v1_dot_message__pb2.MessageServiceWatchRequest,
54
+ output=status_dot_v1_dot_message__pb2.MessageServiceWatchResponse,
55
+ allowed_methods=("POST",),
56
+ ),
57
+ }
58
+
59
+ def serviceName(self):
60
+ return "status.v1.MessageService"
61
+
62
+
63
+ class MessageServiceClient(ConnecpyClient):
64
+ def Watch(
65
+ self,
66
+ request: status_dot_v1_dot_message__pb2.MessageServiceWatchRequest,
67
+ *,
68
+ ctx: Optional[ClientContext] = None,
69
+ server_path_prefix: str = "",
70
+ **kwargs,
71
+ ) -> status_dot_v1_dot_message__pb2.MessageServiceWatchResponse:
72
+ method = "POST"
73
+ return self._make_request(
74
+ url=f"{server_path_prefix}/status.v1.MessageService/Watch",
75
+ ctx=ctx,
76
+ request=request,
77
+ response_class=status_dot_v1_dot_message__pb2.MessageServiceWatchResponse,
78
+ method=method,
79
+ **kwargs,
80
+ )
81
+
82
+
83
+ class AsyncMessageServiceClient(AsyncConnecpyClient):
84
+ async def Watch(
85
+ self,
86
+ request: status_dot_v1_dot_message__pb2.MessageServiceWatchRequest,
87
+ *,
88
+ ctx: Optional[ClientContext] = None,
89
+ server_path_prefix: str = "",
90
+ session: Union[httpx.AsyncClient, None] = None,
91
+ **kwargs,
92
+ ) -> status_dot_v1_dot_message__pb2.MessageServiceWatchResponse:
93
+ method = "POST"
94
+ return await self._make_request(
95
+ url=f"{server_path_prefix}/status.v1.MessageService/Watch",
96
+ ctx=ctx,
97
+ request=request,
98
+ response_class=status_dot_v1_dot_message__pb2.MessageServiceWatchResponse,
99
+ method=method,
100
+ session=session,
101
+ **kwargs,
102
+ )
@@ -0,0 +1,51 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: status/v1/message.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
+ 'status/v1/message.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 google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17status/v1/message.proto\x12\tstatus.v1\x1a\x13\x61pi/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x1c\n\x1aMessageServiceWatchRequest\"~\n\x1bMessageServiceWatchResponse\x12(\n\x05items\x18\x01 \x03(\x0b\x32\x12.status.v1.MessageR\x05items\x12\x35\n\x0cpinned_items\x18\x02 \x03(\x0b\x32\x12.status.v1.MessageR\x0bpinnedItems\"\xc6\x01\n\x07Message\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04text\x18\x02 \x01(\tR\x04text\x12*\n\x04kind\x18\x03 \x01(\x0e\x32\x16.status.v1.MessageKindR\x04kind\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\x12\x31\n\x07replies\x18\x05 \x03(\x0b\x32\x17.status.v1.ReplyMessageR\x07replies\"\x98\x01\n\x0cReplyMessage\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04text\x18\x02 \x01(\tR\x04text\x12*\n\x04kind\x18\x03 \x01(\x0e\x32\x16.status.v1.MessageKindR\x04kind\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*\xaa\x01\n\x0bMessageKind\x12\x1c\n\x18MESSAGE_KIND_UNSPECIFIED\x10\x00\x12\x15\n\x11MESSAGE_KIND_INFO\x10\x01\x12\x19\n\x15MESSAGE_KIND_INCIDENT\x10\x02\x12\x17\n\x13MESSAGE_KIND_CHANGE\x10\x03\x12\x19\n\x15MESSAGE_KIND_RESOLVED\x10\x04\x12\x17\n\x13MESSAGE_KIND_UPDATE\x10\x05\x32p\n\x0eMessageService\x12^\n\x05Watch\x12%.status.v1.MessageServiceWatchRequest\x1a&.status.v1.MessageServiceWatchResponse\"\x04\xd8\xf3\x18\x01\x30\x01\x42\x9a\x01\n\rcom.status.v1B\x0cMessageProtoP\x01Z6github.com/metal-stack-cloud/api/go/status/v1;statusv1\xa2\x02\x03SXX\xaa\x02\tStatus.V1\xca\x02\tStatus\\V1\xe2\x02\x15Status\\V1\\GPBMetadata\xea\x02\nStatus::V1b\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'status.v1.message_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals['DESCRIPTOR']._loaded_options = None
36
+ _globals['DESCRIPTOR']._serialized_options = b'\n\rcom.status.v1B\014MessageProtoP\001Z6github.com/metal-stack-cloud/api/go/status/v1;statusv1\242\002\003SXX\252\002\tStatus.V1\312\002\tStatus\\V1\342\002\025Status\\V1\\GPBMetadata\352\002\nStatus::V1'
37
+ _globals['_MESSAGESERVICE'].methods_by_name['Watch']._loaded_options = None
38
+ _globals['_MESSAGESERVICE'].methods_by_name['Watch']._serialized_options = b'\330\363\030\001'
39
+ _globals['_MESSAGEKIND']._serialized_start=607
40
+ _globals['_MESSAGEKIND']._serialized_end=777
41
+ _globals['_MESSAGESERVICEWATCHREQUEST']._serialized_start=92
42
+ _globals['_MESSAGESERVICEWATCHREQUEST']._serialized_end=120
43
+ _globals['_MESSAGESERVICEWATCHRESPONSE']._serialized_start=122
44
+ _globals['_MESSAGESERVICEWATCHRESPONSE']._serialized_end=248
45
+ _globals['_MESSAGE']._serialized_start=251
46
+ _globals['_MESSAGE']._serialized_end=449
47
+ _globals['_REPLYMESSAGE']._serialized_start=452
48
+ _globals['_REPLYMESSAGE']._serialized_end=604
49
+ _globals['_MESSAGESERVICE']._serialized_start=779
50
+ _globals['_MESSAGESERVICE']._serialized_end=891
51
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,65 @@
1
+ import datetime
2
+
3
+ from api.v1 import common_pb2 as _common_pb2
4
+ from google.protobuf import timestamp_pb2 as _timestamp_pb2
5
+ from google.protobuf.internal import containers as _containers
6
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import message as _message
9
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
10
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
11
+
12
+ DESCRIPTOR: _descriptor.FileDescriptor
13
+
14
+ class MessageKind(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
15
+ __slots__ = ()
16
+ MESSAGE_KIND_UNSPECIFIED: _ClassVar[MessageKind]
17
+ MESSAGE_KIND_INFO: _ClassVar[MessageKind]
18
+ MESSAGE_KIND_INCIDENT: _ClassVar[MessageKind]
19
+ MESSAGE_KIND_CHANGE: _ClassVar[MessageKind]
20
+ MESSAGE_KIND_RESOLVED: _ClassVar[MessageKind]
21
+ MESSAGE_KIND_UPDATE: _ClassVar[MessageKind]
22
+ MESSAGE_KIND_UNSPECIFIED: MessageKind
23
+ MESSAGE_KIND_INFO: MessageKind
24
+ MESSAGE_KIND_INCIDENT: MessageKind
25
+ MESSAGE_KIND_CHANGE: MessageKind
26
+ MESSAGE_KIND_RESOLVED: MessageKind
27
+ MESSAGE_KIND_UPDATE: MessageKind
28
+
29
+ class MessageServiceWatchRequest(_message.Message):
30
+ __slots__ = ()
31
+ def __init__(self) -> None: ...
32
+
33
+ class MessageServiceWatchResponse(_message.Message):
34
+ __slots__ = ("items", "pinned_items")
35
+ ITEMS_FIELD_NUMBER: _ClassVar[int]
36
+ PINNED_ITEMS_FIELD_NUMBER: _ClassVar[int]
37
+ items: _containers.RepeatedCompositeFieldContainer[Message]
38
+ pinned_items: _containers.RepeatedCompositeFieldContainer[Message]
39
+ def __init__(self, items: _Optional[_Iterable[_Union[Message, _Mapping]]] = ..., pinned_items: _Optional[_Iterable[_Union[Message, _Mapping]]] = ...) -> None: ...
40
+
41
+ class Message(_message.Message):
42
+ __slots__ = ("id", "text", "kind", "timestamp", "replies")
43
+ ID_FIELD_NUMBER: _ClassVar[int]
44
+ TEXT_FIELD_NUMBER: _ClassVar[int]
45
+ KIND_FIELD_NUMBER: _ClassVar[int]
46
+ TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
47
+ REPLIES_FIELD_NUMBER: _ClassVar[int]
48
+ id: str
49
+ text: str
50
+ kind: MessageKind
51
+ timestamp: _timestamp_pb2.Timestamp
52
+ replies: _containers.RepeatedCompositeFieldContainer[ReplyMessage]
53
+ def __init__(self, id: _Optional[str] = ..., text: _Optional[str] = ..., kind: _Optional[_Union[MessageKind, str]] = ..., timestamp: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., replies: _Optional[_Iterable[_Union[ReplyMessage, _Mapping]]] = ...) -> None: ...
54
+
55
+ class ReplyMessage(_message.Message):
56
+ __slots__ = ("id", "text", "kind", "timestamp")
57
+ ID_FIELD_NUMBER: _ClassVar[int]
58
+ TEXT_FIELD_NUMBER: _ClassVar[int]
59
+ KIND_FIELD_NUMBER: _ClassVar[int]
60
+ TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
61
+ id: str
62
+ text: str
63
+ kind: MessageKind
64
+ timestamp: _timestamp_pb2.Timestamp
65
+ def __init__(self, id: _Optional[str] = ..., text: _Optional[str] = ..., kind: _Optional[_Union[MessageKind, str]] = ..., timestamp: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
@@ -0,0 +1,84 @@
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.status.v1 import message_pb2 as status_dot_v1_dot_message__pb2
6
+
7
+
8
+ class MessageServiceStub(object):
9
+ """MessageService serves status message related functions
10
+ this service is used as backend for the status dashboard
11
+ """
12
+
13
+ def __init__(self, channel):
14
+ """Constructor.
15
+
16
+ Args:
17
+ channel: A grpc.Channel.
18
+ """
19
+ self.Watch = channel.unary_stream(
20
+ '/status.v1.MessageService/Watch',
21
+ request_serializer=status_dot_v1_dot_message__pb2.MessageServiceWatchRequest.SerializeToString,
22
+ response_deserializer=status_dot_v1_dot_message__pb2.MessageServiceWatchResponse.FromString,
23
+ _registered_method=True)
24
+
25
+
26
+ class MessageServiceServicer(object):
27
+ """MessageService serves status message related functions
28
+ this service is used as backend for the status dashboard
29
+ """
30
+
31
+ def Watch(self, request, context):
32
+ """Watch returns all messages of interest
33
+ """
34
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
35
+ context.set_details('Method not implemented!')
36
+ raise NotImplementedError('Method not implemented!')
37
+
38
+
39
+ def add_MessageServiceServicer_to_server(servicer, server):
40
+ rpc_method_handlers = {
41
+ 'Watch': grpc.unary_stream_rpc_method_handler(
42
+ servicer.Watch,
43
+ request_deserializer=status_dot_v1_dot_message__pb2.MessageServiceWatchRequest.FromString,
44
+ response_serializer=status_dot_v1_dot_message__pb2.MessageServiceWatchResponse.SerializeToString,
45
+ ),
46
+ }
47
+ generic_handler = grpc.method_handlers_generic_handler(
48
+ 'status.v1.MessageService', rpc_method_handlers)
49
+ server.add_generic_rpc_handlers((generic_handler,))
50
+ server.add_registered_method_handlers('status.v1.MessageService', rpc_method_handlers)
51
+
52
+
53
+ # This class is part of an EXPERIMENTAL API.
54
+ class MessageService(object):
55
+ """MessageService serves status message related functions
56
+ this service is used as backend for the status dashboard
57
+ """
58
+
59
+ @staticmethod
60
+ def Watch(request,
61
+ target,
62
+ options=(),
63
+ channel_credentials=None,
64
+ call_credentials=None,
65
+ insecure=False,
66
+ compression=None,
67
+ wait_for_ready=None,
68
+ timeout=None,
69
+ metadata=None):
70
+ return grpc.experimental.unary_stream(
71
+ request,
72
+ target,
73
+ '/status.v1.MessageService/Watch',
74
+ status_dot_v1_dot_message__pb2.MessageServiceWatchRequest.SerializeToString,
75
+ status_dot_v1_dot_message__pb2.MessageServiceWatchResponse.FromString,
76
+ options,
77
+ channel_credentials,
78
+ insecure,
79
+ call_credentials,
80
+ compression,
81
+ wait_for_ready,
82
+ timeout,
83
+ metadata,
84
+ _registered_method=True)