ANNOUNCE: new module: Ingres::Utility::IINamu
am 30.10.2006 00:51:12 von Joner Cyrre WormIngres::Utility::IINamu (apdOp) API to IINAMU Ingres RDBMS utility
This module has been accepted in CPAN's Official Module List and is the
first module of a framework to interact with and administrate local
services of Ingres RDBMS through an object-oriented API.
The API implements as similar as possible all commands accepted by each
of Ingres' utilities.
The whole framework will provide the basis to develop powerful and
friendly tools, but each module can be easily employed by simple Perl
scripts to automate sysadmin daily tasks.
The project is hosted at Sourceforge.net:
http://www.sourceforge.net/projects/ingres-utility/
The module is hosted also on CPAN:
http://search.cpan.org/~WORM/Ingres-Utility-IINamu-0.07/
Here is the POD (abriged):
NAME
Ingres::Utility::IINamu - API to "iinamu" Ingres RDBMS utility
VERSION
Version 0.07
SYNOPSIS
List registered INGRES (IIDBMS) services:
use Ingres::Utility::IINamu;
my $foo = Ingres::Utility::IINamu->new();
# list all INGRES-type servers (iidbms)
print $foo->show('INGRES');
# process each server separately
while (my @server = $foo->getServer()) {
print "Server type:
$server[0]\tname:$server[1]\tid:$server[2]";
if (defined($server[3])) {
print "\t$server[3]";
}
print "\n";
}
# stop IIGCN server (no more connections to all of Ingres
services)
$ret = $foo->stop();
...
DESCRIPTION
This module provides an API to the "iinamu" utility for Ingres
RDBMS,
which provides local interaction and control of IIGCN server, in
charge
of registering all Ingres services.
Through this interface, it is possible to obtain a list of all
registered services, for later processing (eg. "iimonitor"), and
also
stopping the IIGCN server (EXTREME CAUTION: Ingres may need to be
restarted!).
METHODS
"new()"
Create a new instance, checking environment prerequisites and
preparing for interfacing with "iinamu" utility.
$namu = Ingres::Utility::IINamu->new();
"show(;$serverType)"
Returns the output of "SHOW" command, and prepares for parsing
the
servers sequentially with "getServer()".
Takes one optional argument for the service: 'INGRES'(IIDBMS,
default), 'COMSVR' (IIGCC), etc.
print $namu->show('COMSVR'); # show IIGCN servers
"getServer()"
Returns sequentially (call-after-call) each server reported by
"show()" as an array of 3~4 elements:
# getServer()[0]: server type (INGRES, COMSVR, etc.)
# getServer()[1]: server name (as registered with IINAMU or
add() method)
# getServer()[2]: server GCA address (given by INGSTART)
# getServer()[3]: extra info
$namu->show('INGRES'); # prepare to show all INGRES (IIDBMS
) servers
while (@svrs = $namu->getServer()) {
print "Server name: $svrs[1]\t address: $svrs[2]";
print "\t($svrs[3])" if (defined $svrs[3]);
print "\n"
}
"stop()"
Shuts down the IIGCN daemon, making it no longer possible to
stablish new connections to any Ingres service. After this, a
total
restart of Ingres will most probably be necessary.
$namu->stop(); # no more connections (local remote, etc...)
"add($serverType,$serverName,$serverAddr)"
Register another server with IIGCN, so that it can be available
to
clients.
Parameters:
# serverType: type of server (INGRES, COMSVR, etc.)
# serverName: '*' or a name to individualize the server
from the others
# serverAddr: GCA address attributed during ingstart
utility
print $namu->add('COMSVR', '*', '123456'); # register IIGCN
server
"del($serverType,$serverName,$serverAddr)"
Unregister another server with IIGCN, so that it will not be
available to clients.
A server can be registered later again.
Parameters:
# serverType: type of server (INGRES, COMSVR, etc.)
# serverName: '*' or a name to individualize the server
from the others
# serverAddr: GCA address attributed during ingstart
utility
print $namu->del('COMSVR', '*', '123456'); # this one is
not seen anymore.
DEPENDENCIES
Expect::Simple
SUPPORT
You can find documentation for this module with the perldoc
command.
perldoc Ingres::Utility::IINamu
You can also look for information at:
* AnnoCPAN: Annotated CPAN documentation
* CPAN Ratings
* RT: CPAN's request tracker
* Search CPAN
ACKNOWLEDGEMENTS
Thanks to Computer Associates (CA) for licensing Ingres as open
source,
and let us hope for Ingres Corp to keep it that way.
AUTHOR
Joner Cyrre Worm "
LICENSE AND COPYRIGHT
Copyright (c) 2006, Joner Cyrre Worm "
All rights reserved.
Ingres is a registered brand of Ingres Corporation.
This program is free software; you can redistribute it and/or
modify it
under the same terms as Perl itself. See perlartistic.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS
WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
LIABLE
TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE
SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR
A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN
IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH
DAMAGES.