]> git.proxmox.com Git - pve-common.git/commitdiff
schema: take over 'pve-targetstorage' option
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 28 Sep 2022 12:50:48 +0000 (14:50 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 4 Nov 2022 13:21:10 +0000 (14:21 +0100)
from qemu-server, for re-use in pve-container.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
src/PVE/JSONSchema.pm

index 54c149dc7a7f326acc36763ca17a75390ed7cf70..527e40980ffa86661484d0aa236f3e95861d68a9 100644 (file)
@@ -318,6 +318,13 @@ my $verify_idpair = sub {
     return $input;
 };
 
+PVE::JSONSchema::register_standard_option('pve-targetstorage', {
+    description => "Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself.",
+    type => 'string',
+    format => 'storage-pair-list',
+    optional => 1,
+});
+
 # note: this only checks a single list entry
 # when using a storage-pair-list map, you need to pass the full parameter to
 # parse_idmap