)]}'
{"ceilometer/compute/notifications/instance.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"53b85d9a9f5e3c79f85271136a16dbe4e0421e8c","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            user_id\u003dmessage[\u0027payload\u0027][\u0027user_id\u0027],"},{"line_number":67,"context_line":"            project_id\u003dmessage[\u0027payload\u0027][\u0027tenant_id\u0027],"},{"line_number":68,"context_line":"            resource_id\u003dmessage[\u0027payload\u0027][\u0027instance_id\u0027],"},{"line_number":69,"context_line":"            message\u003dself._organize_user_metadata(message))"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class Memory(ComputeInstanceNotificationBase):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2Fqr8%3D","line":69,"updated":"2014-03-04 19:11:47.000000000","message":"As this call is needed in every child of ComputeInstanceNotificationBase I would move this call to that base class into a pre_process_notification function that is called before process_notification","commit_id":"f14dae19a2b31be5ce7d053002a35128b225bad3"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d86175f1bbdaf91dcae9b7859d5cea9390c628e7","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            user_id\u003dmessage[\u0027payload\u0027][\u0027user_id\u0027],"},{"line_number":67,"context_line":"            project_id\u003dmessage[\u0027payload\u0027][\u0027tenant_id\u0027],"},{"line_number":68,"context_line":"            resource_id\u003dmessage[\u0027payload\u0027][\u0027instance_id\u0027],"},{"line_number":69,"context_line":"            message\u003dself._organize_user_metadata(message))"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class Memory(ComputeInstanceNotificationBase):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2FqBE%3D","line":69,"in_reply_to":"AAAAVn%2F%2Fqr8%3D","updated":"2014-03-04 20:29:29.000000000","message":"Good idea, see what you think of the latest version.","commit_id":"f14dae19a2b31be5ce7d053002a35128b225bad3"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"cda850840ea42f4952755ba43c9d2808aa17608d","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            message[\u0027payload\u0027][\u0027request_spec\u0027]"},{"line_number":43,"context_line":"            [\u0027instance_properties\u0027][\u0027project_id\u0027],"},{"line_number":44,"context_line":"            resource_id\u003dmessage[\u0027payload\u0027][\u0027instance_id\u0027],"},{"line_number":45,"context_line":"            message\u003dmessage)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FlTk%3D","line":45,"updated":"2014-03-05 08:16:19.000000000","message":"Is there a chance that here we have metadata too, which should be converted? IIRC, I saw a notification with this type earlier and there were an \u0027instance_properties\u0027 section, where I saw metadata.","commit_id":"e12eb7a2daffbe721e9c222a83a46a552940a2e0"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"ae3f5ecac5fa079c8eb5b52debbd3f52551c399a","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            message[\u0027payload\u0027][\u0027request_spec\u0027]"},{"line_number":43,"context_line":"            [\u0027instance_properties\u0027][\u0027project_id\u0027],"},{"line_number":44,"context_line":"            resource_id\u003dmessage[\u0027payload\u0027][\u0027instance_id\u0027],"},{"line_number":45,"context_line":"            message\u003dmessage)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FhRk%3D","line":45,"in_reply_to":"AAAAVn%2F%2FlII%3D","updated":"2014-03-05 16:25:12.000000000","message":"OK, thanks for pointing this out. So it turns out that the user metadata is actually present in the \u0027scheduler.run_instance.scheduled\u0027 notification but located in a different place, i.e.:\n\n  message[\u0027payload\u0027][\u0027request_spec\u0027][\u0027instance_properties\u0027][\u0027metadata\u0027]\n\nas opposed to:\n\n  message[\u0027payload\u0027][\u0027metadata\u0027]\n\nI\u0027ve updated the mapping of metadata keys so that this location is now parameterized and a real up-to-date \u0027scheduler.run_instance.scheduled\u0027 notification payload is used in the test.","commit_id":"e12eb7a2daffbe721e9c222a83a46a552940a2e0"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a033d3fdee93a3ba5ad01dbd8ed350464cfdc5c4","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            message[\u0027payload\u0027][\u0027request_spec\u0027]"},{"line_number":43,"context_line":"            [\u0027instance_properties\u0027][\u0027project_id\u0027],"},{"line_number":44,"context_line":"            resource_id\u003dmessage[\u0027payload\u0027][\u0027instance_id\u0027],"},{"line_number":45,"context_line":"            message\u003dmessage)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FlII%3D","line":45,"in_reply_to":"AAAAVn%2F%2FlPo%3D","updated":"2014-03-05 08:50:51.000000000","message":"Thanks for checking.","commit_id":"e12eb7a2daffbe721e9c222a83a46a552940a2e0"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"3e5643f9c1069217105e68c249c67e683a3392d9","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            message[\u0027payload\u0027][\u0027request_spec\u0027]"},{"line_number":43,"context_line":"            [\u0027instance_properties\u0027][\u0027project_id\u0027],"},{"line_number":44,"context_line":"            resource_id\u003dmessage[\u0027payload\u0027][\u0027instance_id\u0027],"},{"line_number":45,"context_line":"            message\u003dmessage)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FlPo%3D","line":45,"in_reply_to":"AAAAVn%2F%2FlTk%3D","updated":"2014-03-05 08:29:42.000000000","message":"That\u0027s a fair point, I had assumed not, but will check that notification payload from the nova-sched side.","commit_id":"e12eb7a2daffbe721e9c222a83a46a552940a2e0"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a3bfe621a8a4e33f37990397baaf8e1c1b017d23","unresolved":false,"context_lines":[{"line_number":31,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":32,"context_line":"class UserMetadataAwareInstanceNotificationBase("},{"line_number":33,"context_line":"        notifications.ComputeNotificationBase):"},{"line_number":34,"context_line":"    \"\"\"Consomes notifications containing instance user metadata."},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def process_notification(self, message):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FhKs%3D","line":34,"updated":"2014-03-05 16:35:22.000000000","message":"s/Consomes/Consumes/","commit_id":"da276dc9753dceb9f7c41354114002629eb63bad"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a3bfe621a8a4e33f37990397baaf8e1c1b017d23","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return self.get_sample(message)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_instance_properties(self, message):"},{"line_number":46,"context_line":"        \"\"\"Retrived instance properties from notification payload.\"\"\""},{"line_number":47,"context_line":"        return message[\u0027payload\u0027]"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FhKM%3D","line":46,"updated":"2014-03-05 16:35:22.000000000","message":"s/Retrived/Retrieved/","commit_id":"da276dc9753dceb9f7c41354114002629eb63bad"}],"ceilometer/compute/util.py":[{"author":{"_account_id":2860,"name":"litong01","email":"email4tong@yahoo.com","username":"litong01"},"change_message_id":"60e0a8b782c6a291b93959b1a42a2b5340480adb","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def add_reserved_user_metadata(src_metadata, dest_metadata):"},{"line_number":35,"context_line":"    limit \u003d cfg.CONF.reserved_metadata_length"},{"line_number":36,"context_line":"    user_metadata \u003d {}"},{"line_number":37,"context_line":"    for prefix in cfg.CONF.reserved_metadata_namespace:"},{"line_number":38,"context_line":"        md \u003d dict("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2FqoY%3D","line":35,"updated":"2014-03-04 19:16:57.000000000","message":"can the limit to be out side of the method? seems to me we do not need\nto assign to it each time this method gets called.","commit_id":"f14dae19a2b31be5ce7d053002a35128b225bad3"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d86175f1bbdaf91dcae9b7859d5cea9390c628e7","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def add_reserved_user_metadata(src_metadata, dest_metadata):"},{"line_number":35,"context_line":"    limit \u003d cfg.CONF.reserved_metadata_length"},{"line_number":36,"context_line":"    user_metadata \u003d {}"},{"line_number":37,"context_line":"    for prefix in cfg.CONF.reserved_metadata_namespace:"},{"line_number":38,"context_line":"        md \u003d dict("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2FqTg%3D","line":35,"in_reply_to":"AAAAVn%2F%2FqoY%3D","updated":"2014-03-04 20:29:29.000000000","message":"I don\u0027t really understand the issue here, as the cost of a lookup on the global cfg.CONF is minimal.","commit_id":"f14dae19a2b31be5ce7d053002a35128b225bad3"}],"ceilometer/tests/compute/notifications/test_instance.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"492d696ccd315a1beaac69b07886b69fc9f57467","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                 u\u0027launched_at\u0027: u\u00272013-01-04T15:10:14.923939\u0027,"},{"line_number":204,"context_line":"                 u\u0027metadata\u0027: {u\u0027metering.server_group\u0027: u\u0027Group_A\u0027,"},{"line_number":205,"context_line":"                               u\u0027AutoScalingGroupName\u0027: u\u0027tyky-Group_Awste7\u0027,"},{"line_number":206,"context_line":"                               u\u0027metering.foo.bar\u0027: u\u0027true\u0027},"},{"line_number":207,"context_line":"                 u\u0027ramdisk_id\u0027: u\u00275f23128e-5525-46d8-bc66-9c30cd87141a\u0027,"},{"line_number":208,"context_line":"                 u\u0027access_ip_v6\u0027: None,"},{"line_number":209,"context_line":"                 u\u0027disk_gb\u0027: 20,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FpoM%3D","line":206,"updated":"2014-03-04 21:31:46.000000000","message":"It seems to be the same set of metadata in every test data, it could be refactored to use it from a common place.","commit_id":"e12eb7a2daffbe721e9c222a83a46a552940a2e0"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a033d3fdee93a3ba5ad01dbd8ed350464cfdc5c4","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                 u\u0027launched_at\u0027: u\u00272013-01-04T15:10:14.923939\u0027,"},{"line_number":204,"context_line":"                 u\u0027metadata\u0027: {u\u0027metering.server_group\u0027: u\u0027Group_A\u0027,"},{"line_number":205,"context_line":"                               u\u0027AutoScalingGroupName\u0027: u\u0027tyky-Group_Awste7\u0027,"},{"line_number":206,"context_line":"                               u\u0027metering.foo.bar\u0027: u\u0027true\u0027},"},{"line_number":207,"context_line":"                 u\u0027ramdisk_id\u0027: u\u00275f23128e-5525-46d8-bc66-9c30cd87141a\u0027,"},{"line_number":208,"context_line":"                 u\u0027access_ip_v6\u0027: None,"},{"line_number":209,"context_line":"                 u\u0027disk_gb\u0027: 20,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FlIo%3D","line":206,"in_reply_to":"AAAAVn%2F%2FlPw%3D","updated":"2014-03-05 08:50:51.000000000","message":"Yes, totally agree with fixing it later. I mentioned that in my \u0027+1 review speech\u0027 that this refactor most probably should be the part of a separate patch as refactoring is, I think, out of the scope of a bugfix like this. I just wanted to use the opportunity to mention that this part looks like a good candidate. :)","commit_id":"e12eb7a2daffbe721e9c222a83a46a552940a2e0"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"3e5643f9c1069217105e68c249c67e683a3392d9","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                 u\u0027launched_at\u0027: u\u00272013-01-04T15:10:14.923939\u0027,"},{"line_number":204,"context_line":"                 u\u0027metadata\u0027: {u\u0027metering.server_group\u0027: u\u0027Group_A\u0027,"},{"line_number":205,"context_line":"                               u\u0027AutoScalingGroupName\u0027: u\u0027tyky-Group_Awste7\u0027,"},{"line_number":206,"context_line":"                               u\u0027metering.foo.bar\u0027: u\u0027true\u0027},"},{"line_number":207,"context_line":"                 u\u0027ramdisk_id\u0027: u\u00275f23128e-5525-46d8-bc66-9c30cd87141a\u0027,"},{"line_number":208,"context_line":"                 u\u0027access_ip_v6\u0027: None,"},{"line_number":209,"context_line":"                 u\u0027disk_gb\u0027: 20,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FlPw%3D","line":206,"in_reply_to":"AAAAVn%2F%2FpoM%3D","updated":"2014-03-05 08:29:42.000000000","message":"Yeah that\u0027s a fair point, in fact there\u0027s a huge amount of commonality/duplication throughout the fake notification payloads in these tests.\n\nI\u0027m guessing that\u0027s because the original versions were just copied wholescale from logs or whatnot and then used in raw form so as to be as realistic as possible. Over time we\u0027ve then hacked on these payloads manually, as the goalposts have shifted on the sender side.\n\nWe could refactor this approach, and significantly shorten the test sourcefiles as a result, but it would probably be best to do this in one fell swoop as opposed to a piece-wise approach.","commit_id":"e12eb7a2daffbe721e9c222a83a46a552940a2e0"}]}
