« blib/lib/App/Netdisco/DB/Result/DeviceIp.pm
↑ Summary
blib/lib/App/Netdisco/DB/Result/DeviceModule.pm »
| 1 | package App::Netdisco::DB::Result::DeviceIpResolved; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use base 'DBIx::Class::Core'; | ||
| 7 | |||
| 8 | __PACKAGE__->table_class('DBIx::Class::ResultSource::View'); | ||
| 9 | |||
| 10 | __PACKAGE__->table('device_ip_resolved'); | ||
| 11 | __PACKAGE__->result_source_instance->is_virtual(0); | ||
| 12 | |||
| 13 | __PACKAGE__->add_columns( | ||
| 14 | "ip", | ||
| 15 | { data_type => "inet", is_nullable => 1 }, | ||
| 16 | "alias", | ||
| 17 | { data_type => "inet", is_nullable => 1 }, | ||
| 18 | ); | ||
| 19 | |||
| 20 | =head1 NAME | ||
| 21 | |||
| 22 | App::Netdisco::DB::Result::DeviceIpResolved | ||
| 23 | |||
| 24 | =head1 DESCRIPTION | ||
| 25 | |||
| 26 | A database view, created by the schema upgrade, that maps each alias address | ||
| 27 | to the one device (C<ip>) which owns it. With no VRF in use it returns the | ||
| 28 | C<(ip, alias)> pairs of C<device_ip> exactly. | ||
| 29 | |||
| 30 | =cut | ||
| 31 | |||
| 32 | 1; |