)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit adds v2/event_types, v2/events and"},{"line_number":10,"context_line":"v2/events/*/traits. Currently, the event api is"},{"line_number":11,"context_line":"limitted to admin users, but is configurable in"},{"line_number":12,"context_line":"the policy.json file. All users that are able to"},{"line_number":13,"context_line":"access the event api can view all events in the"},{"line_number":14,"context_line":"system, it is not restricted per project id. In"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAQn%2F%2FMbg%3D","line":11,"updated":"2013-08-05 17:44:43.000000000","message":"limited","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"}],"ceilometer/api/acl.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e92ce4c30ecf17f70d5668c8e7aa2b7a72a37196","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        return headers.get(\u0027X-Project-Id\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def is_admin(headers):"},{"line_number":66,"context_line":"    return True if _enforce_admin_context(headers) else False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FJ6w%3D","line":65,"updated":"2013-08-07 09:48:47.000000000","message":"This function is useless since it translates down to \"return _enforce_admin_context(headers)\"","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"}],"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":31,"context_line":"#"},{"line_number":32,"context_line":"import datetime"},{"line_number":33,"context_line":"import inspect"},{"line_number":34,"context_line":"import functools"},{"line_number":35,"context_line":"import pecan"},{"line_number":36,"context_line":"from pecan import rest"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMbA%3D","line":34,"updated":"2013-08-05 17:44:43.000000000","message":"alphabetical order","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"782e8d2cb625db42c47aaafd5469e3e8b11f2ee5","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"import wsme"},{"line_number":39,"context_line":"import wsmeext.pecan as wsme_pecan"},{"line_number":40,"context_line":"import wsme.types as wtypes"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"from ceilometer.openstack.common import context"},{"line_number":43,"context_line":"from ceilometer.openstack.common import log"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMOc%3D","line":40,"updated":"2013-08-05 18:17:49.000000000","message":"oops, I did not mean to change this!","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":929,"context_line":""},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"class EventQuery(Query):"},{"line_number":932,"context_line":""},{"line_number":933,"context_line":"    _type_converters \u003d {\u0027t_datetime\u0027: timeutils.parse_isotime,"},{"line_number":934,"context_line":"                        \u0027t_int\u0027: int,"},{"line_number":935,"context_line":"                        \u0027t_float\u0027: float,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMaE%3D","line":932,"updated":"2013-08-05 17:44:43.000000000","message":"doc string.","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":1021,"context_line":"    @requires_admin"},{"line_number":1022,"context_line":"    @wsme_pecan.wsexpose([unicode])"},{"line_number":1023,"context_line":"    def get_all(self):"},{"line_number":1024,"context_line":"        event_types \u003d list(pecan.request.storage_conn.get_event_types())"},{"line_number":1025,"context_line":"        return event_types"},{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMZY%3D","line":1024,"updated":"2013-08-05 17:44:43.000000000","message":"return list(pecan.request ...) perhaps?","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e92ce4c30ecf17f70d5668c8e7aa2b7a72a37196","unresolved":false,"context_lines":[{"line_number":925,"context_line":"    \"the name of the trait\""},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def __init__(self, **kwargs):"},{"line_number":928,"context_line":"        super(TraitDescription, self).__init__(**kwargs)"},{"line_number":929,"context_line":""},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"class EventQuery(Query):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FJ6c%3D","line":928,"updated":"2013-08-07 09:48:47.000000000","message":"You don\u0027t need this __init__ since it\u0027s doing nothing","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e92ce4c30ecf17f70d5668c8e7aa2b7a72a37196","unresolved":false,"context_lines":[{"line_number":934,"context_line":"    _type_converters \u003d {\u0027t_datetime\u0027: timeutils.parse_isotime,"},{"line_number":935,"context_line":"                        \u0027t_int\u0027: int,"},{"line_number":936,"context_line":"                        \u0027t_float\u0027: float,"},{"line_number":937,"context_line":"                        \u0027t_string\u0027: lambda x: x}"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"    _dtype \u003d None"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FJ6U%3D","line":937,"updated":"2013-08-07 09:48:47.000000000","message":"str or unicode maybe?","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e92ce4c30ecf17f70d5668c8e7aa2b7a72a37196","unresolved":false,"context_lines":[{"line_number":970,"context_line":"    dtype \u003d wtypes.text"},{"line_number":971,"context_line":"    \"the type of the trait\""},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"    def __init__(self, **kwargs):"},{"line_number":974,"context_line":"        super(Trait, self).__init__(**kwargs)"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FJ6A%3D","line":973,"updated":"2013-08-07 09:48:47.000000000","message":"Same here, not needed.","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e92ce4c30ecf17f70d5668c8e7aa2b7a72a37196","unresolved":false,"context_lines":[{"line_number":1002,"context_line":"                             set_traits)"},{"line_number":1003,"context_line":"    \"Event specific properties\""},{"line_number":1004,"context_line":""},{"line_number":1005,"context_line":"    def __init__(self, **kwargs):"},{"line_number":1006,"context_line":"        super(Event, self).__init__(**kwargs)"},{"line_number":1007,"context_line":""},{"line_number":1008,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FJ5o%3D","line":1005,"updated":"2013-08-07 09:48:47.000000000","message":"Same here, not needed","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"},{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"acb351569971d941f9bec0d3d009bb048ac3f236","unresolved":false,"context_lines":[{"line_number":1004,"context_line":"        super(Event, self).__init__(**kwargs)"},{"line_number":1005,"context_line":""},{"line_number":1006,"context_line":""},{"line_number":1007,"context_line":"def requires_admin(func):"},{"line_number":1008,"context_line":""},{"line_number":1009,"context_line":"    @functools.wraps(func)"},{"line_number":1010,"context_line":"    def wrapped(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAQn%2F%2FAbc%3D","line":1007,"updated":"2013-08-08 15:25:37.000000000","message":"+1 on this decorator, as it throws its own exception and should work fine.","commit_id":"ef1953b65c6867857a30434c40995f679afb0f4b"},{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"acb351569971d941f9bec0d3d009bb048ac3f236","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"    def wrapped(*args, **kwargs):"},{"line_number":1024,"context_line":"        try:"},{"line_number":1025,"context_line":"            return func(*args, **kwargs)"},{"line_number":1026,"context_line":"        except Exception as e:"},{"line_number":1027,"context_line":"            if hasattr(e, \u0027message\u0027):"},{"line_number":1028,"context_line":"                pecan.response.translatable_error \u003d e.message"},{"line_number":1029,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAQn%2F%2FAbw%3D","line":1026,"updated":"2013-08-08 15:25:37.000000000","message":"As is, this except block is never going to be executed because wsexpose consumes exceptions.  I would otherwise suggest having this decorator run before wsexpose, but I\u0027ve had problems getting that to work as described in my line 840 comment here:\n\nhttps://review.openstack.org/#/c/39623/4/ceilometer/api/controllers/v2.py","commit_id":"ef1953b65c6867857a30434c40995f679afb0f4b"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"ca1dbffd8248f337da5ede6c52ba743edf7c9e11","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"    def wrapped(*args, **kwargs):"},{"line_number":1024,"context_line":"        try:"},{"line_number":1025,"context_line":"            return func(*args, **kwargs)"},{"line_number":1026,"context_line":"        except Exception as e:"},{"line_number":1027,"context_line":"            if hasattr(e, \u0027message\u0027):"},{"line_number":1028,"context_line":"                pecan.response.translatable_error \u003d e.message"},{"line_number":1029,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAQn%2F%2FALA%3D","line":1026,"in_reply_to":"AAAAQn%2F%2FAbw%3D","updated":"2013-08-08 16:23:02.000000000","message":"Yeah, I\u0027ve never been successful getting a decorator inside of a wsme decorator. Thanks for the comment, I will remove this.","commit_id":"ef1953b65c6867857a30434c40995f679afb0f4b"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"da92aafa03c8f3362bead3394dda4c52fe34930e","unresolved":false,"context_lines":[{"line_number":1090,"context_line":"class EventsController(rest.RestController):"},{"line_number":1091,"context_line":"    \"\"\"Works on Events.\"\"\""},{"line_number":1092,"context_line":""},{"line_number":1093,"context_line":"    traits \u003d TraitsController()"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"    @requires_admin"},{"line_number":1096,"context_line":"    @localize_exceptions"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAQn%2F%2FGDM%3D","line":1093,"updated":"2013-08-07 09:49:24.000000000","message":"I would have think that would go on the EventTypesController","commit_id":"ef1953b65c6867857a30434c40995f679afb0f4b"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"ca1dbffd8248f337da5ede6c52ba743edf7c9e11","unresolved":false,"context_lines":[{"line_number":1090,"context_line":"class EventsController(rest.RestController):"},{"line_number":1091,"context_line":"    \"\"\"Works on Events.\"\"\""},{"line_number":1092,"context_line":""},{"line_number":1093,"context_line":"    traits \u003d TraitsController()"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"    @requires_admin"},{"line_number":1096,"context_line":"    @localize_exceptions"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAQn%2F%2FAK8%3D","line":1093,"in_reply_to":"AAAAQn%2F%2FGDM%3D","updated":"2013-08-08 16:23:02.000000000","message":"Per decisions in the ceilometer meeting, this will move under event_types.","commit_id":"ef1953b65c6867857a30434c40995f679afb0f4b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2208e9bb23d4978b7203370d50e33ec6042f879e","unresolved":false,"context_lines":[{"line_number":1007,"context_line":"    traits \u003d wsme.wsproperty({wtypes.text: wtypes.text},"},{"line_number":1008,"context_line":"                             get_traits,"},{"line_number":1009,"context_line":"                             set_traits)"},{"line_number":1010,"context_line":"    \"Event specific properties\""},{"line_number":1011,"context_line":""},{"line_number":1012,"context_line":""},{"line_number":1013,"context_line":"def requires_admin(func):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2B7ac%3D","line":1010,"updated":"2013-08-09 19:34:21.000000000","message":"Hmm, I didn\u0027t notice these string comments before...\n\nI believe they should be:\n\n a) above the property they describe\n b) Be docstring \"\"\"-enclosed","commit_id":"5509a11fb6c7eb0041b0f54a33b46efcc63833de"},{"author":{"_account_id":7368,"name":"Thomas Maddox","email":"me@thomasem.net","username":"thomasm"},"change_message_id":"7ed3f39dd6ccca032dd7a3c82ee0cc8c42450aaf","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        super(EntityNotFound, self).__init__("},{"line_number":81,"context_line":"            _(\"%(entity)s %(id)s Not Found\") % {\u0027entity\u0027: entity,"},{"line_number":82,"context_line":"                                                \u0027id\u0027: id})"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"class BoundedInt(wtypes.UserType):"},{"line_number":86,"context_line":"    basetype \u003d int"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2BwYM%3D","line":83,"updated":"2013-11-20 16:16:48.000000000","message":"I think in a previous patchset this had status_code \u003d 404 as a class member.\n\nIt looks like this is what\u0027s causing all of the test failures. Have you been running the unit tests locally \u0027tox -e py27,pep8\u0027 locally before submitting new branches?","commit_id":"77e6267fea717efee5a445c6c972017c414496c3"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"e5c97296a163dca6fc15039ead604460a08e9f97","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        super(EntityNotFound, self).__init__("},{"line_number":81,"context_line":"            _(\"%(entity)s %(id)s Not Found\") % {\u0027entity\u0027: entity,"},{"line_number":82,"context_line":"                                                \u0027id\u0027: id})"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"class BoundedInt(wtypes.UserType):"},{"line_number":86,"context_line":"    basetype \u003d int"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2Bv0s%3D","line":83,"in_reply_to":"AAAATn%2F%2BwYM%3D","updated":"2013-11-20 18:16:28.000000000","message":"yeah, I ran the tests locally and they worked. I had to rebase during the git review, and I guess I removed these status_codes when I shouldn\u0027t have.","commit_id":"77e6267fea717efee5a445c6c972017c414496c3"},{"author":{"_account_id":7368,"name":"Thomas Maddox","email":"me@thomasem.net","username":"thomasm"},"change_message_id":"7ed3f39dd6ccca032dd7a3c82ee0cc8c42450aaf","unresolved":false,"context_lines":[{"line_number":285,"context_line":"    def __init__(self, id):"},{"line_number":286,"context_line":"        super(ProjectNotAuthorized, self).__init__("},{"line_number":287,"context_line":"            _(\"Not Authorized to access project %s\") % id)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"def _get_auth_project(on_behalf_of\u003dNone):"},{"line_number":291,"context_line":"    # when an alarm is created by an admin on behalf of another tenant"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2BwXw%3D","line":288,"updated":"2013-11-20 16:16:48.000000000","message":"Same as my previous comment except status_code \u003d 401","commit_id":"77e6267fea717efee5a445c6c972017c414496c3"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"d16b8bad9e2424b11855f44fc9fa60a18ba02beb","unresolved":false,"context_lines":[{"line_number":1546,"context_line":""},{"line_number":1547,"context_line":"    def set_dtype(self, value):"},{"line_number":1548,"context_line":"        if value and value not in type_kind.values:"},{"line_number":1549,"context_line":"            raise wsme.exc.ClientSideError(_(\"Invalid data type: %s\") % value)"},{"line_number":1550,"context_line":"        self._dtype \u003d value"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"    dtype \u003d wsme.wsproperty(type_kind, get_dtype, set_dtype)"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Wjo%3D","line":1549,"updated":"2013-12-12 12:00:58.000000000","message":"Use the ceilometer ClientSideError not the wsme one to make translation work.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1546,"context_line":""},{"line_number":1547,"context_line":"    def set_dtype(self, value):"},{"line_number":1548,"context_line":"        if value and value not in type_kind.values:"},{"line_number":1549,"context_line":"            raise wsme.exc.ClientSideError(_(\"Invalid data type: %s\") % value)"},{"line_number":1550,"context_line":"        self._dtype \u003d value"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"    dtype \u003d wsme.wsproperty(type_kind, get_dtype, set_dtype)"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Bbs%3D","line":1549,"in_reply_to":"AAAATn%2F9Wjo%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"83890f225cdcb6783bea58f8fe0cf62e3126c7fc","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"        self._dtype \u003d value"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"    dtype \u003d wsme.wsproperty(type_kind, get_dtype, set_dtype)"},{"line_number":1553,"context_line":"    \"the data type, defaults to t_string\""},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"    def get_value(self):"},{"line_number":1556,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94pE%3D","line":1553,"updated":"2013-12-04 21:50:29.000000000","message":"what is this string a comment? should it be using # instead?","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"        self._dtype \u003d value"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"    dtype \u003d wsme.wsproperty(type_kind, get_dtype, set_dtype)"},{"line_number":1553,"context_line":"    \"the data type, defaults to t_string\""},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"    def get_value(self):"},{"line_number":1556,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BbU%3D","line":1553,"in_reply_to":"AAAATn%2F90xk%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"3f18aec7294be6e6664f8fd3631b0fb3bfd431b6","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"        self._dtype \u003d value"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"    dtype \u003d wsme.wsproperty(type_kind, get_dtype, set_dtype)"},{"line_number":1553,"context_line":"    \"the data type, defaults to t_string\""},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"    def get_value(self):"},{"line_number":1556,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F90xk%3D","line":1553,"in_reply_to":"AAAATn%2F94k4%3D","updated":"2013-12-05 14:51:49.000000000","message":"cool, good to know I usually see docstring in python with \"\"\" not \"","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":7368,"name":"Thomas Maddox","email":"me@thomasem.net","username":"thomasm"},"change_message_id":"8879b820632b88a353f1a168d18a0423c7a52255","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"        self._dtype \u003d value"},{"line_number":1551,"context_line":""},{"line_number":1552,"context_line":"    dtype \u003d wsme.wsproperty(type_kind, get_dtype, set_dtype)"},{"line_number":1553,"context_line":"    \"the data type, defaults to t_string\""},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"    def get_value(self):"},{"line_number":1556,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94k4%3D","line":1553,"in_reply_to":"AAAATn%2F94pE%3D","updated":"2013-12-04 22:05:41.000000000","message":"That\u0027s used by WSME/Pecan sphinx extension for documentation. It\u0027s a docstring, not a comment.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"d16b8bad9e2424b11855f44fc9fa60a18ba02beb","unresolved":false,"context_lines":[{"line_number":1557,"context_line":"            return self._type_converters[self.dtype](self.value)"},{"line_number":1558,"context_line":"        except Exception:"},{"line_number":1559,"context_line":"            raise wsme.exc.ClientSideError(_(\"Invalid argument: %s\")"},{"line_number":1560,"context_line":"                                           % self.value)"},{"line_number":1561,"context_line":""},{"line_number":1562,"context_line":""},{"line_number":1563,"context_line":"class Trait(_Base):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Wjk%3D","line":1560,"updated":"2013-12-12 12:00:58.000000000","message":"Use the ceilometer ClientSideError not the wsme one to make translation work.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1557,"context_line":"            return self._type_converters[self.dtype](self.value)"},{"line_number":1558,"context_line":"        except Exception:"},{"line_number":1559,"context_line":"            raise wsme.exc.ClientSideError(_(\"Invalid argument: %s\")"},{"line_number":1560,"context_line":"                                           % self.value)"},{"line_number":1561,"context_line":""},{"line_number":1562,"context_line":""},{"line_number":1563,"context_line":"class Trait(_Base):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BbE%3D","line":1560,"in_reply_to":"AAAATn%2F9Wjk%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"f5aab189daa580a1c2ec4d666d4d57961466e694","unresolved":false,"context_lines":[{"line_number":1579,"context_line":"                   value\u003d\u0027compute.hostname\u0027"},{"line_number":1580,"context_line":"                   )"},{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":""},{"line_number":1583,"context_line":"class Event(_Base):"},{"line_number":1584,"context_line":"    \"\"\"A System event.\"\"\""},{"line_number":1585,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Cy0%3D","line":1582,"updated":"2013-12-17 11:41:25.000000000","message":"Why do you mix fields and set, get methods? I used to think that it\u0027s better to declare all property fields and after that all methods follow","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1579,"context_line":"                   value\u003d\u0027compute.hostname\u0027"},{"line_number":1580,"context_line":"                   )"},{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":""},{"line_number":1583,"context_line":"class Event(_Base):"},{"line_number":1584,"context_line":"    \"\"\"A System event.\"\"\""},{"line_number":1585,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BaA%3D","line":1582,"in_reply_to":"AAAATn%2F9Cy0%3D","updated":"2013-12-17 16:12:58.000000000","message":"Hm, not sure I understand the question :(","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"83890f225cdcb6783bea58f8fe0cf62e3126c7fc","unresolved":false,"context_lines":[{"line_number":1584,"context_line":"    \"\"\"A System event.\"\"\""},{"line_number":1585,"context_line":""},{"line_number":1586,"context_line":"    message_id \u003d wtypes.text"},{"line_number":1587,"context_line":"    \"The message ID for the notification\""},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":"    event_type \u003d wtypes.text"},{"line_number":1590,"context_line":"    \"The name of the event\""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94ok%3D","line":1587,"updated":"2013-12-04 21:50:29.000000000","message":"coment?","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"f5aab189daa580a1c2ec4d666d4d57961466e694","unresolved":false,"context_lines":[{"line_number":1585,"context_line":""},{"line_number":1586,"context_line":"    message_id \u003d wtypes.text"},{"line_number":1587,"context_line":"    \"The message ID for the notification\""},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":"    event_type \u003d wtypes.text"},{"line_number":1590,"context_line":"    \"The name of the event\""},{"line_number":1591,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Czw%3D","line":1588,"updated":"2013-12-17 11:41:25.000000000","message":"event_type is the name of event? Maybe it\u0027s better to use event_name instead? Or fix the comment","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1585,"context_line":""},{"line_number":1586,"context_line":"    message_id \u003d wtypes.text"},{"line_number":1587,"context_line":"    \"The message ID for the notification\""},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":"    event_type \u003d wtypes.text"},{"line_number":1590,"context_line":"    \"The name of the event\""},{"line_number":1591,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Ba0%3D","line":1588,"in_reply_to":"AAAATn%2F9Czw%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done. event_type is the type of the event (ie, nova.compute.build.start), there was a bit of confusion between event_name and event_type, I\u0027m changing it all to event_type, as that is what the notification payload uses. Thanks for catching this.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"83890f225cdcb6783bea58f8fe0cf62e3126c7fc","unresolved":false,"context_lines":[{"line_number":1587,"context_line":"    \"The message ID for the notification\""},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":"    event_type \u003d wtypes.text"},{"line_number":1590,"context_line":"    \"The name of the event\""},{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"    _traits \u003d None"},{"line_number":1593,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94og%3D","line":1590,"updated":"2013-12-04 21:50:29.000000000","message":"comment?","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8162e587bb8f819425f99011e06a19fd0521d216","unresolved":false,"context_lines":[{"line_number":1598,"context_line":"        self._traits \u003d {}"},{"line_number":1599,"context_line":"        for trait in traits:"},{"line_number":1600,"context_line":"            if trait.dtype \u003d\u003d storage.models.Trait.DATETIME_TYPE:"},{"line_number":1601,"context_line":"                value \u003d trait.value.isoformat()"},{"line_number":1602,"context_line":"            else:"},{"line_number":1603,"context_line":"                value \u003d str(trait.value)"},{"line_number":1604,"context_line":"            self._traits[trait.name] \u003d value"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9WWE%3D","line":1601,"updated":"2013-12-12 12:04:16.000000000","message":"when the trait is a DATETIME_TYPE one, the value that go in the database driver is a datetime. I think the database that come out the database driver should be datetime too.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1598,"context_line":"        self._traits \u003d {}"},{"line_number":1599,"context_line":"        for trait in traits:"},{"line_number":1600,"context_line":"            if trait.dtype \u003d\u003d storage.models.Trait.DATETIME_TYPE:"},{"line_number":1601,"context_line":"                value \u003d trait.value.isoformat()"},{"line_number":1602,"context_line":"            else:"},{"line_number":1603,"context_line":"                value \u003d str(trait.value)"},{"line_number":1604,"context_line":"            self._traits[trait.name] \u003d value"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BYA%3D","line":1601,"in_reply_to":"AAAATn%2F9WWE%3D","updated":"2013-12-17 16:12:58.000000000","message":"see my comment below.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"d16b8bad9e2424b11855f44fc9fa60a18ba02beb","unresolved":false,"context_lines":[{"line_number":1600,"context_line":"            if trait.dtype \u003d\u003d storage.models.Trait.DATETIME_TYPE:"},{"line_number":1601,"context_line":"                value \u003d trait.value.isoformat()"},{"line_number":1602,"context_line":"            else:"},{"line_number":1603,"context_line":"                value \u003d str(trait.value)"},{"line_number":1604,"context_line":"            self._traits[trait.name] \u003d value"},{"line_number":1605,"context_line":""},{"line_number":1606,"context_line":"    traits \u003d wsme.wsproperty({wtypes.text: wtypes.text},"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9WfE%3D","line":1603,"updated":"2013-12-12 12:00:58.000000000","message":"python3 compat: use six instead str","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1600,"context_line":"            if trait.dtype \u003d\u003d storage.models.Trait.DATETIME_TYPE:"},{"line_number":1601,"context_line":"                value \u003d trait.value.isoformat()"},{"line_number":1602,"context_line":"            else:"},{"line_number":1603,"context_line":"                value \u003d str(trait.value)"},{"line_number":1604,"context_line":"            self._traits[trait.name] \u003d value"},{"line_number":1605,"context_line":""},{"line_number":1606,"context_line":"    traits \u003d wsme.wsproperty({wtypes.text: wtypes.text},"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BX8%3D","line":1603,"in_reply_to":"AAAATn%2F9WfE%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"83890f225cdcb6783bea58f8fe0cf62e3126c7fc","unresolved":false,"context_lines":[{"line_number":1606,"context_line":"    traits \u003d wsme.wsproperty({wtypes.text: wtypes.text},"},{"line_number":1607,"context_line":"                             get_traits,"},{"line_number":1608,"context_line":"                             set_traits)"},{"line_number":1609,"context_line":"    \"Event specific properties\""},{"line_number":1610,"context_line":""},{"line_number":1611,"context_line":"    _generated \u003d None"},{"line_number":1612,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94oY%3D","line":1609,"updated":"2013-12-04 21:50:29.000000000","message":"comment?","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"d16b8bad9e2424b11855f44fc9fa60a18ba02beb","unresolved":false,"context_lines":[{"line_number":1621,"context_line":""},{"line_number":1622,"context_line":"    generated \u003d wsme.wsproperty(datetime.datetime,"},{"line_number":1623,"context_line":"                                get_generated,"},{"line_number":1624,"context_line":"                                set_generated)"},{"line_number":1625,"context_line":"    \"The time the event occurred\""},{"line_number":1626,"context_line":""},{"line_number":1627,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9We4%3D","line":1624,"updated":"2013-12-12 12:00:58.000000000","message":"Why \"generated\" is not a simple datetime ? Something looks wrong for me here, when the event is recorded, the models.Event  \u0027generated\u0027 attribute is a datetime, but when you get a event this is a float. I think this attribut must be the same type in and out of the storage driver.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1621,"context_line":""},{"line_number":1622,"context_line":"    generated \u003d wsme.wsproperty(datetime.datetime,"},{"line_number":1623,"context_line":"                                get_generated,"},{"line_number":1624,"context_line":"                                set_generated)"},{"line_number":1625,"context_line":"    \"The time the event occurred\""},{"line_number":1626,"context_line":""},{"line_number":1627,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BYE%3D","line":1624,"in_reply_to":"AAAATn%2F9We4%3D","updated":"2013-12-17 16:12:58.000000000","message":"Ok, so if I\u0027m understanding this right, the storage driver needs to accept and return a date time, not a float. I think that\u0027s a good idea. I will fix that in a separate patch and then rebase this one on top of it. Thanks.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"83890f225cdcb6783bea58f8fe0cf62e3126c7fc","unresolved":false,"context_lines":[{"line_number":1622,"context_line":"    generated \u003d wsme.wsproperty(datetime.datetime,"},{"line_number":1623,"context_line":"                                get_generated,"},{"line_number":1624,"context_line":"                                set_generated)"},{"line_number":1625,"context_line":"    \"The time the event occurred\""},{"line_number":1626,"context_line":""},{"line_number":1627,"context_line":"    @classmethod"},{"line_number":1628,"context_line":"    def sample(cls):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94oU%3D","line":1625,"updated":"2013-12-04 21:50:29.000000000","message":"comment?","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"d16b8bad9e2424b11855f44fc9fa60a18ba02beb","unresolved":false,"context_lines":[{"line_number":1647,"context_line":"        if usr_limit and proj_limit:"},{"line_number":1648,"context_line":"            error \u003d _(\"Not Authorized\")"},{"line_number":1649,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":1650,"context_line":"            raise wsme.exc.ClientSideError(error)"},{"line_number":1651,"context_line":"        return func(*args, **kwargs)"},{"line_number":1652,"context_line":""},{"line_number":1653,"context_line":"    return wrapped"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9WiY%3D","line":1650,"updated":"2013-12-12 12:00:58.000000000","message":"Use the ceilometer ClientSideError not the wsme one to make translation work.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1647,"context_line":"        if usr_limit and proj_limit:"},{"line_number":1648,"context_line":"            error \u003d _(\"Not Authorized\")"},{"line_number":1649,"context_line":"            pecan.response.translatable_error \u003d error"},{"line_number":1650,"context_line":"            raise wsme.exc.ClientSideError(error)"},{"line_number":1651,"context_line":"        return func(*args, **kwargs)"},{"line_number":1652,"context_line":""},{"line_number":1653,"context_line":"    return wrapped"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BXk%3D","line":1650,"in_reply_to":"AAAATn%2F9WiY%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"d16b8bad9e2424b11855f44fc9fa60a18ba02beb","unresolved":false,"context_lines":[{"line_number":1665,"context_line":"    for i in q:"},{"line_number":1666,"context_line":"        if i.op !\u003d \u0027eq\u0027:"},{"line_number":1667,"context_line":"            error \u003d _(\"operator %s not supported\") % i.op"},{"line_number":1668,"context_line":"            raise wsme.exc.ClientSideError(error)"},{"line_number":1669,"context_line":"        if i.field in evt_model_filter:"},{"line_number":1670,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":1671,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9WjM%3D","line":1668,"updated":"2013-12-12 12:00:58.000000000","message":"Use the ceilometer ClientSideError not the wsme one to make translation work.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1665,"context_line":"    for i in q:"},{"line_number":1666,"context_line":"        if i.op !\u003d \u0027eq\u0027:"},{"line_number":1667,"context_line":"            error \u003d _(\"operator %s not supported\") % i.op"},{"line_number":1668,"context_line":"            raise wsme.exc.ClientSideError(error)"},{"line_number":1669,"context_line":"        if i.field in evt_model_filter:"},{"line_number":1670,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":1671,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BXE%3D","line":1668,"in_reply_to":"AAAATn%2F9WjM%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"83890f225cdcb6783bea58f8fe0cf62e3126c7fc","unresolved":false,"context_lines":[{"line_number":1684,"context_line":"        :param event_type: Event type to filter traits by"},{"line_number":1685,"context_line":"        :param trait_name: Trait to return values for"},{"line_number":1686,"context_line":"        \"\"\""},{"line_number":1687,"context_line":"        LOG.debug(\"Getting traits for %s\" % event_type)"},{"line_number":1688,"context_line":"        return [Trait(name\u003dt.name, dtype\u003dt.get_type(), value\u003dt.value)"},{"line_number":1689,"context_line":"                for t in pecan.request.storage_conn"},{"line_number":1690,"context_line":"                .get_traits(event_type, trait_name)]"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94oA%3D","line":1687,"updated":"2013-12-04 21:50:29.000000000","message":"Translation _()","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"f5aab189daa580a1c2ec4d666d4d57961466e694","unresolved":false,"context_lines":[{"line_number":1707,"context_line":"    traits \u003d TraitsController()"},{"line_number":1708,"context_line":""},{"line_number":1709,"context_line":"    @requires_admin"},{"line_number":1710,"context_line":"    @wsme_pecan.wsexpose([unicode])"},{"line_number":1711,"context_line":"    def get(self):"},{"line_number":1712,"context_line":"        \"\"\"Get all event types."},{"line_number":1713,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9CxA%3D","line":1710,"updated":"2013-12-17 11:41:25.000000000","message":"Please rename to get_all","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"f5aab189daa580a1c2ec4d666d4d57961466e694","unresolved":false,"context_lines":[{"line_number":1742,"context_line":"        event_filter \u003d storage.EventFilter(message_id\u003dmessage_id)"},{"line_number":1743,"context_line":"        events \u003d pecan.request.storage_conn.get_events(event_filter)"},{"line_number":1744,"context_line":"        if len(events) \u003c 1:"},{"line_number":1745,"context_line":"            raise wsme.exc.ClientSideError(_(\"Unknown event\"))"},{"line_number":1746,"context_line":"        event \u003d events[0]"},{"line_number":1747,"context_line":""},{"line_number":1748,"context_line":"        return Event(message_id\u003devent.message_id,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Cv0%3D","line":1745,"updated":"2013-12-17 11:41:25.000000000","message":"Why return only [0]? Maybe add DEBUG or WARN with a message like \"it was found several events, only the first one was returned\"?","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"83890f225cdcb6783bea58f8fe0cf62e3126c7fc","unresolved":false,"context_lines":[{"line_number":1742,"context_line":"        event_filter \u003d storage.EventFilter(message_id\u003dmessage_id)"},{"line_number":1743,"context_line":"        events \u003d pecan.request.storage_conn.get_events(event_filter)"},{"line_number":1744,"context_line":"        if len(events) \u003c 1:"},{"line_number":1745,"context_line":"            raise wsme.exc.ClientSideError(_(\"Unknown event\"))"},{"line_number":1746,"context_line":"        event \u003d events[0]"},{"line_number":1747,"context_line":""},{"line_number":1748,"context_line":"        return Event(message_id\u003devent.message_id,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94nU%3D","line":1745,"updated":"2013-12-04 21:50:29.000000000","message":"that is it? unknown event? what about adding more info like the message_id","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":7368,"name":"Thomas Maddox","email":"me@thomasem.net","username":"thomasm"},"change_message_id":"8879b820632b88a353f1a168d18a0423c7a52255","unresolved":false,"context_lines":[{"line_number":1742,"context_line":"        event_filter \u003d storage.EventFilter(message_id\u003dmessage_id)"},{"line_number":1743,"context_line":"        events \u003d pecan.request.storage_conn.get_events(event_filter)"},{"line_number":1744,"context_line":"        if len(events) \u003c 1:"},{"line_number":1745,"context_line":"            raise wsme.exc.ClientSideError(_(\"Unknown event\"))"},{"line_number":1746,"context_line":"        event \u003d events[0]"},{"line_number":1747,"context_line":""},{"line_number":1748,"context_line":"        return Event(message_id\u003devent.message_id,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94hI%3D","line":1745,"in_reply_to":"AAAATn%2F94nU%3D","updated":"2013-12-04 22:05:41.000000000","message":"\"Could not find event using message ID: \u003cmessage_id\u003e,\" or something like that would be easier on the client, yeah. It is then regurgitating back the argument the client gave to Ceilometer.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1742,"context_line":"        event_filter \u003d storage.EventFilter(message_id\u003dmessage_id)"},{"line_number":1743,"context_line":"        events \u003d pecan.request.storage_conn.get_events(event_filter)"},{"line_number":1744,"context_line":"        if len(events) \u003c 1:"},{"line_number":1745,"context_line":"            raise wsme.exc.ClientSideError(_(\"Unknown event\"))"},{"line_number":1746,"context_line":"        event \u003d events[0]"},{"line_number":1747,"context_line":""},{"line_number":1748,"context_line":"        return Event(message_id\u003devent.message_id,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BUw%3D","line":1745,"in_reply_to":"AAAATn%2F9Cv0%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"d16b8bad9e2424b11855f44fc9fa60a18ba02beb","unresolved":false,"context_lines":[{"line_number":1743,"context_line":"        events \u003d pecan.request.storage_conn.get_events(event_filter)"},{"line_number":1744,"context_line":"        if len(events) \u003c 1:"},{"line_number":1745,"context_line":"            raise wsme.exc.ClientSideError(_(\"Unknown event\"))"},{"line_number":1746,"context_line":"        event \u003d events[0]"},{"line_number":1747,"context_line":""},{"line_number":1748,"context_line":"        return Event(message_id\u003devent.message_id,"},{"line_number":1749,"context_line":"                     event_type\u003devent.event_type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9WjA%3D","line":1746,"updated":"2013-12-12 12:00:58.000000000","message":"Use the ceilometer ClientSideError not the wsme one to make translation work.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1743,"context_line":"        events \u003d pecan.request.storage_conn.get_events(event_filter)"},{"line_number":1744,"context_line":"        if len(events) \u003c 1:"},{"line_number":1745,"context_line":"            raise wsme.exc.ClientSideError(_(\"Unknown event\"))"},{"line_number":1746,"context_line":"        event \u003d events[0]"},{"line_number":1747,"context_line":""},{"line_number":1748,"context_line":"        return Event(message_id\u003devent.message_id,"},{"line_number":1749,"context_line":"                     event_type\u003devent.event_type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BUk%3D","line":1746,"in_reply_to":"AAAATn%2F9WjA%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3345dcf24ff92a4891ccbe7944f4513bbf8a78e8","unresolved":false,"context_lines":[{"line_number":1642,"context_line":"        try:"},{"line_number":1643,"context_line":"            return self._type_converters[self.dtype](self.value)"},{"line_number":1644,"context_line":"        except Exception:"},{"line_number":1645,"context_line":"            raise ClientSideError(_(\"Invalid argument: %s\") % self.value)"},{"line_number":1646,"context_line":""},{"line_number":1647,"context_line":"    def __repr__(self):"},{"line_number":1648,"context_line":"        # for logging calls"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F8%2FhQ%3D","line":1645,"updated":"2013-12-17 23:17:46.000000000","message":"There\u0027s a InvalidInput exception that may be a better alternative there.","commit_id":"62fca986dafb15337910c18b58ac496af74314c7"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"e33318908fe3a5a68b16b709872c61c2a7e11731","unresolved":false,"context_lines":[{"line_number":1642,"context_line":"        try:"},{"line_number":1643,"context_line":"            return self._type_converters[self.dtype](self.value)"},{"line_number":1644,"context_line":"        except Exception:"},{"line_number":1645,"context_line":"            raise ClientSideError(_(\"Invalid argument: %s\") % self.value)"},{"line_number":1646,"context_line":""},{"line_number":1647,"context_line":"    def __repr__(self):"},{"line_number":1648,"context_line":"        # for logging calls"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F8%2Fdo%3D","line":1645,"in_reply_to":"AAAATn%2F8%2FhQ%3D","updated":"2013-12-17 23:36:46.000000000","message":"Done","commit_id":"62fca986dafb15337910c18b58ac496af74314c7"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3345dcf24ff92a4891ccbe7944f4513bbf8a78e8","unresolved":false,"context_lines":[{"line_number":1768,"context_line":""},{"line_number":1769,"context_line":"    @requires_admin"},{"line_number":1770,"context_line":"    @wsme_pecan.wsexpose([TraitDescription], wtypes.text)"},{"line_number":1771,"context_line":"    def get_all(self, event_type):"},{"line_number":1772,"context_line":"        \"\"\"Return all trait names for an event type."},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"        :param event_type: Event type to filter traits by"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F8%2Fgo%3D","line":1771,"updated":"2013-12-17 23:17:46.000000000","message":"@staticmethod","commit_id":"62fca986dafb15337910c18b58ac496af74314c7"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"e33318908fe3a5a68b16b709872c61c2a7e11731","unresolved":false,"context_lines":[{"line_number":1768,"context_line":""},{"line_number":1769,"context_line":"    @requires_admin"},{"line_number":1770,"context_line":"    @wsme_pecan.wsexpose([TraitDescription], wtypes.text)"},{"line_number":1771,"context_line":"    def get_all(self, event_type):"},{"line_number":1772,"context_line":"        \"\"\"Return all trait names for an event type."},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"        :param event_type: Event type to filter traits by"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F8%2Fdk%3D","line":1771,"in_reply_to":"AAAATn%2F8%2Fgo%3D","updated":"2013-12-17 23:36:46.000000000","message":"I tried that, @staticmethod doesn\u0027t work with @wsexpose :(","commit_id":"62fca986dafb15337910c18b58ac496af74314c7"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"23e124ba354eb32eedbebb37db600d3b738a87bf","unresolved":false,"context_lines":[{"line_number":1785,"context_line":""},{"line_number":1786,"context_line":"    @requires_admin"},{"line_number":1787,"context_line":"    @wsme_pecan.wsexpose([unicode])"},{"line_number":1788,"context_line":"    def get(self):"},{"line_number":1789,"context_line":"        \"\"\"Get all event types."},{"line_number":1790,"context_line":"        \"\"\""},{"line_number":1791,"context_line":"        return list(pecan.request.storage_conn.get_event_types())"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F8%2F1k%3D","line":1788,"updated":"2013-12-17 21:53:49.000000000","message":"@Nadya - making this get_all causes the trait controller to fail. Maybe there is a bug in pecan that causes a problem?","commit_id":"62fca986dafb15337910c18b58ac496af74314c7"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3345dcf24ff92a4891ccbe7944f4513bbf8a78e8","unresolved":false,"context_lines":[{"line_number":1785,"context_line":""},{"line_number":1786,"context_line":"    @requires_admin"},{"line_number":1787,"context_line":"    @wsme_pecan.wsexpose([unicode])"},{"line_number":1788,"context_line":"    def get(self):"},{"line_number":1789,"context_line":"        \"\"\"Get all event types."},{"line_number":1790,"context_line":"        \"\"\""},{"line_number":1791,"context_line":"        return list(pecan.request.storage_conn.get_event_types())"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F8%2Fgw%3D","line":1788,"updated":"2013-12-17 23:17:46.000000000","message":"@staticmethod if I can be picky.","commit_id":"62fca986dafb15337910c18b58ac496af74314c7"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"e874fca92bf019c9b22ea9a4db8644a2cedb07c8","unresolved":false,"context_lines":[{"line_number":1785,"context_line":""},{"line_number":1786,"context_line":"    @requires_admin"},{"line_number":1787,"context_line":"    @wsme_pecan.wsexpose([unicode])"},{"line_number":1788,"context_line":"    def get(self):"},{"line_number":1789,"context_line":"        \"\"\"Get all event types."},{"line_number":1790,"context_line":"        \"\"\""},{"line_number":1791,"context_line":"        return list(pecan.request.storage_conn.get_event_types())"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F8%2F0M%3D","line":1788,"in_reply_to":"AAAATn%2F8%2F1k%3D","updated":"2013-12-17 22:00:14.000000000","message":"specifically, I get a 404 error on a call to the event controller, ie /v2/event_types/Foo/traits/no_such_trait\n\nAny ideas why?","commit_id":"62fca986dafb15337910c18b58ac496af74314c7"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"aac3112a6482ed8000d3839456ec7061654145ee","unresolved":false,"context_lines":[{"line_number":1605,"context_line":"        self._dtype \u003d storage.models.Trait.get_name_by_type(value)"},{"line_number":1606,"context_line":""},{"line_number":1607,"context_line":"    dtype \u003d wsme.wsproperty(type_kind, get_dtype, set_dtype)"},{"line_number":1608,"context_line":"    \"the data type, defaults to t_string\""},{"line_number":1609,"context_line":""},{"line_number":1610,"context_line":"    name \u003d wtypes.text"},{"line_number":1611,"context_line":"    \"the name of the trait\""}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAATn%2F86Cc%3D","line":1608,"updated":"2013-12-19 00:15:43.000000000","message":"Just wondering why this is dtype and not data_type or type.","commit_id":"53e3dd325f1c1dc0033ad823fbde10f751bc78d3"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"aac3112a6482ed8000d3839456ec7061654145ee","unresolved":false,"context_lines":[{"line_number":1677,"context_line":"    \"\"\"A System event.\"\"\""},{"line_number":1678,"context_line":""},{"line_number":1679,"context_line":"    message_id \u003d wtypes.text"},{"line_number":1680,"context_line":"    \"The message ID for the notification\""},{"line_number":1681,"context_line":""},{"line_number":1682,"context_line":"    event_type \u003d wtypes.text"},{"line_number":1683,"context_line":"    \"The type of the event\""}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAATn%2F86C4%3D","line":1680,"updated":"2013-12-19 00:15:43.000000000","message":"I really find it odd that we are talking about events and not notifications in this API in general, and that this \"message_id\" pops up out from nowhere.\n\nI\u0027m not sure it\u0027s something to fix, I just wanted to write it.","commit_id":"53e3dd325f1c1dc0033ad823fbde10f751bc78d3"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"417e30731c97befa7d374b1658219a2308f80eb9","unresolved":false,"context_lines":[{"line_number":1786,"context_line":""},{"line_number":1787,"context_line":"    @requires_admin"},{"line_number":1788,"context_line":"    @wsme_pecan.wsexpose([unicode])"},{"line_number":1789,"context_line":"    def get(self):"},{"line_number":1790,"context_line":"        \"\"\"Get all event types."},{"line_number":1791,"context_line":"        \"\"\""},{"line_number":1792,"context_line":"        return list(pecan.request.storage_conn.get_event_types())"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAATn%2F87qo%3D","line":1789,"updated":"2013-12-18 16:44:09.000000000","message":"note: changing this to get_all hides the TraitsController, causing 404 errors when trying to access /v2/event_types/my_event/traits\n\nhttps://bugs.launchpad.net/pecan/+bug/1262277","commit_id":"53e3dd325f1c1dc0033ad823fbde10f751bc78d3"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"aac3112a6482ed8000d3839456ec7061654145ee","unresolved":false,"context_lines":[{"line_number":1786,"context_line":""},{"line_number":1787,"context_line":"    @requires_admin"},{"line_number":1788,"context_line":"    @wsme_pecan.wsexpose([unicode])"},{"line_number":1789,"context_line":"    def get(self):"},{"line_number":1790,"context_line":"        \"\"\"Get all event types."},{"line_number":1791,"context_line":"        \"\"\""},{"line_number":1792,"context_line":"        return list(pecan.request.storage_conn.get_event_types())"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAATn%2F86CA%3D","line":1789,"in_reply_to":"AAAATn%2F87qo%3D","updated":"2013-12-19 00:15:43.000000000","message":"What about adding a FIXME with the bug number so a future developer can try to enhance that once the bug is fixed? :)","commit_id":"53e3dd325f1c1dc0033ad823fbde10f751bc78d3"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"aac3112a6482ed8000d3839456ec7061654145ee","unresolved":false,"context_lines":[{"line_number":1820,"context_line":"        event_filter \u003d storage.EventFilter(message_id\u003dmessage_id)"},{"line_number":1821,"context_line":"        events \u003d pecan.request.storage_conn.get_events(event_filter)"},{"line_number":1822,"context_line":"        if len(events) \u003d\u003d 0:"},{"line_number":1823,"context_line":"            raise ClientSideError(_(\"Could not find event with \""},{"line_number":1824,"context_line":"                                    \"message id %s\") % message_id)"},{"line_number":1825,"context_line":""},{"line_number":1826,"context_line":"        if len(events) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAATn%2F86EY%3D","line":1823,"updated":"2013-12-19 00:15:43.000000000","message":"I think that this should be a 404.\n\nI may have missed it but I didn\u0027t see a test for that code actually.","commit_id":"53e3dd325f1c1dc0033ad823fbde10f751bc78d3"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"aac3112a6482ed8000d3839456ec7061654145ee","unresolved":false,"context_lines":[{"line_number":1824,"context_line":"                                    \"message id %s\") % message_id)"},{"line_number":1825,"context_line":""},{"line_number":1826,"context_line":"        if len(events) \u003e 1:"},{"line_number":1827,"context_line":"            LOG.warn(_(\"More than one event with \""},{"line_number":1828,"context_line":"                       \"id %s returned from storage driver\") % message_id)"},{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"        event \u003d events[0]"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAATn%2F86EE%3D","line":1827,"updated":"2013-12-19 00:15:43.000000000","message":"Suggestion: maybe this should even be an error, because it should not happen and that maybe a serious indication of a problem.","commit_id":"53e3dd325f1c1dc0033ad823fbde10f751bc78d3"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"926e9c96a0b0c57649d610a90dc8f0eeb72ed590","unresolved":false,"context_lines":[{"line_number":1824,"context_line":"                                    \"message id %s\") % message_id)"},{"line_number":1825,"context_line":""},{"line_number":1826,"context_line":"        if len(events) \u003e 1:"},{"line_number":1827,"context_line":"            LOG.warn(_(\"More than one event with \""},{"line_number":1828,"context_line":"                       \"id %s returned from storage driver\") % message_id)"},{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"        event \u003d events[0]"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAATn%2F834E%3D","line":1827,"in_reply_to":"AAAATn%2F86EE%3D","updated":"2013-12-19 12:19:10.000000000","message":"Just an addition. Several other controllers (at least Resource) just return [0] element in this case, even without WARN message","commit_id":"53e3dd325f1c1dc0033ad823fbde10f751bc78d3"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"92e22c7cf02e44f7338ad1fbeb63c4c2f53e7a6f","unresolved":false,"context_lines":[{"line_number":66,"context_line":"state_kind \u003d [\"ok\", \"alarm\", \"insufficient data\"]"},{"line_number":67,"context_line":"state_kind_enum \u003d wtypes.Enum(str, *state_kind)"},{"line_number":68,"context_line":"operation_kind \u003d wtypes.Enum(str, \u0027lt\u0027, \u0027le\u0027, \u0027eq\u0027, \u0027ne\u0027, \u0027ge\u0027, \u0027gt\u0027)"},{"line_number":69,"context_line":"type_kind \u003d wtypes.Enum(str, \u0027none\u0027, \u0027string\u0027, \u0027int\u0027, \u0027float\u0027, \u0027datetime\u0027)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class ClientSideError(wsme.exc.ClientSideError):"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F8y5I%3D","line":69,"updated":"2013-12-20 08:35:19.000000000","message":"metadata use integer instead of int, perhaps we should keep the same.","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"5251f3b045b43edf2a9b27abf61c370f329f5dcb","unresolved":false,"context_lines":[{"line_number":66,"context_line":"state_kind \u003d [\"ok\", \"alarm\", \"insufficient data\"]"},{"line_number":67,"context_line":"state_kind_enum \u003d wtypes.Enum(str, *state_kind)"},{"line_number":68,"context_line":"operation_kind \u003d wtypes.Enum(str, \u0027lt\u0027, \u0027le\u0027, \u0027eq\u0027, \u0027ne\u0027, \u0027ge\u0027, \u0027gt\u0027)"},{"line_number":69,"context_line":"type_kind \u003d wtypes.Enum(str, \u0027none\u0027, \u0027string\u0027, \u0027int\u0027, \u0027float\u0027, \u0027datetime\u0027)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class ClientSideError(wsme.exc.ClientSideError):"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F8xL0%3D","line":69,"in_reply_to":"AAAATn%2F8y5I%3D","updated":"2013-12-20 14:32:51.000000000","message":"Alright with me.","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"5251f3b045b43edf2a9b27abf61c370f329f5dcb","unresolved":false,"context_lines":[{"line_number":1605,"context_line":"        self._type \u003d storage.models.Trait.get_name_by_type(value)"},{"line_number":1606,"context_line":""},{"line_number":1607,"context_line":"    type \u003d wsme.wsproperty(type_kind, get_type, set_type)"},{"line_number":1608,"context_line":"    \"the data type, defaults to t_string\""},{"line_number":1609,"context_line":""},{"line_number":1610,"context_line":"    name \u003d wtypes.text"},{"line_number":1611,"context_line":"    \"the name of the trait\""}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F8xL4%3D","line":1608,"updated":"2013-12-20 14:32:51.000000000","message":"t_string \u003d\u003e string","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"92e22c7cf02e44f7338ad1fbeb63c4c2f53e7a6f","unresolved":false,"context_lines":[{"line_number":1621,"context_line":"    \"\"\"Query arguments for Event Queries.\"\"\""},{"line_number":1622,"context_line":""},{"line_number":1623,"context_line":"    _type_converters \u003d {\u0027datetime\u0027: timeutils.parse_isotime,"},{"line_number":1624,"context_line":"                        \u0027int\u0027: int,"},{"line_number":1625,"context_line":"                        \u0027float\u0027: float,"},{"line_number":1626,"context_line":"                        \u0027string\u0027: six.text_type}"},{"line_number":1627,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F8y5Q%3D","line":1624,"updated":"2013-12-20 08:35:19.000000000","message":"metadata use integer instead of int, perhaps we should keep the same.","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"92e22c7cf02e44f7338ad1fbeb63c4c2f53e7a6f","unresolved":false,"context_lines":[{"line_number":1635,"context_line":"            raise ClientSideError(_(\"Invalid data type: %s\") % value)"},{"line_number":1636,"context_line":"        self._type \u003d value"},{"line_number":1637,"context_line":""},{"line_number":1638,"context_line":"    type \u003d wsme.wsproperty(type_kind, get_type, set_type)"},{"line_number":1639,"context_line":"    \"the data type, defaults to string\""},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"    def get_value(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F8zJI%3D","line":1638,"updated":"2013-12-20 08:35:19.000000000","message":"The type already defined in the query object, why not reusing it ?\n\nIt seems instead of having the get_value, you can reuse the _get_value_as_type and gain the type autodetection feature.\n\nYou have to add support to _get_value_as_type for datetime.\nAnd return a tuple (type, value) instead of just the value.\n\n\nAnd then I see something like that for the EventQuery:\n\n    class Query(object):\n             _supported_types \u003d [\u0027integer\u0027, \u0027float\u0027, \u0027string\u0027]\n             ...\n\n    class EventQuery(Query):\n             _supported_types \u003d [\u0027datetime\u0027, \u0027int\u0027, \u0027float\u0027, \u0027string\u0027]\n             \n             # only for disable type autodetection if you don\u0027t want it\n             type \u003d wsme.wsattr(wtypes.text, default\u003d\u0027string\u0027)\n             \n             def __repr__(self):\n                  ....\n\nAnd in _event_query_to_event_filter, you get the autodetection of the type instead of string by default.\n\n    ...\n    type, value \u003d i._get_value_as_type()\n    traits_filter.append({\"key\": i.field, type: value})\n    ...\n\nWDYT ?","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"5251f3b045b43edf2a9b27abf61c370f329f5dcb","unresolved":false,"context_lines":[{"line_number":1635,"context_line":"            raise ClientSideError(_(\"Invalid data type: %s\") % value)"},{"line_number":1636,"context_line":"        self._type \u003d value"},{"line_number":1637,"context_line":""},{"line_number":1638,"context_line":"    type \u003d wsme.wsproperty(type_kind, get_type, set_type)"},{"line_number":1639,"context_line":"    \"the data type, defaults to string\""},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"    def get_value(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F8xLc%3D","line":1638,"in_reply_to":"AAAATn%2F8zJI%3D","updated":"2013-12-20 14:32:51.000000000","message":"So, can I modify query to add datetime and get rid of event query altogether? I think that\u0027s a much better way to do it.","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"}],"ceilometer/collector/service.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e92ce4c30ecf17f70d5668c8e7aa2b7a72a37196","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                  ack_on_error)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        for exchange_topic in handler.get_exchange_topics(cfg.CONF):"},{"line_number":174,"context_line":"            LOG.debug(\u0027Topics to register for\u0027 + str(exchange_topic.topics))"},{"line_number":175,"context_line":"            for topic in exchange_topic.topics:"},{"line_number":176,"context_line":"                try:"},{"line_number":177,"context_line":"                    self.conn.join_consumer_pool("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FJ4w%3D","line":174,"updated":"2013-08-07 09:48:47.000000000","message":"This has nothing to do in this change.","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"e6386cd2277053dbb9179805018e37360e3ecd6d","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                  ack_on_error)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        for exchange_topic in handler.get_exchange_topics(cfg.CONF):"},{"line_number":174,"context_line":"            LOG.debug(\u0027Topics to register for\u0027 + str(exchange_topic.topics))"},{"line_number":175,"context_line":"            for topic in exchange_topic.topics:"},{"line_number":176,"context_line":"                try:"},{"line_number":177,"context_line":"                    self.conn.join_consumer_pool("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FFOI%3D","line":174,"in_reply_to":"AAAAQn%2F%2FJ4w%3D","updated":"2013-08-07 14:27:35.000000000","message":"rogue debug, got rid of it :)","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"}],"ceilometer/storage/__init__.py":[{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"f5aab189daa580a1c2ec4d666d4d57961466e694","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __repr__(self):"},{"line_number":140,"context_line":"        return (\"\u003cEventFilter(start_time: %s,\""},{"line_number":141,"context_line":"                \" end_time: %s,\""},{"line_number":142,"context_line":"                \" event_type: %s\""},{"line_number":143,"context_line":"                \" traits: %s\" %"},{"line_number":144,"context_line":"                (self.start_time,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9CvU%3D","line":141,"updated":"2013-12-17 11:41:25.000000000","message":"comma is missed (you fixed such a small bug above so I decided to mention it :))","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __repr__(self):"},{"line_number":140,"context_line":"        return (\"\u003cEventFilter(start_time: %s,\""},{"line_number":141,"context_line":"                \" end_time: %s,\""},{"line_number":142,"context_line":"                \" event_type: %s\""},{"line_number":143,"context_line":"                \" traits: %s\" %"},{"line_number":144,"context_line":"                (self.start_time,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Beg%3D","line":141,"in_reply_to":"AAAATn%2F9CvU%3D","updated":"2013-12-17 16:12:58.000000000","message":":p thanks. Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":7368,"name":"Thomas Maddox","email":"me@thomasem.net","username":"thomasm"},"change_message_id":"672e0fa2e9a072a0478f61df8592a0758ba80857","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        return (\"\u003cEventFilter(start_time: %s,\""},{"line_number":141,"context_line":"                \" end_time: %s,\""},{"line_number":142,"context_line":"                \" event_type: %s\""},{"line_number":143,"context_line":"                \" traits: %s\" %"},{"line_number":144,"context_line":"                (self.start_time,"},{"line_number":145,"context_line":"                 self.end_time,"},{"line_number":146,"context_line":"                 self.event_type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2BXWs%3D","line":143,"updated":"2013-11-26 21:41:55.000000000","message":"Did you mean to add a closing paren and angle bracket to this string?","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        return (\"\u003cEventFilter(start_time: %s,\""},{"line_number":141,"context_line":"                \" end_time: %s,\""},{"line_number":142,"context_line":"                \" event_type: %s\""},{"line_number":143,"context_line":"                \" traits: %s\" %"},{"line_number":144,"context_line":"                (self.start_time,"},{"line_number":145,"context_line":"                 self.end_time,"},{"line_number":146,"context_line":"                 self.event_type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BeQ%3D","line":143,"in_reply_to":"AAAATn%2F%2BXWs%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"d16b8bad9e2424b11855f44fc9fa60a18ba02beb","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                (self.start_time,"},{"line_number":145,"context_line":"                 self.end_time,"},{"line_number":146,"context_line":"                 self.event_type,"},{"line_number":147,"context_line":"                 str(self.traits_filter)))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"def dbsync():"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Wj4%3D","line":147,"updated":"2013-12-12 12:00:58.000000000","message":"python3 campat: please use six for \u0027str\u0027","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                (self.start_time,"},{"line_number":145,"context_line":"                 self.end_time,"},{"line_number":146,"context_line":"                 self.event_type,"},{"line_number":147,"context_line":"                 str(self.traits_filter)))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"def dbsync():"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9BdI%3D","line":147,"in_reply_to":"AAAATn%2F9Wj4%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"92e22c7cf02e44f7338ad1fbeb63c4c2f53e7a6f","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                   trait values:"},{"line_number":127,"context_line":"                    {\u0027key\u0027: \u003ckey\u003e,"},{"line_number":128,"context_line":"                    \u0027string\u0027: \u003cvalue\u003e,"},{"line_number":129,"context_line":"                    \u0027int\u0027: \u003cvalue\u003e,"},{"line_number":130,"context_line":"                    \u0027datetime\u0027: \u003cvalue\u003e,"},{"line_number":131,"context_line":"                    \u0027float\u0027: \u003cvalue\u003e,"},{"line_number":132,"context_line":"                    \u0027op\u0027: \u003ceq, lt, le, ne, gt or ge\u003e }"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F8y5Y%3D","line":129,"updated":"2013-12-20 08:35:19.000000000","message":"metadata use integer instead of int, perhaps we should keep the same.","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"}],"ceilometer/storage/impl_mongodb.py":[{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"782e8d2cb625db42c47aaafd5469e3e8b11f2ee5","unresolved":false,"context_lines":[{"line_number":686,"context_line":"        raise NotImplementedError(\u0027Traits not implemented.\u0027)"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"def require_map_reduce(conn):"},{"line_number":690,"context_line":"    \"\"\"Raises SkipTest if the connection is using mim."},{"line_number":691,"context_line":"    \"\"\""},{"line_number":692,"context_line":"    # NOTE(dhellmann): mim requires spidermonkey to implement the"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMKo%3D","line":689,"updated":"2013-08-05 18:17:49.000000000","message":"No idea how this got here... oops","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":686,"context_line":"        raise NotImplementedError(\u0027Traits not implemented.\u0027)"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"def require_map_reduce(conn):"},{"line_number":690,"context_line":"    \"\"\"Raises SkipTest if the connection is using mim."},{"line_number":691,"context_line":"    \"\"\""},{"line_number":692,"context_line":"    # NOTE(dhellmann): mim requires spidermonkey to implement the"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMW8%3D","line":689,"updated":"2013-08-05 17:44:43.000000000","message":"Seems like this is from a different branch?","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"}],"ceilometer/storage/impl_sqlalchemy.py":[{"author":{"_account_id":236,"name":"Monsyne Dragon","email":"mdragon@rackspace.com","username":"mdragon"},"change_message_id":"07f6944aeb9bb515096a59d82aa44bfadce39e5d","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        with session.begin():"},{"line_number":672,"context_line":"            sub_query \u003d session.query(Event.id)\\"},{"line_number":673,"context_line":"                .join(Trait, Trait.event_id \u003d\u003d Event.id)"},{"line_number":674,"context_line":"            if event_filter.start and event_filter.end:"},{"line_number":675,"context_line":"                start \u003d utils.dt_to_decimal(event_filter.start)"},{"line_number":676,"context_line":"                end \u003d utils.dt_to_decimal(event_filter.end)"},{"line_number":677,"context_line":"                sub_query \u003d sub_query.filter(Event.generated \u003e\u003d start,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FL%2FE%3D","line":674,"updated":"2013-08-05 19:17:51.000000000","message":"In other words, allow .start to be specified without .end, defaulting .end to now() (current time)","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        with session.begin():"},{"line_number":672,"context_line":"            sub_query \u003d session.query(Event.id)\\"},{"line_number":673,"context_line":"                .join(Trait, Trait.event_id \u003d\u003d Event.id)"},{"line_number":674,"context_line":"            if event_filter.start and event_filter.end:"},{"line_number":675,"context_line":"                start \u003d utils.dt_to_decimal(event_filter.start)"},{"line_number":676,"context_line":"                end \u003d utils.dt_to_decimal(event_filter.end)"},{"line_number":677,"context_line":"                sub_query \u003d sub_query.filter(Event.generated \u003e\u003d start,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMWw%3D","line":674,"updated":"2013-08-05 17:44:43.000000000","message":"if we\u0027re making start and end optional, it might be nice to allow start and now() as end by default?","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"3c8dc80e2f2c787161bf5f38d115ec540b75679e","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        with session.begin():"},{"line_number":672,"context_line":"            sub_query \u003d session.query(Event.id)\\"},{"line_number":673,"context_line":"                .join(Trait, Trait.event_id \u003d\u003d Event.id)"},{"line_number":674,"context_line":"            if event_filter.start and event_filter.end:"},{"line_number":675,"context_line":"                start \u003d utils.dt_to_decimal(event_filter.start)"},{"line_number":676,"context_line":"                end \u003d utils.dt_to_decimal(event_filter.end)"},{"line_number":677,"context_line":"                sub_query \u003d sub_query.filter(Event.generated \u003e\u003d start,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FL1c%3D","line":674,"in_reply_to":"AAAAQn%2F%2FL%2FE%3D","updated":"2013-08-05 19:38:41.000000000","message":"Ah yes, that makes sense.","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"5ebf18eba06670987d9efae15a34ad1e31644de5","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        with session.begin():"},{"line_number":672,"context_line":"            sub_query \u003d session.query(Event.id)\\"},{"line_number":673,"context_line":"                .join(Trait, Trait.event_id \u003d\u003d Event.id)"},{"line_number":674,"context_line":"            if event_filter.start and event_filter.end:"},{"line_number":675,"context_line":"                start \u003d utils.dt_to_decimal(event_filter.start)"},{"line_number":676,"context_line":"                end \u003d utils.dt_to_decimal(event_filter.end)"},{"line_number":677,"context_line":"                sub_query \u003d sub_query.filter(Event.generated \u003e\u003d start,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FL5c%3D","line":674,"in_reply_to":"AAAAQn%2F%2FMO0%3D","updated":"2013-08-05 19:19:04.000000000","message":"If someone supplies a start time but no end time, we could default the end time to be the current time (now()).","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"782e8d2cb625db42c47aaafd5469e3e8b11f2ee5","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        with session.begin():"},{"line_number":672,"context_line":"            sub_query \u003d session.query(Event.id)\\"},{"line_number":673,"context_line":"                .join(Trait, Trait.event_id \u003d\u003d Event.id)"},{"line_number":674,"context_line":"            if event_filter.start and event_filter.end:"},{"line_number":675,"context_line":"                start \u003d utils.dt_to_decimal(event_filter.start)"},{"line_number":676,"context_line":"                end \u003d utils.dt_to_decimal(event_filter.end)"},{"line_number":677,"context_line":"                sub_query \u003d sub_query.filter(Event.generated \u003e\u003d start,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMO0%3D","line":674,"in_reply_to":"AAAAQn%2F%2FMWw%3D","updated":"2013-08-05 18:17:49.000000000","message":"I don\u0027t understand what you mean here. Can you elaborate?","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":697,"context_line":"                        dt \u003d utils.dt_to_decimal(value)"},{"line_number":698,"context_line":"                        sub_query \u003d sub_query.filter(Trait.t_datetime \u003d\u003d dt)"},{"line_number":699,"context_line":"                    elif key \u003d\u003d \u0027t_float\u0027:"},{"line_number":700,"context_line":"                        sub_query \u003d sub_query.filter(Trait.t_float \u003d\u003d value)"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"            sub_query \u003d sub_query.subquery()"},{"line_number":703,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMWs%3D","line":700,"updated":"2013-08-05 17:44:43.000000000","message":"whoops :) thanks!","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":728,"context_line":""},{"line_number":729,"context_line":"        session \u003d sqlalchemy_session.get_session()"},{"line_number":730,"context_line":"        with session.begin():"},{"line_number":731,"context_line":"            #query all UniqueNames for events"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"            all_data \u003d session.query(distinct(UniqueName.key))\\"},{"line_number":734,"context_line":"                              .join(Event).all()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMWU%3D","line":731,"updated":"2013-08-05 17:44:43.000000000","message":"Comments should be proper sentences. Capital start and ending punctuation. Space after #","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":733,"context_line":"            all_data \u003d session.query(distinct(UniqueName.key))\\"},{"line_number":734,"context_line":"                              .join(Event).all()"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":"            #There is no model for UniqueName, we\u0027re just using a string."},{"line_number":737,"context_line":"            #Convert the values (which are tuples, each with a single unicode"},{"line_number":738,"context_line":"            #string) into just unicode strings"},{"line_number":739,"context_line":"            event_types \u003d [data[0] for data in all_data]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMWM%3D","line":736,"updated":"2013-08-05 17:44:43.000000000","message":"no public model, specifically.","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"0ada9211ef4108bcb4ebf98453f7bb3bb2448af2","unresolved":false,"context_lines":[{"line_number":674,"context_line":"            if event_filter.start:"},{"line_number":675,"context_line":"                start \u003d utils.dt_to_decimal(event_filter.start)"},{"line_number":676,"context_line":"                end \u003d utils.dt_to_decimal(event_filter.end) if \\"},{"line_number":677,"context_line":"                    event_filter.end else datetime.datetime.now()"},{"line_number":678,"context_line":"                sub_query \u003d sub_query.filter(Event.generated \u003e\u003d start,"},{"line_number":679,"context_line":"                                             Event.generated \u003c\u003d end)"},{"line_number":680,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FIcs%3D","line":677,"updated":"2013-08-06 18:16:05.000000000","message":"No, i\u0027m just a newb ;)","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"c16c687476d4592569927e531827d33d21a98c68","unresolved":false,"context_lines":[{"line_number":674,"context_line":"            if event_filter.start:"},{"line_number":675,"context_line":"                start \u003d utils.dt_to_decimal(event_filter.start)"},{"line_number":676,"context_line":"                end \u003d utils.dt_to_decimal(event_filter.end) if \\"},{"line_number":677,"context_line":"                    event_filter.end else datetime.datetime.now()"},{"line_number":678,"context_line":"                sub_query \u003d sub_query.filter(Event.generated \u003e\u003d start,"},{"line_number":679,"context_line":"                                             Event.generated \u003c\u003d end)"},{"line_number":680,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FIvY%3D","line":677,"updated":"2013-08-06 16:40:12.000000000","message":"sorry, should be utcnow(). Use this one \nhttps://github.com/openstack/oslo-incubator/blob/master/openstack/common/timeutils.py#L96\nso you can override it in your tests.","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0e04d26cf81debae9231f6e1b66e9211dee2df4a","unresolved":false,"context_lines":[{"line_number":705,"context_line":"                    #  AND t2.t_string \u003d :value2"},{"line_number":706,"context_line":"                    # WHERE e.generated BETWEEN :start AND :end"},{"line_number":707,"context_line":"                    # AND e.unique_name \u003d :event_name"},{"line_number":708,"context_line":"                    # GROUP BY e.id"},{"line_number":709,"context_line":"                    talias \u003d aliased(Trait)"},{"line_number":710,"context_line":"                    trait_key \u003d self._get_unique(session, trait.pop(\u0027key\u0027))"},{"line_number":711,"context_line":"                    conditions \u003d [talias.name \u003d\u003d trait_key,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2B82U%3D","line":708,"updated":"2013-08-09 13:32:24.000000000","message":"You can remove the GROUP BY e.id","commit_id":"1eb406a42fd33d99ff018c66a6f9b8fc57433716"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"c251a0cc9563b485576e300a0b206d204ac79577","unresolved":false,"context_lines":[{"line_number":705,"context_line":"                    #  AND t2.t_string \u003d :value2"},{"line_number":706,"context_line":"                    # WHERE e.generated BETWEEN :start AND :end"},{"line_number":707,"context_line":"                    # AND e.unique_name \u003d :event_name"},{"line_number":708,"context_line":"                    # GROUP BY e.id"},{"line_number":709,"context_line":"                    talias \u003d aliased(Trait)"},{"line_number":710,"context_line":"                    trait_key \u003d self._get_unique(session, trait.pop(\u0027key\u0027))"},{"line_number":711,"context_line":"                    conditions \u003d [talias.name \u003d\u003d trait_key,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2B80o%3D","line":708,"in_reply_to":"AAAAQn%2F%2B82U%3D","updated":"2013-08-09 13:42:25.000000000","message":"Darn it, I thought I had gotten rid of it.","commit_id":"1eb406a42fd33d99ff018c66a6f9b8fc57433716"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"b6a81cb9c1275f74233eac5ccb7febbc518e4cc7","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from sqlalchemy import func"},{"line_number":27,"context_line":"from sqlalchemy import desc"},{"line_number":28,"context_line":"from sqlalchemy import distinct"},{"line_number":29,"context_line":"from sqlalchemy import and_"},{"line_number":30,"context_line":"from sqlalchemy.orm import aliased"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from ceilometer.openstack.common import log"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAQn%2F%2B71s%3D","line":29,"updated":"2013-08-09 17:59:06.000000000","message":"alphabetical order.","commit_id":"b2e83d82f6397a4fd8202d81607c58a2c63f14a5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2208e9bb23d4978b7203370d50e33ec6042f879e","unresolved":false,"context_lines":[{"line_number":705,"context_line":"                    #  AND t2.t_string \u003d :value2"},{"line_number":706,"context_line":"                    # WHERE e.generated BETWEEN :start AND :end"},{"line_number":707,"context_line":"                    # AND e.unique_name \u003d :event_name"},{"line_number":708,"context_line":"                    # GROUP BY e.id"},{"line_number":709,"context_line":"                    talias \u003d aliased(Trait)"},{"line_number":710,"context_line":"                    trait_key \u003d self._get_unique(session, trait.pop(\u0027key\u0027))"},{"line_number":711,"context_line":"                    conditions \u003d [talias.name \u003d\u003d trait_key,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2B7aE%3D","line":708,"updated":"2013-08-09 19:34:21.000000000","message":"Please remove GROUP BY e.id :)","commit_id":"5509a11fb6c7eb0041b0f54a33b46efcc63833de"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2208e9bb23d4978b7203370d50e33ec6042f879e","unresolved":false,"context_lines":[{"line_number":755,"context_line":"            # Query all UniqueNames for events."},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"            all_data \u003d session.query(distinct(UniqueName.key))\\"},{"line_number":758,"context_line":"                              .join(Event).all()"},{"line_number":759,"context_line":""},{"line_number":760,"context_line":"            # There is no public model for UniqueName, we\u0027re just using a"},{"line_number":761,"context_line":"            # string. Convert the values (which are tuples, each with a"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2B7Ys%3D","line":758,"updated":"2013-08-09 19:34:21.000000000","message":"This is quite disastrous... this query will become a major bottleneck. There should be some lookup table that allows you to determine EventTypes without doing the above, which doesn\u0027t really make sense as their is no join condition specified between unique_names and events, which means the above will be a giant Cartesian join of the unique_names table and the events table.","commit_id":"5509a11fb6c7eb0041b0f54a33b46efcc63833de"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"83890f225cdcb6783bea58f8fe0cf62e3126c7fc","unresolved":false,"context_lines":[{"line_number":928,"context_line":"        start \u003d utils.dt_to_decimal(event_filter.start_time)"},{"line_number":929,"context_line":"        end \u003d utils.dt_to_decimal(event_filter.end_time)"},{"line_number":930,"context_line":"        session \u003d sqlalchemy_session.get_session()"},{"line_number":931,"context_line":"        LOG.debug(\"Getting events that match filter: %s\" % event_filter)"},{"line_number":932,"context_line":"        with session.begin():"},{"line_number":933,"context_line":"            event_query \u003d session.query(models.Event)"},{"line_number":934,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94q0%3D","line":931,"updated":"2013-12-04 21:50:29.000000000","message":"_() translation please","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":928,"context_line":"        start \u003d utils.dt_to_decimal(event_filter.start_time)"},{"line_number":929,"context_line":"        end \u003d utils.dt_to_decimal(event_filter.end_time)"},{"line_number":930,"context_line":"        session \u003d sqlalchemy_session.get_session()"},{"line_number":931,"context_line":"        LOG.debug(\"Getting events that match filter: %s\" % event_filter)"},{"line_number":932,"context_line":"        with session.begin():"},{"line_number":933,"context_line":"            event_query \u003d session.query(models.Event)"},{"line_number":934,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Bfk%3D","line":931,"in_reply_to":"AAAATn%2F94q0%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"83890f225cdcb6783bea58f8fe0cf62e3126c7fc","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"        \"\"\""},{"line_number":1048,"context_line":"        session \u003d sqlalchemy_session.get_session()"},{"line_number":1049,"context_line":""},{"line_number":1050,"context_line":"        LOG.debug(\"Get traits for %s\" % event_type)"},{"line_number":1051,"context_line":"        with session.begin():"},{"line_number":1052,"context_line":"            query \u003d session.query(models.TraitType.desc,"},{"line_number":1053,"context_line":"                                  models.TraitType.data_type)\\"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F94qs%3D","line":1050,"updated":"2013-12-04 21:50:29.000000000","message":"_() translation please","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"        \"\"\""},{"line_number":1048,"context_line":"        session \u003d sqlalchemy_session.get_session()"},{"line_number":1049,"context_line":""},{"line_number":1050,"context_line":"        LOG.debug(\"Get traits for %s\" % event_type)"},{"line_number":1051,"context_line":"        with session.begin():"},{"line_number":1052,"context_line":"            query \u003d session.query(models.TraitType.desc,"},{"line_number":1053,"context_line":"                                  models.TraitType.data_type)\\"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Bfg%3D","line":1050,"in_reply_to":"AAAATn%2F94qs%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"92e22c7cf02e44f7338ad1fbeb63c4c2f53e7a6f","unresolved":false,"context_lines":[{"line_number":988,"context_line":"                    for key, value in trait_filter.iteritems():"},{"line_number":989,"context_line":"                        if key \u003d\u003d \u0027string\u0027:"},{"line_number":990,"context_line":"                            conditions.append(models.Trait.t_string \u003d\u003d value)"},{"line_number":991,"context_line":"                        elif key \u003d\u003d \u0027int\u0027:"},{"line_number":992,"context_line":"                            conditions.append(models.Trait.t_int \u003d\u003d value)"},{"line_number":993,"context_line":"                        elif key \u003d\u003d \u0027datetime\u0027:"},{"line_number":994,"context_line":"                            conditions.append(models.Trait.t_datetime \u003d\u003d value)"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F8y5g%3D","line":991,"updated":"2013-12-20 08:35:19.000000000","message":"metadata use integer instead of int, perhaps we should keep the same.","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"}],"ceilometer/storage/models.py":[{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    FLOAT_TYPE \u003d 3"},{"line_number":78,"context_line":"    DATETIME_TYPE \u003d 4"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def get_type(self):"},{"line_number":81,"context_line":"        if self.dtype \u003d\u003d self.DATETIME_TYPE:"},{"line_number":82,"context_line":"            return \"t_datetime\""},{"line_number":83,"context_line":"        elif self.dtype \u003d\u003d self.FLOAT_TYPE:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMVw%3D","line":80,"updated":"2013-08-05 17:44:43.000000000","message":"this should be a data-driven.\n\nint_to_string \u003d {self.DATETIME_TYPE: \"t_datetime\", ...}\nreturn int_to_string.get(self.dtype, \"t_text\")","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"92e22c7cf02e44f7338ad1fbeb63c4c2f53e7a6f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    type_names \u003d {"},{"line_number":95,"context_line":"        NONE_TYPE: \"none\","},{"line_number":96,"context_line":"        TEXT_TYPE: \"string\","},{"line_number":97,"context_line":"        INT_TYPE: \"int\","},{"line_number":98,"context_line":"        FLOAT_TYPE: \"float\","},{"line_number":99,"context_line":"        DATETIME_TYPE: \"datetime\""},{"line_number":100,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F8y5o%3D","line":97,"updated":"2013-12-20 08:35:19.000000000","message":"optional: metadata use integer instead of int, perhaps we should keep the same","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"}],"ceilometer/tests/api/__init__.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"2e0f7f82b6ac075554ed65528d17923f44831c4f","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                        \u0027q.type\u0027: [],"},{"line_number":206,"context_line":"                        }"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"#        if event_query:"},{"line_number":209,"context_line":"#            query_params[\u0027q.type\u0027] \u003d []"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        for query in q:"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F81Tw%3D","line":208,"updated":"2013-12-19 19:18:44.000000000","message":"?","commit_id":"c9aa036777d9af03ea8f7ef4c65f022118c11e1f"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"eb76bd28225f7ca6ce4258ae2ba3641baac48ae3","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                        \u0027q.type\u0027: [],"},{"line_number":206,"context_line":"                        }"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"#        if event_query:"},{"line_number":209,"context_line":"#            query_params[\u0027q.type\u0027] \u003d []"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        for query in q:"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F81TA%3D","line":208,"in_reply_to":"AAAATn%2F81Tw%3D","updated":"2013-12-19 19:22:14.000000000","message":"TOOO much egg nog. I forgot to remove that stuff... I wish pep8 would catch this sort of thing.","commit_id":"c9aa036777d9af03ea8f7ef4c65f022118c11e1f"}],"ceilometer/tests/api/v2/test_acl_scenarios.py":[{"author":{"_account_id":236,"name":"Monsyne Dragon","email":"mdragon@rackspace.com","username":"mdragon"},"change_message_id":"0e1154af9a801d81ca317b11b0a5784f93c64e99","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def test_non_admin_get_events(self):"},{"line_number":210,"context_line":"        try:"},{"line_number":211,"context_line":"            self.get_json(\u0027/event_types\u0027,"},{"line_number":212,"context_line":"                          expect_errors\u003dTrue,"},{"line_number":213,"context_line":"                          headers\u003d{\"X-Roles\": \"Member\","},{"line_number":214,"context_line":"                                   \"X-Auth-Token\": VALID_TOKEN2,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9%2Bcg%3D","line":211,"updated":"2013-12-03 21:08:57.000000000","message":"Whups. Actually, this test winds up being a no-op. self.fail()\nsimply raises an assertionError, which is a subclass of Exception,\nand will be caught by the except: clause. \n \nAnd I don\u0027t think get_json() will raise if expect_errors\u003dTrue. \nReally, I think you can remove except block altogether,\nand just check the status code like the test above does.","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"786df3ad483d0860d47fbd46fde4cfc669c519b9","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def test_non_admin_get_events(self):"},{"line_number":210,"context_line":"        try:"},{"line_number":211,"context_line":"            self.get_json(\u0027/event_types\u0027,"},{"line_number":212,"context_line":"                          expect_errors\u003dTrue,"},{"line_number":213,"context_line":"                          headers\u003d{\"X-Roles\": \"Member\","},{"line_number":214,"context_line":"                                   \"X-Auth-Token\": VALID_TOKEN2,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F9Bg8%3D","line":211,"in_reply_to":"AAAATn%2F9%2Bcg%3D","updated":"2013-12-17 16:12:58.000000000","message":"Done","commit_id":"0427f41e7c9e286088b6ffc7d0d38266749debce"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3345dcf24ff92a4891ccbe7944f4513bbf8a78e8","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def test_non_admin_get_events(self):"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # NOTE(herndon): For some reason, wsme is not handling the"},{"line_number":213,"context_line":"        # error that is being raised in by requires_admin. This means"},{"line_number":214,"context_line":"        # that I can\u0027t look at the status code in the return value."},{"line_number":215,"context_line":"        # Work around is to catch the exception here and verify the"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F8%2Fgk%3D","line":212,"updated":"2013-12-17 23:17:46.000000000","message":"I *think* that\u0027s because how you ordered @requires_admin and @expose in the API. So requires admin raise before WSME is hooked up in the function.\n\nThat might be wrong, might be worth testing.","commit_id":"62fca986dafb15337910c18b58ac496af74314c7"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"e33318908fe3a5a68b16b709872c61c2a7e11731","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def test_non_admin_get_events(self):"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # NOTE(herndon): For some reason, wsme is not handling the"},{"line_number":213,"context_line":"        # error that is being raised in by requires_admin. This means"},{"line_number":214,"context_line":"        # that I can\u0027t look at the status code in the return value."},{"line_number":215,"context_line":"        # Work around is to catch the exception here and verify the"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F8%2FdU%3D","line":212,"in_reply_to":"AAAATn%2F8%2Fgk%3D","updated":"2013-12-17 23:36:46.000000000","message":"Ah, I bet you are right. I fought with wsme.wsexpose and requires_admin a lot - basically, wsme.wsexpose HAS to be the first decorator, i can\u0027t figure out how to do it the other way around. So, we may just have to live with this. I\u0027ll change the comment.","commit_id":"62fca986dafb15337910c18b58ac496af74314c7"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"0f1fe99db8e95cb13acb4e21ebfa3a179a6dc492","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        threw \u003d False"},{"line_number":221,"context_line":"        try:"},{"line_number":222,"context_line":"            # Intentionally *not* using assertRaises here so I can look"},{"line_number":223,"context_line":"            # at the status code of the exception."},{"line_number":224,"context_line":"            self.get_json(\u0027/event_types\u0027, expect_errors\u003dTrue,"},{"line_number":225,"context_line":"                          headers\u003d{\"X-Roles\": \"Member\","}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAATn%2F86vQ%3D","line":222,"updated":"2013-12-18 20:13:18.000000000","message":"you could use the following code:\n\nwith self.assertRaises(v2_api.ClientSideError) as cm:\n\n    self.get_json(...)\n\nself.self.assertEqual(403, cm.exception.code)","commit_id":"53e3dd325f1c1dc0033ad823fbde10f751bc78d3"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"8ea1baa8f0ee846ea8ed7a966399c6bbbc3f24e3","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        threw \u003d False"},{"line_number":221,"context_line":"        try:"},{"line_number":222,"context_line":"            # Intentionally *not* using assertRaises here so I can look"},{"line_number":223,"context_line":"            # at the status code of the exception."},{"line_number":224,"context_line":"            self.get_json(\u0027/event_types\u0027, expect_errors\u003dTrue,"},{"line_number":225,"context_line":"                          headers\u003d{\"X-Roles\": \"Member\","}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAATn%2F86sQ%3D","line":222,"in_reply_to":"AAAATn%2F86vQ%3D","updated":"2013-12-18 21:14:57.000000000","message":"ah that is much better, thanks. I\u0027m tempted to change the test to do this.... if there are any other change requests, I\u0027ll do it this way :).","commit_id":"53e3dd325f1c1dc0033ad823fbde10f751bc78d3"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"9ae502f622bba7ff665b8ea0d3a2fbc84eb5a4d3","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            threw \u003d True"},{"line_number":230,"context_line":"            self.assertEqual(403, ex.code)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.assertTrue(threw)"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F80gI%3D","line":232,"updated":"2013-12-19 23:26:00.000000000","message":"you could do\n\nelse:\n    self.fail()","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"}],"ceilometer/tests/api/v2/test_event_scenarios.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"9ae502f622bba7ff665b8ea0d3a2fbc84eb5a4d3","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                             q\u003d[{\u0027field\u0027: \u0027trait_D\u0027,"},{"line_number":185,"context_line":"                                 \u0027value\u0027: self.trait_time.isoformat(),"},{"line_number":186,"context_line":"                                 \u0027type\u0027: \u0027datetime\u0027}])"},{"line_number":187,"context_line":"        self.assertEqual(3, len(data), 3)"},{"line_number":188,"context_line":"        self.assertEqual(data[0][\u0027traits\u0027][\u0027trait_D\u0027],"},{"line_number":189,"context_line":"                         self.trait_time.isoformat())"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F80gA%3D","line":187,"updated":"2013-12-19 23:26:00.000000000","message":"there\u0027s too many 3!","commit_id":"43306074afe50d6c4977e96e3599e4edf74d0393"}],"tests/api/v2/test_acl_scenarios.py":[{"author":{"_account_id":236,"name":"Monsyne Dragon","email":"mdragon@rackspace.com","username":"mdragon"},"change_message_id":"07f6944aeb9bb515096a59d82aa44bfadce39e5d","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def test_non_admin_get_events(self):"},{"line_number":217,"context_line":"        error \u003d False"},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            self.get_json(\u0027/event_types\u0027,"},{"line_number":220,"context_line":"                          expect_errors\u003dTrue,"},{"line_number":221,"context_line":"                          headers\u003d{\"X-Roles\": \"Member\","}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FL50%3D","line":218,"updated":"2013-08-05 19:17:51.000000000","message":"assertRaises() might be better here.","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"3c8dc80e2f2c787161bf5f38d115ec540b75679e","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def test_non_admin_get_events(self):"},{"line_number":217,"context_line":"        error \u003d False"},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            self.get_json(\u0027/event_types\u0027,"},{"line_number":220,"context_line":"                          expect_errors\u003dTrue,"},{"line_number":221,"context_line":"                          headers\u003d{\"X-Roles\": \"Member\","}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FL1U%3D","line":218,"in_reply_to":"AAAAQn%2F%2FL50%3D","updated":"2013-08-05 19:38:41.000000000","message":"Done","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"5ebf18eba06670987d9efae15a34ad1e31644de5","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def test_non_admin_get_events(self):"},{"line_number":217,"context_line":"        error \u003d False"},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            self.get_json(\u0027/event_types\u0027,"},{"line_number":220,"context_line":"                          expect_errors\u003dTrue,"},{"line_number":221,"context_line":"                          headers\u003d{\"X-Roles\": \"Member\","}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FL5Q%3D","line":218,"in_reply_to":"AAAAQn%2F%2FL50%3D","updated":"2013-08-05 19:19:04.000000000","message":"or that :) ... I always find assertRaise() syntax a little clunky, but yeah.","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                          expect_errors\u003dTrue,"},{"line_number":221,"context_line":"                          headers\u003d{\"X-Roles\": \"Member\","},{"line_number":222,"context_line":"                                   \"X-Auth-Token\": VALID_TOKEN2,"},{"line_number":223,"context_line":"                                   \"X-Project-Id\": \"project-good\"})"},{"line_number":224,"context_line":"        except Exception:"},{"line_number":225,"context_line":"            error \u003d True"},{"line_number":226,"context_line":"        self.assertTrue(error)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMVE%3D","line":223,"updated":"2013-08-05 17:44:43.000000000","message":"self.fail()","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                                   \"X-Auth-Token\": VALID_TOKEN2,"},{"line_number":223,"context_line":"                                   \"X-Project-Id\": \"project-good\"})"},{"line_number":224,"context_line":"        except Exception:"},{"line_number":225,"context_line":"            error \u003d True"},{"line_number":226,"context_line":"        self.assertTrue(error)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMVA%3D","line":225,"updated":"2013-08-05 17:44:43.000000000","message":"pass","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"1affdf9aa787b6b6efb38b86cd97963cde4671bd","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                                   \"X-Project-Id\": \"project-good\"})"},{"line_number":224,"context_line":"        except Exception:"},{"line_number":225,"context_line":"            error \u003d True"},{"line_number":226,"context_line":"        self.assertTrue(error)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAQn%2F%2FMU8%3D","line":226,"updated":"2013-08-05 17:44:43.000000000","message":"and then this isn\u0027t needed.","commit_id":"737f9797992205b4375fc5c22c2f74c0fad2e9c4"}],"tests/api/v2/test_events.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e92ce4c30ecf17f70d5668c8e7aa2b7a72a37196","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    PATH \u003d \u0027/events/%s/traits\u0027"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def test_get_traits_for_event(self):"},{"line_number":75,"context_line":"        path \u003d self.PATH % \"Foo\""},{"line_number":76,"context_line":"        data \u003d self.get_json(path, headers\u003dheaders)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        self.assertEquals(len(data), 4)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FGC0%3D","line":75,"updated":"2013-08-07 09:48:47.000000000","message":"I don\u0027t get how using an event type (Foo) makes this work where the URL is supposed to be /events/\u003cevent id\u003e\n\nThat should be /event_types/Foo/traits to me","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"e6386cd2277053dbb9179805018e37360e3ecd6d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    PATH \u003d \u0027/events/%s/traits\u0027"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def test_get_traits_for_event(self):"},{"line_number":75,"context_line":"        path \u003d self.PATH % \"Foo\""},{"line_number":76,"context_line":"        data \u003d self.get_json(path, headers\u003dheaders)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        self.assertEquals(len(data), 4)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FFIo%3D","line":75,"in_reply_to":"AAAAQn%2F%2FGC0%3D","updated":"2013-08-07 14:27:35.000000000","message":"I agree that this is a bit confusing, but I don\u0027t like moving it under event_types either because event types don\u0027t have traits, events have traits. What if event_types became /events/types instead?  Then this could become /events/types/Foo/traits, and we could have /events/types/Foo/traits/trait_A? Is there a cleaner way to do it?","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e92ce4c30ecf17f70d5668c8e7aa2b7a72a37196","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        self.assertEquals(data, [])"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"class TestEventAPI(EventTestBase):"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    PATH \u003d \u0027/events\u0027"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FGGM%3D","line":108,"updated":"2013-08-07 09:48:47.000000000","message":"I think it misses a test to get an event by id.","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"e6386cd2277053dbb9179805018e37360e3ecd6d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        self.assertEquals(data, [])"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"class TestEventAPI(EventTestBase):"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    PATH \u003d \u0027/events\u0027"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FFMc%3D","line":108,"in_reply_to":"AAAAQn%2F%2FGGM%3D","updated":"2013-08-07 14:27:35.000000000","message":"good catch","commit_id":"9a447abeeec718ca25e6341f076cca53e5492331"}],"tox.ini":[{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"d460a8ca783df56a912e402eae288c06a15db622","unresolved":false,"context_lines":[{"line_number":2,"context_line":"envlist \u003d py26,py27,py33,pep8"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"[testenv]"},{"line_number":5,"context_line":"deps \u003d --pre"},{"line_number":6,"context_line":"       -r{toxinidir}/requirements.txt"},{"line_number":7,"context_line":"       -r{toxinidir}/test-requirements.txt"},{"line_number":8,"context_line":"setenv \u003d VIRTUAL_ENV\u003d{envdir}"}],"source_content_type":"text/x-properties","patch_set":2,"id":"AAAAQn%2F%2FMfQ%3D","line":5,"updated":"2013-08-05 17:11:05.000000000","message":"Need to remove this, sorry","commit_id":"b703e2b29677cce581e76d0d452f1dabbef892f3"}]}
