diff options
| author | Carl C. Trieloff <cctrieloff@apache.org> | 2007-12-14 20:22:30 +0000 |
|---|---|---|
| committer | Carl C. Trieloff <cctrieloff@apache.org> | 2007-12-14 20:22:30 +0000 |
| commit | 4930af608c6763a41eed4985bb5460a7bf8eb6b9 (patch) | |
| tree | b62c6e1dde2db62aaf9553ecb79e1a6f5d35dc32 /python/qpid/management.py | |
| parent | 5c65e1c2269ae3257010a7a3cbbc4bb57fff2053 (diff) | |
| download | qpid-python-4930af608c6763a41eed4985bb5460a7bf8eb6b9.tar.gz | |
patch from tross
QPID-706
Added implementation for the "Call" command to invoke methods on management objects.
Fixed a bug in qpid/management.py caused by replies to methods with no arguments.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@604286 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/management.py')
| -rw-r--r-- | python/qpid/management.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/python/qpid/management.py b/python/qpid/management.py index 8373ecceb7..1c8b3cd840 100644 --- a/python/qpid/management.py +++ b/python/qpid/management.py @@ -108,7 +108,7 @@ class ManagementMetadata: configs = [] insts = [] - methods = [] + methods = {} events = [] configs.append (("id", 4, "", "", 1, 1, None, None, None, None, None)) @@ -195,7 +195,7 @@ class ManagementMetadata: arg = (name, type, dir, unit, desc, min, max, maxlen, default) args.append (arg) - methods.append ((mname, mdesc, args)) + methods[mname] = (mdesc, args) self.schema[(className,'C')] = configs @@ -297,18 +297,19 @@ class ManagedBroker: return (userSequence, className, methodName) = data + args = {} if status == 0: ms = self.metadata.schema[(className,'M')] arglist = None - for (mname, mdesc, margs) in ms: + for mname in ms: + (mdesc, margs) = ms[mname] if mname == methodName: arglist = margs if arglist == None: msg.complete () return - args = {} for arg in arglist: if arg[2].find("O") != -1: args[arg[0]] = self.metadata.decodeValue (codec, arg[1]) @@ -379,7 +380,8 @@ class ManagedBroker: ms = self.metadata.schema[(className,'M')] arglist = None - for (mname, mdesc, margs) in ms: + for mname in ms: + (mdesc, margs) = ms[mname] if mname == methodName: arglist = margs if arglist == None: |
