QMF Python API inappropriately enforces schema
----------------------------------------------
Key: QPID-3653
URL: https://issues.apache.org/jira/browse/QPID-3653
Project: Qpid
Issue Type: Bug
Components: Qpid Managment Framework
Affects Versions: 0.12
Environment: Fedora 15, not that it matters.
Reporter: Zane Bitter
Assignee: Ted Ross
Priority: Minor
Fix For: 0.14
When calling a method from the Python QMF API, the number of arguments provided
is checked against the schema and an exception raised if they do not match.
This means that there is no way to update a schema (e.g. by adding new,
optional parameters to a command) without also breaking existing Python console
scripts.
Note that the C++ implementation has no such restriction, so there is no
technical reason for it.
This check should be removed for the case where there are fewer arguments
provided than specified by the schema. The checking of keyword arguments is
currently pretty limited - e.g. they may overlap with positional arguments, or
may be for fields not present in the schema (in both cases they are ignored).
Ideally, additional keyword arguments beyond the ones present in the schema
should also be allowed (this _appears_ to be possible; I don't see the schema
being used to identify the parameter's type, so I assume it is inferred). This
would allow new scripts to continue to talk to both new and old agents without
having to check the schema.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]