Default class of a PoE port is 0 if not otherwise defined
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
* Set of Port Name (description) fixed to assume OK dialog response
|
* Set of Port Name (description) fixed to assume OK dialog response
|
||||||
|
* Default class of a PoE port is 0 if not otherwise defined
|
||||||
|
|
||||||
2.019003 - 2013-10-27
|
2.019003 - 2013-10-27
|
||||||
|
|
||||||
|
|||||||
@@ -650,13 +650,15 @@ sub with_poestats_as_hashref {
|
|||||||
$module->{errored_ports}++;
|
$module->{errored_ports}++;
|
||||||
}
|
}
|
||||||
elsif ( $port->{status} eq 'deliveringPower' ) {
|
elsif ( $port->{status} eq 'deliveringPower' ) {
|
||||||
|
# Default is class0
|
||||||
|
my $class = $port->{class} || 'class0';
|
||||||
$module->{powered_ports}++;
|
$module->{powered_ports}++;
|
||||||
if ( defined $port->{power} and $port->{power} ) {
|
if ( defined $port->{power} and $port->{power} ) {
|
||||||
$module->{pwr_delivering} += int( $port->{power} / 1000 );
|
$module->{pwr_delivering} += int( $port->{power} / 1000 );
|
||||||
$module->{pwr_committed} += $poemax->{ $port->{class} };
|
$module->{pwr_committed} += $poemax->{ $class };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$module->{pwr_committed} += $poemax->{ $port->{class} };
|
$module->{pwr_committed} += $poemax->{ $class };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user