• Home
  • Services
    • Consultancy
    • Custom Software Solutions
    • Systems Adminsitration
    • Web Applications
    • Customers
  • SCM
    • Clearcase
      • Triggers
      • Evil Twin Finder
      • GUI DiffBL
      • View Ager
      • Open Source Builds
    • Clearquest
      • Clearquest Daemon
      • DB Conversions
    • Git
      • Repository
  • Scripting
    • Perl
    • ECRDig
  • Sysadm
    • Environment
  • About
    • Services
    • Our People
    • Contact Us
 

ClearSCM Inc.

You are viewing an unstyled version of this page. Either your browser does not support Cascading Style Sheets (CSS) or CSS styling has been disabled.

NAME Vob.pm

Object oriented interface to a Clearcase VOB

VERSION

Author

Andrew DeFaria <Andrew@ClearSCM.com>

Revision

Revision 1.15

Created

Thu Dec 29 12:07:59 PST 2005

Modified

Modifed 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...
 display "Tag:\t\t"             . $vob->tag;
 display "Global path:\t"       . $vob->gpath;
 display "Sever host:\t"        . $vob->shost;
 display "Access:\t\t"          . $vob->access;
 display "Mount options:\t"     . $vob->mopts;
 display "Region:\t\t"          . $vob->region;
 display "Active:\t\t"          . $vob->active;
 display "Replica UUID:\t"      . $vob->replica_uuid;
 display "Host:\t\t"            . $vob->host;
 display "Access path:\t"       . $vob->access_path;
 display "Family UUID:\t"       . $vob->family_uuid;

 # This members are not initially expanded until accessed
 display "Elements:\t"          . $vob->elements;
 display "Branches:\t"          . $vob->branches;
 display "Versions:\t"          . $vob->versions;
 display "DB Size:\t"           . $vob->dbsize;
 display "Adm Size:\t"          . $vob->admsize;
 display "CT Size:\t"           . $vob->ctsize;
 display "DO Size:\t"           . $vob->dosize;
 display "Src Size:\t"          . $vob->srcsize;
 display "Size:\t\t"            . $vob->size;

 # VOB manipulation
 display "Umounting " . $vob->tag . "...";

 $vob->umount;

 display "Mounting " . $vob->tag . "...";

 $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:

Clearcase VOB object

tag

Returns the VOB tag

Parameters:

none

Returns:

VOB's tag

gpath

Returns the VOB global path

Parameters:

none

Returns:

VOB's gpath

shost

Returns the VOB server host

Parameters:

none

Returns:

VOB's server host

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:

VOB's mount options

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:

Returns YES for an active VOB or NO for an inactive one

replica_uuid

Returns the VOB replica_uuid

Parameters:

none

Returns:

VOB replica_uuid

host

Returns the VOB host

Parameters:

none

Returns:

VOB's host

access_path

Returns the VOB access path

Parameters:

none

Returns:

VOB access path

This is the path relative to the VOB's host

family_uuid

Returns the VOB family UUID

Parameters:

none

Returns:

VOB family UUID

vob_registry_attributes

Returns the VOB Registry Attributes

Parameters:

none

Returns:

VOB Registry Attributes

masterReplica

Returns the VOB master replica

Parameters:

none

Returns:

VOB master replica

created

Returns the date the VOB was created

Parameters:

none

Returns:

Date the VOB was created

ownername

Returns the VOB ownername

Parameters:

none

Returns:

VOB Owner Name

owner

Returns the VOB owner

Parameters:

none

Returns:

VOB master replica

comment

Returns the VOB comment

Parameters:

none

Returns:

VOB comment

replicaName

Returns the VOB replicaName

Parameters:

none

Returns:

VOB replica name

featureLevel

Returns the VOB featureLevel

Parameters:

none

Returns:

VOB feature level

schemaVersion

Returns the VOB schemaVersion

Parameters:

none

Returns:

VOB schema version

remotePrivilege

Returns the VOB remotePrivilege

Parameters:

none

Returns:

Remote Privilege capability

atomicCheckin

Returns the VOB atomicCheckin

Parameters:

none

Returns:

Whether atomic check in enabled

group

Returns the VOB group

Parameters:

none

Returns:

VOB group

groups

Returns the VOB groups

Parameters:

none

Returns:

VOB groups

aclsEnabled

Returns the VOB aclsEnabled

Parameters:

none

Returns:

VOB aclsEnabled

attributes

Returns the VOB attributes

Parameters:

none

Returns:

VOB attributes

hyperlinks

Returns the VOB hyperlinks

Parameters:

none

Returns:

VOB hyperlinks

elements

Returns the number of elements in the VOB (obtained via countdb)

Parameters:

none

Returns:

number of elements

branches

Returns the number of branch types in the vob

Parameters:

none

Returns:

number of branch types

versions

Returns the number of element versions in the VOB

Parameters:

none

Returns:

number of element versions

dbsize

Returns the size of the VOB's database

Parameters:

none

Returns:

database size

admsize

Returns the size of administrative data in the VOB

Parameters:

none

Returns:

adminstrative size

ctsize

Returns the size of the cleartext pool

Parameters:

none

Returns:

cleartext pool size

dosize

Returns the size of the derived object pool

Parameters:

none

Returns:

derived object pool size

srcsize

Returns the size of the source pool

Parameters:

none

Returns:

source pool size

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:

$status

Status from cleartool

@output

Ouput from cleartool

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:

$status

Status from cleartool

@output

Ouput from cleartool

remove

Removed this VOB

Parameters:

none

Returns:

$status

Status from cleartool

@output

Ouput from cleartool

DEPENDENCIES

ClearSCM Perl Modules

Clearcase

OSdep

BUGS AND LIMITATIONS

There are no known bugs in this module

Please report problems to Andrew DeFaria <Andrew@ClearSCM.com>.

LICENSE AND COPYRIGHT

Copyright (c) 2007, ClearSCM, Inc. All rights reserved.