NAME

WebService::TestSystem::Request - Routines for processing a test request and entering it into the system

SYNOPSIS

my $req = new WebService::TestSystem::Request;

DESCRIPTION

WebService::TestSystem::Request provides the low level routines for validating, inserting, and deleting test requests and associated records.

The routines in this module are all considered 'private access', and should not be exported directly through SOAP. Instead, they are called from a higher level routine in WebService::TestSystem.

FUNCTIONS

new(%args)

Establishes a new WebService::TestSystem::Request instance.

You must give it a valid WebService::TestSystem object in the 'app' argument.

get_error()

Returns the most recent error message. If any of this module's routines return undef, this routine can be called to retrieve a message about what happened. If several errors have occurred, this will only return the most recently encountered one.

request_test(%request)

Issues a test request into the system.

Returns undef on error, or the test request ID number on success. In case of error, you can retrieve the error message via the get_error() routine.

add_test_request(\%request)

Adds the test request into the system. No validation is performed. Only updates the test_request table. Other attached tables can be updated separately through other routines in this module.

Returns undef on error, or the test request's ID on success. Error messages can be retrieved via the get_error() routine.

rollback_test_request( $test_request_id )

Removes all components of a failed test insertion For a first pass, we'll shotgun everything, which means some of the deletes will fail. This will keep all the rollback in one function

add_test_request_to_patch_tag($test_request_id, @patch_tags)

Inserts the given patch tags into the database for the indicated test request ID.

Returns a true value on success, or undef on error. Error messages can be retrieved via the get_error() routine.

add_test_request_to_parameter($test_request_id, @parameters)

Adds one or more parameters associated with the given test request.

Returns a true value on success or undef on error. Error messages can be retrieved via the get_errors() routine.

queue_test_request($test_request_id)

Puts the test request into 'QUEUED' state so it'll run.

Returns true if operation succeeded, false otherwise.

isint($x)

Returns true if the string is an integer (all decimals)

validate_test_request(\%request)

Validates the test request. The %request hash has the information to be stored as well as flags to control which sections of the request to validate. Define $request{d_store} to cause it to validate the entire request.

validate_page_1

Validates the test selection, user identification, and project.

validate_page_2

Validates the distro tag and component patches.

validate_page_3(\%request)

Validates the host type, priority, lilo, sysctl, environment, and parameters.