summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add support for retrieving group keysshared-key-msgSimo Sorce2013-08-191-1/+1
| | | | | | | | Group keys are keys used by all the hosts listening to a specific topic. The unqualified topic name is the group name. Example: conductor, scheduler, ... Change-Id: Ia5bcdd140cef16e07d4d8ab4030d1ac5cb59212c
* RPC: Add support for optional message signingSimo Sorce2013-08-191-1/+174
| | | | | | | | | | | | | | Wires in SecureMessage so that signing can be optionally used. Signing messages is always attempted but failing to create a signed message is currently not fatal. In case of failure the message is sent unsigned. Once all services has been converted to support signing, we can start switching on mandatory signing. Currently the service name needs to be a global due to the way services are constructed. Change-Id: Ie565bbaf61a69a4e526e78e723efecb5e2712877
* Merge "Make ZeroMQ based RPC consumer threads more robust"Jenkins2013-08-191-0/+21
|\
| * Make ZeroMQ based RPC consumer threads more robustEric Windisch2013-07-231-0/+21
| | | | | | | | | | | | | | | | | | Consumers could potentially raise an uncaught exception and exit prematurely. Related to bug 1189711 Change-Id: I9cb32d8530f3a1dd623e193476e02b990b40b466
* | Bump hacking to 0.7.0Zhongyue Luo2013-08-1725-205/+203
| | | | | | | | | | | | Fixes H202, H602 errors Change-Id: Ic3045f15116d1d7a28b63bc94a0a341b9304ffdd
* | exception: removeJulien Danjou2013-08-167-154/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch drops the obsolete openstack.common.exception module. Most project should define their own exception based on their API and the context they evolve in. Many projects don't use this, only neutron, cinder and heat used it. I've copy pasted the few exceptions that they were using, but that's still by far less code than this whole file. Ultimately that will let them a chance to remove or shring their own exception.py. I don't think most projects should have one anyway. Change-Id: Ia8b2b29bd443233def324e97de7342c2634bccff Closes-Bug: #1208734
* | Merge "py3kcompat: Add urljoin compatibility"Jenkins2013-08-161-0/+6
|\ \
| * | py3kcompat: Add urljoin compatibilityChuck Short2013-08-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add urljoin for python2/python3 compatibility, used by python-keystoneclient. Change-Id: Ied0841bf6b34d0087002c77915031156767b3d8d Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | | Merge "Replace using tests.utils with openstack.common.test"Jenkins2013-08-1627-75/+70
|\ \ \
| * | | Replace using tests.utils with openstack.common.testAlexander Gorodnev2013-08-0927-75/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is the first step to replace using tests.utils with openstack.common.test. All these tests don't use mock objects, stubs, config files and use only BaseTestCase class. Change-Id: I511816b5c9e6c5c34ebff199296ee4fc8b84c672 bp: common-unit-tests
* | | | Merge "Allow mapping _ to lazy gettext path"Jenkins2013-08-151-0/+36
|\ \ \ \
| * | | | Allow mapping _ to lazy gettext pathMatt Odden2013-08-141-0/+36
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since nova has switched from using gettext.install for importing the _ function to explicitly importing the _ function from gettextutils, we need to be able to enable our deferred translation code path on the gettextutils._ function. Change-Id: I7fec00810ea57c985e1f43c644913a9980b35655
* | | | Merge "Move `./run_tests.sh` to Oslo"Jenkins2013-08-151-1/+18
|\ \ \ \
| * | | | Move `./run_tests.sh` to OsloVictor Sergeyev2013-08-131-1/+18
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved Nova `./run_tests.sh` script to `tools/run_tests_common.sh` file. This script run unit-tests and can be reused in other projects. Added script `./run_tests.sh` with project specific variables to run `tools/run_tests_common.sh` script. Added required `tools/*` files for pretty colorizer outpoot. Modified `tests/utils.py` file - added work with OS_TEST_TIMEOUT, OS_STDOUT_CAPTURE and OS_STDERR_CAPTURE environment variables from .testr.conf blueprint run-tests-script Change-Id: I057e8cf2c74d160402cb881fc761623c74905b7e
* | | | Merge "Fix wrong argument in openstack common policy"Jenkins2013-08-151-0/+5
|\ \ \ \ | |/ / / |/| | |
| * | | Fix wrong argument in openstack common policyAlexander Gordeev2013-08-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fully fixes wrong param passed to the exception constructor from oslo.config occurring in Enforcer._get_policy_path Closes-Bug: #1208397 Change-Id: I28b11178808b447555e6e6e63383904749c77b18
* | | | Ensure context type is handled when using to_dictLance Bragstad2013-08-101-0/+11
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Handle the case where the context passed into def pack_context() is a dictionary. If a dictionary is passed in, we don't need to call to_dict before updating the msg. fixes bug 1208971 Change-Id: I2ce0b28f97634e717868e0ee5525189338d4981c
* | | Merge "Add a fixture for dealing with config"Jenkins2013-08-082-0/+45
|\ \ \
| * | | Add a fixture for dealing with configAlexander Gorodnev2013-08-072-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many tests change config's variables directly in CONF object. This fixture allows to override the values in more convenient way and restores config after test completion. Blueprint: common-unit-tests Change-Id: I5535c534425278d8804ca9fe84846e15ac898db0
* | | | Merge "Fix missing argument bug in oslo common policy"Jenkins2013-08-081-5/+47
|\ \ \ \
| * | | | Fix missing argument bug in oslo common policyVictor Sergeyev2013-08-011-5/+47
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AndCheck() and OrCheck() classes in common policy module missing a argument when calls rules in __call__() method. Current patch fixed it by adding the necessary argument. Tests added. Fixed bug 1194354 Change-Id: I9a6e7d04b06ef61216cb7dbfd291c855b799b621
* | | | Merge "Helper function to sanitize db url credentials"Jenkins2013-08-081-0/+14
|\ \ \ \
| * | | | Helper function to sanitize db url credentialsZhongyue Luo2013-08-021-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The database url is sanitized in logfiles because of security issues. However the connected url itself is useful information to devs and admins. This patch provides a helper function to sanitize only the credentials in a database url. All projects must process the CONF.database.connection value using "sanitize_db_url" when updating the db package Fixes bug #1076833 Change-Id: Id6cf7b120ef6c3fcda7f33fd26676b62a4475bb2
* | | | | Merge "Move sqlalchemy migration from Nova"Jenkins2013-08-081-0/+154
|\ \ \ \ \
| * | | | | Move sqlalchemy migration from NovaVictor Sergeyev2013-07-251-0/+154
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added functions for work with migration scripts to openstack/common/db/sqlalchemy/migration.py file. This code can be used in Nova, Cinder, Glance, etc. Added new DbMigrationError exception to openstack/common/db/exception.py file. Tests added. blueprint test-migrations Change-Id: Ia63f7fb89b0a6baacf3fd424c0db09c74680af4a
* | | | | Merge "RPC: Add MessageSecurity implementation"Jenkins2013-08-071-0/+134
|\ \ \ \ \
| * | | | | RPC: Add MessageSecurity implementationSimo Sorce2013-08-051-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Message Security[1] class and exceptions Also add process-local Key Storage and Caching facility. [1] https://wiki.openstack.org/wiki/MessageSecurity Change-Id: Ieced7ab6a9209c3e0291d26376a8d35c25175002
* | | | | | Merge "Add missing exceptions for per user quota"Jenkins2013-08-061-0/+23
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | |
| * | | | | Add missing exceptions for per user quotaSergey Skripnick2013-08-051-0/+23
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was missing exceptions QuotaExists and ProjectUserQuotaNotFound Rename message format property from `message' to `msg_fmt' in QuotaException Change-Id: I93f621fae342e78280bf50eebf5b0bca9d281ed3
* | | | | Merge "Fix Message format-string parsing"Jenkins2013-08-051-0/+13
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Fix Message format-string parsingJohn Warren2013-08-051-0/+13
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parsing in openstack/common/gettextutils.Message._save_dictionary_parameter does not account for two or more format directives in direct succession, e.g.: %(key1)s%(key2)s causing key/value pairs to not be copied during a mod operation. Fixes bug 1207789 Change-Id: I56940003de3e6e2fa7dd08604d04f4c57586b0a3
* | | | Merge "python3: Import translation layer"Jenkins2013-08-051-0/+47
|\ \ \ \
| * | | | python3: Import translation layerChuck Short2013-08-041-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python3 reorganized the standard library and moved several functions to different modules. Six provides a consistent interface to them through the fake six.moves module. However, the urlparse, urllib2, etc modules have been combined into one module which Six does not support so do it the old fashioned way. Change-Id: I9a865ef1fc4de6f94cc3ccf26db0483f2bdc13df Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | | | | Merge "Modify local.py to not be dependent on Eventlet"Jenkins2013-08-021-3/+17
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Modify local.py to not be dependent on EventletLance Bragstad2013-08-011-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change local.py to use threading.local instead of being dependent on Eventlet corolocal.local. Change-Id: Ib544be1485823f6c619312fdee5a04031f48bbb4
* | | | | Merge "Add common methods required to allow translation of REST API responses"Jenkins2013-08-021-3/+86
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Add common methods required to allow translation of REST API responsesLuis A. Garcia2013-07-301-3/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REST API responses (particularly errors) are always returned to consumers in the locale of the operating system. This change adds common methods that will be required by other components in the process of translating the API responses to a locale requested by the API consumer. The patch set includes the following changes: 1) An installer for the lazy _() function is provided. Services that want to use the Message class to do delayed translation will just have to set the new 'lazy' flag in the existing gettext.install(). 2) A method to retrieve all available languages in a given translation domain in order to pick one that will be used to translate the response to the user. 3) A utility method to translate a Message. Co-authored-by: Mathew Odden <mrodden@us.ibm.com> Co-authored-by: Ben Nemec <openstack@nemebean.com> This partially implements bp user-locale-api. Change-Id: I27640a3c8b255be51bc6396d238098bd25af61ec
* | | | | Merge "BaseException.message is deprecated since Python 2.6"Jenkins2013-07-311-8/+8
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | BaseException.message is deprecated since Python 2.6Johannes Erdfelt2013-07-261-8/+8
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PEP 352 deprecated the message attribute of the BaseException class. Using the message attribute will result in warnings like this: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 Using unicode(exc) is the suggested replacement. Change-Id: Ibf3c56e4baa6ad83e2b95a948787e9d02cf074d4
* | | | Merge "Fix policy default_rule issue"Jenkins2013-07-301-9/+38
|\ \ \ \
| * | | | Fix policy default_rule issueguohliu2013-07-291-9/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixed the following issue in policy: 1. Default_rule wasn't set correctly when using enforcer. 2. When overwrite=True set_rule method doesn't work. 3. Add type check in __missing__ of dict and return the correct value of default_rule. 4. Partially refactor the test_policy code based on the related change. Fixed #bug 1202771 Change-Id: I9be1ac8bdc995adae201e9b45ee124dd525e4822
* | | | | Merge "Import common quota code from nova and cinder"Jenkins2013-07-301-0/+418
|\ \ \ \ \
| * | | | | Import common quota code from nova and cinderSergey Skripnick2013-07-291-0/+418
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quota code was imported and merged from nova and cinder projects. blueprint common-quota Change-Id: Idc9a85fddd1665ae010bcc4740963e14d81310c3
* | | | | | Merge "Add function drop_unique_constraint()"Jenkins2013-07-291-1/+133
|\ \ \ \ \ \
| * | | | | | Add function drop_unique_constraint()Victor Sergeyev2013-07-261-1/+133
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We forgot to copy this function from nova, so we are not able to switch to oslo sqlalchemy.utils until add this function. Sqlalchemy doesn't supports some sqlite column types so we have no possibility to drop unique constraint in general way on sqlite (we loose these column types after migration). Added unified drop_unique_constraint() function to drop unique constraint for sql backends with tests. blueprint: oslo-sqlalchemy-utils Change-Id: I34000ad2277a97c31a29539d047faaf19876c9d5
* | | | | | Refactors boolean returnsZhongyue Luo2013-07-281-4/+1
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return the boolean evaluation itself rather than a boolean after evaluation Change-Id: I6329d474c921e29eb3a690270de12d51cb863710
* | | | | Merge "Implement apiclient library"Jenkins2013-07-264-1/+561
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Implement apiclient libraryAlessio Ababilov2013-07-224-1/+561
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This library can be used in novaclient, keystoneclient, glanceclient, and other client projects. The library contains common code and uses python-requests for HTTP communication. Features: * reissue authentication request for expired tokens; * pluggable authentication; * rich exceptions hierarchy. This code partially comes from: * python-keystoneclient/keystoneclient/base.py; * python-novaclient/novaclient/auth_plugin.py; * python-novaclient/novaclient/extension.py; * python-novaclient/tests/fakes.py. Partially implements: blueprint common-client-library Change-Id: Ic8b466a57554018092c31c6d6b3ea62f181d7cef
* | | | | Add service restart function in oslo-incubatorFengqian.Gao2013-07-251-33/+121
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add signal handler of SIGHUP and restart function for service to restart. It depends on blueprint cfg-reload-config-files of oslo.config. Implements blueprint service-restart Change-Id: Ib68fc5fb6038c4855d35464573c8866776493f6c
* | | | Merge "Exception code cleanup"Jenkins2013-07-232-5/+2
|\ \ \ \