From a8f824c8858699bf37c3389dda0f1eeecebfc3c8 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 26 Mar 2014 16:57:39 +0100 Subject: [PATCH] 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 --- files/default/neutron-ha-tool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/default/neutron-ha-tool.py b/files/default/neutron-ha-tool.py index b83d7ac0..0f46991d 100755 --- a/files/default/neutron-ha-tool.py +++ b/files/default/neutron-ha-tool.py @@ -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]