Net::Cisco::ACS::IdentityGroup - Access Cisco ACS functionality through REST API - IdentityGroup (usergroup) fields
use Net::Cisco::ACS; use Net::Cisco::ACS::IdentityGroup; my $acs = Net::Cisco::ACS->new(hostname => '10.0.0.1', username => 'acsadmin', password => 'testPassword'); my $identitygroup = Net::Cisco::ACS::IdentityGroup->new("name"=>"All Groups:MilleniumCrew","description"=>"Han, Chewie, Finn and Rey"); my %identitygroups = $acs->identitygroups; # Retrieve all identitygroups from ACS # Returns hash with name / Net::Cisco::ACS::IdentityGroup pairs print $acs->identitygroups->{"All Groups"}->toXML; # Dump in XML format (used by ACS for API calls) my $identitygroup = $acs->identitygroups("name","All Groups"); # Faster call to request specific identity group information by name my $identitygroup = $acs->identitygroups("id","150"); # Faster call to request specific identity group information by ID (assigned by ACS, present in Net::Cisco::ACS::IdentityGroup) $identitygroup->id(0); # Required for new record! my $id = $acs->create($identitygroup); # Create new identity group based on Net::Cisco::ACS::IdentityGroup 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($identitygroup); # Update existing identitygroup based on Net::Cisco::ACS::IdentityGroup 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($identitygroup); # Delete existing identity group based on Net::Cisco::ACS::IdentityGroup instance
The Net::Cisco::ACS::IdentityGroup class holds all the user group relevant information from Cisco ACS 5.x. See also the identitygroup method in Net::Cisco::ACS::User.
identitygroup
All calls are typically handled through an instance of the Net::Cisco::ACS class. Net::Cisco::ACS::User acts as a container for user related information.
Class constructor. Returns object of Net::Cisco::ACS::IdentityGroup on succes. The following fields can be set / retrieved:
Formatting rules may be in place & enforced by Cisco ACS.
The identity group description.
The identity group name. This is a required value in the constructor but can be redefined afterwards. This value typically starts with All Groups as a parent group.
All Groups
Cisco ACS generates a unique ID for each User 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 identitygroup.
Dump the record in ACS accept XML formatting (without header).
Generate the correct XML header. Takes output of toXML as argument.
toXML
None so far
None so far :)
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::ACS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Cisco::ACS
CPAN shell
perl -MCPAN -e shell install Net::Cisco::ACS
For more information on module installation, please visit the detailed CPAN module installation guide.