The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tivoli::AccessManager::Admin::Domain

SYNOPSIS

  use Tivoli::AccessManager::Admin;

  my $pd = Tivoli::AccessManager::Admin->new( password => 'N3ew0nk' );
  # Create a domain object
  my $dom = Tivoli::AccessManager::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 = Tivoli::AccessManager::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 = Tivoli::AccessManager::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 Tivoli::AccessManager::Admin::Domain object. You will need to destroy this object if you wish to change the context.

Parameters

PDADMIN

An initialized Tivoli::AccessManager::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 Tivoli::AccessManager::Admin::Domain object.

create( PDADMIN, name => NAME, admin => ADMINID, description => DESC, password => PASSWORD )

Instantiates a Tivoli::AccessManager::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 Tivoli::AccessManager::Admin::Domain object, buried in a Tivoli::AccessManager::Admin::Response object.

CLASS METHODS

list(PDADMIN)

Generates a list of the names of all the security domains.

Parameters

PDADMIN

A fully initialized Tivoli::AccessManager::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

  1. 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 Tivoli::AccessManager::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 Tivoli::AccessManager::Admin::Response object.

ACKNOWLEDGEMENTS

See Tivoli::AccessManager::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.