diff options
author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-07-09 13:46:16 +0000 |
---|---|---|
committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-07-09 13:46:16 +0000 |
commit | 569e13753815e8d63c1eb9003922196d2624623b (patch) | |
tree | a1a5808bab5df7a6eca2d6c2044ea364965e6f1a /tools/src/py/qpid-tool | |
parent | 9843fe043b66004bf183a38a0d3d48627c7ec086 (diff) | |
download | qpid-python-569e13753815e8d63c1eb9003922196d2624623b.tar.gz |
bugfix: convert v1 oid's when calling v2 agent
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@962526 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tools/src/py/qpid-tool')
-rwxr-xr-x | tools/src/py/qpid-tool | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/src/py/qpid-tool b/tools/src/py/qpid-tool index e5affec74d..8ec5922539 100755 --- a/tools/src/py/qpid-tool +++ b/tools/src/py/qpid-tool @@ -28,7 +28,7 @@ from shlex import split from threading import Lock from qpid.disp import Display from qpid.peer import Closed -from qmf.console import Session, Console, SchemaClass +from qmf.console import Session, Console, SchemaClass, ObjectId class Mcli(Cmd): """ Management Command Interpreter """ @@ -265,7 +265,15 @@ class QmfData(Console): finally: self.lock.release() - self.session._sendMethodRequest(self.broker, obj.getClassKey(), obj.getObjectId(), methodName, args) + object_id = obj.getObjectId(); + if not object_id.isV2 and obj.getAgent().isV2: + object_key = ",".join([str(v) for p, v in obj.getProperties() if p.name != "vhostRef" and p.index == 1]) + class_key = obj.getClassKey(); + object_name = class_key.getPackageName() + ":" + class_key.getClassName() + ":" + object_key + object_id = ObjectId.create(object_id.agentName, object_name) + + self.session._sendMethodRequest(self.broker, obj.getClassKey(), object_id, methodName, args) + def do_exit(self): pass |