Tivoli::AccessManager::Admin::Server
my $tam = Tivoli::AccessManager::Admin->new(password => 'N3ew0nk'); my($server, $resp); # Lets see what servers are defined $resp = Tivoli::AccessManager::Admin::Server->list($tam); # Lets find a webSEAL my $wseal; for ($resp->value) { if (/webseal/) { $wseal = $_; last; } } $server = Tivoli::AccessManager::Admin::Server->new($tam,$wseal); # Get a list of tasks from the webSEAL $resp = $server->tasklist; # Execute a task $resp = $server->task("list");
Tivoli::AccessManager::Admin::Server implements the server access portion of the TAM API. This basically means any pdadmin command that starts with the word "server".
Creates a blessed Tivoli::AccessManager::Admin::Server object. As you may well expect, you will need to destroy the object if you want to change the context.
An initialized Tivoli::AccessManager::Admin::Context object. This is the only required parameter.
The servers's name. This is technically not required, but you need to define the name before you can use "tasklist" or "task".
A blessed Tivoli::AccessManager::Admin::Server as long as you provide a valid context. It will warn and return undef otherwise.
Lists all servers. This method is something of a hack. TAM does not expose a server list function to the C API. This method actually uses the membership list of the remote-acl-users group. It isn't great, but it should work.
None.
Hopefully, a list of all the defined servers buried in a Tivoli::AccessManager::Admin::Response object. There may be some extra values in there, but you shouldn't be adding your own stuff to remove-acl-users anyway.
All methods return a Tivoli::AccessManager::Admin::Response object. See the documentation for that module to get the actual values out.
Executes the named command on the server.
The command to execute. This parameter is required.
An array containing the results of the command. The API is a little weird in this, but it makes some sense. The API actually returns everything as one string, separated by newlines. I split this string on newlines to generate an array. It isn't pretty, but that is the way it works.
An invalid or missing command will generate an error.
Gets a list of all the tasks defined on the server.
An array containing the output. See the discussion in "task" for more information.
Gets or sets the server's name.
The new name. This parameter is optional.
The name of the server, buried in a Tivoli::AccessManager::Admin::Response object.
See Tivoli::AccessManager::Admin for the list. This was not possible without the help of a bunch of people smarter than I.
I would really like a server list and server info function exposed to the C API. Like what Java has. This isn't my bug.
Mik Firestone <mikfire@gmail.com>
Copyright (c) 2006-2013 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.
To install Tivoli::AccessManager::Admin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tivoli::AccessManager::Admin
CPAN shell
perl -MCPAN -e shell install Tivoli::AccessManager::Admin
For more information on module installation, please visit the detailed CPAN module installation guide.