community data now deleted with devices

This commit is contained in:
Oliver Gorwits
2016-10-03 22:18:47 +01:00
parent 9227e8cde8
commit 6c17fe65b8
2 changed files with 2 additions and 12 deletions

View File

@@ -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;

View File

@@ -609,8 +609,7 @@ C<community> shorthand instead:
Netdisco caches both the successful SNMPv2 read and write community strings,
as well as the C<tag> 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<tag> hints remain, for future use.
once a connection has previously been made to a device.
=head3 C<get_community>