)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"71ba2980c278fcd0a223b83d8473b384ceb73379","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     MonicaJoshi \u003cmonjoshi@in.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-04-05 05:12:16 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix for Group API update to include check policy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"All cinder APIs should do policy checks to enforce"},{"line_number":10,"context_line":"role based access controls. All group apis except"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bff0334d_d15de7e9","line":7,"updated":"2017-04-07 15:19:08.000000000","message":"It also added policy check for create group snapshot.","commit_id":"2715ceb6e33a2cddda494987ab09a6545658a92c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"71ba2980c278fcd0a223b83d8473b384ceb73379","unresolved":false,"context_lines":[{"line_number":9,"context_line":"All cinder APIs should do policy checks to enforce"},{"line_number":10,"context_line":"role based access controls. All group apis except"},{"line_number":11,"context_line":"groups update has this in place. This changeset"},{"line_number":12,"context_line":"adds policy check for the update groups api."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I36d3c929709b82cf5f34f681a2e1c34bba9feef9"},{"line_number":15,"context_line":"Closes-Bug: 1676278"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bff0334d_f15a2bf1","line":12,"updated":"2017-04-07 15:19:08.000000000","message":"In addition to update group, this patch also added policy check to create_group_snapshot.","commit_id":"2715ceb6e33a2cddda494987ab09a6545658a92c"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e285ef7fdb1b8dfacb1be4bcff30925871c4793e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     MonicaJoshi \u003cmonjoshi@in.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-04-07 15:57:11 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP: Fix for Group API update to include check policy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"All cinder APIs should do policy checks to enforce"},{"line_number":10,"context_line":"role based access controls. All group apis except"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"bff0334d_9c44041d","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":5},"updated":"2017-04-08 07:10:27.000000000","message":"Its about time to remove the WIP :)","commit_id":"0e2c688e0776ad6cb939a47630d826b88a6ad283"}],"cinder/group/api.py":[{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"060c90f2450ca4e96b241705689d98ee4293fda7","unresolved":false,"context_lines":[{"line_number":554,"context_line":"    def update(self, context, group, name, description,"},{"line_number":555,"context_line":"               add_volumes, remove_volumes):"},{"line_number":556,"context_line":"        \"\"\"Update group.\"\"\""},{"line_number":557,"context_line":"\tcheck_policy(context, \u0027update\u0027)"},{"line_number":558,"context_line":"        if group.status !\u003d c_fields.GroupStatus.AVAILABLE:"},{"line_number":559,"context_line":"            msg \u003d _(\"Group status must be available, \""},{"line_number":560,"context_line":"                    \"but current status is: %s.\") % group.status"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_4317db52","line":557,"range":{"start_line":557,"start_character":1,"end_line":557,"end_character":32},"updated":"2017-03-27 08:33:00.000000000","message":"Use decorator \u0027wrap_check_policy\u0027 instead.","commit_id":"85c907b6cce73786de3a73b85aed56eab49de893"},{"author":{"_account_id":13637,"name":"Divya K Konoor","email":"dikonoor@in.ibm.com","username":"dikonoor"},"change_message_id":"44974b6fa1b25f58ca4c1fe96bff5743afedbb6f","unresolved":false,"context_lines":[{"line_number":554,"context_line":"    def update(self, context, group, name, description,"},{"line_number":555,"context_line":"               add_volumes, remove_volumes):"},{"line_number":556,"context_line":"        \"\"\"Update group.\"\"\""},{"line_number":557,"context_line":"\tcheck_policy(context, \u0027update\u0027)"},{"line_number":558,"context_line":"        if group.status !\u003d c_fields.GroupStatus.AVAILABLE:"},{"line_number":559,"context_line":"            msg \u003d _(\"Group status must be available, \""},{"line_number":560,"context_line":"                    \"but current status is: %s.\") % group.status"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_9484fb5f","line":557,"range":{"start_line":557,"start_character":1,"end_line":557,"end_character":32},"in_reply_to":"ffe62b97_4317db52","updated":"2017-03-27 09:21:25.000000000","message":"I agree that it\u0027s better to have consistency across all CRUD operations around this API. We should either use the decorator or the method. Also agree that we must ensure that there should be policy checks across all groups and group snapshot api. However, I am not sure if all those changes would really fall into the scope of this bug fix. There could be another bug that could be used for fixing the 2 points.","commit_id":"85c907b6cce73786de3a73b85aed56eab49de893"},{"author":{"_account_id":14532,"name":"Gerald McBrearty","email":"gfm@us.ibm.com","username":"gfm"},"change_message_id":"be3652468e1cc7ec4a8ab558f968c829b3a86378","unresolved":false,"context_lines":[{"line_number":554,"context_line":"    def update(self, context, group, name, description,"},{"line_number":555,"context_line":"               add_volumes, remove_volumes):"},{"line_number":556,"context_line":"        \"\"\"Update group.\"\"\""},{"line_number":557,"context_line":"        check_policy(context, \u0027update\u0027)"},{"line_number":558,"context_line":"        if group.status !\u003d c_fields.GroupStatus.AVAILABLE:"},{"line_number":559,"context_line":"            msg \u003d _(\"Group status must be available, \""},{"line_number":560,"context_line":"                    \"but current status is: %s.\") % group.status"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfeb2761_7e038cb9","line":557,"updated":"2017-04-03 19:06:01.000000000","message":"It would be cleaner I think in the log run to use the wrapper. if you need another change I\u0027d change this to use the wrapper.\n\nIs there a testcase we can associate with this change?","commit_id":"8016e1607b307a9610560dd8f4e6a0d1b24df335"},{"author":{"_account_id":14532,"name":"Gerald McBrearty","email":"gfm@us.ibm.com","username":"gfm"},"change_message_id":"be3652468e1cc7ec4a8ab558f968c829b3a86378","unresolved":false,"context_lines":[{"line_number":789,"context_line":"        group.save()"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    def create_group_snapshot(self, context, group, name, description):"},{"line_number":792,"context_line":"        check_policy(context, \u0027create_group_snapshot\u0027)"},{"line_number":793,"context_line":"        group.assert_not_frozen()"},{"line_number":794,"context_line":"        options \u003d {\u0027group_id\u0027: group.id,"},{"line_number":795,"context_line":"                   \u0027user_id\u0027: context.user_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfeb2761_1e3240a8","line":792,"updated":"2017-04-03 19:06:01.000000000","message":"it would be cleaner I think in the log run to use the wrapper. if you need another change I\u0027d change this to use the wrapper.\n\nIs there a testcase we can associate with this change?","commit_id":"8016e1607b307a9610560dd8f4e6a0d1b24df335"},{"author":{"_account_id":20050,"name":"MonicaJoshi","email":"monjoshi@in.ibm.com","username":"MonicaJoshi"},"change_message_id":"b717c9048bf52de8aed7e69db684f42489c3112d","unresolved":false,"context_lines":[{"line_number":554,"context_line":"    def update(self, context, group, name, description,"},{"line_number":555,"context_line":"               add_volumes, remove_volumes):"},{"line_number":556,"context_line":"        \"\"\"Update group.\"\"\""},{"line_number":557,"context_line":"        check_policy(context, \u0027update\u0027)"},{"line_number":558,"context_line":"        if group.status !\u003d c_fields.GroupStatus.AVAILABLE:"},{"line_number":559,"context_line":"            msg \u003d _(\"Group status must be available, \""},{"line_number":560,"context_line":"                    \"but current status is: %s.\") % group.status"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_f67e6517","line":557,"range":{"start_line":557,"start_character":29,"end_line":557,"end_character":30},"updated":"2017-04-05 09:46:16.000000000","message":"Hi Gerald, test case update() exists. I am checking these:https://github.com/openstack/cinder/blob/master/cinder/tests/unit/group/test_groups_api.py#L231","commit_id":"2715ceb6e33a2cddda494987ab09a6545658a92c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"71ba2980c278fcd0a223b83d8473b384ceb73379","unresolved":false,"context_lines":[{"line_number":554,"context_line":"    def update(self, context, group, name, description,"},{"line_number":555,"context_line":"               add_volumes, remove_volumes):"},{"line_number":556,"context_line":"        \"\"\"Update group.\"\"\""},{"line_number":557,"context_line":"        check_policy(context, \u0027update\u0027)"},{"line_number":558,"context_line":"        if group.status !\u003d c_fields.GroupStatus.AVAILABLE:"},{"line_number":559,"context_line":"            msg \u003d _(\"Group status must be available, \""},{"line_number":560,"context_line":"                    \"but current status is: %s.\") % group.status"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_91c19f83","line":557,"range":{"start_line":557,"start_character":29,"end_line":557,"end_character":30},"in_reply_to":"dfeb2761_f67e6517","updated":"2017-04-07 15:19:08.000000000","message":"Can you add an assert to verify that check_policy is called?","commit_id":"2715ceb6e33a2cddda494987ab09a6545658a92c"},{"author":{"_account_id":20050,"name":"MonicaJoshi","email":"monjoshi@in.ibm.com","username":"MonicaJoshi"},"change_message_id":"b717c9048bf52de8aed7e69db684f42489c3112d","unresolved":false,"context_lines":[{"line_number":789,"context_line":"        group.save()"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    def create_group_snapshot(self, context, group, name, description):"},{"line_number":792,"context_line":"        check_policy(context, \u0027create_group_snapshot\u0027)"},{"line_number":793,"context_line":"        group.assert_not_frozen()"},{"line_number":794,"context_line":"        options \u003d {\u0027group_id\u0027: group.id,"},{"line_number":795,"context_line":"                   \u0027user_id\u0027: context.user_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_f6954541","line":792,"range":{"start_line":792,"start_character":8,"end_line":792,"end_character":20},"updated":"2017-04-05 09:46:16.000000000","message":"Hi Gerald, test case create_group_snapshot exists. I am checking these:\nhttps://github.com/openstack/cinder/blob/master/cinder/tests/unit/group/test_groups_api.py#L516\nhttps://github.com/openstack/cinder/blob/master/cinder/tests/unit/group/test_groups_api.py#L602","commit_id":"2715ceb6e33a2cddda494987ab09a6545658a92c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"71ba2980c278fcd0a223b83d8473b384ceb73379","unresolved":false,"context_lines":[{"line_number":789,"context_line":"        group.save()"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    def create_group_snapshot(self, context, group, name, description):"},{"line_number":792,"context_line":"        check_policy(context, \u0027create_group_snapshot\u0027)"},{"line_number":793,"context_line":"        group.assert_not_frozen()"},{"line_number":794,"context_line":"        options \u003d {\u0027group_id\u0027: group.id,"},{"line_number":795,"context_line":"                   \u0027user_id\u0027: context.user_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_71c05b7c","line":792,"range":{"start_line":792,"start_character":8,"end_line":792,"end_character":20},"in_reply_to":"dfeb2761_f6954541","updated":"2017-04-07 15:19:08.000000000","message":"Can you add an assert to verify that check_policy is called?","commit_id":"2715ceb6e33a2cddda494987ab09a6545658a92c"}],"cinder/tests/unit/group/test_groups_api.py":[{"author":{"_account_id":14532,"name":"Gerald McBrearty","email":"gfm@us.ibm.com","username":"gfm"},"change_message_id":"ea6d92799854016661e354d577884965c82ea7e4","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        self.group_api.delete(self.ctxt, ret_group, delete_volumes \u003d True)"},{"line_number":114,"context_line":"        mock_volume_get_all.assert_called_once_with(mock.ANY, ret_group.id)"},{"line_number":115,"context_line":"        mock_volumes_update.assert_called_once_with(self.ctxt, [])"},{"line_number":116,"context_line":"        mock_rpc_delete_group.assert_called_once_with(self.ctxt, ret_group)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    @mock.patch(\u0027cinder.group.api.API._cast_create_group\u0027)"},{"line_number":119,"context_line":"    @mock.patch(\u0027cinder.group.api.API.update_quota\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_622f1288","line":116,"updated":"2017-04-11 15:28:00.000000000","message":"I\u0027d like to see the assert for policy check here on is_admin","commit_id":"0801adebb16aa0d185715842526d8f8b828673cf"},{"author":{"_account_id":14532,"name":"Gerald McBrearty","email":"gfm@us.ibm.com","username":"gfm"},"change_message_id":"ea6d92799854016661e354d577884965c82ea7e4","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                                          availability_zone\u003d\u0027nova\u0027)"},{"line_number":141,"context_line":"        self.assertEqual(grp.obj_to_primitive(), ret_group.obj_to_primitive())"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        mock_group_type_get.assert_called_once_with(self.ctxt,"},{"line_number":144,"context_line":"                                                    \"fake-grouptype-name\")"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    @mock.patch(\u0027cinder.group.api.API._cast_create_group\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_6244b247","line":143,"updated":"2017-04-11 15:28:00.000000000","message":"policy check assert","commit_id":"0801adebb16aa0d185715842526d8f8b828673cf"}]}
