)]}'
{"etc/karbor-policy-generator.conf":[{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"76c51799c4c7eca81869b2fca1f4a302cd7e3208","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[DEFAULT]"},{"line_number":2,"context_line":"output_file \u003d etc/policy.yaml.sample"},{"line_number":3,"context_line":"namespace \u003d karbor"}],"source_content_type":"text/plain","patch_set":4,"id":"7f515b1d_9f598f36","line":3,"range":{"start_line":1,"start_character":0,"end_line":3,"end_character":18},"updated":"2017-09-27 03:39:33.000000000","message":"Why not create a new folder \"oslo-policy-generator\" similar to \"oslo-config-generator\", and put karbor-policy-generator.conf there?","commit_id":"83f97e4c41001a3e48dec46b438f790b5caba952"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"5d7b9a113eb875aa87c242f0819cc07ecd7dd6af","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[DEFAULT]"},{"line_number":2,"context_line":"output_file \u003d etc/policy.yaml.sample"},{"line_number":3,"context_line":"namespace \u003d karbor"}],"source_content_type":"text/plain","patch_set":4,"id":"7f515b1d_45c34439","line":3,"range":{"start_line":1,"start_character":0,"end_line":3,"end_character":18},"in_reply_to":"7f515b1d_9f598f36","updated":"2017-09-27 06:30:11.000000000","message":"IMO, whether or not creating a independent folder for this file, it doesn\u0027t matter.","commit_id":"83f97e4c41001a3e48dec46b438f790b5caba952"}],"karbor/policies/__init__.py":[{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"76c51799c4c7eca81869b2fca1f4a302cd7e3208","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def list_rules():"},{"line_number":22,"context_line":"    return itertools.chain("},{"line_number":23,"context_line":"        base.list_rules(),"},{"line_number":24,"context_line":"        plans.list_rules()"},{"line_number":25,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_3f33bbf8","line":23,"range":{"start_line":23,"start_character":8,"end_line":23,"end_character":25},"updated":"2017-09-27 03:39:33.000000000","message":"Nice, this will ensure base policies generated at the begining of policy.yaml.sample.","commit_id":"83f97e4c41001a3e48dec46b438f790b5caba952"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"5d7b9a113eb875aa87c242f0819cc07ecd7dd6af","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def list_rules():"},{"line_number":22,"context_line":"    return itertools.chain("},{"line_number":23,"context_line":"        base.list_rules(),"},{"line_number":24,"context_line":"        plans.list_rules()"},{"line_number":25,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_e5e350d8","line":23,"range":{"start_line":23,"start_character":8,"end_line":23,"end_character":25},"in_reply_to":"7f515b1d_3f33bbf8","updated":"2017-09-27 06:30:11.000000000","message":":)","commit_id":"83f97e4c41001a3e48dec46b438f790b5caba952"}],"karbor/policy.py":[{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"7f153440375519857b35bc0d87099886d8a54e5b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"def enforce(context, action, target):"},{"line_number":78,"context_line":"    \"\"\"Verifies that the action is valid on the target in this context."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"       :param context: cinder context"},{"line_number":81,"context_line":"       :param action: string representing the action to be checked"},{"line_number":82,"context_line":"           this should be colon separated for clarity."},{"line_number":83,"context_line":"           i.e. ``compute:create_instance``,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_cde66445","line":80,"range":{"start_line":80,"start_character":23,"end_line":80,"end_character":29},"updated":"2017-09-26 06:26:33.000000000","message":"karbor","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"6413071328abb5542f8a5f4ba7bf5329086f176d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"def enforce(context, action, target):"},{"line_number":78,"context_line":"    \"\"\"Verifies that the action is valid on the target in this context."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"       :param context: cinder context"},{"line_number":81,"context_line":"       :param action: string representing the action to be checked"},{"line_number":82,"context_line":"           this should be colon separated for clarity."},{"line_number":83,"context_line":"           i.e. ``compute:create_instance``,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_758df679","line":80,"range":{"start_line":80,"start_character":23,"end_line":80,"end_character":29},"in_reply_to":"7f515b1d_cde66445","updated":"2017-09-26 08:04:10.000000000","message":"Done","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"7f153440375519857b35bc0d87099886d8a54e5b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"           ``compute:attach_volume``,"},{"line_number":85,"context_line":"           ``volume:attach_volume``"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"       :param object: dictionary representing the object of the action"},{"line_number":88,"context_line":"           for object creation this should be a dictionary representing the"},{"line_number":89,"context_line":"           location of the object e.g. ``{\u0027project_id\u0027: context.project_id}``"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_8dd2ac5b","line":87,"range":{"start_line":87,"start_character":14,"end_line":87,"end_character":20},"updated":"2017-09-26 06:26:33.000000000","message":"target","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"6413071328abb5542f8a5f4ba7bf5329086f176d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"           ``compute:attach_volume``,"},{"line_number":85,"context_line":"           ``volume:attach_volume``"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"       :param object: dictionary representing the object of the action"},{"line_number":88,"context_line":"           for object creation this should be a dictionary representing the"},{"line_number":89,"context_line":"           location of the object e.g. ``{\u0027project_id\u0027: context.project_id}``"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_157fe267","line":87,"range":{"start_line":87,"start_character":14,"end_line":87,"end_character":20},"in_reply_to":"7f515b1d_8dd2ac5b","updated":"2017-09-26 08:04:10.000000000","message":"Done","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"7f153440375519857b35bc0d87099886d8a54e5b","unresolved":false,"context_lines":[{"line_number":126,"context_line":"def get_enforcer():"},{"line_number":127,"context_line":"    # This method is for use by oslopolicy CLI scripts. Those scripts need the"},{"line_number":128,"context_line":"    # \u0027output-file\u0027 and \u0027namespace\u0027 options, but having those in sys.argv means"},{"line_number":129,"context_line":"    # loading the Cinder config options will fail as those are not expected to"},{"line_number":130,"context_line":"    # be present. So we pass in an arg list with those stripped out."},{"line_number":131,"context_line":"    conf_args \u003d []"},{"line_number":132,"context_line":"    # Start at 1 because cfg.CONF expects the equivalent of sys.argv[1:]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_4d283433","line":129,"range":{"start_line":129,"start_character":18,"end_line":129,"end_character":24},"updated":"2017-09-26 06:26:33.000000000","message":"Karbor","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"6413071328abb5542f8a5f4ba7bf5329086f176d","unresolved":false,"context_lines":[{"line_number":126,"context_line":"def get_enforcer():"},{"line_number":127,"context_line":"    # This method is for use by oslopolicy CLI scripts. Those scripts need the"},{"line_number":128,"context_line":"    # \u0027output-file\u0027 and \u0027namespace\u0027 options, but having those in sys.argv means"},{"line_number":129,"context_line":"    # loading the Cinder config options will fail as those are not expected to"},{"line_number":130,"context_line":"    # be present. So we pass in an arg list with those stripped out."},{"line_number":131,"context_line":"    conf_args \u003d []"},{"line_number":132,"context_line":"    # Start at 1 because cfg.CONF expects the equivalent of sys.argv[1:]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_55855a59","line":129,"range":{"start_line":129,"start_character":18,"end_line":129,"end_character":24},"in_reply_to":"7f515b1d_4d283433","updated":"2017-09-26 08:04:10.000000000","message":"Done","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"7f153440375519857b35bc0d87099886d8a54e5b","unresolved":false,"context_lines":[{"line_number":146,"context_line":"def authorize(context, action, target, do_raise\u003dTrue, exc\u003dNone):"},{"line_number":147,"context_line":"    \"\"\"Verifies that the action is valid on the target in this context."},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"       :param context: cinder context"},{"line_number":150,"context_line":"       :param action: string representing the action to be checked"},{"line_number":151,"context_line":"           this should be colon separated for clarity."},{"line_number":152,"context_line":"           i.e. ``compute:create_instance``,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_4dab9488","line":149,"range":{"start_line":149,"start_character":23,"end_line":149,"end_character":29},"updated":"2017-09-26 06:26:33.000000000","message":"karbor","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"6413071328abb5542f8a5f4ba7bf5329086f176d","unresolved":false,"context_lines":[{"line_number":146,"context_line":"def authorize(context, action, target, do_raise\u003dTrue, exc\u003dNone):"},{"line_number":147,"context_line":"    \"\"\"Verifies that the action is valid on the target in this context."},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"       :param context: cinder context"},{"line_number":150,"context_line":"       :param action: string representing the action to be checked"},{"line_number":151,"context_line":"           this should be colon separated for clarity."},{"line_number":152,"context_line":"           i.e. ``compute:create_instance``,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_75b4d635","line":149,"range":{"start_line":149,"start_character":23,"end_line":149,"end_character":29},"in_reply_to":"7f515b1d_4dab9488","updated":"2017-09-26 08:04:10.000000000","message":"Done","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"7f153440375519857b35bc0d87099886d8a54e5b","unresolved":false,"context_lines":[{"line_number":149,"context_line":"       :param context: cinder context"},{"line_number":150,"context_line":"       :param action: string representing the action to be checked"},{"line_number":151,"context_line":"           this should be colon separated for clarity."},{"line_number":152,"context_line":"           i.e. ``compute:create_instance``,"},{"line_number":153,"context_line":"           ``compute:attach_volume``,"},{"line_number":154,"context_line":"           ``volume:attach_volume``"},{"line_number":155,"context_line":"       :param target: dictionary representing the object of the action"},{"line_number":156,"context_line":"           for object creation this should be a dictionary representing the"},{"line_number":157,"context_line":"           location of the object e.g. ``{\u0027project_id\u0027: context.project_id}``"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_ad99e879","line":154,"range":{"start_line":152,"start_character":11,"end_line":154,"end_character":35},"updated":"2017-09-26 06:26:33.000000000","message":"IMO, we should use example relevant with karbor","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"6413071328abb5542f8a5f4ba7bf5329086f176d","unresolved":false,"context_lines":[{"line_number":149,"context_line":"       :param context: cinder context"},{"line_number":150,"context_line":"       :param action: string representing the action to be checked"},{"line_number":151,"context_line":"           this should be colon separated for clarity."},{"line_number":152,"context_line":"           i.e. ``compute:create_instance``,"},{"line_number":153,"context_line":"           ``compute:attach_volume``,"},{"line_number":154,"context_line":"           ``volume:attach_volume``"},{"line_number":155,"context_line":"       :param target: dictionary representing the object of the action"},{"line_number":156,"context_line":"           for object creation this should be a dictionary representing the"},{"line_number":157,"context_line":"           location of the object e.g. ``{\u0027project_id\u0027: context.project_id}``"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_b5aa4ecf","line":154,"range":{"start_line":152,"start_character":11,"end_line":154,"end_character":35},"in_reply_to":"7f515b1d_ad99e879","updated":"2017-09-26 08:04:10.000000000","message":"Done","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"7f153440375519857b35bc0d87099886d8a54e5b","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                   the exception class. If not specified,"},{"line_number":164,"context_line":"                   :class:`PolicyNotAuthorized` will be used."},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"       :raises cinder.exception.PolicyNotAuthorized: if verification fails"},{"line_number":167,"context_line":"           and do_raise is True. Or if \u0027exc\u0027 is specified it will raise an"},{"line_number":168,"context_line":"           exception of that type."},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_0da35ca0","line":166,"range":{"start_line":166,"start_character":15,"end_line":166,"end_character":21},"updated":"2017-09-26 06:26:33.000000000","message":"karbor","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"6413071328abb5542f8a5f4ba7bf5329086f176d","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                   the exception class. If not specified,"},{"line_number":164,"context_line":"                   :class:`PolicyNotAuthorized` will be used."},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"       :raises cinder.exception.PolicyNotAuthorized: if verification fails"},{"line_number":167,"context_line":"           and do_raise is True. Or if \u0027exc\u0027 is specified it will raise an"},{"line_number":168,"context_line":"           exception of that type."},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_d5af0ae1","line":166,"range":{"start_line":166,"start_character":15,"end_line":166,"end_character":21},"in_reply_to":"7f515b1d_0da35ca0","updated":"2017-09-26 08:04:10.000000000","message":"Done","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"76c51799c4c7eca81869b2fca1f4a302cd7e3208","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                                     \u0027user_id\u0027: context.user_id})"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def enforce(context, action, target):"},{"line_number":78,"context_line":"    \"\"\"Verifies that the action is valid on the target in this context."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"       :param context: karbor context"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_7c0f0137","line":77,"range":{"start_line":77,"start_character":4,"end_line":77,"end_character":11},"updated":"2017-09-27 03:39:33.000000000","message":"Will this function still be used when implementing policy-in-code feature?","commit_id":"83f97e4c41001a3e48dec46b438f790b5caba952"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"5d7b9a113eb875aa87c242f0819cc07ecd7dd6af","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                                     \u0027user_id\u0027: context.user_id})"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def enforce(context, action, target):"},{"line_number":78,"context_line":"    \"\"\"Verifies that the action is valid on the target in this context."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"       :param context: karbor context"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_e5c470f7","line":77,"range":{"start_line":77,"start_character":4,"end_line":77,"end_character":11},"in_reply_to":"7f515b1d_7c0f0137","updated":"2017-09-27 06:30:11.000000000","message":"It will used for generating policy file[1].\n\n[1] https://docs.openstack.org/oslo.policy/ocata/usage.html","commit_id":"83f97e4c41001a3e48dec46b438f790b5caba952"}],"karbor/utils.py":[{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"7f153440375519857b35bc0d87099886d8a54e5b","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"@contextlib.contextmanager"},{"line_number":185,"context_line":"def tempdir(**kwargs):"},{"line_number":186,"context_line":"    tmpdir \u003d tempfile.mkdtemp(**kwargs)"},{"line_number":187,"context_line":"    try:"},{"line_number":188,"context_line":"        yield tmpdir"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_2dbbb872","line":185,"range":{"start_line":185,"start_character":4,"end_line":185,"end_character":11},"updated":"2017-09-26 06:26:33.000000000","message":"this method is only used by test ?","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"6413071328abb5542f8a5f4ba7bf5329086f176d","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"@contextlib.contextmanager"},{"line_number":185,"context_line":"def tempdir(**kwargs):"},{"line_number":186,"context_line":"    tmpdir \u003d tempfile.mkdtemp(**kwargs)"},{"line_number":187,"context_line":"    try:"},{"line_number":188,"context_line":"        yield tmpdir"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_f50c463c","line":185,"range":{"start_line":185,"start_character":4,"end_line":185,"end_character":11},"in_reply_to":"7f515b1d_2dbbb872","updated":"2017-09-26 08:04:10.000000000","message":"yes","commit_id":"ab24038ba7c4f8093450d3246a1ab07501756a99"}]}
