NAME

Net::Cisco::ACS - Access Cisco ACS functionality through REST API

SYNOPSIS

use Net::Cisco::ACS;
my $acs = Net::Cisco::ACS->new(hostname => '10.0.0.1', username => 'acsadmin', password => 'testPassword');
# Options:
# hostname - IP or hostname of Cisco ACS 5.x server
# username - Username of Administrator user
# password - Password of user
# ssl - SSL enabled (1 - default) or disabled (0)
	
my %users = $acs->users;
# Retrieve all users from ACS
# Returns hash with username / Net::Cisco::ACS::User pairs

print $acs->users->{"acsadmin"}->toXML;
# Dump in XML format (used by ACS for API calls)

my $user = $acs->users("name","acsadmin");
# Faster call to request specific user information by name

my $user = $acs->users("id","150");
# Faster call to request specific user information by ID (assigned by ACS, present in Net::Cisco::ACS::User)

my %devices = $acs->devices;
# Retrieve all devices from ACS
# Returns hash with device name / Net::Cisco::ACS::Device pairs

print $acs->devices->{"MAIN_Router"}->toXML;
# Dump in XML format (used by ACS for API calls)

my $device = $acs->devices("name","MAIN_Router");
# Faster call to request specific device information by name

my $device = $acs->devices("id","250");
# Faster call to request specific device information by ID (assigned by ACS, present in Net::Cisco::ACS::Device)

$user->id(0); # Required for new user!
my $id = $acs->create($user);
# Create new user based on Net::Cisco::ACS::User instance
# Return value is ID generated by ACS
print "Record ID is $id" if $id;
print $Net::Cisco::ACS::ERROR unless $id;
# $Net::Cisco::ACS::ERROR contains details about failure

$device->id(0); # Required for new device!
my $id = $acs->create($device);
# Create new device based on Net::Cisco::ACS::Device instance
# Return value is ID generated by ACS
print "Record ID is $id" if $id;
print $Net::Cisco::ACS::ERROR unless $id;
# $Net::Cisco::ACS::ERROR contains details about failure

my $id = $acs->update($user);
# Update existing user based on Net::Cisco::ACS::User instance
# Return value is ID generated by ACS
print "Record ID is $id" if $id;
print $Net::Cisco::ACS::ERROR unless $id;
# $Net::Cisco::ACS::ERROR contains details about failure

my $id = $acs->update($device);
# Update existing device based on Net::Cisco::ACS::Device instance
# Return value is ID generated by ACS
print "Record ID is $id" if $id;
print $Net::Cisco::ACS::ERROR unless $id;
# $Net::Cisco::ACS::ERROR contains details about failure

$acs->delete($user);
# Delete existing user based on Net::Cisco::ACS::User instance

$acs->delete($device);
# Delete existing device based on Net::Cisco::ACS::Device instance

DESCRIPTION

See Net::Cisco::ACS::User for more information on User management. See Net::Cisco::ACS::Device for more information on Device management.

USAGE

BUGS

SUPPORT

AUTHOR

Hendrik Van Belleghem
CPAN ID: BEATNIK
hendrik.vanbelleghem@gmail.com

COPYRIGHT

This program is free software licensed under the...

The General Public License (GPL)
Version 2, June 1991

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

perl(1).