NAME
Tivoli::AccessManager::Admin::Server
SYNOPSIS
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");
DESCRIPTION
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".
CONSTRUCTOR
new(PDADMIN[, NAME])
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.
Parameters
- PDADMIN
-
An initialized Tivoli::AccessManager::Admin::Context object. This is the only required parameter.
- NAME
-
The servers's name. This is technically not required, but you need to define the name before you can use "tasklist" or "task".
Returns
A blessed Tivoli::AccessManager::Admin::Server as long as you provide a valid context. It will warn and return undef otherwise.
CLASS METHODS
list
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.
Parameters
None.
Returns
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.
METHODS
All methods return a Tivoli::AccessManager::Admin::Response object. See the documentation for that module to get the actual values out.
task(COMMAND)
Executes the named command on the server.
Parameters
- COMMAND
-
The command to execute. This parameter is required.
Returns
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.
tasklist
Gets a list of all the tasks defined on the server.
Parameters
None.
Returns
An array containing the output. See the discussion in "task" for more information.
name([NAME])
Gets or sets the server's name.
Parameters
- NAME
-
The new name. This parameter is optional.
Returns
The name of the server, 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 I.
BUGS
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.
AUTHOR
Mik Firestone <mikfire@gmail.com>
COPYRIGHT
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.