)]}'
{"ceilometer/network/notifications.py":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"31f26b184054db76028f88e83c504edcf532e474","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class RouterInterface(NetworkNotificationBase):"},{"line_number":153,"context_line":"    \"\"\"Listen for Neutron notifications."},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    Listen in order to mediate with the metering framework."},{"line_number":156,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_3af901c9","line":153,"updated":"2014-11-11 01:40:52.000000000","message":"These docstring actually say nothing, but we already do in the old code, sigh","commit_id":"5c83e91f1012816f88b5e52852fdfd1c7dc96d84"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"9efa047590248ee42e92d6034ceb3dc8c42db710","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                message\u003dresource_message)"},{"line_number":103,"context_line":"            # NOTE(fcharlier): remove \u0027counter_name\u0027 from the event_type"},{"line_number":104,"context_line":"            # in case it contains dots."},{"line_number":105,"context_line":"            event_type_split \u003d resource_message[\u0027event_type\u0027].replace("},{"line_number":106,"context_line":"                counter_name, \u0027\u0027, 1).split(\u0027.\u0027)"},{"line_number":107,"context_line":"            if len(event_type_split) \u003e 2:"},{"line_number":108,"context_line":"                yield sample.Sample.from_notification("}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_9940c835","line":105,"updated":"2014-11-14 13:34:51.000000000","message":"What about FloatingIP is it is the same behaviour as previous? In FloatingIP we already have counter_name contains the dot. If nothing happened it seems that this replace is redundant, amirigth?","commit_id":"46eed86dd922bfcbb3e90b69d1cc117e27ac1d1b"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"76937b1ee36c73832dbfee46efd701c8ed52a58a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                message\u003dresource_message)"},{"line_number":103,"context_line":"            # NOTE(fcharlier): remove \u0027counter_name\u0027 from the event_type"},{"line_number":104,"context_line":"            # in case it contains dots."},{"line_number":105,"context_line":"            event_type_split \u003d resource_message[\u0027event_type\u0027].replace("},{"line_number":106,"context_line":"                counter_name, \u0027\u0027, 1).split(\u0027.\u0027)"},{"line_number":107,"context_line":"            if len(event_type_split) \u003e 2:"},{"line_number":108,"context_line":"                yield sample.Sample.from_notification("}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_f5c8ec56","line":105,"in_reply_to":"5a890539_39343449","updated":"2014-11-14 15:41:21.000000000","message":"François yep I got it. I see dot in  that in counter_name in class FloatingIP. And in test that you have added event_type is started with \u0027router\u0027. Maybe we need some additional tests for that case?","commit_id":"46eed86dd922bfcbb3e90b69d1cc117e27ac1d1b"},{"author":{"_account_id":1918,"name":"François Charlier","email":"francois.charlier@redhat.com","username":"francois-charlier"},"change_message_id":"3b4aee0c28847484e95a579548e784a3f2d1be78","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                message\u003dresource_message)"},{"line_number":103,"context_line":"            # NOTE(fcharlier): remove \u0027counter_name\u0027 from the event_type"},{"line_number":104,"context_line":"            # in case it contains dots."},{"line_number":105,"context_line":"            event_type_split \u003d resource_message[\u0027event_type\u0027].replace("},{"line_number":106,"context_line":"                counter_name, \u0027\u0027, 1).split(\u0027.\u0027)"},{"line_number":107,"context_line":"            if len(event_type_split) \u003e 2:"},{"line_number":108,"context_line":"                yield sample.Sample.from_notification("}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_39343449","line":105,"in_reply_to":"5a890539_9940c835","updated":"2014-11-14 14:10:04.000000000","message":"@Igor: The \u0027event_type\u0027 received from neutron starts with \u0027floatingip\u0027 and does not contain a dot (see example samples from the tests).","commit_id":"46eed86dd922bfcbb3e90b69d1cc117e27ac1d1b"},{"author":{"_account_id":1918,"name":"François Charlier","email":"francois.charlier@redhat.com","username":"francois-charlier"},"change_message_id":"44af41d5563190bc5e94f05a3039a670ed3f5f52","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                message\u003dresource_message)"},{"line_number":103,"context_line":"            # NOTE(fcharlier): remove \u0027counter_name\u0027 from the event_type"},{"line_number":104,"context_line":"            # in case it contains dots."},{"line_number":105,"context_line":"            event_type_split \u003d resource_message[\u0027event_type\u0027].replace("},{"line_number":106,"context_line":"                counter_name, \u0027\u0027, 1).split(\u0027.\u0027)"},{"line_number":107,"context_line":"            if len(event_type_split) \u003e 2:"},{"line_number":108,"context_line":"                yield sample.Sample.from_notification("}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_4c058444","line":105,"in_reply_to":"5a890539_f5c8ec56","updated":"2014-11-17 17:51:19.000000000","message":"Igor, not sure about what kind of test you\u0027d like to see here … In the case of floating IPs, \u0027counter_name\u0027 sent from neutron is \u0027flaotingip\u0027 and \u0027counter_name\u0027 stored in ceilometer is \u0027ip.floating\u0027 (the one defined in the class down this file) whereas in the case of router interfaces, \u0027counter_name\u0027 sent by neutron really is \u0027router.interface\u0027 which I had to redefine just because the resource name doesn\u0027t match.","commit_id":"46eed86dd922bfcbb3e90b69d1cc117e27ac1d1b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"8b5876a3aed90e69bbd73c28085df5fa677412f5","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    Listen in order to mediate with the metering framework."},{"line_number":156,"context_line":"    \"\"\""},{"line_number":157,"context_line":"    resource_name \u003d \u0027router_interface\u0027"},{"line_number":158,"context_line":"    counter_name \u003d \u0027router.interface\u0027"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_8a6e7f94","line":157,"updated":"2014-12-03 21:04:55.000000000","message":"so the listener for look for events with router_interface.create/update/exists event_types...but the event_type is router.interface.create/update/exists.\n\nthis won\u0027t pick up any items.","commit_id":"46eed86dd922bfcbb3e90b69d1cc117e27ac1d1b"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"911f9a5721cbeb273182dfbb32b8092f3568e079","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    Listen in order to mediate with the metering framework."},{"line_number":156,"context_line":"    \"\"\""},{"line_number":157,"context_line":"    resource_name \u003d \u0027router_interface\u0027"},{"line_number":158,"context_line":"    counter_name \u003d \u0027router.interface\u0027"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_3878772a","line":157,"in_reply_to":"5a890539_48801af7","updated":"2014-12-04 03:18:12.000000000","message":"I think it\u0027d be better to fix in the neutron side. But I think Ln81-Ln89 needs to be modified too, they\u0027re already dirty. We could introduce a class attribute such as payload_key.","commit_id":"46eed86dd922bfcbb3e90b69d1cc117e27ac1d1b"},{"author":{"_account_id":1918,"name":"François Charlier","email":"francois.charlier@redhat.com","username":"francois-charlier"},"change_message_id":"8eb1c182f0745971243806ae4f832dbacda126d0","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    Listen in order to mediate with the metering framework."},{"line_number":156,"context_line":"    \"\"\""},{"line_number":157,"context_line":"    resource_name \u003d \u0027router_interface\u0027"},{"line_number":158,"context_line":"    counter_name \u003d \u0027router.interface\u0027"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_48801af7","line":157,"in_reply_to":"5a890539_8a6e7f94","updated":"2014-12-03 23:34:22.000000000","message":"Didn\u0027t catch this one.\n\nI changed to \u0027router_interface\u0027 because of the resource name in the payload … (See neutron code: on the contrary to other notifications, the payload\u0027s resource name doesn\u0027t match the beginning of the event name https://github.com/openstack/neutron/blob/master/neutron/db/l3_db.py#L1146-L1148)\n\nIf I change the resource_name to \u0027router.interface\u0027 the notifications will be picked up but the payload will be ignored (the resource_name in payload is \u0027router_interface\u0027 …).\n\nIt could be treated as a special case with an \u0027if resource_name \u003d\u003d …\u0027 near line 81 but it would be dirty … Or maybe it should be fixed in neutron ?","commit_id":"46eed86dd922bfcbb3e90b69d1cc117e27ac1d1b"}],"ceilometer/tests/network/test_notifications.py":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"31f26b184054db76028f88e83c504edcf532e474","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    u\u0027_context_user_id\u0027: u\u0027e500fb22d7b244609169f5f916bd286d\u0027,"},{"line_number":269,"context_line":"    u\u0027_context_user_name\u0027: u\u0027demo\u0027,"},{"line_number":270,"context_line":"    u\u0027_unique_id\u0027: u\u00270c784e16ed43416cadf8da6eda37c11e\u0027,"},{"line_number":271,"context_line":"    u\u0027event_type\u0027: u\u0027router.interface.create\u0027,"},{"line_number":272,"context_line":"    u\u0027message_id\u0027: u\u0027f61da188-71f4-4fa6-87c9-463e933aa6e0\u0027,"},{"line_number":273,"context_line":"    u\u0027payload\u0027: {u\u0027router_interface\u0027:"},{"line_number":274,"context_line":"                 {u\u0027id\u0027: u\u0027d1a84bb3-b615-488c-9fb9-5e70ac67f981\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_bad33137","line":271,"updated":"2014-11-11 01:40:52.000000000","message":"Are you sure the event_type is router.interface.create in reality? Most Neutron messages are in the format of: resource.action.{start,end}","commit_id":"5c83e91f1012816f88b5e52852fdfd1c7dc96d84"},{"author":{"_account_id":1918,"name":"François Charlier","email":"francois.charlier@redhat.com","username":"francois-charlier"},"change_message_id":"af1f0e0a2fb4c83bc16953d6eb415c62891654a7","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    u\u0027_context_user_id\u0027: u\u0027e500fb22d7b244609169f5f916bd286d\u0027,"},{"line_number":269,"context_line":"    u\u0027_context_user_name\u0027: u\u0027demo\u0027,"},{"line_number":270,"context_line":"    u\u0027_unique_id\u0027: u\u00270c784e16ed43416cadf8da6eda37c11e\u0027,"},{"line_number":271,"context_line":"    u\u0027event_type\u0027: u\u0027router.interface.create\u0027,"},{"line_number":272,"context_line":"    u\u0027message_id\u0027: u\u0027f61da188-71f4-4fa6-87c9-463e933aa6e0\u0027,"},{"line_number":273,"context_line":"    u\u0027payload\u0027: {u\u0027router_interface\u0027:"},{"line_number":274,"context_line":"                 {u\u0027id\u0027: u\u0027d1a84bb3-b615-488c-9fb9-5e70ac67f981\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_d3b43fd3","line":271,"in_reply_to":"5a890539_bad33137","updated":"2014-11-12 13:41:09.000000000","message":"Surprisingly, the resource name really is \u0027router.interface\u0027.\n\nSee: https://github.com/openstack/neutron/blob/master/neutron/db/l3_db.py#L1144","commit_id":"5c83e91f1012816f88b5e52852fdfd1c7dc96d84"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"31f26b184054db76028f88e83c504edcf532e474","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        v \u003d notifications.RouterInterface(mock.Mock())"},{"line_number":494,"context_line":"        samples \u003d list(v.process_notification("},{"line_number":495,"context_line":"            NOTIFICATION_ROUTER_INTERFACE_CREATE))"},{"line_number":496,"context_line":"        import pprint"},{"line_number":497,"context_line":"        pprint.pprint(samples)"},{"line_number":498,"context_line":"        self.assertEqual(1, len(samples))"},{"line_number":499,"context_line":"        self.assertEqual(\"router.interface\", samples[0].name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_9a0035ac","line":496,"updated":"2014-11-11 01:40:52.000000000","message":"-1: remove these debug code, L496-497","commit_id":"5c83e91f1012816f88b5e52852fdfd1c7dc96d84"},{"author":{"_account_id":1918,"name":"François Charlier","email":"francois.charlier@redhat.com","username":"francois-charlier"},"change_message_id":"af1f0e0a2fb4c83bc16953d6eb415c62891654a7","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        v \u003d notifications.RouterInterface(mock.Mock())"},{"line_number":494,"context_line":"        samples \u003d list(v.process_notification("},{"line_number":495,"context_line":"            NOTIFICATION_ROUTER_INTERFACE_CREATE))"},{"line_number":496,"context_line":"        import pprint"},{"line_number":497,"context_line":"        pprint.pprint(samples)"},{"line_number":498,"context_line":"        self.assertEqual(1, len(samples))"},{"line_number":499,"context_line":"        self.assertEqual(\"router.interface\", samples[0].name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_93be37d3","line":496,"in_reply_to":"5a890539_9a0035ac","updated":"2014-11-12 13:41:09.000000000","message":"Done","commit_id":"5c83e91f1012816f88b5e52852fdfd1c7dc96d84"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"31f26b184054db76028f88e83c504edcf532e474","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        import pprint"},{"line_number":497,"context_line":"        pprint.pprint(samples)"},{"line_number":498,"context_line":"        self.assertEqual(1, len(samples))"},{"line_number":499,"context_line":"        self.assertEqual(\"router.interface\", samples[0].name)"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    def test_network_exists(self):"},{"line_number":502,"context_line":"        v \u003d notifications.Network(mock.Mock())"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_fab4d9f3","line":499,"updated":"2014-11-11 01:40:52.000000000","message":"-1: I think here should be two samples, one is router.interface, the other one is router.interface.create, the UT passes because your notification event_type will be splited less then 2, so only router.interface sample is generated, and your test code can only set self.assertEqual(1, len(samples)). But I can be wrong if the message truly set the event_type to router.interface.create, if so, please let me know","commit_id":"5c83e91f1012816f88b5e52852fdfd1c7dc96d84"},{"author":{"_account_id":1918,"name":"François Charlier","email":"francois.charlier@redhat.com","username":"francois-charlier"},"change_message_id":"af1f0e0a2fb4c83bc16953d6eb415c62891654a7","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        import pprint"},{"line_number":497,"context_line":"        pprint.pprint(samples)"},{"line_number":498,"context_line":"        self.assertEqual(1, len(samples))"},{"line_number":499,"context_line":"        self.assertEqual(\"router.interface\", samples[0].name)"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    def test_network_exists(self):"},{"line_number":502,"context_line":"        v \u003d notifications.Network(mock.Mock())"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_73054b79","line":499,"in_reply_to":"5a890539_fab4d9f3","updated":"2014-11-12 13:41:09.000000000","message":"The event_type is really set to \u0027router.interface.create\u0027 (I in fact recorded the example notification directly from the message queue).\n\nSee: https://github.com/openstack/neutron/blob/master/neutron/db/l3_db.py#L1144","commit_id":"5c83e91f1012816f88b5e52852fdfd1c7dc96d84"}]}
