diff --git a/ui/addhardware.ui b/ui/addhardware.ui index f212481a3..7bb00bf74 100644 --- a/ui/addhardware.ui +++ b/ui/addhardware.ui @@ -1,5 +1,5 @@ - + @@ -1294,7 +1294,7 @@ - + True False @@ -1318,33 +1318,18 @@ True False + True + + + True + + 1 0 - - - - - - - - - - - - - - - - - - - - - panic-tab diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py index 98887bdca..e6e4ec1d1 100644 --- a/virtManager/addhardware.py +++ b/virtManager/addhardware.py @@ -270,8 +270,7 @@ class vmmAddHardware(vmmGObjectUI): True, None) add_hw_option(_("RNG"), "system-run", PAGE_RNG, True, None) add_hw_option(_("Panic Notifier"), "system-run", PAGE_PANIC, - bool(DevicePanic.get_models(self.vm.get_xmlobj())), - _("Not supported for this hypervisor/libvirt/arch combination.")) + True, None) add_hw_option(_("VirtIO VSOCK"), "network-idle", PAGE_VSOCK, self.vm.is_hvm(), _("Not supported for this hypervisor/libvirt/arch combination.")) @@ -512,16 +511,6 @@ class vmmAddHardware(vmmGObjectUI): } return bus_mappings.get(bus, bus) - @staticmethod - def panic_pretty_model(val): - labels = { - DevicePanic.MODEL_ISA: _("ISA"), - DevicePanic.MODEL_PSERIES: _("pSeries"), - DevicePanic.MODEL_HYPERV: _("Hyper-V"), - DevicePanic.MODEL_S390: _("s390"), - } - return labels.get(val, val) - @staticmethod def rng_pretty_type(val): labels = { @@ -871,12 +860,8 @@ class vmmAddHardware(vmmGObjectUI): def _build_panic_model_combo(self): - values = [] - for m in DevicePanic.get_models(self.vm.get_xmlobj()): - values.append([m, vmmAddHardware.panic_pretty_model(m)]) - - default = DevicePanic.get_default_model(self.vm.get_xmlobj()) - uiutil.build_simple_combo(self.widget("panic-model"), values, default_value=default) + values = [[None, _("Hypervisor default")]] + uiutil.build_simple_combo(self.widget("panic-model"), values) def _build_controller_type_combo(self): diff --git a/virtManager/details/details.py b/virtManager/details/details.py index bd55f0baf..e53c52ef0 100644 --- a/virtManager/details/details.py +++ b/virtManager/details/details.py @@ -2058,9 +2058,7 @@ class vmmDetails(vmmGObjectUI): self.tpmdetails.set_dev(tpmdev) def _refresh_panic_page(self, dev): - model = dev.model or "isa" - pmodel = vmmAddHardware.panic_pretty_model(model) - self.widget("panic-model").set_text(pmodel) + self.widget("panic-model").set_text(dev.model or "") def _refresh_rng_page(self, dev): is_random = dev.backend_model == "random" diff --git a/virtinst/devices/panic.py b/virtinst/devices/panic.py index 86a0056fe..b31b49e39 100644 --- a/virtinst/devices/panic.py +++ b/virtinst/devices/panic.py @@ -12,11 +12,6 @@ from ..xmlbuilder import XMLProperty class DevicePanic(Device): XML_NAME = "panic" - MODEL_ISA = "isa" - MODEL_PSERIES = "pseries" - MODEL_HYPERV = "hyperv" - MODEL_S390 = "s390" - model = XMLProperty("./@model") set_stub = XMLProperty(".", is_bool=True) @@ -25,24 +20,6 @@ class DevicePanic(Device): # Default config # ################## - @staticmethod - def get_models(guest): - if guest.os.is_x86(): - return [DevicePanic.MODEL_ISA, - DevicePanic.MODEL_HYPERV] - elif guest.os.is_pseries(): - return [DevicePanic.MODEL_PSERIES] - elif guest.os.is_s390x(): - return [DevicePanic.MODEL_S390] - return [] - - @staticmethod - def get_default_model(guest): - models = DevicePanic.get_models(guest) - if models: - return models[0] - return None - def set_defaults(self, guest): if not self.address.type and self.address.iobase: self.address.type = "isa"