virt-manager/virtinst/snapshot.py
Cole Robinson b5a664bd1b virtinst: move UI only functions into virtManager
These throw off code coverage testing. They are mostly:

* pretty* device helpers
* network + snapshot validation + creation routines
2019-06-09 18:33:45 -04:00

29 lines
819 B
Python

#
# Copyright 2013-2014 Red Hat, Inc.
#
# This work is licensed under the GNU GPLv2 or later.
# See the COPYING file in the top-level directory.
from .xmlbuilder import XMLBuilder, XMLChildProperty, XMLProperty
class _SnapshotDisk(XMLBuilder):
XML_NAME = "disk"
name = XMLProperty("./@name")
snapshot = XMLProperty("./@snapshot")
class DomainSnapshot(XMLBuilder):
XML_NAME = "domainsnapshot"
_XML_PROP_ORDER = ["name", "description", "creationTime"]
name = XMLProperty("./name")
description = XMLProperty("./description")
state = XMLProperty("./state")
creationTime = XMLProperty("./creationTime", is_int=True)
parent = XMLProperty("./parent/name")
memory_type = XMLProperty("./memory/@snapshot")
disks = XMLChildProperty(_SnapshotDisk, relative_xpath="./disks")