Merge branch 'master' into og-pluggable-daemon
This commit is contained in:
		| @@ -4,7 +4,7 @@ use strict; | ||||
| use warnings; | ||||
| use 5.010_000; | ||||
|  | ||||
| our $VERSION = '2.026001_004'; | ||||
| our $VERSION = '2.027003'; | ||||
|  | ||||
| use App::Netdisco::Environment; | ||||
| use Dancer ':script'; | ||||
| @@ -235,6 +235,9 @@ You should take care not to run this Netdisco daemon and the Netdisco 1.x | ||||
| daemon at the same time. Similarly, if you use the device discovery with | ||||
| Netdisco 2, disable your system's cron jobs for the Netdisco 1.x poller. | ||||
|  | ||||
| For further documentation on deployment, see | ||||
| L<Deployment|App::Netdisco::Manual::Deployment>. | ||||
|  | ||||
| =head1 Upgrading | ||||
|  | ||||
| Before upgrading please review the latest L<Release | ||||
| @@ -276,12 +279,6 @@ run: | ||||
|  | ||||
|  ~/bin/localenv nd-import-topology /path/to/netdisco-topology.txt | ||||
|  | ||||
| =head2 Deployment Scenarios | ||||
|  | ||||
| More documentation on how to deploy the application in other scenarios, for | ||||
| example behind a web proxy, is in the | ||||
| L<Deployment|App::Netdisco::Manual::Deployment> documentation. | ||||
|  | ||||
| =head2 Database API | ||||
|  | ||||
| Bundled with this distribution is a L<DBIx::Class> layer for the Netdisco | ||||
|   | ||||
| @@ -68,7 +68,7 @@ sub do_macsuck { | ||||
|   # cache the device ports to save hitting the database for many single rows | ||||
|   my $device_ports = {map {($_->port => $_)} | ||||
|                           $device->ports(undef, {prefetch => 'neighbor_alias'})->all}; | ||||
|   my $port_macs = get_port_macs($device); | ||||
|   my $port_macs = get_port_macs(); | ||||
|   my $interfaces = $snmp->interfaces; | ||||
|  | ||||
|   # get forwarding table data via basic snmp connection | ||||
| @@ -367,7 +367,7 @@ sub _walk_fwtable { | ||||
|                 $device->ip, $mac, $port, $remote; | ||||
|               # continue!! | ||||
|           } | ||||
|           else { | ||||
|           elsif (not setting('macsuck_bleed')) { | ||||
|               debug sprintf | ||||
|                 ' [%s] macsuck %s - port %s is detected uplink - skipping.', | ||||
|                 $device->ip, $mac, $port; | ||||
|   | ||||
| @@ -4,7 +4,7 @@ App::Netdisco::Manual::Deployment - Tips and Tricks for Deployment | ||||
|  | ||||
| =head1 Init and Run Control Scripts | ||||
|  | ||||
| The Netdisco applications will emit RC scripts suitable for Linux systems: | ||||
| The Netdisco applications will generate RC scripts suitable for Linux systems: | ||||
|  | ||||
|  bin/netdisco-web get_init_file | ||||
|  bin/netdisco-daemon get_init_file | ||||
|   | ||||
| @@ -45,8 +45,9 @@ respectively) will now watch your C<deployment.yml> configuration file, and | ||||
| restart themselves whenever it is changed. | ||||
|  | ||||
| The Web and Backend daemons will also now drop privilege to the same user and | ||||
| group as their files on disk. This allows you to symlink the programs as | ||||
| run-control scripts, yet maintain non-root privilege status. | ||||
| group as their files on disk. This allows use of run control (init) scripts | ||||
| whilst maintaining non-root privilege status (see | ||||
| L<Deployment|App::Netdisco::Manual::Deployment> documentation for details). | ||||
|  | ||||
| The housekeeping task C<expiry> has been renamed to C<expire>. Old | ||||
| configuration will continue to work, but we recommend you rename this part of | ||||
|   | ||||
| @@ -21,24 +21,19 @@ subroutines. | ||||
|  | ||||
| =head1 EXPORT_OK | ||||
|  | ||||
| =head2 get_port_macs( $device ) | ||||
| =head2 get_port_macs | ||||
|  | ||||
| Returns a Hash reference of C<< { MAC => IP } >> for all interface MAC | ||||
| addresses on a device. | ||||
| addresses on all devices. | ||||
|  | ||||
| If you need to filter for a given device, simply compare the IP (hash value) | ||||
| to your device's IP. | ||||
|  | ||||
| =cut | ||||
|  | ||||
| sub get_port_macs { | ||||
|     my $device    = shift; | ||||
|     my $port_macs = {}; | ||||
|  | ||||
|     unless ( $device->in_storage ) { | ||||
|         debug sprintf | ||||
|             ' [%s] get_port_macs - skipping device not yet discovered', | ||||
|             $device->ip; | ||||
|         return $port_macs; | ||||
|     } | ||||
|  | ||||
|     my $dp_macs | ||||
|         = schema('netdisco')->resultset('DevicePort') | ||||
|         ->search( { mac => { '!=' => [ -and => (undef, '00:00:00:00:00:00') ] } }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user