)]}'
{"oslo/messaging/notify/notifier.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d96dc0c7e2182b784e8ff61d8cba0794488b91e9","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def sample(self, ctxt, event_type, payload):"},{"line_number":247,"context_line":"        \"\"\"Send a notification at sample level."},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        :param ctxt: a request context dict"},{"line_number":250,"context_line":"        :type ctxt: dict"},{"line_number":251,"context_line":"        :param event_type: describes the event, e.g. \u0027compute.create_instance\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9kLc%3D","line":248,"updated":"2013-12-10 07:02:15.000000000","message":"I think this could do with a short paragraph describing its intended use and that some notification drivers might drop these.\n\nIt\u0027s not needed for the other levels because they are well understood logging levels","commit_id":"ca2a9919f3b96ac6af3cc856c1bbe312c1687124"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"56ed9b395b5edc72b373a8a4532fe72e01d8e748","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        that typically contain small payloads. eg: \"CPU \u003d 70%\""},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        Not all drivers support the sample level"},{"line_number":253,"context_line":"        (log, for example) so these could be dropped."},{"line_number":254,"context_line":"        :param ctxt: a request context dict"},{"line_number":255,"context_line":"        :type ctxt: dict"},{"line_number":256,"context_line":"        :param event_type: describes the event, e.g. \u0027compute.create_instance\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9Dq4%3D","line":253,"updated":"2013-12-17 07:54:11.000000000","message":"Gah, sorry for the nitpick but you need a newline - see http://docs-draft.openstack.org/48/60048/4/check/gate-oslo.messaging-docs/2287e14/doc/build/html/notifier.html","commit_id":"9df25686145b5bfe068e872101893ded7990d9ce"}],"tests/test_notifier.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d96dc0c7e2182b784e8ff61d8cba0794488b91e9","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def test_sample_priority(self):"},{"line_number":291,"context_line":"        driver \u003d _impl_log.LogDriver(None, None, None)"},{"line_number":292,"context_line":"        fake_log \u003d mock.MagicMock(spec\u003dself.logger_spec)"},{"line_number":293,"context_line":"        with mock.patch(\u0027oslo.messaging.notify.\u0027"},{"line_number":294,"context_line":"                        \u0027_impl_log.logging.getLogger\u0027) as get:"},{"line_number":295,"context_line":"            get.return_value \u003d fake_log"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9kKg%3D","line":292,"updated":"2013-12-10 07:02:15.000000000","message":"Let\u0027s not mix mox and mock up in the same test case - I don\u0027t mind a separate patch to move the test case completely to mock, though\n\nAFAICT, the test_notifier() method could easily be tweaked to support this test and we should use testscenarios to test all notification levels.","commit_id":"ca2a9919f3b96ac6af3cc856c1bbe312c1687124"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"56ed9b395b5edc72b373a8a4532fe72e01d8e748","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            AndReturn(logger)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        msg \u003d {\u0027event_type\u0027: \u0027foo\u0027}"},{"line_number":299,"context_line":"        logger.sample(jsonutils.dumps(msg))"},{"line_number":300,"context_line":"        self.mox.ReplayAll()"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        driver.notify(None, msg, \"sample\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9DqQ%3D","line":299,"updated":"2013-12-17 07:54:11.000000000","message":"Wait - how is this checking that \"logger drops sample-level notifications\"\n\nThis is ensuring that if logger is a mock logger with a sample() method that the notification *won\u0027t* be dropped, right? :)","commit_id":"9df25686145b5bfe068e872101893ded7990d9ce"}]}
