Merge branch 'master' of github.com:netdisco/netdisco
This commit is contained in:
@@ -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
|
Internet, and update the OUI table in the database. Hence Internet access is
|
||||||
required to run the script.
|
required to run the script.
|
||||||
|
|
||||||
Similarly the latest Netdisco MIB bundle is also downloaded, placed into the
|
Similarly the latest Netdisco MIB bundle is also downloaded and placed into
|
||||||
user's home directory (or C<$ENV{NETDISCO_HOME}>), and Netdisco reconfigured
|
the user's home directory (or C<$ENV{NETDISCO_HOME}>).
|
||||||
for its use.
|
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
@@ -99,7 +98,7 @@ print color 'reset';
|
|||||||
|
|
||||||
my $term = Term::ReadLine->new('netdisco');
|
my $term = Term::ReadLine->new('netdisco');
|
||||||
my $bool = $term->ask_yn(
|
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;
|
exit(0) unless $bool;
|
||||||
@@ -169,7 +168,7 @@ sub deploy_db {
|
|||||||
if ($users->search({-bool => 'admin'})->count == 0) {
|
if ($users->search({-bool => 'admin'})->count == 0) {
|
||||||
say '';
|
say '';
|
||||||
print color 'bold green';
|
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.';
|
say 'Afterwards, you can go to Admin -> User Management to manage users.';
|
||||||
print color 'reset';
|
print color 'reset';
|
||||||
say '';
|
say '';
|
||||||
@@ -274,7 +273,7 @@ sub shorten {
|
|||||||
|
|
||||||
# Remove any "the", "inc", "plc" ...
|
# Remove any "the", "inc", "plc" ...
|
||||||
$manuf
|
$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
|
# Convert to consistent case
|
||||||
$manuf =~ s/(\w+)/\u\L$1/g;
|
$manuf =~ s/(\w+)/\u\L$1/g;
|
||||||
|
|||||||
@@ -119,6 +119,9 @@ if (scalar @hostlist > 512) {
|
|||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# some actions do not take a device parameter
|
||||||
|
@hostlist = (undef) if 0 == scalar @hostlist;
|
||||||
|
|
||||||
foreach my $host (@hostlist) {
|
foreach my $host (@hostlist) {
|
||||||
my $dev = $host ? get_device($host->addr) : undef;
|
my $dev = $host ? get_device($host->addr) : undef;
|
||||||
if ($dev and not (blessed $dev and $dev->in_storage) and $action !~ m/^discover/) {
|
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>.
|
C<discover::neighbors>.
|
||||||
|
|
||||||
Any action taking a C<device> parameter can be passed either a hostname or IP
|
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
|
address of any interface of a known or unknown device, or an IP prefix
|
||||||
will cause C<netdisco-do> to run the action for all addresses in that range.
|
(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
|
The C<device> parameter may be passed multiple times. In this case, all
|
||||||
be take in count one by one.
|
addresses (after expanding IP Prefixes) will be handled one by one.
|
||||||
|
|
||||||
=head2 discover
|
=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
|
"C<Layer2::HP::uptime>". Using "C<::>" as the start of the prefix will test
|
||||||
against the base "C<SNMP::Info>" class.
|
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
|
use C<ifName> for example, which will use the netdisco-mibs files for
|
||||||
translations.
|
translations.
|
||||||
|
|
||||||
@@ -421,7 +425,7 @@ following items in order:
|
|||||||
|
|
||||||
=item C<-D>
|
=item C<-D>
|
||||||
|
|
||||||
Netdisco debug log level
|
Netdisco debug log level.
|
||||||
|
|
||||||
=item C<-I> or C<-II>
|
=item C<-I> or C<-II>
|
||||||
|
|
||||||
@@ -433,7 +437,7 @@ L<SNMP> (net-snmp) trace level (1, 2 or 3).
|
|||||||
|
|
||||||
=item C<-Q>
|
=item C<-Q>
|
||||||
|
|
||||||
L<DBIx::Class> trace enabled
|
L<DBIx::Class> trace enabled.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user