Net::Cisco::ISE::NetworkDeviceGroup - Access Cisco ISE functionality through REST API - DeviceGroup fields
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
The Net::Cisco::ISE::NetworkDeviceGroup class holds all the device group relevant information from Cisco ISE 5.x
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.
Class constructor. Returns object of Net::Cisco::ISE::NetworkDeviceGroup on succes. The following fields can be set / retrieved:
Formatting rules may be in place & enforced by Cisco ISE.
The device group account description, typically used for full device group name.
The device group name. This is a required value in the constructor but can be redefined afterwards.
This points to the type of Device Group, typically Location or Device Type but can be customized. See also Net::Cisco::ISE::NetworkDevice deviceType.
deviceType
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.
Dump the record in ISE accept XML formatting (without header).
Generate the correct XML header. Takes output of toXML as argument.
toXML
None yet
None yet :)
Hendrik Van Belleghem CPAN ID: BEATNIK hendrik.vanbelleghem@gmail.com
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.
perl(1).
To install Net::Cisco::ISE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Cisco::ISE
CPAN shell
perl -MCPAN -e shell install Net::Cisco::ISE
For more information on module installation, please visit the detailed CPAN module installation guide.