RackMan - Main interface for accessing a RackTables database
use RackMan; use RackMan::Config; my $config = RackMan::Config->new(-file => "/etc/rack.conf"); my $rackman = RackMan->new({ config => $config });
RackMan is a set of Perl modules for fetching information from a RackTables database. The distribution also includes some commands that show how to use the RackMan API.
rack is a program that generates the configuration files for the given RackObject, and talk with the corresponding devices to set them up accordingly.
cisco-status is a program that connects to a Cisco switch to list the devices connected to it, with additionnal information resolved from RackTables.
cfengine-tags is a program that generates tag files for Cfengine.
A technical presentation of this software was made at the French Perl Workshop 2012: http://maddingue.org/conferences/fpw-2012/rackman/
Note: This software was written to perform very specific tasks. Although it was tried to keep it generic, it certainly isn't, and the documentation is very rough. There's a more comprehensive tutorial (only in French for now) in pod/RackMan/Manual.fr.pod
This RackMan module provides the main interface for accessing a RackTables database.
RackMan
Connect to the RackTables database using the parameters from the configuration file.
Alias for device_by_name().
device_by_name()
Try to find and return the RackObject with the given ID.
Try to find and return the RackObject with the given name.
Return a RackMan::SCM object corresponding to the tool selected by the configuration file and command line options.
Process and execute an action as given from the command line.
Arguments are expected to be:
the action name
optional action options, as a plain hash
RackObject name
Class method to print an error and exit.
Class method to print an error, preceded by a newline, and exit.
Class method to set the return status of the program.
Class method to get the return status of the program.
Class method to print a warning.
Sebastien Aperghis-Tramoni (sebastien@aperghis.net)
To install RackMan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RackMan
CPAN shell
perl -MCPAN -e shell install RackMan
For more information on module installation, please visit the detailed CPAN module installation guide.