summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add support for heartbeating in the kombu RPC driver"HEADmasterJenkins2013-07-081-7/+14
|\
| * Add support for heartbeating in the kombu RPC driverKiall Mac Innes2013-07-081-7/+14
| | | | | | | | | | | | | | | | | | This aides in detecting connection interruptions that would otherwise go unnoticed. Fixes bug #856764 Change-Id: Id4eb3d36036969b62890175d6a33b4e304be0527
* | notifier: do not rely on CONF.hostJulien Danjou2013-07-081-0/+8
| | | | | | | | | | | | | | | | | | There's nothing in Oslo declaring an 'host' configuration option, so relying on it isn't a good practice. Let's use the same default value as intended, but make it work in any case. Change-Id: I9c898647e68e35435d1a58f920b6e610f217e4e8 Signed-off-by: Julien Danjou <julien@danjou.info>
* | Add missing license headerDirk Mueller2013-07-071-0/+16
| | | | | | | | Change-Id: I58044b4de839096fe1c5cb8041994622aa9106a6
* | Merge "Handle empty arglists in Filters"Jenkins2013-07-061-0/+39
|\ \
| * | Handle empty arglists in FiltersDirk Mueller2013-07-031-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | The various filters either asserted or incorrectly assumed that an empty arglist matched the filter. Add testcases to avoid regressions. Change-Id: If90fbad3d54749ecc645071675402ea2613870a2
* | | Merge "Add graceful service shutdown support to Launcher"Jenkins2013-07-041-0/+27
|\ \ \
| * | | Add graceful service shutdown support to LauncherBrian Elliott2013-06-301-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provides support for letting each running service finish in-progress requests and cleanup gracefully before stopping. blueprint graceful-shutdown Change-Id: Idf137620b87417de89eba23f05daf08780dc9dff
* | | | Merge "Add conditional exception reraise"Jenkins2013-07-031-0/+8
|\ \ \ \ | |/ / / |/| | |
| * | | Add conditional exception reraiseBen Nemec2013-07-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases we need to save an exception and reraise it only under certain conditions. As written, the save_and_reraise_exception context always reraises, which means it can't always be used. This change adds a flag that allows conditional reraising to address the limitation. Change-Id: Ib5c6406a1b91daff94cc4aa305dcb7d6262aecdc
* | | | Merge "Replace sys.exit by a RPCException"Jenkins2013-07-031-7/+29
|\ \ \ \ | |_|/ / |/| | |
| * | | Replace sys.exit by a RPCExceptionMehdi Abaakouk2013-07-021-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change replace sys.exit by a RPCException like the zmq implementation does, to allow library users to handle the case of the rpc failure in their applications. Change-Id: Iafda7bfa20840fa5488dece1d5ad49e2b14b73b5
* | | | Merge "Fix bad default for show_deleted"Jenkins2013-07-021-0/+4
|\ \ \ \ | |_|/ / |/| | |
| * | | Fix bad default for show_deletedDavanum Srinivas2013-07-011-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | replace "no" (string) with False (boolean). Added a test case Fixes LP# 1195511 Change-Id: Ib72689b11d747508850ccab8ef1d73727da2caa6
* | | Merge "Add common crypto utilties"Jenkins2013-07-022-0/+186
|\ \ \ | |/ / |/| |
| * | Add common crypto utiltiesSimo Sorce2013-06-282-0/+186
| | | | | | | | | | | | | | | | | | | | | | | | Common routines for Key Derivation (RFC 5869) and Symmetric Cryptography that uses standard Crypto functions as exported by PyCrypto Change-Id: Ib43ac788ec98b8a1b678ac457244a06a16833761 Implements: blueprint trusted-messaging
* | | Merge "Handle empty PATH environment variable"Jenkins2013-07-011-2/+8
|\ \ \ | |_|/ |/| |
| * | Handle empty PATH environment variableDirk Mueller2013-06-281-2/+8
| |/ | | | | | | | | | | | | In locked down environments, PATH might be unavailable when running rootwrap. Change-Id: Ia55514a7d69ab26c2bcf5d1839da1d36aaf46ebc
* | Merge "Fix tox.ini config"Jenkins2013-06-281-0/+1
|\ \
| * | Fix tox.ini configVictor Sergeyev2013-06-271-0/+1
| | | | | | | | | | | | | | | | | | | | | We found that if tests run with testr --subunit option it can cause wrong implementation of tests results. Change-Id: I98c3f3ed90e2291ef984f07a93c89d24da7855d9
* | | Merge "Improve usability when backdoor_port is nonzero"Jenkins2013-06-282-4/+129
|\ \ \ | |_|/ |/| |
| * | Improve usability when backdoor_port is nonzeroRaymond Pekowski2013-06-232-4/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users who may not know that configuring a backdoor_port with 0 allows multiple services to be enabled for the eventlet backdoor or who simply want a more predictable port assignment might like this patch. If the specified port is in use, it is incremented until a free port is found. This is a backdoor_port collision recovery scheme as opposed to the collision failure scheme that exists today. This related to I95fdb5ca: Add support for backdoor_port to be returned with a rpc call. Change-Id: I7ec346db3575995fa15483b617eea34c1e003bb0
* | | Add netaddr.IPAddress support to to_primitive()Dan Smith2013-06-271-0/+6
| |/ |/| | | | | | | | | | | | | | | | | This enlightens jsonutils.to_primitive() about how to serialize netaddr.IPAddress objects. Since these types are serializable in their native form with just string coercion, just do that here. Fixes bug 1195097 Change-Id: I358b0731e4d3774e5b36aefb5384fdfb75fd31b6
* | Refactor KombuStubs fixture.Roman Podolyaka2013-06-261-10/+22
| | | | | | | | | | | | Fixes bug 1192924. Change-Id: Ic6d9715c945e620da20b43310e8e8ba79296e4ad
* | Merge "Add network_utils.urlsplit"Jenkins2013-06-261-0/+17
|\ \
| * | Add network_utils.urlsplitJulien Danjou2013-06-241-0/+17
| |/ | | | | | | | | | | | | This unfortunately needed if we want to parse URL with params and unknown schemes. Change-Id: Ia7d8212370201254e537e6f1dd9b15d669a3252f
* | Merge "Make AMQP based RPC consumer threads more robust"Jenkins2013-06-263-4/+187
|\ \
| * | Make AMQP based RPC consumer threads more robustRaymond Pekowski2013-06-253-4/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug 1189711 Should RPC consume_in_thread() be more fault tolerant? There are unprotected holes in the thread kicked off by RPC consume_in_thread such that an exception will kill the thread. This exists for both the service (TopicConsumer) and the new reply proxy (DirectConsumer) consumers. This patch plugs those holes as close to the base of the consumer thread as possible by catching all non-caught exceptions and retrying with sleeps between retries and some pacing of the log output to prevent log flooding. Change-Id: I0d6ec8a5e3a310314da201656ee862bb40b41616
* | | Merge "Add IpFilter, IPNetnsExecFilter and EnvFilter"Jenkins2013-06-261-4/+123
|\ \ \
| * | | Add IpFilter, IPNetnsExecFilter and EnvFilterDirk Mueller2013-06-201-4/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These filters have been implemented in Quantum before: - IpFilter provides support for filtering ip commands - IpNetnsExecFilter is a chaining command filter that verifies that the command to be executed by ip netns exec is covered by other established filters. IpNetnsExecFilter has been restricted to ensure that the filter chains have all matching filters run as the same user. EnvFilter is a new filter derived from CommandFilter that allows a Command to be optionally prefixed by "env" and a specific list of environment variables. This is intended to replace the specific DnsmasqFilter and DnsmasqNetnsFilter in the future when all consumers have been updated. Implements bp rootwrap-quantum-features Change-Id: I0cf39967126e99a8dc53d21bee824a0fe2f63aa0
* | | | Merge "Do not raise NEW exceptions"Jenkins2013-06-251-1/+1
|\ \ \ \
| * | | | Do not raise NEW exceptionsSergey Vilgelm2013-06-251-1/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Raising NEW exception is bad practice, because we lose TraceBack. So all places like: except SomeException as e: raise e should be replaced by except SomeException: raise If we are doing some other actions before reraising we should store information about exception then do all actions and then reraise it. This is caused by eventlet bug. It lost information about exception if it switch threads. fixes bug 1191730 Change-Id: I7bce659591c4c3e4bc41e12d7d8390128c30e2e4
* | | | Merge "Remove the unused plugins framework"Jenkins2013-06-253-224/+0
|\ \ \ \
| * | | | Remove the unused plugins frameworkMark McLoughlin2013-06-193-224/+0
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This framework was merged a year ago and AFAICT hasn't seen use beyond the two initial wikimedia extensions for Nova. The framework basically allows a way for a single plugin to register API extensions and notification hooks. Both of these can be done by directly using config opts like osapi_compute_extension and notification_driver so this framework really only helps if we expected to (and wanted to) lots of these plugins in the wild. Nova is the only project using this and we don't have an active maintainer listed in the MAINTAINERS file, so it seems like it's time to remove it from the incubator. Change-Id: I5552b5625e26f4821464807743545ec6f5117f2b
* | | | Allow BaseTestCase use a different conf objectMark McLoughlin2013-06-255-41/+41
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new messaging work will register options like rpc_backend and, since the existing RPC API registers those options with CONF, we need to run the messaging tests with a different ConfigOpts object. It's actually probably pretty sane for all unit tests to use a per-test ConfigOpts object rather than cfg.CONF anyway. The kombu and zmq tests have an issue with this where they rely on being able to call self.config() before the base class setUp() is called. Fixing this properly is a little tricky, so for now, initialize self.conf early to cfg.CONF just for these tests. Change-Id: I7b2e3db7c21c511f3ab16ac866e0cc80846cbd80
* | | Merge "Optionally reject messages on exception."Jenkins2013-06-241-1/+104
|\ \ \
| * | | Optionally reject messages on exception.Sandy Walsh2013-06-201-1/+104
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Rather than blindly ack() all messages, consumers can be created that reject() the message if an exception occurs in the callback. Currently only implemented in kombu driver. Change-Id: I308dd794b50966e3a189d31b2b51fdac36cd7d3a
* | | Merge "Update kombu and anyjson"Jenkins2013-06-241-0/+16
|\ \ \
| * | | Update kombu and anyjsonDoug Hellmann2013-06-201-0/+16
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the kombu requirement based on the new value in the global requirements list. The new version of kombu we are using depends on anyjson>=0.3.3. Related to bug #1134575 Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com> Change-Id: I36211a2730bfc712e189d39893ab2af513ce3ba9 Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
* / / Ensure that DB configuration is backward compatibleGary Kotton2013-06-221-0/+24
|/ / | | | | | | | | | | Fixes bug 1193557 Change-Id: I483099b205c71d66cf97522307d8265abe83a488
* | Merge "Add a fixture for using of SQLite in-memory DB."Jenkins2013-06-172-19/+52
|\ \ | |/ |/|
| * Add a fixture for using of SQLite in-memory DB.Roman Podolyaka2013-06-122-19/+52
| | | | | | | | | | | | | | | | | | | | Currently, SQLite DB in a file is used for testing of DB related code. Thus, in each test case we have to ensure that tearDown() drops all created tables, etc. It is much easier and cleaner to guarantee that DB is in the original state by creating it in memory instead. Change-Id: I6f0a9735a0fb31bef30842afff50c6089fa2bf92
* | Merge "Handle relative path arguments in Killfilter"Jenkins2013-06-121-0/+14
|\ \
| * | Handle relative path arguments in KillfilterDirk Mueller2013-06-121-0/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | KillFilter currently expects an absolute path to be specified for the process name to kill. This is inconvenient when the exact location of the running binary is not known or differs accross installs. Extend KillFilter to accept also commands in $PATH to be killed if the given argument is not absolute. Change-Id: I6b90206b587ff3f949af2c256a78ca21af31867a
* | Merge "Add a funcutils file for working with functions."Jenkins2013-06-121-0/+139
|\ \ | |/ |/|
| * Add a funcutils file for working with functions.Joshua Harlow2013-06-091-0/+139
| | | | | | | | | | | | | | | | | | | | Multiple projects are starting to copy around the various function utilities that exist in nova and elsewhere. It would seem appropriate that there exist a helper file in oslo that was used instead as a central place for this type of code. Change-Id: Ia83f26da16b0c868506ecf90e1aaf8affecf3617
* | Merge "Allow exceptions to hop up cells"Jenkins2013-06-121-0/+40
|\ \
| * | Allow exceptions to hop up cellsMatthew Sherborne2013-06-121-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an exception happens in an RPC call using nova cells, it can travel back up several RPC boundaries. eg, child-cell=>parent-cell=>nova-api Before this patch if an exception (eg. AggregateNotFound) was raised in the bottom layer, the next layer up would turn it into a special exception ( AggregateNotFound_Remote ), then in the final layer, it would see this as an unrecognizable exception and raise RemoteException. After this patch, at each layer where the expeption is deserialized, it'll recognize exceptions with the _Remote postfix, and leave them as they are, instead of turning them into RemoteExceptions. It also preserves the exception's original __module__ now. Change-Id: I158a80f1cec20d3e1805b565ffddaffd7a15295b
* | | Merge "Add slugify to strutils"Jenkins2013-06-121-0/+15
|\ \ \ | |/ / |/| |
| * | Add slugify to strutilsAlessio Ababilov2013-06-111-0/+15
| | | | | | | | | | | | | | | | | | This function will be used in apiclient library. Change-Id: I19f976eda896e7bede07510aafebe4931e512351