'Return a list of active dhcp agents.'

def _get_active_agents(self, plugin, context, az_hints):

    with context.session.begin(subtransactions=True):
        filters = {'agent_type': [constants.AGENT_TYPE_DHCP], 'admin_state_up': [True]}
        if az_hints:
            filters['availability_zone'] = az_hints
        active_dhcp_agents = plugin.get_agents_db(context, filters=filters)
        if (not active_dhcp_agents):
            LOG.warning(_LW('No    more    DHCP    agents'))
            return []
    return active_dhcp_agents
