wip on alcatel isam

This commit is contained in:
qgarnier 2017-08-28 14:51:40 +02:00
parent 17c51d9ae5
commit a0ee5c82a6
1 changed files with 4 additions and 4 deletions

View File

@ -53,17 +53,17 @@ sub manage_selection {
my $snmp_result = $self->{snmp}->get_multiple_table(oids => [ { oid => $oid_sapDescription }, { oid => $oid_svcDescription } ], my $snmp_result = $self->{snmp}->get_multiple_table(oids => [ { oid => $oid_sapDescription }, { oid => $oid_svcDescription } ],
nothing_quit => 1); nothing_quit => 1);
foreach my $oid (keys %{$snmp_result->{$oid_sapDescription}}) { foreach my $oid (keys %{$snmp_result->{$oid_sapDescription}}) {
next if ($oid !~ /^$oid_tnSapDescription\.(.*?)\.(.*?)\.(.*?)$/); next if ($oid !~ /^$oid_sapDescription\.(.*?)\.(.*?)\.(.*?)$/);
my ($SvcId, $SapPortId, $SapEncapValue) = ($1, $2, $3); my ($SvcId, $SapPortId, $SapEncapValue) = ($1, $2, $3);
$self->{sap}->{$SvcId . '.' . $SapPortId . '.' . $SapEncapValue} = { $self->{sap}->{$SvcId . '.' . $SapPortId . '.' . $SapEncapValue} = {
SvcId => $SvcId, SvcId => $SvcId,
SapPortId => $SapPortId, SapPortId => $SapPortId,
SapEncapValue => $SapEncapValue, SapEncapValue => $SapEncapValue,
SapDescription => $snmp_result->{$oid_sapDescription}->{$oid}, SapDescription => $snmp_result->{$oid_sapDescription}->{$oid} ne '' ? $snmp_result->{$oid_sapDescription}->{$oid} : 'unknown',
SvcDescription => defined($snmp_result->{$oid_svcDescription}->{$oid_svcDescription . '.' . $SvcId}) ? SvcDescription => defined($snmp_result->{$oid_svcDescription}->{$oid_svcDescription . '.' . $SvcId}) && $snmp_result->{$oid_svcDescription}->{$oid_svcDescription . '.' . $SvcId} ne '' ?
$snmp_result->{$oid_svcDescription}->{$oid_svcDescription . '.' . $SvcId} : $SvcId, $snmp_result->{$oid_svcDescription}->{$oid_svcDescription . '.' . $SvcId} : $SvcId,
SapEncapName => defined($snmp_result->{$oid_svcDescription}->{$oid_svcDescription . '.' . $SapEncapValue}) ? SapEncapName => defined($snmp_result->{$oid_svcDescription}->{$oid_svcDescription . '.' . $SapEncapValue}) && $snmp_result->{$oid_svcDescription}->{$oid_svcDescription . '.' . $SapEncapValue} ne '' ?
$snmp_result->{$oid_svcDescription}->{$oid_svcDescription . '.' . $SapEncapValue} : $SapEncapValue, $snmp_result->{$oid_svcDescription}->{$oid_svcDescription . '.' . $SapEncapValue} : $SapEncapValue,
}; };
} }