Fix some pylint indentation warnings
Running with a stricter .pylintrc generates a lot of C0330 warnings (hanging/continued indentation). Fix the ones in neutron/common. Trivialfix Change-Id: Ibcbe775d538e8f8ab5e6476ea1a156611587d358
This commit is contained in:
parent
ba795c6692
commit
3702575bfe
|
@ -107,8 +107,8 @@ class cache_method_results(object):
|
|||
raise NotImplementedError(
|
||||
_("Instance of class %(module)s.%(class)s must contain _cache "
|
||||
"attribute") % {
|
||||
'module': target_self.__module__,
|
||||
'class': target_self_cls_name})
|
||||
'module': target_self.__module__,
|
||||
'class': target_self_cls_name})
|
||||
if not target_self._cache:
|
||||
if self._first_call:
|
||||
LOG.debug("Instance of class %(module)s.%(class)s doesn't "
|
||||
|
|
|
@ -306,7 +306,7 @@ def update_acls_for_security_group(plugin,
|
|||
else:
|
||||
ovn.pg_acl_del(acl['port_group'], acl['direction'],
|
||||
acl['priority'], acl['match']).execute(
|
||||
check_error=True)
|
||||
check_error=True)
|
||||
|
||||
|
||||
def filter_acl_dict(acl, extra_fields=None):
|
||||
|
|
|
@ -445,8 +445,8 @@ def remove_macs_from_lsp_addresses(addresses):
|
|||
ip_list = []
|
||||
for addr in addresses:
|
||||
ip_list.extend([x for x in addr.split() if
|
||||
(netutils.is_valid_ipv4(x) or
|
||||
netutils.is_valid_ipv6(x))])
|
||||
(netutils.is_valid_ipv4(x) or
|
||||
netutils.is_valid_ipv6(x))])
|
||||
return ip_list
|
||||
|
||||
|
||||
|
@ -476,9 +476,9 @@ def get_allowed_address_pairs_ip_addresses_from_ovn_port(ovn_port):
|
|||
|
||||
def get_ovn_port_security_groups(ovn_port, skip_trusted_port=True):
|
||||
info = {'security_groups': ovn_port.external_ids.get(
|
||||
constants.OVN_SG_IDS_EXT_ID_KEY, '').split(),
|
||||
constants.OVN_SG_IDS_EXT_ID_KEY, '').split(),
|
||||
'device_owner': ovn_port.external_ids.get(
|
||||
constants.OVN_DEVICE_OWNER_EXT_ID_KEY, '')}
|
||||
constants.OVN_DEVICE_OWNER_EXT_ID_KEY, '')}
|
||||
return get_lsp_security_groups(info, skip_trusted_port=skip_trusted_port)
|
||||
|
||||
|
||||
|
|
|
@ -929,7 +929,7 @@ def spawn_n(func, *args, **kwargs):
|
|||
def timecost(f):
|
||||
call_id = uuidutils.generate_uuid()
|
||||
message_base = ("Time-cost: call %(call_id)s function %(fname)s ") % {
|
||||
"call_id": call_id, "fname": f.__name__}
|
||||
"call_id": call_id, "fname": f.__name__}
|
||||
end_message = (message_base + "took %(seconds).3fs seconds to run")
|
||||
|
||||
@timeutils.time_it(LOG, message=end_message, min_duration=None)
|
||||
|
|
Loading…
Reference in New Issue