mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
304b323f5d
XML Mapping <memballoon model=...> <stats period="10"/> </memballoon> Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
27 lines
619 B
Python
27 lines
619 B
Python
# Copyright (C) 2013 Red Hat, Inc.
|
|
#
|
|
# Copyright 2012
|
|
#
|
|
# This work is licensed under the GNU GPLv2 or later.
|
|
# See the COPYING file in the top-level directory.
|
|
|
|
from .device import Device
|
|
from ..xmlbuilder import XMLProperty
|
|
|
|
|
|
class DeviceMemballoon(Device):
|
|
XML_NAME = "memballoon"
|
|
|
|
model = XMLProperty("./@model")
|
|
autodeflate = XMLProperty("./@autodeflate", is_onoff=True)
|
|
stats_period = XMLProperty("./stats/@period", is_int=True)
|
|
|
|
|
|
##################
|
|
# Default config #
|
|
##################
|
|
|
|
def set_defaults(self, guest):
|
|
if not self.model:
|
|
self.model = "virtio"
|