Fix W503 pep8 warnings
Fix W503 (line break before binary operator) pep8 warnings and no longer ignore new failures. Trivialfix Change-Id: I7539f3b7187f2ad40681781f74b6e05a01bac474
This commit is contained in:
parent
c16d15fff2
commit
90cd939047
|
@ -161,9 +161,9 @@ class DhcpAgent(manager.Manager):
|
||||||
# allocation pool or a port is deleted to free up an IP, this
|
# allocation pool or a port is deleted to free up an IP, this
|
||||||
# will automatically be retried on the notification
|
# will automatically be retried on the notification
|
||||||
self.schedule_resync(e, network.id)
|
self.schedule_resync(e, network.id)
|
||||||
if (isinstance(e, oslo_messaging.RemoteError)
|
if (isinstance(e, oslo_messaging.RemoteError) and
|
||||||
and e.exc_type == 'NetworkNotFound'
|
e.exc_type == 'NetworkNotFound' or
|
||||||
or isinstance(e, exceptions.NetworkNotFound)):
|
isinstance(e, exceptions.NetworkNotFound)):
|
||||||
LOG.debug("Network %s has been deleted.", network.id)
|
LOG.debug("Network %s has been deleted.", network.id)
|
||||||
else:
|
else:
|
||||||
LOG.exception('Unable to %(action)s dhcp for %(net_id)s.',
|
LOG.exception('Unable to %(action)s dhcp for %(net_id)s.',
|
||||||
|
|
|
@ -335,8 +335,8 @@ class L3NATAgent(ha.AgentMixin,
|
||||||
# side of it, typically because it's landing on a node that needs
|
# side of it, typically because it's landing on a node that needs
|
||||||
# to provision a router namespace because of a DVR service port
|
# to provision a router namespace because of a DVR service port
|
||||||
# (e.g. DHCP).
|
# (e.g. DHCP).
|
||||||
if (self.conf.agent_mode == lib_const.L3_AGENT_MODE_DVR_SNAT
|
if (self.conf.agent_mode == lib_const.L3_AGENT_MODE_DVR_SNAT and
|
||||||
and router.get(lib_const.HA_INTERFACE_KEY) is not None):
|
router.get(lib_const.HA_INTERFACE_KEY) is not None):
|
||||||
kwargs['state_change_callback'] = self.enqueue_state_change
|
kwargs['state_change_callback'] = self.enqueue_state_change
|
||||||
return dvr_edge_ha_router.DvrEdgeHaRouter(*args, **kwargs)
|
return dvr_edge_ha_router.DvrEdgeHaRouter(*args, **kwargs)
|
||||||
|
|
||||||
|
|
|
@ -115,8 +115,7 @@ class DvrEdgeHaRouter(dvr_edge_router.DvrEdgeRouter,
|
||||||
self._plug_external_gateway(ex_gw_port, interface_name, ns_name)
|
self._plug_external_gateway(ex_gw_port, interface_name, ns_name)
|
||||||
|
|
||||||
def _is_this_snat_host(self):
|
def _is_this_snat_host(self):
|
||||||
return (self.agent_conf.agent_mode
|
return self.agent_conf.agent_mode == constants.L3_AGENT_MODE_DVR_SNAT
|
||||||
== constants.L3_AGENT_MODE_DVR_SNAT)
|
|
||||||
|
|
||||||
def _dvr_internal_network_removed(self, port):
|
def _dvr_internal_network_removed(self, port):
|
||||||
super(DvrEdgeHaRouter, self)._dvr_internal_network_removed(port)
|
super(DvrEdgeHaRouter, self)._dvr_internal_network_removed(port)
|
||||||
|
|
|
@ -772,8 +772,8 @@ class RouterInfo(object):
|
||||||
def _delete_stale_external_devices(self, interface_name):
|
def _delete_stale_external_devices(self, interface_name):
|
||||||
existing_devices = self._get_existing_devices()
|
existing_devices = self._get_existing_devices()
|
||||||
stale_devs = [dev for dev in existing_devices
|
stale_devs = [dev for dev in existing_devices
|
||||||
if dev.startswith(EXTERNAL_DEV_PREFIX)
|
if dev.startswith(EXTERNAL_DEV_PREFIX) and
|
||||||
and dev != interface_name]
|
dev != interface_name]
|
||||||
for stale_dev in stale_devs:
|
for stale_dev in stale_devs:
|
||||||
LOG.debug('Deleting stale external router device: %s', stale_dev)
|
LOG.debug('Deleting stale external router device: %s', stale_dev)
|
||||||
self.agent.pd.remove_gw_interface(self.router['id'])
|
self.agent.pd.remove_gw_interface(self.router['id'])
|
||||||
|
@ -1053,8 +1053,8 @@ class RouterInfo(object):
|
||||||
iptables = iptables_manager.get_tables(ip_version)
|
iptables = iptables_manager.get_tables(ip_version)
|
||||||
iptables['mangle'].empty_chain('scope')
|
iptables['mangle'].empty_chain('scope')
|
||||||
iptables['filter'].empty_chain('scope')
|
iptables['filter'].empty_chain('scope')
|
||||||
dont_block_external = (ip_version == lib_constants.IP_VERSION_4
|
dont_block_external = (ip_version == lib_constants.IP_VERSION_4 and
|
||||||
and self._snat_enabled and external_port)
|
self._snat_enabled and external_port)
|
||||||
for device_name, mark in scopemarks.items():
|
for device_name, mark in scopemarks.items():
|
||||||
# Add address scope iptables rule
|
# Add address scope iptables rule
|
||||||
iptables['mangle'].add_rule(
|
iptables['mangle'].add_rule(
|
||||||
|
|
|
@ -1155,9 +1155,9 @@ class DeviceManager(object):
|
||||||
|
|
||||||
for subnet in network.subnets:
|
for subnet in network.subnets:
|
||||||
skip_subnet = (
|
skip_subnet = (
|
||||||
subnet.ip_version != ip_version
|
subnet.ip_version != ip_version or
|
||||||
or not subnet.enable_dhcp
|
not subnet.enable_dhcp or
|
||||||
or subnet.gateway_ip is None)
|
subnet.gateway_ip is None)
|
||||||
|
|
||||||
if skip_subnet:
|
if skip_subnet:
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -274,8 +274,8 @@ class IPDevice(SubProcessBase):
|
||||||
self.neigh = IpNeighCommand(self)
|
self.neigh = IpNeighCommand(self)
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return (other is not None and self.name == other.name
|
return (other is not None and self.name == other.name and
|
||||||
and self.namespace == other.namespace)
|
self.namespace == other.namespace)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
|
@ -280,8 +280,8 @@ class UnixDomainMetadataProxy(object):
|
||||||
mode = self.conf.metadata_proxy_socket_mode
|
mode = self.conf.metadata_proxy_socket_mode
|
||||||
if mode == config.DEDUCE_MODE:
|
if mode == config.DEDUCE_MODE:
|
||||||
user = self.conf.metadata_proxy_user
|
user = self.conf.metadata_proxy_user
|
||||||
if (not user or user == '0' or user == 'root'
|
if (not user or user == '0' or user == 'root' or
|
||||||
or agent_utils.is_effective_user(user)):
|
agent_utils.is_effective_user(user)):
|
||||||
# user is agent effective user or root => USER_MODE
|
# user is agent effective user or root => USER_MODE
|
||||||
mode = config.USER_MODE
|
mode = config.USER_MODE
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -333,8 +333,8 @@ def _set_colval_args(*col_values):
|
||||||
if isinstance(val, collections.Mapping):
|
if isinstance(val, collections.Mapping):
|
||||||
args += ["%s:%s%s%s" % (
|
args += ["%s:%s%s%s" % (
|
||||||
col, k, op, ovsdb.py_to_val(v)) for k, v in val.items()]
|
col, k, op, ovsdb.py_to_val(v)) for k, v in val.items()]
|
||||||
elif (isinstance(val, collections.Sequence)
|
elif (isinstance(val, collections.Sequence) and
|
||||||
and not isinstance(val, six.string_types)):
|
not isinstance(val, six.string_types)):
|
||||||
if len(val) == 0:
|
if len(val) == 0:
|
||||||
args.append("%s%s%s" % (col, op, "[]"))
|
args.append("%s%s%s" % (col, op, "[]"))
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -138,8 +138,8 @@ class ExtensionMiddleware(base.ConfigurableMiddleware):
|
||||||
|
|
||||||
def __init__(self, application,
|
def __init__(self, application,
|
||||||
ext_mgr=None):
|
ext_mgr=None):
|
||||||
self.ext_mgr = (ext_mgr
|
self.ext_mgr = (ext_mgr or
|
||||||
or ExtensionManager(get_extensions_path()))
|
ExtensionManager(get_extensions_path()))
|
||||||
mapper = routes.Mapper()
|
mapper = routes.Mapper()
|
||||||
|
|
||||||
# extended resources
|
# extended resources
|
||||||
|
|
|
@ -282,8 +282,9 @@ class DhcpRpcCallback(object):
|
||||||
plugin = directory.get_plugin()
|
plugin = directory.get_plugin()
|
||||||
try:
|
try:
|
||||||
old_port = plugin.get_port(context, port['id'])
|
old_port = plugin.get_port(context, port['id'])
|
||||||
if (old_port['device_id'] != constants.DEVICE_ID_RESERVED_DHCP_PORT
|
if (old_port['device_id'] !=
|
||||||
and old_port['device_id'] !=
|
constants.DEVICE_ID_RESERVED_DHCP_PORT and
|
||||||
|
old_port['device_id'] !=
|
||||||
utils.get_dhcp_agent_device_id(port['port']['network_id'],
|
utils.get_dhcp_agent_device_id(port['port']['network_id'],
|
||||||
host)):
|
host)):
|
||||||
raise n_exc.DhcpPortInUse(port_id=port['id'])
|
raise n_exc.DhcpPortInUse(port_id=port['id'])
|
||||||
|
|
|
@ -52,8 +52,8 @@ def is_enabled_and_bind_by_default():
|
||||||
def is_auto_address_subnet(subnet):
|
def is_auto_address_subnet(subnet):
|
||||||
"""Check if subnet is an auto address subnet."""
|
"""Check if subnet is an auto address subnet."""
|
||||||
modes = [const.IPV6_SLAAC, const.DHCPV6_STATELESS]
|
modes = [const.IPV6_SLAAC, const.DHCPV6_STATELESS]
|
||||||
return (subnet['ipv6_address_mode'] in modes
|
return (subnet['ipv6_address_mode'] in modes or
|
||||||
or subnet['ipv6_ra_mode'] in modes)
|
subnet['ipv6_ra_mode'] in modes)
|
||||||
|
|
||||||
|
|
||||||
def is_eui64_address(ip_address):
|
def is_eui64_address(ip_address):
|
||||||
|
|
|
@ -90,8 +90,9 @@ class AllowedAddressPairsMixin(object):
|
||||||
return db_utils.resource_fields(res, fields)
|
return db_utils.resource_fields(res, fields)
|
||||||
|
|
||||||
def _has_address_pairs(self, port):
|
def _has_address_pairs(self, port):
|
||||||
return (validators.is_attr_set(port['port'][addr_apidef.ADDRESS_PAIRS])
|
return (validators.is_attr_set(
|
||||||
and port['port'][addr_apidef.ADDRESS_PAIRS] != [])
|
port['port'][addr_apidef.ADDRESS_PAIRS]) and
|
||||||
|
port['port'][addr_apidef.ADDRESS_PAIRS] != [])
|
||||||
|
|
||||||
def _check_update_has_allowed_address_pairs(self, port):
|
def _check_update_has_allowed_address_pairs(self, port):
|
||||||
"""Determine if request has an allowed address pair.
|
"""Determine if request has an allowed address pair.
|
||||||
|
|
|
@ -82,8 +82,8 @@ class ExtraDhcpOptMixin(object):
|
||||||
with db_api.context_manager.writer.using(context):
|
with db_api.context_manager.writer.using(context):
|
||||||
for upd_rec in dopts:
|
for upd_rec in dopts:
|
||||||
for opt in opts:
|
for opt in opts:
|
||||||
if (opt['opt_name'] == upd_rec['opt_name']
|
if (opt['opt_name'] == upd_rec['opt_name'] and
|
||||||
and opt['ip_version'] == upd_rec.get(
|
opt['ip_version'] == upd_rec.get(
|
||||||
'ip_version', 4)):
|
'ip_version', 4)):
|
||||||
# to handle deleting of a opt from the port.
|
# to handle deleting of a opt from the port.
|
||||||
if upd_rec['opt_value'] is None:
|
if upd_rec['opt_value'] is None:
|
||||||
|
|
|
@ -765,10 +765,10 @@ class IpamBackendMixin(db_base_plugin_common.DbBasePluginCommon):
|
||||||
old_ips = old_port.get('fixed_ips')
|
old_ips = old_port.get('fixed_ips')
|
||||||
deferred_ip_allocation = (
|
deferred_ip_allocation = (
|
||||||
old_port.get('ip_allocation') ==
|
old_port.get('ip_allocation') ==
|
||||||
ipalloc_apidef.IP_ALLOCATION_DEFERRED
|
ipalloc_apidef.IP_ALLOCATION_DEFERRED and
|
||||||
and host and not old_host
|
host and not old_host and
|
||||||
and not old_ips
|
not old_ips and
|
||||||
and not fixed_ips_requested)
|
not fixed_ips_requested)
|
||||||
if not deferred_ip_allocation:
|
if not deferred_ip_allocation:
|
||||||
# Check that any existing IPs are valid on the new segment
|
# Check that any existing IPs are valid on the new segment
|
||||||
new_host_requested = host and host != old_host
|
new_host_requested = host and host != old_host
|
||||||
|
|
|
@ -788,8 +788,8 @@ class L3_NAT_dbonly_mixin(l3.RouterPluginBase,
|
||||||
if not subnet['gateway_ip']:
|
if not subnet['gateway_ip']:
|
||||||
msg = _('Subnet for router interface must have a gateway IP')
|
msg = _('Subnet for router interface must have a gateway IP')
|
||||||
raise n_exc.BadRequest(resource='router', msg=msg)
|
raise n_exc.BadRequest(resource='router', msg=msg)
|
||||||
if (subnet['ip_version'] == 6 and subnet['ipv6_ra_mode'] is None
|
if (subnet['ip_version'] == 6 and subnet['ipv6_ra_mode'] is None and
|
||||||
and subnet['ipv6_address_mode'] is not None):
|
subnet['ipv6_address_mode'] is not None):
|
||||||
msg = (_('IPv6 subnet %s configured to receive RAs from an '
|
msg = (_('IPv6 subnet %s configured to receive RAs from an '
|
||||||
'external router cannot be added to Neutron Router.') %
|
'external router cannot be added to Neutron Router.') %
|
||||||
subnet['id'])
|
subnet['id'])
|
||||||
|
|
|
@ -552,8 +552,8 @@ class L3_HA_NAT_db_mixin(l3_dvr_db.L3_NAT_with_dvr_db_mixin,
|
||||||
# List agents where router is active and agent is dead
|
# List agents where router is active and agent is dead
|
||||||
# and agents where router is standby and agent is dead
|
# and agents where router is standby and agent is dead
|
||||||
for binding in bindings:
|
for binding in bindings:
|
||||||
if not (binding.agent.is_active
|
if not (binding.agent.is_active and
|
||||||
and binding.agent.admin_state_up):
|
binding.agent.admin_state_up):
|
||||||
if binding.state == n_const.HA_ROUTER_STATE_ACTIVE:
|
if binding.state == n_const.HA_ROUTER_STATE_ACTIVE:
|
||||||
router_active_agents_dead.append(binding.agent)
|
router_active_agents_dead.append(binding.agent)
|
||||||
elif binding.state == n_const.HA_ROUTER_STATE_STANDBY:
|
elif binding.state == n_const.HA_ROUTER_STATE_STANDBY:
|
||||||
|
|
|
@ -827,8 +827,9 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase):
|
||||||
is either [] or not is_attr_set, otherwise return False
|
is either [] or not is_attr_set, otherwise return False
|
||||||
"""
|
"""
|
||||||
if (ext_sg.SECURITYGROUPS in port['port'] and
|
if (ext_sg.SECURITYGROUPS in port['port'] and
|
||||||
not (validators.is_attr_set(port['port'][ext_sg.SECURITYGROUPS])
|
not (validators.is_attr_set(
|
||||||
and port['port'][ext_sg.SECURITYGROUPS] != [])):
|
port['port'][ext_sg.SECURITYGROUPS]) and
|
||||||
|
port['port'][ext_sg.SECURITYGROUPS] != [])):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,9 @@ def check_subnet_ip(cidr, ip_address):
|
||||||
net = netaddr.IPNetwork(cidr)
|
net = netaddr.IPNetwork(cidr)
|
||||||
# Check that the IP is valid on subnet. This cannot be the
|
# Check that the IP is valid on subnet. This cannot be the
|
||||||
# network or the broadcast address (which exists only in IPv4)
|
# network or the broadcast address (which exists only in IPv4)
|
||||||
return (ip != net.network
|
return (ip != net.network and
|
||||||
and (net.version == 6 or ip != net[-1])
|
(net.version == 6 or ip != net[-1]) and
|
||||||
and net.netmask & ip == net.network)
|
net.netmask & ip == net.network)
|
||||||
|
|
||||||
|
|
||||||
def check_gateway_invalid_in_subnet(cidr, gateway):
|
def check_gateway_invalid_in_subnet(cidr, gateway):
|
||||||
|
|
|
@ -76,8 +76,9 @@ class Notifier(object):
|
||||||
|
|
||||||
def _is_compute_port(self, port):
|
def _is_compute_port(self, port):
|
||||||
try:
|
try:
|
||||||
if (port['device_id'] and uuidutils.is_uuid_like(port['device_id'])
|
if (port['device_id'] and
|
||||||
and port['device_owner'].startswith(
|
uuidutils.is_uuid_like(port['device_id']) and
|
||||||
|
port['device_owner'].startswith(
|
||||||
constants.DEVICE_OWNER_COMPUTE_PREFIX)):
|
constants.DEVICE_OWNER_COMPUTE_PREFIX)):
|
||||||
return True
|
return True
|
||||||
except (KeyError, AttributeError):
|
except (KeyError, AttributeError):
|
||||||
|
@ -116,9 +117,9 @@ class Notifier(object):
|
||||||
# port to a new instance port without disassociate it first, an
|
# port to a new instance port without disassociate it first, an
|
||||||
# event should be sent for original instance, that will make nova
|
# event should be sent for original instance, that will make nova
|
||||||
# know original instance's info, and update database for it.
|
# know original instance's info, and update database for it.
|
||||||
if (action == 'update_floatingip'
|
if (action == 'update_floatingip' and
|
||||||
and returned_obj['floatingip'].get('port_id')
|
returned_obj['floatingip'].get('port_id') and
|
||||||
and original_obj.get('port_id')):
|
original_obj.get('port_id')):
|
||||||
disassociate_returned_obj = {'floatingip': {'port_id': None}}
|
disassociate_returned_obj = {'floatingip': {'port_id': None}}
|
||||||
event = self.create_port_changed_event(action, original_obj,
|
event = self.create_port_changed_event(action, original_obj,
|
||||||
disassociate_returned_obj)
|
disassociate_returned_obj)
|
||||||
|
@ -194,9 +195,9 @@ class Notifier(object):
|
||||||
# NO_VALUE/DOWN/BUILD -> ACTIVE/ERROR.
|
# NO_VALUE/DOWN/BUILD -> ACTIVE/ERROR.
|
||||||
elif (previous_port_status in [sql_attr.NO_VALUE,
|
elif (previous_port_status in [sql_attr.NO_VALUE,
|
||||||
constants.PORT_STATUS_DOWN,
|
constants.PORT_STATUS_DOWN,
|
||||||
constants.PORT_STATUS_BUILD]
|
constants.PORT_STATUS_BUILD] and
|
||||||
and current_port_status in [constants.PORT_STATUS_ACTIVE,
|
current_port_status in [constants.PORT_STATUS_ACTIVE,
|
||||||
constants.PORT_STATUS_ERROR]):
|
constants.PORT_STATUS_ERROR]):
|
||||||
event_name = VIF_PLUGGED
|
event_name = VIF_PLUGGED
|
||||||
# All the remaining state transitions are of no interest to nova
|
# All the remaining state transitions are of no interest to nova
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -113,8 +113,9 @@ class QosRule(base.NeutronDbObject):
|
||||||
# - Is a port QoS policy (not a network QoS policy)
|
# - Is a port QoS policy (not a network QoS policy)
|
||||||
# - Is not an internal network device (e.g. router) and is a network
|
# - Is not an internal network device (e.g. router) and is a network
|
||||||
# QoS policy and there is no port QoS policy
|
# QoS policy and there is no port QoS policy
|
||||||
return (is_port_policy or ((is_router_gw or not is_network_device_port)
|
return (is_port_policy or
|
||||||
and is_network_policy_only))
|
((is_router_gw or not is_network_device_port) and
|
||||||
|
is_network_policy_only))
|
||||||
|
|
||||||
|
|
||||||
@base.NeutronObjectRegistry.register
|
@base.NeutronObjectRegistry.register
|
||||||
|
|
|
@ -202,8 +202,8 @@ class CommonAgentLoop(service.Service):
|
||||||
# Updated devices are processed the same as new ones, as their
|
# Updated devices are processed the same as new ones, as their
|
||||||
# admin_state_up may have changed. The set union prevents duplicating
|
# admin_state_up may have changed. The set union prevents duplicating
|
||||||
# work when a device is new and updated in the same polling iteration.
|
# work when a device is new and updated in the same polling iteration.
|
||||||
devices_added_updated = (set(device_info.get('added'))
|
devices_added_updated = (set(device_info.get('added')) |
|
||||||
| set(device_info.get('updated')))
|
set(device_info.get('updated')))
|
||||||
if devices_added_updated:
|
if devices_added_updated:
|
||||||
resync_a = self.treat_devices_added_updated(devices_added_updated)
|
resync_a = self.treat_devices_added_updated(devices_added_updated)
|
||||||
|
|
||||||
|
@ -408,14 +408,15 @@ class CommonAgentLoop(service.Service):
|
||||||
|
|
||||||
# Retry cleaning devices that may not have been cleaned properly.
|
# Retry cleaning devices that may not have been cleaned properly.
|
||||||
# And clean any that disappeared since the previous iteration.
|
# And clean any that disappeared since the previous iteration.
|
||||||
device_info['removed'] = (previous['removed'] | previous['current']
|
device_info['removed'] = (previous['removed'] |
|
||||||
- current_devices)
|
previous['current'] -
|
||||||
|
current_devices)
|
||||||
|
|
||||||
# Retry updating devices that may not have been updated properly.
|
# Retry updating devices that may not have been updated properly.
|
||||||
# And any that were updated since the previous iteration.
|
# And any that were updated since the previous iteration.
|
||||||
# Only update devices that currently exist.
|
# Only update devices that currently exist.
|
||||||
device_info['updated'] = (previous['updated'] | updated_devices
|
device_info['updated'] = (previous['updated'] | updated_devices &
|
||||||
& current_devices)
|
current_devices)
|
||||||
else:
|
else:
|
||||||
device_info['added'] = current_devices - previous['current']
|
device_info['added'] = current_devices - previous['current']
|
||||||
device_info['removed'] = previous['current'] - current_devices
|
device_info['removed'] = previous['current'] - current_devices
|
||||||
|
@ -424,9 +425,9 @@ class CommonAgentLoop(service.Service):
|
||||||
return device_info
|
return device_info
|
||||||
|
|
||||||
def _device_info_has_changes(self, device_info):
|
def _device_info_has_changes(self, device_info):
|
||||||
return (device_info.get('added')
|
return (device_info.get('added') or
|
||||||
or device_info.get('updated')
|
device_info.get('updated') or
|
||||||
or device_info.get('removed'))
|
device_info.get('removed'))
|
||||||
|
|
||||||
def daemon_loop(self):
|
def daemon_loop(self):
|
||||||
LOG.info("%s Agent RPC Daemon Started!", self.agent_type)
|
LOG.info("%s Agent RPC Daemon Started!", self.agent_type)
|
||||||
|
@ -447,8 +448,8 @@ class CommonAgentLoop(service.Service):
|
||||||
device_info = self.scan_devices(previous=device_info, sync=sync)
|
device_info = self.scan_devices(previous=device_info, sync=sync)
|
||||||
sync = False
|
sync = False
|
||||||
|
|
||||||
if (self._device_info_has_changes(device_info)
|
if (self._device_info_has_changes(device_info) or
|
||||||
or self.sg_agent.firewall_refresh_needed()):
|
self.sg_agent.firewall_refresh_needed()):
|
||||||
LOG.debug("Agent loop found changes! %s", device_info)
|
LOG.debug("Agent loop found changes! %s", device_info)
|
||||||
try:
|
try:
|
||||||
sync = self.process_network_devices(device_info)
|
sync = self.process_network_devices(device_info)
|
||||||
|
|
|
@ -166,9 +166,9 @@ class L2populationMechanismDriver(api.MechanismDriver):
|
||||||
agent_host)
|
agent_host)
|
||||||
self.L2populationAgentNotify.remove_fdb_entries(
|
self.L2populationAgentNotify.remove_fdb_entries(
|
||||||
self.rpc_ctx, fdb_entries)
|
self.rpc_ctx, fdb_entries)
|
||||||
elif (context.host != context.original_host
|
elif (context.host != context.original_host and
|
||||||
and context.original_status == const.PORT_STATUS_ACTIVE
|
context.original_status == const.PORT_STATUS_ACTIVE and
|
||||||
and context.status == const.PORT_STATUS_DOWN):
|
context.status == const.PORT_STATUS_DOWN):
|
||||||
# The port has been migrated. Send notification about port
|
# The port has been migrated. Send notification about port
|
||||||
# removal from old host.
|
# removal from old host.
|
||||||
fdb_entries = self._get_agent_fdb(
|
fdb_entries = self._get_agent_fdb(
|
||||||
|
|
|
@ -696,8 +696,8 @@ class LinuxBridgeManager(amb.CommonAgentManagerBase):
|
||||||
|
|
||||||
test_iface = None
|
test_iface = None
|
||||||
for seg_id in moves.range(1, constants.MAX_VXLAN_VNI + 1):
|
for seg_id in moves.range(1, constants.MAX_VXLAN_VNI + 1):
|
||||||
if (ip_lib.device_exists(self.get_vxlan_device_name(seg_id))
|
if (ip_lib.device_exists(self.get_vxlan_device_name(seg_id)) or
|
||||||
or ip_lib.vxlan_in_use(seg_id)):
|
ip_lib.vxlan_in_use(seg_id)):
|
||||||
continue
|
continue
|
||||||
test_iface = self.ensure_vxlan(seg_id)
|
test_iface = self.ensure_vxlan(seg_id)
|
||||||
break
|
break
|
||||||
|
|
|
@ -210,9 +210,9 @@ class SriovNicSwitchAgent(object):
|
||||||
return device_info
|
return device_info
|
||||||
|
|
||||||
def _device_info_has_changes(self, device_info):
|
def _device_info_has_changes(self, device_info):
|
||||||
return (device_info.get('added')
|
return (device_info.get('added') or
|
||||||
or device_info.get('updated')
|
device_info.get('updated') or
|
||||||
or device_info.get('removed'))
|
device_info.get('removed'))
|
||||||
|
|
||||||
def process_network_devices(self, device_info):
|
def process_network_devices(self, device_info):
|
||||||
resync_a = False
|
resync_a = False
|
||||||
|
@ -225,8 +225,8 @@ class SriovNicSwitchAgent(object):
|
||||||
# Updated devices are processed the same as new ones, as their
|
# Updated devices are processed the same as new ones, as their
|
||||||
# admin_state_up may have changed. The set union prevents duplicating
|
# admin_state_up may have changed. The set union prevents duplicating
|
||||||
# work when a device is new and updated in the same polling iteration.
|
# work when a device is new and updated in the same polling iteration.
|
||||||
devices_added_updated = (set(device_info.get('added'))
|
devices_added_updated = (set(device_info.get('added')) |
|
||||||
| set(device_info.get('updated')))
|
set(device_info.get('updated')))
|
||||||
if devices_added_updated:
|
if devices_added_updated:
|
||||||
resync_a = self.treat_devices_added_updated(devices_added_updated)
|
resync_a = self.treat_devices_added_updated(devices_added_updated)
|
||||||
|
|
||||||
|
|
|
@ -575,8 +575,8 @@ class OVSDVRNeutronAgent(object):
|
||||||
if not self.in_distributed_mode():
|
if not self.in_distributed_mode():
|
||||||
return
|
return
|
||||||
|
|
||||||
if local_vlan_map.network_type not in (constants.TUNNEL_NETWORK_TYPES
|
if local_vlan_map.network_type not in (constants.TUNNEL_NETWORK_TYPES +
|
||||||
+ [n_const.TYPE_VLAN]):
|
[n_const.TYPE_VLAN]):
|
||||||
LOG.debug("DVR: Port %s is with network_type %s not supported"
|
LOG.debug("DVR: Port %s is with network_type %s not supported"
|
||||||
" for dvr plumbing", port.vif_id,
|
" for dvr plumbing", port.vif_id,
|
||||||
local_vlan_map.network_type)
|
local_vlan_map.network_type)
|
||||||
|
|
|
@ -351,8 +351,8 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
|
||||||
if not local_vlan:
|
if not local_vlan:
|
||||||
continue
|
continue
|
||||||
net_uuid = local_vlan_map.get('net_uuid')
|
net_uuid = local_vlan_map.get('net_uuid')
|
||||||
if (net_uuid and net_uuid not in self._local_vlan_hints
|
if (net_uuid and net_uuid not in self._local_vlan_hints and
|
||||||
and local_vlan != constants.DEAD_VLAN_TAG):
|
local_vlan != constants.DEAD_VLAN_TAG):
|
||||||
self.available_local_vlans.remove(local_vlan)
|
self.available_local_vlans.remove(local_vlan)
|
||||||
self._local_vlan_hints[local_vlan_map['net_uuid']] = \
|
self._local_vlan_hints[local_vlan_map['net_uuid']] = \
|
||||||
local_vlan
|
local_vlan
|
||||||
|
@ -1367,8 +1367,8 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
|
||||||
for lvm in self.vlan_manager:
|
for lvm in self.vlan_manager:
|
||||||
for port in lvm.vif_ports.values():
|
for port in lvm.vif_ports.values():
|
||||||
if (
|
if (
|
||||||
port.port_name in port_tags
|
port.port_name in port_tags and
|
||||||
and port_tags[port.port_name] != lvm.vlan
|
port_tags[port.port_name] != lvm.vlan
|
||||||
):
|
):
|
||||||
LOG.info(
|
LOG.info(
|
||||||
"Port '%(port_name)s' has lost "
|
"Port '%(port_name)s' has lost "
|
||||||
|
@ -2029,8 +2029,8 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
|
||||||
devices_need_retry = (any(failed_devices.values()) or
|
devices_need_retry = (any(failed_devices.values()) or
|
||||||
any(failed_ancillary_devices.values()) or
|
any(failed_ancillary_devices.values()) or
|
||||||
ports_not_ready_yet)
|
ports_not_ready_yet)
|
||||||
if (self._agent_has_updates(polling_manager) or sync
|
if (self._agent_has_updates(polling_manager) or sync or
|
||||||
or devices_need_retry):
|
devices_need_retry):
|
||||||
try:
|
try:
|
||||||
LOG.debug("Agent rpc_loop - iteration:%(iter_num)d - "
|
LOG.debug("Agent rpc_loop - iteration:%(iter_num)d - "
|
||||||
"starting polling. Elapsed:%(elapsed).3f",
|
"starting polling. Elapsed:%(elapsed).3f",
|
||||||
|
@ -2149,8 +2149,8 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
|
||||||
rpc_api.client.set_max_timeout(timeout)
|
rpc_api.client.set_max_timeout(timeout)
|
||||||
|
|
||||||
def _check_agent_configurations(self):
|
def _check_agent_configurations(self):
|
||||||
if (self.enable_distributed_routing and self.enable_tunneling
|
if (self.enable_distributed_routing and self.enable_tunneling and
|
||||||
and not self.l2_pop):
|
not self.l2_pop):
|
||||||
|
|
||||||
raise ValueError(_("DVR deployments for VXLAN/GRE/Geneve "
|
raise ValueError(_("DVR deployments for VXLAN/GRE/Geneve "
|
||||||
"underlays require L2-pop to be enabled, "
|
"underlays require L2-pop to be enabled, "
|
||||||
|
|
|
@ -445,8 +445,8 @@ class TunnelRpcCallbackMixin(object):
|
||||||
host_endpoint = driver.obj.get_endpoint_by_host(host)
|
host_endpoint = driver.obj.get_endpoint_by_host(host)
|
||||||
ip_endpoint = driver.obj.get_endpoint_by_ip(tunnel_ip)
|
ip_endpoint = driver.obj.get_endpoint_by_ip(tunnel_ip)
|
||||||
|
|
||||||
if (ip_endpoint and ip_endpoint.host is None
|
if (ip_endpoint and ip_endpoint.host is None and
|
||||||
and host_endpoint is None):
|
host_endpoint is None):
|
||||||
driver.obj.delete_endpoint(ip_endpoint.ip_address)
|
driver.obj.delete_endpoint(ip_endpoint.ip_address)
|
||||||
elif (ip_endpoint and ip_endpoint.host != host):
|
elif (ip_endpoint and ip_endpoint.host != host):
|
||||||
LOG.info(
|
LOG.info(
|
||||||
|
|
|
@ -172,9 +172,9 @@ def get_logs_bound_port(context, port_id):
|
||||||
project_id = port['project_id']
|
project_id = port['project_id']
|
||||||
logs = log_object.Log.get_objects(
|
logs = log_object.Log.get_objects(
|
||||||
context, project_id=project_id, enabled=True)
|
context, project_id=project_id, enabled=True)
|
||||||
is_bound = lambda log: (log.resource_id in port.security_group_ids
|
is_bound = lambda log: (log.resource_id in port.security_group_ids or
|
||||||
or log.target_id == port.id
|
log.target_id == port.id or
|
||||||
or (not log.target_id and not log.resource_id))
|
(not log.target_id and not log.resource_id))
|
||||||
return [log for log in logs if is_bound(log)]
|
return [log for log in logs if is_bound(log)]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,8 @@ class Plugin(db.SegmentDbMixin, segment.SegmentPluginBase):
|
||||||
|
|
||||||
# TODO(carl_baldwin) Make this work with service subnets when
|
# TODO(carl_baldwin) Make this work with service subnets when
|
||||||
# it's a thing.
|
# it's a thing.
|
||||||
is_adjacent = (not network_db.subnets
|
is_adjacent = (not network_db.subnets or
|
||||||
or not network_db.subnets[0].segment_id)
|
not network_db.subnets[0].segment_id)
|
||||||
network_res[l2adj_apidef.L2_ADJACENCY] = is_adjacent
|
network_res[l2adj_apidef.L2_ADJACENCY] = is_adjacent
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -47,8 +47,8 @@ def _change_since_result_filter_hook(query, filters):
|
||||||
query = query.join(standard_attr.StandardAttribute,
|
query = query.join(standard_attr.StandardAttribute,
|
||||||
target_model_class.standard_attr_id ==
|
target_model_class.standard_attr_id ==
|
||||||
standard_attr.StandardAttribute.id).filter(
|
standard_attr.StandardAttribute.id).filter(
|
||||||
standard_attr.StandardAttribute.updated_at
|
standard_attr.StandardAttribute.updated_at >=
|
||||||
>= changed_since)
|
changed_since)
|
||||||
return query
|
return query
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,8 +57,8 @@ def _update_timestamp(session, context, instances):
|
||||||
|
|
||||||
while objs_list:
|
while objs_list:
|
||||||
obj = objs_list.pop()
|
obj = objs_list.pop()
|
||||||
if (isinstance(obj, standard_attr.HasStandardAttributes)
|
if (isinstance(obj, standard_attr.HasStandardAttributes) and
|
||||||
and obj.standard_attr_id):
|
obj.standard_attr_id):
|
||||||
obj.updated_at = timeutils.utcnow()
|
obj.updated_at = timeutils.utcnow()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -153,8 +153,8 @@ class _TestModelsMigrations(test_migrations.ModelsMigrationsSync):
|
||||||
return head_models.get_metadata()
|
return head_models.get_metadata()
|
||||||
|
|
||||||
def include_object(self, object_, name, type_, reflected, compare_to):
|
def include_object(self, object_, name, type_, reflected, compare_to):
|
||||||
if type_ == 'table' and (name == 'alembic_version'
|
if type_ == 'table' and (name == 'alembic_version' or
|
||||||
or name in external.TABLES):
|
name in external.TABLES):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return super(_TestModelsMigrations, self).include_object(
|
return super(_TestModelsMigrations, self).include_object(
|
||||||
|
@ -363,8 +363,9 @@ class TestModelsMigrationsMysql(testlib_api.MySQLTestCaseMixin,
|
||||||
self.assertGreater(len(tables), 0,
|
self.assertGreater(len(tables), 0,
|
||||||
"No tables found. Wrong schema?")
|
"No tables found. Wrong schema?")
|
||||||
res = [table for table in tables if
|
res = [table for table in tables if
|
||||||
insp.get_table_options(table)['mysql_engine'] != 'InnoDB'
|
insp.get_table_options(table)['mysql_engine'] !=
|
||||||
and table != 'alembic_version']
|
'InnoDB' and
|
||||||
|
table != 'alembic_version']
|
||||||
self.assertEqual(0, len(res), "%s non InnoDB tables created" % res)
|
self.assertEqual(0, len(res), "%s non InnoDB tables created" % res)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -146,8 +146,8 @@ class TestNeutronServer(base.BaseTestCase):
|
||||||
# Wait for temp file to be created and its size reaching the expected
|
# Wait for temp file to be created and its size reaching the expected
|
||||||
# value
|
# value
|
||||||
expected_size = len(expected_msg)
|
expected_size = len(expected_msg)
|
||||||
condition = lambda: (os.path.isfile(self.temp_file)
|
condition = lambda: (os.path.isfile(self.temp_file) and
|
||||||
and os.stat(self.temp_file).st_size ==
|
os.stat(self.temp_file).st_size ==
|
||||||
expected_size)
|
expected_size)
|
||||||
|
|
||||||
utils.wait_until_true(
|
utils.wait_until_true(
|
||||||
|
|
|
@ -1864,8 +1864,8 @@ class TestBasicRouterOperations(BasicRouterOperationsFramework):
|
||||||
l3_test_common.router_append_subnet(
|
l3_test_common.router_append_subnet(
|
||||||
router, count=2, ip_version=6,
|
router, count=2, ip_version=6,
|
||||||
ipv6_subnet_modes=([{'ra_mode': lib_constants.IPV6_SLAAC,
|
ipv6_subnet_modes=([{'ra_mode': lib_constants.IPV6_SLAAC,
|
||||||
'address_mode': lib_constants.IPV6_SLAAC}]
|
'address_mode': lib_constants.IPV6_SLAAC}] *
|
||||||
* 2))
|
2))
|
||||||
self._process_router_instance_for_agent(agent, ri, router)
|
self._process_router_instance_for_agent(agent, ri, router)
|
||||||
self._assert_ri_process_enabled(ri)
|
self._assert_ri_process_enabled(ri)
|
||||||
# Reset mocks to check for modified radvd config
|
# Reset mocks to check for modified radvd config
|
||||||
|
|
|
@ -1219,8 +1219,8 @@ class TestDnsmasq(TestBase):
|
||||||
prefix6 = '--dhcp-range=set:tag%d,%s,%s,%s%s'
|
prefix6 = '--dhcp-range=set:tag%d,%s,%s,%s%s'
|
||||||
possible_leases = 0
|
possible_leases = 0
|
||||||
for i, s in enumerate(network.subnets):
|
for i, s in enumerate(network.subnets):
|
||||||
if (s.ip_version != 6
|
if (s.ip_version != 6 or
|
||||||
or s.ipv6_address_mode == constants.DHCPV6_STATEFUL):
|
s.ipv6_address_mode == constants.DHCPV6_STATEFUL):
|
||||||
if s.ip_version == 4:
|
if s.ip_version == 4:
|
||||||
expected.extend([prefix % (
|
expected.extend([prefix % (
|
||||||
i, s.cidr.split('/')[0],
|
i, s.cidr.split('/')[0],
|
||||||
|
|
|
@ -50,9 +50,9 @@ class _PortRange(object):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def can_merge(self):
|
def can_merge(self):
|
||||||
return (self.prev_ref
|
return (self.prev_ref and
|
||||||
and self.possible_mask_base == self.prev_ref.possible_mask_base
|
self.possible_mask_base == self.prev_ref.possible_mask_base and
|
||||||
and self.mask == self.prev_ref.mask)
|
self.mask == self.prev_ref.mask)
|
||||||
|
|
||||||
def shake(self):
|
def shake(self):
|
||||||
"""Try to merge ranges created earlier.
|
"""Try to merge ranges created earlier.
|
||||||
|
|
|
@ -4318,9 +4318,9 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
||||||
'fe80::/64', ip_version=6,
|
'fe80::/64', ip_version=6,
|
||||||
ipv6_ra_mode=addr_mode,
|
ipv6_ra_mode=addr_mode,
|
||||||
ipv6_address_mode=addr_mode)
|
ipv6_address_mode=addr_mode)
|
||||||
if (insert_db_reference_error or insert_address_allocated
|
if (insert_db_reference_error or insert_address_allocated or
|
||||||
or device_owner == constants.DEVICE_OWNER_ROUTER_SNAT
|
device_owner == constants.DEVICE_OWNER_ROUTER_SNAT or
|
||||||
or device_owner in constants.ROUTER_INTERFACE_OWNERS):
|
device_owner in constants.ROUTER_INTERFACE_OWNERS):
|
||||||
# DVR SNAT, router interfaces and DHCP ports should not have
|
# DVR SNAT, router interfaces and DHCP ports should not have
|
||||||
# been updated with addresses from the new auto-address subnet
|
# been updated with addresses from the new auto-address subnet
|
||||||
self.assertEqual(1, len(port['port']['fixed_ips']))
|
self.assertEqual(1, len(port['port']['fixed_ips']))
|
||||||
|
|
|
@ -63,9 +63,9 @@ class TestExtraDhcpOpt(ExtraDhcpOptDBTestCase):
|
||||||
for opt in returned:
|
for opt in returned:
|
||||||
name = opt['opt_name']
|
name = opt['opt_name']
|
||||||
for exp in expected:
|
for exp in expected:
|
||||||
if (name == exp['opt_name']
|
if (name == exp['opt_name'] and
|
||||||
and opt['ip_version'] == exp.get(
|
opt['ip_version'] == exp.get(
|
||||||
'ip_version', 4)):
|
'ip_version', 4)):
|
||||||
val = exp['opt_value']
|
val = exp['opt_value']
|
||||||
break
|
break
|
||||||
self.assertEqual(val, opt['opt_value'])
|
self.assertEqual(val, opt['opt_value'])
|
||||||
|
|
|
@ -350,8 +350,9 @@ class L3NatTestCaseMixin(object):
|
||||||
data['router']['name'] = name
|
data['router']['name'] = name
|
||||||
if admin_state_up is not None:
|
if admin_state_up is not None:
|
||||||
data['router']['admin_state_up'] = admin_state_up
|
data['router']['admin_state_up'] = admin_state_up
|
||||||
for arg in (('admin_state_up', 'tenant_id', 'availability_zone_hints')
|
for arg in (('admin_state_up', 'tenant_id',
|
||||||
+ (arg_list or ())):
|
'availability_zone_hints') +
|
||||||
|
(arg_list or ())):
|
||||||
# Arg must be present and not empty
|
# Arg must be present and not empty
|
||||||
if arg in kwargs:
|
if arg in kwargs:
|
||||||
data['router'][arg] = kwargs[arg]
|
data['router'][arg] = kwargs[arg]
|
||||||
|
|
|
@ -136,8 +136,8 @@ class PortSecurityTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
|
||||||
has_ip = self._ip_on_port(ret_port)
|
has_ip = self._ip_on_port(ret_port)
|
||||||
# checks if security groups were updated adding/modifying
|
# checks if security groups were updated adding/modifying
|
||||||
# security groups, port security is set and port has ip
|
# security groups, port security is set and port has ip
|
||||||
if (has_security_groups and (not ret_port[psec.PORTSECURITY]
|
if (has_security_groups and (not ret_port[psec.PORTSECURITY] or
|
||||||
or not has_ip)):
|
not has_ip)):
|
||||||
raise psec_exc.PortSecurityAndIPRequiredForSecurityGroups()
|
raise psec_exc.PortSecurityAndIPRequiredForSecurityGroups()
|
||||||
|
|
||||||
# Port security/IP was updated off. Need to check that no security
|
# Port security/IP was updated off. Need to check that no security
|
||||||
|
|
|
@ -172,8 +172,8 @@ class SecurityGroupsTestCase(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
|
||||||
|
|
||||||
for r in res['security_group_rules']:
|
for r in res['security_group_rules']:
|
||||||
if (r['direction'] == 'egress' and not r['port_range_max'] and
|
if (r['direction'] == 'egress' and not r['port_range_max'] and
|
||||||
not r['port_range_min'] and not r['protocol']
|
not r['port_range_min'] and not r['protocol'] and
|
||||||
and not r['remote_ip_prefix']):
|
not r['remote_ip_prefix']):
|
||||||
self._delete('security-group-rules', r['id'])
|
self._delete('security-group-rules', r['id'])
|
||||||
|
|
||||||
def _assert_sg_rule_has_kvs(self, security_group_rule, expected_kvs):
|
def _assert_sg_rule_has_kvs(self, security_group_rule, expected_kvs):
|
||||||
|
|
|
@ -117,9 +117,9 @@ class TestNovaNotify(base.BaseTestCase):
|
||||||
|
|
||||||
elif (previous_port_status in [sql_attr.NO_VALUE,
|
elif (previous_port_status in [sql_attr.NO_VALUE,
|
||||||
n_const.PORT_STATUS_DOWN,
|
n_const.PORT_STATUS_DOWN,
|
||||||
n_const.PORT_STATUS_BUILD]
|
n_const.PORT_STATUS_BUILD] and
|
||||||
and current_port_status in [n_const.PORT_STATUS_ACTIVE,
|
current_port_status in [n_const.PORT_STATUS_ACTIVE,
|
||||||
n_const.PORT_STATUS_ERROR]):
|
n_const.PORT_STATUS_ERROR]):
|
||||||
event_name = nova.VIF_PLUGGED
|
event_name = nova.VIF_PLUGGED
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -170,11 +170,9 @@ class DNSIntegrationTestCase(test_plugin.Ml2PluginV2TestCase):
|
||||||
else:
|
else:
|
||||||
self.assertFalse(dns_data_db['current_dns_domain'])
|
self.assertFalse(dns_data_db['current_dns_domain'])
|
||||||
records_v4 = [ip['ip_address'] for ip in port['fixed_ips']
|
records_v4 = [ip['ip_address'] for ip in port['fixed_ips']
|
||||||
if netaddr.IPAddress(ip['ip_address']).version
|
if netaddr.IPAddress(ip['ip_address']).version == 4]
|
||||||
== 4]
|
|
||||||
records_v6 = [ip['ip_address'] for ip in port['fixed_ips']
|
records_v6 = [ip['ip_address'] for ip in port['fixed_ips']
|
||||||
if netaddr.IPAddress(ip['ip_address']).version
|
if netaddr.IPAddress(ip['ip_address']).version == 6]
|
||||||
== 6]
|
|
||||||
expected = []
|
expected = []
|
||||||
expected_delete = []
|
expected_delete = []
|
||||||
if records_v4:
|
if records_v4:
|
||||||
|
|
3
tox.ini
3
tox.ini
|
@ -148,8 +148,7 @@ commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
|
||||||
# TODO(amotoki) check the following new rules should be fixed or ignored
|
# TODO(amotoki) check the following new rules should be fixed or ignored
|
||||||
# E402 module level import not at top of file
|
# E402 module level import not at top of file
|
||||||
# E731 do not assign a lambda expression, use a def
|
# E731 do not assign a lambda expression, use a def
|
||||||
# W503 line break before binary operator
|
ignore = E125,E126,E128,E129,E265,E402,E731,H404,H405,N530,N534,N536
|
||||||
ignore = E125,E126,E128,E129,E265,E402,E731,W503,H404,H405,N530,N534,N536
|
|
||||||
# H106: Don't put vim configuration in source files
|
# H106: Don't put vim configuration in source files
|
||||||
# H203: Use assertIs(Not)None to check for None
|
# H203: Use assertIs(Not)None to check for None
|
||||||
# H204: Use assert(Not)Equal to check for equality
|
# H204: Use assert(Not)Equal to check for equality
|
||||||
|
|
Loading…
Reference in New Issue