NAME
Tapper::Cmd::Precondition
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);
...
NAME
Tapper::Cmd::Precondition - Backend functions for manipluation of preconditions in the database
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
AUTHORS
AMD OSRC Tapper Team <tapper@amd64.org>
Tapper Team <tapper-ops@amazon.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2024 by Advanced Micro Devices, Inc.
This is free software, licensed under:
The (two-clause) FreeBSD License