nova/nova/db/sqlalchemy
Kevin_Zheng c4820305d2 Use deepcopy when process filters in db api
In db API when we process filters, we didn't
use deepcopy. In cases of "tags" and "not-tags"
we used pop to get the first tag, filtered out
results, and then joined with other tags for
later filtering. When we did pop(), the original
value was deleted, the key "tags"/"not-tags" remains.

In the cell scenario, both single cell(we will
query cell0 and the other cell) and multicell,
as we have to query all the cells in a loop and
the tags list in the filter will keep popping,
this will lead to either a HTTP 500 error(popping
from an empty list) or incorrect result(when
number of tags in the list is larger than cell
number, no HTTP 500 will show, but the filter
results for each cell will be different as
each loop will pop one tag).

closes-bug: #1682693

Change-Id: Ia2738dd0c7d1842b68c83d0a9e75e26b2f8d492a
2017-04-17 14:40:13 -04:00
..
api_migrations [placement] Add Traits related table to the api database 2017-02-28 17:43:54 -05:00
migrate_repo Add uuid to Service model 2017-04-11 17:58:52 -04:00
__init__.py Remove SQLite BigInteger/Integer translation logic 2015-12-07 12:49:22 -05:00
api.py Use deepcopy when process filters in db api 2017-04-17 14:40:13 -04:00
api_models.py Rename the model object ResourceProviderTraits to ResourceProviderTrait 2017-03-31 10:38:19 +08:00
migration.py Revert "Optional separate database for placement API" 2016-08-25 13:51:16 -07:00
models.py Add uuid to Service model 2017-04-11 17:58:52 -04:00
resource_class_cache.py Fix some reST field lists in docstrings 2017-03-23 09:25:37 +08:00
types.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
utils.py Unwind circular import issue with api / utils 2016-09-27 15:05:56 -04:00