virttest.tests package

Submodules

virttest.tests.unattended_install module

class virttest.tests.unattended_install.RemoteInstall(path, ip, port, filename)[source]

Bases: object

Represents a install http server that we can master according to our needs.

close()[source]
get_answer_file_path(filename)[source]
get_url()[source]
class virttest.tests.unattended_install.UnattendedInstallConfig(test, params, vm)[source]

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.

answer_kickstart(answer_path)[source]

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)[source]
answer_windows_ini(answer_path)[source]
answer_windows_xml(answer_path)[source]
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()[source]

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.

setup()[source]

Configure the environment for unattended install.

Uses an appropriate strategy according to each install model.

setup_boot_disk()[source]
setup_cdrom(*args, **kwargs)

Mount cdrom and copy vmlinuz and initrd.img.

setup_import()[source]
setup_nfs()[source]

Copy the vmlinuz and initrd.img from nfs.

setup_unattended_http_server()[source]

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)[source]
virttest.tests.unattended_install.start_auto_content_server_thread(port, path)[source]
virttest.tests.unattended_install.start_syslog_server_thread(address, port, tcp)[source]
virttest.tests.unattended_install.start_unattended_server_thread(port, path)[source]
virttest.tests.unattended_install.terminate_auto_content_server_thread()[source]
virttest.tests.unattended_install.terminate_syslog_server_thread()[source]
virttest.tests.unattended_install.terminate_unattended_server_thread()[source]

Module contents