[OpenAFS] AFS::Command 1.1 Released on CPAN

Phil.Moore@morganstanley.com Phil.Moore@morganstanley.com
Thu, 9 Oct 2003 09:59:19 -0400


I've got uploaded the second release of the AFS::Command modules
suite, and it can be downloaded from CPAN via:

http://www.cpan.org/modules/by-module/AFS/AFS-Command-1.1.tar.gz

This release fixes a couple of bugs found in 1.0, and adds a couple of
new features.  We've been converting our systems management
infrastructure here at Morgan Stanley from the old perl4 API I wrote
(which I am going to include in the 1.2 release for historical
interest), to this new API, and it is making a lot of ugly code looks
lot better, and in some cases (due to the reduced number of forks)
actually performs better, although that's a marginal gain.

I've had feedback from exactly *one* person who has downloaded the
tarball and tried the code out, which is somewhat suprising,
considering how many people (mostly ex-Morgan employees) who asked to
release this thing over the years.  Guess they don't work with AFS
anymore...

If you do download this, and it works, please let me know.  I'm
curious to know how you're using the code, and in particular, looking
for feedback on the design of the OO API, which I have all sorts of
crazy ideas for enhancing.

Here's the Changes file from the release:

=head1 Changes in 1.1

=head1 Enhancements

=head2 AFS::Command::VOS->status()

This method now parses the individual transaction stanzas, and the API
provides access to objects that encapsulate each of them.  So, instead
of just finding out how many transactions are active, you can analyze
each of them in detail.

=head2 AFS::Object::VLDB data is now keyed on volume ID, as well as name

This changes the way the AFS::Object::VLDB data can be extracted.  In
1.0, the API allowed AFS::Object::VLDBEntry object to be queried only
by name, but 3 new methods calls allow this data to be queried by
numeric ID as well as name:

    getVLDBEntryById($id)
    getVLDBEntryByName($name)
    getVolumeIds()

The API for getVLDBEntry has changed, and the single argument usage:

    getVLDBEntry($name)		# DEPRECATED!!!!

has been deprecated.  If warnings are enabled (perl -w), then the API
will carp at you.  In the next release (1.2), that usage will no
longer be supported.  Upgrade your code, or pay the price.

The new usage of getVLDBEntry is one of:

    getVLDBEntry( name => $name )
    getVLDBEntry( id => $id )

The internal method _addEntry() now manages the data by id as well as
name, but you're not supposed to know that anyway...

=head1 Bugs

=head2 AFS::Command::BOS->status

When querying a specific instance, if it wasn't there, the API would
try to add an undefined instance object to the result, and croak.
Now, you just get a result object with no instances.

=head2 AFS::Command::FS->(several methods)

If you pass a list of paths to methods such as whichcell(), then the
error handling was a bit intrusive.  The way it used to work, in 1.0,
was to return an error if we didn't see output for one or more of the
paths.  Now, the code is more forgiving, and if have no idea what
happened for one of the given paths, we'll return a Path object for
that path which has a generic error.

=head2 AFS::Command::FS->lsmount

The "File 'foo' doesn't exist" error message wasn't trapped as a
recognized error.  It is now.

=head2 AFS::Command::FS->sysname

The pattern matching was a bit greedy and the trailing single quote
was showing up in the returned sysname value.

=cut