NAME

Tapper::MCP::State::Details

SYNOPSIS

 use Tapper::MCP::State::Details;
 my $state_details = Tapper::MCP::State::Details->new();
 $state_details->prc_results(0, {success => 0, mg => 'No success'});

db_update

Update database entry.

@return success - 0 @return error - error string

NAME

Tapper::MCP::State::Details - Encapsulate state_details attribute of MCP::State

FUNCTIONS

results

Getter and setter for results array for whole test. Setter adds given parameter instead of substituting.

@param hash ref - containing success(bool) and msg(string)

state_init

Initialize the state or read it back from database.

@return success - 0 @return error - error string

takeoff

The reboot call was successfully executed, now update the state for waiting for the first message.

@return int - new timeout

current_state

Getter and setter for current state name.

@param string - state name (optional) @return string - state name

set_all_prcs_current_state

Set current_state of all PRCs to given state.

@param string - state name

keep_alive_timeout_date

Getter and setter for keep_alive_timeout_date

@optparam int - new timeout_date for keep_alive

@return int - timeout date for keep_alive

set_keep_alive_timeout_span

Getter for keep_alive_timeout_date

@param int - new timeout date for keep_alive

@return int - new timeout date for keep_alive

keep_alive_timeout_span

Getter and setter for keep_alive_timeout_span. Note: This function can not set the timeout to undef.

@optparam int - new timeout_span

@return int - timeout date for keep_alive

installer_timeout_current_date

Getter and setter for installer timeout date.

@param int - new installer timeout date

@return string - installer timeout date

start_install

Update timeouts for "installation started".

@return int - new timeout span

prc_boot_start

Sets timeouts for given PRC to the ones associated with booting of this PRC started.

@param int - PRC number

@return int - boot timeout span

prc_timeout_current_span

Get the current timeout date for given PRC

@param int - PRC number

@return int - timeout date

prc_results

Getter and setter for results array for of one PRC. Setter adds given parameter instead of substituting. If no argument is given, all PRC results are returned.

@param int - PRC number (optional) @param hash ref - containing success(bool) and msg(string) (optional)

prc_count

Return number of PRCs

@return int - number of PRCs

prc_state

Getter and setter for current state of given PRC.

@param int - PRC number @param string - state name (optional)

@return string - state name

is_all_prcs_finished

Check whether all PRCs have finished already.

@param all PRCs finished - 1 @param not all PRCs finished - 0

prc_next_timeout

Set next PRC timeout as current and return it as timeout span.

@param int - PRC number

@return int - next timeout span

prc_current_test_number

Get or set the number of the testprogram currently running in given PRC.

@param int - PRC number @param int - test number (optional)

@return test running - test number starting from 0 @return no test running - undef

get_min_prc_timeout

Check all PRCs and return the minimum of their upcoming timeouts in seconds.

@return timeout span for the next state change during testing

AUTHORS

  • AMD OSRC Tapper Team <tapper@amd64.org>

  • Tapper Team <tapper-ops@amazon.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2019 by Advanced Micro Devices, Inc..

This is free software, licensed under:

  The (two-clause) FreeBSD License