NAME Vob.pm
Object oriented interface to a Clearcase VOB
VERSION
- Author
-
Andrew DeFaria <Andrew@DeFaria.com>
- Revision
-
$Revision: 1.15 $
- Created
-
Thu Dec 29 12:07:59 PST 2005
- Modified
-
$Date: 2011/11/16 19:46:13 $
SYNOPSIS
Provides access to information about a Clearcase VOB. Note that information about the number of elements, branches, etc. that is provided by countdb are not initially instantiated with the VOB object, rather those member variables are expanded if and when accessed. This helps the VOB object to be more efficient.
# Create VOB object
my $vob = new Clearcase::Vob (tag => "/vobs/test");
# Access member variables...
print "Tag:\t\t" . $vob->tag . "\n";
print "Global path:\t" . $vob->gpath . "\n";
print "Sever host:\t" . $vob->shost . "\n";
print "Access:\t\t" . $vob->access . "\n";
print "Mount options:\t" . $vob->mopts . "\n";
print "Region:\t\t" . $vob->region . "\n";
print "Active:\t\t" . $vob->active . "\n";
print "Replica UUID:\t" . $vob->replica_uuid . "\n";
print "Host:\t\t" . $vob->host . "\n";
print "Access path:\t" . $vob->access_path . "\n";
print "Family UUID:\t" . $vob->family_uuid . "\n";
# This members are not initially expanded until accessed
print "Elements:\t" . $vob->elements . "\n";
print "Branches:\t" . $vob->branches . "\n";
print "Versions:\t" . $vob->versions . "\n";
print "DB Size:\t" . $vob->dbsize . "\n";
print "Adm Size:\t" . $vob->admsize . "\n";
print "CT Size:\t" . $vob->ctsize . "\n";
print "DO Size:\t" . $vob->dosize . "\n";
print "Src Size:\t" . $vob->srcsize . "\n";
print "Size:\t\t" . $vob->size . "\n";
# VOB manipulation
print "Umounting " . $vob->tag . "...\n";
$vob->umount;
print "Mounting " . $vob->tag . "...\n";
$vob->mount;
DESCRIPTION
This module, and others below the Clearcase directory, implement an object oriented approach to Clearcase. In general Clearcase entities are made into objects that can be manipulated easily in Perl. This module is the main or global module. Contained herein are members and methods of a general or global nature. Also contained here is an IPC interface to cleartool such that cleartool runs in the background andcommands are fed to it via the exec method. When making repeated calls to cleartool this can result in a substantial savings of time as most operating systems' fork/exec sequence is time consuming. Factors of 8 fold improvement have been measured.
Additionally a global variable, $cc, is implemented from this module such that you should not need to instantiate another one, though you could.
ROUTINES
The following routines are exported:
new (tag)
Construct a new Clearcase VOB object. Note that not all members are initially populated because doing so would be time consuming. Such member variables will be expanded when accessed.
Parameters:
- tag
-
VOB tag to be instantiated. You can use either an object oriented call (i.e. my $vob = new Clearcase::Vob (tag => "/vobs/test")) or the normal call (i.e. my $vob = new Clearcase::Vob ("/vobs/test")). You can also instantiate a new vob by supplying a tag and then later calling the create method.
Returns:
tag
Returns the VOB tag
Parameters:
- none
Returns:
gpath
Returns the VOB global path
Parameters:
- none
Returns:
shost
Returns the VOB server host
Parameters:
- none
Returns:
access
Returns the type of VOB access
Parameters:
- none
Returns:
- access
-
Returns either public for public VOBs or private for private VOBs
mopts
Returns the mount options
Parameters:
- none
Returns:
region
Returns the region for this VOB tag
Parameters:
- none
Returns:
- region
active
Returns that active status (whether or not the vob is currently mounted) of the VOB
Parameters:
- none
Returns:
replica_uuid
Returns the VOB replica_uuid
Parameters:
- none
Returns:
host
Returns the VOB host
Parameters:
- none
Returns:
access_path
Returns the VOB access path
Parameters:
- none
Returns:
family_uuid
Returns the VOB family UUID
Parameters:
- none
Returns:
vob_registry_attributes
Returns the VOB Registry Attributes
Parameters:
- none
Returns:
masterReplica
Returns the VOB master replica
Parameters:
- none
Returns:
created
Returns the date the VOB was created
Parameters:
- none
Returns:
ownername
Returns the VOB ownername
Parameters:
- none
Returns:
owner
Returns the VOB owner
Parameters:
- none
Returns:
comment
Returns the VOB comment
Parameters:
- none
Returns:
replicaName
Returns the VOB replicaName
Parameters:
- none
Returns:
featureLevel
Returns the VOB featureLevel
Parameters:
- none
Returns:
schemaVersion
Returns the VOB schemaVersion
Parameters:
- none
Returns:
remotePrivilege
Returns the VOB remotePrivilege
Parameters:
- none
Returns:
atomicCheckin
Returns the VOB atomicCheckin
Parameters:
- none
Returns:
group
Returns the VOB group
Parameters:
- none
Returns:
groups
Returns the VOB groups
Parameters:
- none
Returns:
aclsEnabled
Returns the VOB aclsEnabled
Parameters:
- none
Returns:
attributes
Returns the VOB attributes
Parameters:
- none
Returns:
hyperlinks
Returns the VOB hyperlinks
Parameters:
- none
Returns:
elements
Returns the number of elements in the VOB (obtained via countdb)
Parameters:
- none
Returns:
branches
Returns the number of branch types in the vob
Parameters:
- none
Returns:
versions
Returns the number of element versions in the VOB
Parameters:
- none
Returns:
dbsize
Returns the size of the VOB's database
Parameters:
- none
Returns:
admsize
Returns the size of administrative data in the VOB
Parameters:
- none
Returns:
ctsize
Returns the size of the cleartext pool
Parameters:
- none
Returns:
dosize
Returns the size of the derived object pool
Parameters:
- none
Returns:
srcsize
Returns the size of the source pool
Parameters:
- none
Returns:
size
Returns the size of the VOB
Parameters:
- none
Returns:
- size
mount
Mount the current VOB
Parameters:
- none
Returns:
- $status
-
Status of the mount command
- @output
-
An array of lines output from the cleartool mount command
umount
Unmounts the current VOB
Parameters:
- none
Returns:
exists
Returns true or false if the VOB exists
Parameters:
- none
Returns:
- boolean
create
Creates a VOB. First instantiate a VOB object with a tag. Then call create. A small subset of parameters is supported for create.
Parameters:
- $host (optional)
-
Host to create the vob on. Default is the current host.
- $vbs (optional)
-
VOB storage area. This is a global pathname to the VOB storage area. Default will attempt to use -stgloc -auto.
- $comment (optional)
-
Comment for this VOB's creation. Default is -nc
Returns:
remove
Removed this VOB
Parameters:
- none
Returns:
updateVobInfo ($vob)
Updates the VOB info from cleartool lsvob
Parameters:
Returns:
- nothing
updateVobInfo ($vob)
Updates the VOB info from cleartool lsvob
Parameters:
Returns:
- nothing
DEPENDENCIES
Modules
BUGS AND LIMITATIONS
There are no known bugs in this module
Please report problems to Andrew DeFaria <Andrew@DeFaria.com>.
COPYRIGHT AND LICENSE
Copyright (C) 2020 by Andrew@DeFaria.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.38.0 or, at your option, any later version of Perl 5 you may have available.