Merge "Fix "in" comparisons with one element tuples"
This commit is contained in:
commit
85915c4c3a
|
@ -91,7 +91,7 @@ class FakeVirtAPITest(VirtAPIBaseTest):
|
|||
else:
|
||||
e_args = args
|
||||
|
||||
if method in ('block_device_mapping_get_all_by_instance'):
|
||||
if method == 'block_device_mapping_get_all_by_instance':
|
||||
e_kwargs = {}
|
||||
else:
|
||||
e_kwargs = kwargs
|
||||
|
|
|
@ -2598,7 +2598,7 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||
# In managed mode, the configured device will be automatically
|
||||
# detached from the host OS drivers when the guest is started,
|
||||
# and then re-attached when the guest shuts down.
|
||||
if CONF.libvirt.virt_type not in ('xen'):
|
||||
if CONF.libvirt.virt_type != 'xen':
|
||||
# we do manual detach only for xen
|
||||
return
|
||||
try:
|
||||
|
@ -2951,7 +2951,7 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||
dev.domain, dev.bus, dev.slot, dev.function = dbsf
|
||||
|
||||
# only kvm support managed mode
|
||||
if CONF.libvirt.virt_type in ('xen'):
|
||||
if CONF.libvirt.virt_type in ('xen',):
|
||||
dev.managed = 'no'
|
||||
if CONF.libvirt.virt_type in ('kvm', 'qemu'):
|
||||
dev.managed = 'yes'
|
||||
|
|
|
@ -540,7 +540,7 @@ class SessionBase(object):
|
|||
_db_content['SR'][sr_ref]['uuid'] = sr_uuid
|
||||
_db_content['SR'][sr_ref]['forgotten'] = 0
|
||||
vdi_per_lun = False
|
||||
if type in ('iscsi'):
|
||||
if type == 'iscsi':
|
||||
# Just to be clear
|
||||
vdi_per_lun = True
|
||||
if vdi_per_lun:
|
||||
|
|
Loading…
Reference in New Issue