)]}'
{"functions-common":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"f48eadcb93ee89cd133dd9a1396ba2384752b891","unresolved":false,"context_lines":[{"line_number":742,"context_line":""},{"line_number":743,"context_line":"    if grep -q ${policy_name} ${policy_file}; then"},{"line_number":744,"context_line":"        echo \"Policy ${policy_name} already exists in ${policy_file}\""},{"line_number":745,"context_line":"        return"},{"line_number":746,"context_line":"    fi"},{"line_number":747,"context_line":""},{"line_number":748,"context_line":"    # Add a terminating comma to policy lines without one"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"3ac371cc_7138ff3d","line":745,"updated":"2016-08-17 05:48:48.000000000","message":"can we take a minute to think about the interface here, before we add yet another function that will never go away ...\n\nwhat use is policy_add as it is?  \"I want to add my policy with this given policy_perm , but if the policy_name is already there, then just don\u0027t do anything\" does not seem to be a valid use case?\n\nI mean, at the very least this should be checking if the policy_name is there AND the policy_perm is the same before doing nothing?\n\nwhich is why you wrote policy_update no doubt.  \n\nSince policy_add doesn\u0027t seem useful as is, I think i\u0027d argue that we should just have the one interface of policy_add, which should just be modified to either add the policy, or update an existing policy if it is there.","commit_id":"296467be393ba8ed2f3858a0dbdafe166250bd53"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"eacad65d09030868eb67d2aac0d9d5de85cc693a","unresolved":false,"context_lines":[{"line_number":742,"context_line":""},{"line_number":743,"context_line":"    if grep -q ${policy_name} ${policy_file}; then"},{"line_number":744,"context_line":"        echo \"Policy ${policy_name} already exists in ${policy_file}\""},{"line_number":745,"context_line":"        return"},{"line_number":746,"context_line":"    fi"},{"line_number":747,"context_line":""},{"line_number":748,"context_line":"    # Add a terminating comma to policy lines without one"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"3ac371cc_35df736a","line":745,"in_reply_to":"3ac371cc_7138ff3d","updated":"2016-08-17 15:15:42.000000000","message":"I considered that, but didn\u0027t see anyone using it in devstack, which leads me to believe external plugins probably do. My concern (and reason I didn\u0027t modify it) was that someone might be relying on the behavior and I didn\u0027t want to change it from underneath them.\n\nI\u0027m happy to merge these two behaviors into policy_add if you think its OK though.","commit_id":"296467be393ba8ed2f3858a0dbdafe166250bd53"}],"lib/cinder":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"f48eadcb93ee89cd133dd9a1396ba2384752b891","unresolved":false,"context_lines":[{"line_number":244,"context_line":"    policy_update $CINDER_API_POLICY_JSON \"consistencygroup:create_cgsnapshot\" \"rule:admin_or_owner\""},{"line_number":245,"context_line":"    policy_update $CINDER_API_POLICY_JSON \"consistencygroup:delete_cgsnapshot\" \"rule:admin_or_owner\""},{"line_number":246,"context_line":"    policy_update $CINDER_API_POLICY_JSON \"consistencygroup:get_cgsnapshot\" \"rule:admin_or_owner\""},{"line_number":247,"context_line":"    policy_update $CINDER_API_POLICY_JSON \"consistencygroup:get_all_cgsnapshots\" \"rule:admin_or_owner\""},{"line_number":248,"context_line":"}"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"# configure_cinder() - Set config files, create data dirs, etc"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"3ac371cc_7bcd80b6","line":247,"updated":"2016-08-17 05:48:48.000000000","message":"this just seems like a lot of stuff to get out of date, but i guess it\u0027s the only way to enable it","commit_id":"296467be393ba8ed2f3858a0dbdafe166250bd53"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"eacad65d09030868eb67d2aac0d9d5de85cc693a","unresolved":false,"context_lines":[{"line_number":244,"context_line":"    policy_update $CINDER_API_POLICY_JSON \"consistencygroup:create_cgsnapshot\" \"rule:admin_or_owner\""},{"line_number":245,"context_line":"    policy_update $CINDER_API_POLICY_JSON \"consistencygroup:delete_cgsnapshot\" \"rule:admin_or_owner\""},{"line_number":246,"context_line":"    policy_update $CINDER_API_POLICY_JSON \"consistencygroup:get_cgsnapshot\" \"rule:admin_or_owner\""},{"line_number":247,"context_line":"    policy_update $CINDER_API_POLICY_JSON \"consistencygroup:get_all_cgsnapshots\" \"rule:admin_or_owner\""},{"line_number":248,"context_line":"}"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"# configure_cinder() - Set config files, create data dirs, etc"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"3ac371cc_82042f18","line":247,"in_reply_to":"3ac371cc_7bcd80b6","updated":"2016-08-17 15:15:42.000000000","message":"Yea :(, luckily it shouldn\u0027t change much. We aren\u0027t really able to rename any of the api\u0027s, and I don\u0027t think the policy.json rule format shifts around much.","commit_id":"296467be393ba8ed2f3858a0dbdafe166250bd53"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"813b9f53ce636392fb85b494d284f28496fe0624","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"function _configure_cinder_cg_api_policy {"},{"line_number":249,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:create\" \"rule:admin_or_owner\""},{"line_number":250,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:create\" \"rule:admin_or_owner\""},{"line_number":251,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:delete\" \"rule:admin_or_owner\""},{"line_number":252,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:update\" \"rule:admin_or_owner\""},{"line_number":253,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:get\" \"rule:admin_or_owner\""}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"3a71b18c_994cf743","line":250,"range":{"start_line":250,"start_character":4,"end_line":250,"end_character":86},"updated":"2016-12-09 22:30:28.000000000","message":"You have a duplicated line here.","commit_id":"b433ff55668b51873a9e867079bfa1f284d32429"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"e22443b4a13fc157b7c84821ff1459fd7066c3e7","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"function _configure_cinder_cg_api_policy {"},{"line_number":249,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:create\" \"rule:admin_or_owner\""},{"line_number":250,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:create\" \"rule:admin_or_owner\""},{"line_number":251,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:delete\" \"rule:admin_or_owner\""},{"line_number":252,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:update\" \"rule:admin_or_owner\""},{"line_number":253,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:get\" \"rule:admin_or_owner\""}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"3a71b18c_f9becbac","line":250,"range":{"start_line":250,"start_character":4,"end_line":250,"end_character":86},"in_reply_to":"3a71b18c_994cf743","updated":"2016-12-09 22:38:49.000000000","message":"Good catch!","commit_id":"b433ff55668b51873a9e867079bfa1f284d32429"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"edac07feb7e85d6e0a3844438643920a0eb4eedf","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"function _configure_cinder_cg_api_policy {"},{"line_number":249,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:create\" \"rule:admin_or_owner\""},{"line_number":250,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:create\" \"rule:admin_or_owner\""},{"line_number":251,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:delete\" \"rule:admin_or_owner\""},{"line_number":252,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:update\" \"rule:admin_or_owner\""},{"line_number":253,"context_line":"    policy_add $CINDER_API_POLICY_JSON \"consistencygroup:get\" \"rule:admin_or_owner\""}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"3a71b18c_1961c739","line":250,"range":{"start_line":250,"start_character":4,"end_line":250,"end_character":86},"in_reply_to":"3a71b18c_f9becbac","updated":"2016-12-09 22:44:23.000000000","message":"I used to be the eagle eyed girl in Ceilometer for catches like this. :)","commit_id":"b433ff55668b51873a9e867079bfa1f284d32429"}]}
