App::Netdisco::Util::Device
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.
:all
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.
$ip
DBIx::Class
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.
Given the IP address of a device, returns true if the configuration setting $setting_name matches that device, else returns false.
$setting_name
There are several options for what $setting_name can contain:
Hostname, IP address, IP prefix
"model:regex" - matched against the device model
"model:regex"
"vendor:regex" - matched against the device vendor
"vendor:regex"
To simply match all devices, use IP Prefix "0.0.0.0/0". All regular expressions are anchored (that is, they must match the whole string).
0.0.0.0/0
Given an IP address, returns true if Netdisco on this host is permitted by the local configuration to discover the device.
true
The configuration items discover_no and discover_only are checked against the given IP.
discover_no
discover_only
If $device_type is also given, then discover_no_type will also be checked.
$device_type
discover_no_type
Returns false if the host is not permitted to discover the target device.
Given an IP address, returns true if Netdisco on this host is permitted by the local configuration to arpnip the device.
The configuration items arpnip_no and arpnip_only are checked against the given IP.
arpnip_no
arpnip_only
Returns false if the host is not permitted to arpnip the target device.
Given an IP address, returns true if Netdisco on this host is permitted by the local configuration to macsuck the device.
The configuration items macsuck_no and macsuck_only are checked against the given IP.
macsuck_no
macsuck_only
Returns false if the host is not permitted to macsuck the target device.
To install App::Netdisco, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Netdisco
CPAN shell
perl -MCPAN -e shell install App::Netdisco
For more information on module installation, please visit the detailed CPAN module installation guide.