NAME

Tapper::Cmd::Precondition - Backend functions for manipluation of preconditions in the database

SYNOPSIS

This project offers backend functions for all projects that manipulate testruns or preconditions in the database. This module handles the precondition part.

use Tapper::Cmd::Testrun;

my $bar = Tapper::Cmd::Precondition->new();
$bar->add($precondition);
...

FUNCTIONS

die_on_invalid_precondition

Check whether a precondition is valid either based on a given kwalify schema or the default schema. Errors are returned by die-ing.

@param array ref - preconditions @param schema (optional)

@return success 0

@throws Perl die

add

Add a new precondition. Expects a precondition in YAML format. Multiple preconditions may be given as one string. In this case every valid precondition (i.e. those with a precondition_type) will be added. This is useful for macro preconditions.

@param string - preconditions in YAML format OR @param array ref - preconditions as list of hashes @param hash ref - kwalify schema (optional)

@return success - list of precondition ids @return error - undef

@throws Perl die

update

Update a given precondition.

@param int - precondition id @param string - precondition as it should be

@return success - precondition id @return error - error string

@throws die

del

Delete a precondition with given id. Its named del instead of delete to prevent confusion with the buildin delete function.

@param int - precondition id

@return success - 0 @return error - error string

AUTHOR

AMD OSRC Tapper Team, <tapper at amd64.org>

BUGS

Please report any bugs or feature requests to osrc-sysin at elbe.amd.com, or through the web interface at https://osrc/bugs. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE

Copyright 2008-2011 AMD OSRC Tapper Team, all rights reserved.

This program is released under the following license: freebsd