)]}'
{"ceilometer/publisher/messaging.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"066900d2e6e5f03f97553058f8a3b22e8bfdd575","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            raise_delivery_failure(e)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"class EventToSampleNotifierPublisher(MessagingPublisher):"},{"line_number":215,"context_line":"    def __init__(self, parsed_url,"},{"line_number":216,"context_line":"                 default_topic\u003d\u0027notifications\u0027):"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_3f06f2ce","line":214,"range":{"start_line":214,"start_character":55,"end_line":214,"end_character":57},"updated":"2016-01-13 06:05:24.000000000","message":"I think we can inherit from NotifierPublisher directly.","commit_id":"0e7a75d968ee63e6b7aaf194806ae8349c1c0182"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"9e7655400062df84e72b8a8e453af1f8c492059d","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            raise_delivery_failure(e)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"class EventToSampleNotifierPublisher(MessagingPublisher):"},{"line_number":215,"context_line":"    def __init__(self, parsed_url,"},{"line_number":216,"context_line":"                 default_topic\u003d\u0027notifications\u0027):"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_39d14dfc","line":214,"range":{"start_line":214,"start_character":55,"end_line":214,"end_character":57},"in_reply_to":"da6ed579_3f06f2ce","updated":"2016-01-18 07:16:06.000000000","message":"thanks, will update.","commit_id":"0e7a75d968ee63e6b7aaf194806ae8349c1c0182"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"066900d2e6e5f03f97553058f8a3b22e8bfdd575","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def _send(self, context, event_type, data):"},{"line_number":243,"context_line":"        try:"},{"line_number":244,"context_line":"            self.notifier.info(context.to_dict(), event_type\u003devent_type,"},{"line_number":245,"context_line":"                               payload\u003ddata)"},{"line_number":246,"context_line":"        except oslo_messaging.MessageDeliveryFailure as e:"},{"line_number":247,"context_line":"            raise_delivery_failure(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_1fa3ee50","line":244,"range":{"start_line":244,"start_character":71,"end_line":244,"end_character":72},"updated":"2016-01-13 06:05:24.000000000","message":"Use the event_type as the final notification type would confuse ceilometer\u0027s own generic notification listener. It can\u0027t distinguish it from the original notification of which the event is converted from, e.g.\n\nglance notification of type image.upload will be converted to a event image.update, which will be published by this publisher as an notification of same notification type image.upload. The notification listener ceilometer.meter.notification.ProcessMeterNotifications will treat it as a image.update notification from glance and try to convert it to a meter, in this case it might fail due to the payload difference in the 2 notifications, one from glance and one from this publisher.","commit_id":"0e7a75d968ee63e6b7aaf194806ae8349c1c0182"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"9e7655400062df84e72b8a8e453af1f8c492059d","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def _send(self, context, event_type, data):"},{"line_number":243,"context_line":"        try:"},{"line_number":244,"context_line":"            self.notifier.info(context.to_dict(), event_type\u003devent_type,"},{"line_number":245,"context_line":"                               payload\u003ddata)"},{"line_number":246,"context_line":"        except oslo_messaging.MessageDeliveryFailure as e:"},{"line_number":247,"context_line":"            raise_delivery_failure(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_7911055d","line":244,"range":{"start_line":244,"start_character":71,"end_line":244,"end_character":72},"in_reply_to":"da6ed579_1fa3ee50","updated":"2016-01-18 07:16:06.000000000","message":"\"glance notification of type image.upload will be converted to a event image.update\" -- I can\u0027t find this logic.\nI\u0027d agree that mix notifications from nova(and others)/ceilometer(in this publish) may cause above issues, looks like any special notification is come from only one OS component.\nDo you thinks it\u0027s possible that notification/event type from this publisher could be as same as from other component?","commit_id":"0e7a75d968ee63e6b7aaf194806ae8349c1c0182"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"6d345b5eba7a30d95c0dac2521bef7f49e91975b","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    def _send(self, context, event_type, data):"},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            self.notifier.info(context.to_dict(), event_type\u003devent_type,"},{"line_number":236,"context_line":"                               payload\u003ddata)"},{"line_number":237,"context_line":"        except oslo_messaging.MessageDeliveryFailure as e:"},{"line_number":238,"context_line":"            raise_delivery_failure(e)"},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_aa8f1922","line":236,"range":{"start_line":236,"start_character":43,"end_line":236,"end_character":44},"updated":"2016-01-21 08:31:31.000000000","message":"I still don\u0027t like the idea of having 2 different notifications from different sources of different payload  the same event_type, we don\u0027t have the ability to distinguish them then.\n\nI guess this notification is only meant to be received by ceilometer notification only in your use case, so i\u0027m thinking of adding a param to the publisher url to indicating a prefix to the event_type of the send out notifications","commit_id":"1c805d37479ea25357e9846552a5ebdcf676cea2"},{"author":{"_account_id":17081,"name":"Chaozhe Chen(ccz)","email":"chaozhe.chen@easystack.cn","username":"Chaozhe.Chen"},"change_message_id":"2a0ea448b0b045003e59c39f9bd3d6bb56dc91dc","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"class EventToSampleNotifierPublisher(NotifierPublisher):"},{"line_number":215,"context_line":"    def __init__(self, parsed_url,"},{"line_number":216,"context_line":"                 default_topic\u003d\u0027notifications\u0027):"},{"line_number":217,"context_line":"        super(EventToSampleNotifierPublisher, self).__init__(parsed_url,"},{"line_number":218,"context_line":"                                                             default_topic)"},{"line_number":219,"context_line":"        options \u003d urlparse.parse_qs(parsed_url.query)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a5de9d1_0f336915","line":216,"range":{"start_line":216,"start_character":17,"end_line":216,"end_character":48},"updated":"2016-01-30 09:47:39.000000000","message":"Why need this parameter? When we get publisher, we just need parameter \u0027url\u0027. As you want to send events to sample, should use \u0027metering_topic\u0027.","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"d39ba3b30d3c689ded090d14381ec7e66ca0d879","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"class EventToSampleNotifierPublisher(NotifierPublisher):"},{"line_number":215,"context_line":"    def __init__(self, parsed_url,"},{"line_number":216,"context_line":"                 default_topic\u003d\u0027notifications\u0027):"},{"line_number":217,"context_line":"        super(EventToSampleNotifierPublisher, self).__init__(parsed_url,"},{"line_number":218,"context_line":"                                                             default_topic)"},{"line_number":219,"context_line":"        options \u003d urlparse.parse_qs(parsed_url.query)"}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_7d853758","line":216,"range":{"start_line":216,"start_character":17,"end_line":216,"end_character":48},"in_reply_to":"7a5de9d1_0f336915","updated":"2016-02-18 02:29:54.000000000","message":"metering_topic is send metering/sample to message bus, \nthis publisher here is send a new transformed event as a  notifications message, so that sample listener will create a sample from it.\nsaid that, the default topic here should be \u0027notification\u0027, which is the default topic of sample listener.","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"c0973e86123fd865f89c548ed8d4a2c3a552a3c8","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        super(EventToSampleNotifierPublisher, self).__init__(parsed_url,"},{"line_number":218,"context_line":"                                                             default_topic)"},{"line_number":219,"context_line":"        options \u003d urlparse.parse_qs(parsed_url.query)"},{"line_number":220,"context_line":"        self.prefix \u003d options.get(\u0027prefix\u0027, \u0027\u0027)"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def publish_events(self, context, events):"},{"line_number":223,"context_line":"        \"\"\"Send an event as notification message for publishing"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a5de9d1_4822f4ba","line":220,"range":{"start_line":220,"start_character":44,"end_line":220,"end_character":47},"updated":"2016-01-29 02:10:03.000000000","message":"can we have a default prefix (e.g. \u0027ceilometer.event\u0027) and document the URL param for this publisher in the code?\n\nAlso please following the convention in Ln197 in case the user specify multiple prefix param in URL.\n\nIt would be better to document that in doc too, but that\u0027s another patch","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"f7539946750cc6689b79b0d46cc6343dc105aba6","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        super(EventToSampleNotifierPublisher, self).__init__(parsed_url,"},{"line_number":218,"context_line":"                                                             default_topic)"},{"line_number":219,"context_line":"        options \u003d urlparse.parse_qs(parsed_url.query)"},{"line_number":220,"context_line":"        self.prefix \u003d options.get(\u0027prefix\u0027, \u0027\u0027)"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def publish_events(self, context, events):"},{"line_number":223,"context_line":"        \"\"\"Send an event as notification message for publishing"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a5de9d1_55f7e4f4","line":220,"range":{"start_line":220,"start_character":44,"end_line":220,"end_character":47},"in_reply_to":"7a5de9d1_4822f4ba","updated":"2016-02-18 02:15:36.000000000","message":"Thanks. will update","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"}],"ceilometer/publisher/utils.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"066900d2e6e5f03f97553058f8a3b22e8bfdd575","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    msg \u003d {}"},{"line_number":152,"context_line":"    for trait in event.traits:"},{"line_number":153,"context_line":"        msg[trait.name] \u003d trait.value"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    return msg"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_7fab0a1e","line":153,"range":{"start_line":153,"start_character":32,"end_line":153,"end_character":37},"updated":"2016-01-13 06:05:24.000000000","message":"looks like we drop lots of information in event during this transition, are you sure it\u0027s ok?","commit_id":"0e7a75d968ee63e6b7aaf194806ae8349c1c0182"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"9e7655400062df84e72b8a8e453af1f8c492059d","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    msg \u003d {}"},{"line_number":152,"context_line":"    for trait in event.traits:"},{"line_number":153,"context_line":"        msg[trait.name] \u003d trait.value"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    return msg"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_7998256b","line":153,"range":{"start_line":153,"start_character":32,"end_line":153,"end_character":37},"in_reply_to":"da6ed579_7fab0a1e","updated":"2016-01-18 07:16:06.000000000","message":"If there is any fields should in sample but not in event, \nthen, the fields should defined in event traits, so that they can be as sample fields.\n\nFor example, event compute.instance.create.latency has fellowing fields, which should be enough to stored as sample:\n\n\u003cEvent: 9b1ed755-49d9-459b-8be4-16f518bb16eb, compute.instance.create.end, 2015-09-06 05:30:54.361842, \n\u003cTrait: state 1 active\u003e \n\u003cTrait: root_gb 2 1\u003e \n\u003cTrait: user_id 1 75948199a34247ab9f2b2db92a1b9a18\u003e \n\u003cTrait: service 1 compute\u003e \u003cTrait: disk_gb 2 1\u003e \n\u003cTrait: instance_type 1 m1.tiny\u003e \n\u003cTrait: tenant_id 1 e587a344cc854d069016573512550246\u003e \n\u003cTrait: ephemeral_gb 2 0\u003e \n\u003cTrait: instance_type_id 2 6\u003e \n\u003cTrait: vcpus 2 2\u003e \u003cTrait: memory_mb 2 512\u003e \n\u003cTrait: instance_id 1 5c8608de-e148-4383-abbc-65157b9fd77f\u003e\n\u003cTrait: host 1 yuntong-ThinkStation\u003e \n\u003cTrait: request_id 1 req-08e8e5a4-5276-406a-859b-81e74fc76f2a\u003e \n\u003cTrait: launched_at 4 2015-09-06 05:30:54.146565\u003e\u003e","commit_id":"0e7a75d968ee63e6b7aaf194806ae8349c1c0182"},{"author":{"_account_id":17081,"name":"Chaozhe Chen(ccz)","email":"chaozhe.chen@easystack.cn","username":"Chaozhe.Chen"},"change_message_id":"2a0ea448b0b045003e59c39f9bd3d6bb56dc91dc","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    return msg"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"def notification_from_event(ctxt, event):"},{"line_number":147,"context_line":"    \"\"\"Translate an event message to a notification payload."},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    Returns a notification payload of Event containing an event message"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a5de9d1_f40db63e","line":146,"range":{"start_line":146,"start_character":28,"end_line":146,"end_character":32},"updated":"2016-01-30 09:47:39.000000000","message":"This not be used.","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"c8f9e50b7a2f26410170da0318b49ea2fb2217f7","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    return msg"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"def notification_from_event(ctxt, event):"},{"line_number":147,"context_line":"    \"\"\"Translate an event message to a notification payload."},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    Returns a notification payload of Event containing an event message"}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_fd9947c5","line":146,"range":{"start_line":146,"start_character":28,"end_line":146,"end_character":32},"in_reply_to":"7a5de9d1_f40db63e","updated":"2016-02-18 02:30:28.000000000","message":"thanks for pointing this out, will update.","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"44c61fe14a2a645f1b3bc23e3dc60a902516e2e8","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    Returns a notification payload of Event containing an event message"},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    msg \u003d {}"},{"line_number":152,"context_line":"    for trait in event.traits:"},{"line_number":153,"context_line":"        msg[trait.name] \u003d trait.value"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    return msg"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aed3d3a_881e12b9","line":152,"updated":"2016-02-29 17:47:26.000000000","message":"Do we need to store an event.raw field if it presented?","commit_id":"fdcc7f0f83b152e7fbf6055f2e5aacbea7b670c8"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"d2c0677ed0098aace681e04fc3cfd249db1cea67","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    Returns a notification payload of Event containing an event message"},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    msg \u003d {}"},{"line_number":152,"context_line":"    for trait in event.traits:"},{"line_number":153,"context_line":"        msg[trait.name] \u003d trait.value"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    return msg"}],"source_content_type":"text/x-python","patch_set":10,"id":"7af24918_3f6598b4","line":152,"in_reply_to":"9aed3d3a_881e12b9","updated":"2016-03-04 03:53:15.000000000","message":"For the currently usage, as far as i can see, we don\u0027t need t.","commit_id":"fdcc7f0f83b152e7fbf6055f2e5aacbea7b670c8"}],"ceilometer/tests/unit/publisher/test_messaging_publisher.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"c0973e86123fd865f89c548ed8d4a2c3a552a3c8","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        self.topic \u003d (self.CONF.publisher_notifier.event_topic"},{"line_number":151,"context_line":"                      if self.pub_func \u003d\u003d \u0027publish_events\u0027 else"},{"line_number":152,"context_line":"                      self.CONF.publisher_notifier.metering_topic)"},{"line_number":153,"context_line":"        if self.publisher_cls is msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":154,"context_line":"                self.topic \u003d self.test_event_data[0].event_type"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a5de9d1_031dbdbc","line":153,"range":{"start_line":153,"start_character":77,"end_line":153,"end_character":78},"updated":"2016-01-29 02:10:03.000000000","message":"in this case, there is no meaning to setup self.topic in Ln150, please improve the code","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"fd1096eceaa0d2dbe66ac13f94c928cd3e9417f9","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        self.topic \u003d (self.CONF.publisher_notifier.event_topic"},{"line_number":151,"context_line":"                      if self.pub_func \u003d\u003d \u0027publish_events\u0027 else"},{"line_number":152,"context_line":"                      self.CONF.publisher_notifier.metering_topic)"},{"line_number":153,"context_line":"        if self.publisher_cls is msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":154,"context_line":"                self.topic \u003d self.test_event_data[0].event_type"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_269a77b9","line":153,"range":{"start_line":153,"start_character":77,"end_line":153,"end_character":78},"in_reply_to":"7a5de9d1_031dbdbc","updated":"2016-02-18 07:12:54.000000000","message":"The problem is that for SampleNotifierPublisher/EventNotifierPublisher, the topic(CONF.publisher_notifier.metering_topic) is same as notifier topic and event type in this test case.","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"c0973e86123fd865f89c548ed8d4a2c3a552a3c8","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            self.assertEqual(expected, fake_send.mock_calls)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def test_published_with_policy_sized_queue_and_rpc_down(self):"},{"line_number":263,"context_line":"        if self.publisher_cls is msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":264,"context_line":"            return"},{"line_number":265,"context_line":"        publisher \u003d self.publisher_cls(netutils.urlsplit("},{"line_number":266,"context_line":"            \u0027%s://?policy\u003dqueue\u0026max_queue_length\u003d3\u0027 % self.protocol))"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a5de9d1_63b591ec","line":263,"range":{"start_line":263,"start_character":77,"end_line":263,"end_character":78},"updated":"2016-01-29 02:10:03.000000000","message":"why skip this?","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"f7539946750cc6689b79b0d46cc6343dc105aba6","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            self.assertEqual(expected, fake_send.mock_calls)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def test_published_with_policy_sized_queue_and_rpc_down(self):"},{"line_number":263,"context_line":"        if self.publisher_cls is msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":264,"context_line":"            return"},{"line_number":265,"context_line":"        publisher \u003d self.publisher_cls(netutils.urlsplit("},{"line_number":266,"context_line":"            \u0027%s://?policy\u003dqueue\u0026max_queue_length\u003d3\u0027 % self.protocol))"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a5de9d1_559da457","line":263,"range":{"start_line":263,"start_character":77,"end_line":263,"end_character":78},"in_reply_to":"7a5de9d1_63b591ec","updated":"2016-02-18 02:15:36.000000000","message":"Each sample events have different topic for EventToSampleNotifierPublisher, this test case isn\u0027t suite for this case, plus, since EventToSampleNotifierPublisher is inherit from NotifierPublishe, no need to run this test for it.","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"c0973e86123fd865f89c548ed8d4a2c3a552a3c8","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        )"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def test_published_with_policy_default_sized_queue_and_rpc_down(self):"},{"line_number":292,"context_line":"        if self.publisher_cls is msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":293,"context_line":"            return"},{"line_number":294,"context_line":"        publisher \u003d self.publisher_cls("},{"line_number":295,"context_line":"            netutils.urlsplit(\u0027%s://?policy\u003dqueue\u0027 % self.protocol))"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a5de9d1_43cbb572","line":292,"range":{"start_line":292,"start_character":77,"end_line":292,"end_character":78},"updated":"2016-01-29 02:10:03.000000000","message":"ditto","commit_id":"5379c1ac9916e64300d60179bec39f8fe585b98a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"24eb837ac781abd7512e51699974b4c7f6f80fee","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                      if self.pub_func \u003d\u003d \u0027publish_events\u0027 else"},{"line_number":153,"context_line":"                      self.CONF.publisher_notifier.metering_topic)"},{"line_number":154,"context_line":"        if self.publisher_cls is msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":155,"context_line":"                self.topic \u003d self.test_event_data[0].event_type"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"class TestPublisherPolicy(TestPublisher):"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_f7003b36","line":155,"range":{"start_line":155,"start_character":53,"end_line":155,"end_character":63},"updated":"2016-02-18 08:45:51.000000000","message":"we have 5 different event_type in the self.test_event_data array, why always use array[0]?","commit_id":"4d54d6ace150028e06ca8f38ef08b62e89dfcbfe"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"8778c99180b4d23967627d58f2bd2f4853a8a828","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                      if self.pub_func \u003d\u003d \u0027publish_events\u0027 else"},{"line_number":153,"context_line":"                      self.CONF.publisher_notifier.metering_topic)"},{"line_number":154,"context_line":"        if self.publisher_cls is msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":155,"context_line":"                self.topic \u003d self.test_event_data[0].event_type"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"class TestPublisherPolicy(TestPublisher):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_a4d3985e","line":155,"range":{"start_line":155,"start_character":53,"end_line":155,"end_character":63},"in_reply_to":"dae33548_f7003b36","updated":"2016-02-22 01:09:12.000000000","message":"SampleNotifierPublisher/EventNotifierPublisher have same topci(\u003devent_type) for test data array, however this publisher is not the case.\nEventToSampleNotifierPublisher\"\ndef publish_events:\n        for event in events:\n            msg \u003d utils.notification_from_event(event)\n            event_type \u003d self.prefix + \u0027.\u0027 + event.event_type\n            self.local_queue.append((context, event_type, msg))","commit_id":"4d54d6ace150028e06ca8f38ef08b62e89dfcbfe"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"24eb837ac781abd7512e51699974b4c7f6f80fee","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            if self.publisher_cls is\\"},{"line_number":195,"context_line":"                    msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":196,"context_line":"                fake_send.assert_called_once_with("},{"line_number":197,"context_line":"                    mock.ANY, \u0027ceilometer.event\u0027 + \u0027.\u0027 + self.topic, mock.ANY)"},{"line_number":198,"context_line":"            else:"},{"line_number":199,"context_line":"                fake_send.assert_called_once_with("},{"line_number":200,"context_line":"                    mock.ANY, self.topic, mock.ANY)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_177b1fc2","line":197,"range":{"start_line":197,"start_character":77,"end_line":197,"end_character":78},"updated":"2016-02-18 08:45:51.000000000","message":"if the final topic to be asserted is different for this special EventToSampleNotifierPublisher, we might need to think of re-org the test code, instead of putting these duplicated if/else code all across test cases. That\u0027s error prone.","commit_id":"4d54d6ace150028e06ca8f38ef08b62e89dfcbfe"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"8778c99180b4d23967627d58f2bd2f4853a8a828","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            if self.publisher_cls is\\"},{"line_number":195,"context_line":"                    msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":196,"context_line":"                fake_send.assert_called_once_with("},{"line_number":197,"context_line":"                    mock.ANY, \u0027ceilometer.event\u0027 + \u0027.\u0027 + self.topic, mock.ANY)"},{"line_number":198,"context_line":"            else:"},{"line_number":199,"context_line":"                fake_send.assert_called_once_with("},{"line_number":200,"context_line":"                    mock.ANY, self.topic, mock.ANY)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_24c0287c","line":197,"range":{"start_line":197,"start_character":77,"end_line":197,"end_character":78},"in_reply_to":"dae33548_177b1fc2","updated":"2016-02-22 01:09:12.000000000","message":"Agree.","commit_id":"4d54d6ace150028e06ca8f38ef08b62e89dfcbfe"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"24eb837ac781abd7512e51699974b4c7f6f80fee","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            self.assertEqual(expected, fake_send.mock_calls)"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def test_published_with_policy_sized_queue_and_rpc_down(self):"},{"line_number":293,"context_line":"        if self.publisher_cls is msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":294,"context_line":"            return"},{"line_number":295,"context_line":"        publisher \u003d self.publisher_cls(netutils.urlsplit("},{"line_number":296,"context_line":"            \u0027%s://?policy\u003dqueue\u0026max_queue_length\u003d3\u0027 % self.protocol))"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_b746b378","line":293,"range":{"start_line":293,"start_character":77,"end_line":293,"end_character":78},"updated":"2016-02-18 08:45:51.000000000","message":"let\u0027s use http://testtools.readthedocs.org/en/latest/api.html?highlight\u003dskip#testtools.skipIf instead of silently return here","commit_id":"4d54d6ace150028e06ca8f38ef08b62e89dfcbfe"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"24eb837ac781abd7512e51699974b4c7f6f80fee","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        )"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def test_published_with_policy_default_sized_queue_and_rpc_down(self):"},{"line_number":322,"context_line":"        if self.publisher_cls is msg_publisher.EventToSampleNotifierPublisher:"},{"line_number":323,"context_line":"            return"},{"line_number":324,"context_line":"        publisher \u003d self.publisher_cls("},{"line_number":325,"context_line":"            netutils.urlsplit(\u0027%s://?policy\u003dqueue\u0027 % self.protocol))"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_1762ff09","line":322,"range":{"start_line":322,"start_character":77,"end_line":322,"end_character":78},"updated":"2016-02-18 08:45:51.000000000","message":"ditto","commit_id":"4d54d6ace150028e06ca8f38ef08b62e89dfcbfe"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"44c61fe14a2a645f1b3bc23e3dc60a902516e2e8","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                      self.CONF.publisher_notifier.metering_topic)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class TestEventToSampleNotifierPublisher(testscenarios.testcase.WithScenarios,"},{"line_number":144,"context_line":"                                         BasePublisherTestCase):"},{"line_number":145,"context_line":"    scenarios \u003d ["},{"line_number":146,"context_line":"        (\u0027event_to_sample_notifier\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aed3d3a_e8b87e77","line":143,"updated":"2016-02-29 17:47:26.000000000","message":"Could we add a test with assertion of traits and message fields?","commit_id":"fdcc7f0f83b152e7fbf6055f2e5aacbea7b670c8"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"d2c0677ed0098aace681e04fc3cfd249db1cea67","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                      self.CONF.publisher_notifier.metering_topic)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class TestEventToSampleNotifierPublisher(testscenarios.testcase.WithScenarios,"},{"line_number":144,"context_line":"                                         BasePublisherTestCase):"},{"line_number":145,"context_line":"    scenarios \u003d ["},{"line_number":146,"context_line":"        (\u0027event_to_sample_notifier\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7af24918_19d42eea","line":143,"in_reply_to":"7af24918_032230b9","updated":"2016-03-04 03:53:15.000000000","message":"thanks.","commit_id":"fdcc7f0f83b152e7fbf6055f2e5aacbea7b670c8"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"b65638ff37bfe13b70d10b2f9a6cca91707ba92c","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                      self.CONF.publisher_notifier.metering_topic)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class TestEventToSampleNotifierPublisher(testscenarios.testcase.WithScenarios,"},{"line_number":144,"context_line":"                                         BasePublisherTestCase):"},{"line_number":145,"context_line":"    scenarios \u003d ["},{"line_number":146,"context_line":"        (\u0027event_to_sample_notifier\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7af24918_032230b9","line":143,"in_reply_to":"9aed3d3a_e8b87e77","updated":"2016-03-02 15:32:58.000000000","message":"Agree with Ilya it would be grate to have a tests with result notification after event were sent to be published as sample","commit_id":"fdcc7f0f83b152e7fbf6055f2e5aacbea7b670c8"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"d2c0677ed0098aace681e04fc3cfd249db1cea67","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                      self.CONF.publisher_notifier.metering_topic)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class TestEventToSampleNotifierPublisher(testscenarios.testcase.WithScenarios,"},{"line_number":144,"context_line":"                                         BasePublisherTestCase):"},{"line_number":145,"context_line":"    scenarios \u003d ["},{"line_number":146,"context_line":"        (\u0027event_to_sample_notifier\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7af24918_f9d062f8","line":143,"in_reply_to":"9aed3d3a_e8b87e77","updated":"2016-03-04 03:53:15.000000000","message":"will add one.","commit_id":"fdcc7f0f83b152e7fbf6055f2e5aacbea7b670c8"}]}
