[pve-devel] [PATCH v2 guest-common 1/1] vzdump: schema: add 'notes-template' and 'protected' properties

Fabian Ebner f.ebner at proxmox.com
Tue Mar 29 14:53:19 CEST 2022


In command_line(), the notes-template string is printed, quoted, but
otherwise as is, which is a bit ugly for multi-line notes. But it is
part of the commandline, so print it.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

Changes from v1:
    * Rename parameter to notes-template and adapt description for new
      functionality.

 src/PVE/VZDump/Common.pm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/PVE/VZDump/Common.pm b/src/PVE/VZDump/Common.pm
index 83d7413..84c97ba 100644
--- a/src/PVE/VZDump/Common.pm
+++ b/src/PVE/VZDump/Common.pm
@@ -233,7 +233,21 @@ my $confdesc = {
 	type => 'string',
 	description => 'Backup all known guest systems included in the specified pool.',
 	optional => 1,
-    }
+    },
+    'notes-template' => {
+	type => 'string',
+	description => "Template string for generating notes for the backup(s). It can contain ".
+	    "variables which will be replaced by their values. Currently supported are \$CLUSTER, ".
+	    "\$GUESTNAME, \$NODE, and \$VMID, but more might be added in the future.",
+	requires => 'storage',
+	optional => 1,
+    },
+    protected => {
+	type => 'boolean',
+	description => "If true, mark backup(s) as protected.",
+	requires => 'storage',
+	optional => 1,
+    },
 };
 
 sub get_confdesc {
-- 
2.30.2






More information about the pve-devel mailing list