From c5f1c52da0139817d128e963f38a5f999efac7cb Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 18 Dec 2013 11:01:59 +0100 Subject: [PATCH] Migration: Revert dumping custom vars as macros. Refs #5364 --- tools/migration/icinga2-migrate-config | 44 -------------------------- 1 file changed, 44 deletions(-) diff --git a/tools/migration/icinga2-migrate-config b/tools/migration/icinga2-migrate-config index e23889005..707ebdc5e 100755 --- a/tools/migration/icinga2-migrate-config +++ b/tools/migration/icinga2-migrate-config @@ -3957,17 +3957,6 @@ sub dump_service_2x { dump_config_line($icinga2_cfg, "\t\t$custom_key = \"$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\","); } dump_config_line($icinga2_cfg, "\t},"); - - dump_config_line($icinga2_cfg, "\tmacros += {"); - foreach my $custom_key (keys %{$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) { - if ($custom_key !~ /^_/) { - next; - } - - my $key = substr($custom_key, 1); - dump_config_line($icinga2_cfg, "\t\t_SERVICE$key = \"$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\","); - } - dump_config_line($icinga2_cfg, "\t},"); } dump_config_line($icinga2_cfg, ""); @@ -4050,17 +4039,6 @@ sub dump_host_2x { dump_config_line($icinga2_cfg, "\t\t$custom_key = \"$host_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\","); } dump_config_line($icinga2_cfg, "\t},"); - - dump_config_line($icinga2_cfg, "\tmacros += {"); - foreach my $custom_key (keys %{$host_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) { - if ($custom_key !~ /^_/) { - next; - } - - my $key = substr($custom_key, 1); - dump_config_line($icinga2_cfg, "\t\t_HOST$key = \"$host_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\","); - } - dump_config_line($icinga2_cfg, "\t},"); } #################################################### @@ -4245,17 +4223,6 @@ sub dump_host_2x { dump_config_line($icinga2_cfg, "\t\t\t$custom_key = \"$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\","); } dump_config_line($icinga2_cfg, "\t\t},"); - - dump_config_line($icinga2_cfg, "\t\tmacros += {"); - foreach my $custom_key (keys %{$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) { - if ($custom_key !~ /^_/) { - next; - } - - my $key = substr($custom_key, 1); - dump_config_line($icinga2_cfg, "\t\t\t_SERVICE$key = \"$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\","); - } - dump_config_line($icinga2_cfg, "\t\t},"); } dump_config_line($icinga2_cfg, "\t},"); @@ -4353,17 +4320,6 @@ sub dump_user_2x { dump_config_line($icinga2_cfg, "\t\t$custom_key = \"$user_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\","); } dump_config_line($icinga2_cfg, "\t},"); - - dump_config_line($icinga2_cfg, "\tmacros += {"); - foreach my $custom_key (keys %{$user_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) { - if ($custom_key !~ /^_/) { - next; - } - - my $key = substr($custom_key, 1); - dump_config_line($icinga2_cfg, "\t\t_CONTACT$key = \"$user_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\","); - } - dump_config_line($icinga2_cfg, "\t},"); } dump_config_line($icinga2_cfg, ""); -- 2.40.0