From 666b0d869c223c89dab5164398bbe37187ba9c12 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 28 Sep 2022 14:50:48 +0200 Subject: [PATCH] schema: take over 'pve-targetstorage' option MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit from qemu-server, for re-use in pve-container. Signed-off-by: Fabian Grünbichler Reviewed-by: Fiona Ebner --- src/PVE/JSONSchema.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 54c149d..527e409 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -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 -- 2.39.2