summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Replace utils method with oslo.utils reflection provided one1.11.0Joshua Harlow2015-06-062-27/+3
| | | | Change-Id: Ife14a6acd01a16c4b1092b43fb94942db0e03036
* Allow to fail instead of skip in DbFixtureCedric Brandily2015-06-041-3/+11
| | | | | | | | | | | | | | | | | Tests using DbFixture[1] are currently skipped if the database is unavailable (no db service, no permissions, etc.) which is fine when tests are runned by developers but not when runned by the gate jobs. This change defines the attribute DbFixture.SKIP_ON_UNAVAILABLE_DB: when the database is unvailable, tests are: * skipped when SKIP_ON_UNAVAILABLE_DB=True (default, legacy behaviour), * failed when SKIP_ON_UNAVAILABLE_DB=False. [1] oslo.db.sqlalchemy.test_base Change-Id: I067f46417fefe252c650e1e5e590e83547b11b6a Closes-Bug: #1404093
* Updated from global requirements1.10.0OpenStack Proposal Bot2015-05-291-1/+1
| | | | Change-Id: I1565e7fcbf64c4e317135d560c2cdc6b9c933c34
* Imported Translations from TransifexOpenStack Proposal Bot2015-05-287-61/+61
| | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I80c789ac29d7ffbf74c6c0ee9b92518f3fabd914
* Merge "Ensure that create_engine() close test connection"Jenkins2015-05-221-1/+5
|\
| * Ensure that create_engine() close test connectionVictor Sergeyev2015-01-281-1/+5
| | | | | | | | | | | | | | | | | | | | handle_connect_error() open and return a test connection, but nobody uses it in create_engine(), so (depending on Python interpreter) this connection can stay opened in the pool for some time. Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com> Change-Id: Ibef07f0fa1fec61aa10963c07c410a731d7758ef
* | Merge "Remove pre-SQLAlchemy-0.9.7 compat utilities"Jenkins2015-05-209-323/+21
|\ \
| * | Remove pre-SQLAlchemy-0.9.7 compat utilitiesMike Bayer2015-04-289-323/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that requirements.txt is at SQLAlchemy 0.9.7 at the minimum, we can remove the engine_connect compatibility module as well as part of the handle_error compatibility module. In particular, this gives us the ability to add and remove engine_connect events using the event API directly which can be handy in test fixtures. Change-Id: I48450ad9d472d4377913ad391a0f5e3ba0f1471f
* | | Add a keys() method to SQLAlchemy ModelBaseVictor Stinner2015-05-192-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this additional method, it now possible to write directly dict(obj), instead of dict(obj.iteritems()), to cast an object to a dictionary. Modify also ModelIterator: it doesn't inherit from ModelBase anymore. Change-Id: I702be362a58155a28482e733e60539d36c039509
* | | Merge "Remove support for Python 3.3"Jenkins2015-05-122-9/+1
|\ \ \
| * | | Remove support for Python 3.3Davanum Srinivas2015-05-102-9/+1
| | | | | | | | | | | | | | | | Change-Id: Ia4993cd36fa1573c3ac28abe08ea7c665a8332c0
* | | | Merge "Sort model fields using getattr(), not inspect()"Jenkins2015-05-112-1/+53
|\ \ \ \
| * | | | Sort model fields using getattr(), not inspect()Mike Bayer2015-05-052-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While inspect(mapping).all_orm_descriptors is a good way to get at attributes that are known to be mapped or otherwise described by SQLAlchemy, it does not produce a SQL expression in the case of a hybrid descriptor, where it produces the descriptor, not the result of calling it. This fix ensures that the descriptor is evaulated, while still retaining the fact that we check the attribute as coming from an ORM-level descriptor. Change-Id: I04a03be713348158b8cdfda683624fea01fe34ea Closes-Bug: #1451880
* | | | | Merge "Remove run_cross_tests.sh"Jenkins2015-05-112-99/+0
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Remove run_cross_tests.shDoug Hellmann2015-05-052-99/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | This script is part of the oslotest package now. Change-Id: Ic8c2fbaf5b34d2f254a9091a1b4390b7c8e751fe
* | | | Updated from global requirementsOpenStack Proposal Bot2015-05-071-1/+1
|/ / / | | | | | | | | | Change-Id: Iee9a84f36c33cb5d873ae71d59896e52d6ebbd98
* | | Merge "Updated from global requirements"Jenkins2015-05-033-3/+3
|\ \ \
| * | | Updated from global requirementsOpenStack Proposal Bot2015-05-013-3/+3
| | | | | | | | | | | | | | | | Change-Id: I618ce086bbc0942233e386f147f912e6bfc9c321
* | | | Imported Translations from TransifexOpenStack Proposal Bot2015-05-037-61/+14
|/ / / | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I226b4993533c4ce4a9278075dbf50707429b9178
* | | Merge "Update to latest hacking"Jenkins2015-04-304-12/+12
|\ \ \
| * | | Update to latest hackingDoug Hellmann2015-04-034-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update to the version of hacking used in kilo and fix class declarations that cause the new version to report errors. Change-Id: I69c4976a2d611a19675cd5919d498abda7856a88
* | | | Add Python 3 classifiers to setup.cfgVictor Stinner2015-04-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Python 3, 3.3 and 3.4 classifiers. The "Python :: 3" classifier is needed by the caniusepython3 tool to check if dependencies of a project are Python 3 compatible: https://caniusepython3.com/ Information on the Python 3 port of OpenStack: https://wiki.openstack.org/wiki/Python3 Change-Id: I2a0c8d7c3ab3c97a945a49b64a56341c35ec5536
* | | | Uncap library requirements for liberty1.9.0Doug Hellmann2015-04-163-8/+8
| |/ / |/| | | | | | | | | | | Change-Id: Ic2a02e5b054fec76265576e1f4f23b20f5728125 Depends-On: Ib948b756b8e6ca47a4c9c44c48031e54b7386a06
* | | Merge "Add pypi download + version badges"1.8.0Jenkins2015-04-102-10/+25
|\ \ \
| * | | Add pypi download + version badgesJoshua Harlow2015-04-072-10/+25
| |/ / | | | | | | | | | | | | | | | | | | | | | Also makes the docs look more like the other oslo libraries so that the content is easily readable across projects. Change-Id: Idb17dd30403daa130176643f4609fdd7c61c076e
* | | Merge "Sanity check after migration"Jenkins2015-04-103-5/+11
|\ \ \
| * | | Sanity check after migrationMarco Fargetta2015-04-103-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a sanity_check call after the migration, so if a table in the migration scripts is created not correctly the exception arise before to go in production. Closes-Bug: #1428065 Change-Id: Ib91f2471fa389a6072e8c2aa302504a6c068aa0a
* | | | Merge "exc_filters: support for ForeignKey error on delete"Jenkins2015-04-102-5/+80
|\ \ \ \ | |/ / / |/| | |
| * | | exc_filters: support for ForeignKey error on deleteJulien Danjou2015-04-072-5/+80
| |/ / | | | | | | | | | | | | | | | | | | | | | The current code only supports this type of constraint on INSERT, this adds support for DELETE. Change-Id: I981eb5f7b71bd37a35a93bbd3fada01d74aba12d Closes-Bug: #1439358
* | | Merge "Handle CHECK constraint integrity in PostgreSQL"Jenkins2015-04-103-0/+50
|\ \ \
| * | | Handle CHECK constraint integrity in PostgreSQLJulien Danjou2015-04-033-0/+50
| |/ / | | | | | | | | | | | | | | | | | | | | | PostgreSQL offers CHECK constraints integrity which are currently raised as generic error. This patch add a filter so they can have their own exception type. Change-Id: I7e36ef4385b227d1e62e18277d470047a369a238
* | | Merge "Add filters for DBDataError exception"Jenkins2015-04-103-0/+69
|\ \ \
| * | | Add filters for DBDataError exceptionRoman Podoliaka2015-04-093-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently don't distinguish DB errors, that are due to problems with the processed data (like division by zero, numeric value out of range, incorrect data type passed, etc) This actually led to a problem when MySQL threw two different errors depending on the randomly generated UUID value and we wrapped only one of those cases properly, which caused the test case to fail time to time in the gate. Closes-Bug: #1442178 Change-Id: I02891f3b1ede6f33834e5637be43496499cc88e7
* | | | Merge "Catch DBDuplicateError in MySQL if primary key is binary"Jenkins2015-04-092-1/+23
|\ \ \ \ | |/ / / |/| | |
| * | | Catch DBDuplicateError in MySQL if primary key is binaryJulien Danjou2015-03-262-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Gnocchi we use binary primary keys, and one a duplicate entry is inserted the error is not catched. This patches fixes that. Change-Id: I488628df1a3b91d842eb9fa76bc1878f12d37acd Closes-Bug: #1368297
* | | | Standardize setup.cfg summary for oslo libsSteve Martinelli2015-04-041-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | Rather than repeating the library name, have the summary use proper names instead. Change-Id: Icf76c338c2420cb08fdebe291be131dc5383964a
* | | Merge "Fixed bug in InsertFromSelect columns order"Jenkins2015-04-012-13/+105
|\ \ \
| * | | Fixed bug in InsertFromSelect columns orderTimofey Durakov2015-03-132-13/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous realization generates query string like: `INSERT INTO tbl1 SELECT tbl2.ID, tbl2.name, tbl2.currdate FROM tbl2;`. It doesn't specify columns in INSERT clause. If tbl1 columns differs from tbl2, execution of insert fails, or silently insert data in incorrect columns. To fix this implementation of class changed to default SQLAlchemy insert from select. added extra parameter 'columns', which allows to determine column order in INSERT clause. Closes-Bug:#1430884 Change-Id: Ica5cdea10d9aa253f395ec553559dba54e062028
* | | | Merge "Avoid excessing logging of RetryRequest exception"Jenkins2015-03-301-1/+5
|\ \ \ \ | |_|/ / |/| | |
| * | | Avoid excessing logging of RetryRequest exceptionEugene Nikanorov2015-03-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Such exception indicates of error condition only if retries are exceeded. In other cases error-level logs pollute the log file and complicate log analysis. Change-Id: I318867043a68a6499851631593859a0fffac6038 Closes-Bug: #1433001
* | | | Merge "Implement generic update-on-match feature"Jenkins2015-03-234-0/+987
|\ \ \ \
| * | | | Implement generic update-on-match featureMike Bayer2015-03-054-0/+987
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature provides the query.update_on_match() and query.update_returning_pk() methods, as well as the manufacture_persistent_object(), manufacture_entity_criteria(), and manufacture_criteria() utility functions. query.update_on_match() is used to UPDATE a row based on a variety of criteria, and to then return a fully persistent object state representing the row that was matched. It essentially intends to provide an UPDATE that is guaranteed to have matched a specific row in the presence of potential race conditions without using any locking, and to then return a record of that row as if it had been SELECTed. query.update_returning_pk() is a public method that also serves as part of the implementation of query.update_on_match(); this method delivers an UPDATE statement such that the primary key of the single row matched is returned; if zero or multiple rows are matched, and error is raised. To handle this, several backend-specific strategies are provided, which are automatically selected based on the best available. The lowest strategy performs a re-SELECT, but still assumes there's a simple unique column to be queried on, as is currently the use case in Nova (uuid is present). On Postgresql, MySQL and other databases besides SQLite and possibly DB2, more atomic strategies are used. Change-Id: I059f4ae6e72cfa6681a179314144214639f283ef
* | | | | Merge "Updated from global requirements"Jenkins2015-03-233-10/+10
|\ \ \ \ \
| * | | | | Updated from global requirementsOpenStack Proposal Bot2015-03-213-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie760385d750d52490b4e05225abecc17ff3210c7
* | | | | | Imported Translations from TransifexOpenStack Proposal Bot2015-03-212-13/+15
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: Ia882bd0eba82f558737d84830b70215da173cd3f
* | | | | Imported Translations from TransifexOpenStack Proposal Bot2015-03-193-24/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I7fdc702a07699e3fad9332a5ef8bfb6c704c37bd
* | | | | Provide working SQLA_VERSION attributeMike Bayer2015-03-183-8/+10
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repairs the parsing within test_utils tests to use the alphabetic-supporting version parser inside of compat/utils. Necessary in order to work with beta / dev versions of SQLAlchemy such as the current 1.0.0b1 release. Change-Id: Ic1ae9fa18171b687b1bb9cfac7411fac14e29a0f
* | | | Merge "Add process guards + invalidate to the connection pool"Jenkins2015-03-152-0/+61
|\ \ \ \
| * | | | Add process guards + invalidate to the connection poolMike Bayer2015-03-122-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not safe for a database TCP connection to be shared to a child process, as this is a file descriptor which will maintain its state on both sides. Applications such as Cinder which spin up multiprocessing subprocesses at startup time are subject to race conditions as a result. Instead of requiring that engines be explicitly prepared within a child process, we can detect and accommodate this situation in the connection pool itself, by tracking the originating pid of a connection, and if it changes on checkout, by invalidating. Change-Id: If116f7b7140b3eba064d8147e5f637a05beb1cd8
* | | | | Switch to non-namespaced module import - oslo_i18n1.7.0Davanum Srinivas2015-03-121-2/+2
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | Looks like we missed one! Closes-Bug: #1431268 Change-Id: I125c7fb66967b83e786c2f697d7bda68d361cb30