2020-07-09 14:15:49 +03:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Stefan Reiter <s.reiter@proxmox.com>
|
|
|
|
Date: Wed, 8 Jul 2020 11:57:53 +0200
|
|
|
|
Subject: [PATCH] PVE: add query_proxmox_support QMP command
|
|
|
|
|
|
|
|
Generic interface for future use, currently used for PBS dirty-bitmap
|
|
|
|
backup support.
|
|
|
|
|
|
|
|
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
|
|
|
|
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
2020-11-24 18:41:20 +03:00
|
|
|
[PVE: query-proxmox-support: include library version]
|
|
|
|
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
|
2020-07-09 14:15:49 +03:00
|
|
|
---
|
2020-11-24 18:41:20 +03:00
|
|
|
pve-backup.c | 8 ++++++++
|
|
|
|
qapi/block-core.json | 25 +++++++++++++++++++++++++
|
|
|
|
2 files changed, 33 insertions(+)
|
2020-07-09 14:15:49 +03:00
|
|
|
|
|
|
|
diff --git a/pve-backup.c b/pve-backup.c
|
2020-11-24 18:41:20 +03:00
|
|
|
index bfb648d6b5..6bf138cfc6 100644
|
2020-07-09 14:15:49 +03:00
|
|
|
--- a/pve-backup.c
|
|
|
|
+++ b/pve-backup.c
|
2020-11-24 18:41:20 +03:00
|
|
|
@@ -1051,3 +1051,11 @@ BackupStatus *qmp_query_backup(Error **errp)
|
2020-07-09 14:15:49 +03:00
|
|
|
|
|
|
|
return info;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ProxmoxSupportStatus *qmp_query_proxmox_support(Error **errp)
|
|
|
|
+{
|
|
|
|
+ ProxmoxSupportStatus *ret = g_malloc0(sizeof(*ret));
|
2020-11-24 18:41:20 +03:00
|
|
|
+ ret->pbs_library_version = g_strdup(proxmox_backup_qemu_version());
|
2020-07-09 14:15:49 +03:00
|
|
|
+ ret->pbs_dirty_bitmap = true;
|
|
|
|
+ return ret;
|
|
|
|
+}
|
|
|
|
diff --git a/qapi/block-core.json b/qapi/block-core.json
|
2020-11-24 18:41:20 +03:00
|
|
|
index f782c2cf96..1ed5987c88 100644
|
2020-07-09 14:15:49 +03:00
|
|
|
--- a/qapi/block-core.json
|
|
|
|
+++ b/qapi/block-core.json
|
2020-11-24 18:41:20 +03:00
|
|
|
@@ -877,6 +877,31 @@
|
2020-07-09 14:15:49 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'backup-cancel' }
|
|
|
|
|
|
|
|
+##
|
|
|
|
+# @ProxmoxSupportStatus:
|
|
|
|
+#
|
|
|
|
+# Contains info about supported features added by Proxmox.
|
|
|
|
+#
|
|
|
|
+# @pbs-dirty-bitmap: True if dirty-bitmap-incremental backups to PBS are
|
|
|
|
+# supported.
|
|
|
|
+#
|
2020-11-24 18:41:20 +03:00
|
|
|
+# @pbs-library-version: Running version of libproxmox-backup-qemu0 library.
|
|
|
|
+#
|
2020-07-09 14:15:49 +03:00
|
|
|
+##
|
|
|
|
+{ 'struct': 'ProxmoxSupportStatus',
|
2020-11-24 18:41:20 +03:00
|
|
|
+ 'data': { 'pbs-dirty-bitmap': 'bool',
|
|
|
|
+ 'pbs-library-version': 'str' } }
|
2020-07-09 14:15:49 +03:00
|
|
|
+
|
|
|
|
+##
|
|
|
|
+# @query-proxmox-support:
|
|
|
|
+#
|
|
|
|
+# Returns information about supported features added by Proxmox.
|
|
|
|
+#
|
|
|
|
+# Returns: @ProxmoxSupportStatus
|
|
|
|
+#
|
|
|
|
+##
|
|
|
|
+{ 'command': 'query-proxmox-support', 'returns': 'ProxmoxSupportStatus' }
|
|
|
|
+
|
|
|
|
##
|
|
|
|
# @BlockDeviceTimedStats:
|
|
|
|
#
|