diff options
author | Cole Robinson <crobinso@redhat.com> | 2022-10-17 11:54:37 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2022-10-17 11:54:37 -0400 |
commit | 15ddeae6cb405bad10bc62164b14117646e9127e (patch) | |
tree | 03a5d2d5fcb7b242b93d0e539136953d86671ff4 | |
parent | 1d64a678d31829051444e1bf29d86f800e13de39 (diff) | |
download | virt-manager-15ddeae6cb405bad10bc62164b14117646e9127e.tar.gz |
cli: support --boot loader.stateless=
Signed-off-by: Cole Robinson <crobinso@redhat.com>
-rw-r--r-- | tests/data/cli/compare/virt-install-singleton-config-2.xml | 4 | ||||
-rw-r--r-- | tests/test_cli.py | 2 | ||||
-rw-r--r-- | virtinst/cli.py | 1 | ||||
-rw-r--r-- | virtinst/domain/os.py | 2 |
4 files changed, 6 insertions, 3 deletions
diff --git a/tests/data/cli/compare/virt-install-singleton-config-2.xml b/tests/data/cli/compare/virt-install-singleton-config-2.xml index d567d188..27c69c11 100644 --- a/tests/data/cli/compare/virt-install-singleton-config-2.xml +++ b/tests/data/cli/compare/virt-install-singleton-config-2.xml @@ -11,7 +11,7 @@ <vcpu cpuset="1,3-5">2</vcpu> <os> <type arch="x86_64" machine="q35">hvm</type> - <loader readonly="yes" secure="no" type="rom">/tmp/foo</loader> + <loader readonly="yes" secure="no" type="rom" stateless="yes">/tmp/foo</loader> <smbios mode="emulate"/> <boot dev="network"/> <boot dev="hd"/> @@ -112,7 +112,7 @@ <vcpu cpuset="1,3-5">2</vcpu> <os> <type arch="x86_64" machine="q35">hvm</type> - <loader readonly="yes" secure="no" type="rom">/tmp/foo</loader> + <loader readonly="yes" secure="no" type="rom" stateless="yes">/tmp/foo</loader> <boot dev="hd"/> <smbios mode="emulate"/> </os> diff --git a/tests/test_cli.py b/tests/test_cli.py index 9d4e5ae3..3d299c12 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -832,7 +832,7 @@ c.add_compare("--pxe " "--cpuset 1,3-5 " # setting compat --cpuset when --vcpus is not present # --boot loader settings here, or they will conflict with firmware=efi # in other test cases -"--boot loader_ro=yes,loader.type=rom,loader=/tmp/foo,loader_secure=no " +"--boot loader_ro=yes,loader.type=rom,loader=/tmp/foo,loader_secure=no,loader.stateless=yes" # 'default' handling for solo devices """ diff --git a/virtinst/cli.py b/virtinst/cli.py index 5ac8266b..8dbffeb6 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -2861,6 +2861,7 @@ class ParserBoot(VirtCLIParser): cls.add_arg("loader.readonly", "loader_ro", is_onoff=True) cls.add_arg("loader.type", "loader_type") cls.add_arg("loader.secure", "loader_secure", is_onoff=True) + cls.add_arg("loader.stateless", "loader_stateless", is_onoff=True) # Guest-Based bootloader options cls.add_arg("firmware", "firmware") diff --git a/virtinst/domain/os.py b/virtinst/domain/os.py index e2cea755..4310e623 100644 --- a/virtinst/domain/os.py +++ b/virtinst/domain/os.py @@ -86,6 +86,7 @@ class DomainOs(XMLBuilder): _XML_PROP_ORDER = [ "firmware", "os_type", "arch", "machine", "firmware_features", "loader", "loader_ro", "loader_secure", "loader_type", + "loader_stateless", "nvram", "nvram_template", "init", "initargs", "initenvs", "initdir", "inituser", "initgroup", "kernel", "initrd", "kernel_args", "dtb", "acpi_tb", "acpi_tb_type", @@ -100,6 +101,7 @@ class DomainOs(XMLBuilder): loader_ro = XMLProperty("./loader/@readonly", is_yesno=True) loader_type = XMLProperty("./loader/@type") loader_secure = XMLProperty("./loader/@secure", is_yesno=True) + loader_stateless = XMLProperty("./loader/@stateless", is_yesno=True) # BIOS bootloader options def _get_bootorder(self): |