X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=blobdiff_plain;f=src%2FPVE%2FAPI2%2FFirewall%2FCluster.pm;h=8d575da5e85985d2b75cca6d86629dd91c520752;hp=10ad06253949b8c6a9e98411762c994c5e69a5ed;hb=5d38d64fa42881c571db1566cfcb350a3da31269;hpb=649e4d579b2b4d30fe6a17b4234cf440181cb5b6 diff --git a/src/PVE/API2/Firewall/Cluster.pm b/src/PVE/API2/Firewall/Cluster.pm index 10ad062..8d575da 100644 --- a/src/PVE/API2/Firewall/Cluster.pm +++ b/src/PVE/API2/Firewall/Cluster.pm @@ -85,9 +85,7 @@ __PACKAGE__->register_method({ my $cluster_conf = PVE::Firewall::load_clusterfw_conf(); - my $options = $cluster_conf->{options}; - - return $options; + return PVE::Firewall::copy_opject_with_digest($cluster_conf->{options}); }}); my $option_properties = { @@ -121,6 +119,7 @@ __PACKAGE__->register_method({ description => "A list of settings you want to delete.", optional => 1, }, + digest => get_standard_option('pve-config-digest'), }), }, returns => { type => "null" }, @@ -129,6 +128,9 @@ __PACKAGE__->register_method({ my $cluster_conf = PVE::Firewall::load_clusterfw_conf(); + my (undef, $digest) = PVE::Firewall::copy_opject_with_digest($cluster_conf->{options}); + PVE::Tools::assert_if_modified($digest, $param->{digest}); + if ($param->{delete}) { foreach my $opt (PVE::Tools::split_list($param->{delete})) { raise_param_exc({ delete => "no such option '$opt'" })