my $set = $rs->search_by_mac({mac => '00:11:22:33:44:55', active => 1});
Like search(), this returns a ResultSet of matching rows from the Node table.
search()
The cond parameter must be a hashref containing a key mac with the value to search for.
cond
mac
Results are ordered by time last seen.
Additional columns time_first_stamp and time_last_stamp provide preformatted timestamps of the time_first and time_last fields.
time_first_stamp
time_last_stamp
time_first
time_last
A JOIN is performed on the Device table and the Device dns column prefetched.
dns
To limit results only to active nodes, set {active => 1} in cond.
{active => 1}
Overrides the built-in DBIx::Class delete method to more efficiently handle the removal or archiving of nodes.
This is a modifier for search() which returns a list of hash references for nodes within the search criteria with multiple IP addresses. Each hash reference contains the keys:
Node MAC address.
IP address of the device where the node is attached.
Port on the device where the node is attached.
DNS name of the device where the node is attached.
sysName of the device where the node is attached.
sysName
Count of IP addresses associated with the node.
Vendor string based upon the node OUI.
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.