AFS
view release on metacpan or search on metacpan
pod/v2/afsperlbos.pod view on Meta::CPAN
=head1 SYNOPSIS
use AFS::BOS;
my $bos = AFS::BOS->new('server');
my $ok = $bos->addhost('hostname');
my ($cell, $hosts) = $bos->listhosts;
$ok = $bos->removehost('hostname');
$bos->DESTROY; # destroy server connection
$bos = AFS::BOS->new('server');
$ok = $bos->addkey(11, 'My Secret');
my ($date, $keys) = $bos->listkeys;
$ok = $bos->removekey([10, 11]);
$ok = $bos->adduser('username');
my @users = $bos->listusers;
$ok = $bos->removeuser('username');
my ($generalTime, $newBinaryTime) = $bos->getrestart;
my ($general, $newbinary, $time) = (1, 0, 'sat 4:00');
$ok = $bos->setrestart($time, $general, $newbinary);
$ok = $bos->startup;
my $status = $bos->status;
$ok = $bos->shutdown;
$ok = $bos->start(['vlserver']);
$ok = $bos->restart(['fs', 'vlserver']);
$ok = $bos->restart_bos;
$ok = $bos->restart_all;
$ok = $bos->stop(['vlserver']);
my $restricted = $bos->getrestricted;
$ok = $bos->setrestricted('on');
$ok = $bos->create('kaserver', 'simple', ['/usr/afs/bin/kaserver']);
$ok = $bos->delete('instance');
$ok = $bos->exec('/sbin/shutdown -r now');
my @logentries = $bos->getlog('FileLog');
my ($all, $bak, $old, $core) = (0, 0, 0, 1);
$ok = $bos->prune($all, $bak, $old, $core);
$ok = $bos->salvage('/vicepa');
$ok = $bos->setauth('on');
$ok = $bos->setcellname('newcell.example.com');
=head1 DESCRIPTION
This class is used to communicate with a B<AFS Basic Overseer Server>,
which runs on every AFS server machine. It monitors and administers
the other server processes on that machine. It has also methods to
maintain system configuration files.
Before you can submit any tasks to a Basic OverSeer (BOS) Server you
must establish a connection to a BOS Server. This is done by the
constructor method I<new> which returns a BOS object. A BOS object is
essentially a handle to talk to a Basic OverSeer Server on a given
server machine. Such a BOS object is required before any of the other
BOS instance methods can be called.
=head1 COMPATIBILITY
There was no version 1 implementation and hence there are no version
conflicts :-)
=head1 METHODS
=over 4
=item B<CONSTRUCTOR>
=item S< >
=item B<$bos = AFS::BOS-E<gt>new(SERVER [, NOAUTH [, LOCALAUTH [, CELL [, ENCRYPT]]]]);>
Creates a new object of the class AFS::BOS and establishes a
connection to the Basic Overseer Server running on the SERVER machine.
An AFS::BOS object is essentially a handle to talk to the Basic
Overseer Server. Internally an AFS::BOS object is a pointer to a
rx_connection structure, although this may change and the value
returned from AFS::BOS::new should always be treaded as an opaque
handle.
Set LOCALAUTH (default 0) to 1 only when issuing a command on a server
machine. If NOAUTH is 1 (default 0) it establishes an unauthenticated
connection to the server, in which the server treats the issuer as an
unprivileged user. CELL (default NULL) specifies the cell in which to
run the command. Set ENCRYPT (default 1) to 0 if you want to use an
unencrypted connection. HANDLE WITH CARE!
=item B<DESTRUCTOR>
=item S< >
=item B<$bos-E<gt>DESTROY;>
Destroys the connection to the Basic Overseer Server and frees the
rx_connection structure.
=item B<INSTANCE METHODS>
=item S< >
=item B<$ok = $bos-E<gt>addhost(HOST [, CLONE]);>
=item B<$ok = $bos-E<gt>addhost(\@HOST [, CLONE]);>
Adds the given HOST to the local C<CellServDB> file. HOST is either a
scalar value or a reference to an array of hosts. If CLONE is set to
1 (default 0) the ubik vote of this host does not count. This
argument is only available under OpenAFS. It calls the AFS system
library function I<BOZO_AddCellHost>.
=item B<$ok = $bos-E<gt>addkey(KVNO [, STRING]);>
( run in 1.095 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )