'Bind a HA router to agents based on a specific policy.'

def _bind_ha_router(self, plugin, context, router_id, tenant_id, candidates):

    candidates = self._filter_scheduled_agents(plugin, context, router_id, candidates)
    chosen_agents = self._choose_router_agents_for_ha(plugin, context, candidates)
    for agent in chosen_agents:
        self.create_ha_port_and_bind(plugin, context, router_id, tenant_id, agent)
    return chosen_agents
