)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"df8bde3f7f2f43c4de9c1e4935c8d8d989565f46","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Alex Szarka \u003cszarka@inf.u-szeged.hu\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-05-18 21:41:30 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add method for verify multiple notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch allows the multiple notifications"},{"line_number":10,"context_line":"verify as simply. Using this the verifies looks"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff0f0b1f_754b9858","line":7,"range":{"start_line":7,"start_character":22,"end_line":7,"end_character":44},"updated":"2017-05-21 20:38:30.000000000","message":"Maybe we could explicitely say that these are for the versioned notifications.","commit_id":"9eb01c8e6ae172874eb3e3399e23578dd60fb649"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"df8bde3f7f2f43c4de9c1e4935c8d8d989565f46","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add method for verify multiple notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch allows the multiple notifications"},{"line_number":10,"context_line":"verify as simply. Using this the verifies looks"},{"line_number":11,"context_line":"more transparent with full list of the expected"},{"line_number":12,"context_line":"notifications."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Demo for usage:"},{"line_number":15,"context_line":"https://review.openstack.org/#/c/403660/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff0f0b1f_d5cf04ae","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":13},"updated":"2017-05-21 20:38:30.000000000","message":"This patch allows us to simply verify multiple versioned notifications in a more readable and more transparent way than we have now. The new method uses a list with the expected notifications \"event_type\" field, which makes the verifying process easily readable and understandable.","commit_id":"9eb01c8e6ae172874eb3e3399e23578dd60fb649"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"df8bde3f7f2f43c4de9c1e4935c8d8d989565f46","unresolved":false,"context_lines":[{"line_number":11,"context_line":"more transparent with full list of the expected"},{"line_number":12,"context_line":"notifications."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Demo for usage:"},{"line_number":15,"context_line":"https://review.openstack.org/#/c/403660/"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Demo code:"},{"line_number":18,"context_line":"expected_notifications \u003d ["}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff0f0b1f_b5c6d099","line":15,"range":{"start_line":14,"start_character":0,"end_line":15,"end_character":40},"updated":"2017-05-21 20:38:30.000000000","message":"I think we can change this to \"Example useage can be found at [1]\". ofc the link should refers to the url you provided.","commit_id":"9eb01c8e6ae172874eb3e3399e23578dd60fb649"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"df8bde3f7f2f43c4de9c1e4935c8d8d989565f46","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Demo for usage:"},{"line_number":15,"context_line":"https://review.openstack.org/#/c/403660/"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Demo code:"},{"line_number":18,"context_line":"expected_notifications \u003d ["},{"line_number":19,"context_line":"    #if unimportant notification"},{"line_number":20,"context_line":"    [None],"},{"line_number":21,"context_line":"    #if important notification, and we want"},{"line_number":22,"context_line":"    #use the default replacements"},{"line_number":23,"context_line":"    [\u0027instance-create-end\u0027],"},{"line_number":24,"context_line":"    #if important notification, and we want"},{"line_number":25,"context_line":"    #use custom replacements"},{"line_number":26,"context_line":"    [\u0027instance-exists\u0027, {"},{"line_number":27,"context_line":"        \u0027reservation_id\u0027: server[\u0027reservation_id\u0027],"},{"line_number":28,"context_line":"        \u0027uuid\u0027: server[\u0027id\u0027]"},{"line_number":29,"context_line":"    }],"},{"line_number":30,"context_line":"]"},{"line_number":31,"context_line":"self._verify_notifications("},{"line_number":32,"context_line":"    expected_notifications \u003d expected_notifications,"},{"line_number":33,"context_line":"    #the default replacements. This use, if dont have"},{"line_number":34,"context_line":"    #custom replacements for one expected notification."},{"line_number":35,"context_line":"    replacements\u003d{"},{"line_number":36,"context_line":"        \u0027reservation_id\u0027: server[\u0027reservation_id\u0027],"},{"line_number":37,"context_line":"        \u0027uuid\u0027: server[\u0027id\u0027]"},{"line_number":38,"context_line":"    }"},{"line_number":39,"context_line":")"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Change-Id: Ic17bdcf286205efabd978ec8413742e0aedb6206"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff0f0b1f_951d0c11","line":39,"range":{"start_line":17,"start_character":0,"end_line":39,"end_character":1},"updated":"2017-05-21 20:38:30.000000000","message":"I don\u0027t really know if we should place them here or just leave the example usage at the docstrings.\n\nI think that unnamed lists (and list in list) looks bad in this case. I don\u0027t know whether would be a dict better or not, just thinking about it. How do you think about it? \n\nI was thinking something like this:\n\n    expected_notifications \u003d [\n        {\n            event_type \u003d OurEventType.UNIMPORTANT #or \u0027IGNORE\u0027\n        },\n        {\n            event_type \u003d \u0027instance-create-end\u0027, \n        }, \n        {   \n            event_type \u003d \u0027instance-exists\u0027,\n            replacements \u003d {\n                \u0027reservation_id\u0027: server[\u0027reservation_id\u0027],\n                \u0027uuid\u0027: server[\u0027id\u0027]\n            }\n        }, \n        #our even we could add a list which is for more event_type with the same replacements.\n        {\n            event_types: [\u0027instance-create-start\u0027, \u0027instance_create_end\u0027]\n            replacements \u003d {\n                \u0027reservation_id\u0027: server[\u0027reservation_id\u0027],\n                \u0027uuid\u0027: server[\u0027id\u0027]\n            }\n    ]\n\nJust a quick idea, maybe we should talk about.\n\nMy only thing is [None] should go anyway.","commit_id":"9eb01c8e6ae172874eb3e3399e23578dd60fb649"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"4bb0f4f4f801b733f1052ddf8c47ffa5a27b0469","unresolved":false,"context_lines":[{"line_number":14,"context_line":"the verifying process easily readable"},{"line_number":15,"context_line":"and understandable."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Example useage can be found:"},{"line_number":18,"context_line":"[1]: https://review.openstack.org/#/c/403660/"},{"line_number":19,"context_line":"[2]: https://review.openstack.org/#/c/466296/"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"df140735_af93f25a","line":17,"range":{"start_line":17,"start_character":8,"end_line":17,"end_character":14},"updated":"2017-06-02 12:16:15.000000000","message":"usage","commit_id":"e388fa2fc5cbeada665eb89841764cebc6e091e4"}],"nova/tests/functional/notification_sample_tests/notification_sample_base.py":[{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"df8bde3f7f2f43c4de9c1e4935c8d8d989565f46","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _verify_notifications(self, expected_notifications\u003dNone,"},{"line_number":144,"context_line":"                            replacements\u003dNone):"},{"line_number":145,"context_line":"        \"\"\"This facilitate the multiple notifications."},{"line_number":146,"context_line":"        :param expected_notifications: The expected list of notifications"},{"line_number":147,"context_line":"        :param replacements: Same as verify_notification. This optional"},{"line_number":148,"context_line":"                             argument, what we use, if dont specified"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff0f0b1f_b5e7f012","line":145,"range":{"start_line":145,"start_character":11,"end_line":145,"end_character":54},"updated":"2017-05-21 20:38:30.000000000","message":"\"This method eases verifying multiple versioned notifications.\"","commit_id":"9eb01c8e6ae172874eb3e3399e23578dd60fb649"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"df8bde3f7f2f43c4de9c1e4935c8d8d989565f46","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    def _verify_notifications(self, expected_notifications\u003dNone,"},{"line_number":144,"context_line":"                            replacements\u003dNone):"},{"line_number":145,"context_line":"        \"\"\"This facilitate the multiple notifications."},{"line_number":146,"context_line":"        :param expected_notifications: The expected list of notifications"},{"line_number":147,"context_line":"        :param replacements: Same as verify_notification. This optional"},{"line_number":148,"context_line":"                             argument, what we use, if dont specified"},{"line_number":149,"context_line":"                             custom replacement for the notification."}],"source_content_type":"text/x-python","patch_set":5,"id":"ff0f0b1f_75f158cd","line":146,"range":{"start_line":146,"start_character":39,"end_line":146,"end_character":73},"updated":"2017-05-21 20:38:30.000000000","message":"This is \"the list of expected notifications\" :)","commit_id":"9eb01c8e6ae172874eb3e3399e23578dd60fb649"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"df8bde3f7f2f43c4de9c1e4935c8d8d989565f46","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                            replacements\u003dNone):"},{"line_number":145,"context_line":"        \"\"\"This facilitate the multiple notifications."},{"line_number":146,"context_line":"        :param expected_notifications: The expected list of notifications"},{"line_number":147,"context_line":"        :param replacements: Same as verify_notification. This optional"},{"line_number":148,"context_line":"                             argument, what we use, if dont specified"},{"line_number":149,"context_line":"                             custom replacement for the notification."},{"line_number":150,"context_line":"        \"\"\""},{"line_number":151,"context_line":"        self.assertEqual("},{"line_number":152,"context_line":"            len(expected_notifications),"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff0f0b1f_95cbcc70","line":149,"range":{"start_line":147,"start_character":29,"end_line":149,"end_character":69},"updated":"2017-05-21 20:38:30.000000000","message":"I think you should copy the \"replacements\" section from _verify_notification","commit_id":"9eb01c8e6ae172874eb3e3399e23578dd60fb649"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"df8bde3f7f2f43c4de9c1e4935c8d8d989565f46","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        \"\"\""},{"line_number":151,"context_line":"        self.assertEqual("},{"line_number":152,"context_line":"            len(expected_notifications),"},{"line_number":153,"context_line":"            len(fake_notifier.VERSIONED_NOTIFICATIONS)"},{"line_number":154,"context_line":"        )"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        for idx, notification in enumerate(expected_notifications):"},{"line_number":157,"context_line":"            if (notification[0] is None):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff0f0b1f_15a57cb5","line":154,"range":{"start_line":153,"start_character":54,"end_line":154,"end_character":9},"updated":"2017-05-21 20:38:30.000000000","message":"Can we add some explanation as a third parameter?","commit_id":"9eb01c8e6ae172874eb3e3399e23578dd60fb649"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d0f2e0d56777504fe5bf90b3675572feaacd4b13","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    def _verify_notifications(self, expected_notifications,"},{"line_number":144,"context_line":"                              notifications\u003dNone, replacements\u003dNone):"},{"line_number":145,"context_line":"        \"\"\"This method eases verifying multiple versioned notifications."},{"line_number":146,"context_line":"        :param expected_notifications: The list of expected notifications"},{"line_number":147,"context_line":"        :param replacements: A dict of key value pairs that is used to update"},{"line_number":148,"context_line":"                             the payload field of the sample data before it is"},{"line_number":149,"context_line":"                             matched against the generated notification."}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_03b70d3c","line":146,"updated":"2017-06-19 09:19:21.000000000","message":"You could mention to the IGNORE possibility here","commit_id":"38fcba8176af4904e8399d3305fda87c877b5814"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"75e2b27ce8c7457715e460e92f1606efc938711a","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    def _verify_notifications(self, expected_notifications,"},{"line_number":144,"context_line":"                              notifications\u003dNone, replacements\u003dNone):"},{"line_number":145,"context_line":"        \"\"\"This method eases verifying multiple versioned notifications."},{"line_number":146,"context_line":"        :param expected_notifications: The list of expected notifications"},{"line_number":147,"context_line":"        :param replacements: A dict of key value pairs that is used to update"},{"line_number":148,"context_line":"                             the payload field of the sample data before it is"},{"line_number":149,"context_line":"                             matched against the generated notification."}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_209afcb7","line":146,"in_reply_to":"7f231b9d_03b70d3c","updated":"2017-06-19 10:14:49.000000000","message":"Done","commit_id":"38fcba8176af4904e8399d3305fda87c877b5814"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d0f2e0d56777504fe5bf90b3675572feaacd4b13","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                             use, if dont specified custom replacement for the"},{"line_number":158,"context_line":"                             notification."},{"line_number":159,"context_line":"        :param notifications: The storage of notifications list. If"},{"line_number":160,"context_line":"                              dont specified, then use the default, which"},{"line_number":161,"context_line":"                              the \"fake_notifier.VERSIONED_NOTIFICATIONS\""},{"line_number":162,"context_line":"        \"\"\""},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_e35c111a","line":160,"range":{"start_line":160,"start_character":30,"end_line":160,"end_character":34},"updated":"2017-06-19 09:19:21.000000000","message":"nit:don\u0027t","commit_id":"38fcba8176af4904e8399d3305fda87c877b5814"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"75e2b27ce8c7457715e460e92f1606efc938711a","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                             use, if dont specified custom replacement for the"},{"line_number":158,"context_line":"                             notification."},{"line_number":159,"context_line":"        :param notifications: The storage of notifications list. If"},{"line_number":160,"context_line":"                              dont specified, then use the default, which"},{"line_number":161,"context_line":"                              the \"fake_notifier.VERSIONED_NOTIFICATIONS\""},{"line_number":162,"context_line":"        \"\"\""},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7f231b9d_0095c086","line":160,"range":{"start_line":160,"start_character":30,"end_line":160,"end_character":34},"in_reply_to":"7f231b9d_e35c111a","updated":"2017-06-19 10:14:49.000000000","message":"Done","commit_id":"38fcba8176af4904e8399d3305fda87c877b5814"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"a147048a89ed1a1863cfb3d802440a291aaa30cd","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        for idx, notification in enumerate(expected_notifications):"},{"line_number":178,"context_line":"            if notification[\"event_type\"] is \u0027IGNORE\u0027:"},{"line_number":179,"context_line":"                continue"},{"line_number":180,"context_line":"            actual_replacements \u003d notification[\"replacements\"] \\"},{"line_number":181,"context_line":"                if \u0027replacements\u0027 in notification else replacements"},{"line_number":182,"context_line":"            self._verify_notification("},{"line_number":183,"context_line":"                notification[\"event_type\"],"},{"line_number":184,"context_line":"                replacements\u003dactual_replacements,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f231b9d_d53304f5","line":181,"range":{"start_line":180,"start_character":34,"end_line":181,"end_character":67},"updated":"2017-06-19 13:56:22.000000000","message":"just a nit: you can use parentheses if you want to avoid the ugly backslash in the code.","commit_id":"3baeef00a01c2143eb766c40e55c00536b9684fd"}]}
