<<

NAME

Inca::Config::Suite::SeriesConfig - A series config as specified in an Inca suite

SYNOPSIS

  use Inca::Config::Suite::SeriesConfig;
  my $sc = new Inca::Config::Suite::SeriesConfig();
  $sc->read( $parsedXML, $guid );
  my $name = $sc->getName();
  my $version  = $sc->getVersion();
  my $args = $sc->getArgumentsAsCmdLine();
  my $niced = $sc->getNiced();
  my $limits = $sc->getLimits();

DESCRIPTION

A convenience module for working with series config from an Inca suite object, Inca::Config::Suite.

CLASS METHODS

new( %Options )

Class constructor which returns a new Inca::Config::Suite::SeriesConfig object. The constructor may be called with any of the following attributes.

Options:

action

The action indicating whether the provided reporter should be added or deleted

name

The string indicating the reporter name to execute

version

The string indicating the reporter version to execute

path

The string indicating the path to the reporter to execute

storagePolicy

An object of type Inca::Config::Suite::StoragePolicy that gets passed to the depot.

niced

Lower the execution priority of the reporter by invoking the reporter with the Unix nice command [default: 0]

context

Execution context string containing the reporter uri, context, and arguments.

addArgument( $argname, $argvalue );

Add a command-line argument to the reporter.

Arguments:

argname

The name of the argument. E.g., 'verbose'.

argvalue

The value of the argument. E.g., 3.

equals( $sc )

Return true if $sc is equivalent to ourself; false otherwise.

Returns:

A boolean indicating true if series configs are equal and false if they are not.

getAction( )

Return the action of subscription request: add, delete.

Returns:

A string containing the action of subscription request.

getArgumentsAsCmdLine( );

Return the arguments for the reporter as a command-line string. E.g., -file=big.datg

Returns:

If called in a array context, will return the arguments as an array. If called in a scalar context, will return the arguments as a string that can be input to a reporter on the command-line.

getArgumentsFromCmdLine( @ARGV )

Parse the command-line for arguments to the reporter. E.g., -file="big.dat" --host=localhost

getContext( )

Retrieve the context string for the reporter execution.

Returns:

A string specifying the context string for the reporter execution.

getGuid( )

Retrieve the suite guid that the series originated from.

Returns:

The string indicating the suite guid.

getLimits( )

Get the maxiumum system usage or limits for the reporter.

Returns:

An object of type Inca::Process::Usage which indicates the maximum resource utilization this reporter can use.

getName( )

Retrieve the name of the reporter.

Returns:

The string indicating the reporter name to execute

getNiced( )

Retrieve the nice status of the reporter (i.e., whether the reporter will be executed at a lower priority using the Unix nice command).

Returns:

A boolean value where 1 indicates to run the process with nice while 0 indicates not to nice the process.

getNickname( )

Retrieve the nickname of the reporter.

Returns:

The string indicating the reporter nickname to execute

getPath( )

Retrieve the path of the reporter.

Returns:

The string indicating the path to the reporter to execute

getProxyContact( )

Retrieve the value of the server to contact to retrieve proxy credential information.

Returns:

A string containing the uri of the server to contact to retrieve proxy credential information.

getSchedulerArgs( )

Return the configuration information for the group scheduler.

Returns:

A reference to a hash containing the configuration information for the group scheduler or undef (if there is none).

getSchedulerName( )

Return the name of the scheduler class for this group.

Returns:

A string containing the scheduler identifier to use for this reporter group.

getStoragePolicy( )

Retrieve the reporter storage policy.

Returns:

An object of type Inca::Config::Suite::StoragePolicy containing the storage policy that will be passed to the depot along with the report.

getUri( )

Retrieve the uri of the reporter.

Returns:

The string indicating the uri of the reporter to execute

getVersion( )

Retrieve the version of the reporter.

Returns:

The string indicating the reporter version to execute

getXmlHashArray( )

Return a hash array representation of the series config object that is appropriate for incorporating into a larger hash array that will be formatted into XML by XML::Simple.

Returns:

A hash array representation of the series config object.

hasArguments( )

Return true if reporter arguments have been specified; otherwise return false.

Returns:

Returns true if reporter arguments have been specified and false if they have not.

hasContext( )

Return true if a context string has been specified for the reporter; otherwise return false.

Returns:

A boolean indicating true if a context string has been specified and false if it has not.

hasLimits( )

Return true if a reporter limits has been specified; otherwise return false.

Returns:

A boolean indicating true if a reporter limits has been specified and false if it has not.

hasNiced( )

Return true if running the reporter with nice has been specified; otherwise return false.

Returns:

A boolean indicating true if niced has been specified and false if it has not.

hasPath( )

Return true if a path has been specified for the reporter; otherwise return false.

Returns:

A boolean indicating true if a path has been specified and false if it has not.

hasProxyContact( )

Return true if a proxy contact has been specified for the reporter; otherwise return false.

Returns:

A boolean value indicating true if this reporter has a proxy contact and false otherwise.

hasScheduler( )

Return true if a group scheduler has been specified; otherwise return false.

Returns:

A boolean indicating true if a group scheduler has been specified and false if it has not.

read( $parsedXML )

Read in data for this reporter from the hashref which contains XML::Simple parsed XML.

Arguments:

parsedXML

A reference to a hash generated by XML::Simple containing information about the series config.

setAction( $action )

Set the action of the series config.

Arguments:

action

A string indicating an action of the specified series config (add or delete)

setContext( $string )

Adds an execution context string specifying the reporter uri, context, and arguments to execute.

Arguments:

string

A string that specifies the execution context string. It specifies the reporter uri (which will be replaced by the local path to the reporter on execution), any context (e.g., setting of environ vars), and reporter arguments.

setGuid( $guid )

Set the suite guid that the series belongs to.

Arguments:

guid

The string indicating the suite guid the series came from.

setLimits( $limits )

Set the maxiumum system usage or limits for the reporter. The limits is based on one or more of the following resources: CPU time, wall clock time, memory.

Arguments:

limits

A reference to an array of hashrefs. Each hashref contains a name/value pair. Valid names include wallClockTime, CpuTime, memory.

setName( $name )

Set the name of the reporter to execute.

Arguments:

name

The string indicating the reporter name to execute

setNiced( $is_niced )

Lowers the execution priority of the reporter. When the reporter is run, it will be executed with the nice command using the system's default altered scheduling priority.

Arguments:

is_niced

A boolean value where 1 indicates to run the process with nice while 0 indicates not to nice the process.

setNickname( $nickname )

Set the nickname of the reporter to execute.

Arguments:

nickname

The string indicating the nickname of the reporter that will execute

setPath( $path )

Set the path of the reporter to execute.

Arguments:

name

The string indicating the path of the reporter to execute

setProxyContact( $uri )

Set the value of the server to contact to retrieve proxy credential information.

Arguments:

uri

A string in the format of <scheme>://<path> where

scheme

The type of URI being represented by the string (either file or incas)

path

The location of the URI being represented (e.g., localhost:7070)

setSchedulerArgs( $args )

Set the configuration information for the group scheduler.

Arguments:

args

A reference to a hash array containing scheduler information.

setSchedulerName( $name )

Set the name of the scheduler class for this group.

Arguments:

name

A string containing the name of the scheduler for this reporter group.

setStoragePolicy( $storage_policy )

Set the storage policy for the reporter.

Arguments:

storage_policy

An object of type Inca::Config::Suite::StoragePolicy that will be used once a reporter has completed execution and will be passed along with the report to the depot.

setUri( $uri )

Set the uri of the reporter to execute.

Arguments:

uri

The string indicating the uri of the reporter to execute

setVersion( $version )

Set the version of the reporter to execute.

Arguments:

version

The string indicating the reporter version to execute

AUTHOR

Shava Smallen <ssmallen@sdsc.edu>

CAVEATS/WARNINGS

Does not recognize storage policies yet.

SEE ALSO

Inca::Config::Suite

<<