diff options
-rw-r--r-- | qpid/python/qmf/console.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/qpid/python/qmf/console.py b/qpid/python/qmf/console.py index 6b0826f37d..fe329db289 100644 --- a/qpid/python/qmf/console.py +++ b/qpid/python/qmf/console.py @@ -302,10 +302,17 @@ class Session: if agent.broker.isConnected(): agentList.append(agent) else: - for broker in brokerList: - for agent in broker.getAgents(): - if agent.broker.isConnected(): - agentList.append(agent) + if "_objectId" in kwargs: + oid = kwargs["_objectId"] + for broker in brokerList: + for agent in broker.getAgents(): + if agent.getBrokerBank() == oid.getBrokerBank() and agent.getAgentBank() == oid.getAgentBank(): + agentList.append(agent) + else: + for broker in brokerList: + for agent in broker.getAgents(): + if agent.broker.isConnected(): + agentList.append(agent) if len(agentList) == 0: return [] |