5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-02-02 21:46:59 +03:00

register new standard option pve-config-digest

This commit is contained in:
Dietmar Maurer 2014-04-10 09:47:04 +02:00
parent a345b9d584
commit dc5eae7dbd
2 changed files with 8 additions and 6 deletions

View File

@ -76,6 +76,13 @@ PVE::JSONSchema::register_standard_option('pve-storage-id', {
type => 'string', format => 'pve-storage-id',
});
PVE::JSONSchema::register_standard_option('pve-config-digest', {
description => 'Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.',
type => 'string',
optional => 1,
maxLength => 40, # sha1 hex digest lenght is 40
});
my $format_list = {};
sub register_format {

View File

@ -84,12 +84,7 @@ sub updateSchema {
}
}
$props->{digest} = {
type => 'string',
description => 'Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.',
maxLength => 40,
optional => 1,
};
$props->{digest} = get_standard_option('pve-config-digest');
$props->{delete} = {
type => 'string', format => 'pve-configid-list',