select MAC Address display format on Node and Device Port search
This commit is contained in:
@@ -7,6 +7,8 @@ package App::Netdisco::DB::Result::NodeIp;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Net::MAC;
|
||||
|
||||
use base 'DBIx::Class::Core';
|
||||
__PACKAGE__->table("node_ip");
|
||||
__PACKAGE__->add_columns(
|
||||
@@ -206,4 +208,12 @@ between the date stamp and time stamp. That is:
|
||||
|
||||
sub time_last_stamp { return (shift)->get_column('time_last_stamp') }
|
||||
|
||||
=head2 net_mac
|
||||
|
||||
Returns the C<mac> column instantiated into a L<Net::MAC> object.
|
||||
|
||||
=cut
|
||||
|
||||
sub net_mac { return Net::MAC->new(mac => (shift)->mac) }
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user