-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcfg_configstats.pm
More file actions
41 lines (28 loc) · 872 Bytes
/
Copy pathcfg_configstats.pm
File metadata and controls
41 lines (28 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Defining package
package configstats ;
use Moose ;
extends('cfg_fgtconfig') ;
use strict ;
use warnings ;
use Data::Dumper ;
use lib "." ;
has 'stat' => (isa => 'cfg_statistics', is => 'rw') ;
# ---
sub start {
my $self = shift ;
# Parsing configuration using cfg_dissector
$self->parse() ;
my @vdoms = $self->cfg->get_vdom_list();
foreach my $vd (@vdoms) {
warn "Processing vd=$vd" if $self->debug ;
}
# building a stat object from cfg_statistics
# providing a dissector configuration
$self->stat(cfg_statistics->new(cfg => $self->cfg, vd => $self->vd, debug => ($self->debug_level & 128))) ;
# Run all statistics on the config defined in the cfg_statistics object
$self->stat->object_statistics();
# For testing purpose, dump the statistic object results for each vdom
$self->stat->dump();
}
# ---
1 ;