Some print calls were polluting the standard output with debugging
information. These prints are now converted to logging.debug calls
so that they are disabled by default.
Closes-Bug: #1426439
Change-Id: I42f3ca62b55a980839cc0cb481f33fea3cd22afe
This patch is extending the Response object and the Pecan extension
to make it possible to return a non-default return type (just like it
already supports retuning a non default status code).
This is useful when the return code of a function is 204 (No Response) for
that case we automatically set the return_type to be None and guarantee
that the response body is empty and the content-lentgh is 0. Which if
not done can cause tools consuming the API to misbehave.
Change-Id: I629c3e2d5dc169154e5af044f1b8f804e4b87e23
Originally, if WSME received an Accept or Content-Type header that
was not aligned with what it was prepared to handle it would error
out with a 500 status code. This is not good behavior for a web
service.
In the process of trying to fix this it was discovered that the
content-negotiation code within WSME (the code that, in part,
looks for a suitable protocol handler for a request) and tests of
that code are incorrect, violating expected HTTP behaviors. GET
requests are passing Content-Type headers to declare the desired
type of representation in the response. This is what Accept is for.
Unfortunately the server-side code was perfectly willing to accept
this behavior. These changes correct that.
Closes-Bug: 1419110
Change-Id: I2b5c0075611490c047b27b1b43b0505fc5534b3b
If there are side effects associated with the location of these
imports, the tests don't cover it, so we can only hope.
Change-Id: I86e9754ff96ed881515fb0c8f9997acff740471d
* fixed a small issue with binding
* fix for python2.6 when iterating over input msg
(if the processed element is a comment - skip it)
* import print function (because it is used
here in this form)
* fix minOccurs for non mandatory arguments
* operation namespace fix
- https://bugs.launchpad.net/wsme/+bug/1235238
- https://groups.google.com/forum/#!topic/python-wsme/gVzogTZlC7w
Change-Id: I2d237e04f27f8acd912cc8e2eb27d12ff72ebd04
Added custom error status code for ClientSideError
exception instead of hardcoded value 400.
Fixed case when user exception with client error code
formatted as server error.
Pecan extension fixed.
Change-Id: I2663db0aa88538b722eb2783d130585b0fc2335b
This remove the Sphinx environment and makes sure we run its test for
all Python version. This therefore fixes the test for Python 3.3.
Change-Id: Iba431e837d2b23761905155ff65ae909774ce0b2
This change allow to use [] or {} for the definition of the body in rest
protocols.
Fixes bug #1233219
Change-Id: Ib96f0487dd7d78bd657f6d4b3facbd8b611f8702
- Makes sure we always run Pecan test and that there's no regression.
There's no real need to split them out as they are not invasive.
Also that reduces the number of environment a bit.
- This also fixes Pecan tests on python2.6
- This also fixes Pecan tests on python3.3
- This also enables Pecan tests on python3.2
Change-Id: I57070b0bd785fb3d445f432973f15825abccbdd5
For this purposes I added addiitional processing of original
exceptions at wsme/wsmeext/pecan.py. For exception's validation
special validator was added to wsme/wsmeext/utils.py. Also
functionality was reworked to be compatible with python3.3
Fixes bug#1214073
Change-Id: Ib1cd0b274bda11f62298848ebcd55b3f6641757c