def get_number_of_agents_for_scheduling(self, context):
num_agents = len(self.get_l3_agents(context, active=True,<EOL>filters={'<STR_LIT>': [bc.constants.L3_AGENT_MODE_LEGACY,<EOL>bc.constants.L3_AGENT_MODE_DVR_SNAT]}))<EOL>max_agents = cfg.CONF.max_l3_agents_per_router<EOL>if max_agents:<EOL><INDENT>if max_agents > num_agents:<EOL><INDENT>LOG.info("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>", num_agents)<EOL><DEDENT>else:<EOL><INDENT>num_agents = max_agents<EOL><DEDENT><DEDENT>return num_agents<EOL>
Return number of agents on which the router will be scheduled.