AFS-Command
view release on metacpan or search on metacpan
lib/AFS/Command/FS.pm view on Meta::CPAN
my $pathkey = $operation eq 'storebehind' ? 'files' : 'path';
return unless $self->_parse_arguments(%args);
my $errors = 0;
$errors++ unless $self->_exec_cmds( stderr => 'stdout' );
my @paths = ref $args{$pathkey} eq 'ARRAY' ? @{$args{$pathkey}} : ($args{$pathkey});
my %paths = map { $_ => 1 } @paths;
my $default = undef; # Used by storebehind
while ( defined($_ = $self->{handle}->getline()) ) {
next if /^Volume Name/;
my $path = AFS::Object::Path->new();
if ( /fs: Invalid argument; it is possible that (.*) is not in AFS./ ||
lib/AFS/Command/FS.pm view on Meta::CPAN
$self->{operation} = "lsmount";
return unless $self->_parse_arguments(%args);
my $errors = 0;
$errors++ unless $self->_exec_cmds( stderr => 'stdout' );
my @dirs = ref $args{dir} eq 'ARRAY' ? @{$args{dir}} : ($args{dir});
my %dirs = map { $_ => 1 } @dirs;
while ( defined($_ = $self->{handle}->getline()) ) {
my $current = shift @dirs;
delete $dirs{$current};
my $path = AFS::Object::Path->new( path => $current );
if ( /fs: Can.t read target name/ ) {
$path->_setAttribute( error => $_ );
lib/AFS/Command/FS.pod view on Meta::CPAN
cell The AFS cell of the client
=back
=head1 METHODS (with simple return values)
=head2 checkvolumes
The fs help string is:
fs checkvolumes: check volumeID/name mappings
Usage: fs checkvolumes
The corresponding method invocation looks like:
my $result = $fs->checkvolumes();
=head2 cleanacl
The fs help string is:
lib/AFS/Command/VOS.pod view on Meta::CPAN
verbose => 1,
encrypt => 1,
);
=item Return Values
This method returns a list of AFS::Object::FileServer
objects, each of which has attributes that vary depending on the
arguments to the method call.
In particular, vos will try to map IP addresses into hostnames, and
this may or may not succeed, depending on the stability and
correctness of the hostname resolution mechanism (usually DNS, of
course, but that is outside of vos' control).
my @result = $vos->listaddrs
(
cell => $cell,
);
foreach my $result ( @result ) {
lib/AFS/Command/VOS.pod view on Meta::CPAN
}
If a specific 'host' or 'uuid' is specified, then only one object will
be returned (assuming the specified host or uuid is valid, of course,
otherwise, you get nothing).
B<AFS::Object::FileServer>
This object will have one or more of the following attributes,
depending on the choice of arguments to the method, as well as the
ability of vos to map the IP addresses back into hostnames.
Attributes Values
---------- ------
hostname Server's hostname (duh)
addresses ARRAY reference of IP addresses
uuid Servers's UUID (duh)
The 'uuid' will be present if the 'printuuid' or 'uuid' arguments were
passed to the method call. The 'addresses' will be present either
'noresolve' was specified, or vos has problems with hostname
lib/AFS/Command/VOS.pod view on Meta::CPAN
Methods Returns
------- -------
getVolumeNames() list of volume names in the results
getVolumeIds() list of numeric volume IDs
getVLDBEntry(name => $name) the AFS::Object::VLDBEntry for name $name
getVLDBEntry(id => $id) the AFS::Object::VLDBEntry for id $id
getVLDBEntries() list of AFS::Object::VLDBEntry objects
getVLDBEntryByName($name) the AFS::Object::VLDBEntry for $name
getVLDBEntryById($id) the AFS::Object::VLDBEntry for $id
NOTE: name to volume mappings are one to one, but id to volume
mappings are many to one, since a single logical VLDB entry can have
several IDs associated with it (RW, RO, BK, and/or RC).
B<AFS::Object::VLDBEntry>
This object also has a few attributes, and a few methods. The 'name'
attribute is always present, but the others vary, depending on the
volume (again, see the 'examine' documentation for more verbosity).
Attributes Values
---------- ------
t/02vos_volserver.t view on Meta::CPAN
unless ( ref $listvol && $listvol->isa("AFS::Object::VolServer") ) {
print "not ok $TestCounter..$TestTotal\n";
die("Unable to query listvol for server '$server_primary', in cell '$cell':\n" .
Data::Dumper->Dump([$vos],['vos']));
}
print "# AFS::Command::VOS->listvol()\n";
print "ok $TestCounter\n";
$TestCounter++;
my $listpart_names = { map { $_ => 1 } $listpart->getPartitionNames() };
my $listvol_names = { map { $_ => 1 } $listvol->getPartitionNames() };
my $partname_errors = 0;
foreach my $hashpair ( [ $listpart_names, $listvol_names ],
[ $listvol_names, $listpart_names ] ) {
my ($src,$dst) = @$hashpair;
foreach my $partname ( keys %$src ) {
$partname_errors++ unless $dst->{$partname};
util/bin/check_copyright view on Meta::CPAN
#
# To run this, from the top level source directory,
# ./util/check_copyright
#
use Getopt::Long;
use File::Basename;
GetOptions( \%args, qw( update ) ) || die;
%skip = map { $_ => 1 }
qw(
.options/rcsMajor
.msbaseline
.exclude
MANIFEST
Changes.html
README.html
ToDo.html
);
util/bin/check_version view on Meta::CPAN
# To run this, from the top level source directory,
# ./util/check_version
#
use Getopt::Long;
use File::Basename;
use Cwd;
GetOptions( \%args, qw( update version=s ) ) || die;
%skip = map { $_ => 1 }
qw(
.options/rcsMajor
.msbaseline
.exclude
MANIFEST
Changes.html
README.html
);
my $cwd = cwd;
util/bin/write_manifest view on Meta::CPAN
#
# (c) 2003-2004 Morgan Stanley and Co.
# See ..../src/LICENSE for terms of distribution.
#
# This is not used to build the distribution, just to keep that pesky
# MANIFEST file up to date...
#
# To run this, from the top level source directory, ./util/write_manifest
#
%skip = map { $_ => 1 }
qw(
.options/rcsMajor
.msbaseline
.exclude
);
warn "Searching source tree for files...\n";
open(FIND,"find . -type f -print |") ||
die "Unable to fork find: $!\n";
( run in 0.514 second using v1.01-cache-2.11-cpan-49f99fa48dc )