From e293a1b8193aa04673fb96327d6a338791537b13 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Mon, 23 Jun 2014 20:54:13 -0400 Subject: [PATCH] Use the SNMP::Info class attribute rather than re-querying for device_type. SNMP::Info classes that override the layers attribute may not return the same device_type after object instantiation. This also saves a SNMP query. --- Netdisco/lib/App/Netdisco/Core/Discover.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Netdisco/lib/App/Netdisco/Core/Discover.pm b/Netdisco/lib/App/Netdisco/Core/Discover.pm index 109c56a9..7864a4e4 100644 --- a/Netdisco/lib/App/Netdisco/Core/Discover.pm +++ b/Netdisco/lib/App/Netdisco/Core/Discover.pm @@ -169,7 +169,7 @@ sub store_device { $device->model( Encode::decode('UTF-8', $snmp->model) ); $device->serial( Encode::decode('UTF-8', $snmp->serial) ); - $device->snmp_class( $snmp->device_type ); + $device->snmp_class( $snmp->{'class'} ); $device->last_discover(\'now()'); schema('netdisco')->txn_do(sub {