OpenStack Database As A Service (Trove)
Go to file
Amrith Kumar 577d43b02d insulate TroveContext from possible changes in oslo.context
Earlier code introduced in[1] aimed to handle the situation where a
context object serialized and sent over a message queue as a
dictionary is received by a version of code that doesn't necessarily
understand that context object.

That code relied on the fact that vars(TroveContext).keys() was a
dictionary that matched the full set of parameters that you can send
to the initializers for TroveContext() and RequestContext().

Recent changes in oslo.context [2] and [3] broke that
assumption. vars() on TroveContext provided a dictionary with the
internal representation(s) that are not the same as the kwargs in
RequestContext() and the params that TroveContext used to pop.

To get around this, new code introduced here uses
oslo_utils.reflection to determine all the possible kwargs that can be
sent to TroveContext, some of which are consumed by TroveContext and
the rest of which are sent along to RequestContext().

The construct in the earlier _remove_incompatible_context_args() also
modified kwargs.keys() by pop'ing values from it while iterating over
this. Python 3 takes a dim view of this and therefore some changes
have been made to accomodate this.

A unittest has been added to ensure that the from_dict() method
properly dumps stuff it doesn't know about. The test explicitly
verifies the warning generated when a bogus argument is eliminated.

[1] 24c5e8e244
[2] 2394cff0631944a9259bfe04925e444d9f817758
[3] f25543fcc792ebf155728a91fde06e8dc4e96cea

Change-Id: I477dd29e034295e770925091c4ac6268c22ae59b
Related-Bug:#1661790
2017-02-04 12:07:56 -05:00
api-ref/source unwedge the gate 2017-01-29 18:37:11 -05:00
apidocs/src/samples Fix backup of mysql variants on Centos 2016-12-13 16:29:41 +00:00
contrib Fixes hacking rules 2015-05-29 07:27:59 +00:00
devstack formalizing configure_nova_kvm 2016-12-20 11:29:07 -05:00
doc secure oslo_messaging.rpc 2017-01-11 07:56:35 -05:00
etc Add support for Oslo Policies to Trove 2016-12-06 21:51:21 +00:00
install-guide/source Fix incorrect version and release details 2016-10-21 09:10:27 +00:00
integration [gate fix] Handle case where hostname ends in .1 2017-01-17 22:34:22 +00:00
releasenotes Merge "Add support for cluster restart" 2017-02-03 06:40:25 +00:00
tools insulate TroveContext from possible changes in oslo.context 2017-02-04 12:07:56 -05:00
trove insulate TroveContext from possible changes in oslo.context 2017-02-04 12:07:56 -05:00
.coveragerc Update some information 2016-10-24 04:12:55 +00:00
.gitignore Cleanup trove's tox.ini and .gitignore 2016-08-30 15:33:36 -04:00
.gitreview Renamed repos to trove. 2013-06-14 18:25:42 -04:00
.testr.conf Rename from reddwarf to trove. 2013-06-24 14:11:15 -07:00
CONTRIBUTING.rst add section on code review priority 2016-11-01 11:11:14 -04:00
HACKING.rst Add translation_checks for i18n 2017-01-29 03:04:10 +00:00
LICENSE Add Apache 2.0 LICENSE file. 2013-04-29 18:01:12 -04:00
README.rst Show team and repo badges on README 2016-12-01 22:07:32 +00:00
babel.cfg Setup trove for translation 2014-03-19 15:06:23 +01:00
blacklist-py3.txt Remove blacklist test volume 2016-10-26 05:27:09 +00:00
generate_examples.py Fixes hacking rules 2015-05-29 07:27:59 +00:00
pylintrc initial chkin of pylint 2016-09-14 13:56:24 -04:00
requirements.txt Updated from global requirements 2017-01-24 20:02:33 +00:00
run_tests.py secure oslo_messaging.rpc 2017-01-11 07:56:35 -05:00
run_tests.sh Remove extraneous vim configuration comments 2014-02-27 15:05:21 +08:00
setup.cfg About update setup.cfg homepage 2016-08-12 05:29:41 -07:00
setup.py Updated from global requirements 2015-09-23 14:14:17 +00:00
test-requirements.txt Updated from global requirements 2017-01-24 20:02:33 +00:00
tox.ini Merge "Add translation_checks for i18n" 2017-02-03 10:09:53 +00:00

README.rst

Trove

image

Trove is Database as a Service for OpenStack.

Getting Started

If you'd like to run from the master branch, you can clone the git repo:

git clone https://github.com/openstack/trove

You can raise bugs here: https://bugs.launchpad.net/trove

Python client

https://git.openstack.org/cgit/openstack/python-troveclient

References