NAME
Net::Cisco::ACS::IdentityGroup - Access Cisco ACS functionality through REST API - IdentityGroup (usergroup) fields
SYNOPSIS
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
DESCRIPTION
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.
USAGE
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.
- new
-
Class constructor. Returns object of Net::Cisco::ACS::IdentityGroup on succes. The following fields can be set / retrieved:
- description
-
The identity group description.
- name
-
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. - id
-
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.
- toXML
-
Dump the record in ACS accept XML formatting (without header).
- header
-
Generate the correct XML header. Takes output of
toXML
as argument.
BUGS
None so far
SUPPORT
None so far :)
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).