Change location of ifindex to DevicePortProperties

* instead of DevicePort
* as requested by Oliver in PR #513 review
This commit is contained in:
ram
2019-02-23 15:13:44 +01:00
committed by Christian Ramseyer
parent 24a7e80470
commit c2600ac550
5 changed files with 14 additions and 4 deletions

View File

@@ -101,6 +101,17 @@ register_worker({ phase => 'main', driver => 'snmp' }, sub {
$properties{ $port }->{remote_serial} = $rem_serial->{ $idx };
}
foreach my $idx (keys %$interfaces) {
my $port = $interfaces->{$idx} or next;
if (!defined $device_ports->{$port}) {
debug sprintf ' [%s] properties/ifindex - local port %s already skipped, ignoring',
$device->ip, $port;
next;
}
$properties{ $port }->{ifindex} = $idx;
}
return Status->info(" [$device] no port properties to record")
unless scalar keys %properties;

View File

@@ -229,7 +229,6 @@ register_worker({ phase => 'early', driver => 'snmp' }, sub {
type => $i_type->{$entry},
vlan => $i_vlan->{$entry},
pvid => $i_vlan->{$entry},
ifindex => $entry,
is_master => 'false',
slave_of => undef,
lastchange => $lc,