ceilometer/ceilometer
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
..
alarm Merge "Add timeout to all http requests" 2014-11-25 15:38:04 +00:00
api Merge "Internal error with period overflow" 2014-11-26 15:25:43 +00:00
central Add timeout to all http requests 2014-11-20 03:00:22 +08:00
cmd create skeleton files for event storage backends 2014-10-02 13:43:51 -04:00
compute Fixes Hyper-V Inspector disk metrics cache issue 2014-11-24 19:57:57 +02:00
data_processing Fix help strings 2014-09-02 19:59:16 +02:00
dispatcher Allow collector service database connection retry 2014-10-21 14:17:05 +00:00
energy Add timeout to all http requests 2014-11-20 03:00:22 +08:00
event Fix some nits or typos found by chance 2014-11-03 19:18:28 +08:00
hardware Fix some nits or typos found by chance 2014-11-03 19:18:28 +08:00
identity Change event type for identity trust notifications 2014-11-13 18:33:24 +04:00
image Add timeout to all http requests 2014-11-20 03:00:22 +08:00
ipmi Switch to oslo.concurrency 2014-11-17 14:42:04 +01:00
locale Imported Translations from Transifex 2014-11-25 06:09:49 +00:00
network Merge "Support to capture network services notifications" 2014-11-25 21:45:43 +00:00
objectstore fix swift middleware parsing 2014-11-24 10:28:45 -05:00
openstack Switch to oslo.concurrency 2014-11-17 14:42:04 +01:00
orchestration Remove redundant parentheses 2014-08-25 16:22:28 +04:00
profiler Fix help strings 2014-09-02 19:59:16 +02:00
publisher Add encoding to keys in compute_signature 2014-11-12 12:35:02 +04:00
storage [MongoDB] Fix bug with 'bad' chars in metadatas keys 2014-12-01 15:51:25 +02:00
tests [MongoDB] Fix bug with 'bad' chars in metadatas keys 2014-12-01 15:51:25 +02:00
transformer Merge "Remove redundant parentheses" 2014-08-26 10:51:20 +00:00
volume Add new notifications types for volumes/snapshots 2014-11-12 17:50:53 +04:00
__init__.py Switch to a custom NotImplementedError 2014-09-15 18:16:10 +02:00
agent.py Skip to poll and publish when no resources found 2014-11-16 10:40:47 +08:00
cli.py Switch to oslo.utils 2014-08-22 14:52:13 +02:00
collector.py Fix help strings 2014-09-02 19:59:16 +02:00
coordination.py Fix help strings 2014-09-02 19:59:16 +02:00
messaging.py Use oslo.msg retry API in rpc publisher 2014-09-25 11:11:24 +02:00
middleware.py Fix H405 violations and re-enable gating 2014-07-01 13:41:27 +03:00
neutron_client.py Add timeout to all http requests 2014-11-20 03:00:22 +08:00
notification.py Don't keep a single global TRANSPORT object 2014-06-16 10:31:13 +02:00
notifier.py Fix H307 violations and re-enable gating 2014-07-01 13:34:54 +03:00
nova_client.py Add timeout to all http requests 2014-11-20 03:00:22 +08:00
opts.py sync and clean up oslo 2014-10-14 07:31:06 -04:00
pipeline.py transform samples only when transformers exist 2014-11-18 15:40:30 -05:00
plugin.py Clarify deprecation comment to be accurate 2014-10-14 17:37:59 +01:00
sample.py Add __repr__ method for sample.Sample 2014-10-30 00:07:53 +08:00
service.py Add timeout to all http requests 2014-11-20 03:00:22 +08:00
utils.py Switch to oslo.concurrency 2014-11-17 14:42:04 +01:00