diff options
author | Cole Robinson <crobinso@redhat.com> | 2022-08-22 10:15:46 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2022-08-22 10:16:19 -0400 |
commit | 1d64a678d31829051444e1bf29d86f800e13de39 (patch) | |
tree | b1474e29851b752bcea81f819cc040b1454eb1f6 | |
parent | 999ccb85e3e4189386786256cdf70cf5238cf785 (diff) | |
download | virt-manager-1d64a678d31829051444e1bf29d86f800e13de39.tar.gz |
virt-install: Reuse cli.fail_conflicting
For the --unattended + --cloud-init conflict
Signed-off-by: Cole Robinson <crobinso@redhat.com>
-rw-r--r-- | tests/test_cli.py | 2 | ||||
-rw-r--r-- | virtinst/virtinstall.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_cli.py b/tests/test_cli.py index cbeebd46..9d4e5ae3 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1116,7 +1116,7 @@ c.add_invalid("--disk none --boot network --machine foobar", grep="domain type N c.add_invalid("--nodisks --boot network --arch mips --virt-type kvm", grep="any virtualization options for architecture 'mips'") c.add_invalid("--nodisks --boot network --paravirt --arch mips", grep=" 'xen' for architecture 'mips'") c.add_invalid("--osinfo generic --launchSecurity sev --connect " + utils.URIs.kvm_amd_sev, grep="SEV launch security requires a Q35 UEFI machine") -c.add_invalid("--disk none --cloud-init --unattended --install fedora30", grep="--unattended and --cloud-init can not") +c.add_invalid("--disk none --cloud-init --unattended --install fedora30", grep="Cannot use --unattended and --cloud-init at the same time") diff --git a/virtinst/virtinstall.py b/virtinst/virtinstall.py index 8260628d..8fcc8ce1 100644 --- a/virtinst/virtinstall.py +++ b/virtinst/virtinstall.py @@ -412,7 +412,7 @@ def build_installer(options, guest, installdata): extra_args = [installdata.kernel_args] if options.unattended and options.cloud_init: - fail("--unattended and --cloud-init can not be specified together.") + cli.fail_conflicting("--unattended", "--cloud-init") if options.unattended: unattended_data = cli.parse_unattended(options.unattended) |