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.
-
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
-
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_cdrom
(*args, **kwargs)¶ Mount cdrom and copy vmlinuz and initrd.img.
-
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
-