lots of docs

This commit is contained in:
Oliver Gorwits
2013-06-08 19:24:47 +01:00
parent 4a1ccba71a
commit eda73c7dac
9 changed files with 132 additions and 20 deletions

View File

@@ -22,7 +22,7 @@ use Getopt::Long;
nd-dbic-versions - Create DB Schema Versions for Netdisco
=head2 USAGE
=head1 USAGE
This script creates SQL DDL files of the Netdisco database schema.
@@ -33,7 +33,7 @@ If called with the "-p <version>" option, upgrade SQL DDL command files
are created between the specified version and the current DBIx::Class
specification.
=head2 New Version
=head1 NEW VERSION
=over 4

View File

@@ -23,11 +23,11 @@ use Try::Tiny;
nd-import-topology - Import a Nedisco 1.x Manual Topology File
=head2 USAGE
=head1 USAGE
./nd-import-topology /path/to/netdisco-topology.txt
~/bin/localenv nd-import-topology /path/to/netdisco-topology.txt
=head2 DESCRIPTION
=head1 DESCRIPTION
This helper script will read and import the content of a Netdisco 1.x format
Manual Topology file into the Netdisco 2.x database's C<topology> table.

View File

@@ -21,7 +21,7 @@ use Try::Tiny;
netdisco-db-deploy - Database deployment for Netdisco
=head2 USAGE
=head1 USAGE
This script upgrades or initialises a Netdisco database schema.
@@ -35,7 +35,7 @@ interaction. If there's no Nedisco schema, it is deployed. If there's an
unversioned schema then versioning is added, and updates applied. Otherwise
only necessary updates are applied to an already versioned schema.
=head2 Versions
=head1 VERSIONS
=over 4

View File

@@ -50,7 +50,7 @@ use Try::Tiny;
netdisco-deploy - Database, OUI and MIB deployment for Netdisco
=head2 USAGE
=head1 USAGE
This script deploys the Netdisco database schema, OUI data, and MIBs. Each of
these is an optional service which the user is asked to confirm.

View File

@@ -16,6 +16,71 @@ use App::Netdisco;
use Dancer qw/:moose :script/;
use Dancer::Plugin::DBIC 'schema';
=head1 NAME
netdisco-do - Run any Netdisco poller job from the command-line.
=head1 USAGE
~/bin/netdisco-do <action> [-D] [-d <device> [-p <port>] [-e <extra>]]
Regardless of Netdisco configuration, debug level logging is enabled if the
C<-D> flag is given.
=head1 DESCRIPTION
This program allows you to run any Netdisco poller job from the command-line.
Note that some jobs (C<discoverall>, C<macwalk>, C<arpwalk>) simply add
entries to the Netdisco job queue for other jobs, so won't seem to do much
when you trigger them.
=head1 ACTIONS
=head2 discover
Run a discover on the device (specified with C<-d>).
=head2 macsuck
Run a macsuck on the device (specified with C<-d>).
=head2 arpnip
Run an arpnip on the device (specified with C<-d>).
=head2 set_location
Set the SNMP location field on the device (specified with C<-d>). Pass the
location string in the C<-e> extra parameter.
=head2 set_contact
Set the SNMP contact field on the device (specified with C<-d>). Pass the
contact name in the C<-e> extra parameter.
=head2 set_portname
Set the description on a device port. Requires the C<-d> parameter (device),
C<-p> parameter (port), and C<-e> parameter (description).
=head2 set_portcontrol
Set the up/down status on a device port. Requires the C<-d> parameter
(device), C<-p> parameter (port), and C<-e> parameter ("up" or "down").
=head2 set_vlan
Set the native VLAN on a device port. Requires the C<-d> parameter (device),
C<-p> parameter (port), and C<-e> parameter (VLAN number).
=head2 set_power
Set the PoE on/off status on a device port. Requires the C<-d> parameter
(device), C<-p> parameter (port), and C<-e> parameter ("true" or "false").
=cut
info "App::Netdisco version $App::Netdisco::VERSION loaded.";
use Try::Tiny;
@@ -52,6 +117,8 @@ if (!length $action) {
with 'App::Netdisco::Daemon::Worker::Poller::Device';
with 'App::Netdisco::Daemon::Worker::Poller::Arpnip';
with 'App::Netdisco::Daemon::Worker::Poller::Macsuck';
with 'App::Netdisco::Daemon::Worker::Interactive::DeviceActions';
with 'App::Netdisco::Daemon::Worker::Interactive::PortActions';
}
my $worker = MyWorker->new();