virt-manager/011-29f9f2ac-virt-xml-Add-no-define-argument.patch
Charles Arnold 2677655bda - jsc#SLE-6262, fate#327048: KVM: Boot Configuration Override
001-adf30349-cli-refactor-get_prop.patch
  002-60c7e778-xmlapi-add-set_prop.patch
  003-5bad22e8-tests-Use-get-set_prop.patch
  004-ee5f3eab-support-Add-SUPPORT_CONN_DEVICE_BOOT_ORDER.patch
  005-7768eb17-cli-Add-check-if-device-boot-order-is-supported.patch
  006-ecc0861c-tests-xmlparse-refactor-method-for-generating-out-file-path.patch
  007-c9d070da-guest-Add-reorder_boot_order-method.patch
  008-1b535940-tests-Add-test-case-for-reorder_boot_order-method.patch
  009-b83a0a61-cli-Use-reorder_boot_order-for-setting-the-boot-order.patch
  010-c896d19d-tests-cli-Add-boot.order-tests.patch
  011-29f9f2ac-virt-xml-Add-no-define-argument.patch
  012-c2bff509-tests-cli-Add-test-case-for-no-define-argument.patch
  013-90b1a3ab-virt-xml-Add-support-for-starting-the-domain.patch
  014-908b8e8d-tests-virt-xml-Add-test-cases-for-start-option.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=468
2019-05-23 15:40:50 +00:00

46 lines
2.1 KiB
Diff

References: jsc#SLE-6262, fate#327048: KVM: Boot Configuration Override (virt-manager)
Subject: virt-xml: Add --no-define argument
From: Marc Hartmayer mhartmay@linux.ibm.com Tue Feb 26 10:56:41 2019 +0100
Date: Wed Mar 6 13:15:38 2019 -0500:
Git: 29f9f2ac9c168b29043e8a443d354f2b7802c9f9
Add `--no-define` argument. It's mutually exclusive to the `--define`
argument and later on it allows the user to start a domain
transiently.
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Index: virt-manager-2.1.0/virt-xml
===================================================================
--- virt-manager-2.1.0.orig/virt-xml
+++ virt-manager-2.1.0/virt-xml
@@ -363,9 +363,13 @@ def parse_args():
"With --add-device, this is a hotplug operation.\n"
"With --remove-device, this is a hotunplug operation.\n"
"With --edit, this is an update device operation."))
- outg.add_argument("--define", action="store_true",
- help=_("Force defining the domain. Only required if a --print "
- "option was specified."))
+ define_g = outg.add_mutually_exclusive_group()
+ define_g.add_argument("--define", action="store_true",
+ help=_("Force defining the domain. Only required if a --print "
+ "option was specified."))
+ define_g.add_argument("--no-define", dest='define', action="store_false",
+ help=_("Force not defining the domain."))
+ define_g.set_defaults(define=None)
outg.add_argument("--print-diff", action="store_true",
help=_("Only print the requested change, in diff format"))
outg.add_argument("--print-xml", action="store_true",
@@ -426,7 +430,8 @@ def main(conn=None):
if not options.define:
options.print_xml = True
else:
- options.define = True
+ if options.define is None:
+ options.define = True
if options.confirm and not options.print_xml:
options.print_diff = True