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 {
}
}
- $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',