News::Collabra - Access to Collabra administrative functions
use News::Collabra; # Create an administrator object my $admin = new News::Collabra('username', 'password', 'myhost.mydomain.com', 'myhost', '1234'); # Administrate newsgroups my $result = $admin->add_newsgroup('junk.test', 'Testing newsgroup', 'A newsgroup for testing Collabra.pm'); my $result = $admin->remove_newsgroup('junk.test'); my $result = $admin->delete_all_articles('junk.test'); my $result = $admin->get_ng_acls('junk.test'); my $result = $admin->add_ng_acl('junk.test', 'nbailey', 'manager'); my $result = $admin->get_properties('junk.test'); my $result = $admin->set_properties('junk.test', 'Post your tests here!', 'A test group for FL&T'); # Administrate the server my $result = $admin->server_start; my $result = $admin->server_status; my $result = $admin->server_stop;
This module provides an incomplete but growing implementation of a Collabra admin interface. Collabra administrative functions are based on HTTP, not NNTP, so most of these functions use LWP::UserAgent, rather than News::NNTP/News::NNTPClient.
For the uninitiated, Collabra is iPlanet's hacked over version of inews, with LDAP-based access control. Unfortunately, this otherwise fairly good idea is clouded by a crufty JavaScript interface. This module is intended to provide direct access to the functions, to save administrators the pain of the JavaScript interface.
Creates a News::Collabra object given the necessary details. This method does not currently test that the username/password combination is valid, but it may soon. Watch this space.
News::Collabra
Create a new newsgroup on a Collabra news server.
Remove an existing newsgroup on a Collabra news server.
Delete all articles in the specified newsgroup (untested as a yet).
Get the ACLs for the specified newsgroup.
Add a new ACL to the specified newsgroup.
Get the display properties for the specified newsgroup.
Set the display properties for the specified newsgroup.
A fundamental check for the server, used by server_status -- if we can't run a command, is the server listening at all? If this fails, manual action is required to start the admin server (i.e. the command line scripts to start the HTTP admin server -- look for a file called 'start-admin' in your server installation directory).
Start the Collabra newsserver instance. Returns 1 on success, 0 if the server was already running (no other error states have been observed).
Returns status information about the Collabra newsserver instance (in HTML -- grep for '<b>not</b>' if you want an off/on indicator).
Start the Collabra newsserver instance. Returns 1 on success, 0 if the server was already stopped (no other error states have been observed).
This module has only been tested on a newsserver with the local (ie. supplied with Collabra) directory. Reports on servers with full directory servers would be appreciated! Also, the test server only had one newsserver instance. Tests with multiple newsservers on the one admin server or multiple newsservers on different servers would also be appreciated.
Some return values aren't particularly meaningful at the moment.
Nathan Bailey, <nate@cpan.org>
Copyright 1999-2002 Nathan Bailey. All rights reserved. This module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
To install News::Collabra, copy and paste the appropriate command in to your terminal.
cpanm
cpanm News::Collabra
CPAN shell
perl -MCPAN -e shell install News::Collabra
For more information on module installation, please visit the detailed CPAN module installation guide.