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:
parent
a345b9d584
commit
dc5eae7dbd
@ -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 {
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user