]> git.proxmox.com Git - pve-common.git/commitdiff
schema: add proxmox-remote format/option
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 5 Nov 2021 13:03:47 +0000 (14:03 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 11 Nov 2021 09:39:58 +0000 (10:39 +0100)
for usage in remote migration/replication.

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

index 09c8fc0e20e3c969945f05b2a40d5c4a6fd6ddb7..38be3f8e9df00db3b310a463e7610edf8bd0ce7c 100644 (file)
@@ -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 {