rpyc-pve-cloud 0.2.0__py3-none-any.whl → 0.2.0rc0__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 +25 -29
- pve_cloud_rpc/protos/cloud_pb2_grpc.py +0 -43
- pve_cloud_rpc/server.py +36 -68
- {rpyc_pve_cloud-0.2.0.dist-info → rpyc_pve_cloud-0.2.0rc0.dist-info}/METADATA +2 -2
- rpyc_pve_cloud-0.2.0rc0.dist-info/RECORD +12 -0
- rpyc_pve_cloud-0.2.0.dist-info/RECORD +0 -12
- {rpyc_pve_cloud-0.2.0.dist-info → rpyc_pve_cloud-0.2.0rc0.dist-info}/WHEEL +0 -0
- {rpyc_pve_cloud-0.2.0.dist-info → rpyc_pve_cloud-0.2.0rc0.dist-info}/entry_points.txt +0 -0
- {rpyc_pve_cloud-0.2.0.dist-info → rpyc_pve_cloud-0.2.0rc0.dist-info}/licenses/LICENSE.md +0 -0
- {rpyc_pve_cloud-0.2.0.dist-info → rpyc_pve_cloud-0.2.0rc0.dist-info}/top_level.txt +0 -0
pve_cloud_rpc/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.0"
|
|
1
|
+
__version__ = "0.2.0-rc0"
|
|
@@ -24,7 +24,7 @@ _sym_db = _symbol_database.Default()
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x63loud.proto\x12\x06protos\",\n\x16GetPveInventoryRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\"B\n\x17GetPveInventoryResponse\x12\x11\n\tinventory\x18\x01 \x01(\t\x12\x14\n\x0c\x63loud_domain\x18\x02 \x01(\t\"+\n\x15GetProxmoxHostRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\"*\n\x16GetProxmoxHostResponse\x12\x10\n\x08pve_host\x18\x01 \x01(\t\"\xa9\x01\n\x14GetProxmoxApiRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x10\n\x08\x61pi_path\x18\x02 \x01(\t\x12;\n\x08get_args\x18\x03 \x03(\x0b\x32).protos.GetProxmoxApiRequest.GetArgsEntry\x1a.\n\x0cGetArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x15GetProxmoxApiResponse\x12\x11\n\tjson_resp\x18\x01 \x01(\t\"\xb8\x01\n\x17\x43reateProxmoxApiRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x10\n\x08\x61pi_path\x18\x02 \x01(\t\x12\x44\n\x0b\x63reate_args\x18\x03 \x03(\x0b\x32/.protos.CreateProxmoxApiRequest.CreateArgsEntry\x1a\x31\n\x0f\x43reateArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"@\n\x18\x43reateProxmoxApiResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x13\n\x0b\x65rr_message\x18\x02 \x01(\t\"?\n\x17\x44\x65leteProxmoxApiRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x10\n\x08\x61pi_path\x18\x02 \x01(\t\"@\n\x18\x44\x65leteProxmoxApiResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x13\n\x0b\x65rr_message\x18\x02 \x01(\t\"\x87\x01\n\x10GetSshKeyRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x32\n\x08key_type\x18\x02 \x01(\x0e\x32 .protos.GetSshKeyRequest.KeyType\"+\n\x07KeyType\x12\x0e\n\nAUTOMATION\x10\x00\x12\x10\n\x0cPVE_HOST_RSA\x10\x01\" \n\x11GetSshKeyResponse\x12\x0b\n\x03key\x18\x01 \x01(\t\"*\n\x14GetCephAccessRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\"A\n\x15GetCephAccessResponse\x12\x11\n\tceph_conf\x18\x01 \x01(\t\x12\x15\n\radmin_keyring\x18\x02 \x01(\t\">\n\x14GetKubeconfigRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x12\n\nstack_name\x18\x02 \x01(\t\"\'\n\x15GetKubeconfigResponse\x12\x0e\n\x06\x63onfig\x18\x01 \x01(\t\"+\n\x15GetClusterVarsRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\"&\n\x16GetClusterVarsResponse\x12\x0c\n\x04vars\x18\x01 \x01(\t\"T\n\x19GetCloudFileSecretRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x13\n\x0bsecret_name\x18\x02 \x01(\t\x12\x0e\n\x06rstrip\x18\x03 \x01(\x08\",\n\x1aGetCloudFileSecretResponse\x12\x0e\n\x06secret\x18\x01 \x01(\t\"\
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x63loud.proto\x12\x06protos\",\n\x16GetPveInventoryRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\"B\n\x17GetPveInventoryResponse\x12\x11\n\tinventory\x18\x01 \x01(\t\x12\x14\n\x0c\x63loud_domain\x18\x02 \x01(\t\"+\n\x15GetProxmoxHostRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\"*\n\x16GetProxmoxHostResponse\x12\x10\n\x08pve_host\x18\x01 \x01(\t\"\xa9\x01\n\x14GetProxmoxApiRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x10\n\x08\x61pi_path\x18\x02 \x01(\t\x12;\n\x08get_args\x18\x03 \x03(\x0b\x32).protos.GetProxmoxApiRequest.GetArgsEntry\x1a.\n\x0cGetArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x15GetProxmoxApiResponse\x12\x11\n\tjson_resp\x18\x01 \x01(\t\"\xb8\x01\n\x17\x43reateProxmoxApiRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x10\n\x08\x61pi_path\x18\x02 \x01(\t\x12\x44\n\x0b\x63reate_args\x18\x03 \x03(\x0b\x32/.protos.CreateProxmoxApiRequest.CreateArgsEntry\x1a\x31\n\x0f\x43reateArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"@\n\x18\x43reateProxmoxApiResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x13\n\x0b\x65rr_message\x18\x02 \x01(\t\"?\n\x17\x44\x65leteProxmoxApiRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x10\n\x08\x61pi_path\x18\x02 \x01(\t\"@\n\x18\x44\x65leteProxmoxApiResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x13\n\x0b\x65rr_message\x18\x02 \x01(\t\"\x87\x01\n\x10GetSshKeyRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x32\n\x08key_type\x18\x02 \x01(\x0e\x32 .protos.GetSshKeyRequest.KeyType\"+\n\x07KeyType\x12\x0e\n\nAUTOMATION\x10\x00\x12\x10\n\x0cPVE_HOST_RSA\x10\x01\" \n\x11GetSshKeyResponse\x12\x0b\n\x03key\x18\x01 \x01(\t\"*\n\x14GetCephAccessRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\"A\n\x15GetCephAccessResponse\x12\x11\n\tceph_conf\x18\x01 \x01(\t\x12\x15\n\radmin_keyring\x18\x02 \x01(\t\">\n\x14GetKubeconfigRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x12\n\nstack_name\x18\x02 \x01(\t\"\'\n\x15GetKubeconfigResponse\x12\x0e\n\x06\x63onfig\x18\x01 \x01(\t\"+\n\x15GetClusterVarsRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\"&\n\x16GetClusterVarsResponse\x12\x0c\n\x04vars\x18\x01 \x01(\t\"T\n\x19GetCloudFileSecretRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x13\n\x0bsecret_name\x18\x02 \x01(\t\x12\x0e\n\x06rstrip\x18\x03 \x01(\x08\",\n\x1aGetCloudFileSecretResponse\x12\x0e\n\x06secret\x18\x01 \x01(\t\"m\n\x18\x43reateCloudSecretRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x13\n\x0bsecret_name\x18\x02 \x01(\t\x12\x13\n\x0bsecret_data\x18\x03 \x01(\t\x12\x13\n\x0bsecret_type\x18\x04 \x01(\t\"A\n\x19\x43reateCloudSecretResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x13\n\x0b\x65rr_message\x18\x02 \x01(\t\"C\n\x18\x44\x65leteCloudSecretRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x13\n\x0bsecret_name\x18\x02 \x01(\t\"A\n\x19\x44\x65leteCloudSecretResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x13\n\x0b\x65rr_message\x18\x02 \x01(\t\"@\n\x15GetCloudSecretRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x13\n\x0bsecret_name\x18\x02 \x01(\t\"(\n\x16GetCloudSecretResponse\x12\x0e\n\x06secret\x18\x01 \x01(\t\"A\n\x16GetCloudSecretsRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x13\n\x0bsecret_type\x18\x02 \x01(\t\"*\n\x17GetCloudSecretsResponse\x12\x0f\n\x07secrets\x18\x01 \x01(\t\">\n\x15GetVmVarsBlakeRequest\x12\x12\n\ntarget_pve\x18\x01 \x01(\t\x12\x11\n\tblake_ids\x18\x02 \x03(\t\"\x94\x01\n\x16GetVmVarsBlakeResponse\x12\x46\n\rblake_id_vars\x18\x01 \x03(\x0b\x32/.protos.GetVmVarsBlakeResponse.BlakeIdVarsEntry\x1a\x32\n\x10\x42lakeIdVarsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xeb\t\n\x0c\x43loudService\x12R\n\x13GetMasterKubeconfig\x12\x1c.protos.GetKubeconfigRequest\x1a\x1d.protos.GetKubeconfigResponse\x12O\n\x0eGetClusterVars\x12\x1d.protos.GetClusterVarsRequest\x1a\x1e.protos.GetClusterVarsResponse\x12[\n\x12GetCloudFileSecret\x12!.protos.GetCloudFileSecretRequest\x1a\".protos.GetCloudFileSecretResponse\x12X\n\x11\x43reateCloudSecret\x12 .protos.CreateCloudSecretRequest\x1a!.protos.CreateCloudSecretResponse\x12X\n\x11\x44\x65leteCloudSecret\x12 .protos.DeleteCloudSecretRequest\x1a!.protos.DeleteCloudSecretResponse\x12O\n\x0eGetCloudSecret\x12\x1d.protos.GetCloudSecretRequest\x1a\x1e.protos.GetCloudSecretResponse\x12R\n\x0fGetCloudSecrets\x12\x1e.protos.GetCloudSecretsRequest\x1a\x1f.protos.GetCloudSecretsResponse\x12L\n\rGetCephAccess\x12\x1c.protos.GetCephAccessRequest\x1a\x1d.protos.GetCephAccessResponse\x12@\n\tGetSshKey\x12\x18.protos.GetSshKeyRequest\x1a\x19.protos.GetSshKeyResponse\x12L\n\rGetProxmoxApi\x12\x1c.protos.GetProxmoxApiRequest\x1a\x1d.protos.GetProxmoxApiResponse\x12U\n\x10\x43reateProxmoxApi\x12\x1f.protos.CreateProxmoxApiRequest\x1a .protos.CreateProxmoxApiResponse\x12U\n\x10\x44\x65leteProxmoxApi\x12\x1f.protos.DeleteProxmoxApiRequest\x1a .protos.DeleteProxmoxApiResponse\x12O\n\x0eGetProxmoxHost\x12\x1d.protos.GetProxmoxHostRequest\x1a\x1e.protos.GetProxmoxHostResponse\x12R\n\x0fGetPveInventory\x12\x1e.protos.GetPveInventoryRequest\x1a\x1f.protos.GetPveInventoryResponse\x12O\n\x0eGetVmVarsBlake\x12\x1d.protos.GetVmVarsBlakeRequest\x1a\x1e.protos.GetVmVarsBlakeResponseBQZOgithub.com/Proxmox-Cloud/terraform-provider-pxc/internal/provider/protos;protosb\x06proto3')
|
|
28
28
|
|
|
29
29
|
_globals = globals()
|
|
30
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -84,32 +84,28 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
84
84
|
_globals['_GETCLOUDFILESECRETREQUEST']._serialized_end=1383
|
|
85
85
|
_globals['_GETCLOUDFILESECRETRESPONSE']._serialized_start=1385
|
|
86
86
|
_globals['_GETCLOUDFILESECRETRESPONSE']._serialized_end=1429
|
|
87
|
-
_globals['_CREATECLOUDSECRETREQUEST']._serialized_start=
|
|
88
|
-
_globals['_CREATECLOUDSECRETREQUEST']._serialized_end=
|
|
89
|
-
_globals['_CREATECLOUDSECRETRESPONSE']._serialized_start=
|
|
90
|
-
_globals['_CREATECLOUDSECRETRESPONSE']._serialized_end=
|
|
91
|
-
_globals['_DELETECLOUDSECRETREQUEST']._serialized_start=
|
|
92
|
-
_globals['_DELETECLOUDSECRETREQUEST']._serialized_end=
|
|
93
|
-
_globals['_DELETECLOUDSECRETRESPONSE']._serialized_start=
|
|
94
|
-
_globals['_DELETECLOUDSECRETRESPONSE']._serialized_end=
|
|
95
|
-
_globals['_GETCLOUDSECRETREQUEST']._serialized_start=
|
|
96
|
-
_globals['_GETCLOUDSECRETREQUEST']._serialized_end=
|
|
97
|
-
_globals['_GETCLOUDSECRETRESPONSE']._serialized_start=
|
|
98
|
-
_globals['_GETCLOUDSECRETRESPONSE']._serialized_end=
|
|
99
|
-
_globals['_GETCLOUDSECRETSREQUEST']._serialized_start=
|
|
100
|
-
_globals['_GETCLOUDSECRETSREQUEST']._serialized_end=
|
|
101
|
-
_globals['_GETCLOUDSECRETSRESPONSE']._serialized_start=
|
|
102
|
-
_globals['_GETCLOUDSECRETSRESPONSE']._serialized_end=
|
|
103
|
-
_globals['_GETVMVARSBLAKEREQUEST']._serialized_start=
|
|
104
|
-
_globals['_GETVMVARSBLAKEREQUEST']._serialized_end=
|
|
105
|
-
_globals['_GETVMVARSBLAKERESPONSE']._serialized_start=
|
|
106
|
-
_globals['_GETVMVARSBLAKERESPONSE']._serialized_end=
|
|
107
|
-
_globals['_GETVMVARSBLAKERESPONSE_BLAKEIDVARSENTRY']._serialized_start=
|
|
108
|
-
_globals['_GETVMVARSBLAKERESPONSE_BLAKEIDVARSENTRY']._serialized_end=
|
|
109
|
-
_globals['
|
|
110
|
-
_globals['
|
|
111
|
-
_globals['_GETCLOUDDOMAINRESPONSE']._serialized_start=2335
|
|
112
|
-
_globals['_GETCLOUDDOMAINRESPONSE']._serialized_end=2375
|
|
113
|
-
_globals['_CLOUDSERVICE']._serialized_start=2378
|
|
114
|
-
_globals['_CLOUDSERVICE']._serialized_end=3718
|
|
87
|
+
_globals['_CREATECLOUDSECRETREQUEST']._serialized_start=1431
|
|
88
|
+
_globals['_CREATECLOUDSECRETREQUEST']._serialized_end=1540
|
|
89
|
+
_globals['_CREATECLOUDSECRETRESPONSE']._serialized_start=1542
|
|
90
|
+
_globals['_CREATECLOUDSECRETRESPONSE']._serialized_end=1607
|
|
91
|
+
_globals['_DELETECLOUDSECRETREQUEST']._serialized_start=1609
|
|
92
|
+
_globals['_DELETECLOUDSECRETREQUEST']._serialized_end=1676
|
|
93
|
+
_globals['_DELETECLOUDSECRETRESPONSE']._serialized_start=1678
|
|
94
|
+
_globals['_DELETECLOUDSECRETRESPONSE']._serialized_end=1743
|
|
95
|
+
_globals['_GETCLOUDSECRETREQUEST']._serialized_start=1745
|
|
96
|
+
_globals['_GETCLOUDSECRETREQUEST']._serialized_end=1809
|
|
97
|
+
_globals['_GETCLOUDSECRETRESPONSE']._serialized_start=1811
|
|
98
|
+
_globals['_GETCLOUDSECRETRESPONSE']._serialized_end=1851
|
|
99
|
+
_globals['_GETCLOUDSECRETSREQUEST']._serialized_start=1853
|
|
100
|
+
_globals['_GETCLOUDSECRETSREQUEST']._serialized_end=1918
|
|
101
|
+
_globals['_GETCLOUDSECRETSRESPONSE']._serialized_start=1920
|
|
102
|
+
_globals['_GETCLOUDSECRETSRESPONSE']._serialized_end=1962
|
|
103
|
+
_globals['_GETVMVARSBLAKEREQUEST']._serialized_start=1964
|
|
104
|
+
_globals['_GETVMVARSBLAKEREQUEST']._serialized_end=2026
|
|
105
|
+
_globals['_GETVMVARSBLAKERESPONSE']._serialized_start=2029
|
|
106
|
+
_globals['_GETVMVARSBLAKERESPONSE']._serialized_end=2177
|
|
107
|
+
_globals['_GETVMVARSBLAKERESPONSE_BLAKEIDVARSENTRY']._serialized_start=2127
|
|
108
|
+
_globals['_GETVMVARSBLAKERESPONSE_BLAKEIDVARSENTRY']._serialized_end=2177
|
|
109
|
+
_globals['_CLOUDSERVICE']._serialized_start=2180
|
|
110
|
+
_globals['_CLOUDSERVICE']._serialized_end=3439
|
|
115
111
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -104,11 +104,6 @@ class CloudServiceStub(object):
|
|
|
104
104
|
request_serializer=cloud__pb2.GetPveInventoryRequest.SerializeToString,
|
|
105
105
|
response_deserializer=cloud__pb2.GetPveInventoryResponse.FromString,
|
|
106
106
|
_registered_method=True)
|
|
107
|
-
self.GetCloudDomain = channel.unary_unary(
|
|
108
|
-
'/protos.CloudService/GetCloudDomain',
|
|
109
|
-
request_serializer=cloud__pb2.GetCloudDomainRequest.SerializeToString,
|
|
110
|
-
response_deserializer=cloud__pb2.GetCloudDomainResponse.FromString,
|
|
111
|
-
_registered_method=True)
|
|
112
107
|
self.GetVmVarsBlake = channel.unary_unary(
|
|
113
108
|
'/protos.CloudService/GetVmVarsBlake',
|
|
114
109
|
request_serializer=cloud__pb2.GetVmVarsBlakeRequest.SerializeToString,
|
|
@@ -203,12 +198,6 @@ class CloudServiceServicer(object):
|
|
|
203
198
|
context.set_details('Method not implemented!')
|
|
204
199
|
raise NotImplementedError('Method not implemented!')
|
|
205
200
|
|
|
206
|
-
def GetCloudDomain(self, request, context):
|
|
207
|
-
"""Missing associated documentation comment in .proto file."""
|
|
208
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
209
|
-
context.set_details('Method not implemented!')
|
|
210
|
-
raise NotImplementedError('Method not implemented!')
|
|
211
|
-
|
|
212
201
|
def GetVmVarsBlake(self, request, context):
|
|
213
202
|
"""Missing associated documentation comment in .proto file."""
|
|
214
203
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
@@ -288,11 +277,6 @@ def add_CloudServiceServicer_to_server(servicer, server):
|
|
|
288
277
|
request_deserializer=cloud__pb2.GetPveInventoryRequest.FromString,
|
|
289
278
|
response_serializer=cloud__pb2.GetPveInventoryResponse.SerializeToString,
|
|
290
279
|
),
|
|
291
|
-
'GetCloudDomain': grpc.unary_unary_rpc_method_handler(
|
|
292
|
-
servicer.GetCloudDomain,
|
|
293
|
-
request_deserializer=cloud__pb2.GetCloudDomainRequest.FromString,
|
|
294
|
-
response_serializer=cloud__pb2.GetCloudDomainResponse.SerializeToString,
|
|
295
|
-
),
|
|
296
280
|
'GetVmVarsBlake': grpc.unary_unary_rpc_method_handler(
|
|
297
281
|
servicer.GetVmVarsBlake,
|
|
298
282
|
request_deserializer=cloud__pb2.GetVmVarsBlakeRequest.FromString,
|
|
@@ -687,33 +671,6 @@ class CloudService(object):
|
|
|
687
671
|
metadata,
|
|
688
672
|
_registered_method=True)
|
|
689
673
|
|
|
690
|
-
@staticmethod
|
|
691
|
-
def GetCloudDomain(request,
|
|
692
|
-
target,
|
|
693
|
-
options=(),
|
|
694
|
-
channel_credentials=None,
|
|
695
|
-
call_credentials=None,
|
|
696
|
-
insecure=False,
|
|
697
|
-
compression=None,
|
|
698
|
-
wait_for_ready=None,
|
|
699
|
-
timeout=None,
|
|
700
|
-
metadata=None):
|
|
701
|
-
return grpc.experimental.unary_unary(
|
|
702
|
-
request,
|
|
703
|
-
target,
|
|
704
|
-
'/protos.CloudService/GetCloudDomain',
|
|
705
|
-
cloud__pb2.GetCloudDomainRequest.SerializeToString,
|
|
706
|
-
cloud__pb2.GetCloudDomainResponse.FromString,
|
|
707
|
-
options,
|
|
708
|
-
channel_credentials,
|
|
709
|
-
insecure,
|
|
710
|
-
call_credentials,
|
|
711
|
-
compression,
|
|
712
|
-
wait_for_ready,
|
|
713
|
-
timeout,
|
|
714
|
-
metadata,
|
|
715
|
-
_registered_method=True)
|
|
716
|
-
|
|
717
674
|
@staticmethod
|
|
718
675
|
def GetVmVarsBlake(request,
|
|
719
676
|
target,
|
pve_cloud_rpc/server.py
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
-
import json
|
|
3
2
|
import socket
|
|
4
3
|
import sys
|
|
4
|
+
import json
|
|
5
5
|
|
|
6
6
|
import asyncssh
|
|
7
7
|
import grpc
|
|
8
8
|
import yaml
|
|
9
9
|
from pve_cloud.cli.pvclu import get_cluster_vars, get_ssh_master_kubeconfig
|
|
10
10
|
from pve_cloud.lib.inventory import *
|
|
11
|
-
from pve_cloud.orm.alchemy import ProxmoxCloudSecrets, VirtualMachineVars
|
|
12
|
-
from sqlalchemy import create_engine, delete, select
|
|
13
|
-
from sqlalchemy.exc import IntegrityError
|
|
14
|
-
from sqlalchemy.orm import Session
|
|
15
11
|
|
|
16
12
|
import pve_cloud_rpc.protos.cloud_pb2 as cloud_pb2
|
|
17
13
|
import pve_cloud_rpc.protos.cloud_pb2_grpc as cloud_pb2_grpc
|
|
18
14
|
import pve_cloud_rpc.protos.health_pb2 as health_pb2
|
|
19
15
|
import pve_cloud_rpc.protos.health_pb2_grpc as health_pb2_grpc
|
|
16
|
+
from pve_cloud.orm.alchemy import ProxmoxCloudSecrets, VirtualMachineVars
|
|
17
|
+
from sqlalchemy import create_engine, select, delete
|
|
18
|
+
from sqlalchemy.orm import Session
|
|
19
|
+
from sqlalchemy.exc import IntegrityError
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class HealthServicer(health_pb2_grpc.HealthServicer):
|
|
@@ -43,11 +43,15 @@ async def get_engine(online_pve_host):
|
|
|
43
43
|
async with asyncssh.connect(
|
|
44
44
|
online_pve_host, username="root", known_hosts=None
|
|
45
45
|
) as conn:
|
|
46
|
-
cmd = await conn.run(
|
|
46
|
+
cmd = await conn.run(
|
|
47
|
+
"cat /etc/pve/cloud/secrets/patroni.pass", check=True
|
|
48
|
+
)
|
|
47
49
|
patroni_pass = cmd.stdout.rstrip()
|
|
48
50
|
|
|
49
51
|
# fetch cluster vars to get internal proxy ip
|
|
50
|
-
cmd = await conn.run(
|
|
52
|
+
cmd = await conn.run(
|
|
53
|
+
"cat /etc/pve/cloud/cluster_vars.yaml", check=True
|
|
54
|
+
)
|
|
51
55
|
cluster_vars = yaml.safe_load(cmd.stdout)
|
|
52
56
|
|
|
53
57
|
# build the connection string
|
|
@@ -102,10 +106,10 @@ class CloudServiceServicer(cloud_pb2_grpc.CloudServiceServicer):
|
|
|
102
106
|
|
|
103
107
|
return cloud_pb2.GetCloudFileSecretResponse(secret=catted_secret)
|
|
104
108
|
|
|
109
|
+
|
|
105
110
|
# non file proxmox cloud secrets are stored in the patroni database
|
|
106
111
|
async def CreateCloudSecret(self, request, context):
|
|
107
112
|
target_pve = request.target_pve
|
|
108
|
-
cloud_domain = request.cloud_domain
|
|
109
113
|
secret_name = request.secret_name
|
|
110
114
|
secret_data = json.loads(request.secret_data)
|
|
111
115
|
secret_type = request.secret_type
|
|
@@ -115,56 +119,49 @@ class CloudServiceServicer(cloud_pb2_grpc.CloudServiceServicer):
|
|
|
115
119
|
|
|
116
120
|
with Session(engine) as session:
|
|
117
121
|
try:
|
|
118
|
-
session.add(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
)
|
|
125
|
-
)
|
|
122
|
+
session.add(ProxmoxCloudSecrets(
|
|
123
|
+
target_pve=target_pve,
|
|
124
|
+
secret_name=secret_name,
|
|
125
|
+
secret_data=secret_data,
|
|
126
|
+
secret_type=secret_type
|
|
127
|
+
))
|
|
126
128
|
session.commit()
|
|
127
|
-
|
|
129
|
+
|
|
128
130
|
except IntegrityError as e:
|
|
129
131
|
session.rollback()
|
|
130
|
-
return cloud_pb2.CreateCloudSecretResponse(
|
|
131
|
-
success=False, err_message=str(e)
|
|
132
|
-
)
|
|
132
|
+
return cloud_pb2.CreateCloudSecretResponse(success=False, err_message=str(e))
|
|
133
133
|
|
|
134
134
|
return cloud_pb2.CreateCloudSecretResponse(success=True)
|
|
135
135
|
|
|
136
|
+
|
|
136
137
|
async def DeleteCloudSecret(self, request, context):
|
|
137
138
|
target_pve = request.target_pve
|
|
138
139
|
secret_name = request.secret_name
|
|
139
|
-
cloud_domain = request.cloud_domain
|
|
140
140
|
|
|
141
141
|
online_pve_host = get_online_pve_host(target_pve, skip_py_cloud_check=True)
|
|
142
142
|
engine = await get_engine(online_pve_host)
|
|
143
143
|
|
|
144
144
|
with Session(engine) as session:
|
|
145
145
|
stmt = delete(ProxmoxCloudSecrets).where(
|
|
146
|
-
ProxmoxCloudSecrets.
|
|
147
|
-
ProxmoxCloudSecrets.secret_name == secret_name
|
|
146
|
+
ProxmoxCloudSecrets.target_pve == target_pve,
|
|
147
|
+
ProxmoxCloudSecrets.secret_name == secret_name
|
|
148
148
|
)
|
|
149
|
-
|
|
149
|
+
|
|
150
150
|
result = session.execute(stmt)
|
|
151
151
|
session.commit()
|
|
152
152
|
|
|
153
153
|
return cloud_pb2.DeleteCloudSecretResponse(success=True)
|
|
154
154
|
|
|
155
|
+
|
|
155
156
|
async def GetCloudSecret(self, request, context):
|
|
156
157
|
target_pve = request.target_pve
|
|
157
158
|
secret_name = request.secret_name
|
|
158
|
-
cloud_domain = request.cloud_domain
|
|
159
159
|
|
|
160
160
|
online_pve_host = get_online_pve_host(target_pve, skip_py_cloud_check=True)
|
|
161
161
|
engine = await get_engine(online_pve_host)
|
|
162
162
|
|
|
163
163
|
with Session(engine) as session:
|
|
164
|
-
stmt = select(ProxmoxCloudSecrets).where(
|
|
165
|
-
ProxmoxCloudSecrets.cloud_domain == cloud_domain
|
|
166
|
-
and ProxmoxCloudSecrets.secret_name == secret_name
|
|
167
|
-
)
|
|
164
|
+
stmt = select(ProxmoxCloudSecrets).where(ProxmoxCloudSecrets.target_pve == target_pve and ProxmoxCloudSecrets.secret_name == secret_name)
|
|
168
165
|
record = session.scalars(stmt).first()
|
|
169
166
|
|
|
170
167
|
return cloud_pb2.GetCloudSecretResponse(secret=json.dumps(record.secret_data))
|
|
@@ -173,44 +170,30 @@ class CloudServiceServicer(cloud_pb2_grpc.CloudServiceServicer):
|
|
|
173
170
|
async def GetCloudSecrets(self, request, context):
|
|
174
171
|
target_pve = request.target_pve
|
|
175
172
|
secret_type = request.secret_type
|
|
176
|
-
cloud_domain = request.cloud_domain
|
|
177
173
|
|
|
178
174
|
online_pve_host = get_online_pve_host(target_pve, skip_py_cloud_check=True)
|
|
179
175
|
engine = await get_engine(online_pve_host)
|
|
180
176
|
|
|
181
177
|
with Session(engine) as session:
|
|
182
|
-
stmt = select(ProxmoxCloudSecrets).where(
|
|
183
|
-
ProxmoxCloudSecrets.cloud_domain == cloud_domain,
|
|
184
|
-
ProxmoxCloudSecrets.secret_type == secret_type,
|
|
185
|
-
)
|
|
178
|
+
stmt = select(ProxmoxCloudSecrets).where(ProxmoxCloudSecrets.target_pve == target_pve and ProxmoxCloudSecrets.secret_type == secret_type)
|
|
186
179
|
records = session.scalars(stmt).all()
|
|
187
180
|
|
|
188
|
-
return cloud_pb2.GetCloudSecretsResponse(
|
|
189
|
-
|
|
190
|
-
{record.secret_name: record.secret_data for record in records}
|
|
191
|
-
)
|
|
192
|
-
)
|
|
181
|
+
return cloud_pb2.GetCloudSecretsResponse(secrets=json.dumps({record.secret_name: record.secret_data for record in records}))
|
|
182
|
+
|
|
193
183
|
|
|
194
184
|
async def GetVmVarsBlake(self, request, context):
|
|
195
185
|
blake_ids = request.blake_ids
|
|
196
186
|
target_pve = request.target_pve
|
|
197
|
-
cloud_domain = request.cloud_domain
|
|
198
187
|
|
|
199
188
|
online_pve_host = get_online_pve_host(target_pve, skip_py_cloud_check=True)
|
|
200
189
|
engine = await get_engine(online_pve_host)
|
|
201
190
|
|
|
202
191
|
with Session(engine) as session:
|
|
203
|
-
stmt = select(VirtualMachineVars).where(
|
|
204
|
-
VirtualMachineVars.blake_id.in_(blake_ids),
|
|
205
|
-
VirtualMachineVars.cloud_domain == cloud_domain,
|
|
206
|
-
)
|
|
192
|
+
stmt = select(VirtualMachineVars).where(VirtualMachineVars.blake_id.in_(blake_ids))
|
|
207
193
|
records = session.scalars(stmt).all()
|
|
208
194
|
|
|
209
|
-
return cloud_pb2.GetVmVarsBlakeResponse(
|
|
210
|
-
|
|
211
|
-
entry.blake_id: json.dumps(entry.vm_vars) for entry in records
|
|
212
|
-
}
|
|
213
|
-
)
|
|
195
|
+
return cloud_pb2.GetVmVarsBlakeResponse(blake_id_vars={entry.blake_id: json.dumps(entry.vm_vars) for entry in records})
|
|
196
|
+
|
|
214
197
|
|
|
215
198
|
async def GetCephAccess(self, request, context):
|
|
216
199
|
target_pve = request.target_pve
|
|
@@ -259,9 +242,7 @@ class CloudServiceServicer(cloud_pb2_grpc.CloudServiceServicer):
|
|
|
259
242
|
) as conn:
|
|
260
243
|
args_string = None
|
|
261
244
|
if request.get_args:
|
|
262
|
-
args_string = " ".join(
|
|
263
|
-
f"{k} '{v}'" for k, v in request.get_args.items()
|
|
264
|
-
)
|
|
245
|
+
args_string = " ".join(f"{k} '{v}'" for k, v in request.get_args.items())
|
|
265
246
|
|
|
266
247
|
cmd = await conn.run(
|
|
267
248
|
f"pvesh get {request.api_path} {args_string} --output-format json",
|
|
@@ -280,9 +261,7 @@ class CloudServiceServicer(cloud_pb2_grpc.CloudServiceServicer):
|
|
|
280
261
|
) as conn:
|
|
281
262
|
args_string = None
|
|
282
263
|
if request.create_args:
|
|
283
|
-
args_string = " ".join(
|
|
284
|
-
f"{k} '{v}'" for k, v in request.create_args.items()
|
|
285
|
-
)
|
|
264
|
+
args_string = " ".join(f"{k} '{v}'" for k, v in request.create_args.items())
|
|
286
265
|
try:
|
|
287
266
|
print(f"pvesh create {request.api_path} {args_string}")
|
|
288
267
|
cmd = await conn.run(
|
|
@@ -291,9 +270,7 @@ class CloudServiceServicer(cloud_pb2_grpc.CloudServiceServicer):
|
|
|
291
270
|
)
|
|
292
271
|
print(cmd.stdout)
|
|
293
272
|
except asyncssh.ProcessError as e:
|
|
294
|
-
return cloud_pb2.CreateProxmoxApiResponse(
|
|
295
|
-
success=False, err_message=f"Exit code {e.exit_status} - {e.stderr}"
|
|
296
|
-
)
|
|
273
|
+
return cloud_pb2.CreateProxmoxApiResponse(success=False, err_message=f"Exit code {e.exit_status} - {e.stderr}")
|
|
297
274
|
|
|
298
275
|
return cloud_pb2.CreateProxmoxApiResponse(success=True)
|
|
299
276
|
|
|
@@ -311,9 +288,7 @@ class CloudServiceServicer(cloud_pb2_grpc.CloudServiceServicer):
|
|
|
311
288
|
)
|
|
312
289
|
print(cmd.stdout)
|
|
313
290
|
except asyncssh.ProcessError as e:
|
|
314
|
-
return cloud_pb2.DeleteProxmoxApiResponse(
|
|
315
|
-
success=False, err_message=f"Exit code {e.exit_status} - {e.stderr}"
|
|
316
|
-
)
|
|
291
|
+
return cloud_pb2.DeleteProxmoxApiResponse(success=False, err_message=f"Exit code {e.exit_status} - {e.stderr}")
|
|
317
292
|
|
|
318
293
|
return cloud_pb2.DeleteProxmoxApiResponse(success=True)
|
|
319
294
|
|
|
@@ -323,12 +298,6 @@ class CloudServiceServicer(cloud_pb2_grpc.CloudServiceServicer):
|
|
|
323
298
|
|
|
324
299
|
return cloud_pb2.GetProxmoxHostResponse(pve_host=online_pve_host)
|
|
325
300
|
|
|
326
|
-
async def GetCloudDomain(self, request, context):
|
|
327
|
-
target_pve = request.target_pve
|
|
328
|
-
|
|
329
|
-
cloud_domain = get_cloud_domain(target_pve)
|
|
330
|
-
return cloud_pb2.GetCloudDomainResponse(domain=cloud_domain)
|
|
331
|
-
|
|
332
301
|
async def GetPveInventory(self, request, context):
|
|
333
302
|
target_pve = request.target_pve
|
|
334
303
|
|
|
@@ -339,7 +308,6 @@ class CloudServiceServicer(cloud_pb2_grpc.CloudServiceServicer):
|
|
|
339
308
|
inventory=yaml.safe_dump(pve_inventory), cloud_domain=cloud_domain
|
|
340
309
|
)
|
|
341
310
|
|
|
342
|
-
|
|
343
311
|
def is_port_bound(port, host="0.0.0.0"):
|
|
344
312
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
|
345
313
|
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rpyc-pve-cloud
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.0rc0
|
|
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
|
|
7
|
+
Requires-Dist: py-pve-cloud==0.15.0rc0
|
|
8
8
|
Requires-Dist: grpcio==1.76.0
|
|
9
9
|
Requires-Dist: asyncssh==2.22.0
|
|
10
10
|
Requires-Dist: protobuf==6.33.4
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
pve_cloud_rpc/_version.py,sha256=W0Nz2M74b-kThgrTvkhrB8zIno6lQEZG0KXlqDMEO3k,26
|
|
2
|
+
pve_cloud_rpc/server.py,sha256=5aqTe7nyoBS5TIIFh2HAm1I3s8p7Zjr4VH7xBZrcaSQ,13183
|
|
3
|
+
pve_cloud_rpc/protos/cloud_pb2.py,sha256=2FFa9SSpkdSD1ie_NiAGFGjz92yx028DhEALJazCIdE,11237
|
|
4
|
+
pve_cloud_rpc/protos/cloud_pb2_grpc.py,sha256=V-q4n-dI0nstsuHZLbNyaxk4-3jU8aTWqbeFR8p5SDk,27826
|
|
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.2.0rc0.dist-info/licenses/LICENSE.md,sha256=ADUqsZhl4juwq34PRTMiBqumpm11s_PMli_dZQjWPqQ,34260
|
|
8
|
+
rpyc_pve_cloud-0.2.0rc0.dist-info/METADATA,sha256=GR-y-u1pxB_Gdekwwy9mnW1ZpVU8l5_bExDtbU_is4I,338
|
|
9
|
+
rpyc_pve_cloud-0.2.0rc0.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
10
|
+
rpyc_pve_cloud-0.2.0rc0.dist-info/entry_points.txt,sha256=h4ytTryc_8IlySP_ICyy6srHzF71qrQ0noUhqI-3aGw,52
|
|
11
|
+
rpyc_pve_cloud-0.2.0rc0.dist-info/top_level.txt,sha256=CTGM4RRp33khtroUiv-RiYXI4h6W6AaQQGIvsbwAetM,14
|
|
12
|
+
rpyc_pve_cloud-0.2.0rc0.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
pve_cloud_rpc/_version.py,sha256=Zn1KFblwuFHiDRdRAiRnDBRkbPttWh44jKa5zG2ov0E,22
|
|
2
|
-
pve_cloud_rpc/server.py,sha256=TgdP7o_tUlL9eOOfLGrvvts80bzao6-5FmBvHkHbB6k,14096
|
|
3
|
-
pve_cloud_rpc/protos/cloud_pb2.py,sha256=ecbX9iJTH5fY7kqC1G5GGnGv9L_-EsvazO_iyH6_6eY,11942
|
|
4
|
-
pve_cloud_rpc/protos/cloud_pb2_grpc.py,sha256=wiLUdbVjdikJw9w0YVlazK92iJICxWOeSNe-wDaTumg,29554
|
|
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.2.0.dist-info/licenses/LICENSE.md,sha256=ADUqsZhl4juwq34PRTMiBqumpm11s_PMli_dZQjWPqQ,34260
|
|
8
|
-
rpyc_pve_cloud-0.2.0.dist-info/METADATA,sha256=KnsRXnXykBxUOie8lZkluZ9HgqwvhxpG4TnIw8v6Z5I,340
|
|
9
|
-
rpyc_pve_cloud-0.2.0.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
10
|
-
rpyc_pve_cloud-0.2.0.dist-info/entry_points.txt,sha256=h4ytTryc_8IlySP_ICyy6srHzF71qrQ0noUhqI-3aGw,52
|
|
11
|
-
rpyc_pve_cloud-0.2.0.dist-info/top_level.txt,sha256=CTGM4RRp33khtroUiv-RiYXI4h6W6AaQQGIvsbwAetM,14
|
|
12
|
-
rpyc_pve_cloud-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|