enhance indent aeg

This commit is contained in:
garnier-quentin 2019-03-26 14:12:40 +01:00
parent 699145d590
commit 51f2a6df5c
5 changed files with 29 additions and 30 deletions

View File

@ -65,11 +65,10 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '1.0'; $self->{version} = '1.0';
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ "warning-status:s" => { name => 'warning_status', default => '' },
"warning-status:s" => { name => 'warning_status', default => '' }, "critical-status:s" => { name => 'critical_status', default => '%{status} =~ /true/i' },
"critical-status:s" => { name => 'critical_status', default => '%{status} =~ /true/i' }, });
});
return $self; return $self;
} }
@ -99,10 +98,13 @@ sub manage_selection {
my ($self, %options) = @_; my ($self, %options) = @_;
$self->{global} = {}; $self->{global} = {};
$self->{results} = $options{snmp}->get_multiple_table(oids => [ { oid => $oid_acm1000AcPlant }, $self->{results} = $options{snmp}->get_multiple_table(
{ oid => $oid_acmi1000AcPlant }, oids => [
], { oid => $oid_acm1000AcPlant },
nothing_quit => 1); { oid => $oid_acmi1000AcPlant },
],
nothing_quit => 1
);
my $result_acm1000 = $options{snmp}->map_instance(mapping => $mapping_acm1000, results => $self->{results}->{$oid_acm1000AcPlant}, instance => '0'); my $result_acm1000 = $options{snmp}->map_instance(mapping => $mapping_acm1000, results => $self->{results}->{$oid_acm1000AcPlant}, instance => '0');
my $result_acmi1000 = $options{snmp}->map_instance(mapping => $mapping_acmi1000, results => $self->{results}->{$oid_acmi1000AcPlant}, instance => '0'); my $result_acmi1000 = $options{snmp}->map_instance(mapping => $mapping_acmi1000, results => $self->{results}->{$oid_acmi1000AcPlant}, instance => '0');

View File

@ -62,9 +62,8 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '1.0'; $self->{version} = '1.0';
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ });
});
return $self; return $self;
} }

View File

@ -137,11 +137,10 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '1.0'; $self->{version} = '1.0';
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ "warning-status:s" => { name => 'warning_status', default => '%{status} =~ /onBattery/i' },
"warning-status:s" => { name => 'warning_status', default => '%{status} =~ /onBattery/i' }, "critical-status:s" => { name => 'critical_status', default => '%{status} =~ /disconnected/i || %{status} =~ /shutdown/i' },
"critical-status:s" => { name => 'critical_status', default => '%{status} =~ /disconnected/i || %{status} =~ /shutdown/i' }, });
});
return $self; return $self;
} }

View File

@ -102,11 +102,10 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '1.0'; $self->{version} = '1.0';
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ "warning-status:s" => { name => 'warning_status', default => '' },
"warning-status:s" => { name => 'warning_status', default => '' }, "critical-status:s" => { name => 'critical_status', default => '%{status} !~ /ok|notInstalled/i' },
"critical-status:s" => { name => 'critical_status', default => '%{status} !~ /ok|notInstalled/i' }, });
});
return $self; return $self;
} }

View File

@ -31,12 +31,12 @@ sub new {
$self->{version} = '0.1'; $self->{version} = '0.1';
%{$self->{modes}} = ( %{$self->{modes}} = (
'ac-status' => 'hardware::devices::aeg::acm::snmp::mode::acstatus', 'ac-status' => 'hardware::devices::aeg::acm::snmp::mode::acstatus',
'alarms-status' => 'hardware::devices::aeg::acm::snmp::mode::alarmsstatus', 'alarms-status' => 'hardware::devices::aeg::acm::snmp::mode::alarmsstatus',
'battery-status' => 'hardware::devices::aeg::acm::snmp::mode::batterystatus', 'battery-status' => 'hardware::devices::aeg::acm::snmp::mode::batterystatus',
'load-status' => 'hardware::devices::aeg::acm::snmp::mode::loadstatus', 'load-status' => 'hardware::devices::aeg::acm::snmp::mode::loadstatus',
'rectifier-status' => 'hardware::devices::aeg::acm::snmp::mode::rectifierstatus', 'rectifier-status' => 'hardware::devices::aeg::acm::snmp::mode::rectifierstatus',
); );
return $self; return $self;
} }