ceilometer/ceilometer/tests/storage
Igor Degtiarov f379b96dd2 [MongoDB] Fix bug with 'bad' chars in metadatas keys
MongoDB has two restrictions on fields names, they cannot contain '.' and
start with '$'. In resource_metadata field we can get any data, so it could
be dict with any keys, and if some key contain i.e. dots sample with this
metadata wouldn't be stored in MongoDB.

To protect samples from missing this patch propose to check metadata
for occurrence of dots and '$' in keys if metadata is dict, and to transform
dict with dots before storing it in MongoDB. Transformation means that
we make dict more nested and new node appears where there is dot in dict
key.

It means that if we get metadata as a dict {'a.b.c': v} before storing in
MongoDB it would be transform in {'a': {'b': {'c': v}}}.

Closes-Bug: 1246264
Change-Id: I279ae67cd24d4dadd7d7e58007e7c5c297d91772
2014-12-01 15:51:25 +02:00
..
sqlalchemy Switch to oslotest 2014-08-21 11:42:15 +02:00
__init__.py Move tests into ceilometer module 2013-11-13 15:32:31 +01:00
test_base.py Switch to oslotest 2014-08-21 11:42:15 +02:00
test_get_connection.py Fix order of arguments in assertEqual 2014-11-24 13:34:48 +04:00
test_impl_db2.py clean capabilities 2014-10-09 19:36:14 +00:00
test_impl_hbase.py clean capabilities 2014-10-09 19:36:14 +00:00
test_impl_log.py Switch to oslotest 2014-08-21 11:42:15 +02:00
test_impl_mongodb.py clean capabilities 2014-10-09 19:36:14 +00:00
test_impl_sqlalchemy.py clean capabilities 2014-10-09 19:36:14 +00:00
test_models.py Correct alarm timestamp field in unittest code 2014-11-07 11:02:39 +08:00
test_pymongo_base.py Correct alarm timestamp field in unittest code 2014-11-07 11:02:39 +08:00
test_storage_scenarios.py [MongoDB] Fix bug with 'bad' chars in metadatas keys 2014-12-01 15:51:25 +02:00