Issue 1683332
Created on 2007-03-19 01:27 by stefan, last changed 2009-02-13 16:31 by stefan.
Files | ||||
---|---|---|---|---|
File name | Uploaded | Description | Edit | Remove |
xmlrpc.tgz | stefan, 2007-03-20 19:07 |
Messages | |||
---|---|---|---|
msg3463 | Author: [hidden] (stefan) | Date: 2007-03-19 01:27 | |
Please find attached a first attempt at an xmlrpc interface to roundup. The goal is to provide the same functionality as roundup_admin, but remotely. The code doesn't yet provide any authentication, but I believe that can be added fairly easily, either by means of cookies, or some other mechanism. Let me know how you think this should evolve to become ready for inclusion into the repository. |
|||
msg3464 | Author: [hidden] (richard) | Date: 2007-03-19 03:33 | |
Cool. I'd expect that before it's checked in: 1. it'd include HTTP Basic Auth at a minimum, 2. there'd be some unit tests accompanying it, and 3. the file would be split into two: a thin wrapper script and a module that's installed as part of roundup's library. |
|||
msg3465 | Author: [hidden] (stefan) | Date: 2007-03-19 10:40 | |
Thanks for the quick feedback. Will be back once your points are addressed. |
|||
msg3466 | Author: [hidden] (stefan) | Date: 2007-03-20 00:00 | |
Please find attached a new patch. It addresses points 1. (authentication) and 3. (splitting the code into a proper module and a script). I'd like to ask for some assistance with the tests. Should I spawn a subprocess for the server, and then run the client from within the test class ? Or try to do everything from within the same process ? (I'm making my way through roundup's testing harness through trial-and-error...) THanks File Added: xmlrpc.tgz |
|||
msg3467 | Author: [hidden] (richard) | Date: 2007-03-20 02:45 | |
For testing I'd invoke the methods directly rather than going through a server/XML-RPC layer. No need to test that layer as it's tested elsewhere. |
|||
msg3468 | Author: [hidden] (stefan) | Date: 2007-03-20 19:07 | |
Please find attached an updated patch, containing: * the latest roundup.xmlrpc module * a 'roundup_xmlrpc_server.py' driver script * a set of tests The test suite contains two 'test cases': * direct accesses to all methods, expected to pass * authentication tests expected to fail However, the second test does not fail, and I don't quite understand why: a new user changes the 'realname' of the admin user. I have looked at the generated schema.py file, and it looks as if this shouldn't be allowed. What am I missing ? Other than that, is anything missing before this can be integrated ? (I hereby promise to be available for any maintainence or future work that may be required, incl. documentation, etc. :-) ) Thanks ! File Added: xmlrpc.tgz |
|||
msg3469 | Author: [hidden] (richard) | Date: 2007-03-22 01:30 | |
Just one minor nit: some of the lines in the code are >75 chars long. This includes the script usage help. Also I prefer not to have whitespace directly after "def" lines. The do_POST handling of "invalid challenge" could do something more useful. At the moment it'll raise a strange exception ("NoneType has no attribute split", I believe. Either completely squash the exception or let it be raised (I'd prefer the latter as it would aid debugging if the situation ever arose). |
|||
msg3470 | Author: [hidden] (richard) | Date: 2007-03-22 01:31 | |
Oh yes, and a patch to the docs would be appreciated. Perhaps a new section for the customisation doc? |
|||
msg3471 | Author: [hidden] (stefan) | Date: 2007-03-22 01:57 | |
What about the unexpected pass in the second test ? Why can 'joe' change properties of the 'admin' user ? (I will just remove that test for now, but would like to make sure Unauthorized exceptions are properly forwarded to the client.) Yes, I'll look into a patch to the docs. Why customization.txt ? Isn't this more about features.txt (it's an additional interface...) ? Thanks |
|||
msg3472 | Author: [hidden] (richard) | Date: 2007-03-22 02:36 | |
Please reinstate the failing test. It needs to be adressed. |
|||
msg3473 | Author: [hidden] (stefan) | Date: 2007-03-22 02:50 | |
Done. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2009-02-13 16:31:57 | stefan | set | status: open -> closed assignee: richard -> stefan resolution: fixed |
2007-03-19 01:27:13 | stefan | create |