Merge branch 'master' into og-pluggable-daemon

This commit is contained in:
Oliver Gorwits
2014-05-17 08:00:02 +01:00
11 changed files with 52 additions and 37 deletions

View File

@@ -1,4 +1,23 @@
2.026001_004 -
2.027003 - 2014-05-04
[BUG FIXES]
* fixed use of password instead of pass for Dancer::Plugin::DBIC
* another check for macsuck_bleed (J. Leonhardt)
2.027002 - 2014-05-04
[BUG FIXES]
* revert use password instead of pass for Dancer::Plugin::DBIC
2.027001 - 2014-05-03
[BUG FIXES]
* get_port_macs returns all port MACs
2.027000 - 2014-04-30
[ENHANCEMENTS]

View File

@@ -33,7 +33,7 @@ requires:
Daemon::Control: 0.001
Dancer: 1.3112
Dancer::Plugin::Auth::Extensible: 0.3
Dancer::Plugin::DBIC: 0.1803
Dancer::Plugin::DBIC: 0.2001
Dancer::Plugin::Passphrase: 2.0.1
File::ShareDir: 1.03
Guard: 1.022
@@ -78,4 +78,4 @@ resources:
homepage: http://netdisco.org/
license: http://opensource.org/licenses/bsd-license.php
repository: git://git.code.sf.net/p/netdisco/netdisco-ng
version: 2.026001_004
version: 2.027003

View File

@@ -16,7 +16,7 @@ requires 'DBIx::Class' => 0.08210;
requires 'DBIx::Class::Helpers' => 2.018004;
requires 'Daemon::Control' => 0.001000;
requires 'Dancer' => 1.3112;
requires 'Dancer::Plugin::DBIC' => 0.1803;
requires 'Dancer::Plugin::DBIC' => 0.2001;
requires 'Dancer::Plugin::Auth::Extensible' => 0.30;
requires 'Dancer::Plugin::Passphrase' => '2.0.1';
requires 'File::ShareDir' => 1.03;

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View 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

View File

@@ -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') ] } },

View File

@@ -1,3 +1,7 @@
2.003002 - 2014-05-03
* POD fixups
2.003001 - 2014-02-04
* Change to use %DEVICE% as well - full url must be configured in location

View File

@@ -24,4 +24,4 @@ resources:
homepage: http://netdisco.org/
license: http://opensource.org/licenses/bsd-license.php
repository: git://git.code.sf.net/p/netdisco/netdisco-ng
version: '2.003001'
version: 2.003002

View File

@@ -1,6 +1,6 @@
package App::NetdiscoX::Web::Plugin::RANCID;
our $VERSION = '2.003001';
our $VERSION = '2.003002';
use Dancer ':syntax';
@@ -58,8 +58,7 @@ App::NetdiscoX::Web::Plugin::RANCID - Link to device backups in RANCID/WebSVN
- X::RANCID
plugin_rancid:
location: 'https://websvn-server.example.com/rancid/%GROUP%/'
open_in_same_window: false
location: 'https://websvn-server.example.com/rancid/%DEVICE%'
=head1 Description
@@ -103,7 +102,7 @@ regular expression as in the above example.
The device DNS name is used, or if missing the device SNMP sysName. Adding the
group to the list in C<by_ip> will make the link include the device IP
instead.
instead of the name.
=head2 open_in_same_window