mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
support: s/CONN_HV/CONN/g
We don't need to distinguish these days.
This commit is contained in:
parent
fb7868db19
commit
a2cbb9f500
@ -370,9 +370,8 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
self.vm.is_hvm(),
|
||||
_("Not supported for this guest type."))
|
||||
add_hw_option("Filesystem", Gtk.STOCK_DIRECTORY, PAGE_FILESYSTEM,
|
||||
self.conn.check_conn_hv_support(
|
||||
self.conn.SUPPORT_CONN_HV_FILESYSTEM,
|
||||
self.vm.get_hv_type()),
|
||||
self.conn.check_conn_support(
|
||||
self.conn.SUPPORT_CONN_FILESYSTEM),
|
||||
_("Not supported for this hypervisor/libvirt "
|
||||
"combination."))
|
||||
add_hw_option("Smartcard", "device_serial", PAGE_SMARTCARD,
|
||||
|
@ -430,8 +430,6 @@ class vmmConnection(vmmGObject):
|
||||
_supportname)
|
||||
def check_conn_support(self, *args):
|
||||
return self._backend.check_conn_support(*args)
|
||||
def check_conn_hv_support(self, *args):
|
||||
return self._backend.check_conn_hv_support(*args)
|
||||
def check_domain_support(self, *args):
|
||||
return self._backend.check_domain_support(*args)
|
||||
def check_pool_support(self, *args):
|
||||
|
@ -1475,7 +1475,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
return
|
||||
|
||||
support_spice = guest.conn.check_conn_support(
|
||||
guest.conn.SUPPORT_CONN_HV_GRAPHICS_SPICE)
|
||||
guest.conn.SUPPORT_CONN_GRAPHICS_SPICE)
|
||||
if not self._rhel6_defaults():
|
||||
support_spice = True
|
||||
|
||||
|
@ -616,7 +616,7 @@ def populate_network_list(net_list, conn, show_direct_interfaces=True):
|
||||
else:
|
||||
if (show_direct_interfaces and
|
||||
conn.check_conn_support(
|
||||
conn.SUPPORT_CONN_HV_DIRECT_INTERFACE)):
|
||||
conn.SUPPORT_CONN_DIRECT_INTERFACE)):
|
||||
sensitive = True
|
||||
nettype = virtinst.VirtualNetworkInterface.TYPE_DIRECT
|
||||
bridge_name = name
|
||||
|
@ -351,8 +351,6 @@ class VirtualConnection(object):
|
||||
|
||||
def check_conn_support(self, feature):
|
||||
return self._check_support(feature, self)
|
||||
def check_conn_hv_support(self, feature, hv):
|
||||
return self._check_support(feature, hv)
|
||||
def check_domain_support(self, dom, feature):
|
||||
return self._check_support(feature, dom)
|
||||
def check_pool_support(self, pool, feature):
|
||||
|
@ -634,9 +634,8 @@ class Guest(XMLBuilder):
|
||||
|
||||
default = True
|
||||
if (self._lookup_osdict_key("xen_disable_acpi", False) and
|
||||
self.conn.check_conn_hv_support(
|
||||
support.SUPPORT_CONN_HV_SKIP_DEFAULT_ACPI,
|
||||
self.type)):
|
||||
self.conn.check_conn_support(
|
||||
support.SUPPORT_CONN_SKIP_DEFAULT_ACPI)):
|
||||
default = False
|
||||
|
||||
if self.features.acpi == "default":
|
||||
@ -765,11 +764,11 @@ class Guest(XMLBuilder):
|
||||
inp.bus = input_bus
|
||||
|
||||
def _set_sound_defaults(self):
|
||||
if self.conn.check_conn_hv_support(
|
||||
support.SUPPORT_CONN_HV_SOUND_ICH6, self.type):
|
||||
if self.conn.check_conn_support(
|
||||
support.SUPPORT_CONN_SOUND_ICH6):
|
||||
default = "ich6"
|
||||
elif self.conn.check_conn_hv_support(
|
||||
support.SUPPORT_CONN_HV_SOUND_AC97, self.type):
|
||||
elif self.conn.check_conn_support(
|
||||
support.SUPPORT_CONN_SOUND_AC97):
|
||||
default = "ac97"
|
||||
else:
|
||||
default = "es1370"
|
||||
@ -802,7 +801,7 @@ class Guest(XMLBuilder):
|
||||
if (has_spice() and
|
||||
not has_spice_agent() and
|
||||
self.conn.check_conn_support(
|
||||
self.conn.SUPPORT_CONN_HV_CHAR_SPICEVMC)):
|
||||
self.conn.SUPPORT_CONN_CHAR_SPICEVMC)):
|
||||
agentdev = virtinst.VirtualChannelDevice(self.conn)
|
||||
agentdev.type = agentdev.TYPE_SPICEVMC
|
||||
self.add_device(agentdev)
|
||||
|
@ -133,7 +133,7 @@ class _OSVariant(object):
|
||||
squeezing out current ones.
|
||||
@three_stage_install: If True, this VM has a 3 stage install, AKA windows.
|
||||
@xen_disable_acpi: If True, disable acpi/apic for this OS if on old xen.
|
||||
This corresponds with the SUPPORT_CONN_HV_SKIP_DEFAULT_ACPI check
|
||||
This corresponds with the SUPPORT_CONN_SKIP_DEFAULT_ACPI check
|
||||
@virtionet: If True, this OS supports virtionet out of the box
|
||||
@virtiodisk: If True, this OS supports virtiodisk out of the box
|
||||
@virtiommio: If True, this OS supports virtio-mmio out of the box,
|
||||
|
@ -125,8 +125,6 @@ class _SupportCheck(object):
|
||||
If a hypervisor is not listed, it is assumed to be NOT SUPPORTED.
|
||||
@drv_libvirt_version: List of tuples, similar to drv_version, but
|
||||
the version number is minimum supported _libvirt_ version
|
||||
@hv_version: A list of tuples of the same form as drv_version, however
|
||||
listing the actual <domain type='%s'/> from the XML. example: 'kvm'
|
||||
|
||||
@rhel6_version
|
||||
@rhel6_drv_version: Analog of the above params, but for versions for
|
||||
@ -136,7 +134,7 @@ class _SupportCheck(object):
|
||||
def __init__(self,
|
||||
function=None, args=None, flag=None,
|
||||
version=None, force_version=None,
|
||||
drv_version=None, drv_libvirt_version=None, hv_version=None,
|
||||
drv_version=None, drv_libvirt_version=None,
|
||||
rhel6_drv_version=None, rhel6_version=None):
|
||||
self.function = function
|
||||
self.args = args
|
||||
@ -145,7 +143,6 @@ class _SupportCheck(object):
|
||||
self.force_version = bool(force_version)
|
||||
self.drv_version = drv_version or []
|
||||
self.drv_libvirt_version = drv_libvirt_version or []
|
||||
self.hv_version = hv_version or []
|
||||
|
||||
self.rhel6_version = rhel6_version and int(rhel6_version) or 0
|
||||
self.rhel6_drv_version = rhel6_drv_version or []
|
||||
@ -258,26 +255,6 @@ class _SupportCheck(object):
|
||||
if not found:
|
||||
return False
|
||||
|
||||
if self.hv_version:
|
||||
found = False
|
||||
hv_type = data
|
||||
for hv, min_hv_ver in self.hv_version:
|
||||
if hv != hv_type:
|
||||
continue
|
||||
|
||||
# No HV specific version info, just use driver version
|
||||
if min_hv_ver < 0:
|
||||
if actual_drv_ver <= -min_hv_ver:
|
||||
found = True
|
||||
break
|
||||
else:
|
||||
if actual_drv_ver >= min_hv_ver:
|
||||
found = True
|
||||
break
|
||||
|
||||
if not found:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@ -332,6 +309,25 @@ SUPPORT_CONN_DEFAULT_QCOW2 = _make(
|
||||
version=8000, drv_version=[("qemu", 1002000), ("test", 0)])
|
||||
SUPPORT_CONN_DEFAULT_USB2 = _make(
|
||||
version=9007, drv_version=[("qemu", 1000000), ("test", 0)])
|
||||
SUPPORT_CONN_SKIP_DEFAULT_ACPI = _make(drv_version=[("xen", -3001000)])
|
||||
SUPPORT_CONN_SOUND_AC97 = _make(version=6000,
|
||||
force_version=True,
|
||||
drv_version=[("qemu", 11000)])
|
||||
SUPPORT_CONN_SOUND_ICH6 = _make(version=8008,
|
||||
drv_version=[("qemu", 14000)],
|
||||
rhel6_drv_version=[("qemu", 12001)],
|
||||
rhel6_version=8007)
|
||||
SUPPORT_CONN_GRAPHICS_SPICE = _make(version=8006,
|
||||
drv_version=[("qemu", 14000)])
|
||||
SUPPORT_CONN_CHAR_SPICEVMC = _make(version=8008,
|
||||
drv_version=[("qemu", 14000)])
|
||||
SUPPORT_CONN_DIRECT_INTERFACE = _make(version=8007,
|
||||
drv_version=[("qemu", 0),
|
||||
("test", 0)])
|
||||
SUPPORT_CONN_FILESYSTEM = _make(
|
||||
drv_version=[("qemu", 13000), ("lxc", 0), ("openvz", 0), ("test", 0)],
|
||||
drv_libvirt_version=[("qemu", 8005), ("lxc", 0),
|
||||
("openvz", 0), ("test", 0)])
|
||||
|
||||
# Domain checks
|
||||
SUPPORT_DOMAIN_GETVCPUS = _make(function="virDomain.vcpus", args=())
|
||||
@ -374,27 +370,6 @@ SUPPORT_INTERFACE_XML_INACTIVE = _make(function="virInterface.XMLDesc",
|
||||
SUPPORT_INTERFACE_ISACTIVE = _make(function="virInterface.isActive", args=())
|
||||
|
||||
|
||||
# Conn HV checks
|
||||
SUPPORT_CONN_HV_SKIP_DEFAULT_ACPI = _make(drv_version=[("xen", -3001000)])
|
||||
SUPPORT_CONN_HV_SOUND_AC97 = _make(version=6000,
|
||||
force_version=True,
|
||||
drv_version=[("qemu", 11000)])
|
||||
SUPPORT_CONN_HV_SOUND_ICH6 = _make(version=8008,
|
||||
drv_version=[("qemu", 14000)],
|
||||
rhel6_drv_version=[("qemu", 12001)],
|
||||
rhel6_version=8007)
|
||||
SUPPORT_CONN_HV_GRAPHICS_SPICE = _make(version=8006,
|
||||
drv_version=[("qemu", 14000)])
|
||||
SUPPORT_CONN_HV_CHAR_SPICEVMC = _make(version=8008,
|
||||
drv_version=[("qemu", 14000)])
|
||||
SUPPORT_CONN_HV_DIRECT_INTERFACE = _make(version=8007,
|
||||
drv_version=[("qemu", 0),
|
||||
("test", 0)])
|
||||
SUPPORT_CONN_HV_FILESYSTEM = _make(
|
||||
drv_version=[("qemu", 13000), ("lxc", 0), ("openvz", 0), ("test", 0)],
|
||||
drv_libvirt_version=[("qemu", 8005), ("lxc", 0),
|
||||
("openvz", 0), ("test", 0)])
|
||||
|
||||
# Stream checks
|
||||
# Latest I tested with, and since we will use it by default
|
||||
# for URL installs, want to be sure it works
|
||||
|
Loading…
Reference in New Issue
Block a user