<<

NAME

Inca::Config - Utility class for dealing with Inca config files

SYNOPSIS

  use Inca::Config;
  my $config = new Inca::Config();
  $config->read( "inca.xml" );
  my @suites = $config->getSuites();

DESCRIPTION

An Inca configuration file represents the configuration of resources, suites, and repositories currently running in an Inca deployment. Note, currently this module only provides functions to setting and accessing suites.

CLASS METHODS

new( )

Class constructor which returns a new Inca::Config object.

addSeriesConfig( $sc )

Add the specified series configs to the suite in the configuration.

Arguments:

sc

An object of type Inca::Config::Suite::SeriesConfig.

addSuite( $suite )

Add the specified suite to the configuration.

Arguments:

suite

An object of type Inca::Config::Suite.

getSuites( )

Return the list of suites in the configuration.

Returns:

An array of Inca::Config::Suite objects.

read( $xmlOrFile )

Read an Inca configuration file into the object. The configuration is structured as follows:

<inca> <suites> <suite> <seriesConfig> <!-- see Inca::Config::Suite::SeriesConfig for content here --> </reporterGroup> ... </suite> </suites> </inca>

Arguments:

xmlorFile

A string containing Inca configuration xml or a path to an XML file containing an Inca configuration

Returns:

Returns 1 if there are no errors reading the config file; otherwise returns 0.

write( $filename )

Write an Inca configuration object to file following the inca configuration file schema

Arguments:

filename

A string containing a path to an file to which the Inca configuration XML will be written to.

AUTHOR

Shava Smallen <ssmallen@sdsc.edu>

CAVEATS/WARNINGS

No known problems.

SEE ALSO

Inca::Config::Suite Inca::Config::Suite::SeriesConfig

<<