summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge "Handle ints passed to `boolean_from_string`"Jenkins2013-05-112-6/+21
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Handle ints passed to `boolean_from_string`Rick Harris2013-05-102-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing code would return True for '1' but False for int(1), unlike Nova's version which would return True for both inputs. Nova's version feels safer (i.e. it will do the most-likely-correct thing if an int is passed in), so this patch changes Openstack-Common's version to match. Note that this patch does not make Openstack-Common's `boolean_from_string` match Nova's `bool_from_string` exactly though. Nova's version would return True for both '42' and 42, while Openstack-Common's returns False. Though Nova's version, again, seems safer, the presence of unit-tests in Openstack-Common asserting the defined-correctness of this behavior makes me reluctant to change it. Fixes bug 1178760 Change-Id: I8b2a31c4852884187bcbda3a4e78c8513b1bb8c8
* | | | | Merge "Removes leading zeros on integers in test_timeutils"Jenkins2013-05-101-13/+13
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Removes leading zeros on integers in test_timeutilsZhongyue Luo2013-05-101-13/+13
| |/ / / | | | | | | | | | | | | Change-Id: If1cb92ba0ff1a57ab8940d9f9e1fe66ffd34441a
* | | | Merge "Added convenience APIs for lockutils"Jenkins2013-05-102-0/+45
|\ \ \ \
| * | | | Added convenience APIs for lockutilsZhongyue Luo2013-05-092-0/+45
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lock_file_prefix for each project doesn't need to be configurable or frequently changed. This patch provides a convenience API which returns a partial object of the synchronized decorator to avoid passing the prefix each time locks are used. The set_defaults method is also provided to change the default value of lock_path when needed. Fixes bug #1065524 Change-Id: I7b67f0a482da4be6d53a70db5bbd22dc91bdc10c
* | | | Merge "Convert unicode strings for python3 portability"Jenkins2013-05-104-56/+45
|\ \ \ \
| * | | | Convert unicode strings for python3 portabilityChuck Short2013-05-075-56/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From http://docs.python.org/3.1/whatsnew/3.0.html You can no longer use u"..." literals for Unicode text. However, you must use b"..." literals for binary data. Use python-six to make this migration easier. Change-Id: I95166a07f4edf33be55a4bdf2674c2f238a06f19 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | | | | Merge "Stylistic improvements from quantum-rootwrap"Jenkins2013-05-102-15/+13
|\ \ \ \ \
| * | | | | Stylistic improvements from quantum-rootwrapThierry Carrez2013-05-092-15/+13
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the convergence effort between oslo-rootwrap and quantum-rootwrap, import stylistic improvements introduced in quantum-rootwrap, like: - HACKING-compliant docstrings - More elegant return construct from match_filter in filters.py - Remove overridden use of filters in wrapper.py Change-Id: I49a97271b1c385feb25adf4f62add5c71962b5dd
* | | | | Merge "Adds timeutils and uuidutils maintainer"Jenkins2013-05-101-4/+4
|\ \ \ \ \
| * | | | | Adds timeutils and uuidutils maintainerZhongyue Luo2013-05-071-4/+4
| | |_|/ / | |/| | | | | | | | | | | | | Change-Id: I233de16bed565bbe37950503e8b62890f9b4c1d1
* | | | | Merge "Import trycmd and ssh_execute from nova."Jenkins2013-05-102-0/+151
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Import trycmd and ssh_execute from nova.Michael Still2013-05-072-0/+151
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | This change required adding basic unit tests as well as these were both untested in nova. Change-Id: If6843e57810198aab3c61f9eb3c3a6f42f710f7c
* | | | Merge "Copy Nova's workaround for RHEL6 eventlet issue"Jenkins2013-05-085-4/+68
|\ \ \ \ | |_|_|/ |/| | |
| * | | Copy Nova's workaround for RHEL6 eventlet issueMark McLoughlin2013-05-085-4/+68
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The eventlet on PyPI basically doesn't work on RHEL because we (Red Hat) screwed up by not taking monkey patching into account when backporting an API from python 3. This is the series of events: 1) We backported a patch to RHEL6 from Python 3 which added an optional 'timeout' argument to subprocess.Popen: http://pkgs.devel.redhat.com/cgit/rpms/python/commit/?h=rhel-6.3&id=fc9a3f0e07 This might sound innocuous but it means the wait() function get called with a timeout argument 2) eventlet overrides this function, but doesn't know about the timeout argument, so it fails. To reproduce, try applying this to your python 2.7: https://gist.github.com/markmc/5500967 3) eventlet doesn't yet support Python 3, so the only time this issue crops up is if you use eventlet on RHEL6 4) We've fixed eventlet in EPEL6, but the issue still remains if you install eventlet from upstream 5) Dave Malcolm sent a pull request to eventlet, but it has stalled: https://bitbucket.org/eventlet/eventlet/pull-request/30/add-dummy-timeout-parameter-to Nova has long had a nasty workaround to patch eventlet in our virtualenv and we now need this workaround in oslo-incubator to test processutils. Let's add it here and make nova sync it from oslo-incubator. I really hope we can get eventlet upstream "fixed" and the fix released soon. When that happens, we can kill all this nastiness. Change-Id: I62ce43a330d7ae94eda4c7498782a655e63747fa
* | | Merge "Convert unicode for python3 portability"Jenkins2013-05-079-18/+34
|\ \ \ | |/ / |/| |
| * | Convert unicode for python3 portabilityChuck Short2013-05-069-18/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge "Add test coverage for sqlite regexp function"Jenkins2013-05-031-1/+58
|\ \ \
| * | | Add test coverage for sqlite regexp functionMark McLoughlin2013-05-021-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some tests which for the regexp function which we install for sqlite. Need test coverage to catch e.g. a regression of the fix for bug #1031846. Change-Id: I4bd77d0d93c4fc85588e6e6d5a559e68133dbf73
* | | | Merge "Deprecate log_format and change default to None"Jenkins2013-05-032-14/+34
|\ \ \ \
| * | | | Deprecate log_format and change default to NoneAndrew Laski2013-05-012-14/+34
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3e71cc4c8c7e08784f44c2e337a585e562b93ec5 fixed an issue with ignoring log_format, but changed the default logging formatter. This led to being unable to use the former context aware formatter without configuring log_format='' explicitly. This change sets log_format to None so that the default is a context aware formatter, but setting log_format works as intended. Additionally, since log_format is mutually exclusive with some of the other config formatting options, such as logging_default_format_string, it should be deprecated. Bug 1167388 Change-Id: I281ed7fe3448403f27a4cd318fc21915027906cc
* | | | Merge "Update processutils."Jenkins2013-05-032-12/+141
|\ \ \ \
| * | | | Update processutils.Michael Still2013-05-032-12/+141
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is another example of something which was imported from nova but where nova was never moved across to use the oslo version. The code has since diverged. This review syncs up the two versions, and will be followed by a nova review to move nova across to the oslo implementation. Unit test coverage for this new version is 83%. I want to improve that, but I'll do it in a later review. I will also need to update cinder, quantum and nova to this new version of the code once this merges. I will do moniker as well because I am a nice guy. Change-Id: Ie0731c56c9aab547b5d5b905bf4ed8eff3eae3bd
* / | | Improve python3 compatibilityChuck Short2013-05-025-31/+41
|/ / / | | | | | | | | | | | | | | | | | | | | | Change print statements so that it works with python3 as well. Change-Id: Iff16b62e4b875c79862c9af7726ea77627aa7b4f Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | | I'll maintain periodic_task as well.Michael Still2013-05-021-2/+2
| | | | | | | | | | | | | | | | | | I missed this one in the previous pass. Change-Id: I6be4610859f1e716e7b77a850c4b3080d7a154ce
* | | Mark myself as a maintainer.Michael Still2013-05-021-6/+6
|/ / | | | | | | | | | | | | I've been cleaning up these three modules, so I may as well be their maintainer as well. This was briefly discussed at the summit. Change-Id: I3282eee857c89d3b91e5d3bdb42694c1497219a9
* | Merge "Use optparse for install_venv_common"Jenkins2013-05-011-7/+10
|\ \
| * | Use optparse for install_venv_commonRick Harris2013-05-011-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | In order to bootstrap a virtualenv from an unmodified 2.6 Python environment, we need to use optparse instead of argparse or openstack.common.cfg. Fixes bug 1174926 Change-Id: Iad636c7adf7b184756eeba5ca760d8a76fc0e354
* | | Use range rather than xrangeChuck Short2013-05-013-4/+4
| |/ |/| | | | | | | | | | | | | Use range rather than xrange to improve python3 compatibiltiy. Change-Id: I5a4434bbd2e5d509f84c3aa668eea8e46262816f Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | Ensure that qpid connection is closed.Gary Kotton2013-05-011-6/+7
|/ | | | | | | | | Fixes bug 1172922 When reestablishing a session and a connection already exists the existing connection will be closed prior to opening the new one. Change-Id: I9a25800fe4b56eba89d550e3461ce095bf902f0a
* Do not import openstack.common.log in strutilsAlessio Ababilov2013-04-291-5/+0
| | | | | | | | | | | | strutils imports openstack.common.log that depends on notifier, rpc, eventlet, etc. This import was inherited from old utils.py and is not used in strutils. All these numerous dependencies are not desirable in such small projects as novaclient that needs strutils only. Change-Id: I7761fb53ab58bd8801448c56648dace14ca7dc89 Fixes: bug #1174215
* Merge "Support for lazily instantiated loggers"Jenkins2013-04-282-7/+52
|\
| * Support for lazily instantiated loggersDavanum Srinivas2013-04-092-7/+52
| | | | | | | | | | | | | | | | | | | | | | | | As part of code review for LP #1161031, there was a suggestion to lazily instantiate the logger in oslo. The use case was when creating LOG at a module level when we have not yet called logging.setup, we needed a way to delay creating actual loggers Added a handlers property in ContextAdapter so the existing testcase can be used for lazy loggers as well Change-Id: Iae2e379f8a0d2d38836645e7648294dee97deaaa
* | Add support to clear DBGary Kotton2013-04-251-0/+11
| | | | | | | | | | | | | | | | | | Fixes bug 1171740 The method cleanup() can be called when a test is complete, for example in the tearDown method. Change-Id: Id30bcb0d7ef167f6cb3b1bdea06f6421e1234a86
* | Merge "Proposing Flavio Percoco as maintainer for strutils.py"Jenkins2013-04-261-2/+2
|\ \
| * | Proposing Flavio Percoco as maintainer for strutils.pyFlaper Fesp2013-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | I'd like to propose myself as maintainer for strutils. My last contribution to this module is the safe_encode / safe_decode patch currently being used by other projects throughout OpenStack. Change-Id: I0e404e068ba8807ceb242ae5b90dbd26bdac1e22
* | | Merge "oslo logging tries to run chmod on file"Jenkins2013-04-261-10/+1
|\ \ \ | |/ / |/| |
| * | oslo logging tries to run chmod on fileMichael Kerrin2013-04-241-10/+1
| | | | | | | | | | | | | | | | | | | | | It should not be the responsibility of oslo to manage log files like this. Change-Id: I8397a8799a08acd1f0c43de57f3b39b9389f1cd8
* | | Merge "Avoid calling sudo in install_venv_common.py."Jenkins2013-04-241-6/+2
|\ \ \
| * | | Avoid calling sudo in install_venv_common.py.Dan Prince2013-04-231-6/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates our common venv installation routine so that it no longer attempts to automatically install missing RPM packages via sudo and instead just prints an error message and dies. The primary motivation here was to avoid sudo altogether since some people would rather not have the test suite run these sorts of systems admin commands for them. Change-Id: I350e5421a4dd3094217270d39547acaea0aeda3b
* | | Merge "Add middleware to limit size of HTTP requests."Jenkins2013-04-242-0/+184
|\ \ \
| * | | Add middleware to limit size of HTTP requests.Dan Prince2013-04-232-0/+184
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Adds a new RequestBodySizeLimiter middleware to guard against really large HTTP requests. The default max request size is 112k although this limit is configurable via the 'max_request_body_size' config parameter. Change-Id: I76248feed5c77f678b8a43f364d4f1e0794ab910
* | | Merge "Add enforcement for foreign key contraints with sqlite"Jenkins2013-04-241-5/+22
|\ \ \
| * | | Add enforcement for foreign key contraints with sqliteGary Kotton2013-04-221-5/+22
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 1171732 When creating an engine the called can indicate whether or not to enforce the constraints for sqlite. Change-Id: I1d5820376f60388c084afea500f807cd25541800
* | | Merge "Add missing LICENSE file"Jenkins2013-04-241-0/+204
|\ \ \
| * | | Add missing LICENSE fileDavanum Srinivas2013-04-231-0/+204
| |/ / | | | | | | | | | | | | | | | Don't we need one? Change-Id: I2b8cdf40dd9493db1f497893939f897c06337c04
* / / Add a MAINTAINERS fileMark McLoughlin2013-04-231-0/+281
|/ / | | | | | | | | | | | | | | | | | | | | | | Following on from discussions at the summit, add a file which explains the idea of oslo-core being a group of generalists and that each API in the incubator should have a specialist maintainer. I've made a quick stab at capturing the status of APIs where its most obvious. I'm thinking we let people submit changes to add themselves to the file so they're on record saying "I'll maintain this". Change-Id: I5e67f94dc77f14849dea425dec51896fed0d07ef
* | Merge "Revert common logging use in rootwrap"Jenkins2013-04-221-6/+3
|\ \
| * | Revert common logging use in rootwrapThierry Carrez2013-04-221-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert recent plug of common logging into rootwrap, as it breaks rootwrap logging. Rootwrap does not make use of oslo logging and oslo config in order to reduce the surface of code run as root. See https://review.openstack.org/#/c/26468/ for discussion. Change-Id: I276ade164a902d091f9aafab79bbd4cc189588eb