NAME
Net::Cisco::ACS::User - Access Cisco ACS functionality through REST API - User fields
SYNOPSIS
use Net::Cisco::ACS;
use Net::Cisco::ACS::User;
my $acs = Net::Cisco::ACS->new(hostname => '10.0.0.1', username => 'acsadmin', password => 'testPassword');
my $user = Net::Cisco::ACS::User->new("name"=>"soloh","description"=>"Han Solo","identityGroupName"=>"All Groups:MilleniumCrew","password"=>"Leia");
my %users = $acs->users;
# Retrieve all users from ACS
# Returns hash with username / Net::Cisco::ACS::User pairs
print $acs->users->{"acsadmin"}->toXML;
# Dump in XML format (used by ACS for API calls)
my $user = $acs->users("name","acsadmin");
# Faster call to request specific user information by name
my $user = $acs->users("id","150");
# Faster call to request specific user information by ID (assigned by ACS, present in Net::Cisco::ACS::User)
$user->id(0); # Required for new user!
my $id = $acs->create($user);
# Create new user based on Net::Cisco::ACS::User 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($user);
# Update existing user based on Net::Cisco::ACS::User 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($user);
# Delete existing user based on Net::Cisco::ACS::User instance
DESCRIPTION
The Net::Cisco::ACS::User class holds all the user relevant information from Cisco ACS 5.x
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::User on succes. The following fields can be set / retrieved:
- description =item name =item identityGroupName =item enablePassword =item enabled =item password =item passwordNeverExpires =item passwordType =item dateExceeds =item dateExceedsEnabled =item id
-
Formatting rules may be in place & enforced by Cisco ACS.
Read-only values:
- changePassword =item created =item attributeInfo =item lastLogin =item lastModified =item lastPasswordChange =item loginFailuresCounter
- description
-
The user account description, typically used for full name.
- name
-
The user account name. This is a required value in the constructor but can be redefined afterwards.
- identityGroupName
-
The user group name. This is a required value in the constructor but can be redefined afterwards. See Net::Cisco::ACS::IdentityGroupName.
- enablePassword
-
The enable password (for Cisco-level access), not needed if you work with command sets in your access policies.
- enabled
-
Boolean flag to indicate account status.
- password
-
Password. When querying user account information, the password will be masked as *********. This is a required value in the constructor but can be redefined afterwards.
- passwordNeverExpires
-
Boolean flag to indicate account expiration status.
- passwordType
-
A read-only valie that indicates the password type, either for Internal User or Active Directory (needs confirmation).
- dateExceeds
-
Date field to automatically deactivate the account once passed.
- dateExceedsEnabled
-
Boolean flag to activate the automatic deactivation feature based on expiration dates.
- 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 user.
- 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 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).
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 302:
You forgot a '=back' before '=head1'