summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-10 17:33:26 -0600
committerJames Turnbull <james@lovedthanlost.net>2009-02-11 15:25:10 +1100
commitefb5cc50c42bc27aec9409e723e3a717ed58c0a8 (patch)
tree84d566de0568330b3a8bfeaa45fe29ae730aae95 /lib
parent32c2be926795ce3ce68f573367f7700e87ac8416 (diff)
downloadpuppet-efb5cc50c42bc27aec9409e723e3a717ed58c0a8.tar.gz
puppet-efb5cc50c42bc27aec9409e723e3a717ed58c0a8.tar.xz
puppet-efb5cc50c42bc27aec9409e723e3a717ed58c0a8.zip
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 <luke@madstop.com>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/external/nagios/base.rb25
1 files changed, 10 insertions, 15 deletions
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