From efb5cc50c42bc27aec9409e723e3a717ed58c0a8 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 10 Feb 2009 17:33:26 -0600 Subject: Refixing #1420 - _naginator_name is only used for services According to: http://nagios.sourceforge.net/docs/3_0/customobjectvars.html the special underscore parameters are only supported on hosts, contacts, and services. This commit reverts most of the changes that set Nagios types to use such a parameter as the namevar. The original commit should have been broken into two commits: one to reorganize the file, and the other to make these changes. As it was, the revert was much harder than it should have been. Signed-off-by: Luke Kanies --- lib/puppet/external/nagios/base.rb | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'lib') diff --git a/lib/puppet/external/nagios/base.rb b/lib/puppet/external/nagios/base.rb index 6a0c1831c..d95b808dd 100755 --- a/lib/puppet/external/nagios/base.rb +++ b/lib/puppet/external/nagios/base.rb @@ -416,20 +416,18 @@ class Nagios::Base :dependent_service_description, :host_name, :hostgroup_name, :service_description, :inherits_parent, :execution_failure_criteria, :notification_failure_criteria, :dependency_period, - :register, :use, - :_naginator_name + :register, :use - setnamevar :_naginator_name + setnamevar :service_description end newtype :serviceescalation do setparameters :host_name, :hostgroup_name, :service_description, :contacts, :contact_groups, :first_notification, :last_notification, :notification_interval, :escalation_period, :escalation_options, - :register, :use, - :_naginator_name + :register, :use - setnamevar :_naginator_name + setnamevar :service_description end newtype :hostdependency do @@ -437,20 +435,18 @@ class Nagios::Base setparameters :dependent_host_name, :dependent_hostgroup_name, :host_name, :hostgroup_name, :inherits_parent, :execution_failure_criteria, :notification_failure_criteria, :dependency_period, - :register, :use, - :_naginator_name + :register, :use - setnamevar :_naginator_name + setnamevar :host_name end newtype :hostescalation do setparameters :host_name, :hostgroup_name, :contacts, :contact_groups, :first_notification, :last_notification, :notification_interval, :escalation_period, :escalation_options, - :register, :use, - :_naginator_name + :register, :use - setnamevar :_naginator_name + setnamevar :host_name end newtype :hostextinfo do @@ -467,10 +463,9 @@ class Nagios::Base setparameters :host_name, :service_description, :notes, :notes_url, :action_url, :icon_image, :icon_image_alt, - :register, :use, - :_naginator_name + :register, :use - setnamevar :_naginator_name + setnamevar :service_description end end -- cgit