)]}'
{"cinder/api/contrib/volume_type_access.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"7d8a83468838adefb025fd81b2b2b8f1ed4376bb","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexplanation)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        if vol_type[\u0027is_public\u0027]:"},{"line_number":100,"context_line":"            expl \u003d _(\"Access list not available for public volume types.\")"},{"line_number":101,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexpl)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        return _marshall_volume_type_access(vol_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_b60770c9","line":100,"updated":"2014-09-03 22:15:16.000000000","message":"Instead of raising 404, why not just return with \u0027is_public\u0027 to \u0027ALL\u0027 for the \u0027access\u0027 field.  Public type doesn\u0027t seem like a special case, we should allow listing volume access for all kinds of types.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"79c2c41d91146ed6dc1db3d0fe0b441dc2175363","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexplanation)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        if vol_type[\u0027is_public\u0027]:"},{"line_number":100,"context_line":"            expl \u003d _(\"Access list not available for public volume types.\")"},{"line_number":101,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexpl)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        return _marshall_volume_type_access(vol_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa7fdbe_3d24ed0b","line":100,"in_reply_to":"baa201ad_2f06b01d","updated":"2014-11-17 19:00:30.000000000","message":"Duncan, it is the behavior I also see in Glance. When querying members of public images, you get this error: Public images do not have members.\n\nI would like to stick to what other projects do for consistency. Further, I can\u0027t return \u0027ALL\u0027 as it would require additional logic on the client-side to interpret the value which is not something I wish.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"8458071ccfa15a34cd5cba290112a4ecb1abfa24","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexplanation)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        if vol_type[\u0027is_public\u0027]:"},{"line_number":100,"context_line":"            expl \u003d _(\"Access list not available for public volume types.\")"},{"line_number":101,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexpl)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        return _marshall_volume_type_access(vol_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_b75f8074","line":100,"in_reply_to":"fa98f980_b60770c9","updated":"2014-10-14 16:25:03.000000000","message":"This code has been copied from Nova. To preserve consistency across APIs, I took the decision to implement the same behaviour found in Nova.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"ac5dbc0ed4164ffa69f7c44d4ce38c74e5c4052d","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexplanation)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        if vol_type[\u0027is_public\u0027]:"},{"line_number":100,"context_line":"            expl \u003d _(\"Access list not available for public volume types.\")"},{"line_number":101,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexpl)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        return _marshall_volume_type_access(vol_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_2f06b01d","line":100,"in_reply_to":"fa98f980_b75f8074","updated":"2014-10-15 14:13:45.000000000","message":"The nova behavior seems bizarre - maybe fix that behavior too? Either way, we\u0027ve long had a policy of fixing odd behaviors rather than coping them.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"7d8a83468838adefb025fd81b2b2b8f1ed4376bb","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            raise webob.exc.HTTPBadRequest()"},{"line_number":112,"context_line":"        access \u003d body[action_name]"},{"line_number":113,"context_line":"        project \u003d access.get(\u0027project\u0027)"},{"line_number":114,"context_line":"        if not uuidutils.is_uuid_like(project):"},{"line_number":115,"context_line":"            raise webob.exc.HTTPBadRequest()"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _extend_vol_type(self, vol_type_rval, vol_type_ref):"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_8d9884c1","line":114,"updated":"2014-09-03 22:15:16.000000000","message":"The check here is actually broken.  is_uuid_like() doesn\u0027t treat things like 021e49c1154842b8bfe9620d0e15779d as UUID, which is wrong.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"8458071ccfa15a34cd5cba290112a4ecb1abfa24","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            raise webob.exc.HTTPBadRequest()"},{"line_number":112,"context_line":"        access \u003d body[action_name]"},{"line_number":113,"context_line":"        project \u003d access.get(\u0027project\u0027)"},{"line_number":114,"context_line":"        if not uuidutils.is_uuid_like(project):"},{"line_number":115,"context_line":"            raise webob.exc.HTTPBadRequest()"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _extend_vol_type(self, vol_type_rval, vol_type_ref):"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_f7d028cb","line":114,"in_reply_to":"fa98f980_8d9884c1","updated":"2014-10-14 16:25:03.000000000","message":"Should we fix is_uuid_like() instead?\n\nFurthermore, my wish is to enforce the fact that UUID should be formatted accordingly to preserve consistency. My point is that someone providing 021e49c1154842b8bfe9620d0e15779d here won\u0027t get the same value/format back when listing volume type accesses afterward.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"7d8a83468838adefb025fd81b2b2b8f1ed4376bb","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        access \u003d body[action_name]"},{"line_number":113,"context_line":"        project \u003d access.get(\u0027project\u0027)"},{"line_number":114,"context_line":"        if not uuidutils.is_uuid_like(project):"},{"line_number":115,"context_line":"            raise webob.exc.HTTPBadRequest()"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _extend_vol_type(self, vol_type_rval, vol_type_ref):"},{"line_number":118,"context_line":"        key \u003d \"%s:is_public\" % (Volume_type_access.alias)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_3622a052","line":115,"updated":"2014-09-03 22:15:16.000000000","message":"Here we can actually provide more detailed reason for BadRequest.  Same applies to above BadRequest as well.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"8458071ccfa15a34cd5cba290112a4ecb1abfa24","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        access \u003d body[action_name]"},{"line_number":113,"context_line":"        project \u003d access.get(\u0027project\u0027)"},{"line_number":114,"context_line":"        if not uuidutils.is_uuid_like(project):"},{"line_number":115,"context_line":"            raise webob.exc.HTTPBadRequest()"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _extend_vol_type(self, vol_type_rval, vol_type_ref):"},{"line_number":118,"context_line":"        key \u003d \"%s:is_public\" % (Volume_type_access.alias)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_17d4ccbb","line":115,"in_reply_to":"fa98f980_3622a052","updated":"2014-10-14 16:25:03.000000000","message":"I agree. I will fix that aspect in the next patch set.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"d81add5d2db1d3a6ffb5a3694384419f857d1c72","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    name \u003d \"VolumeTypeAccess\""},{"line_number":198,"context_line":"    alias \u003d \"os-volume-type-access\""},{"line_number":199,"context_line":"    namespace \u003d (\"http://docs.openstack.org/volume/\""},{"line_number":200,"context_line":"                 \"ext/os-volume-type-access/api/v1\")"},{"line_number":201,"context_line":"    updated \u003d \"2014-06-26T00:00:00Z\""},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def get_resources(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_68948c44","line":200,"updated":"2014-11-20 00:18:54.000000000","message":"should this be v2?","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"4b582eab5ccc8c7aacc12b5309f8dbb267f812ef","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    name \u003d \"VolumeTypeAccess\""},{"line_number":198,"context_line":"    alias \u003d \"os-volume-type-access\""},{"line_number":199,"context_line":"    namespace \u003d (\"http://docs.openstack.org/volume/\""},{"line_number":200,"context_line":"                 \"ext/os-volume-type-access/api/v1\")"},{"line_number":201,"context_line":"    updated \u003d \"2014-06-26T00:00:00Z\""},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def get_resources(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_ef464b7a","line":200,"in_reply_to":"5a890539_68948c44","updated":"2014-11-24 18:55:52.000000000","message":"AFAIK, this version is about the version of the extension itself, not the API version. See other extensions. Please correct me if I\u0027m wrong.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"ed2cf1f178fa48d53f96cbbf38637fb8ea3c783d","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    name \u003d \"VolumeTypeAccess\""},{"line_number":198,"context_line":"    alias \u003d \"os-volume-type-access\""},{"line_number":199,"context_line":"    namespace \u003d (\"http://docs.openstack.org/volume/\""},{"line_number":200,"context_line":"                 \"ext/os-volume-type-access/api/v1\")"},{"line_number":201,"context_line":"    updated \u003d \"2014-06-26T00:00:00Z\""},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def get_resources(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_ac481fcd","line":200,"in_reply_to":"5a890539_ef464b7a","updated":"2014-12-01 18:12:04.000000000","message":"ic, thanks.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"}],"cinder/api/v1/types.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"35723f962422e21dcbf4402816cfe93ef507c5d8","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        vol_type[\u0027id\u0027] \u003d str(vol_type[\u0027id\u0027])"},{"line_number":78,"context_line":"        return self._view_builder.show(req, vol_type)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _parse_is_public(self, is_public):"},{"line_number":81,"context_line":"        \"\"\"Parse is_public into something usable.\"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if is_public is None:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_09a9fa8f","line":80,"updated":"2014-09-11 09:07:56.000000000","message":"If default value is None, lets change method\u0027s signature to \ndef _parse_is_public(self, is_public\u003dNone):","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"8458071ccfa15a34cd5cba290112a4ecb1abfa24","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        vol_type[\u0027id\u0027] \u003d str(vol_type[\u0027id\u0027])"},{"line_number":78,"context_line":"        return self._view_builder.show(req, vol_type)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _parse_is_public(self, is_public):"},{"line_number":81,"context_line":"        \"\"\"Parse is_public into something usable.\"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if is_public is None:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_b7306008","line":80,"in_reply_to":"fa98f980_09a9fa8f","updated":"2014-10-14 16:25:03.000000000","message":"This means someone could call this method like this: self._parse_is_public() which makes no sense from a technical stand point as you HAVE to parse something.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"35723f962422e21dcbf4402816cfe93ef507c5d8","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return self._view_builder.show(req, vol_type)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _parse_is_public(self, is_public):"},{"line_number":81,"context_line":"        \"\"\"Parse is_public into something usable.\"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if is_public is None:"},{"line_number":84,"context_line":"            # preserve default value of showing only public types"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_09b2da05","line":81,"updated":"2014-09-11 09:07:56.000000000","message":"According to name, I expect that this method returns True/False only","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"8458071ccfa15a34cd5cba290112a4ecb1abfa24","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return self._view_builder.show(req, vol_type)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _parse_is_public(self, is_public):"},{"line_number":81,"context_line":"        \"\"\"Parse is_public into something usable.\"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if is_public is None:"},{"line_number":84,"context_line":"            # preserve default value of showing only public types"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_bafe8703","line":81,"in_reply_to":"fa98f980_09b2da05","updated":"2014-10-14 16:25:03.000000000","message":"The purpose of this method is to parse the \"is_public\" parameter into something usable by the underneath implementation . The \"none\" string is meant to list ALL volume types (public and private ones).","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"ac5dbc0ed4164ffa69f7c44d4ce38c74e5c4052d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return self._view_builder.show(req, vol_type)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _parse_is_public(self, is_public):"},{"line_number":81,"context_line":"        \"\"\"Parse is_public into something usable.\"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if is_public is None:"},{"line_number":84,"context_line":"            # preserve default value of showing only public types"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_cf48c45e","line":81,"in_reply_to":"fa98f980_bafe8703","updated":"2014-10-15 14:13:45.000000000","message":"That seems like a weird intention given the naming, I have to agree with Ivan. Not sure how to clean it up, but definitely awkward and unexpected.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"ec8c6e96e61bf401b8065942d1f267c79ed5fba4","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\"Returns the list of volume types.\"\"\""},{"line_number":58,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":59,"context_line":"        vol_types \u003d volume_types.get_all_types(context).values()"},{"line_number":60,"context_line":"        req.cache_resource(vol_types, name\u003d\u0027types\u0027)"},{"line_number":61,"context_line":"        return self._view_builder.index(req, vol_types)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @wsgi.serializers(xml\u003dVolumeTypeTemplate)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_da334f11","line":60,"updated":"2014-12-02 04:08:13.000000000","message":"Is this really needed for this patch?  v1 is currently deprecated and is going to be removed in Kilo.","commit_id":"6c0f50b1ec933a61b84d806e748afd9cb74e5cd7"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"8c280642909296454c0209616fff2c5e5d997ce6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\"Returns the list of volume types.\"\"\""},{"line_number":58,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":59,"context_line":"        vol_types \u003d volume_types.get_all_types(context).values()"},{"line_number":60,"context_line":"        req.cache_resource(vol_types, name\u003d\u0027types\u0027)"},{"line_number":61,"context_line":"        return self._view_builder.index(req, vol_types)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @wsgi.serializers(xml\u003dVolumeTypeTemplate)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_03c8e720","line":60,"in_reply_to":"5a890539_6b542f54","updated":"2014-12-03 04:24:10.000000000","message":"the above line in question.","commit_id":"6c0f50b1ec933a61b84d806e748afd9cb74e5cd7"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"4a8325ffe0455df6e19fb05169a1a6a3f4e2aeff","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\"Returns the list of volume types.\"\"\""},{"line_number":58,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":59,"context_line":"        vol_types \u003d volume_types.get_all_types(context).values()"},{"line_number":60,"context_line":"        req.cache_resource(vol_types, name\u003d\u0027types\u0027)"},{"line_number":61,"context_line":"        return self._view_builder.index(req, vol_types)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @wsgi.serializers(xml\u003dVolumeTypeTemplate)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_9a4a8cab","line":60,"in_reply_to":"5a890539_77a9807b","updated":"2014-12-02 18:30:21.000000000","message":"That seems quite odd, as it currently doesn\u0027t exist and yet the gate works.","commit_id":"6c0f50b1ec933a61b84d806e748afd9cb74e5cd7"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"f4913b26d96a209031b277e5b6b5972dda76e5d6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\"Returns the list of volume types.\"\"\""},{"line_number":58,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":59,"context_line":"        vol_types \u003d volume_types.get_all_types(context).values()"},{"line_number":60,"context_line":"        req.cache_resource(vol_types, name\u003d\u0027types\u0027)"},{"line_number":61,"context_line":"        return self._view_builder.index(req, vol_types)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @wsgi.serializers(xml\u003dVolumeTypeTemplate)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_6b542f54","line":60,"in_reply_to":"5a890539_9a4a8cab","updated":"2014-12-02 20:13:28.000000000","message":"What doesn\u0027t exist? The proposed extension?","commit_id":"6c0f50b1ec933a61b84d806e748afd9cb74e5cd7"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"72be15d2d13feec1585fc793eb688eb04eca7bbd","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\"Returns the list of volume types.\"\"\""},{"line_number":58,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":59,"context_line":"        vol_types \u003d volume_types.get_all_types(context).values()"},{"line_number":60,"context_line":"        req.cache_resource(vol_types, name\u003d\u0027types\u0027)"},{"line_number":61,"context_line":"        return self._view_builder.index(req, vol_types)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @wsgi.serializers(xml\u003dVolumeTypeTemplate)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_77a9807b","line":60,"in_reply_to":"5a890539_da334f11","updated":"2014-12-02 15:53:20.000000000","message":"You need it for the part in contrib to work, otherwise it breaks v1. AFAIK, removing this line would break v1 tests in gate.","commit_id":"6c0f50b1ec933a61b84d806e748afd9cb74e5cd7"}],"cinder/api/v2/types.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"35723f962422e21dcbf4402816cfe93ef507c5d8","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return self._view_builder.show(req, vol_type)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _parse_is_public(self, is_public):"},{"line_number":82,"context_line":"        \"\"\"Parse is_public into something usable.\"\"\""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if is_public is None:"},{"line_number":85,"context_line":"            # preserve default value of showing only public types"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_c989b227","line":82,"updated":"2014-09-11 09:07:56.000000000","message":"Same comment, as for api v1","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"602a9dd3a37f6afc8344cb5e41422c3795c7f883","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from cinder.api import xmlutil"},{"line_number":23,"context_line":"from cinder import exception"},{"line_number":24,"context_line":"from cinder.i18n import _"},{"line_number":25,"context_line":"from cinder.openstack.common import strutils"},{"line_number":26,"context_line":"from cinder import utils"},{"line_number":27,"context_line":"from cinder.volume import volume_types"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_63eb54dc","line":25,"updated":"2014-11-24 18:40:17.000000000","message":"Need a rebase, strutils has been replaced by oslo-utils library","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"86611b721f1def72e254387ac4758b50db6da788","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            # preserve default value of showing only public types"},{"line_number":84,"context_line":"            return True"},{"line_number":85,"context_line":"        elif utils.is_none_string(is_public):"},{"line_number":86,"context_line":"            return None"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                return strutils.bool_from_string(is_public, strict\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_c8a99c7d","line":86,"updated":"2014-12-03 02:58:06.000000000","message":"@Mathieu, thx for clarfication.  Additional comment will definitely help.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"602a9dd3a37f6afc8344cb5e41422c3795c7f883","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            # preserve default value of showing only public types"},{"line_number":84,"context_line":"            return True"},{"line_number":85,"context_line":"        elif utils.is_none_string(is_public):"},{"line_number":86,"context_line":"            return None"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                return strutils.bool_from_string(is_public, strict\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_83bbe0e3","line":86,"updated":"2014-11-24 18:40:17.000000000","message":"Based on the implementation of DB API, it seems is_public \u003d None is treated like is_public \u003d False. Can we explicitly set it to False instead of None, which is more obvious.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"d81add5d2db1d3a6ffb5a3694384419f857d1c72","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            # preserve default value of showing only public types"},{"line_number":84,"context_line":"            return True"},{"line_number":85,"context_line":"        elif utils.is_none_string(is_public):"},{"line_number":86,"context_line":"            return None"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                return strutils.bool_from_string(is_public, strict\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_68d00cf8","line":86,"updated":"2014-11-20 00:18:54.000000000","message":"question, not sure what is the purpose of this?","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"4b582eab5ccc8c7aacc12b5309f8dbb267f812ef","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            # preserve default value of showing only public types"},{"line_number":84,"context_line":"            return True"},{"line_number":85,"context_line":"        elif utils.is_none_string(is_public):"},{"line_number":86,"context_line":"            return None"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                return strutils.bool_from_string(is_public, strict\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_d254d8ff","line":86,"in_reply_to":"5a890539_68d00cf8","updated":"2014-11-24 18:55:52.000000000","message":"This question has been answered already in previous reviews. It is a way to list both private and public volume types:\n\n* is_public\u003dTrue: List public volume types only\n* is_public\u003dFalse: List private volume types only\n* is_public\u003dNone: List both public and private volume types\n\nThis implementation detail is taken from the Nova flavor access extension.\n\nWill add an inline comment to explain it.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"43f3cae83bcbf3e42163b5af3d10d375ff717050","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            # preserve default value of showing only public types"},{"line_number":84,"context_line":"            return True"},{"line_number":85,"context_line":"        elif utils.is_none_string(is_public):"},{"line_number":86,"context_line":"            return None"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                return strutils.bool_from_string(is_public, strict\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_9ea177fa","line":86,"in_reply_to":"5a890539_83bbe0e3","updated":"2014-12-01 18:45:17.000000000","message":"@Huang Could you point out the lines where None is considered as False? Line 1947 checks if is_public is None. If None, there is NO filtering based on the is_public value, therefore listing all volume types.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"ed2cf1f178fa48d53f96cbbf38637fb8ea3c783d","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            # preserve default value of showing only public types"},{"line_number":84,"context_line":"            return True"},{"line_number":85,"context_line":"        elif utils.is_none_string(is_public):"},{"line_number":86,"context_line":"            return None"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                return strutils.bool_from_string(is_public, strict\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_ac92dff3","line":86,"in_reply_to":"5a890539_d254d8ff","updated":"2014-12-01 18:12:04.000000000","message":"ic. in-line comments will be better.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"}],"cinder/db/api.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"602a9dd3a37f6afc8344cb5e41422c3795c7f883","unresolved":false,"context_lines":[{"line_number":375,"context_line":""},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"def volume_type_get_all(context, inactive\u003dFalse, filters\u003dNone):"},{"line_number":378,"context_line":"    \"\"\"Get all volume types.\"\"\""},{"line_number":379,"context_line":"    return IMPL.volume_type_get_all(context, inactive, filters)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_03e8d0e0","line":378,"updated":"2014-11-24 18:40:17.000000000","message":"Please add additional docstring to explain what kind of filters are supported, e.g. filters only supports \u0027is_public\u0027 flag for now.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"602a9dd3a37f6afc8344cb5e41422c3795c7f883","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"def volume_type_get(context, id, inactive\u003dFalse, expected_fields\u003dNone):"},{"line_number":383,"context_line":"    \"\"\"Get volume type by id.\"\"\""},{"line_number":384,"context_line":"    return IMPL.volume_type_get(context, id, inactive, expected_fields)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_23e5cc08","line":383,"updated":"2014-11-24 18:40:17.000000000","message":"Please add more docstring to describe newly added expected_fields and what it supports for now, e.g. a list of project ids.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"602a9dd3a37f6afc8344cb5e41422c3795c7f883","unresolved":false,"context_lines":[{"line_number":1955,"context_line":"            query \u003d query.filter(or_(*the_filter))"},{"line_number":1956,"context_line":"        else:"},{"line_number":1957,"context_line":"            query \u003d query.filter(the_filter[0])"},{"line_number":1958,"context_line":""},{"line_number":1959,"context_line":"    rows \u003d query.order_by(\"name\").all()"},{"line_number":1960,"context_line":""},{"line_number":1961,"context_line":"    result \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_a3c0dc50","line":1958,"updated":"2014-11-24 18:40:17.000000000","message":"@Gloria, request sent by admin is handled differently in v2/types.py API extension, so admin will be able to see all non public types if he/she requests with is_public\u003dFalse.\n\n@Mathieu However, there is a case in v2/types.py that \u0027is_public\u0027 key can have \u0027None\u0027 as value, and looks like that equals \u0027is_public\u0027 \u003d False.  My suggestion is we either change \u0027is_public\u0027\u003dNone to \u0027is_public\u0027\u003dFalse in API extension or add a \u0027else\u0027 branch here.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"d81add5d2db1d3a6ffb5a3694384419f857d1c72","unresolved":false,"context_lines":[{"line_number":1955,"context_line":"            query \u003d query.filter(or_(*the_filter))"},{"line_number":1956,"context_line":"        else:"},{"line_number":1957,"context_line":"            query \u003d query.filter(the_filter[0])"},{"line_number":1958,"context_line":""},{"line_number":1959,"context_line":"    rows \u003d query.order_by(\"name\").all()"},{"line_number":1960,"context_line":""},{"line_number":1961,"context_line":"    result \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_5e406a35","line":1958,"updated":"2014-11-20 00:18:54.000000000","message":"I don\u0027t think I understand the queries here...can you explain a little bit? \n\nUser should not see the volume types that does not belong to his project, right? \n\nWhat if the volume type is not public, while all the project accesses have been removed...will admin still have access to the volume type that is not public?","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"43f3cae83bcbf3e42163b5af3d10d375ff717050","unresolved":false,"context_lines":[{"line_number":1955,"context_line":"            query \u003d query.filter(or_(*the_filter))"},{"line_number":1956,"context_line":"        else:"},{"line_number":1957,"context_line":"            query \u003d query.filter(the_filter[0])"},{"line_number":1958,"context_line":""},{"line_number":1959,"context_line":"    rows \u003d query.order_by(\"name\").all()"},{"line_number":1960,"context_line":""},{"line_number":1961,"context_line":"    result \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_be79d383","line":1958,"in_reply_to":"5a890539_a3c0dc50","updated":"2014-12-01 18:45:17.000000000","message":"@Huang The else branch would be empty. There is no volume types to filter as None means all volume types, irregardless of volume type visibility (public/private)\n\n_volume_type_get_query makes it so if you don\u0027t have admin_context, you will be restricted to public volumes types AND/OR private volumes types where your project have access to.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"ed2cf1f178fa48d53f96cbbf38637fb8ea3c783d","unresolved":false,"context_lines":[{"line_number":1955,"context_line":"            query \u003d query.filter(or_(*the_filter))"},{"line_number":1956,"context_line":"        else:"},{"line_number":1957,"context_line":"            query \u003d query.filter(the_filter[0])"},{"line_number":1958,"context_line":""},{"line_number":1959,"context_line":"    rows \u003d query.order_by(\"name\").all()"},{"line_number":1960,"context_line":""},{"line_number":1961,"context_line":"    result \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_8c58c358","line":1958,"in_reply_to":"5a890539_a3c0dc50","updated":"2014-12-01 18:12:04.000000000","message":"Thanks Zhiteng for the explanation.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"d81add5d2db1d3a6ffb5a3694384419f857d1c72","unresolved":false,"context_lines":[{"line_number":2176,"context_line":"                       read_deleted\u003d\"no\")"},{"line_number":2177,"context_line":""},{"line_number":2178,"context_line":""},{"line_number":2179,"context_line":"@require_context"},{"line_number":2180,"context_line":"def volume_type_access_get_all(context, type_id):"},{"line_number":2181,"context_line":"    volume_type_id \u003d _volume_type_get_id_from_volume_type(context, type_id)"},{"line_number":2182,"context_line":"    return _volume_type_access_query(context).\\"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_2bf35e0b","line":2179,"updated":"2014-11-20 00:18:54.000000000","message":"should only allow admin to view, add and remove access @require_admin_context?","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"4b582eab5ccc8c7aacc12b5309f8dbb267f812ef","unresolved":false,"context_lines":[{"line_number":2176,"context_line":"                       read_deleted\u003d\"no\")"},{"line_number":2177,"context_line":""},{"line_number":2178,"context_line":""},{"line_number":2179,"context_line":"@require_context"},{"line_number":2180,"context_line":"def volume_type_access_get_all(context, type_id):"},{"line_number":2181,"context_line":"    volume_type_id \u003d _volume_type_get_id_from_volume_type(context, type_id)"},{"line_number":2182,"context_line":"    return _volume_type_access_query(context).\\"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_5252a8de","line":2179,"in_reply_to":"5a890539_2bf35e0b","updated":"2014-11-24 18:55:52.000000000","message":"Good catch.\n\nWould this prevent someone from using a non-admin role to give access to volume type access management? (being that he updated policy.json accordingly)","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"d81add5d2db1d3a6ffb5a3694384419f857d1c72","unresolved":false,"context_lines":[{"line_number":2183,"context_line":"        filter_by(volume_type_id\u003dvolume_type_id).all()"},{"line_number":2184,"context_line":""},{"line_number":2185,"context_line":""},{"line_number":2186,"context_line":"@require_context"},{"line_number":2187,"context_line":"def volume_type_access_add(context, type_id, project_id):"},{"line_number":2188,"context_line":"    \"\"\"Add given tenant to the volume type access list.\"\"\""},{"line_number":2189,"context_line":"    volume_type_id \u003d _volume_type_get_id_from_volume_type(context, type_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_0bd5c242","line":2186,"updated":"2014-11-20 00:18:54.000000000","message":"should be @require_admin_context?","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"},{"author":{"_account_id":11880,"name":"Gloria Gu","email":"gloriafanggu@gmail.com","username":"gugl"},"change_message_id":"d81add5d2db1d3a6ffb5a3694384419f857d1c72","unresolved":false,"context_lines":[{"line_number":2202,"context_line":"        return access_ref"},{"line_number":2203,"context_line":""},{"line_number":2204,"context_line":""},{"line_number":2205,"context_line":"@require_context"},{"line_number":2206,"context_line":"def volume_type_access_remove(context, type_id, project_id):"},{"line_number":2207,"context_line":"    \"\"\"Remove given tenant from the volume type access list.\"\"\""},{"line_number":2208,"context_line":"    volume_type_id \u003d _volume_type_get_id_from_volume_type(context, type_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_6bc3a68a","line":2205,"updated":"2014-11-20 00:18:54.000000000","message":"should be @require_admin_context?","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"}],"cinder/db/sqlalchemy/migrate_repo/versions/025_add_volume_type_projects.py":[{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"b0be99a6d90a2ec1ecf201e473217150ef0952d0","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    try:"},{"line_number":29,"context_line":"        volume_types.create_column(is_public)"},{"line_number":30,"context_line":"        # pylint: disable\u003dE1120"},{"line_number":31,"context_line":"        volume_types.update().values(is_public\u003dTrue).execute()"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.error(_(\"Column |%s| not created!\"), repr(is_public))"},{"line_number":34,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_0e415c39","line":31,"updated":"2014-09-01 14:20:21.000000000","message":"Is there any way to make this work so that there isn\u0027t a period of time where is_public is not set for every existing type? I don\u0027t know enough about migrations to be sure, so not putting in a negative review for this, but I\u0027m interested in thoughts - migrations are a big focus for next summit and we might as well at least talk about good practice in advance.","commit_id":"4fb65d1049191ba3c1adbd1fe16a5d2bd86ed757"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"d73540b428755bf120880bf1128c8f13101bb025","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    try:"},{"line_number":29,"context_line":"        volume_types.create_column(is_public)"},{"line_number":30,"context_line":"        # pylint: disable\u003dE1120"},{"line_number":31,"context_line":"        volume_types.update().values(is_public\u003dTrue).execute()"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.error(_(\"Column |%s| not created!\"), repr(is_public))"},{"line_number":34,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_d15b2985","line":31,"in_reply_to":"fa98f980_0e415c39","updated":"2014-09-02 20:13:04.000000000","message":"I don\u0027t know much about migrations, I copied what previous migrations did already.\n\nAn other change got merged with a similar migration without much concerns: https://review.openstack.org/#/c/104732/\n\nIf you have suggestions on how to improve the migration, let me know.","commit_id":"4fb65d1049191ba3c1adbd1fe16a5d2bd86ed757"}],"cinder/db/sqlalchemy/migrate_repo/versions/027_add_volume_type_projects.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"35723f962422e21dcbf4402816cfe93ef507c5d8","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        volume_types.create_column(is_public)"},{"line_number":30,"context_line":"        # pylint: disable\u003dE1120"},{"line_number":31,"context_line":"        volume_types.update().values(is_public\u003dTrue).execute()"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.error(_(\"Column |%s| not created!\"), repr(is_public))"},{"line_number":34,"context_line":"        raise"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_6ccff456","line":32,"updated":"2014-09-11 09:07:56.000000000","message":"Too general exception here and below. Please, catch more specific exceptions","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"8458071ccfa15a34cd5cba290112a4ecb1abfa24","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        volume_types.create_column(is_public)"},{"line_number":30,"context_line":"        # pylint: disable\u003dE1120"},{"line_number":31,"context_line":"        volume_types.update().values(is_public\u003dTrue).execute()"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.error(_(\"Column |%s| not created!\"), repr(is_public))"},{"line_number":34,"context_line":"        raise"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_170f6c89","line":32,"in_reply_to":"fa98f980_6ccff456","updated":"2014-10-14 16:25:03.000000000","message":"This code has been copied from a previous migration in Cinder.\n\nAs I have no plan on handling any specific exception differently, I don\u0027t see the need to catch more specific exception. (unless you have a specific use case in mind)","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"ac5dbc0ed4164ffa69f7c44d4ce38c74e5c4052d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        volume_types.update().values(is_public\u003dTrue).execute()"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.error(_(\"Column |%s| not created!\"), repr(is_public))"},{"line_number":34,"context_line":"        raise"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    volume_type_projects \u003d Table("},{"line_number":37,"context_line":"        \u0027volume_type_projects\u0027, meta,"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_4fa3f4ff","line":34,"updated":"2014-10-15 14:13:45.000000000","message":"Using save_and_reraise is slightly neater here, so that the original cause of the exception isn\u0027t masked","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"3a453ba68b61b23f799ff61a95d31bbdbda198e8","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        volume_types.update().values(is_public\u003dTrue).execute()"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.error(_(\"Column |%s| not created!\"), repr(is_public))"},{"line_number":34,"context_line":"        raise"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    volume_type_projects \u003d Table("},{"line_number":37,"context_line":"        \u0027volume_type_projects\u0027, meta,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_91d6934d","line":34,"in_reply_to":"5a890539_77a772a7","updated":"2014-11-18 09:06:23.000000000","message":"I very much aim to be consistent in my reviews; unfortunately it is not possible for me to review everything - I\u0027ve more in my job than just doing reviews.\n\nI\u0027m also occasionally wrong in my reviews - it was pointed out to me a few days ago that this construct does not swallow the exception - I hadn\u0027t realised this and I\u0027ll attempt to remember that from now on - it is possible but unlikely I\u0027ll forget again, I am after all merely human.\n\nI understand the frustration of getting different, sometimes conflicting comments from different reviewers, but that is the nature of the review system that Openstack uses. Some projects are far worse than cinder, believe me. You are always welcome to reply that you disagree with any comments given, particularly if you have a strong reason why. In the end, all of the cores have a -2 if they feel very strongly, and we tend to read each other\u0027s comments before merging. Many details of coding are, in the end, preference and opinion, not a science.\n\nIn terms of API consistency with other projects, I don\u0027t feel that consistency is a more important goal that having a good API. I\u0027d rather be inconsistent and have a good API than be consistent and have a poor API. Some of the other cores agree, some disagree. It gets discussed periodically, and resolved on a case-by-case basic so far. Maybe the inter-project API working group will be able to improve the situation, I don\u0027t know.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"79c2c41d91146ed6dc1db3d0fe0b441dc2175363","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        volume_types.update().values(is_public\u003dTrue).execute()"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.error(_(\"Column |%s| not created!\"), repr(is_public))"},{"line_number":34,"context_line":"        raise"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    volume_type_projects \u003d Table("},{"line_number":37,"context_line":"        \u0027volume_type_projects\u0027, meta,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_77a772a7","line":34,"in_reply_to":"baa201ad_4fa3f4ff","updated":"2014-11-17 19:00:30.000000000","message":"This construct does not swallow the original exception, it re-raised.\n\nI\u0027m merely copying/pasting existing code. New features have recently been added with the exact same construct as proposed here. See:\n* 025_add_consistencygroup.py\n* 026_add_consistencygroup_quota_class.py\n\nAnd all other migrations in the Cinder project.\n\nI don\u0027t mind people suggesting improvements but you have to be consistent with your reviews. It\u0027s mildly frustrating to have to fix stuff other people didn\u0027t have to in a recent past and which were approved by the same people reviewing my code in the same project.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"}],"cinder/db/sqlalchemy/migrate_repo/versions/032_sqlite_downgrade.sql":[{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"0123a584acdbe8bd15d692af3587e5e9c877b6bb","unresolved":false,"context_lines":[{"line_number":1,"context_line":"-- As sqlite does not support the DROP CHECK, we need to create"},{"line_number":2,"context_line":"-- the table, and move all the data to it."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"BEGIN TRANSACTION;"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"CREATE TABLE volume_types_v26 ("},{"line_number":7,"context_line":"  created_at DATETIME,"}],"source_content_type":"text/x-sql","patch_set":11,"id":"5a890539_98b5d87f","line":4,"updated":"2014-11-18 07:30:51.000000000","message":"We\u0027re not using transaction any more. Can\u0027t remember the reason, sorry..","commit_id":"ad220254659af47646fe5c7f14e213d2b2708807"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"1d8f667a5dd4d5fc73d269c2c0e536bd7fcb92d1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"-- As sqlite does not support the DROP CHECK, we need to create"},{"line_number":2,"context_line":"-- the table, and move all the data to it."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"CREATE TABLE volume_types_v26 ("},{"line_number":5,"context_line":"  created_at DATETIME,"},{"line_number":6,"context_line":"  updated_at DATETIME,"},{"line_number":7,"context_line":"  deleted_at DATETIME,"}],"source_content_type":"text/x-sql","patch_set":12,"id":"5a890539_85fb7646","line":4,"updated":"2014-11-19 14:14:41.000000000","message":"Why do you use v26 not v31?","commit_id":"c997414fc4357ad20060a01f606b2561afd47cc4"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"de88a85e658e2aa748e06a2ea2ad98bfc8b46aef","unresolved":false,"context_lines":[{"line_number":1,"context_line":"-- As sqlite does not support the DROP CHECK, we need to create"},{"line_number":2,"context_line":"-- the table, and move all the data to it."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"CREATE TABLE volume_types_v26 ("},{"line_number":5,"context_line":"  created_at DATETIME,"},{"line_number":6,"context_line":"  updated_at DATETIME,"},{"line_number":7,"context_line":"  deleted_at DATETIME,"}],"source_content_type":"text/x-sql","patch_set":12,"id":"5a890539_4653546c","line":4,"in_reply_to":"5a890539_85fb7646","updated":"2014-11-19 15:26:47.000000000","message":"I got confused with the concept of placeholders. But you are right. Will fix.","commit_id":"c997414fc4357ad20060a01f606b2561afd47cc4"}],"cinder/tests/api/contrib/test_volume_type_access.py":[{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"62749e7a39f0deb359c829dd5fc02c4a2fd6ee14","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        result \u003d self.type_controller_v2.index(req)"},{"line_number":228,"context_line":"        self.assertVolumeTypeListEqual(expected[\u0027volume_types\u0027],"},{"line_number":229,"context_line":"                                       result[\u0027volume_types\u0027])"},{"line_number":230,"context_line":"        pass"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def test_show(self):"},{"line_number":233,"context_line":"        resp \u003d FakeResponse()"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_8e0b5a23","line":230,"updated":"2014-09-19 04:25:42.000000000","message":"Is this pass needed?","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"79c2c41d91146ed6dc1db3d0fe0b441dc2175363","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        result \u003d self.type_controller_v2.index(req)"},{"line_number":228,"context_line":"        self.assertVolumeTypeListEqual(expected[\u0027volume_types\u0027],"},{"line_number":229,"context_line":"                                       result[\u0027volume_types\u0027])"},{"line_number":230,"context_line":"        pass"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def test_show(self):"},{"line_number":233,"context_line":"        resp \u003d FakeResponse()"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_17d46eea","line":230,"in_reply_to":"fa98f980_8e0b5a23","updated":"2014-11-17 19:00:30.000000000","message":"Thanks for catching that one. Will remove.","commit_id":"557f0bb64f89c973d6ac202c7c429a8f66787f82"}],"cinder/volume/volume_types.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"602a9dd3a37f6afc8344cb5e41422c3795c7f883","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def get_volume_type(ctxt, id, expected_fields\u003dNone):"},{"line_number":109,"context_line":"    \"\"\"Retrieves single volume type by id.\"\"\""},{"line_number":110,"context_line":"    if id is None:"},{"line_number":111,"context_line":"        msg \u003d _(\"id cannot be None\")"},{"line_number":112,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_43ee58ee","line":109,"updated":"2014-11-24 18:40:17.000000000","message":"Additional docstring to explain new parameter would be helpful.","commit_id":"80f7bf5f1d5cff05f1c91adca25b92e2d416b73f"}]}
