From 6c17fe65b802caee37b388b2855d786cc07f270e Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 3 Oct 2016 22:18:47 +0100 Subject: [PATCH] community data now deleted with devices --- Netdisco/lib/App/Netdisco/DB/ResultSet/Device.pm | 11 +---------- Netdisco/lib/App/Netdisco/Manual/Configuration.pod | 3 +-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Netdisco/lib/App/Netdisco/DB/ResultSet/Device.pm b/Netdisco/lib/App/Netdisco/DB/ResultSet/Device.pm index d363da86..65692441 100644 --- a/Netdisco/lib/App/Netdisco/DB/ResultSet/Device.pm +++ b/Netdisco/lib/App/Netdisco/DB/ResultSet/Device.pm @@ -583,22 +583,13 @@ sub delete { DeviceVlan DevicePower DeviceModule + Community /) { $schema->resultset($set)->search( { ip => { '-in' => $devices->as_query } }, )->delete; } - $schema->resultset('Community')->search({ - ip => { '-in' => $devices->as_query }, - snmp_auth_tag_read => undef, - snmp_auth_tag_write => undef, - })->delete; - - $schema->resultset('Community')->search( - { ip => { '-in' => $devices->as_query } }, - )->update({snmp_comm_rw => undef}); - $schema->resultset('Admin')->search({ device => { '-in' => $devices->as_query }, })->delete; diff --git a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod index 28b59461..0820c436 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod @@ -609,8 +609,7 @@ C shorthand instead: Netdisco caches both the successful SNMPv2 read and write community strings, as well as the C names if available. This allows for faster operations -once a connection has already been made to a device. When you delete a device, -the community strings are removed but the C hints remain, for future use. +once a connection has previously been made to a device. =head3 C