)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"ae3a60e4079382ac2005f63659ad17c889e0a03b","unresolved":false,"context_lines":[{"line_number":871,"context_line":"                resource_id\u003ds.resource_id,"},{"line_number":872,"context_line":"                timestamp\u003ds.timestamp.isoformat(),"},{"line_number":873,"context_line":"                resource_metadata\u003dutils.restore_nesting(s.resource_metadata,"},{"line_number":874,"context_line":"                                                        separator\u003d\u0027.\u0027),"},{"line_number":875,"context_line":"                source\u003ds.source)"},{"line_number":876,"context_line":"            published_samples.append(published_sample)"},{"line_number":877,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWn%2F%2F8Ic%3D","line":874,"updated":"2014-04-08 11:38:01.000000000","message":"Is it still a restore nesting function, when you use it for replace \u0027.\u0027 and transform that structure to a proper dict?","commit_id":"317d00124455f024efcceb09b5e184bd8fb1f7bc"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"41cd14fbb0159d70c007db1f61bbb3c81483d359","unresolved":false,"context_lines":[{"line_number":871,"context_line":"                resource_id\u003ds.resource_id,"},{"line_number":872,"context_line":"                timestamp\u003ds.timestamp.isoformat(),"},{"line_number":873,"context_line":"                resource_metadata\u003dutils.restore_nesting(s.resource_metadata,"},{"line_number":874,"context_line":"                                                        separator\u003d\u0027.\u0027),"},{"line_number":875,"context_line":"                source\u003ds.source)"},{"line_number":876,"context_line":"            published_samples.append(published_sample)"},{"line_number":877,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWn%2F%2F7vw%3D","line":874,"in_reply_to":"AAAAWn%2F%2F798%3D","updated":"2014-04-08 12:19:03.000000000","message":"I just remembered that there was a mixture of \u0027:\u0027 and \u0027.\u0027 in the flattened_metadata, but it is fixed now, so it\u0027s fine, I was just overreacting. :) The other part, where this question originated, is that I do not really understand that why the default value of the separator is \u0027:\u0027 and the value of it is \u0027.\u0027 here. Is it for supporting the reuse of this function?","commit_id":"317d00124455f024efcceb09b5e184bd8fb1f7bc"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"8efb4aeacd6c5c012299b1205c6fcbb05b1fbe89","unresolved":false,"context_lines":[{"line_number":871,"context_line":"                resource_id\u003ds.resource_id,"},{"line_number":872,"context_line":"                timestamp\u003ds.timestamp.isoformat(),"},{"line_number":873,"context_line":"                resource_metadata\u003dutils.restore_nesting(s.resource_metadata,"},{"line_number":874,"context_line":"                                                        separator\u003d\u0027.\u0027),"},{"line_number":875,"context_line":"                source\u003ds.source)"},{"line_number":876,"context_line":"            published_samples.append(published_sample)"},{"line_number":877,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWn%2F%2F7p0%3D","line":874,"in_reply_to":"AAAAWn%2F%2F7vw%3D","updated":"2014-04-08 12:28:43.000000000","message":"On the default value of separator, I was viewing utils.recursive_keypairs and utils.restore_nesting as a pair of inversion functions, where one flattens and the other unwinds.\n\nSo I just used the same default value for separator in restore_nesting for consistency.\n\nI could have just hardcoded the separator to \u0027.\u0027 for the one use-case for restore_nesting, but that would have seemed a tad inconsistent. \n\n(... and yep, recursive_keypairs \u0026 restore_nesting aren\u0027t true inverses, as the one generates keypairs whereas the other modifies a dict in-situ, but at a conceptual level that\u0027s how I viewed the two functions)","commit_id":"317d00124455f024efcceb09b5e184bd8fb1f7bc"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"7af20f6430748cb51d36e02fbd5b2e78c5497f91","unresolved":false,"context_lines":[{"line_number":871,"context_line":"                resource_id\u003ds.resource_id,"},{"line_number":872,"context_line":"                timestamp\u003ds.timestamp.isoformat(),"},{"line_number":873,"context_line":"                resource_metadata\u003dutils.restore_nesting(s.resource_metadata,"},{"line_number":874,"context_line":"                                                        separator\u003d\u0027.\u0027),"},{"line_number":875,"context_line":"                source\u003ds.source)"},{"line_number":876,"context_line":"            published_samples.append(published_sample)"},{"line_number":877,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWn%2F%2F798%3D","line":874,"in_reply_to":"AAAAWn%2F%2F8Ic%3D","updated":"2014-04-08 12:07:28.000000000","message":"Not sure if I fully get your point.\n\nIsn\u0027t resource_metadata already a dict, just with any nested elements flattened?\n\nSo my read on the function\u0027s purpose is to restore the nesting structure within the dict that was previously flattened (to keep WSME happy).\n\nDoes that notion sound wrong to you, or is it just the name that\u0027s unclear?","commit_id":"317d00124455f024efcceb09b5e184bd8fb1f7bc"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"feb9a0d75c612b1832f58ad137c2909e7a985b34","unresolved":false,"context_lines":[{"line_number":870,"context_line":"                project_id\u003ds.project_id,"},{"line_number":871,"context_line":"                resource_id\u003ds.resource_id,"},{"line_number":872,"context_line":"                timestamp\u003ds.timestamp.isoformat(),"},{"line_number":873,"context_line":"                resource_metadata\u003dutils.restore_nesting(s.resource_metadata,"},{"line_number":874,"context_line":"                                                        separator\u003d\u0027.\u0027),"},{"line_number":875,"context_line":"                source\u003ds.source)"},{"line_number":876,"context_line":"            published_samples.append(published_sample)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWn%2F%2F7lo%3D","line":873,"updated":"2014-04-08 12:33:06.000000000","message":"This really looks like an ugly hack, but I guess it\u0027ll be ok for now.","commit_id":"866ee8b16026f663c6548e254293672a533cadb5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"e03ef0a90962ddd4fa5d7b73ef581246d600db55","unresolved":false,"context_lines":[{"line_number":870,"context_line":"                project_id\u003ds.project_id,"},{"line_number":871,"context_line":"                resource_id\u003ds.resource_id,"},{"line_number":872,"context_line":"                timestamp\u003ds.timestamp.isoformat(),"},{"line_number":873,"context_line":"                resource_metadata\u003dutils.restore_nesting(s.resource_metadata,"},{"line_number":874,"context_line":"                                                        separator\u003d\u0027.\u0027),"},{"line_number":875,"context_line":"                source\u003ds.source)"},{"line_number":876,"context_line":"            published_samples.append(published_sample)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWn%2F%2F7N0%3D","line":873,"in_reply_to":"AAAAWn%2F%2F7lo%3D","updated":"2014-04-08 13:19:29.000000000","message":"Thinking about it some more, perhaps too hacky a hack!\n\nI\u0027ve realized that only the published sample should be unflattened, whereas the returned representation should be as provided by the caller.\n\nFixed in latest to avoid the in-situ modification of the resource metadata.","commit_id":"866ee8b16026f663c6548e254293672a533cadb5"}],"ceilometer/tests/api/v2/test_post_samples_scenarios.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"ae3a60e4079382ac2005f63659ad17c889e0a03b","unresolved":false,"context_lines":[{"line_number":74,"context_line":"               \u0027user_id\u0027: \u0027efd87807-12d2-4b38-9c70-5f5c2ac427ff\u0027,"},{"line_number":75,"context_line":"               \u0027resource_metadata\u0027: {\u0027nest.name1\u0027: \u0027value1\u0027,"},{"line_number":76,"context_line":"                                     \u0027name2\u0027: \u0027value2\u0027,"},{"line_number":77,"context_line":"                                     \u0027nest.name1\u0027: \u0027value3\u0027}}]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        data \u003d self.post_json(\u0027/meters/apples/\u0027, s1)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWn%2F%2F8O0%3D","line":77,"updated":"2014-04-08 11:38:01.000000000","message":"There are two \u0027nest.name1\u0027 items. I assume that it should be \u0027nest.name2\u0027 in the second occurrence.","commit_id":"317d00124455f024efcceb09b5e184bd8fb1f7bc"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"7af20f6430748cb51d36e02fbd5b2e78c5497f91","unresolved":false,"context_lines":[{"line_number":74,"context_line":"               \u0027user_id\u0027: \u0027efd87807-12d2-4b38-9c70-5f5c2ac427ff\u0027,"},{"line_number":75,"context_line":"               \u0027resource_metadata\u0027: {\u0027nest.name1\u0027: \u0027value1\u0027,"},{"line_number":76,"context_line":"                                     \u0027name2\u0027: \u0027value2\u0027,"},{"line_number":77,"context_line":"                                     \u0027nest.name1\u0027: \u0027value3\u0027}}]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        data \u003d self.post_json(\u0027/meters/apples/\u0027, s1)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWn%2F%2F8Co%3D","line":77,"in_reply_to":"AAAAWn%2F%2F8O0%3D","updated":"2014-04-08 12:07:28.000000000","message":"Well spotted, fixed.","commit_id":"317d00124455f024efcceb09b5e184bd8fb1f7bc"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"ae3a60e4079382ac2005f63659ad17c889e0a03b","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        unwound \u003d copy.copy(s1[0])"},{"line_number":89,"context_line":"        unwound[\u0027resource_metadata\u0027] \u003d {\u0027nest\u0027: {\u0027name1\u0027: \u0027value1\u0027,"},{"line_number":90,"context_line":"                                                 \u0027name1\u0027: \u0027value3\u0027},"},{"line_number":91,"context_line":"                                        \u0027name2\u0027: \u0027value2\u0027}"},{"line_number":92,"context_line":"        self.assertEqual(unwound, data.json[0])"},{"line_number":93,"context_line":"        self.assertEqual(unwound, self.published[0][1][\u0027args\u0027][\u0027data\u0027][0])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWn%2F%2F8Os%3D","line":90,"updated":"2014-04-08 11:38:01.000000000","message":"Here only \u0027value3\u0027 is present in this dict.","commit_id":"317d00124455f024efcceb09b5e184bd8fb1f7bc"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"7af20f6430748cb51d36e02fbd5b2e78c5497f91","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        unwound \u003d copy.copy(s1[0])"},{"line_number":89,"context_line":"        unwound[\u0027resource_metadata\u0027] \u003d {\u0027nest\u0027: {\u0027name1\u0027: \u0027value1\u0027,"},{"line_number":90,"context_line":"                                                 \u0027name1\u0027: \u0027value3\u0027},"},{"line_number":91,"context_line":"                                        \u0027name2\u0027: \u0027value2\u0027}"},{"line_number":92,"context_line":"        self.assertEqual(unwound, data.json[0])"},{"line_number":93,"context_line":"        self.assertEqual(unwound, self.published[0][1][\u0027args\u0027][\u0027data\u0027][0])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWn%2F%2F8Ck%3D","line":90,"in_reply_to":"AAAAWn%2F%2F8Os%3D","updated":"2014-04-08 12:07:28.000000000","message":"Well spotted, fixed.","commit_id":"317d00124455f024efcceb09b5e184bd8fb1f7bc"}],"ceilometer/tests/test_utils.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"ae3a60e4079382ac2005f63659ad17c889e0a03b","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            pairs \u003d list(utils.recursive_keypairs(data))"},{"line_number":79,"context_line":"            self.assertEqual(expected, pairs)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def test_restore_nesting(self):"},{"line_number":82,"context_line":"        metadata \u003d {\u0027a\u0027: \u0027A\u0027, \u0027b\u0027: \u0027B\u0027,"},{"line_number":83,"context_line":"                    \u0027nested:a\u0027: \u0027A\u0027,"},{"line_number":84,"context_line":"                    \u0027nested:b\u0027: \u0027B\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWn%2F%2F8Go%3D","line":81,"updated":"2014-04-08 11:38:01.000000000","message":"Are these two data structures fixed? I mean these are all the cases that can happen and addressed by that function tested here? I\u0027m not sure but maybe there can be some mixture that should be handled.\n\nAlso maybe it would be good to have a test with having \u0027nested:a:A\u0027: \u0027bubu\u0027, \u0027nested:a:B\u0027: \u0027bunny\u0027 to see that the recursion works properly on a level lower.","commit_id":"317d00124455f024efcceb09b5e184bd8fb1f7bc"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"7af20f6430748cb51d36e02fbd5b2e78c5497f91","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            pairs \u003d list(utils.recursive_keypairs(data))"},{"line_number":79,"context_line":"            self.assertEqual(expected, pairs)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def test_restore_nesting(self):"},{"line_number":82,"context_line":"        metadata \u003d {\u0027a\u0027: \u0027A\u0027, \u0027b\u0027: \u0027B\u0027,"},{"line_number":83,"context_line":"                    \u0027nested:a\u0027: \u0027A\u0027,"},{"line_number":84,"context_line":"                    \u0027nested:b\u0027: \u0027B\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWn%2F%2F8BA%3D","line":81,"in_reply_to":"AAAAWn%2F%2F8Go%3D","updated":"2014-04-08 12:07:28.000000000","message":"Fair point, done.","commit_id":"317d00124455f024efcceb09b5e184bd8fb1f7bc"}]}
