return $result;
}});
-my $option_properties = {
- enable => {
- type => 'integer',
- minimum => 0,
- optional => 1,
- },
- policy_in => {
- description => "Input policy.",
- type => 'string',
- optional => 1,
- enum => ['ACCEPT', 'REJECT', 'DROP'],
- },
- policy_out => {
- description => "Output policy.",
- type => 'string',
- optional => 1,
- enum => ['ACCEPT', 'REJECT', 'DROP'],
- },
-};
+my $option_properties = $PVE::Firewall::cluster_option_properties;
my $add_option_properties = sub {
my ($properties) = @_;
PVE::Firewall::save_clusterfw_conf($cluster_conf);
+ # instant firewall update when using double (anti-lockout) API call
+ # -> not waiting for a firewall update at the first (timestamp enable) set
+ if (defined($param->{enable}) && ($param->{enable} > 1)) {
+ PVE::Firewall::update();
+ }
+
return undef;
}});