Fixed indentation

At some place of code, wrong indentation is used.
In this patchset, I corrected them.

Change-Id: I03c7210f2fc90f97be9f09275b0998023303cd5a
This commit is contained in:
Gábor Antal 2016-08-31 18:01:08 +02:00
parent 5bdf06ea96
commit 65b72f2d9d
7 changed files with 37 additions and 37 deletions

View File

@ -314,7 +314,7 @@ class APIRouterV21(base_wsgi.Router):
**kargs) **kargs)
if resource.custom_routes_fn: if resource.custom_routes_fn:
resource.custom_routes_fn(mapper, wsgi_resource) resource.custom_routes_fn(mapper, wsgi_resource)
def _register_controllers(self, ext): def _register_controllers(self, ext):
"""Register controllers defined by the extensions """Register controllers defined by the extensions

View File

@ -2076,10 +2076,11 @@ class ComputeManager(manager.Manager):
yield resources yield resources
except Exception as exc: except Exception as exc:
with excutils.save_and_reraise_exception() as ctxt: with excutils.save_and_reraise_exception() as ctxt:
if not isinstance(exc, (exception.InstanceNotFound, if not isinstance(exc, (
exception.UnexpectedDeletingTaskStateError)): exception.InstanceNotFound,
LOG.exception(_LE('Instance failed to spawn'), exception.UnexpectedDeletingTaskStateError)):
instance=instance) LOG.exception(_LE('Instance failed to spawn'),
instance=instance)
# Make sure the async call finishes # Make sure the async call finishes
if network_info is not None: if network_info is not None:
network_info.wait(do_raise=False) network_info.wait(do_raise=False)

View File

@ -84,23 +84,23 @@ def generate_identity_headers(context, status='Confirmed'):
def _glanceclient_from_endpoint(context, endpoint, version=1): def _glanceclient_from_endpoint(context, endpoint, version=1):
"""Instantiate a new glanceclient.Client object.""" """Instantiate a new glanceclient.Client object."""
params = {} params = {}
# NOTE(sdague): even if we aren't using keystone, it doesn't # NOTE(sdague): even if we aren't using keystone, it doesn't
# hurt to send these headers. # hurt to send these headers.
params['identity_headers'] = generate_identity_headers(context) params['identity_headers'] = generate_identity_headers(context)
if endpoint.startswith('https://'): if endpoint.startswith('https://'):
# https specific params # https specific params
params['insecure'] = CONF.glance.api_insecure params['insecure'] = CONF.glance.api_insecure
params['ssl_compression'] = False params['ssl_compression'] = False
sslutils.is_enabled(CONF) sslutils.is_enabled(CONF)
if CONF.ssl.cert_file: if CONF.ssl.cert_file:
params['cert_file'] = CONF.ssl.cert_file params['cert_file'] = CONF.ssl.cert_file
if CONF.ssl.key_file: if CONF.ssl.key_file:
params['key_file'] = CONF.ssl.key_file params['key_file'] = CONF.ssl.key_file
if CONF.ssl.ca_file: if CONF.ssl.ca_file:
params['cacert'] = CONF.ssl.ca_file params['cacert'] = CONF.ssl.ca_file
return glanceclient.Client(str(version), endpoint, **params) return glanceclient.Client(str(version), endpoint, **params)
def get_api_servers(): def get_api_servers():

View File

@ -607,10 +607,9 @@ class FloatingIP(object):
for dns_domain in domain_list: for dns_domain in domain_list:
if (dns_domain.domain in floating_driver_domain_list or if (dns_domain.domain in floating_driver_domain_list or
dns_domain.domain in instance_driver_domain_list): dns_domain.domain in instance_driver_domain_list):
domain_entry = self._prepare_domain_entry(context, domain_entry = self._prepare_domain_entry(context, dns_domain)
dns_domain) if domain_entry:
if domain_entry: domains.append(domain_entry)
domains.append(domain_entry)
else: else:
LOG.warning(_LW('Database inconsistency: DNS domain |%s| is ' LOG.warning(_LW('Database inconsistency: DNS domain |%s| is '
'registered in the Nova db but not visible to ' 'registered in the Nova db but not visible to '

View File

@ -31,7 +31,7 @@ def all_things_equal(obj_a, obj_b):
continue continue
if getattr(obj_a, name) != getattr(obj_b, name): if getattr(obj_a, name) != getattr(obj_b, name):
return False return False
return True return True

View File

@ -524,15 +524,15 @@ class LibvirtDriver(driver.ComputeDriver):
not self._host.has_min_version( not self._host.has_min_version(
MIN_LIBVIRT_OTHER_ARCH.get(kvm_arch), MIN_LIBVIRT_OTHER_ARCH.get(kvm_arch),
MIN_QEMU_OTHER_ARCH.get(kvm_arch))): MIN_QEMU_OTHER_ARCH.get(kvm_arch))):
raise exception.NovaException( raise exception.NovaException(
_('Running Nova with qemu/kvm virt_type on %(arch)s ' _('Running Nova with qemu/kvm virt_type on %(arch)s '
'requires libvirt version %(libvirt_ver)s and ' 'requires libvirt version %(libvirt_ver)s and '
'qemu version %(qemu_ver)s, or greater') % 'qemu version %(qemu_ver)s, or greater') %
{'arch': kvm_arch, {'arch': kvm_arch,
'libvirt_ver': self._version_to_string( 'libvirt_ver': self._version_to_string(
MIN_LIBVIRT_OTHER_ARCH.get(kvm_arch)), MIN_LIBVIRT_OTHER_ARCH.get(kvm_arch)),
'qemu_ver': self._version_to_string( 'qemu_ver': self._version_to_string(
MIN_QEMU_OTHER_ARCH.get(kvm_arch))}) MIN_QEMU_OTHER_ARCH.get(kvm_arch))})
def _prepare_migration_flags(self): def _prepare_migration_flags(self):
migration_flags = 0 migration_flags = 0

View File

@ -118,7 +118,7 @@ class LibvirtScalityVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver):
parts = mount.split() parts = mount.split()
if (parts[0].endswith('fuse') and if (parts[0].endswith('fuse') and
parts[1].rstrip('/') == mount_path): parts[1].rstrip('/') == mount_path):
return True return True
return False return False
def _mount_sofs(self): def _mount_sofs(self):