App-Netdisco
view release on metacpan or search on metacpan
[ENHANCEMENTS]
* Reports config is now a list (see ReleaseNotes)
* Add "AP" as a hint for WAP support
* Attempt to keep PID and logfile as netdisco user even when running as root
* Show netdisco-do docs on options error
* Do not leak SNMP community string into debug output (unless SHOW_COMMUNITY=1)
* Process tree updated to show daemon worker status/activity
* Handle management IP of one device being in use on another device
* Log at debug the vlan reindexing in macsuck
* Add docs note about database backups
* Always set DBIC_TRACE_PROFILE=console in environment
* Push a row into Device Modules for the chassis even if no module info
[BUG FIXES]
* Missing action to netdisco-do should not throw Perl error
* Sort CDP/LLDP data to be more consistent when multiple neighbors on a port
* Fix POD errors in Nbtstat and ResultSet::Device (thanks cpants :)
* UTF-8 encoding for Port Name (description)
* Allow process grouping to work portably again (daemon config watch)
bin/netdisco-deploy view on Meta::CPAN
=cut
print color 'bold cyan';
say 'This is the Netdisco 2 deployment script.';
say '';
say 'Before we continue, the following prerequisites must be in place:';
say ' * Database added to PostgreSQL for Netdisco';
say ' * User added to PostgreSQL with rights to the Netdisco Database';
say ' * "~/environments/deployment.yml" file configured with Database dsn/user/pass';
say ' * A full backup of any existing Netdisco database data';
say ' * Internet access (for OUIs and MIBs)';
say '';
say 'If you are upgrading Netdisco 2 read the release notes:';
say 'https://github.com/netdisco/netdisco/wiki/Release-Notes';
say 'There you will find required and incompatible changes';
say 'which are not covered by this script.';
say '';
say 'You will be asked to confirm all changes to your system.';
say '';
print color 'reset';
lib/App/Netdisco/Worker/Plugin/Discover/Properties.pm view on Meta::CPAN
#Â update num_ports
$device->num_ports( scalar values %deviceports );
# support for Hooks
vars->{'hook_data'}->{'ports'} = [values %deviceports];
schema('netdisco')->resultset('DevicePort')->txn_do_locked(ACCESS_EXCLUSIVE, sub {
my $coder = JSON::PP->new->utf8(0)->allow_nonref(1)->allow_unknown(1);
#Â backup the custom_fields
my %fields = map {($_->{port} => $coder->decode(Encode::encode('UTF-8',$_->{custom_fields} || '{}')))}
grep {exists $deviceports{$_->{port}}}
$device->ports
->search(undef, {columns => [qw/port custom_fields/]})
->hri->all;
my %ok_fields = map {$_ => 1}
grep {defined}
map {$_->{name}}
@{ setting('custom_fields')->{device_port} || [] };
( run in 0.561 second using v1.01-cache-2.11-cpan-49f99fa48dc )