)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6d418eef157f704873da76dccc70103a2ffc78b7","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":62,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"},{"line_number":63,"context_line":"                default\u003dFalse,"},{"line_number":64,"context_line":"                help\u003d\u0027Record alarm change events\u0027"},{"line_number":65,"context_line":"                ),"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2F8cI%3D","line":62,"updated":"2013-08-27 18:08:17.000000000","message":"Why would this ever be false on a real system? Do we need this option at all?","commit_id":"4ebf4ff25a7fa617bf9364b6c25f730cf47c33f3"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"058f87a0497ea84a0427fbac8ecedfb8c2402a98","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":62,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"},{"line_number":63,"context_line":"                default\u003dFalse,"},{"line_number":64,"context_line":"                help\u003d\u0027Record alarm change events\u0027"},{"line_number":65,"context_line":"                ),"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2F6Cs%3D","line":62,"in_reply_to":"AAAASn%2F%2F8cI%3D","updated":"2013-08-28 06:02:38.000000000","message":"Well I think this could be useful in certain cases. For example if there\u0027s a lot of churn in the lifecycle of alarms (e.g. lots of short-lived alarms being created and destroyed), then history is far less valuable. Essentially alarm.record_history\u003dFalse is equivalent to setting the (as yet unimplemented) history retention period to zero, but in a form that doesn\u0027t have any dependency on the storage driver logic.","commit_id":"4ebf4ff25a7fa617bf9364b6c25f730cf47c33f3"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5088a26e7586ea5f15f553bccb3ab970b9695eef","unresolved":false,"context_lines":[{"line_number":978,"context_line":"        type \u003d type or (storage.models.AlarmChange.STATE_TRANSITION"},{"line_number":979,"context_line":"                        if data.get(\u0027state\u0027)"},{"line_number":980,"context_line":"                        else storage.models.AlarmChange.RULE_CHANGE)"},{"line_number":981,"context_line":"        detail \u003d json.dumps(utils.stringify_timestamps(data))"},{"line_number":982,"context_line":"        user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":983,"context_line":"        project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":984,"context_line":"        on_behalf_of \u003d on_behalf_of or project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F44g%3D","line":981,"updated":"2013-08-28 11:38:26.000000000","message":"It seems data is always a timestamp anyway, maybe it\u0027s worth just renaming data to timestamp and use timestamp.isoformat()?","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c5bab39c1db54e9c12469f0f60919fd720b20b97","unresolved":false,"context_lines":[{"line_number":978,"context_line":"        type \u003d type or (storage.models.AlarmChange.STATE_TRANSITION"},{"line_number":979,"context_line":"                        if data.get(\u0027state\u0027)"},{"line_number":980,"context_line":"                        else storage.models.AlarmChange.RULE_CHANGE)"},{"line_number":981,"context_line":"        detail \u003d json.dumps(utils.stringify_timestamps(data))"},{"line_number":982,"context_line":"        user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":983,"context_line":"        project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":984,"context_line":"        on_behalf_of \u003d on_behalf_of or project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F4nc%3D","line":981,"in_reply_to":"AAAASn%2F%2F41g%3D","updated":"2013-08-28 12:43:09.000000000","message":"Oh sorry, I misread the code actually, I didn\u0027t see there was a \u0027now\u0027 parameter.\nIf it\u0027s really \u0027now\u0027, you could factor that out, couldn\u0027t you?","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"02788e22a1e51677597e5b26ae3d554b4c649616","unresolved":false,"context_lines":[{"line_number":978,"context_line":"        type \u003d type or (storage.models.AlarmChange.STATE_TRANSITION"},{"line_number":979,"context_line":"                        if data.get(\u0027state\u0027)"},{"line_number":980,"context_line":"                        else storage.models.AlarmChange.RULE_CHANGE)"},{"line_number":981,"context_line":"        detail \u003d json.dumps(utils.stringify_timestamps(data))"},{"line_number":982,"context_line":"        user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":983,"context_line":"        project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":984,"context_line":"        on_behalf_of \u003d on_behalf_of or project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F41g%3D","line":981,"in_reply_to":"AAAASn%2F%2F44g%3D","updated":"2013-08-28 11:52:02.000000000","message":"Well data would be:\n\n- on update: the modified alarm attributes (as a record of just what is changing)\n- on create: the caller-provided alarm representation (as a record of initial state)\n- on delete the existing alarm representation (as a record of it\u0027s final state)\n\nTimestamps that are incompatible with the JSON dump may or may not be present in the data to record, depending on the context.","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"380e3c5e3e2b307bd4d7f0a869a69f996ec96056","unresolved":false,"context_lines":[{"line_number":978,"context_line":"        type \u003d type or (storage.models.AlarmChange.STATE_TRANSITION"},{"line_number":979,"context_line":"                        if data.get(\u0027state\u0027)"},{"line_number":980,"context_line":"                        else storage.models.AlarmChange.RULE_CHANGE)"},{"line_number":981,"context_line":"        detail \u003d json.dumps(utils.stringify_timestamps(data))"},{"line_number":982,"context_line":"        user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":983,"context_line":"        project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":984,"context_line":"        on_behalf_of \u003d on_behalf_of or project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F4Vk%3D","line":981,"in_reply_to":"AAAASn%2F%2F4ZY%3D","updated":"2013-08-28 14:21:50.000000000","message":"Seems to me that the setting of the appropriate timestamps where appropriate should remain a concern of the API layer (e.g. setting the state_timestamp to now on a PUT that involves a state transition), as opposed to pushing that down into the storage drivers.","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"7ef67ea39a666534bc151315dcfe945d8b6887bb","unresolved":false,"context_lines":[{"line_number":978,"context_line":"        type \u003d type or (storage.models.AlarmChange.STATE_TRANSITION"},{"line_number":979,"context_line":"                        if data.get(\u0027state\u0027)"},{"line_number":980,"context_line":"                        else storage.models.AlarmChange.RULE_CHANGE)"},{"line_number":981,"context_line":"        detail \u003d json.dumps(utils.stringify_timestamps(data))"},{"line_number":982,"context_line":"        user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":983,"context_line":"        project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":984,"context_line":"        on_behalf_of \u003d on_behalf_of or project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F4ZY%3D","line":981,"in_reply_to":"AAAASn%2F%2F4b0%3D","updated":"2013-08-28 13:35:07.000000000","message":"Got it. I think that\u0027s another good argument for my idea on having only one call to create/change and let the driver handle the audit log.","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"08ee23c6aba6de1d22b2f36ec214ca9b60aa6055","unresolved":false,"context_lines":[{"line_number":978,"context_line":"        type \u003d type or (storage.models.AlarmChange.STATE_TRANSITION"},{"line_number":979,"context_line":"                        if data.get(\u0027state\u0027)"},{"line_number":980,"context_line":"                        else storage.models.AlarmChange.RULE_CHANGE)"},{"line_number":981,"context_line":"        detail \u003d json.dumps(utils.stringify_timestamps(data))"},{"line_number":982,"context_line":"        user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":983,"context_line":"        project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":984,"context_line":"        on_behalf_of \u003d on_behalf_of or project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F4b0%3D","line":981,"in_reply_to":"AAAASn%2F%2F4nc%3D","updated":"2013-08-28 13:28:56.000000000","message":"The reason for passing the now as a parameter to the _record_{change|creation} methods (instead of calculating that within the methods) is so that the alarm state_timestamp and timestamp can be set to the exact same value if appropriate on PUTs and POSTs respectively.","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"895e75d3ae9a10f4fb90f8074ee4afc43c544209","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"        change \u003d Alarm.from_db_model(alarm).as_dict(storage.models.Alarm)"},{"line_number":1026,"context_line":"        self._record_change(change,"},{"line_number":1027,"context_line":"                            timeutils.utcnow(),"},{"line_number":1028,"context_line":"                            type\u003dstorage.models.AlarmChange.DELETION)"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"    # TODO(eglynn): add pagination marker to signature once overall"},{"line_number":1031,"context_line":"    #               API support for pagination is finalized"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F46I%3D","line":1028,"updated":"2013-08-28 11:34:38.000000000","message":"I\u0027m concerned about this simple approach. I wonder if it wouldn\u0027t be better to have a single operation in the storage driver to delete an alarm and records its deletion.\n\nThat would allow to use a transaction in SQL drivers to do so and be sure we don\u0027t do the delete OR the change record.","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c5bab39c1db54e9c12469f0f60919fd720b20b97","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"        change \u003d Alarm.from_db_model(alarm).as_dict(storage.models.Alarm)"},{"line_number":1026,"context_line":"        self._record_change(change,"},{"line_number":1027,"context_line":"                            timeutils.utcnow(),"},{"line_number":1028,"context_line":"                            type\u003dstorage.models.AlarmChange.DELETION)"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"    # TODO(eglynn): add pagination marker to signature once overall"},{"line_number":1031,"context_line":"    #               API support for pagination is finalized"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F4nI%3D","line":1028,"in_reply_to":"AAAASn%2F%2F42w%3D","updated":"2013-08-28 12:43:09.000000000","message":"The storage driver API would only provide one function, e.g.:\n\ndelete_alarm(alarm.alarm_id, record_change\u003dTrue)\n\nAnd could for example return a change event -- even if we don\u0027t return anything in DELETE, we could unit-test it (just an idea).\n\n\nThat way the delete_alarm() could enjoy transaction, or even trigger based auditing (for SQL). For MongoDB that wouldn\u0027t change much.","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"02788e22a1e51677597e5b26ae3d554b4c649616","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"        change \u003d Alarm.from_db_model(alarm).as_dict(storage.models.Alarm)"},{"line_number":1026,"context_line":"        self._record_change(change,"},{"line_number":1027,"context_line":"                            timeutils.utcnow(),"},{"line_number":1028,"context_line":"                            type\u003dstorage.models.AlarmChange.DELETION)"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"    # TODO(eglynn): add pagination marker to signature once overall"},{"line_number":1031,"context_line":"    #               API support for pagination is finalized"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F42w%3D","line":1028,"in_reply_to":"AAAASn%2F%2F46I%3D","updated":"2013-08-28 11:52:02.000000000","message":"If the delete fails at the DB level, would the API logic above even proceed to _record_change? i.e. the storage driver wouldn\u0027t just swallow the exception, right?","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"08ee23c6aba6de1d22b2f36ec214ca9b60aa6055","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"        change \u003d Alarm.from_db_model(alarm).as_dict(storage.models.Alarm)"},{"line_number":1026,"context_line":"        self._record_change(change,"},{"line_number":1027,"context_line":"                            timeutils.utcnow(),"},{"line_number":1028,"context_line":"                            type\u003dstorage.models.AlarmChange.DELETION)"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"    # TODO(eglynn): add pagination marker to signature once overall"},{"line_number":1031,"context_line":"    #               API support for pagination is finalized"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F4bc%3D","line":1028,"in_reply_to":"AAAASn%2F%2F4nI%3D","updated":"2013-08-28 13:28:56.000000000","message":"OK, yeah, that\u0027s an interesting idea. Could I defer it though for some more consideration? (in the interest of getting these changes landed)","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5088a26e7586ea5f15f553bccb3ab970b9695eef","unresolved":false,"context_lines":[{"line_number":1058,"context_line":"        if not cfg.CONF.alarm.record_history:"},{"line_number":1059,"context_line":"            return"},{"line_number":1060,"context_line":"        type \u003d storage.models.AlarmChange.CREATION"},{"line_number":1061,"context_line":"        detail \u003d json.dumps(utils.stringify_timestamps(data))"},{"line_number":1062,"context_line":"        user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":1063,"context_line":"        project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":1064,"context_line":"        conn.record_alarm_change(dict(alarm_id\u003dalarm_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F44M%3D","line":1061,"updated":"2013-08-28 11:38:26.000000000","message":"Same here.","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"02788e22a1e51677597e5b26ae3d554b4c649616","unresolved":false,"context_lines":[{"line_number":1058,"context_line":"        if not cfg.CONF.alarm.record_history:"},{"line_number":1059,"context_line":"            return"},{"line_number":1060,"context_line":"        type \u003d storage.models.AlarmChange.CREATION"},{"line_number":1061,"context_line":"        detail \u003d json.dumps(utils.stringify_timestamps(data))"},{"line_number":1062,"context_line":"        user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":1063,"context_line":"        project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":1064,"context_line":"        conn.record_alarm_change(dict(alarm_id\u003dalarm_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2F41Y%3D","line":1061,"in_reply_to":"AAAASn%2F%2F44M%3D","updated":"2013-08-28 11:52:02.000000000","message":"See response above.","commit_id":"530fc5721975ac47d83aa992f49c93685f9b2d32"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"f841836f9544a8a62fd60ee5929b63880f0409d6","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":63,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"},{"line_number":64,"context_line":"                default\u003dFalse,"},{"line_number":65,"context_line":"                help\u003d\u0027Record alarm change events\u0027"},{"line_number":66,"context_line":"                ),"},{"line_number":67,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAASn%2F%2FuuQ%3D","line":64,"updated":"2013-08-30 10:04:32.000000000","message":"I\u0027ve chatted with Nick, and we think it\u0027d be better to have this enabled by default.\n\nI prefer to have features exposed by default through the API to work out of the box, letting the deployer disabling it if it has issues with that.","commit_id":"e9265781f7c5ceb36b8279cbc9f2b0424007a719"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"fa20e930434725dac851873f4ec2361dafe29843","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":63,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"},{"line_number":64,"context_line":"                default\u003dFalse,"},{"line_number":65,"context_line":"                help\u003d\u0027Record alarm change events\u0027"},{"line_number":66,"context_line":"                ),"},{"line_number":67,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAASn%2F%2Ftds%3D","line":64,"in_reply_to":"AAAASn%2F%2Ft3w%3D","updated":"2013-08-30 16:02:08.000000000","message":"I can\u0027t see why, see below:","commit_id":"e9265781f7c5ceb36b8279cbc9f2b0424007a719"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"70c4c109071ef8ce13573bf25e2d779423b6c1e2","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":63,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"},{"line_number":64,"context_line":"                default\u003dFalse,"},{"line_number":65,"context_line":"                help\u003d\u0027Record alarm change events\u0027"},{"line_number":66,"context_line":"                ),"},{"line_number":67,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAASn%2F%2Fpe4%3D","line":64,"in_reply_to":"AAAASn%2F%2Ftds%3D","updated":"2013-09-01 15:53:58.000000000","message":"As a deployer, if I enable a feature but it doesn\u0027t work, I want an error or something -- I don\u0027t want it to fail silently. So while I do want this enabled by default, I see Eoghan\u0027s point.","commit_id":"e9265781f7c5ceb36b8279cbc9f2b0424007a719"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"eeb617abf30e0bcf9132762926db286103742578","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":63,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"},{"line_number":64,"context_line":"                default\u003dFalse,"},{"line_number":65,"context_line":"                help\u003d\u0027Record alarm change events\u0027"},{"line_number":66,"context_line":"                ),"},{"line_number":67,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAASn%2F%2Ft3w%3D","line":64,"in_reply_to":"AAAASn%2F%2Fua4%3D","updated":"2013-08-30 14:48:32.000000000","message":"The problem I think is that the scenario tests rely on the NotImplementedError being bubbled up in order to know that the tests related to alarm history should be skipped for a storage driver that doesn\u0027t implement these methods.\n\nSo I don\u0027t think that simply swallowing the NotImplementedError in _record_change() will do the trick here.","commit_id":"e9265781f7c5ceb36b8279cbc9f2b0424007a719"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c9a4cdb858286b9ced0b87eb66bcdc9f39fe7f4f","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":63,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"},{"line_number":64,"context_line":"                default\u003dFalse,"},{"line_number":65,"context_line":"                help\u003d\u0027Record alarm change events\u0027"},{"line_number":66,"context_line":"                ),"},{"line_number":67,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAASn%2F%2Fua4%3D","line":64,"in_reply_to":"AAAASn%2F%2FumA%3D","updated":"2013-08-30 12:04:43.000000000","message":"I don\u0027t think it should matters; what about catching NotImplemented in _record_change()?","commit_id":"e9265781f7c5ceb36b8279cbc9f2b0424007a719"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"665c161662cec2c6de720d3d46203cd5fd35ca93","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":63,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"},{"line_number":64,"context_line":"                default\u003dFalse,"},{"line_number":65,"context_line":"                help\u003d\u0027Record alarm change events\u0027"},{"line_number":66,"context_line":"                ),"},{"line_number":67,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAASn%2F%2FumA%3D","line":64,"in_reply_to":"AAAASn%2F%2FuuQ%3D","updated":"2013-08-30 10:54:21.000000000","message":"Well, I\u0027d be happier to have this enabled by default once I have support for alarm history in all of the storage drivers that currently support alarms (in particular sqlalchemy).\n\nSo could we defer that change to the default value until then?","commit_id":"e9265781f7c5ceb36b8279cbc9f2b0424007a719"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"fa20e930434725dac851873f4ec2361dafe29843","unresolved":false,"context_lines":[{"line_number":982,"context_line":"        detail \u003d json.dumps(utils.stringify_timestamps(data))"},{"line_number":983,"context_line":"        user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":984,"context_line":"        project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"},{"line_number":985,"context_line":"        on_behalf_of \u003d on_behalf_of or project_id"},{"line_number":986,"context_line":"        self.conn.record_alarm_change(dict(event_id\u003dstr(uuid.uuid4()),"},{"line_number":987,"context_line":"                                           alarm_id\u003dself._id,"},{"line_number":988,"context_line":"                                           type\u003dtype,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAASn%2F%2Ftdk%3D","line":985,"updated":"2013-08-30 16:02:08.000000000","message":"try:","commit_id":"e9265781f7c5ceb36b8279cbc9f2b0424007a719"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"fa20e930434725dac851873f4ec2361dafe29843","unresolved":false,"context_lines":[{"line_number":991,"context_line":"                                           project_id\u003dproject_id,"},{"line_number":992,"context_line":"                                           on_behalf_of\u003don_behalf_of,"},{"line_number":993,"context_line":"                                           timestamp\u003dnow))"},{"line_number":994,"context_line":""},{"line_number":995,"context_line":"    @wsme_pecan.wsexpose(Alarm, wtypes.text)"},{"line_number":996,"context_line":"    def get(self):"},{"line_number":997,"context_line":"        \"\"\"Return this alarm.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAASn%2F%2Ftdc%3D","line":994,"updated":"2013-08-30 16:02:08.000000000","message":"except NotImplementedError: pass","commit_id":"e9265781f7c5ceb36b8279cbc9f2b0424007a719"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"fa20e930434725dac851873f4ec2361dafe29843","unresolved":false,"context_lines":[{"line_number":992,"context_line":"                                           on_behalf_of\u003don_behalf_of,"},{"line_number":993,"context_line":"                                           timestamp\u003dnow))"},{"line_number":994,"context_line":""},{"line_number":995,"context_line":"    @wsme_pecan.wsexpose(Alarm, wtypes.text)"},{"line_number":996,"context_line":"    def get(self):"},{"line_number":997,"context_line":"        \"\"\"Return this alarm.\"\"\""},{"line_number":998,"context_line":"        return Alarm.from_db_model(self._alarm())"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAASn%2F%2FtdY%3D","line":995,"updated":"2013-08-30 16:02:08.000000000","message":"^^^^ If a driver doesn\u0027t support change recording, that won\u0027t fail tests or anything.\n\nIf it doesn\u0027t support alarm at all, it won\u0027t come to there anyway.","commit_id":"e9265781f7c5ceb36b8279cbc9f2b0424007a719"}],"tests/api/v2/test_alarm_scenarios.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"f80fb3d4ce32e8a8d5f3834f12815aa808f1ddfc","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def tearDown(self):"},{"line_number":78,"context_line":"        super(TestAlarms, self).tearDown()"},{"line_number":79,"context_line":"        cfg.CONF.reset()"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def test_list_alarms(self):"},{"line_number":82,"context_line":"        data \u003d self.get_json(\u0027/alarms\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2F9Y4%3D","line":79,"updated":"2013-08-27 14:55:05.000000000","message":"A fixture in ceilometer.tests.TestCase already handle this.","commit_id":"922d98998fdf09b978425a85a2401ade9bfa6fd5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"94a6e42eacbd428f64518ab37bc995bda589bc13","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def tearDown(self):"},{"line_number":78,"context_line":"        super(TestAlarms, self).tearDown()"},{"line_number":79,"context_line":"        cfg.CONF.reset()"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def test_list_alarms(self):"},{"line_number":82,"context_line":"        data \u003d self.get_json(\u0027/alarms\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2F9Ik%3D","line":79,"in_reply_to":"AAAASn%2F%2F9Y4%3D","updated":"2013-08-27 15:39:19.000000000","message":"Thanks, fixed in the latest patch set.","commit_id":"922d98998fdf09b978425a85a2401ade9bfa6fd5"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"7b0171c194746378a7571d8026b3b63d3ba7a4b4","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            self.assertEqual(v, actual.get(k), \u0027mismatched field: %s\u0027 % k)"},{"line_number":199,"context_line":"        self.assertTrue(actual[\u0027event_id\u0027] is not None)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def _assert_in_json(self, expected, actual):"},{"line_number":202,"context_line":"        for k, v in expected.iteritems():"},{"line_number":203,"context_line":"            fragment \u003d jsonutils.dumps({k: v})[1:-1]"},{"line_number":204,"context_line":"            self.assertTrue(fragment in actual,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAASn%2F%2F0Wg%3D","line":201,"updated":"2013-08-29 06:53:24.000000000","message":"Instead of change the expected to json, is it possible to jsonutils.loads the actual, and compare to expected? I think this would give more accurate comparison compared to using the string operator in.","commit_id":"b084d433a566229d0bde7950a24e3cb51c8b49c4"}]}
