mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-06 14:13:28 -06:00
virtinst: snapshot: add memory file attribute
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
3cde1acbb6
commit
d8565ac533
@ -8,7 +8,7 @@ newline
|
||||
<name>newparent</name>
|
||||
</parent>
|
||||
<creationTime>1234</creationTime>
|
||||
<memory snapshot="internal"/>
|
||||
<memory snapshot="external" file="/some/path/to/memory.img"/>
|
||||
<disks>
|
||||
<disk name="hdb" snapshot="no"/>
|
||||
</disks>
|
||||
|
@ -699,7 +699,8 @@ def testChangeSnapshot():
|
||||
check("description", "offline desk", "foo\nnewline\n indent")
|
||||
check("parent", "offline-root", "newparent")
|
||||
check("creationTime", 1375905916, 1234)
|
||||
check("memory_type", "no", "internal")
|
||||
check("memory_type", "no", "external")
|
||||
check("memory_file", None, "/some/path/to/memory.img")
|
||||
|
||||
check = _make_checker(snap.disks[0])
|
||||
check("name", "hda", "hdb")
|
||||
|
@ -4,6 +4,7 @@
|
||||
# This work is licensed under the GNU GPLv2 or later.
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
from .devices.disk import _DiskSource
|
||||
from .xmlbuilder import XMLBuilder, XMLChildProperty, XMLProperty
|
||||
|
||||
|
||||
@ -11,6 +12,7 @@ class _SnapshotDisk(XMLBuilder):
|
||||
XML_NAME = "disk"
|
||||
name = XMLProperty("./@name")
|
||||
snapshot = XMLProperty("./@snapshot")
|
||||
source = XMLChildProperty(_DiskSource, is_single=True)
|
||||
|
||||
|
||||
class DomainSnapshot(XMLBuilder):
|
||||
@ -24,5 +26,6 @@ class DomainSnapshot(XMLBuilder):
|
||||
parent = XMLProperty("./parent/name")
|
||||
|
||||
memory_type = XMLProperty("./memory/@snapshot")
|
||||
memory_file = XMLProperty("./memory/@file")
|
||||
|
||||
disks = XMLChildProperty(_SnapshotDisk, relative_xpath="./disks")
|
||||
|
Loading…
Reference in New Issue
Block a user