|
From: Jason B. <br...@us...> - 2004-11-16 19:02:16
|
Update of /cvsroot/openxcat/openxcat/lib/openXcat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1586 Modified Files: Base.pm Log Message: Add more POD docs Index: Base.pm =================================================================== RCS file: /cvsroot/openxcat/openxcat/lib/openXcat/Base.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- Base.pm 16 Nov 2004 17:30:35 -0000 1.23 +++ Base.pm 16 Nov 2004 19:02:05 -0000 1.24 @@ -45,6 +45,7 @@ pbsusernodes pbsjobnodes ping + nodehash ); my $D = 0; @@ -506,12 +507,6 @@ return $password; } - -# interface2ip - returns the ip addr, broadcast, and netmask of an interface -# -# This function was originally written by Sean Dague, distributed as -# part of OSCAR in OSCAR::Network under the GPL license. - sub interface2ip { my $ipregex = '\d+\.\d+\.\d+\.\d+'; my $interface = shift; @@ -643,18 +638,122 @@ =head1 SYNOPSIS use openXcat::Base; - yadda - yadda - yadda - -=head1 ABSTRACT - -This is the openXcat::Base abstract =head1 DESCRIPTION This module provides variables and functions that many oXc programs may need. +=head2 Variables + +=over 8 + +=item C<$RSHC> + +Contains path to remote shell command, usually C</usr/bin/ssh> + +=item C<$ROOT> + +Contains path to openXcat root, usually C</opt/openxcat> or something similar + +=item C<$ARCH> + +Contains architecture, as obtained from uname + +=item C<%TABS> + +Hash containing the locations of the .tab files. To access the information, +you reference them as follows: + +C<my $nodelistloc = $TABS{'NODELIST'};> + +=item C<%sitetabconf> + +Hash containing values in site.tab. Useful for gathering various pieces of +information using L<getvalue|"getvalue"> + +=item C<@uname> + +Array of values returned from uname. See L<uname> for more information. + +=item C<$hostname> + +Contains name of current host. + +=back + +=head2 Methods + +=over 8 + +=item C<singlenodeeg> + +Gives a single example node + +=item C<version> + +Returns the openXcat version + +=item C<osver> + +Returns the OS version as a string + +=item C<interface2ip> + +Gives the IP for a given interface. It returns the ip addr, broadcast, and netmask of an interface. + +This function was originally written by Sean Dague, distributed as +part of OSCAR in OSCAR::Network under the GPL license. + +=item C<host2ip> + +Resolves a hostname to an IP + +=item C<getinterfaces> + +Finds all network interfaces + +=item C<noderange> + +Resolves a given noderange, returns an array of node names + +=item C<iptohex> + +Transforms a dotted decimal IP to a packed hexadecimal + +=item C<hextoip> + +Transforms a packed hexadecimal IP to dotted decimal + +=item C<intersection> + +Really a sort of C<uniq> function, gets rid of duplicate entries + +=item C<genpasswd> + +Generates a random password of any length (default: 8) + +=item C<getvalue> + +Useful in getting values from L<%sitetabconf|"%sitetabconf"> or other hashes + +=item C<pbsusernodes> + +Returns all nodes assigned to a particular user in PBS + +=item C<pbsjobnodes> + +Returns all nodes assigned to a particular job ID in PBS + +=item C<ping> + +Pings a list of nodes + +=item C<nodehash> + +Returns two references to hashes, one with node keys, one with group keys + +=back + =head1 SEE ALSO See http://www.sourceforge.net/projects/openxcat for more information |