Merge branch 'master' into og-pluggable-daemon
This commit is contained in:
@@ -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]
|
[ENHANCEMENTS]
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ requires:
|
|||||||
Daemon::Control: 0.001
|
Daemon::Control: 0.001
|
||||||
Dancer: 1.3112
|
Dancer: 1.3112
|
||||||
Dancer::Plugin::Auth::Extensible: 0.3
|
Dancer::Plugin::Auth::Extensible: 0.3
|
||||||
Dancer::Plugin::DBIC: 0.1803
|
Dancer::Plugin::DBIC: 0.2001
|
||||||
Dancer::Plugin::Passphrase: 2.0.1
|
Dancer::Plugin::Passphrase: 2.0.1
|
||||||
File::ShareDir: 1.03
|
File::ShareDir: 1.03
|
||||||
Guard: 1.022
|
Guard: 1.022
|
||||||
@@ -78,4 +78,4 @@ resources:
|
|||||||
homepage: http://netdisco.org/
|
homepage: http://netdisco.org/
|
||||||
license: http://opensource.org/licenses/bsd-license.php
|
license: http://opensource.org/licenses/bsd-license.php
|
||||||
repository: git://git.code.sf.net/p/netdisco/netdisco-ng
|
repository: git://git.code.sf.net/p/netdisco/netdisco-ng
|
||||||
version: 2.026001_004
|
version: 2.027003
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ requires 'DBIx::Class' => 0.08210;
|
|||||||
requires 'DBIx::Class::Helpers' => 2.018004;
|
requires 'DBIx::Class::Helpers' => 2.018004;
|
||||||
requires 'Daemon::Control' => 0.001000;
|
requires 'Daemon::Control' => 0.001000;
|
||||||
requires 'Dancer' => 1.3112;
|
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::Auth::Extensible' => 0.30;
|
||||||
requires 'Dancer::Plugin::Passphrase' => '2.0.1';
|
requires 'Dancer::Plugin::Passphrase' => '2.0.1';
|
||||||
requires 'File::ShareDir' => 1.03;
|
requires 'File::ShareDir' => 1.03;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use 5.010_000;
|
use 5.010_000;
|
||||||
|
|
||||||
our $VERSION = '2.026001_004';
|
our $VERSION = '2.027003';
|
||||||
|
|
||||||
use App::Netdisco::Environment;
|
use App::Netdisco::Environment;
|
||||||
use Dancer ':script';
|
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
|
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.
|
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
|
=head1 Upgrading
|
||||||
|
|
||||||
Before upgrading please review the latest L<Release
|
Before upgrading please review the latest L<Release
|
||||||
@@ -276,12 +279,6 @@ run:
|
|||||||
|
|
||||||
~/bin/localenv nd-import-topology /path/to/netdisco-topology.txt
|
~/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
|
=head2 Database API
|
||||||
|
|
||||||
Bundled with this distribution is a L<DBIx::Class> layer for the Netdisco
|
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
|
# cache the device ports to save hitting the database for many single rows
|
||||||
my $device_ports = {map {($_->port => $_)}
|
my $device_ports = {map {($_->port => $_)}
|
||||||
$device->ports(undef, {prefetch => 'neighbor_alias'})->all};
|
$device->ports(undef, {prefetch => 'neighbor_alias'})->all};
|
||||||
my $port_macs = get_port_macs($device);
|
my $port_macs = get_port_macs();
|
||||||
my $interfaces = $snmp->interfaces;
|
my $interfaces = $snmp->interfaces;
|
||||||
|
|
||||||
# get forwarding table data via basic snmp connection
|
# get forwarding table data via basic snmp connection
|
||||||
@@ -367,7 +367,7 @@ sub _walk_fwtable {
|
|||||||
$device->ip, $mac, $port, $remote;
|
$device->ip, $mac, $port, $remote;
|
||||||
# continue!!
|
# continue!!
|
||||||
}
|
}
|
||||||
else {
|
elsif (not setting('macsuck_bleed')) {
|
||||||
debug sprintf
|
debug sprintf
|
||||||
' [%s] macsuck %s - port %s is detected uplink - skipping.',
|
' [%s] macsuck %s - port %s is detected uplink - skipping.',
|
||||||
$device->ip, $mac, $port;
|
$device->ip, $mac, $port;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ App::Netdisco::Manual::Deployment - Tips and Tricks for Deployment
|
|||||||
|
|
||||||
=head1 Init and Run Control Scripts
|
=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-web get_init_file
|
||||||
bin/netdisco-daemon 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.
|
restart themselves whenever it is changed.
|
||||||
|
|
||||||
The Web and Backend daemons will also now drop privilege to the same user and
|
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
|
group as their files on disk. This allows use of run control (init) scripts
|
||||||
run-control scripts, yet maintain non-root privilege status.
|
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
|
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
|
configuration will continue to work, but we recommend you rename this part of
|
||||||
|
|||||||
@@ -21,24 +21,19 @@ subroutines.
|
|||||||
|
|
||||||
=head1 EXPORT_OK
|
=head1 EXPORT_OK
|
||||||
|
|
||||||
=head2 get_port_macs( $device )
|
=head2 get_port_macs
|
||||||
|
|
||||||
Returns a Hash reference of C<< { MAC => IP } >> for all interface MAC
|
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
|
=cut
|
||||||
|
|
||||||
sub get_port_macs {
|
sub get_port_macs {
|
||||||
my $device = shift;
|
|
||||||
my $port_macs = {};
|
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
|
my $dp_macs
|
||||||
= schema('netdisco')->resultset('DevicePort')
|
= schema('netdisco')->resultset('DevicePort')
|
||||||
->search( { mac => { '!=' => [ -and => (undef, '00:00:00:00:00:00') ] } },
|
->search( { mac => { '!=' => [ -and => (undef, '00:00:00:00:00:00') ] } },
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
2.003002 - 2014-05-03
|
||||||
|
|
||||||
|
* POD fixups
|
||||||
|
|
||||||
2.003001 - 2014-02-04
|
2.003001 - 2014-02-04
|
||||||
|
|
||||||
* Change to use %DEVICE% as well - full url must be configured in location
|
* Change to use %DEVICE% as well - full url must be configured in location
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ resources:
|
|||||||
homepage: http://netdisco.org/
|
homepage: http://netdisco.org/
|
||||||
license: http://opensource.org/licenses/bsd-license.php
|
license: http://opensource.org/licenses/bsd-license.php
|
||||||
repository: git://git.code.sf.net/p/netdisco/netdisco-ng
|
repository: git://git.code.sf.net/p/netdisco/netdisco-ng
|
||||||
version: '2.003001'
|
version: 2.003002
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package App::NetdiscoX::Web::Plugin::RANCID;
|
package App::NetdiscoX::Web::Plugin::RANCID;
|
||||||
|
|
||||||
our $VERSION = '2.003001';
|
our $VERSION = '2.003002';
|
||||||
|
|
||||||
use Dancer ':syntax';
|
use Dancer ':syntax';
|
||||||
|
|
||||||
@@ -58,8 +58,7 @@ App::NetdiscoX::Web::Plugin::RANCID - Link to device backups in RANCID/WebSVN
|
|||||||
- X::RANCID
|
- X::RANCID
|
||||||
|
|
||||||
plugin_rancid:
|
plugin_rancid:
|
||||||
location: 'https://websvn-server.example.com/rancid/%GROUP%/'
|
location: 'https://websvn-server.example.com/rancid/%DEVICE%'
|
||||||
open_in_same_window: false
|
|
||||||
|
|
||||||
=head1 Description
|
=head1 Description
|
||||||
|
|
||||||
@@ -89,7 +88,7 @@ The text "C<%GROUP%>" will be replaced with the group name for this device, if
|
|||||||
known to Netdisco. This uses the same configuration as for
|
known to Netdisco. This uses the same configuration as for
|
||||||
L<netdisco-rancid-export>, an example of which is below:
|
L<netdisco-rancid-export>, an example of which is below:
|
||||||
|
|
||||||
rancid:
|
rancid:
|
||||||
by_ip: [ other ]
|
by_ip: [ other ]
|
||||||
groups:
|
groups:
|
||||||
switch: [ 'name:.*[Ss][Ww].*' ]
|
switch: [ 'name:.*[Ss][Ww].*' ]
|
||||||
@@ -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
|
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
|
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
|
=head2 open_in_same_window
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user