summaryrefslogtreecommitdiffstats
path: root/openstack/common/wsgi.py
Commit message (Collapse)AuthorAgeFilesLines
* Move wsgi module to deprecated packageDoug Hellmann2013-06-071-811/+0
| | | | | | | | | | | | | | | | | | | | | As we are planning to deprecate the wsgi module, move it out of the main openstack/common folder to the new "deprecated" folder. Move some of the middleware classes into the middleware package, since those are still useful and should be maintained. There's still work to do to remove the dependency of the size limit middleware on the Request class in the now deprecated wsgi module. Refer to the mailing list thread at http://lists.openstack.org/pipermail/openstack-dev/2013-May/009666.html for additional details. Change-Id: I05ff583ef37174835393905a3066390f400ffdcf Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
* Enable hacking H402 testSergey Lukjanov2013-06-031-8/+8
| | | | | | H402 one line docstring needs punctuation Change-Id: Ie848453cace318d8310cdf0234c512f4c1121119
* Add Middleware for correlation_idAditi Raveesh2013-05-151-0/+11
| | | | | | | | | | The middleware generates the 'correlation_id' if it is not already present in the request header. This 'correlation_id' can be used to enable more effective debugging of requests that span multiple services. Implements: blueprint create-a-unified-correlation-id Change-Id: Ibc06a5b05b628e0b640e9299c79127ecbf9c684e
* Removes len() on empty sequence evaluationZhongyue Luo2013-05-131-1/+1
| | | | | | PEP8 suggestes, "For sequences, use the fact that empty sequences are false." Change-Id: I4c600a7a6230a55328ee46f7c59f340f37abc18f
* Merge "Convert unicode for python3 portability"Jenkins2013-05-071-1/+2
|\
| * Convert unicode for python3 portabilityChuck Short2013-05-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | From http://docs.python.org/3.1/whatsnew/3.0.html: "Python 3.0 uses the concepts of text and (binary) data instead of Unicode strings and 8-bit strings." Use six.text_type to Type for representing (Unicode) textual data. This is unicode() in Python 2 and str in Python 3. Change-Id: I3da268a714a34a8e626a2590f01b86e414dc3411 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | Improve python3 compatibilityChuck Short2013-05-021-8/+10
|/ | | | | | | | Change print statements so that it works with python3 as well. Change-Id: Iff16b62e4b875c79862c9af7726ea77627aa7b4f Signed-off-by: Chuck Short <chuck.short@canonical.com>
* Merge "Improve Python 3.x compatibility"Jenkins2013-04-221-1/+1
|\
| * Improve Python 3.x compatibilityDirk Mueller2013-04-221-1/+1
| | | | | | | | | | | | | | Mechanical translation of deprecated constructs to 3.x compatible variants. Change-Id: I4988d0ac656903e0d0320aaa8361d4eeb774a0f9
* | Merge "Move wsgi.Service socket creation into the constructor."Jenkins2013-04-221-1/+1
|\ \ | |/ |/|
| * Move wsgi.Service socket creation into the constructor.Kiall Mac Innes2013-03-171-1/+1
| | | | | | | | | | | | | | | | This allows wsgi.Service to be used with service.ProcessLauncher Fixes Bug #1156182 Change-Id: I71714d243c8a1b90c7bc1006ca2ad1e8c4b30e57
* | Allows wsgi server kwargs to be given.Alex Meade2013-03-181-2/+2
|/ | | | | | | | | This fix allows someone using openstack.common.wsgi to pass kwargs down to eventlet.wsgi.server when calling wsgi.run_server. Fixes bug 1156930 Change-Id: Id35232f68ee40c5435e157a834fc94d4bbd04970
* Fix Copyright Headers - Rename LLC to FoundationDavanum Srinivas2013-03-111-1/+1
| | | | | | One code change, rest are in headers Change-Id: I73f59681358629e1ad74e49d3d3ca13fcb5c2eb1
* Port safe parsing with minidom patches from NovaDavanum Srinivas2013-02-261-1/+2
| | | | | | | | Prevent attacks through xml entity expansion etc. Fixes LP# 1100282 Change-Id: I391531deac122697556c282184c8f8890ea66489
* Use oslo-config-2013.1b3Mark McLoughlin2013-02-171-7/+7
| | | | | | | | | | | | | | | The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b3 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Remove the 'deps = pep8==1.3.3' and 'deps = pyflakes' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
* Support for ipv6 in wsgi.ServiceDavanum Srinivas2013-02-031-3/+11
| | | | | | | | | | | Enable wsgi.Service to listen on ipv6 address by checking if the host specified is ipv6. Based on that set the appropriate family in the eventlet.listen api More tests for just the ipv6, ipv6 with app, ipv6+ssl with app to make sure everything is working fine Change-Id: I2772905128bdbc69dd0fafe4ced848f5c477d7c8
* Support for SSL in wsgi.ServiceDavanum Srinivas2013-01-291-5/+60
| | | | | | | | | | | | | | | | | | | | Enable support for SSL as well using code from glance. We have some new options for configuring the SSL support. test_app starts wsgi.Service with a test app, then creates a url to make sure the http requests are actually served properly test_app_using_router adds wsgi.Router and Mapper() to the mix along with using the wsgify annotation for serving the http requests Fixes LP# 979488 (partial) Fixes LP# 869884 (partial) DocImpact Change-Id: Iae47b13b50e00c102c8c36f4a3e73b24fa4e6303
* Fixes "is not", "not in" syntax usage.Zhongyue Luo2013-01-281-1/+1
| | | | | | | | Replaced "not ... is" to "is not" Replaced "not ... in" to "not in" Removed a redundant parenthesis Change-Id: I9564ab1207ccdcb32d7c2bb9e8f29658b2232ff9
* JSONDictSerializer encode objects to unicodeSean McCully2013-01-031-1/+1
| | | | | | | | | | Averts raising ValueError, Circular Reference Detected exception. Add additional test to JSONDictSerializerTest testing that JSONDictSerializer correctly serializes objects into unicode repr. and not raise error Fixes: bug #1089100 Change-Id: Ifdb0562c7c43ab66617dddb65f16f893df2f4895
* Make wsgi.Server comply with service.Launcher interfaceMichael Basnight2012-12-101-7/+12
| | | | | | fixes LP 1087369 Change-Id: Icf222b5bffe1f40a5c325ffe2a1b397f22713c00
* Fixing modulename so eventlet will log properly.Michael Basnight2012-12-031-1/+1
| | | | | | Fixes bug 1086063 Change-Id: I1ebc3243b6db242279b05424c99013dbcf703703
* Use Service thread group for WSGI request handlingDavanum Srinivas2012-11-291-12/+12
| | | | | | | | | | | | | | | - Reuse the pool from thread group in service.Service instead of creating a new green pool - Add ability to control the size of the pool in service.Service - Add a couple of tests for wsgi.Service() to test the size of pool a start/stop as well - Get rid of the wait method by using tg.add_thread - Get rid of pool in wsgi.Service - Added explicit property for host and port Fixes LP #1050379 Change-Id: I40507dc7887fb036ec594bb167cdaa42c278607e
* updating sphinx documentationJoe Heck2012-11-181-3/+3
| | | | | | | | | | * adding openstack theming (copied from keystone project theme) * updating .gitignore to ignore generated API docs * updated formatting in index.rst page * updaed openstack/common/processutils.py to match hacking docstring * updated docstrings to resolve sphinx warnings Change-Id: Ie89afe20eeab1efd2daf440fc65ccdf90f723c51
* Import order clean-upZhongyue Luo2012-10-291-1/+1
| | | | | | Reorder imports by full module path Change-Id: If619b4b50aa052401f7fa65df57b74d4ad1b65a6
* Fix WSGI Service init's call to incorrect super methodKiall Mac Innes2012-10-141-1/+1
| | | | Change-Id: I7554beefafc409a5504b3e33ac31b4394fe46533
* Change wsgi Server class to ServiceAngus Salkeld2012-09-291-18/+28
| | | | | | | | | Also: - use WritableLogger from common/log.py Part of blueprint service-infrastructure Change-Id: If41e592167bd4c308dd2a5d0226fcf3d8318f90d
* Fix missing gettextutils in several modules.Eric Windisch2012-07-121-0/+1
| | | | | | Fixes bug 1021453. Change-Id: I05771a588746a0e43fec0078c5c7152dd9d33b9f
* Switch common files to using jsonutils.Andrew Bogott2012-07-031-3/+3
| | | | | | | | For blueprint use-common-jsonutils Pretty much just a search and replace. Change-Id: I66f63e7b0ff82a37d8a6b9acef94f4e10a45bf90
* PEP8 cleanup (openstack-common)Zhongyue Luo2012-02-111-4/+4
| | | | | | | | | Fixes bug #930625 Remove backslash continuations in openstack-common. Fix type checking taboos. Change-Id: I49ddb9ff5fa5af760dcfccb52cb4793b71e02f19
* Rajaram/Vinkesh | Copied tests for wsgi from nova. Added default ↵Rajaram Mallya2011-09-081-118/+130
| | | | content/accept types in Request which can be overridden by projects. Copied tests for XML serialization of Extension Controller's action from nova
* Rajaram/Vinkesh|Added nova's serializaiton classes into commonRajaram Mallya2011-09-071-66/+418
|
* Rajaram/Vinkesh| restructured wsgi.resource to allow inheriting classes to ↵Rajaram Mallya2011-08-301-9/+16
| | | | override serialization, deserialization and action execution
* Initial skeleton projectJay Pipes2011-07-261-0/+346