-
Notifications
You must be signed in to change notification settings - Fork 1
virttest.tests
virttest.tests package¶
Submodules¶
virttest.tests.unattended_install module¶
classvirttest.tests.unattended_install.``RemoteInstall
(path, ip, port, filename)¶
Bases: object
Represents a install http server that we can master according to our needs.
close
()¶
get_answer_file_path
(filename)¶
get_url
()¶
classvirttest.tests.unattended_install.``UnattendedInstallConfig
(test, params, vm)¶
Bases: object
Creates a floppy disk image that will contain a config file for unattended OS install. The parameters to the script are retrieved from environment variables.
Sets class attributes from test parameters.
Parameters:
- test – QEMU test object.
- params – Dictionary with test parameters.
answer_kickstart
(answer_path)¶
Replace KVM_TEST_CDKEY (in the unattended file) with the cdkey provided for this test and replace the KVM_TEST_MEDIUM with the tree url or nfs address provided for this test.
Returns:
Answer file contents
answer_suse_xml
(answer_path)¶
answer_windows_ini
(answer_path)¶
answer_windows_xml
(answer_path)¶
get_driver_hardware_id
(*args, **kwargs)¶
Get windows driver’s hardware id from inf files.
Parameters:
- dirver – Configurable driver name.
- run_cmd – Use hardware id in windows cmd command or not.
Returns:
Windows driver’s hardware id
preseed_initrd
()¶
Puts a preseed file inside a gz compressed initrd file.
Debian and Ubuntu use preseed as the OEM install mechanism. The only way to get fully automated setup without resorting to kernel params is to add a preseed.cfg file at the root of the initrd image.
set_unattended_param_in_kernel
(unattended_file_url)¶
Check if kernel parameter that sets the unattended installation file is present. Add the parameter with the passed URL if it does not exist, otherwise replace the existing URL.
Parameters:
unattended_file_url – URL to unattended installation file
Returns:
modified kernel parameters
setup
()¶
Configure the environment for unattended install.
Uses an appropriate strategy according to each install model.
setup_boot_disk
()¶
setup_cdrom
(*args, **kwargs)¶
Mount cdrom and copy vmlinuz and initrd.img.
setup_import
()¶
setup_nfs
()¶
Copy the vmlinuz and initrd.img from nfs.
setup_unattended_http_server
()¶
Setup a builtin http server for serving the kickstart file
Does nothing if unattended file is not a kickstart file
setup_url
(*args, **kwargs)¶
Download the vmlinuz and initrd.img from URL.
setup_url_auto
(*args, **kwargs)¶
Configures the builtin web server for serving content
update_driver_hardware_id
(*args, **kwargs)¶
Update driver string with the hardware id get from inf files
@driver: driver string :return: new driver string
virttest.tests.unattended_install.``copy_file_from_nfs
(src, dst, mount_point, image_name)¶
virttest.tests.unattended_install.``start_auto_content_server_thread
(port, path)¶
virttest.tests.unattended_install.``start_syslog_server_thread
(address, port, tcp)¶
virttest.tests.unattended_install.``start_unattended_server_thread
(port, path)¶
virttest.tests.unattended_install.``string_in_serial_log
(serial_log_file_path, string)¶
Check if string appears in serial console log file.
Parameters:
- serial_log_file_path – Path to the installation serial log file.
- string – String to look for in serial log file.
Returns:
Whether the string is found in serial log file.
Raise:
IOError: Serial console log file could not be read.
virttest.tests.unattended_install.``terminate_auto_content_server_thread
()¶
virttest.tests.unattended_install.``terminate_syslog_server_thread
()¶
virttest.tests.unattended_install.``terminate_unattended_server_thread
()¶
Module contents¶
virttest.staging.backports.simplejson package
virttest.unittest_utils package
© Copyright 2014, Red Hat. Created using Sphinx 1.5.1.