NAME
App::Netdisco::Util::Device
DESCRIPTION
A set of helper subroutines to support parts of the Netdisco application.
There are no default exports, however the :all
tag will export all subroutines.
EXPORT_OK
get_device( $ip )
Given an IP address, returns a DBIx::Class::Row object for the Device in the Netdisco database. The IP can be for any interface on the device.
If for any reason $ip
is already a DBIx::Class
Device object, then it is simply returned.
If the device or interface IP is not known to Netdisco a new Device object is created for the IP, and returned. This object is in-memory only and not yet stored to the database.
is_discoverable( $ip )
Given an IP address, returns true
if Netdisco on this host is permitted by the local configuration to discover the device.
The configuration items discover_no
and discover_only
are checked against the given IP.
Returns false if the host is not permitted to discover the target device.