neutron-ha-tool: Fix return values of agent_(alive|dead)_id_list
Both function are supposed to return a list of agent_ids not a list of agents.
Seems this got introduced by the recent code clean up (1ab0e472
).
Change-Id: I3b4ef33deed7bff5f40787785077fb473b2bd0c3
This commit is contained in:
parent
c202bb725f
commit
a8f824c885
|
@ -456,7 +456,7 @@ def agent_alive_id_list(agent_list, agent_type):
|
|||
:param agent_list: API response for list_agents()
|
||||
|
||||
"""
|
||||
return [agent for agent in agent_list
|
||||
return [agent['id'] for agent in agent_list
|
||||
if agent['agent_type'] == agent_type and agent['alive'] is True]
|
||||
|
||||
|
||||
|
@ -467,7 +467,7 @@ def agent_dead_id_list(agent_list, agent_type):
|
|||
:param agent_list: API response for list_agents()
|
||||
|
||||
"""
|
||||
return [agent for agent in agent_list
|
||||
return [agent['id'] for agent in agent_list
|
||||
if agent['agent_type'] == agent_type and agent['alive'] is False]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue