NAME
TAMeb::Admin::Domain
SYNOPSIS
use TAMeb::Admin;
my $pd = TAMeb::Admin->new( password => 'N3ew0nk' );
# Create a domain object
my $dom = TAMeb::Admin::Domain->new( $pd,
name => 'Test',
admin => 'chimchim',
description => 'test domain' );
# Create it in TAM
my $resp = $dom->create(password => 'n33w0nk');
# Create another domain in a different way
$resp = TAMeb::Admin::Domain->create( $pd,
name => 'Test1',
admin => 'chimchim',
description => 'another test domain',
password => 'n33w0nk');
my $dom1 = $resp->value;
# Delete them both
$resp = $dom->delete; # All the info stays in registry
$resp = $dom1->delete( 1 ); # Kill everything
# Recreate my example :)
$resp = $dom->create(password => 'n33w0nk');
# Set the description
$resp = $dom->description( 'Speed Racer' );
# Get a list of all the domains
$resp = $dom->list;
# Or
$resp = TAMeb::Admin::Domain->list($pd);
print "Domains:\n\t" . join("\n\t", @{$resp->value});
DESCRIPTION
Allows for the creation, deletion and some manipulations of TAM domains.
CONSTRUCTORS
new( PDADMIN[, name => NAME, admin => ADMINID, description => DESC] );
Creates a blessed TAMeb::Admin::Domain object. You will need to destroy this object if you wish to change the context.
Parameters
- PDADMIN
-
An initialized TAMeb::Admin::Context object. This is the only required parameter.
- name => NAME
-
The name of the domain.
- admin => ADMINID
-
The domain administrator's ID.
- description => DESC
-
A description of the domain.
Returns
A blessed TAMeb::Admin::Domain object.
create( PDADMIN, name => NAME, admin => ADMINID, description => DESC, password => PASSWORD )
Instantiates a TAMeb::Admin::Domain object and creates the domain in TAM if used as a class method.
Parameters
- name => NAME
- admin => ADMINID
- description => DESC
-
The parameters are identical to those for "new". Unlike "new", they are all required.
- password => PASSWORD
-
The domain administrator's password. This too is required.
Returns
A blessed TAMeb::Admin::Domain object, buried in a TAMeb::Admin::Response object.
CLASS METHODS
list(PDADMIN)
Generates a list of the names of all the security domains.
Parameters
- PDADMIN
-
A fully initialized TAMeb::Admin::Context object.
Returns
The list of the security domains currently defined.
METHODS
create( name => NAME, admin => ADMINID, description => DESC, password => PASSWORD )
Yes, this can called as an instance method if you want. Notice the different signature -- the context object is no longer required.
Parameters
- name => NAME
- admin => ADMINID
- description => DESC
-
See "new". Any parameter you did not provide to "new" must be provided to "create". They all must be defined to actually create the domain in TAM
- password => PASSWORD
-
The domain administrator's password. This too is required.
Returns
The results if the create operation
delete([1])
Deletes the domain from TAM.
Parameters
If provided, all of the domain's entries will be deleted from the registry.
Returns
The results of the delete call.
description([STR])
If the optional parameter is provided, the domain's description will be changed. Either way, the description for the domain is returned.
Parameters
- STR
-
Causes the domain's description to be changed to STR
Returns
The domain's current description.
list()
"list" can be called as an instance method as well. Note the diffference in the method's signature -- the TAMeb::Admin::Context object is no longer required.
Parameters
None.
Returns
The names of all the currently defined TAM domains.
name
Returns the domain's name. This is a read-only method.
Parameters
None
Returns
The domain's name. This is NOT buried in a TAMeb::Admin::Response object.
ACKNOWLEDGEMENTS
See TAMeb::Admin for the list. This was not possible without the help of a bunch of people smarter than me.
BUGS
AUTHOR
Mik Firestone <mikfire@gmail.com>
COPYRIGHT
Copyright (c) 2004-2011 Mik Firestone. All rights reserved. This program is free software; you can redistibute it and/or modify it under the same terms as Perl itself.
All references to TAM, Tivoli Access Manager, etc are copyrighted, trademarked and otherwise patented by IBM.