)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"231487ac057e99281d48bd2b3caa98fd31003bca","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     wanghao \u003cwanghao749@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-23 16:38:29 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not allow to add access for public volume type"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now public volume type can be added/removed project access, but when list"},{"line_number":10,"context_line":"access, cinder return \u0027Access list not available for public volume types.\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa32b979_3eca37a2","line":7,"updated":"2015-06-23 09:24:11.000000000","message":"s/add/modify/","commit_id":"f157deafcd3c3bd18f58c82ffde8c0d6b9e703a5"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"b537798759d6f5377d58a8971742dd2042f781c5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     wanghao \u003cwanghao749@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-23 16:38:29 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not allow to add access for public volume type"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now public volume type can be added/removed project access, but when list"},{"line_number":10,"context_line":"access, cinder return \u0027Access list not available for public volume types.\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa32b979_4bead8ad","line":7,"in_reply_to":"fa32b979_3eca37a2","updated":"2015-06-26 01:02:45.000000000","message":"Done","commit_id":"f157deafcd3c3bd18f58c82ffde8c0d6b9e703a5"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"231487ac057e99281d48bd2b3caa98fd31003bca","unresolved":false,"context_lines":[{"line_number":13,"context_line":"We should check if public volume type and do not allow public volume type"},{"line_number":14,"context_line":"to add project access."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"APIImpact"},{"line_number":17,"context_line":"Closes-Bug: #1467808"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: Id03eb3649ce02549c131c85697d8431c3f8c04dd"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa32b979_be4967d2","line":16,"updated":"2015-06-23 09:24:11.000000000","message":"Add description for what\u0027s changed in this fix would be helpful for documentation team.","commit_id":"f157deafcd3c3bd18f58c82ffde8c0d6b9e703a5"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"b537798759d6f5377d58a8971742dd2042f781c5","unresolved":false,"context_lines":[{"line_number":13,"context_line":"We should check if public volume type and do not allow public volume type"},{"line_number":14,"context_line":"to add project access."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"APIImpact"},{"line_number":17,"context_line":"Closes-Bug: #1467808"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: Id03eb3649ce02549c131c85697d8431c3f8c04dd"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa32b979_cbd6e8f0","line":16,"in_reply_to":"fa32b979_be4967d2","updated":"2015-06-26 01:02:45.000000000","message":"Sure.","commit_id":"f157deafcd3c3bd18f58c82ffde8c0d6b9e703a5"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"14c71161ff637f05106405de6a6ea5f0228381b8","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not allow to modify access for public volume type"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now public volume type can be added/removed project access, but when list"},{"line_number":10,"context_line":"access, cinder return \u0027Access list not available for public volume types.\u0027"},{"line_number":11,"context_line":"It\u0027s weird for users experience."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_08c82721","line":9,"updated":"2015-06-24 06:11:15.000000000","message":"s/list/listing/","commit_id":"7d78241c14821f6bdcc00d3886b206a9251fc30b"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"14c71161ff637f05106405de6a6ea5f0228381b8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Do not allow to modify access for public volume type"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now public volume type can be added/removed project access, but when list"},{"line_number":10,"context_line":"access, cinder return \u0027Access list not available for public volume types.\u0027"},{"line_number":11,"context_line":"It\u0027s weird for users experience."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if public volume type and do not allow public volume type"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_28cdeb30","line":10,"updated":"2015-06-24 06:11:15.000000000","message":"s/return/returns/","commit_id":"7d78241c14821f6bdcc00d3886b206a9251fc30b"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"14c71161ff637f05106405de6a6ea5f0228381b8","unresolved":false,"context_lines":[{"line_number":10,"context_line":"access, cinder return \u0027Access list not available for public volume types.\u0027"},{"line_number":11,"context_line":"It\u0027s weird for users experience."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if public volume type and do not allow public volume type"},{"line_number":14,"context_line":"to add project access."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"APIImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_c8cd5f31","line":13,"updated":"2015-06-24 06:11:15.000000000","message":"s/if public volume type/if a type is public/","commit_id":"7d78241c14821f6bdcc00d3886b206a9251fc30b"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"14c71161ff637f05106405de6a6ea5f0228381b8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"It\u0027s weird for users experience."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if public volume type and do not allow public volume type"},{"line_number":14,"context_line":"to add project access."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"APIImpact"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_e8d2a3d0","line":14,"updated":"2015-06-24 06:11:15.000000000","message":"s/add/modify/","commit_id":"7d78241c14821f6bdcc00d3886b206a9251fc30b"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"14c71161ff637f05106405de6a6ea5f0228381b8","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"APIImpact"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"If modify access for public volume type, API will return 400 and message:"},{"line_number":19,"context_line":"\"Invalid volume type: Type access modification is not applicable to public"},{"line_number":20,"context_line":"volume type.\""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_88dc37e5","line":18,"updated":"2015-06-24 06:11:15.000000000","message":"s/If modify/When modifying/","commit_id":"7d78241c14821f6bdcc00d3886b206a9251fc30b"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"ef8e235cf15c9c4cd3ea9003f905b1616ab665be","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"APIImpact"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"If modify access for public volume type, API will return 400 and message:"},{"line_number":19,"context_line":"\"Invalid volume type: Type access modification is not applicable to public"},{"line_number":20,"context_line":"volume type.\""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_9fef881c","line":18,"in_reply_to":"fa32b979_88dc37e5","updated":"2015-06-24 09:33:37.000000000","message":"All Done.","commit_id":"7d78241c14821f6bdcc00d3886b206a9251fc30b"}],"cinder/tests/unit/test_volume_types.py":[{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"927604180dde63987f11c98cce1cb7fc11b3b2e9","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        ret \u003d volume_types.get_volume_type_encryption(self.ctxt, None)"},{"line_number":402,"context_line":"        self.assertIsNone(ret)"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    def test_check_public_volume_type_failed(self):"},{"line_number":405,"context_line":"        project_id \u003d \u0027456\u0027"},{"line_number":406,"context_line":"        volume_type \u003d volume_types.create(self.ctxt, \"type1\")"},{"line_number":407,"context_line":"        volume_type_id \u003d volume_type.get(\u0027id\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_a1265ccc","line":404,"updated":"2015-06-30 10:26:13.000000000","message":"This should be broken into two tests, one for adding access, and one for removing access.","commit_id":"88e43aa7c46545cf1afc547f716f98ae19a0d69d"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"61e833423118323d6f6734c6fe3f57c3e9f0489a","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        ret \u003d volume_types.get_volume_type_encryption(self.ctxt, None)"},{"line_number":402,"context_line":"        self.assertIsNone(ret)"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    def test_check_public_volume_type_failed(self):"},{"line_number":405,"context_line":"        project_id \u003d \u0027456\u0027"},{"line_number":406,"context_line":"        volume_type \u003d volume_types.create(self.ctxt, \"type1\")"},{"line_number":407,"context_line":"        volume_type_id \u003d volume_type.get(\u0027id\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_2ca89c76","line":404,"in_reply_to":"ba3cc151_16806cf6","updated":"2015-07-02 02:29:26.000000000","message":"Fine, will do it if need to update this patch.","commit_id":"88e43aa7c46545cf1afc547f716f98ae19a0d69d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5fd73dd97559fc4dcbeb9861ea2bc7f3ead24140","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        ret \u003d volume_types.get_volume_type_encryption(self.ctxt, None)"},{"line_number":402,"context_line":"        self.assertIsNone(ret)"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    def test_check_public_volume_type_failed(self):"},{"line_number":405,"context_line":"        project_id \u003d \u0027456\u0027"},{"line_number":406,"context_line":"        volume_type \u003d volume_types.create(self.ctxt, \"type1\")"},{"line_number":407,"context_line":"        volume_type_id \u003d volume_type.get(\u0027id\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_16806cf6","line":404,"in_reply_to":"ba3cc151_a1265ccc","updated":"2015-07-01 11:36:11.000000000","message":"I agree.","commit_id":"88e43aa7c46545cf1afc547f716f98ae19a0d69d"}],"cinder/volume/volume_types.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"231487ac057e99281d48bd2b3caa98fd31003bca","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    \"\"\"Public volume type do not be allowed to add access.\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    if volume_type[\u0027is_public\u0027]:"},{"line_number":189,"context_line":"        msg \u003d _(\"Volume type cannot be public.\")"},{"line_number":190,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_9e026308","line":189,"updated":"2015-06-23 09:24:11.000000000","message":"How about \u0027Type access modification is not applicable to public volume type\u0027?","commit_id":"f157deafcd3c3bd18f58c82ffde8c0d6b9e703a5"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"b537798759d6f5377d58a8971742dd2042f781c5","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    \"\"\"Public volume type do not be allowed to add access.\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    if volume_type[\u0027is_public\u0027]:"},{"line_number":189,"context_line":"        msg \u003d _(\"Volume type cannot be public.\")"},{"line_number":190,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_4b9c185d","line":189,"in_reply_to":"fa32b979_9e026308","updated":"2015-06-26 01:02:45.000000000","message":"Sounds great!","commit_id":"f157deafcd3c3bd18f58c82ffde8c0d6b9e703a5"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"231487ac057e99281d48bd2b3caa98fd31003bca","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    \"\"\"Remove access to volume type for project_id.\"\"\""},{"line_number":204,"context_line":"    if volume_type_id is None:"},{"line_number":205,"context_line":"        msg \u003d _(\"volume_type_id cannot be None\")"},{"line_number":206,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":207,"context_line":"    return db.volume_type_access_remove(context, volume_type_id, project_id)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_5ef61bfa","line":206,"updated":"2015-06-23 09:24:11.000000000","message":"Same check here?","commit_id":"f157deafcd3c3bd18f58c82ffde8c0d6b9e703a5"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"b537798759d6f5377d58a8971742dd2042f781c5","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    \"\"\"Remove access to volume type for project_id.\"\"\""},{"line_number":204,"context_line":"    if volume_type_id is None:"},{"line_number":205,"context_line":"        msg \u003d _(\"volume_type_id cannot be None\")"},{"line_number":206,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":207,"context_line":"    return db.volume_type_access_remove(context, volume_type_id, project_id)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_2b99946e","line":206,"in_reply_to":"fa32b979_5ef61bfa","updated":"2015-06-26 01:02:45.000000000","message":"Emm, At first I think we don\u0027t need this as we control the add operation. But it is a little inappropriate too.... Fine, I will add this.","commit_id":"f157deafcd3c3bd18f58c82ffde8c0d6b9e703a5"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"14c71161ff637f05106405de6a6ea5f0228381b8","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def check_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Public volume type do not be allowed to add access.\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    if volume_type[\u0027is_public\u0027]:"},{"line_number":189,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public volume \""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_a8d9fbf4","line":186,"updated":"2015-06-24 06:11:15.000000000","message":"I\u0027d rather keep this helper function simple, return True if volume type is public, and let others to handle the result.","commit_id":"7d78241c14821f6bdcc00d3886b206a9251fc30b"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"ef8e235cf15c9c4cd3ea9003f905b1616ab665be","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def check_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Public volume type do not be allowed to add access.\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    if volume_type[\u0027is_public\u0027]:"},{"line_number":189,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public volume \""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_bf6fecc2","line":186,"in_reply_to":"fa32b979_a8d9fbf4","updated":"2015-06-24 09:33:37.000000000","message":"Sure. Like \u0027if volume_type_id is None\u0027 right?","commit_id":"7d78241c14821f6bdcc00d3886b206a9251fc30b"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"336849d336c15821bebb4da04e25a942afb3d4e4","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        return extra_specs"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def check_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Public volume type do not be allowed to add access.\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    return volume_type[\u0027is_public\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_4bd61b50","line":185,"updated":"2015-06-24 12:14:02.000000000","message":"It should be get_public_volume_type(...) because it just returns the value of volume type by id.","commit_id":"02573642570ce32f7a5905a64f8bf781677c34cb"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"6ef25f1996e9456e5a052ee4dfd13faa27a623ea","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        return extra_specs"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def check_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Public volume type do not be allowed to add access.\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    return volume_type[\u0027is_public\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_e3b041de","line":185,"in_reply_to":"fa32b979_4bd61b50","updated":"2015-06-25 11:02:19.000000000","message":"Done","commit_id":"02573642570ce32f7a5905a64f8bf781677c34cb"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"9b7b096aab25a6273e6fc4a0849d7624911fbb2d","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    if volume_type_id is None:"},{"line_number":194,"context_line":"        msg \u003d _(\"volume_type_id cannot be None\")"},{"line_number":195,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":196,"context_line":"    if get_public_volume_type(context, volume_type_id):"},{"line_number":197,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public volume \""},{"line_number":198,"context_line":"                \"type.\")"},{"line_number":199,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_095c4aef","line":196,"updated":"2015-06-25 22:01:32.000000000","message":"This \u0027if\u0027 statement is the same like in line #28. Please, move it to \u0027get_public_volume_type\u0027 method. Also I propose to rename it to \u0027check_public_volume_type\u0027 or something like it","commit_id":"545e2ce1e1c432fdf340f08c8ccd0104b3684341"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"9192c7593e649b62484a9e7cb600e4e47491107c","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    if volume_type_id is None:"},{"line_number":194,"context_line":"        msg \u003d _(\"volume_type_id cannot be None\")"},{"line_number":195,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":196,"context_line":"    if get_public_volume_type(context, volume_type_id):"},{"line_number":197,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public volume \""},{"line_number":198,"context_line":"                \"type.\")"},{"line_number":199,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_9800a237","line":196,"in_reply_to":"fa32b979_095c4aef","updated":"2015-06-26 01:09:19.000000000","message":"It\u0027s has done as you suggest in patch 3. But Zhiteng think it\u0027s better to  keep this helper function simple, just return True if volume type is public. Honestly, I\u0027m fine with both.","commit_id":"545e2ce1e1c432fdf340f08c8ccd0104b3684341"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"01c32ec9b55d5086957c6c78b1be08059a98826b","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        return extra_specs"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def get_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Public volume type do not be allowed to add access.\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    return volume_type[\u0027is_public\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_a97be57a","line":185,"updated":"2015-06-29 01:57:22.000000000","message":"minor nit: change the function name to is_public_volume_type.","commit_id":"bbd1b51db847af903d952790524e339cb26c1165"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"eae5a7c1effe6d45842c2c822e7b42f21766cc08","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        return extra_specs"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def get_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Public volume type do not be allowed to add access.\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    return volume_type[\u0027is_public\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_2a302056","line":185,"in_reply_to":"ba3cc151_a97be57a","updated":"2015-06-29 07:19:29.000000000","message":"Done","commit_id":"bbd1b51db847af903d952790524e339cb26c1165"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"bc5824a697fb252fa8ae61c293ef1034b6a6f7b2","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def is_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Public volume type do not be allowed to add access.\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    return volume_type[\u0027is_public\u0027]"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_9dece9c8","line":186,"updated":"2015-06-30 02:31:21.000000000","message":"This docstring isn\u0027t correct.","commit_id":"cb670283593cbf782f7024785fdcd6bcceecbe8d"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"194667f8c84f866dcae4855cc8de578475c0c379","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def is_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Public volume type do not be allowed to add access.\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    return volume_type[\u0027is_public\u0027]"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_c34db273","line":186,"in_reply_to":"ba3cc151_9dece9c8","updated":"2015-06-30 03:34:47.000000000","message":"Sure, will fix it soon.","commit_id":"cb670283593cbf782f7024785fdcd6bcceecbe8d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5fd73dd97559fc4dcbeb9861ea2bc7f3ead24140","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def is_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Return is_public boolean value of volume type\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    return volume_type[\u0027is_public\u0027]"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_96bc7c07","line":187,"updated":"2015-07-01 11:36:11.000000000","message":"This should use volume object, since we are moving away from using direct DB methods in new code.","commit_id":"88e43aa7c46545cf1afc547f716f98ae19a0d69d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"934f25ec1b68b0a79ac4017f0a26826cfd936707","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def is_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Return is_public boolean value of volume type\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    return volume_type[\u0027is_public\u0027]"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_070a4a79","line":187,"in_reply_to":"ba3cc151_8c0f6838","updated":"2015-07-02 07:46:48.000000000","message":"My bad, you are totally right, this is the way to do it until we get that object in place.","commit_id":"88e43aa7c46545cf1afc547f716f98ae19a0d69d"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"61e833423118323d6f6734c6fe3f57c3e9f0489a","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def is_public_volume_type(context, volume_type_id):"},{"line_number":186,"context_line":"    \"\"\"Return is_public boolean value of volume type\"\"\""},{"line_number":187,"context_line":"    volume_type \u003d db.volume_type_get(context, volume_type_id)"},{"line_number":188,"context_line":"    return volume_type[\u0027is_public\u0027]"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_8c0f6838","line":187,"in_reply_to":"ba3cc151_96bc7c07","updated":"2015-07-02 02:29:26.000000000","message":"I don\u0027t understand. Shouldn\u0027t we use volume type object(of course it\u0027s not existing yet.)? And Sorry I don\u0027t find the method in volume object to get volume type...","commit_id":"88e43aa7c46545cf1afc547f716f98ae19a0d69d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5fd73dd97559fc4dcbeb9861ea2bc7f3ead24140","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    if is_public_volume_type(context, volume_type_id):"},{"line_number":209,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public volume \""},{"line_number":210,"context_line":"                \"type.\")"},{"line_number":211,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":212,"context_line":"    return db.volume_type_access_remove(context, volume_type_id, project_id)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_f6cdc885","line":211,"updated":"2015-07-01 11:36:11.000000000","message":"Can\u0027t we extract these 2 common checks to a common method since they are done in the same way in remove and add volume_type?","commit_id":"88e43aa7c46545cf1afc547f716f98ae19a0d69d"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"61e833423118323d6f6734c6fe3f57c3e9f0489a","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    if is_public_volume_type(context, volume_type_id):"},{"line_number":209,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public volume \""},{"line_number":210,"context_line":"                \"type.\")"},{"line_number":211,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":212,"context_line":"    return db.volume_type_access_remove(context, volume_type_id, project_id)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_6c254407","line":211,"in_reply_to":"ba3cc151_25077419","updated":"2015-07-02 02:29:26.000000000","message":"Guys, I have done this as you said in patch 3. But winston think we should keep the help function simple, please see the comment in there. Personally I\u0027d like current code too.","commit_id":"88e43aa7c46545cf1afc547f716f98ae19a0d69d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"934f25ec1b68b0a79ac4017f0a26826cfd936707","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    if is_public_volume_type(context, volume_type_id):"},{"line_number":209,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public volume \""},{"line_number":210,"context_line":"                \"type.\")"},{"line_number":211,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":212,"context_line":"    return db.volume_type_access_remove(context, volume_type_id, project_id)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_07fc8a70","line":211,"in_reply_to":"ba3cc151_6c254407","updated":"2015-07-02 07:46:48.000000000","message":"Well, I was thinking more in the lines of moving the volume_type_id is None exception raising to the helper as well, and the helper would be a validation method for both things, not just for the public volume.  But I\u0027m ok too with current code.","commit_id":"88e43aa7c46545cf1afc547f716f98ae19a0d69d"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"3ad84da410bb912156996aec3f79008d541443dd","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    if is_public_volume_type(context, volume_type_id):"},{"line_number":209,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public volume \""},{"line_number":210,"context_line":"                \"type.\")"},{"line_number":211,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":212,"context_line":"    return db.volume_type_access_remove(context, volume_type_id, project_id)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_25077419","line":211,"in_reply_to":"ba3cc151_f6cdc885","updated":"2015-07-01 13:00:11.000000000","message":"Good idea.","commit_id":"88e43aa7c46545cf1afc547f716f98ae19a0d69d"}]}
