| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Consumers could potentially raise an uncaught exception
and exit prematurely.
Related to bug 1189711
Change-Id: I9cb32d8530f3a1dd623e193476e02b990b40b466
|
| | |
| |
| |
| |
| |
| | |
Fixes H202, H602 errors
Change-Id: Ic3045f15116d1d7a28b63bc94a0a341b9304ffdd
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add urljoin for python2/python3 compatibility,
used by python-keystoneclient.
Change-Id: Ied0841bf6b34d0087002c77915031156767b3d8d
Signed-off-by: Chuck Short <chuck.short@canonical.com>
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \ |
|
| | | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \ |
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \
| |/ / /
|/| | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fully fixes wrong param passed to the exception constructor from oslo.config
occurring in Enforcer._get_policy_path
Closes-Bug: #1208397
Change-Id: I28b11178808b447555e6e6e63383904749c77b18
|
| | |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \ |
|
| | | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| |\ \ \ \ \ |
|
| | | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
| |\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
|
| | |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
There was missing exceptions QuotaExists and ProjectUserQuotaNotFound
Rename message format property from `message' to `msg_fmt' in QuotaException
Change-Id: I93f621fae342e78280bf50eebf5b0bca9d281ed3
|
| |\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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>
|
| |\ \ \ \ \
| |_|/ / /
|/| | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Change local.py to use threading.local instead of being dependent on
Eventlet corolocal.local.
Change-Id: Ib544be1485823f6c619312fdee5a04031f48bbb4
|
| |\ \ \ \ \
| |_|_|_|/
|/| | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| |\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Quota code was imported and merged from nova and cinder projects.
blueprint common-quota
Change-Id: Idc9a85fddd1665ae010bcc4740963e14d81310c3
|
| |\ \ \ \ \ \ |
|
| | | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
| | |/ / / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Return the boolean evaluation itself rather than
a boolean after evaluation
Change-Id: I6329d474c921e29eb3a690270de12d51cb863710
|
| |\ \ \ \ \
| |_|_|/ /
|/| | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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 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
|
| |\ \ \ \ |
|