)]}'
{"nova/db/sqlalchemy/cache.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"18729afc021a02927a05d984406c4132884a7b2b","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                return self.str_cache[_id]"},{"line_number":103,"context_line":"            raise self.cache_not_found_exc(identifier\u003d_id)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _refresh_cache(self):"},{"line_number":106,"context_line":"        \"\"\"Refresh the cache. The subclass needs to implement it\"\"\""},{"line_number":107,"context_line":"        pass"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba2be162_e8be8463","line":105,"updated":"2017-03-06 10:34:04.000000000","message":"abstractmethod?","commit_id":"032738a36422b16c304fbaaf758bec852b219e95"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"18729afc021a02927a05d984406c4132884a7b2b","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        try:"},{"line_number":156,"context_line":"            return fields.ResourceClass.STANDARD[_id]"},{"line_number":157,"context_line":"        except IndexError:"},{"line_number":158,"context_line":"            pass"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        return super(ResourceClassCache, self).string_from_id(_id)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba2be162_e8f04469","line":158,"updated":"2017-03-06 10:34:04.000000000","message":"nit: Personal preference would be return super(...), but this is ok.","commit_id":"032738a36422b16c304fbaaf758bec852b219e95"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"18729afc021a02927a05d984406c4132884a7b2b","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        return super(ResourceClassCache, self).string_from_id(_id)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _refresh_cache(self):"},{"line_number":163,"context_line":"        _refresh_from_db(self.ctx, _RC_TBL, self)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba2be162_286c1c07","line":162,"updated":"2017-03-06 10:34:04.000000000","message":"I think it would be cleaner to move _refresh_from_db here in its entirety.","commit_id":"032738a36422b16c304fbaaf758bec852b219e95"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"3e219caeddee32a0c8c42038c659e35a8093cfe0","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        return super(ResourceClassCache, self).string_from_id(_id)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _refresh_cache(self):"},{"line_number":163,"context_line":"        _refresh_from_db(self.ctx, _RC_TBL, self)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_f3ed6e26","line":162,"in_reply_to":"ba2be162_286c1c07","updated":"2017-03-07 10:05:44.000000000","message":"_refresh_from_db is reused in a different context in the next patch, so ignore this.","commit_id":"032738a36422b16c304fbaaf758bec852b219e95"}],"nova/db/sqlalchemy/trait_cache.py":[{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"a5b0410d404c28087884247d33f08d6a025e7228","unresolved":false,"context_lines":[{"line_number":57,"context_line":"class TraitCache(object):"},{"line_number":58,"context_line":"    \"\"\"A cache for id and string object.\"\"\""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    NAMESPACES \u003d ot.NAMESPACES.values() + [\u0027CUSTOM\u0027]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def __init__(self, ctx):"},{"line_number":63,"context_line":"        \"\"\"Initialize the cache"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_9e85daae","line":60,"updated":"2017-01-03 17:04:10.000000000","message":"\u0027CUSTOM\u0027 is a namespace, thus this could be better:\n\ns/\u0027CUSTOM\u0027/\u0027CUSTOM:\u0027","commit_id":"b78883d7c1f37f8e906f0fe283cac6375cd8f3cc"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"72d9165d462780bc54e5fdd110381a3b2a4c93bb","unresolved":false,"context_lines":[{"line_number":57,"context_line":"class TraitCache(object):"},{"line_number":58,"context_line":"    \"\"\"A cache for id and string object.\"\"\""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    NAMESPACES \u003d ot.NAMESPACES.values() + [\u0027CUSTOM\u0027]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def __init__(self, ctx):"},{"line_number":63,"context_line":"        \"\"\"Initialize the cache"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_f57c3574","line":60,"in_reply_to":"ba5201f7_9e85daae","updated":"2017-01-04 00:13:55.000000000","message":"But in os-traits, we don\u0027t have \u0027:\u0027 for other namespaces https://review.openstack.org/#/c/377381/5/nova/os_traits/const.py@70","commit_id":"b78883d7c1f37f8e906f0fe283cac6375cd8f3cc"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ab7c328c0dd0e3f34467978372a02f5fa9f0faa2","unresolved":false,"context_lines":[{"line_number":57,"context_line":"class TraitCache(object):"},{"line_number":58,"context_line":"    \"\"\"A cache for id and string object.\"\"\""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    NAMESPACES \u003d ot.NAMESPACES.values() + [\u0027CUSTOM\u0027]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def __init__(self, ctx):"},{"line_number":63,"context_line":"        \"\"\"Initialize the cache"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_19a00b90","line":60,"in_reply_to":"ba5201f7_cb6154aa","updated":"2017-01-04 07:44:31.000000000","message":"ah...right, I missed that.","commit_id":"b78883d7c1f37f8e906f0fe283cac6375cd8f3cc"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"4dc94774bd68e77225d58b6710425e24357d8787","unresolved":false,"context_lines":[{"line_number":57,"context_line":"class TraitCache(object):"},{"line_number":58,"context_line":"    \"\"\"A cache for id and string object.\"\"\""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    NAMESPACES \u003d ot.NAMESPACES.values() + [\u0027CUSTOM\u0027]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def __init__(self, ctx):"},{"line_number":63,"context_line":"        \"\"\"Initialize the cache"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_cb6154aa","line":60,"in_reply_to":"ba5201f7_f57c3574","updated":"2017-01-04 01:28:41.000000000","message":"You mean keys?  But their values have colons:\nhttps://review.openstack.org/#/c/377381/5/nova/os_traits/const.py@16","commit_id":"b78883d7c1f37f8e906f0fe283cac6375cd8f3cc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f9c42089fa436c95768bf6bc565edbe96129e06f","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            raise exception.CacheStrNotFound(string\u003d\u0027, \u0027.join(invalid_strs))"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        _refresh_from_db(self.ctx, self)"},{"line_number":141,"context_line":"        return self.str_cache.keys()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_b2b66a88","line":141,"updated":"2017-01-02 19:24:35.000000000","message":"I don\u0027t see a need for the \"all\" methods here. This would be simpler without them (and frankly, they are missing lock protection anyway).","commit_id":"b78883d7c1f37f8e906f0fe283cac6375cd8f3cc"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"51ddbf36183ed38ae132893215a2829c98de3270","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            raise exception.CacheStrNotFound(string\u003d\u0027, \u0027.join(invalid_strs))"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        _refresh_from_db(self.ctx, self)"},{"line_number":141,"context_line":"        return self.str_cache.keys()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_88ccd636","line":141,"in_reply_to":"ba5201f7_b2b66a88","updated":"2017-01-03 05:23:02.000000000","message":"yea, I probably can use id_from_string or string_from_id instead of the \u0027all\u0027 method. I will give a try to see how was that looks like. Thanks","commit_id":"b78883d7c1f37f8e906f0fe283cac6375cd8f3cc"}],"nova/exception.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f9c42089fa436c95768bf6bc565edbe96129e06f","unresolved":false,"context_lines":[{"line_number":2184,"context_line":""},{"line_number":2185,"context_line":""},{"line_number":2186,"context_line":"class CacheNamespaceNotFound(NovaException):"},{"line_number":2187,"context_line":"    msg_fmt \u003d _(\"The namespace %(namespace)s can not be found in the cache.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_f2b0f28d","line":2187,"updated":"2017-01-02 19:24:35.000000000","message":"I don\u0027t really see a need for these generic exceptions. I could see a need for a TraitNotFound exception, but in future patches that implement the REST API part of the traits API.","commit_id":"b78883d7c1f37f8e906f0fe283cac6375cd8f3cc"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"51ddbf36183ed38ae132893215a2829c98de3270","unresolved":false,"context_lines":[{"line_number":2184,"context_line":""},{"line_number":2185,"context_line":""},{"line_number":2186,"context_line":"class CacheNamespaceNotFound(NovaException):"},{"line_number":2187,"context_line":"    msg_fmt \u003d _(\"The namespace %(namespace)s can not be found in the cache.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_a8d19acf","line":2187,"in_reply_to":"ba5201f7_f2b0f28d","updated":"2017-01-03 05:23:02.000000000","message":"I\u0027m thinking to share the code between resource_class_cache and trait_cache. So I created those generic exceptions.\n\nIf without those exceptions, what is the exception you are expected to raise from cache obj?","commit_id":"b78883d7c1f37f8e906f0fe283cac6375cd8f3cc"}]}
