New branch with GLPIClient.py switched from REST to XMLRPC #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi mcphargus,
so as I couldn't resolve the problem of "not authenticated" messages (same as issue #2), and having a working example of a PHP script using xmlrpclib, I decided to spent some time to try switching your class to XMLRPC. Finally, here it is : and it works now on my installation ;)
I've worked on your code, not fargue59's one, because his was not in git repo. I'm not sure about what his "curried" code provides; maybe it will be interesting to merge it at one time.
I've left your code commented for now. You'll can see that the new code seems lighter : no more need of urllib, nor json (but I let you confirm that last point). I've also added a logout function, and updated some others.
Note that ddurieux and remi, most active developers on GLPI-PROJECT and webservice, admit that the XMLRPC server is more stable than REST one. Remi for example is using exclusively XMLRPC.
I've created a branch, I pull it to you if you want to examine the code.
Thanks for attention.