mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
c5a4664676
Drop our hardcoded model lists, and just ask libvirt to fill in a model for us. Add an entry to the combo box so users can type in a non-default value if they want one. Long term libvirt should be providing all this info to us via domcapabilities Signed-off-by: Cole Robinson <crobinso@redhat.com>
29 lines
706 B
Python
29 lines
706 B
Python
#
|
|
# Copyright 2013 Fujitsu Limited.
|
|
# Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
|
|
#
|
|
# 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 DevicePanic(Device):
|
|
XML_NAME = "panic"
|
|
|
|
model = XMLProperty("./@model")
|
|
set_stub = XMLProperty(".", is_bool=True)
|
|
|
|
|
|
##################
|
|
# Default config #
|
|
##################
|
|
|
|
def set_defaults(self, guest):
|
|
if not self.address.type and self.address.iobase:
|
|
self.address.type = "isa"
|
|
if not self.model:
|
|
# This asks libvirt to fill in a default
|
|
self.set_stub = True
|