NAME

RackMan - Main interface for accessing a RackTables database

SYNOPSIS

    use RackMan;
    use RackMan::Config;

    my $config  = RackMan::Config->new(-file => "/etc/rack.conf");
    my $rackman = RackMan->new({ config => $config });

DESCRIPTION

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.

METHODS

connection

Connect to the RackTables database using the parameters from the configuration file.

device

Alias for device_by_name().

device_by_id

Try to find and return the RackObject with the given ID.

device_by_name

Try to find and return the RackObject with the given name.

get_scm

Return a RackMan::SCM object corresponding to the tool selected by the configuration file and command line options.

process

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

error

Class method to print an error and exit.

error_n

Class method to print an error, preceded by a newline, and exit.

set_status

Class method to set the return status of the program.

status

Class method to get the return status of the program.

warning

Class method to print a warning.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Sys::Syslog

You can also look for information at:

The source code is available on Git Hub: https://github.com/maddingue/RackMan/

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 or later: http://www.fsf.org/licensing/licenses/gpl.txt

AUTHOR

Sebastien Aperghis-Tramoni (sebastien@aperghis.net)