From b75893ddf490c309581b4afe9cb3e687dccc6f7b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Fri, 5 Nov 2021 14:03:47 +0100 Subject: [PATCH] schema: add proxmox-remote format/option MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit for usage in remote migration/replication. Signed-off-by: Fabian Grünbichler Reviewed-by: Fabian Ebner --- src/PVE/JSONSchema.pm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 09c8fc0..38be3f8 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -653,6 +653,33 @@ register_standard_option('bwlimit', { format => $bwlimit_format, }); +my $remote_format = { + host => { + type => 'string', + format_description => 'Remote Proxmox hostname or IP', + }, + port => { + type => 'integer', + optional => 1, + }, + apitoken => { + type => 'string', + format_description => 'A full Proxmox API token including the secret value.', + }, + fingerprint => get_standard_option( + 'fingerprint-sha256', + { + optional => 1, + format_description => 'Remote host\'s certificate fingerprint, if not trusted by system store.', + } + ), +}; +register_format('proxmox-remote', $remote_format); +register_standard_option('proxmox-remote', { + description => "Specification of a remote endpoint.", + type => 'string', format => 'proxmox-remote', +}); + # used for pve-tag-list in e.g., guest configs register_format('pve-tag', \&pve_verify_tag); sub pve_verify_tag { -- 2.39.2