virt-manager/53869170-virt-install-add-events-support.patch
Charles Arnold 766768c9d2 - bnc#881551 - virt-manage: default storage image called
opensuse13.img for SLE-Server
  virtinst-detect-suse-distros.patch

- bnc#881549 - virt-manager/xen: Error changing VM configuration:
  'NoneType' object has no attribute 'split'
  virtinst-xenbus-disk-index-fix.patch

- Upstream bug fix
  538edb3b-manpage-fix-incorrect-description.patch 

- Upstream bug fixes
  536677aa-better-handling-of-keyboard-input-type.patch
  5385d602-lxc-no-default-disk.patch
  53869170-virt-install-add-events-support.patch
  538a11dc-raise-error-if-populating-summary-page-fails.patch
  538a3609-virtconv-fix-use-of-relative-OVF-file.patch
  538a3ba9-diskbackend-start-pool-if-not-running.patch
  538ca3f3-use-correct-dictionary-keys-for-old-pool-net-polling.patch
  538d00a4-xen-keyboard-cant-be-removed.patch
  538e2f74-fix-pool-create-call.patch
- Dropped 531e0a82-reverse-keyboard-grab-commit.patch. Fixed instead 
  with this patch.
  538a6862-vnc-dont-force-keyboard-grab-before-widget-is-realized.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=182
2014-06-12 05:14:17 +00:00

95 lines
3.9 KiB
Diff

Subject: virt-install: add --events support
From: Chen Hanxiao chenhanxiao@cn.fujitsu.com Thu May 29 09:46:24 2014 +0800
Date: Thu May 29 09:46:24 2014 +0800:
Git: 3c45262526ccf9115713917a7d9b771bf36127a3
This patch will enable setting event configuration:
on_poweroff, on_reboot and on_crash.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Index: virt-manager-1.0.1/man/virt-install.pod
===================================================================
--- virt-manager-1.0.1.orig/man/virt-install.pod
+++ virt-manager-1.0.1/man/virt-install.pod
@@ -123,6 +123,12 @@ Specify metadata values for the guest. P
Use --metadata=? to see a list of all available sub options. Complete details at L<http://libvirt.org/formatdomain.html#elementsMetadata>
+=item --events OPT=VAL,[...]
+
+Specify events values for the guest. Possible options include on_poweroff, on_reboot, and on_crash.
+
+Use --events=? to see a list of all available sub options. Complete details at L<http://libvirt.org/formatdomain.html#elementsEvents>
+
=item --vcpus=VCPUS[,maxvcpus=MAX][,sockets=#][,cores=#][,threads=#][,cpuset=CPUSET]
Number of virtual cpus to configure for the guest. If 'maxvcpus' is specified,
Index: virt-manager-1.0.1/tests/cli-test-xml/compare/virt-xml-edit-simple-events.xml
===================================================================
--- /dev/null
+++ virt-manager-1.0.1/tests/cli-test-xml/compare/virt-xml-edit-simple-events.xml
@@ -0,0 +1,11 @@
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+- <on_crash>restart</on_crash>
++ <on_crash>preserve</on_crash>
+ <pm>
+ <suspend-to-mem enabled="no"/>
+ </pm>
+
+Domain 'test-many-devices' defined successfully.
+Changes will take effect after the next domain shutdown.
\ No newline at end of file
Index: virt-manager-1.0.1/tests/clitest.py
===================================================================
--- virt-manager-1.0.1.orig/tests/clitest.py
+++ virt-manager-1.0.1/tests/clitest.py
@@ -805,6 +805,7 @@ c = vixml.add_category("simple edit diff
c.add_compare("""--metadata name=foo-my-new-name,uuid=12345678-12F4-1234-1234-123456789AFA,description="hey this is my
new
very,very=new desc\\\'",title="This is my,funky=new title" """, "edit-simple-metadata")
+c.add_compare("--events on_poweroff=destroy,on_reboot=restart,on_crash=preserve", "edit-simple-events")
c.add_compare("--memory 500,maxmemory=1000,hugepages=off", "edit-simple-memory")
c.add_compare("--vcpus 10,maxvcpus=20,cores=5,sockets=4,threads=1", "edit-simple-vcpus")
c.add_compare("--cpu model=pentium2,+x2apic,forbid=pbe", "edit-simple-cpu")
Index: virt-manager-1.0.1/virtinst/cli.py
===================================================================
--- virt-manager-1.0.1.orig/virtinst/cli.py
+++ virt-manager-1.0.1/virtinst/cli.py
@@ -797,6 +797,7 @@ def add_guest_xml_options(geng):
help=_("Set domain <clock> XML. Ex:\n"
"--clock offset=localtime,rtc_tickpolicy=catchup"))
geng.add_argument("--pm", help=_("Config power management features"))
+ geng.add_argument("--events", help=_("Config OS lifecycle operation management features"))
def add_boot_options(insg):
@@ -1225,6 +1226,17 @@ class ParserMetadata(VirtCLIParser):
######################
+# --events parsing #
+######################
+
+class ParserEvents(VirtCLIParser):
+ def _init_params(self):
+ self.set_param("on_poweroff", "on_poweroff")
+ self.set_param("on_reboot", "on_reboot")
+ self.set_param("on_crash", "on_crash")
+
+
+######################
# --numatune parsing #
######################
@@ -2210,6 +2222,7 @@ def build_parser_map(options, skip=None,
parsermap[parserobj.option_variable_name] = parserobj
register_parser("metadata", ParserMetadata)
+ register_parser("events", ParserEvents)
register_parser("memory", ParserMemory)
register_parser("memtune", ParserMemorytune)
register_parser("vcpus", ParserVCPU)