Fix some pylint indentation warnings
Running with a stricter .pylintrc generates a lot of C0330 warnings (hanging/continued indentation). Fix the ones in neutron/scheduler. Trivialfix Change-Id: Ic131cd49307471982b8bd09f823809261d246c0d
This commit is contained in:
parent
ba795c6692
commit
f77c7c9584
|
@ -217,9 +217,9 @@ class DhcpFilter(base_resource_filter.BaseResourceFilter):
|
|||
agent_id = agent.id
|
||||
try:
|
||||
network.NetworkDhcpAgentBinding(
|
||||
context, dhcp_agent_id=agent_id,
|
||||
network_id=network_id,
|
||||
binding_index=binding_index).create()
|
||||
context, dhcp_agent_id=agent_id,
|
||||
network_id=network_id,
|
||||
binding_index=binding_index).create()
|
||||
except exceptions.NeutronDbObjectDuplicateEntry:
|
||||
# it's totally ok, someone just did our job!
|
||||
bound_agents.remove(agent)
|
||||
|
@ -243,7 +243,7 @@ class DhcpFilter(base_resource_filter.BaseResourceFilter):
|
|||
hosted_agents: A list of agents which already hosts the network.
|
||||
"""
|
||||
agents_dict = self._get_network_hostable_dhcp_agents(
|
||||
plugin, context, network)
|
||||
plugin, context, network)
|
||||
if not agents_dict['hostable_agents'] or agents_dict['n_agents'] <= 0:
|
||||
return {'n_agents': 0, 'hostable_agents': [],
|
||||
'hosted_agents': agents_dict['hosted_agents']}
|
||||
|
|
|
@ -140,8 +140,9 @@ class OVNGatewayLeastLoadedScheduler(OVNGatewayScheduler):
|
|||
|
||||
def _select_gateway_chassis(self, nb_idl, candidates):
|
||||
chassis_bindings = nb_idl.get_all_chassis_gateway_bindings(candidates)
|
||||
return [chassis for chassis, load in sorted(chassis_bindings.items(),
|
||||
key=OVNGatewayLeastLoadedScheduler._get_chassis_load)]
|
||||
return [chassis for chassis, load in
|
||||
sorted(chassis_bindings.items(),
|
||||
key=OVNGatewayLeastLoadedScheduler._get_chassis_load)]
|
||||
|
||||
|
||||
OVN_SCHEDULER_STR_TO_CLASS = {
|
||||
|
|
Loading…
Reference in New Issue