From c71e785ff490a98c24ce4c8ed8bbebe07e045e47 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 10 Apr 2014 09:01:28 +0200 Subject: [PATCH] define standard option pve-config-digest --- src/PVE/Firewall.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index 6a96341..aa3555a 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -56,6 +56,14 @@ PVE::JSONSchema::register_standard_option('ipset-name', { maxLength => 20, }); +PVE::JSONSchema::register_standard_option('pve-config-digest', { + description => "This digest/signature can be used to prevent updates when the original configuration was changed by somebody else.", + type => 'string', + optional => 1, + maxLength => 27, + minLength => 27, +}); + my $security_group_pattern = '[A-Za-z][A-Za-z0-9\-\_]+'; PVE::JSONSchema::register_standard_option('pve-security-group-name', { @@ -791,12 +799,7 @@ my $rule_properties = { minimum => 0, optional => 1, }, - digest => { - type => 'string', - optional => 1, - maxLength => 27, - minLength => 27, - }, + digest => get_standard_option('pve-config-digest'), type => { type => 'string', optional => 1, -- 2.39.2