summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge "Add DynamicLoopCall timers to ThreadGroups"Jenkins2013-05-161-0/+50
|\ \ \
| * | | Add DynamicLoopCall timers to ThreadGroupsBrian Elliott2013-05-091-0/+50
| |/ / | | | | | | | | | Change-Id: I99a67355a7af054c17d3f6807609dbb11ad40631
* | | Merge "Remove the notifier and its dependencies from log.py"Jenkins2013-05-161-1/+2
|\ \ \
| * | | Remove the notifier and its dependencies from log.pyDavanum Srinivas2013-05-141-1/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Move the code related to the publish error handler out of the log module so its easier for other projects to consume it Fixes LP #1179528 Change-Id: Ibf28ba17f81b5ddeda653f6a3501ecac18ffcd42
* | | Merge "Fixes import order nits"Jenkins2013-05-168-8/+8
|\ \ \
| * | | Fixes import order nitsZhongyue Luo2013-05-158-8/+8
| | |/ | |/| | | | | | | Change-Id: I4fdc8eed74dd90d6450864daba7492d5e7266448
* | | Merge "Update KillFilter to stop at '\0' for readlink() function."Jenkins2013-05-161-0/+12
|\ \ \
| * | | Update KillFilter to stop at '\0' for readlink() function.Yufang Zhang2013-05-151-0/+12
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python's readlink() implementation doesn't stop at '\0' when reading file path. Thus after dnsmasq upgrade, it may return something like '/usr/sbin/dnsmasq\03453 (deleted)', while C's or Shell's readlink() return '/usr/sbin/dnsmasq'. This patch fixes this problem by cutting the readlink() results with '\0', so that KillFilter could get correct path. Bug 1179793 Change-Id: I7354941e0508e019c8c9b63b87ad39f52ccb51ca
* | | Support capping message versions in the client.Russell Bryant2013-05-151-0/+6
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a rolling upgrade, we need to be able to tell all rpc clients to hold off on sending newer versions of messages until all nodes understand the new message version. This patch adds the oslo component of this. It's quite simple. The rpc proxy just stores the version cap and will raise an exception if code ever tries to send a message that exceeds this cap. Allowing the cap to be configured and generating different types of messages based on the configured value is the hard part here, but that is left up to the project using the rpc library. Implements blueprint rpc-version-control. Change-Id: Ia69db03a80dc3b1c63d52c7e163ea3cfec80c882
* | Merge "Add 't', 'y', and `strict` to `bool_from_string`"Jenkins2013-05-151-0/+61
|\ \ | |/ |/|
| * Add 't', 'y', and `strict` to `bool_from_string`Rick Harris2013-05-141-0/+61
| | | | | | | | | | | | | | | | | | | | | | 't' and 'y' are commonly used for booleans as well, and since it's used in Nova already, probably makes sense to add common support for it. `strict` allows callers to detect anonmolous values so they can be handled separately. This is particularly useful when parsing input from API calls where bad values might result in 4XX errors instead of being treated as False. Change-Id: I6218a1895f72cfbfd81776602e63ca3d093475e0
* | Merge "Renames filter to base_filter and weight to base_weight"Jenkins2013-05-132-2/+132
|\ \ | |/ |/|
| * Renames filter to base_filter and weight to base_weightMatthew Sherborne2013-05-102-2/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filter is a python builtin function so importing it pollutes ones name space. It is now renamed to base_filter. We also rename weight to base_weight, just to be consistent in the naming conventions. We add a test for base_filter. Fixes bug 1175829 Change-Id: I46e0fa696d2f39081b5568c701b0a70c54f271ab
* | Merge "Handle ints passed to `boolean_from_string`"Jenkins2013-05-111-0/+12
|\ \
| * | Handle ints passed to `boolean_from_string`Rick Harris2013-05-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-0/+16
|\ \
| * | Added convenience APIs for lockutilsZhongyue Luo2013-05-091-0/+16
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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-103-52/+41
|\ \
| * | Convert unicode strings for python3 portabilityChuck Short2013-05-073-52/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "Import trycmd and ssh_execute from nova."Jenkins2013-05-101-0/+85
|\ \ \ | |_|/ |/| |
| * | Import trycmd and ssh_execute from nova.Michael Still2013-05-071-0/+85
| | | | | | | | | | | | | | | | | | | | | This change required adding basic unit tests as well as these were both untested in nova. Change-Id: If6843e57810198aab3c61f9eb3c3a6f42f710f7c
* | | Merge "Convert unicode for python3 portability"Jenkins2013-05-073-10/+18
|\ \ \ | |/ / |/| |
| * | Convert unicode for python3 portabilityChuck Short2013-05-063-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-031-8/+23
|\ \ \
| * | | Deprecate log_format and change default to NoneAndrew Laski2013-05-011-8/+23
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / / Update processutils.Michael Still2013-05-031-0/+83
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / Use range rather than xrangeChuck Short2013-05-011-1/+1
|/ | | | | | | | Use range rather than xrange to improve python3 compatibiltiy. Change-Id: I5a4434bbd2e5d509f84c3aa668eea8e46262816f Signed-off-by: Chuck Short <chuck.short@canonical.com>
* Merge "Support for lazily instantiated loggers"Jenkins2013-04-281-4/+19
|\
| * Support for lazily instantiated loggersDavanum Srinivas2013-04-091-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | 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 middleware to limit size of HTTP requests.Dan Prince2013-04-231-0/+100
| | | | | | | | | | | | | | | | | | 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 "Use print_function __future__ import"Jenkins2013-04-222-0/+5
|\ \
| * | Use print_function __future__ importMark McLoughlin2013-04-222-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than continuing to use the old print statement, use the actual print function introduced in python 2.6. See: http://docs.python.org/2/whatsnew/2.6.html#pep-3105-print-as-a-function Change-Id: I059d982d60e13f13e1caf49509c0fe0b18eda723
* | | Merge "Improve Python 3.x compatibility"Jenkins2013-04-224-6/+6
|\| |
| * | Improve Python 3.x compatibilityDirk Mueller2013-04-224-6/+6
| | | | | | | | | | | | | | | | | | | | | 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-5/+4
|\ \ \ | |/ / |/| |
| * | Move wsgi.Service socket creation into the constructor.Kiall Mac Innes2013-03-171-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | This allows wsgi.Service to be used with service.ProcessLauncher Fixes Bug #1156182 Change-Id: I71714d243c8a1b90c7bc1006ca2ad1e8c4b30e57
* | | Merge "Removes created_at, updated_at from ModelBase"Jenkins2013-04-201-0/+22
|\ \ \
| * | | Removes created_at, updated_at from ModelBaseZhongyue Luo2013-04-111-0/+22
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Created a 'TimestampMixin' class. Next step is to update Nova which is the only project using oslo.db Fixes bug #1119702 Change-Id: I1ffcc09a2971e6e6102da7ecb855a2837a159baf
* / | Add rpc method namespace support.Russell Bryant2013-04-122-6/+50
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RPC endpoints already had the ability to expose multiple APIs ... sort of. You could pass multiple callback objects to the dispatcher and it would check all of them for a method call. This patch adds the ability to set a namespace on a callback object. This makes exposing multiple APIs a bit more like you would expect it to work. You can invoke a method on a specific callback object, as opposed to having it check all of them for the method. This will allow you to create, manage, and version APIs without any potential conflicts with other APIs being exposed by the same endpoint. An example of where I would like to use this is in Nova, where we have some methods that we would like to expose on *all* rpc endpoints. This includes no public API changes and is fully backwards compatible. Implement blueprint rpc-multi-api. Change-Id: Ief4433e2e1c32cfb05b4cd27b87fe32b40f4341d
* | Merge "Import nova's looping call."Jenkins2013-04-081-4/+4
|\ \
| * | Import nova's looping call.Michael Still2013-04-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The looping call implementation had drifted in nova away from what was in oslo. Update olso. I will move nova over to this code in a later review. Change-Id: I0e9214a150223dcd4fb1d695db36961bba794166
* | | Merge "Move bin/ scripts to entrypoints."Jenkins2013-04-081-1/+1
|\ \ \ | |/ / |/| |
| * | Move bin/ scripts to entrypoints.Monty Taylor2013-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | Instead of propogating more bin scripts, migrate these to be things that can be consumed as entrypoints. Change-Id: Ic01e0f16fe9e7634708fbb51499ccea3f4f40d63
* | | Merge "Add a gettextutils.install() helper function"Jenkins2013-04-041-2/+16
|\ \ \
| * | | Add a gettextutils.install() helper functionMark McLoughlin2013-04-031-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of fixing bug #995287 Every top-level script in every project needs to call gettext.install() so that a _() builtin function is installed and strings are translated using the correct translation domain. However, translations are always installed in the default localedir (which is commonly '/usr/share/locale') and, in cases like devstack, may be found in a project-specific localedir. To support such a use case we should have project-specific environment variables for overriding the default value of localedir - e.g. NOVA_LOCALEDIR. Add a new gettextutils.install() helper method to make this as easy as possible for projects to get right. Change-Id: I6c8549c8ff00797c96f2dd4b0b5266d18d77aa19
* | | | Copy recent changes in periodic tasks from nova.Michael Still2013-04-041-1/+178
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | The nova periodic task code has moved on. Bring oslo inline with the new code. The next step after this is to update Quantum (the only user of this code I can find) to the new interface, and then move nova across to using this code. Change-Id: I3f041ca9a6ba9f0e5be4b29198d16454c9797fef