Do not select inactive l3 agent in L3AgentSchedulerTestJSON

There may be some inactive l3 agents in the system, because the
system won't delete l3 agent records that ever registered,
even if they are no longer valid.

So this is to choose only active l3 agent in resource_setup,
otherwize the testcase will fail unexpectedly because we happened
to choose an inactive l3 agent.

Change-Id: Ie14cafc883c92e791ce866d548e166702bed3d0b
diff --git a/tempest/api/network/admin/test_l3_agent_scheduler.py b/tempest/api/network/admin/test_l3_agent_scheduler.py
index 1a7b0ec..206d867 100644
--- a/tempest/api/network/admin/test_l3_agent_scheduler.py
+++ b/tempest/api/network/admin/test_l3_agent_scheduler.py
@@ -51,7 +51,8 @@
         agents = cls.admin_agents_client.list_agents(
             agent_type=AGENT_TYPE)['agents']
         for agent in agents:
-            if agent['configurations']['agent_mode'] in AGENT_MODES:
+            if (agent['configurations']['agent_mode'] in AGENT_MODES and
+                agent['alive']):
                 cls.agent = agent
                 break
         else: