Merge branch 'ent-3554-7588-apply_policy-no-funciona' into 'develop'

Added new parameter in pandora_add_policy_queue

See merge request artica/pandorafms!2176

Former-commit-id: 65ceb6b0fe1bf2c81bcfb1ce946f7d73d2c68df2
This commit is contained in:
Daniel Rodriguez 2019-02-22 13:09:34 +01:00
commit bd6ac21595
1 changed files with 2 additions and 2 deletions

View File

@ -3611,7 +3611,7 @@ sub cli_apply_policy() {
my $policy_id = enterprise_hook('get_policy_id',[$dbh, safe_input($policy_name)]);
exist_check($policy_id,'policy',$policy_name);
my $ret = enterprise_hook('pandora_add_policy_queue', [$dbh, $conf, $policy_id, 'apply']);
my $ret = enterprise_hook('pandora_add_policy_queue', [$dbh, $conf, $policy_id, 'apply', 0, 1]);
if($ret == -1) {
print_log "[ERROR] Operation 'apply' cannot be added to policy '$policy_name' because is duplicated in queue or incompatible with others operations\n\n";
@ -3635,7 +3635,7 @@ sub cli_apply_all_policies() {
my $added = 0;
foreach my $policy (@{$policies}) {
my $ret = enterprise_hook('pandora_add_policy_queue', [$dbh, $conf, $policy->{'id'}, 'apply']);
my $ret = enterprise_hook('pandora_add_policy_queue', [$dbh, $conf, $policy->{'id'}, 'apply', 0, 1]);
if($ret != -1) {
$added++;
print_log "[INFO] Added operation 'apply' to policy '".safe_output($policy->{'name'})."'\n";