Change location of ifindex to DevicePortProperties
* instead of DevicePort * as requested by Oliver in PR #513 review
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user