Merge branch 'master' of github.com:netdisco/netdisco

This commit is contained in:
Oliver Gorwits
2019-04-28 20:42:17 +01:00
2 changed files with 16 additions and 13 deletions

View File

@@ -77,9 +77,8 @@ This script will download the latest MAC address vendor prefix data from the
Internet, and update the OUI table in the database. Hence Internet access is
required to run the script.
Similarly the latest Netdisco MIB bundle is also downloaded, placed into the
user's home directory (or C<$ENV{NETDISCO_HOME}>), and Netdisco reconfigured
for its use.
Similarly the latest Netdisco MIB bundle is also downloaded and placed into
the user's home directory (or C<$ENV{NETDISCO_HOME}>).
=cut
@@ -99,7 +98,7 @@ print color 'reset';
my $term = Term::ReadLine->new('netdisco');
my $bool = $term->ask_yn(
prompt => 'So, is all the above in place?', default => 'n',
prompt => 'So, is all of the above in place?', default => 'n',
);
exit(0) unless $bool;
@@ -169,7 +168,7 @@ sub deploy_db {
if ($users->search({-bool => 'admin'})->count == 0) {
say '';
print color 'bold green';
say 'We need to create a user for inital login. This user will be a full Administrator.';
say 'We need to create a user for initial login. This user will be a full Administrator.';
say 'Afterwards, you can go to Admin -> User Management to manage users.';
print color 'reset';
say '';
@@ -274,7 +273,7 @@ sub shorten {
# Remove any "the", "inc", "plc" ...
$manuf
=~ s/\s(the|inc|incorporated|plc||systems|corp|corporation|s\/a|a\/s|ab|ag|kg|gmbh|co|company|limited|ltd|holding|spa)(?= )//gi;
=~ s/\s(the|inc|incorporated|plc|systems|corp|corporation|s\/a|a\/s|ab|ag|kg|gmbh|co|company|limited|ltd|holding|spa)(?= )//gi;
# Convert to consistent case
$manuf =~ s/(\w+)/\u\L$1/g;

View File

@@ -119,6 +119,9 @@ if (scalar @hostlist > 512) {
exit 1;
}
# some actions do not take a device parameter
@hostlist = (undef) if 0 == scalar @hostlist;
foreach my $host (@hostlist) {
my $dev = $host ? get_device($host->addr) : undef;
if ($dev and not (blessed $dev and $dev->in_storage) and $action !~ m/^discover/) {
@@ -205,11 +208,12 @@ pass C<action::stage> as the first argument to C<netdisco-do>, for example
C<discover::neighbors>.
Any action taking a C<device> parameter can be passed either a hostname or IP
of any interface on a known or unknown device, or an IP prefix (subnet) which
will cause C<netdisco-do> to run the action for all addresses in that range.
address of any interface of a known or unknown device, or an IP prefix
(subnet) which will cause C<netdisco-do> to run the action on all addresses in
that range.
The C<device> parameter can be passed many time. In this case, the devices would
be take in count one by one.
The C<device> parameter may be passed multiple times. In this case, all
addresses (after expanding IP Prefixes) will be handled one by one.
=head2 discover
@@ -313,7 +317,7 @@ leaf with the class short name, for example "C<Layer3::C3550::interfaces>" or
"C<Layer2::HP::uptime>". Using "C<::>" as the start of the prefix will test
against the base "C<SNMP::Info>" class.
As well, SNMP object names can be used as an argument for "C<-e>", so you can
As well, SNMP OID names can be used as an argument for "C<-e>", so you can
use C<ifName> for example, which will use the netdisco-mibs files for
translations.
@@ -421,7 +425,7 @@ following items in order:
=item C<-D>
Netdisco debug log level
Netdisco debug log level.
=item C<-I> or C<-II>
@@ -433,7 +437,7 @@ L<SNMP> (net-snmp) trace level (1, 2 or 3).
=item C<-Q>
L<DBIx::Class> trace enabled
L<DBIx::Class> trace enabled.
=back