From 954d2687d0f9b66c38f5b0335c7caa8d683f0693 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 6 Sep 2018 12:09:18 -0400 Subject: [PATCH] domain: Drop stable_defaults wrapper Have callers invoke it directly on Guest --- virtManager/addhardware.py | 4 ++-- virtManager/choosecd.py | 2 +- virtManager/domain.py | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py index d7188f0b..ba3b3ac9 100644 --- a/virtManager/addhardware.py +++ b/virtManager/addhardware.py @@ -483,7 +483,7 @@ class vmmAddHardware(vmmGObjectUI): disk_bus_types.append("sata") disk_bus_types.append("fdc") - if not vm.stable_defaults(): + if not vm.xmlobj.stable_defaults(): disk_bus_types.append("scsi") disk_bus_types.append("usb") @@ -633,7 +633,7 @@ class vmmAddHardware(vmmGObjectUI): # Type name, desc for t in char_class.TYPES: if (t in stable_blacklist and - self.vm.stable_defaults()): + self.vm.xmlobj.stable_defaults()): continue desc = char_class.pretty_type(t) diff --git a/virtManager/choosecd.py b/virtManager/choosecd.py index c1cf5922..ec4bbbe3 100644 --- a/virtManager/choosecd.py +++ b/virtManager/choosecd.py @@ -81,7 +81,7 @@ class vmmChooseCD(vmmGObjectUI): def reset_state(self): self.mediacombo.reset_state() - enable_phys = not self.vm.stable_defaults() + enable_phys = not self.vm.xmlobj.stable_defaults() self.widget("physical-media").set_sensitive(enable_phys) self.widget("physical-media").set_tooltip_text("" if enable_phys else _("Physical CDROM passthrough not supported with this hypervisor")) diff --git a/virtManager/domain.py b/virtManager/domain.py index 3b1b43d1..66aacc9f 100644 --- a/virtManager/domain.py +++ b/virtManager/domain.py @@ -365,9 +365,6 @@ class vmmDomain(vmmLibvirtObject): def get_install_abort(self): return bool(self._install_abort) - def stable_defaults(self): - return self.get_xmlobj().stable_defaults() - def has_spicevmc_type_redirdev(self): devs = self.xmlobj.devices.redirdev for dev in devs: