summaryrefslogtreecommitdiffstats
path: root/openstack
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Import trycmd and ssh_execute from nova.Michael Still2013-05-071-0/+66
| |/ | | | | | | | | | | | | 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-075-8/+15
|\ \ | |/ |/|
| * Convert unicode for python3 portabilityChuck Short2013-05-065-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 "Deprecate log_format and change default to None"Jenkins2013-05-031-6/+11
|\ \
| * | Deprecate log_format and change default to NoneAndrew Laski2013-05-011-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-031-12/+58
|\ \ \
| * | | Update processutils.Michael Still2013-05-031-12/+58
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-023-15/+21
|/ / | | | | | | | | | | | | | | Change print statements so that it works with python3 as well. Change-Id: Iff16b62e4b875c79862c9af7726ea77627aa7b4f Signed-off-by: Chuck Short <chuck.short@canonical.com>
* / Use range rather than xrangeChuck Short2013-05-012-3/+3
|/ | | | | | | | 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-281-3/+33
|\
| * Support for lazily instantiated loggersDavanum Srinivas2013-04-091-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | 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 "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 "Add middleware to limit size of HTTP requests."Jenkins2013-04-241-0/+84
|\ \ \
| * | | Add middleware to limit size of HTTP requests.Dan Prince2013-04-231-0/+84
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | 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
* / / 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 "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
* | | Merge "Use print_function __future__ import"Jenkins2013-04-221-0/+2
|\ \ \
| * | | Use print_function __future__ importMark McLoughlin2013-04-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2213-25/+25
|\| | | | |/ / |/| |
| * | Improve Python 3.x compatibilityDirk Mueller2013-04-2213-25/+25
| | | | | | | | | | | | | | | | | | | | | 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
* | | Removes metadata from ModelBaseZhongyue Luo2013-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Next step is adding metadata to nova.db.sqlalchemy.models.NovaBase Fixes bug #1119699 Change-Id: I306a061e0b17660f612a111067ac618342f4ee99
* | | Merge "Removes created_at, updated_at from ModelBase"Jenkins2013-04-201-2/+5
|\ \ \
| * | | Removes created_at, updated_at from ModelBaseZhongyue Luo2013-04-111-2/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Created a 'TimestampMixin' class. Next step is to update Nova which is the only project using oslo.db Fixes bug #1119702 Change-Id: I1ffcc09a2971e6e6102da7ecb855a2837a159baf
* | | Merge "Replaces standard logging with common logging"Jenkins2013-04-206-8/+14
|\ \ \
| * | | Replaces standard logging with common loggingZhongyue Luo2013-04-096-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Common modules can now safely import other common modules since update.py will automatically install dependencies. Change-Id: I0ad12d7e6e623657c40659aca4148439cd03d3fa
* | | | Merge "Replaces the standard uuid with common in the context module"Jenkins2013-04-201-2/+3
|\ \ \ \
| * | | | Replaces the standard uuid with common in the context moduleZhongyue Luo2013-04-091-2/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Common modules can now safely import other common modules since update.py will automatically install dependencies. Change-Id: I9fca5959581ae4f4ab3da20caabbe9c0d53247b6
* | | | Merge "Incorrect logging setup - duplicating root handlers"Jenkins2013-04-151-3/+0
|\ \ \ \
| * | | | Incorrect logging setup - duplicating root handlersMichael Kerrin2013-04-091-3/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop adding the log handlers from the root logger to the logger specified via the default_log_levels configuration setting. If the handler should dispatch a event then it will do it once for the specified logger and once for root logger thus duplicating the event. Change-Id: I1a7880322ff53cbdf8048e1d805511ca76929ee3
* | | | Merge "Add rpc method namespace support."Jenkins2013-04-145-14/+41
|\ \ \ \
| * | | | Add rpc method namespace support.Russell Bryant2013-04-125-14/+41
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / | | Fixes private functions privateZhongyue Luo2013-04-101-21/+21
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed functions below to private APIs. raise_if_duplicate_entry_error() raise_if_deadlock_error() wrap_db_error() synchronous_switch_listener() add_regexp_listener() greenthread_yield() ping_listener() is_db_connection_error() patch_mysqldb_with_stacktrace_comments() Fixes bug #1119709 Change-Id: I61f700cdbae0126a8b89f6895e4332d695191dd0
* / / Optimise to_primitive common casesStanislaw Pitucha2013-04-091-16/+42
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | to_primitive included many checks that were executed before any usual types have been checked. It's safe to reorder / duplicate the most common ones. Especially built-in types can be checked before other more complicated scenarios. This is important since to_primitive gets called over a million times in usual test run and many more times in a live environment. This change strips around 4% of nova testing time on my machine and the function itself is ~5x faster on average according to the profiler. Change-Id: I71e0c06bbcc31793a1cdcebb36d4e3d8c5876f73
* | Merge "Import nova's looping call."Jenkins2013-04-082-7/+59
|\ \
| * | Import nova's looping call.Michael Still2013-04-082-7/+59
| | | | | | | | | | | | | | | | | | | | | | | | 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-082-0/+169
|\ \ \ | |/ / |/| |
| * | Move bin/ scripts to entrypoints.Monty Taylor2013-04-072-0/+169
| | | | | | | | | | | | | | | | | | | | | Instead of propogating more bin scripts, migrate these to be things that can be consumed as entrypoints. Change-Id: Ic01e0f16fe9e7634708fbb51499ccea3f4f40d63
* | | Merge "Support overriding oslo localedir too"Jenkins2013-04-041-3/+3
|\ \ \
| * | | Support overriding oslo localedir tooMark McLoughlin2013-04-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of fixing bug #995287 Libraries need to translate strings according to their translation domain but they should not override the default _() builtin (which should only be installed by the top-level script) and instead should gettextutils._(). To support the case where message catalogs are installed in a non-default (and perhaps project-specific) location, we allow the default localedir to be override with a project-specific environment variable e.g. QUANTUMCLIENT_LOCALEDIR. The code makes it seem like OSLO_LOCALEDIR is the env variable we're adding but, in fact, update.py magically replaces 'oslo' with the project name. Change-Id: I62b66892a4e27892ee488d2884ffd2f40ab467ee
* | | | Merge "Add a gettextutils.install() helper function"Jenkins2013-04-041-0/+17
|\| | |
| * | | Add a gettextutils.install() helper functionMark McLoughlin2013-04-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-26/+98
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Fix IBM copyright strings"Jenkins2013-04-032-2/+2
|\ \ \