rpyc-pve-cloud 0.0.31__py3-none-any.whl → 0.0.33__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.
- pve_cloud_rpc/_version.py +1 -1
- pve_cloud_rpc/protos/cloud_pb2.py +0 -3
- pve_cloud_rpc/protos/cloud_pb2_grpc.py +0 -3
- pve_cloud_rpc/protos/health_pb2.py +8 -11
- pve_cloud_rpc/protos/health_pb2_grpc.py +0 -3
- pve_cloud_rpc/server.py +8 -22
- {rpyc_pve_cloud-0.0.31.dist-info → rpyc_pve_cloud-0.0.33.dist-info}/METADATA +2 -2
- rpyc_pve_cloud-0.0.33.dist-info/RECORD +12 -0
- rpyc_pve_cloud-0.0.31.dist-info/RECORD +0 -12
- {rpyc_pve_cloud-0.0.31.dist-info → rpyc_pve_cloud-0.0.33.dist-info}/WHEEL +0 -0
- {rpyc_pve_cloud-0.0.31.dist-info → rpyc_pve_cloud-0.0.33.dist-info}/entry_points.txt +0 -0
- {rpyc_pve_cloud-0.0.31.dist-info → rpyc_pve_cloud-0.0.33.dist-info}/licenses/LICENSE.md +0 -0
- {rpyc_pve_cloud-0.0.31.dist-info → rpyc_pve_cloud-0.0.33.dist-info}/top_level.txt +0 -0
pve_cloud_rpc/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.33"
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
# Copyright (c) HashiCorp, Inc.
|
|
2
|
-
# SPDX-License-Identifier: MPL-2.0
|
|
3
|
-
|
|
4
1
|
# -*- coding: utf-8 -*-
|
|
5
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
6
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
@@ -27,7 +24,7 @@ _sym_db = _symbol_database.Default()
|
|
|
27
24
|
|
|
28
25
|
|
|
29
26
|
|
|
30
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0chealth.proto\x12\x06protos\"
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0chealth.proto\x12\x06protos\"(\n\x12HealthCheckRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\"\x94\x01\n\x13HealthCheckResponse\x12\x39\n\x06status\x18\x01 \x01(\x0e\x32).protos.HealthCheckResponse.ServingStatus\x12\x15\n\rerror_message\x18\x02 \x01(\t\"+\n\rServingStatus\x12\x0b\n\x07SERVING\x10\x00\x12\r\n\tMISSMATCH\x10\x01\x32J\n\x06Health\x12@\n\x05\x43heck\x12\x1a.protos.HealthCheckRequest\x1a\x1b.protos.HealthCheckResponseBQZOgithub.com/Proxmox-Cloud/terraform-provider-pxc/internal/provider/protos;protosb\x06proto3')
|
|
31
28
|
|
|
32
29
|
_globals = globals()
|
|
33
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -36,11 +33,11 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
36
33
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
37
34
|
_globals['DESCRIPTOR']._serialized_options = b'ZOgithub.com/Proxmox-Cloud/terraform-provider-pxc/internal/provider/protos;protos'
|
|
38
35
|
_globals['_HEALTHCHECKREQUEST']._serialized_start=24
|
|
39
|
-
_globals['_HEALTHCHECKREQUEST']._serialized_end=
|
|
40
|
-
_globals['_HEALTHCHECKRESPONSE']._serialized_start=
|
|
41
|
-
_globals['_HEALTHCHECKRESPONSE']._serialized_end=
|
|
42
|
-
_globals['_HEALTHCHECKRESPONSE_SERVINGSTATUS']._serialized_start=
|
|
43
|
-
_globals['_HEALTHCHECKRESPONSE_SERVINGSTATUS']._serialized_end=
|
|
44
|
-
_globals['_HEALTH']._serialized_start=
|
|
45
|
-
_globals['_HEALTH']._serialized_end=
|
|
36
|
+
_globals['_HEALTHCHECKREQUEST']._serialized_end=64
|
|
37
|
+
_globals['_HEALTHCHECKRESPONSE']._serialized_start=67
|
|
38
|
+
_globals['_HEALTHCHECKRESPONSE']._serialized_end=215
|
|
39
|
+
_globals['_HEALTHCHECKRESPONSE_SERVINGSTATUS']._serialized_start=172
|
|
40
|
+
_globals['_HEALTHCHECKRESPONSE_SERVINGSTATUS']._serialized_end=215
|
|
41
|
+
_globals['_HEALTH']._serialized_start=217
|
|
42
|
+
_globals['_HEALTH']._serialized_end=291
|
|
46
43
|
# @@protoc_insertion_point(module_scope)
|
pve_cloud_rpc/server.py
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
# Copyright (c) HashiCorp, Inc.
|
|
2
|
-
# SPDX-License-Identifier: MPL-2.0
|
|
3
|
-
|
|
4
1
|
import asyncio, asyncssh
|
|
5
2
|
import grpc
|
|
6
3
|
import pve_cloud_rpc.protos.cloud_pb2 as cloud_pb2
|
|
@@ -15,17 +12,16 @@ import sys
|
|
|
15
12
|
|
|
16
13
|
|
|
17
14
|
class HealthServicer(health_pb2_grpc.HealthServicer):
|
|
18
|
-
def __init__(self):
|
|
19
|
-
self._statuses = {}
|
|
20
15
|
|
|
16
|
+
# this also performs the py-pve-cloud version check to not run against incompatible
|
|
17
|
+
# installed proxmox cloud versions
|
|
21
18
|
async def Check(self, request, context):
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
self._statuses[service_name] = status
|
|
19
|
+
target_pve = request.target_pve
|
|
20
|
+
try:
|
|
21
|
+
get_online_pve_host(target_pve, skip_py_cloud_check=False) # actually perform the check
|
|
22
|
+
return health_pb2.HealthCheckResponse(status=health_pb2.HealthCheckResponse.SERVING)
|
|
23
|
+
except RuntimeError as e:
|
|
24
|
+
return health_pb2.HealthCheckResponse(status=health_pb2.HealthCheckResponse.MISSMATCH, error_message=f"py-pve-cloud version check failed with: {e}") # go provider process will kill
|
|
29
25
|
|
|
30
26
|
|
|
31
27
|
class CloudServiceServicer(cloud_pb2_grpc.CloudServiceServicer):
|
|
@@ -139,21 +135,12 @@ async def serve():
|
|
|
139
135
|
|
|
140
136
|
health_servicer = HealthServicer()
|
|
141
137
|
health_pb2_grpc.add_HealthServicer_to_server(health_servicer, server)
|
|
142
|
-
|
|
143
|
-
# if is_port_bound(50052): # google quirks nice
|
|
144
|
-
# raise RuntimeError("PCRPC Already running / unclean shutdown!")
|
|
145
138
|
|
|
146
139
|
socket_file = f"/tmp/pc-rpc-{sys.argv[1]}.sock"
|
|
147
140
|
|
|
148
|
-
# listen_addr = "[::]:50052"
|
|
149
141
|
server.add_insecure_port(f"unix://{socket_file}")
|
|
150
142
|
await server.start()
|
|
151
143
|
|
|
152
|
-
health_servicer.set_status(
|
|
153
|
-
"", # empty = overall server health
|
|
154
|
-
health_pb2.HealthCheckResponse.SERVING
|
|
155
|
-
)
|
|
156
|
-
# print(f"gRPC AsyncIO server running on {listen_addr}")
|
|
157
144
|
print(f"gRPC AsyncIO server running on {socket_file}")
|
|
158
145
|
try:
|
|
159
146
|
await server.wait_for_termination()
|
|
@@ -167,6 +154,5 @@ async def serve():
|
|
|
167
154
|
os.remove(socket_file)
|
|
168
155
|
|
|
169
156
|
|
|
170
|
-
|
|
171
157
|
def main():
|
|
172
158
|
asyncio.run(serve())
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rpyc-pve-cloud
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.33
|
|
4
4
|
Author-email: Tobias Huebner <tobias.huebner@vmzberlin.com>
|
|
5
5
|
License-Expression: GPL-3.0-or-later
|
|
6
6
|
License-File: LICENSE.md
|
|
7
|
-
Requires-Dist: py-pve-cloud<0.14.0,>=0.13.
|
|
7
|
+
Requires-Dist: py-pve-cloud<0.14.0,>=0.13.14
|
|
8
8
|
Requires-Dist: grpcio==1.76.0
|
|
9
9
|
Requires-Dist: asyncssh==2.21.0
|
|
10
10
|
Requires-Dist: protobuf==6.33.2
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
pve_cloud_rpc/_version.py,sha256=AGWXI5DVsNfiiV5VgHNNK08ZPMOHqnJB3xLlEoyC3hg,23
|
|
2
|
+
pve_cloud_rpc/server.py,sha256=0UMKGkT-HNEnx5rULEl5vRA0HtKMeLv3k7Apb7iUExQ,6209
|
|
3
|
+
pve_cloud_rpc/protos/cloud_pb2.py,sha256=8w_hu6psK9ooFbqPCGeTY398XbntH61I3b3k4jvQTcg,6133
|
|
4
|
+
pve_cloud_rpc/protos/cloud_pb2_grpc.py,sha256=FOC_MXEZkXe32dzxQua9zHBLWLjso1X-xqj0xTexfFg,15535
|
|
5
|
+
pve_cloud_rpc/protos/health_pb2.py,sha256=532OgHM0bPu6uyJNyYETlRJp9BzcCZ53fnrRtEu7bnA,2188
|
|
6
|
+
pve_cloud_rpc/protos/health_pb2_grpc.py,sha256=XXT8lsH8YgKLqn07YfigSQ6TNW6s-P4V6S-X69fLfh0,3368
|
|
7
|
+
rpyc_pve_cloud-0.0.33.dist-info/licenses/LICENSE.md,sha256=ADUqsZhl4juwq34PRTMiBqumpm11s_PMli_dZQjWPqQ,34260
|
|
8
|
+
rpyc_pve_cloud-0.0.33.dist-info/METADATA,sha256=EhVUHkGBXCaMYbQ_mOjcQSWclQOnjFUDZ5JCbZJqyN0,342
|
|
9
|
+
rpyc_pve_cloud-0.0.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
rpyc_pve_cloud-0.0.33.dist-info/entry_points.txt,sha256=h4ytTryc_8IlySP_ICyy6srHzF71qrQ0noUhqI-3aGw,52
|
|
11
|
+
rpyc_pve_cloud-0.0.33.dist-info/top_level.txt,sha256=CTGM4RRp33khtroUiv-RiYXI4h6W6AaQQGIvsbwAetM,14
|
|
12
|
+
rpyc_pve_cloud-0.0.33.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
pve_cloud_rpc/_version.py,sha256=YRrMDApG1V6fNZdI4BA631DmsqtamSXgI1yu0tnt4h0,23
|
|
2
|
-
pve_cloud_rpc/server.py,sha256=oZWZYAwQl8eCd4qHH0u7k11lVkPPdtcZrtjdArgh3vg,6507
|
|
3
|
-
pve_cloud_rpc/protos/cloud_pb2.py,sha256=O1DXdbm0KSG7Nose6XWfCz9VU2ujW0uK2CTwgFuuQA0,6201
|
|
4
|
-
pve_cloud_rpc/protos/cloud_pb2_grpc.py,sha256=mDHCc8Sc-dGhISEUchfmJI74rISbdysNUzkDhOyTQ8I,15603
|
|
5
|
-
pve_cloud_rpc/protos/health_pb2.py,sha256=t_Xinf3sAzzY-NL9g1LKFfnw2v7XhsEJ8mrKRhQLcEw,2286
|
|
6
|
-
pve_cloud_rpc/protos/health_pb2_grpc.py,sha256=h4NndEaW_Em92bktRkL1VqT_WIVqfifQg_SVbAOYjfc,3436
|
|
7
|
-
rpyc_pve_cloud-0.0.31.dist-info/licenses/LICENSE.md,sha256=ADUqsZhl4juwq34PRTMiBqumpm11s_PMli_dZQjWPqQ,34260
|
|
8
|
-
rpyc_pve_cloud-0.0.31.dist-info/METADATA,sha256=bimPX54aYJQG_EvRLIaYDKZ2GIhPz5qvGPrF0y1TzaA,342
|
|
9
|
-
rpyc_pve_cloud-0.0.31.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
-
rpyc_pve_cloud-0.0.31.dist-info/entry_points.txt,sha256=h4ytTryc_8IlySP_ICyy6srHzF71qrQ0noUhqI-3aGw,52
|
|
11
|
-
rpyc_pve_cloud-0.0.31.dist-info/top_level.txt,sha256=CTGM4RRp33khtroUiv-RiYXI4h6W6AaQQGIvsbwAetM,14
|
|
12
|
-
rpyc_pve_cloud-0.0.31.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|