Skip Menu |

This queue is for tickets about the Nagios-Object CPAN distribution.

Report information
The Basics
Id: 63805
Status: resolved
Priority: 0/
Queue: Nagios-Object

People
Owner: duncan_j_ferguson [...] yahoo.co.uk
Requestors: PIRZYK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.21.12
Fixed in: (no value)



Subject: Certain Object methods should return array references and not scalars
The host_name and hostgroup_name methods in the ServiceEscalation, ServiceDependency, HostEscalation and HostDependency objects should be List of hosts/hostgroups and not scalars. Patch applied fixes this.
Subject: perl-Nagios-Object-0.21.12-array_fields.patch
--- ./lib/Nagios/Object.pm.orig 2010-11-29 15:36:34.000000000 -0500 +++ ./lib/Nagios/Object.pm 2010-11-30 08:48:24.000000000 -0500 @@ -255,7 +255,7 @@ }, ServiceEscalation => { use => [ 'Nagios::ServiceEscalation', 280 ], - host_name => [ 'Nagios::Host', 280 ], + host_name => [ ['Nagios::Host'], 280 ], hostgroup_name => [ ['Nagios::HostGroup'], 280 ], service_description => [ 'Nagios::Service', 280 ], contacts => [ ['Nagios::Contact'], 280 ], @@ -271,11 +271,11 @@ }, ServiceDependency => { use => [ 'Nagios::ServiceDependency', 280 ], - dependent_host_name => [ 'Nagios::Host', 280 ], + dependent_host_name => [ ['Nagios::Host'], 280 ], dependent_service_description => [ 'Nagios::Service', 280 ], - hostgroup_name => [ 'Nagios::HostGroup', 280 ], - dependent_hostgroup_name => [ 'Nagios::HostGroup', 280 ], - host_name => [ 'Nagios::Host', 280 ], + hostgroup_name => [ ['Nagios::HostGroup'], 280 ], + dependent_hostgroup_name => [ ['Nagios::HostGroup'], 280 ], + host_name => [ ['Nagios::Host'], 280 ], service_description => [ 'Nagios::Service', 280 ], inherits_parent => [ 'INTEGER', 280 ], execution_failure_criteria => [ [qw(o w u c n)], 280 ], @@ -288,8 +288,8 @@ }, HostEscalation => { use => [ 'Nagios::HostEscalation', 280 ], - host_name => [ 'Nagios::Host', 280 ], - hostgroup => [ 'Nagios::HostGroup', 280 ], + host_name => [ ['Nagios::Host'], 280 ], + hostgroup => [ ['Nagios::HostGroup'], 280 ], contacts => [ ['Nagios::Contact'], 280 ], contact_groups => [ ['Nagios::ContactGroup'], 280 ], first_notification => [ 'INTEGER', 280 ], @@ -302,9 +302,10 @@ }, HostDependency => { use => [ 'Nagios::HostDependency', 280 ], - dependent_host_name => [ 'Nagios::Host', 280 ], - dependent_hostgroup_name => [ 'Nagios::HostGroup', 280 ], - host_name => [ 'Nagios::Host', 280 ], + dependent_host_name => [ ['Nagios::Host'], 280 ], + dependent_hostgroup_name => [ ['Nagios::HostGroup'], 280 ], + host_name => [ ['Nagios::Host'], 280 ], + hostgroup_name => [ ['Nagios::HostGroup'], 280 ], inherits_parent => [ 'INTEGER', 16 ], notification_failure_criteria => [ [qw(o w u c n)], 280 ], notification_failure_options => [ [qw(o w u c n)], 280 ],
Fix in git.