diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 82df3828..84db7702 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1939,11 +1939,7 @@ __PACKAGE__->register_method({ properties => { node => get_standard_option('pve-node'), vmid => get_standard_option('pve-vmid'), - snapname => { - type => 'string', - description => "The name of the snapshot", - maxLength => 40, - }, + snapname => get_standard_option('pve-snapshot-name'), vmstate => { optional => 1, type => 'boolean', @@ -2002,11 +1998,7 @@ __PACKAGE__->register_method({ properties => { vmid => get_standard_option('pve-vmid'), node => get_standard_option('pve-node'), - snapname => { - type => 'string', - description => "The name of the snapshot", - maxLength => 40, - }, + snapname => get_standard_option('pve-snapshot-name'), }, }, returns => { @@ -2042,11 +2034,7 @@ __PACKAGE__->register_method({ properties => { node => get_standard_option('pve-node'), vmid => get_standard_option('pve-vmid'), - snapname => { - type => 'string', - description => "The name of the snapshot", - maxLength => 40, - }, + snapname => get_standard_option('pve-snapshot-name'), }, }, returns => { @@ -2091,11 +2079,7 @@ __PACKAGE__->register_method({ properties => { node => get_standard_option('pve-node'), vmid => get_standard_option('pve-vmid'), - snapname => { - type => 'string', - description => "The name of the snapshot", - maxLength => 40, - }, + snapname => get_standard_option('pve-snapshot-name'), }, }, returns => { diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 8ee0dacc..e0be68f7 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -54,6 +54,12 @@ PVE::JSONSchema::register_standard_option('pve-qm-stateuri', { optional => 1, }); +PVE::JSONSchema::register_standard_option('pve-snapshot-name', { + description => "The name of the snapshot.", + type => 'string', format => 'pve-configid', + maxLength => 40, +}); + #no warnings 'redefine'; unless(defined(&_VZSYSCALLS_H_)) {