]>
Commit | Line | Data |
---|---|---|
3499c5b4 TL |
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Stefan Reiter <s.reiter@proxmox.com> | |
3 | Date: Wed, 8 Jul 2020 11:57:53 +0200 | |
4 | Subject: [PATCH] PVE: add query_proxmox_support QMP command | |
5 | ||
6 | Generic interface for future use, currently used for PBS dirty-bitmap | |
7 | backup support. | |
8 | ||
9 | Signed-off-by: Stefan Reiter <s.reiter@proxmox.com> | |
10 | Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> | |
32ee4115 SR |
11 | [PVE: query-proxmox-support: include library version] |
12 | Signed-off-by: Stefan Reiter <s.reiter@proxmox.com> | |
3499c5b4 | 13 | --- |
e9b36665 SR |
14 | pve-backup.c | 9 +++++++++ |
15 | qapi/block-core.json | 29 +++++++++++++++++++++++++++++ | |
16 | 2 files changed, 38 insertions(+) | |
3499c5b4 TL |
17 | |
18 | diff --git a/pve-backup.c b/pve-backup.c | |
4567474e | 19 | index c15abefdda..4684789813 100644 |
3499c5b4 TL |
20 | --- a/pve-backup.c |
21 | +++ b/pve-backup.c | |
8dca018b | 22 | @@ -1075,3 +1075,12 @@ BackupStatus *qmp_query_backup(Error **errp) |
3499c5b4 TL |
23 | |
24 | return info; | |
25 | } | |
26 | + | |
27 | +ProxmoxSupportStatus *qmp_query_proxmox_support(Error **errp) | |
28 | +{ | |
29 | + ProxmoxSupportStatus *ret = g_malloc0(sizeof(*ret)); | |
32ee4115 | 30 | + ret->pbs_library_version = g_strdup(proxmox_backup_qemu_version()); |
3499c5b4 | 31 | + ret->pbs_dirty_bitmap = true; |
e9b36665 | 32 | + ret->pbs_dirty_bitmap_savevm = true; |
3499c5b4 TL |
33 | + return ret; |
34 | +} | |
35 | diff --git a/qapi/block-core.json b/qapi/block-core.json | |
5b15e2ec | 36 | index 96bc696aaa..0b453c61d4 100644 |
3499c5b4 TL |
37 | --- a/qapi/block-core.json |
38 | +++ b/qapi/block-core.json | |
5b15e2ec | 39 | @@ -863,6 +863,35 @@ |
3499c5b4 TL |
40 | ## |
41 | { 'command': 'backup-cancel' } | |
42 | ||
43 | +## | |
44 | +# @ProxmoxSupportStatus: | |
45 | +# | |
46 | +# Contains info about supported features added by Proxmox. | |
47 | +# | |
48 | +# @pbs-dirty-bitmap: True if dirty-bitmap-incremental backups to PBS are | |
49 | +# supported. | |
50 | +# | |
e9b36665 SR |
51 | +# @pbs-dirty-bitmap-savevm: True if 'dirty-bitmaps' migration capability can |
52 | +# safely be set for savevm-async. | |
53 | +# | |
32ee4115 SR |
54 | +# @pbs-library-version: Running version of libproxmox-backup-qemu0 library. |
55 | +# | |
3499c5b4 TL |
56 | +## |
57 | +{ 'struct': 'ProxmoxSupportStatus', | |
32ee4115 | 58 | + 'data': { 'pbs-dirty-bitmap': 'bool', |
e9b36665 | 59 | + 'pbs-dirty-bitmap-savevm': 'bool', |
32ee4115 | 60 | + 'pbs-library-version': 'str' } } |
3499c5b4 TL |
61 | + |
62 | +## | |
63 | +# @query-proxmox-support: | |
64 | +# | |
65 | +# Returns information about supported features added by Proxmox. | |
66 | +# | |
67 | +# Returns: @ProxmoxSupportStatus | |
68 | +# | |
69 | +## | |
70 | +{ 'command': 'query-proxmox-support', 'returns': 'ProxmoxSupportStatus' } | |
71 | + | |
72 | ## | |
73 | # @BlockDeviceTimedStats: | |
74 | # |