NAME Clearadm.pm 
Object oriented interface to Clearadm.
VERSION
- Author
-
Andrew DeFaria <Andrew@ClearSCM.com>
- Revision
-
Revision 1.54
- Created
-
Tue Dec 07 09:13:27 EST 2010
- Modified
-
Modifed 2012/11/09 06:43:26
SYNOPSIS
Provides the Clearadm object which handles all interaction with the Clearadm database. Similar add/change/delete/update methods for other record types. In general you must orient your record hashs to have the appropriately named keys that correspond to the database. Also see mothod documentation for specifics about the method you are envoking.
# Create new Clearadm object
my $clearadm = new Clearadm;
# Add a new system
my %system =(
name => 'jupiter',
alias => 'defaria.com',
admin => 'Andrew DeFaria',
os => 'Linux defaria.com 2.6.32-25-generic-pae #45-Ubuntu SMP Sat Oct 16 21:01:33 UTC 2010 i686 GNU/Linux',
type => 'Linux',
description => 'Home server',
);
my ($err, $msg) = $clearadm->AddSystem(%system);
# Find systems matching 'jup'
my @systems = $clearadm->FindSystem('jup');
# Get a system by name
my %system = $clearadm->GetSystem('jupiter');
# Update system
my %update = (
'region' => 'East Coast',
);
my ($err, $msg) = $clearadm->UpdateSystem ('jupiter', %update);
# Delete system (Warning: will delete all related records regarding this
# system).
my ($err, $msg) = $clearadm->DeleteSystem('jupiter');
DESCRIPTION
This package provides and object oriented interface to the Clearadm database. Methods are provided to manipulate records by adding, updating and deleting them. In general you need to specify a hash which contains keys and values corresponding to the database field names and values.
ROUTINES
The following methods are available:
CONFIGURATION AND ENVIRONMENT
DEBUG: If set then $debug is set to this level.
VERBOSE: If set then $verbose is set to this level.
TRACE: If set then $trace is set to this level.
DEPENDENCIES
Perl Modules
ClearSCM Perl Modules
DateUtils
Display
GetConfig
BUGS AND LIMITATIONS
There are no known bugs in this module
Please report problems to Andrew DeFaria <Andrew@ClearSCM.com>.
LICENSE AND COPYRIGHT
Copyright (c) 2010, ClearSCM, Inc. All rights reserved.