)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"35b7630d9d8d4930b6a28edbf2fa7d764afeae0b","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Alarm API update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This update the alarm API to match the latest discution:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://wiki.openstack.org/wiki/Ceilometer/blueprints/alarm-api"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAS3%2F%2F9NY%3D","line":9,"updated":"2013-09-16 18:30:08.000000000","message":"s/discution/discussion/","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Alarm API update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This update the alarm API to match the latest discution:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://wiki.openstack.org/wiki/Ceilometer/blueprints/alarm-api"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAS3%2F%2F64E%3D","line":9,"in_reply_to":"AAAAS3%2F%2F9NY%3D","updated":"2013-09-17 09:53:24.000000000","message":"Done","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6a2219fe300eb3f2c4bb87bff910ecde6949ec8e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"It move defaults value from the storage models to the API"},{"line_number":17,"context_line":"with all tools provided by wsme to ensure mandatory field and default."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"A behaviors change, it now mandatory to PUT a full alarm description"},{"line_number":20,"context_line":"PUT call."},{"line_number":21,"context_line":"In the futur a new endpoint can be added to allow to modify only one"},{"line_number":22,"context_line":"field (example for state: /v2/alarms/\u003cid\u003e/state)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAS3%2F%2F94k%3D","line":19,"updated":"2013-09-16 14:45:55.000000000","message":"behavior\n\nit is now mandatory","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":16,"context_line":"It move defaults value from the storage models to the API"},{"line_number":17,"context_line":"with all tools provided by wsme to ensure mandatory field and default."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"A behaviors change, it now mandatory to PUT a full alarm description"},{"line_number":20,"context_line":"PUT call."},{"line_number":21,"context_line":"In the futur a new endpoint can be added to allow to modify only one"},{"line_number":22,"context_line":"field (example for state: /v2/alarms/\u003cid\u003e/state)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAS3%2F%2F64A%3D","line":19,"in_reply_to":"AAAAS3%2F%2F94k%3D","updated":"2013-09-17 09:53:24.000000000","message":"Done","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6a2219fe300eb3f2c4bb87bff910ecde6949ec8e","unresolved":false,"context_lines":[{"line_number":17,"context_line":"with all tools provided by wsme to ensure mandatory field and default."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"A behaviors change, it now mandatory to PUT a full alarm description"},{"line_number":20,"context_line":"PUT call."},{"line_number":21,"context_line":"In the futur a new endpoint can be added to allow to modify only one"},{"line_number":22,"context_line":"field (example for state: /v2/alarms/\u003cid\u003e/state)"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAS3%2F%2F94g%3D","line":20,"updated":"2013-09-16 14:45:55.000000000","message":"in a PUT call.","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"with all tools provided by wsme to ensure mandatory field and default."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"A behaviors change, it now mandatory to PUT a full alarm description"},{"line_number":20,"context_line":"PUT call."},{"line_number":21,"context_line":"In the futur a new endpoint can be added to allow to modify only one"},{"line_number":22,"context_line":"field (example for state: /v2/alarms/\u003cid\u003e/state)"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAS3%2F%2F638%3D","line":20,"in_reply_to":"AAAAS3%2F%2F94g%3D","updated":"2013-09-17 09:53:24.000000000","message":"Done","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6a2219fe300eb3f2c4bb87bff910ecde6949ec8e","unresolved":false,"context_lines":[{"line_number":20,"context_line":"PUT call."},{"line_number":21,"context_line":"In the futur a new endpoint can be added to allow to modify only one"},{"line_number":22,"context_line":"field (example for state: /v2/alarms/\u003cid\u003e/state)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Implements blueprint alarming-logical-combination"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: Ib85636728d427cdb70ef530ff9ff20d2b75c5ed1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAS3%2F%2F94U%3D","line":23,"updated":"2013-09-16 14:45:55.000000000","message":"(This is the way to go in REST indeed)","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":20,"context_line":"PUT call."},{"line_number":21,"context_line":"In the futur a new endpoint can be added to allow to modify only one"},{"line_number":22,"context_line":"field (example for state: /v2/alarms/\u003cid\u003e/state)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Implements blueprint alarming-logical-combination"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: Ib85636728d427cdb70ef530ff9ff20d2b75c5ed1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAS3%2F%2F634%3D","line":23,"in_reply_to":"AAAAS3%2F%2F94U%3D","updated":"2013-09-17 09:53:24.000000000","message":"Done","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Alarm API update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This update the alarm API to match the latest discussion:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://wiki.openstack.org/wiki/Ceilometer/blueprints/alarm-api"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAS3%2F%2F2Xc%3D","line":9,"updated":"2013-09-18 10:18:03.000000000","message":"s/update/updates/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://wiki.openstack.org/wiki/Ceilometer/blueprints/alarm-api"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"It allows to create differente kind of alarm."},{"line_number":14,"context_line":"The current kind of alarm has been named \u0027threshold\u0027."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"It move defaults value from the storage models to the API"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAS3%2F%2F2XQ%3D","line":13,"updated":"2013-09-18 10:18:03.000000000","message":"s/allows to create differente kind/allows creation of different kinds/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":13,"context_line":"It allows to create differente kind of alarm."},{"line_number":14,"context_line":"The current kind of alarm has been named \u0027threshold\u0027."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"It move defaults value from the storage models to the API"},{"line_number":17,"context_line":"with all tools provided by wsme to ensure mandatory field and default."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"A behavior change, it is now mandatory to PUT a full alarm description"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAS3%2F%2F2XM%3D","line":16,"updated":"2013-09-18 10:18:03.000000000","message":"s/move defaults value/moves the default values/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"A behavior change, it is now mandatory to PUT a full alarm description"},{"line_number":20,"context_line":"in a PUT call."},{"line_number":21,"context_line":"In the futur a new endpoint can be added to allow to modify only one"},{"line_number":22,"context_line":"field (example for state: /v2/alarms/\u003cid\u003e/state)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Implements blueprint alarming-logical-combination"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAS3%2F%2F2W8%3D","line":21,"updated":"2013-09-18 10:18:03.000000000","message":"s/futur/future/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"}],"ceilometer/alarm/threshold_evaluation.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"7dede6f88f654277211009e3de43e4e18ff4239a","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        meter_name \u003d self._meter_name_from_query(query)"},{"line_number":120,"context_line":"        try:"},{"line_number":121,"context_line":"            return self._client.statistics.list(meter_name\u003dmeter_name, q\u003dquery,"},{"line_number":122,"context_line":"                                                period\u003dalarm.rule[\u0027period\u0027])"},{"line_number":123,"context_line":"        except Exception:"},{"line_number":124,"context_line":"            LOG.exception(_(\u0027alarm stats retrieval failed\u0027))"},{"line_number":125,"context_line":"            return []"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAS3%2F%2F2Bs%3D","line":122,"updated":"2013-09-18 11:02:47.000000000","message":"One additional thought on my comment on the previous patch set, related to putting both the target meter \u0026 the additional constraints in threshold rule query:\n\n  https://review.openstack.org/#/c/45085/8/ceilometer/api/controllers/v2.py\n\nThe way the rule query is then used in the call out to the statistics API above would seem to include a needless extra {\u0027field\u0027: \u0027meter\u0027, \u0027value\u0027: METER, \u0027op\u0027: \u0027eq\u0027} in the API call query parameters (unnecessary because the meter_name is already specified in the path).\n\nLooks like that unnecessary query parameter is just overwritten in the API layer:\n\n https://github.com/openstack/ceilometer/blob/master/ceilometer/api/controllers/v2.py#L678\n\nbut still seems wrong to include it.","commit_id":"fbb8ac70f73c56faf8bea4debac456f0ad3ad0d4"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"3919ea00f1c3e2904978c04d47b4fa7da6963439","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        meter_name \u003d self._meter_name_from_query(query)"},{"line_number":120,"context_line":"        try:"},{"line_number":121,"context_line":"            return self._client.statistics.list(meter_name\u003dmeter_name, q\u003dquery,"},{"line_number":122,"context_line":"                                                period\u003dalarm.rule[\u0027period\u0027])"},{"line_number":123,"context_line":"        except Exception:"},{"line_number":124,"context_line":"            LOG.exception(_(\u0027alarm stats retrieval failed\u0027))"},{"line_number":125,"context_line":"            return []"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAS3%2F%2F19A%3D","line":122,"in_reply_to":"AAAAS3%2F%2F2Bs%3D","updated":"2013-09-18 16:47:50.000000000","message":"Done","commit_id":"fbb8ac70f73c56faf8bea4debac456f0ad3ad0d4"}],"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"7249cd8022a774d6e68f5cffc1bf843876ca75bf","unresolved":false,"context_lines":[{"line_number":73,"context_line":"operation_kind \u003d wtypes.Enum(str, \u0027lt\u0027, \u0027le\u0027, \u0027eq\u0027, \u0027ne\u0027, \u0027ge\u0027, \u0027gt\u0027)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"class Bounded_Int(wtypes.UserType):"},{"line_number":77,"context_line":"    basetype \u003d int"},{"line_number":78,"context_line":"    name \u003d \u0027bounded int\u0027"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2Fbuw%3D","line":76,"updated":"2013-09-04 19:57:33.000000000","message":"Without underscore would be more Pythonic :-)","commit_id":"2531cd7a3c6619bf1b4cec98762a3967adb316df"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"a085a83877e147c5a47a9413067f6e09e0cccfdb","unresolved":false,"context_lines":[{"line_number":73,"context_line":"operation_kind \u003d wtypes.Enum(str, \u0027lt\u0027, \u0027le\u0027, \u0027eq\u0027, \u0027ne\u0027, \u0027ge\u0027, \u0027gt\u0027)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"class Bounded_Int(wtypes.UserType):"},{"line_number":77,"context_line":"    basetype \u003d int"},{"line_number":78,"context_line":"    name \u003d \u0027bounded int\u0027"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2F%2BkY%3D","line":76,"in_reply_to":"AAAASn%2F%2Fbuw%3D","updated":"2013-09-16 08:24:57.000000000","message":"Done","commit_id":"2531cd7a3c6619bf1b4cec98762a3967adb316df"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d185db7b9ec63d906cb038386885fd757e716a55","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def validate(self, value):"},{"line_number":85,"context_line":"        if self.min is not None and value \u003c self.min:"},{"line_number":86,"context_line":"            raise wsme.exc.ValueError("},{"line_number":87,"context_line":"                \u0027Value %s is invalid (sould be greater or egal than %s\u0027 %"},{"line_number":88,"context_line":"                (value, self.min))"},{"line_number":89,"context_line":"        if self.max is not None and value \u003c self.max:"},{"line_number":90,"context_line":"            raise wsme.exc.ValueError("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2Fbok%3D","line":87,"updated":"2013-09-04 20:51:48.000000000","message":"\"sould\" -\u003e \"should\"\n\n\"egal than\" -\u003e \"equal to\"","commit_id":"2531cd7a3c6619bf1b4cec98762a3967adb316df"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"a085a83877e147c5a47a9413067f6e09e0cccfdb","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def validate(self, value):"},{"line_number":85,"context_line":"        if self.min is not None and value \u003c self.min:"},{"line_number":86,"context_line":"            raise wsme.exc.ValueError("},{"line_number":87,"context_line":"                \u0027Value %s is invalid (sould be greater or egal than %s\u0027 %"},{"line_number":88,"context_line":"                (value, self.min))"},{"line_number":89,"context_line":"        if self.max is not None and value \u003c self.max:"},{"line_number":90,"context_line":"            raise wsme.exc.ValueError("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2F%2BkU%3D","line":87,"in_reply_to":"AAAASn%2F%2Fbok%3D","updated":"2013-09-16 08:24:57.000000000","message":"Done","commit_id":"2531cd7a3c6619bf1b4cec98762a3967adb316df"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d185db7b9ec63d906cb038386885fd757e716a55","unresolved":false,"context_lines":[{"line_number":941,"context_line":"            \u0027meter_name\u0027,"},{"line_number":942,"context_line":"            \u0027comparison_operator\u0027,"},{"line_number":943,"context_line":"        ]"},{"line_number":944,"context_line":"        for key in mandatory:"},{"line_number":945,"context_line":"            if getattr(self, key) is wsme.Unset:"},{"line_number":946,"context_line":"                error \u003d _(\"%s must be set.\") % key"},{"line_number":947,"context_line":"                pecan.response.translatable_error \u003d error"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2Fbj4%3D","line":944,"updated":"2013-09-04 20:51:48.000000000","message":"It would be nice if we could generate a single error with the names of all mandatory but unset values, instead of having the user discover each one by making many calls in to the API.","commit_id":"2531cd7a3c6619bf1b4cec98762a3967adb316df"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"a085a83877e147c5a47a9413067f6e09e0cccfdb","unresolved":false,"context_lines":[{"line_number":941,"context_line":"            \u0027meter_name\u0027,"},{"line_number":942,"context_line":"            \u0027comparison_operator\u0027,"},{"line_number":943,"context_line":"        ]"},{"line_number":944,"context_line":"        for key in mandatory:"},{"line_number":945,"context_line":"            if getattr(self, key) is wsme.Unset:"},{"line_number":946,"context_line":"                error \u003d _(\"%s must be set.\") % key"},{"line_number":947,"context_line":"                pecan.response.translatable_error \u003d error"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2F%2BkM%3D","line":944,"in_reply_to":"AAAASn%2F%2Fbj4%3D","updated":"2013-09-16 08:24:57.000000000","message":"Every things have been changed to use wsme wsproperty/wsattr","commit_id":"2531cd7a3c6619bf1b4cec98762a3967adb316df"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d185db7b9ec63d906cb038386885fd757e716a55","unresolved":false,"context_lines":[{"line_number":946,"context_line":"                error \u003d _(\"%s must be set.\") % key"},{"line_number":947,"context_line":"                pecan.response.translatable_error \u003d error"},{"line_number":948,"context_line":"                raise wsme.exc.ClientSideError(error)"},{"line_number":949,"context_line":""},{"line_number":950,"context_line":"        self.alarm_id \u003d str(uuid.uuid4())"},{"line_number":951,"context_line":"        self.user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":952,"context_line":"        self.project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2Fbes%3D","line":949,"updated":"2013-09-04 20:51:48.000000000","message":"The rest of this method, that sets the default values, should be done in __init__() and the method could be renamed validate().","commit_id":"2531cd7a3c6619bf1b4cec98762a3967adb316df"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"a085a83877e147c5a47a9413067f6e09e0cccfdb","unresolved":false,"context_lines":[{"line_number":946,"context_line":"                error \u003d _(\"%s must be set.\") % key"},{"line_number":947,"context_line":"                pecan.response.translatable_error \u003d error"},{"line_number":948,"context_line":"                raise wsme.exc.ClientSideError(error)"},{"line_number":949,"context_line":""},{"line_number":950,"context_line":"        self.alarm_id \u003d str(uuid.uuid4())"},{"line_number":951,"context_line":"        self.user_id \u003d pecan.request.headers.get(\u0027X-User-Id\u0027)"},{"line_number":952,"context_line":"        self.project_id \u003d pecan.request.headers.get(\u0027X-Project-Id\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2F%2BkQ%3D","line":949,"in_reply_to":"AAAASn%2F%2Fbes%3D","updated":"2013-09-16 08:24:57.000000000","message":"Same","commit_id":"2531cd7a3c6619bf1b4cec98762a3967adb316df"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"35b7630d9d8d4930b6a28edbf2fa7d764afeae0b","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def validate(self, value):"},{"line_number":86,"context_line":"        if self.min is not None and value \u003c self.min:"},{"line_number":87,"context_line":"            error \u003d _(\u0027Value %(value)s is invalid (should be greater or egal \u0027"},{"line_number":88,"context_line":"                      \u0027to %(min)s)\u0027) % dict(value\u003dvalue, min\u003dself.min)"},{"line_number":89,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":90,"context_line":"            raise wsme.exc.ClientSideError(error)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F9fM%3D","line":87,"updated":"2013-09-16 18:30:08.000000000","message":"s/egal/equal/","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def validate(self, value):"},{"line_number":86,"context_line":"        if self.min is not None and value \u003c self.min:"},{"line_number":87,"context_line":"            error \u003d _(\u0027Value %(value)s is invalid (should be greater or egal \u0027"},{"line_number":88,"context_line":"                      \u0027to %(min)s)\u0027) % dict(value\u003dvalue, min\u003dself.min)"},{"line_number":89,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":90,"context_line":"            raise wsme.exc.ClientSideError(error)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F63k%3D","line":87,"in_reply_to":"AAAAS3%2F%2F9fM%3D","updated":"2013-09-17 09:53:24.000000000","message":"Done","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"35b7630d9d8d4930b6a28edbf2fa7d764afeae0b","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":90,"context_line":"            raise wsme.exc.ClientSideError(error)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if self.max is not None and value \u003c self.max:"},{"line_number":93,"context_line":"            error \u003d _(\u0027Value %(value)s is invalid (should be lower or egal \u0027"},{"line_number":94,"context_line":"                      \u0027to %(max)s)\u0027) % dict(value\u003dvalue, max\u003dself.max)"},{"line_number":95,"context_line":"            pecan.response.translatable_error \u003d error"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F9Ik%3D","line":92,"updated":"2013-09-16 18:30:08.000000000","message":"value \u003e self.max","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":90,"context_line":"            raise wsme.exc.ClientSideError(error)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if self.max is not None and value \u003c self.max:"},{"line_number":93,"context_line":"            error \u003d _(\u0027Value %(value)s is invalid (should be lower or egal \u0027"},{"line_number":94,"context_line":"                      \u0027to %(max)s)\u0027) % dict(value\u003dvalue, max\u003dself.max)"},{"line_number":95,"context_line":"            pecan.response.translatable_error \u003d error"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F63g%3D","line":92,"in_reply_to":"AAAAS3%2F%2F9Ik%3D","updated":"2013-09-17 09:53:24.000000000","message":"Done, I have added some test for this class","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6a2219fe300eb3f2c4bb87bff910ecde6949ec8e","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        if self.datatype.validate(value):"},{"line_number":112,"context_line":"            setattr(parent, self._name, value)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def __init__(self, name, *args, **kwargs):"},{"line_number":115,"context_line":"        self._name \u003d \u0027_advenum_%s\u0027 % name"},{"line_number":116,"context_line":"        self._default \u003d kwargs.pop(\u0027default\u0027, None)"},{"line_number":117,"context_line":"        mandatory \u003d kwargs.pop(\u0027mandatory\u0027, False)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F9so%3D","line":114,"updated":"2013-09-16 14:45:55.000000000","message":"Any good reason not to use a defined list of kwargs here?","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        if self.datatype.validate(value):"},{"line_number":112,"context_line":"            setattr(parent, self._name, value)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def __init__(self, name, *args, **kwargs):"},{"line_number":115,"context_line":"        self._name \u003d \u0027_advenum_%s\u0027 % name"},{"line_number":116,"context_line":"        self._default \u003d kwargs.pop(\u0027default\u0027, None)"},{"line_number":117,"context_line":"        mandatory \u003d kwargs.pop(\u0027mandatory\u0027, False)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F9FA%3D","line":114,"in_reply_to":"AAAAS3%2F%2F9so%3D","updated":"2013-09-17 09:53:24.000000000","message":"This is because the args and kwargs must be passed as-is to the wtypes.Enum, without the default and the mandatory args.","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6a2219fe300eb3f2c4bb87bff910ecde6949ec8e","unresolved":false,"context_lines":[{"line_number":920,"context_line":"                                  default\u003d\u0027eq\u0027)"},{"line_number":921,"context_line":"    \"The comparison against the alarm threshold\""},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    threshold \u003d wsme.wsattr(float, default\u003d300.0)"},{"line_number":924,"context_line":"    \"The threshold of the alarm\""},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"    statistic \u003d AdvEnum(\u0027statistic\u0027, str, \u0027max\u0027, \u0027min\u0027, \u0027avg\u0027, \u0027sum\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F9sY%3D","line":923,"updated":"2013-09-16 14:45:55.000000000","message":"I think it\u0027d be safer to have no default value but a mandatory argument. 300 really doesn\u0027t mean anything without context.","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":920,"context_line":"                                  default\u003d\u0027eq\u0027)"},{"line_number":921,"context_line":"    \"The comparison against the alarm threshold\""},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    threshold \u003d wsme.wsattr(float, default\u003d300.0)"},{"line_number":924,"context_line":"    \"The threshold of the alarm\""},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"    statistic \u003d AdvEnum(\u0027statistic\u0027, str, \u0027max\u0027, \u0027min\u0027, \u0027avg\u0027, \u0027sum\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F9GY%3D","line":923,"in_reply_to":"AAAAS3%2F%2F9sY%3D","updated":"2013-09-17 09:53:24.000000000","message":"Done","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"35b7630d9d8d4930b6a28edbf2fa7d764afeae0b","unresolved":false,"context_lines":[{"line_number":934,"context_line":"        if query:"},{"line_number":935,"context_line":"            query \u003d [Query(**q) for q in query]"},{"line_number":936,"context_line":"            meter \u003d [q for q in query if q.field \u003d\u003d \u0027meter\u0027]"},{"line_number":937,"context_line":"            if len(meter) \u003d\u003d 0:"},{"line_number":938,"context_line":"                error \u003d _(\"The Query must contains at least a meter\")"},{"line_number":939,"context_line":"                pecan.response.translatable_error \u003d error"},{"line_number":940,"context_line":"                raise wsme.exc.ClientSideError(error)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F8vY%3D","line":937,"updated":"2013-09-16 18:30:08.000000000","message":"can probably change this to:\nif any(q.field \u003d\u003d \u0027meter\u0027 for q in query):\n\ni guess second question is, do we allow for more than one query field with \u0027meter\u0027 value. we don\u0027t seem to be checking for this. just  seem to be grabbing the first instance.","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":934,"context_line":"        if query:"},{"line_number":935,"context_line":"            query \u003d [Query(**q) for q in query]"},{"line_number":936,"context_line":"            meter \u003d [q for q in query if q.field \u003d\u003d \u0027meter\u0027]"},{"line_number":937,"context_line":"            if len(meter) \u003d\u003d 0:"},{"line_number":938,"context_line":"                error \u003d _(\"The Query must contains at least a meter\")"},{"line_number":939,"context_line":"                pecan.response.translatable_error \u003d error"},{"line_number":940,"context_line":"                raise wsme.exc.ClientSideError(error)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F6vw%3D","line":937,"in_reply_to":"AAAAS3%2F%2F8vY%3D","updated":"2013-09-17 09:53:24.000000000","message":"I have changed the condition, the meter must be present once.","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6a2219fe300eb3f2c4bb87bff910ecde6949ec8e","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"        change \u003d dict((k, v) for k, v in new_alarm.items()"},{"line_number":1200,"context_line":"                      if v !\u003d old_alarm[k] and k not in"},{"line_number":1201,"context_line":"                      [\u0027timestamp\u0027, \u0027state_timestamp\u0027])"},{"line_number":1202,"context_line":"        if set(change) \u003d\u003d set([\u0027state\u0027]):"},{"line_number":1203,"context_line":"            change_type \u003d storage.models.AlarmChange.STATE_TRANSITION"},{"line_number":1204,"context_line":"        else:"},{"line_number":1205,"context_line":"            change_type \u003d storage.models.AlarmChange.RULE_CHANGE"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F9lo%3D","line":1202,"updated":"2013-09-16 14:45:55.000000000","message":"I wonder, it seems to me you should record 2 changes if we have both rule and state change. No?","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"        change \u003d dict((k, v) for k, v in new_alarm.items()"},{"line_number":1200,"context_line":"                      if v !\u003d old_alarm[k] and k not in"},{"line_number":1201,"context_line":"                      [\u0027timestamp\u0027, \u0027state_timestamp\u0027])"},{"line_number":1202,"context_line":"        if set(change) \u003d\u003d set([\u0027state\u0027]):"},{"line_number":1203,"context_line":"            change_type \u003d storage.models.AlarmChange.STATE_TRANSITION"},{"line_number":1204,"context_line":"        else:"},{"line_number":1205,"context_line":"            change_type \u003d storage.models.AlarmChange.RULE_CHANGE"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F6dU%3D","line":1202,"in_reply_to":"AAAAS3%2F%2F9lo%3D","updated":"2013-09-17 09:53:24.000000000","message":"Done","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"a9ecae08c7d4df2830f57b1e636f8652f93a484f","unresolved":false,"context_lines":[{"line_number":1014,"context_line":"    repeat_actions \u003d wsme.wsattr(bool, default\u003dFalse)"},{"line_number":1015,"context_line":"    \"The actions should be re-triggered on each evaluation cycle\""},{"line_number":1016,"context_line":""},{"line_number":1017,"context_line":"    type \u003d AdvEnum(\u0027type\u0027, str, \u0027threshold\u0027, \u0027combination\u0027, mandatory\u003dTrue)"},{"line_number":1018,"context_line":"    \"Explicit type specifier to select which rule to follow below.\""},{"line_number":1019,"context_line":""},{"line_number":1020,"context_line":"    threshold_rule \u003d AlarmThresholdRule"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2F6VA%3D","line":1017,"updated":"2013-09-17 10:12:33.000000000","message":"FWIW it\u0027s weird to talk about combination in this patchset.","commit_id":"9792aa812a60380476c5592902834f84113b2441"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"4e224b51e8057b107bc5f2858110c3282358abb0","unresolved":false,"context_lines":[{"line_number":1014,"context_line":"    repeat_actions \u003d wsme.wsattr(bool, default\u003dFalse)"},{"line_number":1015,"context_line":"    \"The actions should be re-triggered on each evaluation cycle\""},{"line_number":1016,"context_line":""},{"line_number":1017,"context_line":"    type \u003d AdvEnum(\u0027type\u0027, str, \u0027threshold\u0027, \u0027combination\u0027, mandatory\u003dTrue)"},{"line_number":1018,"context_line":"    \"Explicit type specifier to select which rule to follow below.\""},{"line_number":1019,"context_line":""},{"line_number":1020,"context_line":"    threshold_rule \u003d AlarmThresholdRule"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2F51E%3D","line":1017,"in_reply_to":"AAAAS3%2F%2F6VA%3D","updated":"2013-09-17 13:03:55.000000000","message":"Done","commit_id":"9792aa812a60380476c5592902834f84113b2441"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"a9ecae08c7d4df2830f57b1e636f8652f93a484f","unresolved":false,"context_lines":[{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"        alarm \u003d self.conn.update_alarm(alarm_in)"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":"        change \u003d dict((k, v) for k, v in new_alarm.items()"},{"line_number":1214,"context_line":"                      if v !\u003d old_alarm[k] and k not in"},{"line_number":1215,"context_line":"                      [\u0027timestamp\u0027, \u0027state_timestamp\u0027])"},{"line_number":1216,"context_line":"        if \u0027state\u0027 in change:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2F6UI%3D","line":1213,"updated":"2013-09-17 10:12:33.000000000","message":"I think you could do something like:\n\nchange \u003d dict(set(old_alarm.items()) - set(new_alarms.items()))\n\nThough I\u0027m not choked by your approach nonetheless.","commit_id":"9792aa812a60380476c5592902834f84113b2441"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c1939871db1221e5f96f4268e035b7a379fe25d3","unresolved":false,"context_lines":[{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"        alarm \u003d self.conn.update_alarm(alarm_in)"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":"        change \u003d dict((k, v) for k, v in new_alarm.items()"},{"line_number":1214,"context_line":"                      if v !\u003d old_alarm[k] and k not in"},{"line_number":1215,"context_line":"                      [\u0027timestamp\u0027, \u0027state_timestamp\u0027])"},{"line_number":1216,"context_line":"        if \u0027state\u0027 in change:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2F5pk%3D","line":1213,"in_reply_to":"AAAAS3%2F%2F51I%3D","updated":"2013-09-17 13:43:48.000000000","message":"I have reverted to my version, set() won\u0027t work if a dict value is a list.","commit_id":"9792aa812a60380476c5592902834f84113b2441"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"4e224b51e8057b107bc5f2858110c3282358abb0","unresolved":false,"context_lines":[{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"        alarm \u003d self.conn.update_alarm(alarm_in)"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":"        change \u003d dict((k, v) for k, v in new_alarm.items()"},{"line_number":1214,"context_line":"                      if v !\u003d old_alarm[k] and k not in"},{"line_number":1215,"context_line":"                      [\u0027timestamp\u0027, \u0027state_timestamp\u0027])"},{"line_number":1216,"context_line":"        if \u0027state\u0027 in change:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2F51I%3D","line":1213,"in_reply_to":"AAAAS3%2F%2F6UI%3D","updated":"2013-09-17 13:03:55.000000000","message":"Done","commit_id":"9792aa812a60380476c5592902834f84113b2441"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def validate(self, value):"},{"line_number":86,"context_line":"        if self.min is not None and value \u003c self.min:"},{"line_number":87,"context_line":"            error \u003d _(\u0027Value %(value)s is invalid (should be greater or egual \u0027"},{"line_number":88,"context_line":"                      \u0027to %(min)s)\u0027) % dict(value\u003dvalue, min\u003dself.min)"},{"line_number":89,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":90,"context_line":"            raise wsme.exc.ClientSideError(error)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2W0%3D","line":87,"updated":"2013-09-18 10:18:03.000000000","message":"s/egual/equal/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            raise wsme.exc.ClientSideError(error)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if self.max is not None and value \u003e self.max:"},{"line_number":93,"context_line":"            error \u003d _(\u0027Value %(value)s is invalid (should be lower or egual \u0027"},{"line_number":94,"context_line":"                      \u0027to %(max)s)\u0027) % dict(value\u003dvalue, max\u003dself.max)"},{"line_number":95,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":96,"context_line":"            raise wsme.exc.ClientSideError(error)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Wk%3D","line":93,"updated":"2013-09-18 10:18:03.000000000","message":"s/egual/equal/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        if self.datatype.validate(value):"},{"line_number":112,"context_line":"            setattr(parent, self._name, value)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def __init__(self, name, *args, **kwargs):"},{"line_number":115,"context_line":"        self._name \u003d \u0027_advenum_%s\u0027 % name"},{"line_number":116,"context_line":"        self._default \u003d kwargs.pop(\u0027default\u0027, None)"},{"line_number":117,"context_line":"        mandatory \u003d kwargs.pop(\u0027mandatory\u0027, False)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Sc%3D","line":114,"updated":"2013-09-18 10:18:03.000000000","message":"Isn\u0027t the usual python convention to have __init__ as the first method in the class definition?\n\nIs the unconventional ordering here because you refer to _get \u0026 _set within __init__?","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":937,"context_line":""},{"line_number":938,"context_line":"    @staticmethod"},{"line_number":939,"context_line":"    def validate(threshold_rule):"},{"line_number":940,"context_line":"        meter \u003d [q for q in threshold_rule.query if q.field \u003d\u003d \u0027meter\u0027]"},{"line_number":941,"context_line":"        if len(meter) !\u003d 1:"},{"line_number":942,"context_line":"            error \u003d _(\"The Query must contains one meter\")"},{"line_number":943,"context_line":"            pecan.response.translatable_error \u003d error"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Kg%3D","line":940,"updated":"2013-09-18 10:18:03.000000000","message":"Maybe I\u0027m missing something, but I\u0027m not loving the unification of the specification of the target meter *and* the additional constraints both in the query. I can\u0027t see the advantage of specifying the meter in this way (whereas for the other constraints, I do like the new format compared to the old matching_metadata representation).\n\nFor example what would the following query mean?\n\n  dict(field\u003d\u0027meter\u0027, op\u003d\u0027gt\u0027, value\u003d\u0027cpu_util\u0027)\n\ni.e. we have no concept of anything other than equality for meters, so why bring some unused flexibility around the operator into the picture?\n\n(I\u0027m guessing the op will just be implicitly treated as \u0027eq\u0027 in the example above, but seems odd to give some flexibility on the one hand and then take it away with the other)","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d6de1b352710483bd9748f170c656cd6f5e909fc","unresolved":false,"context_lines":[{"line_number":938,"context_line":"    @staticmethod"},{"line_number":939,"context_line":"    def validate(threshold_rule):"},{"line_number":940,"context_line":"        meter \u003d [q for q in threshold_rule.query if q.field \u003d\u003d \u0027meter\u0027]"},{"line_number":941,"context_line":"        if len(meter) !\u003d 1:"},{"line_number":942,"context_line":"            error \u003d _(\"The Query must contains one meter\")"},{"line_number":943,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":944,"context_line":"            raise wsme.exc.ClientSideError(error)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F274%3D","line":941,"updated":"2013-09-18 06:12:01.000000000","message":"Since we\u0027re already checking the meter name, I think it\u0027d be better to make sure the meter it not empty string here.","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"56db4bbe5358b8685580a72bd35d4207d5636f65","unresolved":false,"context_lines":[{"line_number":938,"context_line":"    @staticmethod"},{"line_number":939,"context_line":"    def validate(threshold_rule):"},{"line_number":940,"context_line":"        meter \u003d [q for q in threshold_rule.query if q.field \u003d\u003d \u0027meter\u0027]"},{"line_number":941,"context_line":"        if len(meter) !\u003d 1:"},{"line_number":942,"context_line":"            error \u003d _(\"The Query must contains one meter\")"},{"line_number":943,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":944,"context_line":"            raise wsme.exc.ClientSideError(error)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2sA%3D","line":941,"in_reply_to":"AAAAS3%2F%2F274%3D","updated":"2013-09-18 07:46:29.000000000","message":"Good remark, I have added a check with \u0027_query_to_kwargs\u0027 method too. To reject the alarm earlier if query are wrong instead of having an alarm that always fail in evaluator.","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":942,"context_line":"            error \u003d _(\"The Query must contains one meter\")"},{"line_number":943,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":944,"context_line":"            raise wsme.exc.ClientSideError(error)"},{"line_number":945,"context_line":"        return threshold_rule"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":"    @property"},{"line_number":948,"context_line":"    def default_description(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Jc%3D","line":945,"updated":"2013-09-18 10:18:03.000000000","message":"Just a thought ... I wonder should we exclude \u0027timestamp\u0027 from the query also (given that the threshold evaluator will always need to specifiy this as an addition constraint on the statistics query).","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":947,"context_line":"    @property"},{"line_number":948,"context_line":"    def default_description(self):"},{"line_number":949,"context_line":"        return _("},{"line_number":950,"context_line":"            \u0027Alarm when sample is %(comparison_operator)s a %(statistic)s of\u0027"},{"line_number":951,"context_line":"            \u0027%(threshold)s over %(period)s seconds\u0027) % \\"},{"line_number":952,"context_line":"            dict(comparison_operator\u003dself.comparison_operator,"},{"line_number":953,"context_line":"                 statistic\u003dself.statistic,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2U4%3D","line":950,"updated":"2013-09-18 10:18:03.000000000","message":"The default description currently includes the meter name instead of \"sample\". I\u0027m wondering why that changed? The old form more descriptive to me.","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":985,"context_line":"    name \u003d wsme.wsattr(wtypes.text, mandatory\u003dTrue)"},{"line_number":986,"context_line":"    \"The name for the alarm\""},{"line_number":987,"context_line":""},{"line_number":988,"context_line":"    _description \u003d None  # provide a default"},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"    def get_description(self):"},{"line_number":991,"context_line":"        rule \u003d getattr(self, \u0027%s_rule\u0027 % self.type, None)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Uc%3D","line":988,"updated":"2013-09-18 10:18:03.000000000","message":"Isn\u0027t the default description encapsulated in the threshold rule?","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":1021,"context_line":"    threshold_rule \u003d AlarmThresholdRule"},{"line_number":1022,"context_line":"    \"Describe when to trigger the alarm based on computed statistics\""},{"line_number":1023,"context_line":""},{"line_number":1024,"context_line":"    # These settings are ignored in the the PUT or POST operations, but are"},{"line_number":1025,"context_line":"    # filled in for GET"},{"line_number":1026,"context_line":"    project_id \u003d wtypes.text"},{"line_number":1027,"context_line":"    \"The ID of the project or tenant that owns the alarm\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2UY%3D","line":1024,"updated":"2013-09-18 10:18:03.000000000","message":"s/the the/the/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"            data.state_timestamp \u003d alarm_in.state_timestamp"},{"line_number":1190,"context_line":""},{"line_number":1191,"context_line":"        old_alarm \u003d Alarm.from_db_model(alarm_in).as_dict(storage.models.Alarm)"},{"line_number":1192,"context_line":"        new_alarm \u003d data.as_dict(storage.models.Alarm)"},{"line_number":1193,"context_line":"        try:"},{"line_number":1194,"context_line":"            alarm_in \u003d storage.models.Alarm(**new_alarm)"},{"line_number":1195,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Tg%3D","line":1192,"updated":"2013-09-18 10:18:03.000000000","message":"new_alarm seems inappropriate here, as the alarm is pre-existing.","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"        try:"},{"line_number":1194,"context_line":"            alarm_in \u003d storage.models.Alarm(**new_alarm)"},{"line_number":1195,"context_line":"        except Exception:"},{"line_number":1196,"context_line":"            LOG.exception(\"Error while posting alarm: %s\" % new_alarm)"},{"line_number":1197,"context_line":"            error \u003d _(\"Alarm incorrect\")"},{"line_number":1198,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":1199,"context_line":"            raise wsme.exc.ClientSideError(error)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Tw%3D","line":1196,"updated":"2013-09-18 10:18:03.000000000","message":"s/posting/putting/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"                      if v !\u003d old_alarm[k] and k not in"},{"line_number":1205,"context_line":"                      [\u0027timestamp\u0027, \u0027state_timestamp\u0027])"},{"line_number":1206,"context_line":""},{"line_number":1207,"context_line":"        if \u0027state\u0027 in change:"},{"line_number":1208,"context_line":"            change_type \u003d storage.models.AlarmChange.STATE_TRANSITION"},{"line_number":1209,"context_line":"            self._record_change({\u0027state\u0027: change[\u0027state\u0027]}, now,"},{"line_number":1210,"context_line":"                                on_behalf_of\u003dalarm.project_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Qw%3D","line":1207,"updated":"2013-09-18 10:18:03.000000000","message":"Seems odd to record two alarm change events if the state and more other attributes are updated in a single PUT. Previously this was interpreted as a state transition, i.e. the state change took precedence when determining the change type.","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":1210,"context_line":"                                on_behalf_of\u003dalarm.project_id,"},{"line_number":1211,"context_line":"                                type\u003dchange_type)"},{"line_number":1212,"context_line":"            del change[\u0027state\u0027]"},{"line_number":1213,"context_line":"        if change:"},{"line_number":1214,"context_line":"            self._record_change(change, now, on_behalf_of\u003dalarm.project_id,"},{"line_number":1215,"context_line":"                                type\u003dstorage.models.AlarmChange.RULE_CHANGE)"},{"line_number":1216,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Rc%3D","line":1213,"updated":"2013-09-18 10:18:03.000000000","message":"One obvious side-effect of this condition is that a non-modifying update isn\u0027t recorded in the alarm history, even though we do call out to the storage layer (i.e. do some real work on behalf of the API call, and at least update the timestamp).\n\nIt seems wrong to have a more recent timestamp for the alarm than the last recorded change event in the alarm history.","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"            del change[\u0027state\u0027]"},{"line_number":1213,"context_line":"        if change:"},{"line_number":1214,"context_line":"            self._record_change(change, now, on_behalf_of\u003dalarm.project_id,"},{"line_number":1215,"context_line":"                                type\u003dstorage.models.AlarmChange.RULE_CHANGE)"},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"        return Alarm.from_db_model(alarm)"},{"line_number":1218,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2TQ%3D","line":1215,"updated":"2013-09-18 10:18:03.000000000","message":"Doesn\u0027t type default to RULE_CHANGE in _record_change() above?","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"b9bbdc39af85337bd0970844703c80ab45b230b5","unresolved":false,"context_lines":[{"line_number":945,"context_line":"        #that add project_id in query"},{"line_number":946,"context_line":"        _query_to_kwargs(threshold_rule.query, storage.SampleFilter.__init__,"},{"line_number":947,"context_line":"                         internal_keys\u003d[\u0027timestamp\u0027, \u0027start\u0027, \u0027start_timestamp\u0027"},{"line_number":948,"context_line":"                                        \u0027end\u0027, \u0027end_timestamp\u0027])"},{"line_number":949,"context_line":"        return threshold_rule"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2F0t8%3D","line":948,"updated":"2013-09-18 16:49:41.000000000","message":"Comment from Eoghan Glynn  from a other abandonned patch that I haven\u0027t done yet:\n\n\nI like the the idea of the constraint on project_id being added in this way.\nBut I wonder should the implicit constraint then be extracted from the alarm representation before this is returned to the API caller.\nIt would be awkward I guess to distinguish between the case where the alarm owner explicitly specified an equivalent constraint, and where it\u0027s added for them in that _sanitize_query() call above.","commit_id":"314a8a1c28326c73f102262952d9a11394a0f088"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"cb7158c55fe11eb6091718ca8f12dcec09d5d03c","unresolved":false,"context_lines":[{"line_number":945,"context_line":"        #that add project_id in query"},{"line_number":946,"context_line":"        _query_to_kwargs(threshold_rule.query, storage.SampleFilter.__init__,"},{"line_number":947,"context_line":"                         internal_keys\u003d[\u0027timestamp\u0027, \u0027start\u0027, \u0027start_timestamp\u0027"},{"line_number":948,"context_line":"                                        \u0027end\u0027, \u0027end_timestamp\u0027])"},{"line_number":949,"context_line":"        return threshold_rule"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2F0l0%3D","line":948,"in_reply_to":"AAAAS3%2F%2F0t8%3D","updated":"2013-09-18 17:17:04.000000000","message":"Thanks for preserving the thought. It\u0027s a non-blocker though that shouldn\u0027t IMO prevent this patch from landing.","commit_id":"314a8a1c28326c73f102262952d9a11394a0f088"}],"ceilometer/storage/impl_mongodb.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"3c4cac958edf5c2aa82ffcb322299d9888e21541","unresolved":false,"context_lines":[{"line_number":853,"context_line":"                          \u0027type\u0027: \u0027string\u0027})"},{"line_number":854,"context_line":"        del alarm[\u0027matching_metadata\u0027]"},{"line_number":855,"context_line":"        alarm[\u0027rule\u0027][\u0027query\u0027] \u003d query"},{"line_number":856,"context_line":"        return alarm"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"    def get_alarms(self, name\u003dNone, user\u003dNone,"},{"line_number":859,"context_line":"                   project\u003dNone, enabled\u003dTrue, alarm_id\u003dNone, pagination\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2F%2Bfo%3D","line":856,"updated":"2013-09-16 09:01:15.000000000","message":"I will remove the unuseful return","commit_id":"42e909f6a5c72be3d9bd9cf7be6f1f27e9b9032a"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8891b67405e32fd8394760c3ca776f200cfaf5c0","unresolved":false,"context_lines":[{"line_number":853,"context_line":"                          \u0027type\u0027: \u0027string\u0027})"},{"line_number":854,"context_line":"        del alarm[\u0027matching_metadata\u0027]"},{"line_number":855,"context_line":"        alarm[\u0027rule\u0027][\u0027query\u0027] \u003d query"},{"line_number":856,"context_line":"        return alarm"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"    def get_alarms(self, name\u003dNone, user\u003dNone,"},{"line_number":859,"context_line":"                   project\u003dNone, enabled\u003dTrue, alarm_id\u003dNone, pagination\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2F%2BV0%3D","line":856,"in_reply_to":"AAAAS3%2F%2F%2Bfo%3D","updated":"2013-09-16 10:13:32.000000000","message":"Done","commit_id":"42e909f6a5c72be3d9bd9cf7be6f1f27e9b9032a"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"3c4cac958edf5c2aa82ffcb322299d9888e21541","unresolved":false,"context_lines":[{"line_number":884,"context_line":"            a \u003d {}"},{"line_number":885,"context_line":"            a.update(alarm)"},{"line_number":886,"context_line":"            del a[\u0027_id\u0027]"},{"line_number":887,"context_line":"            a \u003d self._ensure_latest_format(a)"},{"line_number":888,"context_line":"            yield models.Alarm(**a)"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def update_alarm(self, alarm):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2F%2Bfg%3D","line":887,"updated":"2013-09-16 09:01:15.000000000","message":"I will remove the \u0027a \u003d \u0027, dict is modified in place","commit_id":"42e909f6a5c72be3d9bd9cf7be6f1f27e9b9032a"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8891b67405e32fd8394760c3ca776f200cfaf5c0","unresolved":false,"context_lines":[{"line_number":884,"context_line":"            a \u003d {}"},{"line_number":885,"context_line":"            a.update(alarm)"},{"line_number":886,"context_line":"            del a[\u0027_id\u0027]"},{"line_number":887,"context_line":"            a \u003d self._ensure_latest_format(a)"},{"line_number":888,"context_line":"            yield models.Alarm(**a)"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def update_alarm(self, alarm):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2F%2BVw%3D","line":887,"in_reply_to":"AAAAS3%2F%2F%2Bfg%3D","updated":"2013-09-16 10:13:32.000000000","message":"Done","commit_id":"42e909f6a5c72be3d9bd9cf7be6f1f27e9b9032a"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"3c4cac958edf5c2aa82ffcb322299d9888e21541","unresolved":false,"context_lines":[{"line_number":899,"context_line":""},{"line_number":900,"context_line":"        stored_alarm \u003d self.db.alarm.find({\u0027alarm_id\u0027: alarm.alarm_id})[0]"},{"line_number":901,"context_line":"        del stored_alarm[\u0027_id\u0027]"},{"line_number":902,"context_line":"        stored_alarm \u003d self._ensure_latest_format(stored_alarm)"},{"line_number":903,"context_line":"        return models.Alarm(**stored_alarm)"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    create_alarm \u003d update_alarm"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2F%2BfY%3D","line":902,"updated":"2013-09-16 09:01:15.000000000","message":"I will remove the \u0027stored_alarm \u003d \u0027, dict is modified in place","commit_id":"42e909f6a5c72be3d9bd9cf7be6f1f27e9b9032a"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8891b67405e32fd8394760c3ca776f200cfaf5c0","unresolved":false,"context_lines":[{"line_number":899,"context_line":""},{"line_number":900,"context_line":"        stored_alarm \u003d self.db.alarm.find({\u0027alarm_id\u0027: alarm.alarm_id})[0]"},{"line_number":901,"context_line":"        del stored_alarm[\u0027_id\u0027]"},{"line_number":902,"context_line":"        stored_alarm \u003d self._ensure_latest_format(stored_alarm)"},{"line_number":903,"context_line":"        return models.Alarm(**stored_alarm)"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    create_alarm \u003d update_alarm"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2F%2BVs%3D","line":902,"in_reply_to":"AAAAS3%2F%2F%2BfY%3D","updated":"2013-09-16 10:13:32.000000000","message":"Done","commit_id":"42e909f6a5c72be3d9bd9cf7be6f1f27e9b9032a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":799,"context_line":"            return new_matching_metadata"},{"line_number":800,"context_line":""},{"line_number":801,"context_line":"    @classmethod"},{"line_number":802,"context_line":"    def _ensure_latest_format(cls, alarm):"},{"line_number":803,"context_line":"        \"\"\"This ensure the alarm return by the storage have the correct format"},{"line_number":804,"context_line":"        The previous format looks like:"},{"line_number":805,"context_line":"        {"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2QU%3D","line":802,"updated":"2013-09-18 10:18:03.000000000","message":"Latest is always a relative term. Maybe better as _ensure_encapsulated_rule_format() or something like that?","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":800,"context_line":""},{"line_number":801,"context_line":"    @classmethod"},{"line_number":802,"context_line":"    def _ensure_latest_format(cls, alarm):"},{"line_number":803,"context_line":"        \"\"\"This ensure the alarm return by the storage have the correct format"},{"line_number":804,"context_line":"        The previous format looks like:"},{"line_number":805,"context_line":"        {"},{"line_number":806,"context_line":"            \u0027alarm_id\u0027: \u00270ld-4l3rt\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Qk%3D","line":803,"updated":"2013-09-18 10:18:03.000000000","message":"s/return/returned/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"}],"ceilometer/storage/models.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    :param name: The Alarm name"},{"line_number":270,"context_line":"    :param description: User friendly description of the alarm"},{"line_number":271,"context_line":"    :param enabled: Is the alarm enabled"},{"line_number":272,"context_line":"    :param state: Alarm state (alarm/nodata/ok)"},{"line_number":273,"context_line":"    :param rule: A dict of rule that define the alarm"},{"line_number":274,"context_line":"    :param user_id: the owner/creator of the alarm"},{"line_number":275,"context_line":"    :param project_id: the project_id of the creator"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2NI%3D","line":272,"updated":"2013-09-18 10:18:03.000000000","message":"Unrelated to your changes, but could fix:\n\ns/nodata/insufficient data/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    :param description: User friendly description of the alarm"},{"line_number":271,"context_line":"    :param enabled: Is the alarm enabled"},{"line_number":272,"context_line":"    :param state: Alarm state (alarm/nodata/ok)"},{"line_number":273,"context_line":"    :param rule: A dict of rule that define the alarm"},{"line_number":274,"context_line":"    :param user_id: the owner/creator of the alarm"},{"line_number":275,"context_line":"    :param project_id: the project_id of the creator"},{"line_number":276,"context_line":"    :param evaluation_periods: the number of periods"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2NQ%3D","line":273,"updated":"2013-09-18 10:18:03.000000000","message":"s/A dict of rule that define the alarm/A rule that defines when the alarm fires/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"}],"ceilometer/storage/sqlalchemy/migrate_repo/versions/016_simpler_alarm.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"35b7630d9d8d4930b6a28edbf2fa7d764afeae0b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        }"},{"line_number":53,"context_line":"        table.update().where(table.c.id \u003d\u003d row.id).values(rule\u003drule).execute()"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    index \u003d Index(\u0027ix_alarm_counter_name\u0027, table.c.meter_name)"},{"line_number":56,"context_line":"    index.drop(bind\u003dmigrate_engine)"},{"line_number":57,"context_line":"    table.c.meter_name.drop()"},{"line_number":58,"context_line":"    table.c.comparison_operator.drop()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F9A0%3D","line":55,"updated":"2013-09-16 18:30:08.000000000","message":"ix_alarm_meter_name so we can avoid counter reference?","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        }"},{"line_number":53,"context_line":"        table.update().where(table.c.id \u003d\u003d row.id).values(rule\u003drule).execute()"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    index \u003d Index(\u0027ix_alarm_counter_name\u0027, table.c.meter_name)"},{"line_number":56,"context_line":"    index.drop(bind\u003dmigrate_engine)"},{"line_number":57,"context_line":"    table.c.meter_name.drop()"},{"line_number":58,"context_line":"    table.c.comparison_operator.drop()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F6ug%3D","line":55,"in_reply_to":"AAAAS3%2F%2F9A0%3D","updated":"2013-09-17 09:53:24.000000000","message":"This the name of the index created by a previous script, I drop this index here","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"35b7630d9d8d4930b6a28edbf2fa7d764afeae0b","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    for c in columns:"},{"line_number":80,"context_line":"        c.create(table)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    index \u003d Index(\u0027ix_alarm_counter_name\u0027, table.c.meter_name)"},{"line_number":83,"context_line":"    index.create(bind\u003dmigrate_engine)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    for row in table.select().execute().fetchall():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F9As%3D","line":82,"updated":"2013-09-16 18:30:08.000000000","message":"same as above","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    for c in columns:"},{"line_number":80,"context_line":"        c.create(table)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    index \u003d Index(\u0027ix_alarm_counter_name\u0027, table.c.meter_name)"},{"line_number":83,"context_line":"    index.create(bind\u003dmigrate_engine)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    for row in table.select().execute().fetchall():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F6uc%3D","line":82,"in_reply_to":"AAAAS3%2F%2F9As%3D","updated":"2013-09-17 09:53:24.000000000","message":"Same here","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright © 2013 eNovance \u003clicensing@enovance.com\u003e"},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"# Author: Julien Danjou \u003cjulien@danjou.info\u003e"},{"line_number":6,"context_line":"#"},{"line_number":7,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":8,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2M4%3D","line":5,"updated":"2013-09-18 10:18:03.000000000","message":"s/Julien Danjou/Mehdi Abaakouk/","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":29,"context_line":"    table \u003d Table(\u0027alarm\u0027, meta, autoload\u003dTrue)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    type \u003d Column(\u0027type\u0027, String(255), default\u003d\u0027threshold\u0027)"},{"line_number":32,"context_line":"    type.create(table, populate_default\u003dTrue)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    rule \u003d Column(\u0027rule\u0027, Text())"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2M0%3D","line":31,"updated":"2013-09-18 10:18:03.000000000","message":"Is 255 really needed here?","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a1635fb6e72593cf35d6f84bd47458bb133545b6","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        c.create(table)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    index \u003d Index(\u0027ix_alarm_counter_name\u0027, table.c.meter_name)"},{"line_number":83,"context_line":"    index.create(bind\u003dmigrate_engine)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    for row in table.select().execute().fetchall():"},{"line_number":86,"context_line":"        if row.type !\u003d \u0027threshold\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2F2Mk%3D","line":83,"updated":"2013-09-18 10:18:03.000000000","message":"I wonder should the creation of the index on the meter name be delayed until this column is actually populated?","commit_id":"a02f83580aa955391f33cc4c33983856dbbc5ff9"}],"ceilometer/storage/sqlalchemy/models.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6a2219fe300eb3f2c4bb87bff910ecde6949ec8e","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    insufficient_data_actions \u003d Column(JSONEncodedDict)"},{"line_number":195,"context_line":"    repeat_actions \u003d Column(Boolean)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    rule \u003d Column(JSONEncodedDict)"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"class AlarmChange(Base):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F9kE%3D","line":197,"updated":"2013-09-16 14:45:55.000000000","message":"The less JSON we store in SQL, the more performant the backend will be IMHO. I don\u0027t see any reason we wouldn\u0027t be able to have columns here; even if rules have different formats.","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"}],"tests/storage/test_impl_mongodb.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"35b7630d9d8d4930b6a28edbf2fa7d764afeae0b","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            upsert\u003dTrue)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        alarm[\u0027alarm_id\u0027] \u003d \u0027other-kind-of-0ld-4l3rt\u0027"},{"line_number":222,"context_line":"        alarm[\u0027name\u0027] \u003d \u0027other-old-alaert\u0027"},{"line_number":223,"context_line":"        alarm[\u0027matching_metadata\u0027] \u003d [{\u0027key\u0027: \u0027key1\u0027, \u0027value\u0027: \u0027value1\u0027},"},{"line_number":224,"context_line":"                                      {\u0027key\u0027: \u0027key2\u0027, \u0027value\u0027: \u0027value2\u0027}]"},{"line_number":225,"context_line":"        self.conn.db.alarm.update("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F8%2F8%3D","line":222,"updated":"2013-09-16 18:30:08.000000000","message":"s/alaert/alert/","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e63619b4c974d5739a679b2ce9029242fb445fe5","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            upsert\u003dTrue)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        alarm[\u0027alarm_id\u0027] \u003d \u0027other-kind-of-0ld-4l3rt\u0027"},{"line_number":222,"context_line":"        alarm[\u0027name\u0027] \u003d \u0027other-old-alaert\u0027"},{"line_number":223,"context_line":"        alarm[\u0027matching_metadata\u0027] \u003d [{\u0027key\u0027: \u0027key1\u0027, \u0027value\u0027: \u0027value1\u0027},"},{"line_number":224,"context_line":"                                      {\u0027key\u0027: \u0027key2\u0027, \u0027value\u0027: \u0027value2\u0027}]"},{"line_number":225,"context_line":"        self.conn.db.alarm.update("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F6sA%3D","line":222,"in_reply_to":"AAAAS3%2F%2F8%2F8%3D","updated":"2013-09-17 09:53:24.000000000","message":"Done","commit_id":"1fc862ccaaeecc3c37cd080ae8e148da76c43123"}],"tests/storage/test_storage_scenarios.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"3c4cac958edf5c2aa82ffcb322299d9888e21541","unresolved":false,"context_lines":[{"line_number":1647,"context_line":"        self.add_some_alarms()"},{"line_number":1648,"context_line":"        alarms \u003d list(self.conn.get_alarms())"},{"line_number":1649,"context_line":"        self.assertEqual(len(alarms), 3)"},{"line_number":1650,"context_line":"        #sorted(alarms)"},{"line_number":1651,"context_line":"        self.assertEqual(alarms[0].rule[\u0027query\u0027][1][\u0027value\u0027], \u0027test.one\u0027)"},{"line_number":1652,"context_line":"        self.assertEqual(alarms[1].rule[\u0027query\u0027][1][\u0027value\u0027], \u0027test.fourty\u0027)"},{"line_number":1653,"context_line":"        self.assertEqual(alarms[2].rule[\u0027query\u0027][2][\u0027value\u0027], \u0027test.five\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2F%2BgY%3D","line":1650,"updated":"2013-09-16 09:01:15.000000000","message":"I will remove that.","commit_id":"42e909f6a5c72be3d9bd9cf7be6f1f27e9b9032a"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8891b67405e32fd8394760c3ca776f200cfaf5c0","unresolved":false,"context_lines":[{"line_number":1647,"context_line":"        self.add_some_alarms()"},{"line_number":1648,"context_line":"        alarms \u003d list(self.conn.get_alarms())"},{"line_number":1649,"context_line":"        self.assertEqual(len(alarms), 3)"},{"line_number":1650,"context_line":"        #sorted(alarms)"},{"line_number":1651,"context_line":"        self.assertEqual(alarms[0].rule[\u0027query\u0027][1][\u0027value\u0027], \u0027test.one\u0027)"},{"line_number":1652,"context_line":"        self.assertEqual(alarms[1].rule[\u0027query\u0027][1][\u0027value\u0027], \u0027test.fourty\u0027)"},{"line_number":1653,"context_line":"        self.assertEqual(alarms[2].rule[\u0027query\u0027][2][\u0027value\u0027], \u0027test.five\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2F%2BU8%3D","line":1650,"in_reply_to":"AAAAS3%2F%2F%2BgY%3D","updated":"2013-09-16 10:13:32.000000000","message":"Done","commit_id":"42e909f6a5c72be3d9bd9cf7be6f1f27e9b9032a"}]}
