NAME

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

SYNOPSIS

use Net::Cisco::ACS;
use Net::Cisco::ACS::Device;

my $acs = Net::Cisco::ACS->new(hostname => '10.0.0.1', username => 'acsadmin', password => 'testPassword');

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)

$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($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($device);
# Delete existing device based on Net::Cisco::ACS::Device instance

DESCRIPTION

The Net::Cisco::ACS::Device class holds all the device relevant information from Cisco ACS 5.x

USAGE

All calls are typically handled through an instance of the Net::Cisco::ACS class. Net::Cisco::ACS::Device acts as a container for device group related information.

new

Class constructor. Returns object of Net::Cisco::ACS::Device on succes. The following fields can be set / retrieved:

description =item id =item name =item tacacsConnection =item groupInfo =item legacyTACACS =item tacacs_SharedSecret =item singleConnect =item radius_SharedSecret =item subnets =item ips =item location =item deviceType =item displayedInHex =item keyWrap =item portCOA

Formatting rules may be in place & enforced by Cisco ACS.

description

The device description.

id

The device ID. Cisco ACS generates a unique ID for each Host record. This field cannot be updated within ACS but is used for reference. Set to 0 when creating a new record or when duplicating an existing host.

name

The device name, typically something like the sysName or hostname.

tacacsConnection

Boolean value (0 / 1) to indicate if TACACS+ is used on this device.

groupInfo

Read-only value that contains deviceType, location and other device type information. Only deviceType, location are retrievable by the respective methods.

legacyTACACS

Boolean value (0 / 1) that indicates support for legacy versions of TACACS+.

tacacs_SharedSecret

The shared key for TACACS+. When retrieving this information, the key is masked as **********.

singleConnect

The TACACS+ singleConnect setting.

radius_SharedSecret

The shared key for RADIUS. When retrieving this information, the key is masked as **********.

subnets

Array reference that contains hash entries of all IP information for the device entry, separated as netMask and ipAddress keys.

ips

Cleaned up instance of subnet.

location

The device location field, as defined in groupInfo.

deviceType

The specific device Type field.

displayedInHex

Boolean value (0 / 1). Used for RADIUS configuration.

keyWrap

Boolean value (0 / 1). Used for RADIUS configuration.

portCOA

TCP port for specific RADIUS purposes.

toXML

Dump the record in ACS accept XML formatting (without header).

Generate the correct XML header. Takes output of toXML as argument.

description

The device group account description, typically used for full device group name.

name

The device group name. This is a required value in the constructor but can be redefined afterwards.

groupType

This points to the type of Device Group, typically Location or Device Type but can be customized. See also Net::Cisco::ACS::Device deviceType.

id

Cisco ACS generates a unique ID for each Device Group record. This field cannot be updated within ACS but is used for reference. Set to 0 when creating a new record or when duplicating an existing device group.

toXML

Dump the record in ACS accept XML formatting (without header).

header

Generate the correct XML header. Takes output of toXML as argument.

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).

1 POD Error

The following errors were encountered while parsing the POD:

Around line 402:

You forgot a '=back' before '=head1'