AFS-Command

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

=head1 Enhancements

=head2 Test suite is disabled by default.

There is a well intentioned effort to automatically test all new
submissions to CPAN (see http://testers.cpan.org).  Unfortunately, the
AFS-Command package can't be tested automatically, since it requires a
fair amount of configuration.  You have to specify a cell name, some
fileserver names and partitions, etc.

By default, the tests will all be skipped if the configured cell name
in the CONFIG file has not been modified, thus allowing the automated
CPAN testing to continue, automatically, without the author getting a
bunch of bogus emails.

=head1 Bugs

=head2 Volume status value inconsistency

!!!!!!!! WARNING !!!!!!!!

Changes.html  view on Meta::CPAN

There is a well intentioned effort to automatically test all new
submissions to CPAN (see <A
HREF="http://testers.cpan.org).">http://testers.cpan.org).</A>
Unfortunately, the AFS-Command package can't be tested automatically, since
it requires a fair amount of configuration. You have to specify a cell
name, some fileserver names and partitions, etc.


<P>

By default, the tests will all be skipped if the configured cell name in
the CONFIG file has not been modified, thus allowing the automated CPAN
testing to continue, automatically, without the author getting a bunch of
bogus emails.


<P>

<P>
<HR>
<H1><A NAME="Bugs">Bugs

META.yml  view on Meta::CPAN

--- #YAML:1.0
name:               AFS-Command
version:            1.99
abstract:           ~
author:
    - W. Phillip Moore <Phil.Moore@MorganStanley.com>
license:            unknown
distribution_type:  module
configure_requires:
    ExtUtils::MakeMaker:  0
build_requires:
    ExtUtils::MakeMaker:  0
requires:  {}
no_index:
    directory:
        - t
        - inc
generated_by:       ExtUtils::MakeMaker version 6.56
meta-spec:

lib/AFS/Command/Base.pm  view on Meta::CPAN

		}

	    }

	    unless ( waitpid($pid,0) ) {
		$self->_Carp("Unable to get status of child process ($pid)");
		return;
	    }

	    if ( $? ) {
		$self->_Carp("Error running @{$self->{command}} help.  Unable to configure $class");
		return;
	    }

	}

	$self->{_operations} = \%operations;

    }

    return $self->{_operations}->{$operation};

lib/AFS/Command/Base.pm  view on Meta::CPAN

	    $arguments->{aliases}->{f} = 'force';
	}
    }

    unless ( waitpid($pid,0) ) {
	$self->_Carp("Unable to get status of child process ($pid)");
	$errors++;
    }

    if ( $? ) {
	$self->_Carp("Error running @command $operation -help.  Unable to configure @command $operation");
	$errors++;
    }

    return if $errors;
    return $self->{_arguments}->{$operation} = $arguments;

}

sub _save_stderr {

lib/AFS/Command/Base.pod  view on Meta::CPAN

time required for each step in these complex operations.

This only applies to commands that return simple return values, eg:
release, restore, etc.  Commands that return complex structures of
objects, such as listvldb, listvol, etc will not be affected.

=back

=head2 setCarp

This class method configures the carp and/or croak subroutines used
throughout the API.  By default, the obviously sensible thing is done:
the carp an croak subroutines exported by the Carp module are used.
These normally print output to stderr, and this method provides a
mechanism for trapping these errors and redirecting them elsewhere.

For example, stderr in a system daemon may be entirely ignored, and
syslog may be a more appropriate destination.  In this case, the
setCarp method may be used to configure this, globally, for the entire
API.

    AFS::Command->setCarp
      (

       carp => sub {
	   my ($lines) = @_;
	   foreach my $line ( split(/\n+/,$lines) ) {
	       syslog('warning',$line);
	   }

lib/AFS/Command/Base.pod  view on Meta::CPAN

This method takes a list of key/value pairs, with only two supported
keys (anything else will be quietly ignored): carp an croak.  The
values are CODE references (anonymous subroutines, or references to
existing subroutines).  The carp CODE should not be fatal, however the
croak CODE should.  The API calls the croak method in very few places,
but when it does, it assumes that call will be fatal, so if you
provide a croak subroutine that doesn't die, the results will be
unpredictable, and unsupportable.

This method returns true of false, depending on whether or not the
carp and/or croak subroutines were properly configured.  If the values
are not CODE references, then this method will itself croak.

=head1 INSTANCE METHODS

=head2 errors

This method takes no arguments, and it returns a string, containing the
unparsed errors from the last command method invoked.  This string is
reset with each subsequent command method invocation.  The string is
normally the output written to stderr by the process, but in the case

lib/AFS/Command/FS.pod  view on Meta::CPAN


The corresponding method invocation looks like:

    my $result = $fs->getclientaddrs();

=item Return Values

This method returns an AFS::Object::CacheManager object with one attribute.

    my $result = $fs->getclientaddrs() || die $fs->errors();
    print "This client has the following addressed configured for AFS:\n";
    foreach my $address ( @{$result->addresses()} ) {
	print "\t$address\n";
    }

The object has the following attribute:

B<AFS::Object::CacheManager>

    Attributes			Values
    ----------			------

lib/AFS/Command/FS.pod  view on Meta::CPAN

=back

=head2 listaliases

=over

=item Arguments

The fs help string is:

    fs listaliases: list configured cell aliases
    Usage: fs listaliases

The corresponding method invocation looks like:

    my $result = $fs->listaliases();

=item Return Values

This method returns an AFS::Object::CacheManager object, which
contains one or more AFS::Object::Cell objects.

lib/AFS/Command/FS.pod  view on Meta::CPAN

=back

=head2 listcells

=over

=item Arguments

The fs help string is:

    fs listcells: list configured cells
    Usage: fs listcells [-numeric]
    Where: -numeric  addresses only

The corresponding method invocation looks like:

    my $result = $fs->listcells
      (
       # Optional arguments
       numeric			=> 1,
      );

lib/AFS/Command/FS.pod  view on Meta::CPAN


The object has the following attributes:

B<AFS::Object::CacheManager>

    Attributes			Values
    ----------			------
    sysname			The primary sysname of the client
    sysnames			An ARRAY reference of sysnames

NOTE: When a list of sysnames has been configured on the client, then
the 'sysname' attribute is simnply the first one in the list.

=back

=head2 whereis

=over

=item Arguments

lib/AFS/Command/FS.pod  view on Meta::CPAN

       # Optional arguments
       cell			=> $cell,
       rw			=> 1,
       fast			=> 1,
      );

=head2 newalias

The fs help string is:

    fs newalias: configure new cell alias
    Usage: fs newalias -alias <alias name> -name <real name of cell>

The corresponding method invocation looks like:

    my $result = $fs->newalias
      (
       # Required arguments
       alias			=> $alias,
       name			=> $name,
      );

=head2 newcell

The fs help string is:

    fs newcell: configure new cell
    Usage: fs newcell -name <cell name> -servers <primary servers>+
		      [-linkedcell <linked cell name>]

The corresponding method invocation looks like:

    my $result = $fs->newcell
      (
       # Required arguments
       name			=> $name,
       servers			=> $server, # OR [ $server1, $server2, ... ]



( run in 0.844 second using v1.01-cache-2.11-cpan-3989ada0592 )