bury all dead whitespace, better off to just do it in one command. i wonder why ss...
[torrus-plus.git] / src / lib / Torrus / Collector / CDef_Params.pm
blobad17d6d6ff947ee6fed289ee38a23be36f1f469b
2 # Copyright (C) 2004 Christian Schnidrig
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 # Christian Schnidrig <christian.schnidrig@bluewin.ch>
21 # Parameter definitions for CDef collector plugin
23 package Torrus::Collector::CDef_Params;
25 use strict;
26 use warnings;
28 our $VERSION = 1.0;
30 ### Initialize the configuration validator with module-specific parameters
31 our %params =
33 'rpn-expr' => undef,
34 'cdef-collector-delay' => undef,
35 'cdef-collector-tolerance' => undef,
39 sub initValidatorLeafParams
41 my $hashref = shift;
42 $hashref->{'ds-type'}{'collector'}{'collector-type'}{'cdef'} =
43 \%params;
44 return;
48 my %admInfoParamCategories =
50 'cdef-collector-delay' => 'CDef_Collector',
51 'cdef-collector-tolerance' => 'CDef_Collector',
55 sub initAdmInfo
57 my $map = shift;
58 my $categories = shift;
60 $map->{'ds-type'}{'collector'}{'collector-type'}{'cdef'} =
61 \%params;
63 while( my ($pname, $category) = each %admInfoParamCategories )
65 $categories->{$pname} = $category;
67 return;