2013-10-27 21:59:46 +01:00
# Copyright (C) 2013 Red Hat, Inc.
2013-03-17 17:06:52 -04:00
#
# Copyright 2012
2013-10-27 21:59:47 +01:00
# Eiichi Tsukata <devel@etsukata.com>
2013-03-17 17:06:52 -04:00
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
2013-10-27 21:59:47 +01:00
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
2013-03-17 17:06:52 -04:00
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
2014-09-12 15:59:22 -04:00
from . device import VirtualDevice
from . xmlbuilder import XMLProperty
2013-03-17 17:06:52 -04:00
2013-04-13 14:34:52 -04:00
2013-04-10 19:48:07 -04:00
class VirtualMemballoon ( VirtualDevice ) :
2013-07-16 09:14:37 -04:00
virtual_device_type = VirtualDevice . VIRTUAL_DEV_MEMBALLOON
2013-03-17 17:06:52 -04:00
2015-05-19 16:44:08 -04:00
MODEL_DEFAULT = " default "
MODELS = [ " virtio " , " xen " , " none " ]
2013-03-17 17:06:52 -04:00
2015-05-19 16:44:08 -04:00
model = XMLProperty ( " ./@model " ,
default_name = MODEL_DEFAULT ,
default_cb = lambda s : " virtio " )
2013-07-24 08:46:55 -04:00
VirtualMemballoon . register_type ( )