Remove dead code in L3 HA scheduler
This was removed in I227ca60422545e40d3bbb8baf2b41a8ce14f4294 and it is no longer being exercised. TrivialFix Change-Id: Idf9611675be871fac31d4cf9b4335c7ace911bb1
This commit is contained in:
parent
d2bf790a44
commit
5567ef73bb
@ -317,10 +317,6 @@ class L3Scheduler(object):
|
||||
if ha_net:
|
||||
plugin.safe_delete_ha_network(ctxt, ha_net, tenant_id)
|
||||
|
||||
def get_ha_routers_l3_agents_counts(self, plugin, context, filters=None):
|
||||
"""Return a mapping (router, # agents) matching specified filters."""
|
||||
return plugin.get_ha_routers_l3_agents_count(context)
|
||||
|
||||
def _filter_scheduled_agents(self, plugin, context, router_id, candidates):
|
||||
hosting = plugin.get_l3_agents_hosting_routers(context, [router_id])
|
||||
# convert to comparable types
|
||||
@ -409,23 +405,6 @@ class AZLeastRoutersScheduler(LeastRoutersScheduler):
|
||||
|
||||
return candidates
|
||||
|
||||
def get_ha_routers_l3_agents_counts(self, plugin, context, filters=None):
|
||||
"""Overwrite L3Scheduler's method to filter by availability zone."""
|
||||
all_routers_agents = (
|
||||
super(AZLeastRoutersScheduler, self).
|
||||
get_ha_routers_l3_agents_counts(plugin, context, filters))
|
||||
if filters is None:
|
||||
return all_routers_agents
|
||||
|
||||
routers_agents = []
|
||||
for router, agents in all_routers_agents:
|
||||
az_hints = self._get_az_hints(router)
|
||||
if az_hints and filters['availability_zone'] not in az_hints:
|
||||
continue
|
||||
routers_agents.append((router, agents))
|
||||
|
||||
return routers_agents
|
||||
|
||||
def _choose_router_agents_for_ha(self, plugin, context, candidates):
|
||||
ordered_agents = plugin.get_l3_agents_ordered_by_num_routers(
|
||||
context, [candidate['id'] for candidate in candidates])
|
||||
|
Loading…
x
Reference in New Issue
Block a user