NAME
Tapper::MCP::Config
SYNOPSIS
use Tapper::MCP::Config;
NAME
Tapper::MCP::Config - Generate config for a certain test run
FUNCTIONS
parse_simnow_preconditions
Parse a simnow precondition.
@param hash ref - config @param hash ref - simnow precondition
@return success - 0
parse_hint_preconditions
Parse a hint precondition.
@param hash ref - config @param hash ref - hint precondition
@return success - 0
add_tapper_package_for_guest
Add opt tapper package to guest
@param hash ref - config @param hash ref - guest @param int - guest number
@return success - new config (hash ref) @return error - error string
handle_guest_tests
Create guest PRC config based on guest tests.
@param hash ref - old config @param hash ref - guest description @param int - guest number
@return success - new config hash ref @return error - error string
parse_virt_host
Parse host definition of a virt precondition and change config accordingly
@param hash ref - old config @param hash ref - virt precondition
@return hash ref - new config
parse_virt_preconditions
Unpack a precondition virt entry into images, packages and files to be installed for this virt package to work.
@param hash ref - config hash to which virt precondition should be added @param hash ref - precondition as hash
@return success - hash reference containing the new config @return error - error string
parse_grub
Handle precondition grub. Even though a preconfigured grub config is provided as precondition, it needs to get a special place in the Yaml file. Otherwise it would be hard to find for the installer process generating the grub config file.
@param hash ref - config to change @param hash ref - precondition as hash
@return success - config hash @return error - error string
parse_reboot
Handle precondition grub. Even though a preconfigured grub config is provided as precondition, it needs to get a special place in the Yaml file. Otherwise it would be hard to find for the installer process generating the grub config file.
@param hash ref - config to change @param hash ref - precondition as hash
@return success - config hash @return error - error string
parse_image_precondition
Handle precondition image. Make sure the appropriate opt-tapper package is installed if needed. Care for the root image being installed first.
@param hash ref - config to change @param hash ref - precondition as hash
@return success - config hash @return error - error string
parse_cobbler_preconditions
Handle precondition cobbler. Make sure host exists in cobbler system.
@param hash ref - config to change @param hash ref - precondition as hash
@return success - config hash @return error - error string
parse_testprogram
Handle precondition testprogram. Make sure testprogram is correctly to config and internal information set.
@param hash ref - config to change @param hash ref - precondition as hash @param int - prc_number, optional
@return success - config hash @return error - error string
parse_testprogram_list
Handle testprogram list precondition. Puts testprograms to config and internal information set.
@param hash ref - config to change @param hash ref - precondition as hash @param int - prc_number, optional
@return success - config hash @return error - error string
parse_autoinstall
Parse precondition autoinstall and change config accordingly.
@param hash ref - config to change @param hash ref - precondition as hash
@return success - config hash @return error - error string
update_installer_grub
Get the text for grub config file at booting into installation.
@param hash ref - config to change
@return success - config hash @return error - error string
produce
Calls the producer for the given precondition
@param hash ref - config @param hash ref - precondition
@return success - array ref containing preconditions
@throws die()
parse_produce_precondition
Parse a producer precondition, insert the produced ones and delete the old one. In case of success the updated config is returned.
@param hash ref - old config @param precondition result object - precondition
@return success - hash ref @return error - error string
produce_preconds_in_arrayref
Take an array ref, find the producers in it and produce them. Substitute the producer preconditions with the produced preconditions they generated.
This function changes the received argument instead of returning an updated version. This makes sure you can change your precondition step by step instead of having to create a new one.
@param hash ref - config @param array ref - preconditions with producers
@return success - 0 @return error - error string
produce_virt_precondition
Find all producers in a virt precondition, call them and substitute the producer preconditions with the received produced preconditions. It returns the updated virt precondition.
@param hash ref - config @param hash ref - precondition as hash
@return success - hash ref containing updated precondition @return error - error string
parse_precondition
Parse a given precondition and update the config accordingly.
@param hash ref - old config @param precondition result object - precondition
@return success - hash ref containing updated config @return error - error string
get_install_config
Add installation configuration part to a given config hash.
@param hash reference - config to change
@return success - config hash @return error - error string
get_common_config
Create configuration to be used for installation on a given host.
@return success - config hash reference @return error - error string
get_test_config
Returns a an array of configs for all PRCs of a given test. All information are taken from the MCP::Info attribute of the object so its only save to call this function after create_config which configures this attribute.
@return success - config array (array ref) @return error - error string
create_config
Create a configuration for the current status of the test machine. All config information are taken from the database based upon the given testrun id.
@return success - config (hash reference) @return error - error string
write_config
Write the config created before into appropriate YAML file.
@param string - config (hash reference) @param string - output file name, in absolut form or relative to configured localdata_path
@return success - 0 @return error - error string
AUTHOR
AMD OSRC Tapper Team, <tapper at amd64.org>
BUGS
None.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Tapper
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2008-2011 AMD OSRC Tapper Team, all rights reserved.
This program is released under the following license: freebsd
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