Suppresses a warning when no agents are configured
Change-Id: Ia8dbf83ce1cdd66d1e0a3e42e8ce216377a61adf Closes-Bug: #1492773
This commit is contained in:
parent
ee42af1011
commit
4cb60587a4
|
@ -390,6 +390,9 @@ class DhcpAgentSchedulerDbMixin(dhcpagentscheduler
|
|||
self._filter_bindings(context, down_bindings)]
|
||||
agents = self.get_agents_db(
|
||||
context, {'agent_type': [constants.AGENT_TYPE_DHCP]})
|
||||
if not agents:
|
||||
# No agents configured so nothing to do.
|
||||
return
|
||||
active_agents = [agent for agent in agents if
|
||||
self.is_eligible_agent(context, True, agent)]
|
||||
if not active_agents:
|
||||
|
|
Loading…
Reference in New Issue