s/enable_unsupported_rhel_opts/rhel6_defaults/g

This commit is contained in:
Cole Robinson 2011-07-22 13:13:26 -04:00
parent 0ab1f99230
commit d4740fbd3b
9 changed files with 18 additions and 18 deletions

View File

@ -315,7 +315,7 @@ def main():
config = virtManager.config.vmmConfig(appname, appversion, glade_dir)
virtManager.util.running_config = config
config.default_qemu_user = default_qemu_user
config.enable_unsupported_rhel_opts = rhel_enable_unsupported_opts
config.rhel6_defaults = rhel_enable_unsupported_opts
config.preferred_distros = preferred_distros
config.hv_packages = hv_packages

View File

@ -506,7 +506,7 @@ class vmmAddHardware(vmmGObjectUI):
add_dev("ide", virtinst.VirtualDisk.DEVICE_CDROM, "IDE cdrom")
add_dev("fdc", virtinst.VirtualDisk.DEVICE_FLOPPY, "Floppy disk")
if self.vm.enable_unsupported_rhel_opts():
if self.vm.rhel6_defaults():
add_dev("scsi", virtinst.VirtualDisk.DEVICE_DISK, "SCSI disk")
add_dev("usb", virtinst.VirtualDisk.DEVICE_DISK, "USB disk")
if self.vm.get_hv_type() == "kvm":
@ -1369,8 +1369,8 @@ class vmmAddHardware(vmmGObjectUI):
if self.storage_browser == None:
self.storage_browser = vmmStorageBrowser(conn)
rhel6 = self.vm.enable_unsupported_rhel_opts()
self.storage_browser.enable_unsupported_rhel_opts = rhel6
rhel6 = self.vm.rhel6_defaults()
self.storage_browser.rhel6_defaults = rhel6
self.storage_browser.set_finish_cb(set_storage_cb)
self.storage_browser.set_browse_reason(reason)

View File

@ -158,8 +158,8 @@ class vmmChooseCD(vmmGObjectUI):
self.storage_browser.connect("storage-browse-finish",
self.set_storage_path)
rhel6 = self.vm.enable_unsupported_rhel_opts()
self.storage_browser.enable_unsupported_rhel_opts = rhel6
rhel6 = self.vm.rhel6_defaults()
self.storage_browser.rhel6_defaults = rhel6
self.storage_browser.set_browse_reason(self.config.CONFIG_DIR_MEDIA)
self.storage_browser.show(self.topwin, self.conn)

View File

@ -96,7 +96,7 @@ class vmmConfig(object):
self.default_qemu_user = "root"
# Use this key to disable certain features not supported on RHEL
self.enable_unsupported_rhel_opts = True
self.rhel6_defaults = True
self.preferred_distros = []
self.hv_packages = []
self.libvirt_packages = []

View File

@ -375,12 +375,12 @@ class vmmConnection(vmmGObject):
return path == "/session"
# Connection capabilities debug helpers
def enable_unsupported_rhel_opts(self, emulator):
def rhel6_defaults(self, emulator):
if not self.is_qemu_system():
return True
if not str(emulator).startswith("/usr/libexec"):
return True
return self.config.enable_unsupported_rhel_opts
return self.config.rhel6_defaults
def is_kvm_supported(self):
return self.get_capabilities().is_kvm_available()

View File

@ -1986,8 +1986,8 @@ class vmmCreate(vmmGObjectUI):
elif self.capsdomain:
emu = self.capsdomain.emulator
rhel6 = self.conn.enable_unsupported_rhel_opts(emu)
self.storage_browser.enable_unsupported_rhel_opts = rhel6
rhel6 = self.conn.rhel6_defaults(emu)
self.storage_browser.rhel6_defaults = rhel6
self.storage_browser.set_vm_name(self.get_config_name())
self.storage_browser.set_finish_cb(callback)

View File

@ -244,8 +244,8 @@ class vmmDomain(vmmLibvirtObject):
def get_install_abort(self):
return bool(self._install_abort)
def enable_unsupported_rhel_opts(self):
return self.connection.enable_unsupported_rhel_opts(self.get_emulator())
def rhel6_defaults(self):
return self.connection.rhel6_defaults(self.get_emulator())
def is_read_only(self):
if self.connection.is_read_only():

View File

@ -48,7 +48,7 @@ class vmmStorageBrowser(vmmGObjectUI):
# Arguments to pass to util.browse_local for local storage
self.browse_reason = None
self.enable_unsupported_rhel_opts = True
self.rhel6_defaults = True
self.local_args = {}
self.window.signal_autoconnect({
@ -340,7 +340,7 @@ class vmmStorageBrowser(vmmGObjectUI):
if dironly and fmt != 'dir':
sensitive = False
elif not self.enable_unsupported_rhel_opts:
elif not self.rhel6_defaults:
if fmt == "vmdk":
sensitive = False

View File

@ -152,7 +152,7 @@ def populate_video_combo(vm, video_dev, no_default=None):
video_dev_model.clear()
tmpdev = virtinst.VirtualVideoDevice(vm.get_connection().vmm)
for m in tmpdev.model_types:
if not vm.enable_unsupported_rhel_opts():
if not vm.rhel6_defaults():
if m == "qxl" and not has_spice and not has_qxl:
# Only list QXL video option when VM has SPICE video
continue
@ -172,7 +172,7 @@ def build_sound_combo(vm, combo, no_default=False):
combo.add_attribute(text, 'text', 0)
dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
disable_rhel = not vm.enable_unsupported_rhel_opts()
disable_rhel = not vm.rhel6_defaults()
rhel6_soundmodels = ["ich6", "ac97", "es1370"]
for m in virtinst.VirtualAudio.MODELS:
@ -359,7 +359,7 @@ def build_storage_format_combo(vm, combo):
combo.set_text_column(0)
formats = ["raw", "qcow2"]
if vm.enable_unsupported_rhel_opts():
if vm.rhel6_defaults():
formats.append("vmdk")
for m in formats: