community data now deleted with devices
This commit is contained in:
@@ -583,22 +583,13 @@ sub delete {
|
|||||||
DeviceVlan
|
DeviceVlan
|
||||||
DevicePower
|
DevicePower
|
||||||
DeviceModule
|
DeviceModule
|
||||||
|
Community
|
||||||
/) {
|
/) {
|
||||||
$schema->resultset($set)->search(
|
$schema->resultset($set)->search(
|
||||||
{ ip => { '-in' => $devices->as_query } },
|
{ ip => { '-in' => $devices->as_query } },
|
||||||
)->delete;
|
)->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({
|
$schema->resultset('Admin')->search({
|
||||||
device => { '-in' => $devices->as_query },
|
device => { '-in' => $devices->as_query },
|
||||||
})->delete;
|
})->delete;
|
||||||
|
|||||||
@@ -609,8 +609,7 @@ C<community> shorthand instead:
|
|||||||
|
|
||||||
Netdisco caches both the successful SNMPv2 read and write community strings,
|
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
|
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,
|
once a connection has previously been made to a device.
|
||||||
the community strings are removed but the C<tag> hints remain, for future use.
|
|
||||||
|
|
||||||
=head3 C<get_community>
|
=head3 C<get_community>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user