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

NAME

Net::Cisco::ISE::NetworkDeviceGroup - Access Cisco ISE functionality through REST API - DeviceGroup fields

SYNOPSIS

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

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

        my $networkdevicegroup = $acs->networkdevicegroups("id","250");
        # Faster call to request specific device group information by ID (assigned by ISE, present in Net::Cisco::ISE::NetworkDeviceGroup)

        $networkdevicegroup->id(0); # Required for new device group!
        my $id = $acs->create($networkdevicegroup);
        # Create new device group based on Net::Cisco::ISE::NetworkDeviceGroup 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 = $acs->update($networkdevicegroup);
        # Update existing device based on Net::Cisco::ISE::NetworkDeviceGroup 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

        $acs->delete($networkdevicegroup);
        # Delete existing device based on Net::Cisco::ISE::NetworkDeviceGroup instance
        

DESCRIPTION

The Net::Cisco::ISE::NetworkDeviceGroup class holds all the device group 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::NetworkDeviceGroup acts as a container for device group related information.

new

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

description
name
id
groupType

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

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::ISE::NetworkDevice deviceType.

id

Cisco ISE generates a unique ID for each Device Group 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 device group.

toXML

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

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

BUGS

None yet

SUPPORT

None yet :)

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