The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

SYNOPSIS

        use Net::Cisco::ISE;
        use Net::Cisco::ISE::Device;
        
        my $ise = Net::Cisco::ISE->new(hostname => '10.0.0.1', username => 'acsadmin', password => 'testPassword');
        
        my %devices = $ise->devices;
        # Retrieve all devices from ISE
        # Returns hash with device name / Net::Cisco::ISE::Device pairs

        print $ise->devices->{"MAIN_Router"}->toXML;
        # Dump in XML format (used by ISE for API calls)
        
        my $device = $ise->devices("name","MAIN_Router");
        # Faster call to request specific device information by name

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

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

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

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

DESCRIPTION

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

USAGE

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

new

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

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

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

description

The device description.

id

The device ID. Cisco ISE generates a unique ID for each Host record. This field cannot be updated within ISE 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 ISE 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.

groupType

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

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