Merge "Enable undefined-loop-variable pylint check"
This commit is contained in:
commit
9ad5e286e6
@ -55,7 +55,6 @@ disable=
|
|||||||
signature-differs,
|
signature-differs,
|
||||||
star-args,
|
star-args,
|
||||||
super-init-not-called,
|
super-init-not-called,
|
||||||
undefined-loop-variable,
|
|
||||||
unnecessary-lambda,
|
unnecessary-lambda,
|
||||||
unnecessary-pass,
|
unnecessary-pass,
|
||||||
unpacking-non-sequence,
|
unpacking-non-sequence,
|
||||||
|
@ -523,15 +523,17 @@ class LinuxBridgeManager:
|
|||||||
'command': 'bridge fdb',
|
'command': 'bridge fdb',
|
||||||
'mode': 'VXLAN UCAST'})
|
'mode': 'VXLAN UCAST'})
|
||||||
return False
|
return False
|
||||||
for segmentation_id in moves.xrange(1, constants.MAX_VXLAN_VNI + 1):
|
|
||||||
|
test_iface = None
|
||||||
|
for seg_id in moves.xrange(1, constants.MAX_VXLAN_VNI + 1):
|
||||||
if not ip_lib.device_exists(
|
if not ip_lib.device_exists(
|
||||||
self.get_vxlan_device_name(segmentation_id)):
|
self.get_vxlan_device_name(seg_id)):
|
||||||
|
test_iface = self.ensure_vxlan(seg_id)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
LOG.error(_LE('No valid Segmentation ID to perform UCAST test.'))
|
LOG.error(_LE('No valid Segmentation ID to perform UCAST test.'))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
test_iface = self.ensure_vxlan(segmentation_id)
|
|
||||||
try:
|
try:
|
||||||
utils.execute(
|
utils.execute(
|
||||||
cmd=['bridge', 'fdb', 'append', constants.FLOODING_ENTRY[0],
|
cmd=['bridge', 'fdb', 'append', constants.FLOODING_ENTRY[0],
|
||||||
|
@ -158,12 +158,13 @@ def _get_first_ip_from_port(port):
|
|||||||
|
|
||||||
def _get_server_health_option(config):
|
def _get_server_health_option(config):
|
||||||
"""return the first active health option."""
|
"""return the first active health option."""
|
||||||
for monitor in config['healthmonitors']:
|
for m in config['healthmonitors']:
|
||||||
# not checking the status of healthmonitor for two reasons:
|
# not checking the status of healthmonitor for two reasons:
|
||||||
# 1) status field is absent in HealthMonitor model
|
# 1) status field is absent in HealthMonitor model
|
||||||
# 2) only active HealthMonitors are fetched with
|
# 2) only active HealthMonitors are fetched with
|
||||||
# LoadBalancerCallbacks.get_logical_device
|
# LoadBalancerCallbacks.get_logical_device
|
||||||
if monitor['admin_state_up']:
|
if m['admin_state_up']:
|
||||||
|
monitor = m
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
return '', []
|
return '', []
|
||||||
|
Loading…
Reference in New Issue
Block a user