sub get_object {
my ($self, $otype) = @_;
- my $obj;
+ my $obj;
+
+ # FIXME: remove deprecated types and files with PMG 8.0
+ my $deprecated_types = {
+ 4004 => "Attach",
+ 4008 => "ReportSpam",
+ 4999 => "Counter",
+ };
# WHO OBJECTS
if ($otype == PMG::RuleDB::Domain::otype()) {
die "proxmox: unknown object type: ERROR";
}
+ if ( grep( $_ == $otype, keys %$deprecated_types)) {
+ syslog('warning', "proxmox: deprecated object of type %s found!",
+ $deprecated_types->{$otype});
+ }
return $obj;
}
+# FIXME: remove with PMG 8.0
sub load_counters_data {
my ($self) = @_;
package PMG::RuleDB::Attach;
+# FIXME: remove with PMG 8.0
+
use strict;
use warnings;
use DBI;
use Digest::SHA;
+use PVE::SafeSyslog;
+
use PMG::Utils;
use PMG::ModGroup;
use PMG::RuleDB::Object;
my ($self, $queue, $ruledb, $mod_group, $targets,
$msginfo, $vars, $marks) = @_;
+ syslog('warning', "%s: deprecated action 'Attach' will be removed with PMG 8.0.",
+ $queue->{logid},);
+
my $subgroups = $mod_group->subgroups($targets);
foreach my $ta (@$subgroups) {
package PMG::RuleDB::Counter;
+# FIXME: remove with PMG 8.0
+
use strict;
use warnings;
use DBI;
my ($self, $queue, $ruledb, $mod_group, $targets,
$msginfo, $vars, $marks) = @_;
+ syslog('warning', "%s: deprecated action 'Counter' will be removed with PMG 8.0.",
+ $queue->{logid},);
+
eval {
$ruledb->{dbh}->begin_work;
package PMG::RuleDB::ReportSpam;
+# FIXME: remove with PMG 8.0
+
use strict;
use warnings;
use DBI;
my ($self, $queue, $ruledb, $mod_group, $targets,
$msginfo, $vars, $marks) = @_;
+ syslog('warning', "%s: deprecated action 'Attach' will be removed with PMG 8.0.",
+ $queue->{logid},);
+
my $rulename = $vars->{RULE} // 'unknown';
my $subgroups = $mod_group->subgroups($targets);