summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge "Add a slave db handle for the SQLAlchemy backend."Jenkins2013-06-031-0/+20
|\ \ \
| * | | Add a slave db handle for the SQLAlchemy backend.Michael Wilson2013-06-031-0/+20
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds an option for a slave DB connection for scaling purposes. Read queries can be sent here to spread out db load a bit. This patch adds a new configuration option: slave_connection. Implements: blueprint db-slave-handle Change-Id: I5cc5e0696e3fcd8609ee6b5466b0377ca52b8b58 DocImpact
* | | Merge "python3: python3 binary/text data compatbility"Jenkins2013-06-035-16/+18
|\ \ \
| * | | python3: python3 binary/text data compatbilityChuck Short2013-05-315-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python3 enforces the distinction between byte strings far more rigorously than Python 2 does; binary data cannot be automatically coerced to or from text data. Use six to provide a fake file object for textual data. It provides an alias for StringIO.StringIO in python2 and io.StringIO in python3 Change-Id: I65897bb0cca2cbeb5819a769b98645c9eb066401 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | | | Enable hacking H402 testSergey Lukjanov2013-06-0314-28/+28
|/ / / | | | | | | | | | | | | | | | H402 one line docstring needs punctuation Change-Id: Ie848453cace318d8310cdf0234c512f4c1121119
* | | Merge "Reduce duplicated code related to policies"Jenkins2013-05-313-54/+153
|\ \ \
| * | | Reduce duplicated code related to policiesFlaper Fesp2013-05-213-54/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds some logic that is currently duplicated throughout Openstack. As part of this de-duplication, the patch also modifies current implementation. Major Changes: * check, set_rules, reset, init are now part of the Enforcer class * check was renamed into enforce * init was renamed into load_rules * It is now possible to load multiple files and have per instance rules instead of global rules. * There's a global instance of the Enforcer class that can be used as main enforcer. from openstack.common import policy ENFORCER = policy.ENFORCER ENFORCER.enforce(rule, target, creds) Minor Changes: * Added do_raise to the enforce method * Enforcer instance is now passed to the Check call. NOTE: If / once this patch gets in, I'll update other projects and port them to the latest version. Change-Id: Ife909bdf3277ef33c2fb1eae16ae261fa6374c63
* | | | Merge "Use mox object from moxstubout fixture"Jenkins2013-05-313-6/+3
|\ \ \ \ | | |_|/ | |/| |
| * | | Use mox object from moxstubout fixtureMark McLoughlin2013-05-203-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The moxstubout fixture creates a mox object which we can re-use in tests. It also ensures verify() is called, which it clearly wasn't in the case of the qpid tests. Change-Id: Ibf3326f18b160865012d40a5841b65438262c4df
* | | | Merge "Enable hacking H403 test"Jenkins2013-05-304-7/+12
|\ \ \ \
| * | | | Enable hacking H403 testSergey Lukjanov2013-05-304-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | H403 multi line docstring end on new line Change-Id: I33249651026b54ef346214965e909835288bb14e
* | | | | Merge "Enable hacking H201 test"Jenkins2013-05-301-2/+2
|\| | | |
| * | | | Enable hacking H201 testSergey Lukjanov2013-05-291-2/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | H201 no 'except:' at least use 'except Exception:' Change-Id: Ibfab55ace63636d3507fbdad46d1436b8ec83475
* | | | Merge "Use stubout in test_correlation_id"Jenkins2013-05-291-3/+2
|\ \ \ \ | |/ / / |/| | |
| * | | Use stubout in test_correlation_idMark McLoughlin2013-05-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Best to use stubout for stubbing out methods like this. That way they get properly unstubbed on failure. Change-Id: I61dc96d01e331e8d811b8f24137e8f738cf09215
* | | | Merge "Specify database group instead of DEFAULT"Jenkins2013-05-223-4/+96
|\ \ \ \
| * | | | Specify database group instead of DEFAULTDavanum Srinivas2013-05-203-4/+96
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the request of Quantum folks, Let us switch from DEFAULT to database for the database related options. This will help with migration etc. DocImpact Fixes LP# 1171837 Change-Id: If602a6a7cc0f2a202632dd14574fea60dce4b589
* | | | Add generic serialization supportDan Smith2013-05-212-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a generic serialization model that the RpcProxy and RpcDispatcher will use to serialize and deserialize arguments and return values. The base definition is provided, as well as a default NoOpSerializer which performs no special action (retaining the existing behavior). Related to blueprint rpc-object-serialization Change-Id: I0a33baddee3e28dfc47100eb3216b679558b0bdd
* | | | Allow RPC_API_NAMESPACE on RpcProxy objectsChris Behrens2013-05-201-2/+13
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows one to subclass RpcProxy for use with a particular namespace without having to repeatedly pass the namespace into the make_namespaced_msg() method. This new RPC_API_NAMESPACE attribute will be used for the make_msg() call. It is defaulted to None to match previous behavior. Change-Id: Ied62df839cda0be6f9f9b060bbfc22e086f61be8
* | | Merge "Add Middleware for correlation_id"Jenkins2013-05-201-0/+51
|\ \ \ | |/ / |/| |
| * | Add Middleware for correlation_idAditi Raveesh2013-05-151-0/+51
| |/ | | | | | | | | | | | | | | | | | | 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
* | Migrate to pbr.Monty Taylor2013-05-172-332/+0
| | | | | | | | | | | | | | | | | | Also, remove the files associated with this that should not be pulled from oslo-incubator any longer. Closes bug 1179007 Change-Id: Id2e882837bdde51a60562e8cdd207c7ff0c88a6a
* | Merge "Break out common functionality for filters and weights"Jenkins2013-05-171-1/+3
|\ \
| * | Break out common functionality for filters and weightsMatthew Sherborne2013-05-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the context of openstack.common.scheduler: base_filter.BaseFilterManager and base_weight.BaseWeightManager had duplicated code. This patch breaks that code out into a shared base class: base_handler.BaseHandler Change-Id: Ie5232c6dd9876a75170beda71adde90fc6bb4153
* | | Merge "Extract matchmaker_ring to own module"Jenkins2013-05-171-1/+2
|\ \ \
| * | | Extract matchmaker_ring to own moduleEric Windisch2013-05-151-1/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The base matchmaker module should not have all the matchmakers implemented within. Instead, we desire to break them out. For purposes of deprecation, logs a warning when importing from the ZeroMQ driver. Change-Id: I76936edd97309621a9c28363dccd792293a1c0d3
* | | Merge "Pass backdoor_port to services being launched"Jenkins2013-05-161-0/+10
|\ \ \
| * | | Pass backdoor_port to services being launchedBrian Elliott2013-05-091-0/+10
| | |/ | |/| | | | | | | Change-Id: I7227648f9b9e1d3e30f4b2d03964ee5c625a1024
* | | 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
|\ \ \ | |_|/ |/| |