)]}'
{"magnum/api/controllers/v1/utils.py":[{"author":{"_account_id":7049,"name":"Kai Qiang Wu(Kennan)","email":"wkq5325@gmail.com","username":"Kennan"},"change_message_id":"ed2c244d0c2dd9ae51a1d39ee8a8b517c142eb7d","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                raise wsme.exc.ClientSideError(msg % p[\u0027path\u0027])"},{"line_number":57,"context_line":"            if doc[bay_attr] is not None:"},{"line_number":58,"context_line":"                msg \u003d _(\u0027The attribute (%s) has been existed, please use \u0027"},{"line_number":59,"context_line":"                        \u0027\\\u0027replace\\\u0027 operation instead.\u0027)"},{"line_number":60,"context_line":"                raise wsme.exc.ClientSideError(msg % p[\u0027path\u0027])"},{"line_number":61,"context_line":"    return jsonpatch.apply_patch(doc, jsonpatch.JsonPatch(patch))"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_38ca334f","line":59,"updated":"2015-11-02 05:47:08.000000000","message":"1.for msg, I think you not need use \\. kust use\n\n\"The .....  \u0027replace\u0027 operation instead\" this way.\n\n2. Also, I think it is better with \"The attribute \u0027%s\u0027 has been ..\", not use parenthesis","commit_id":"24ee92ee982d1fd17cc1465cc50257107426cde4"},{"author":{"_account_id":12053,"name":"Hua Wang","email":"wanghua.humble@gmail.com","username":"humble00"},"change_message_id":"21a4b448359135c6c6706f7c0b5a724a26f159ad","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                raise wsme.exc.ClientSideError(msg % p[\u0027path\u0027])"},{"line_number":57,"context_line":"            if doc[bay_attr] is not None:"},{"line_number":58,"context_line":"                msg \u003d _(\u0027The attribute (%s) has been existed, please use \u0027"},{"line_number":59,"context_line":"                        \u0027\\\u0027replace\\\u0027 operation instead.\u0027)"},{"line_number":60,"context_line":"                raise wsme.exc.ClientSideError(msg % p[\u0027path\u0027])"},{"line_number":61,"context_line":"    return jsonpatch.apply_patch(doc, jsonpatch.JsonPatch(patch))"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_51aeef98","line":59,"updated":"2015-11-02 02:55:48.000000000","message":"I find that if the target location specifies an object member that does exist, that member\u0027s value is replaced when we use add op in [1]. So I think this patch is not necessary.\n\n[1]https://tools.ietf.org/html/rfc6902#section-4.1","commit_id":"24ee92ee982d1fd17cc1465cc50257107426cde4"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"06a3ae27aec7585639c027efdb582dde63037f7f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                raise wsme.exc.ClientSideError(msg % p[\u0027path\u0027])"},{"line_number":57,"context_line":"            if doc[bay_attr] is not None:"},{"line_number":58,"context_line":"                msg \u003d _(\u0027The attribute (%s) has been existed, please use \u0027"},{"line_number":59,"context_line":"                        \u0027\\\u0027replace\\\u0027 operation instead.\u0027)"},{"line_number":60,"context_line":"                raise wsme.exc.ClientSideError(msg % p[\u0027path\u0027])"},{"line_number":61,"context_line":"    return jsonpatch.apply_patch(doc, jsonpatch.JsonPatch(patch))"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_e857e957","line":59,"in_reply_to":"1a26ad4f_38ca334f","updated":"2015-11-03 01:15:29.000000000","message":"1: okay\n2: I just follow line 54, what do you think? should I modify both of them in next update spin ?","commit_id":"24ee92ee982d1fd17cc1465cc50257107426cde4"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"06a3ae27aec7585639c027efdb582dde63037f7f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                raise wsme.exc.ClientSideError(msg % p[\u0027path\u0027])"},{"line_number":57,"context_line":"            if doc[bay_attr] is not None:"},{"line_number":58,"context_line":"                msg \u003d _(\u0027The attribute (%s) has been existed, please use \u0027"},{"line_number":59,"context_line":"                        \u0027\\\u0027replace\\\u0027 operation instead.\u0027)"},{"line_number":60,"context_line":"                raise wsme.exc.ClientSideError(msg % p[\u0027path\u0027])"},{"line_number":61,"context_line":"    return jsonpatch.apply_patch(doc, jsonpatch.JsonPatch(patch))"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_881bd5c9","line":59,"in_reply_to":"1a26ad4f_51aeef98","updated":"2015-11-03 01:15:29.000000000","message":"you are right, the attribution value will be replaced when we using add op.\nThis will make user confused.\n\nI think we need this one.","commit_id":"24ee92ee982d1fd17cc1465cc50257107426cde4"},{"author":{"_account_id":7049,"name":"Kai Qiang Wu(Kennan)","email":"wkq5325@gmail.com","username":"Kennan"},"change_message_id":"c4289355ab8f160264e497c7a4b070db09a0d15f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                raise wsme.exc.ClientSideError(msg % p[\u0027path\u0027])"},{"line_number":57,"context_line":"            if doc[bay_attr] is not None:"},{"line_number":58,"context_line":"                msg \u003d _(\u0027The attribute (%s) has been existed, please use \u0027"},{"line_number":59,"context_line":"                        \u0027\\\u0027replace\\\u0027 operation instead.\u0027)"},{"line_number":60,"context_line":"                raise wsme.exc.ClientSideError(msg % p[\u0027path\u0027])"},{"line_number":61,"context_line":"    return jsonpatch.apply_patch(doc, jsonpatch.JsonPatch(patch))"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_f37fda14","line":59,"in_reply_to":"1a26ad4f_e857e957","updated":"2015-11-03 01:53:42.000000000","message":"I think you can change that.  Thanks","commit_id":"24ee92ee982d1fd17cc1465cc50257107426cde4"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"804fb8eeeed95cd83e31ce4c84293eb7f608cee2","unresolved":false,"context_lines":[{"line_number":49,"context_line":"def apply_jsonpatch(doc, patch):"},{"line_number":50,"context_line":"    for p in patch:"},{"line_number":51,"context_line":"        if p[\u0027op\u0027] \u003d\u003d \u0027add\u0027 and p[\u0027path\u0027].count(\u0027/\u0027) \u003d\u003d 1:"},{"line_number":52,"context_line":"            bay_attr \u003d p[\u0027path\u0027].lstrip(\u0027/\u0027)"},{"line_number":53,"context_line":"            if bay_attr not in doc:"},{"line_number":54,"context_line":"                msg \u003d _(\"Adding a new attribute %s to the root of \""},{"line_number":55,"context_line":"                        \"the resource is not allowed.\") % p[\u0027path\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_67c3ff57","line":52,"updated":"2015-11-03 09:03:19.000000000","message":"Can we use a generic name? it may not always bay","commit_id":"50fe61635ca75d27b86d7cb1a39e90951a98d932"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"2b21bb123553e169a9f18780c4e4a13c5fde7226","unresolved":false,"context_lines":[{"line_number":49,"context_line":"def apply_jsonpatch(doc, patch):"},{"line_number":50,"context_line":"    for p in patch:"},{"line_number":51,"context_line":"        if p[\u0027op\u0027] \u003d\u003d \u0027add\u0027 and p[\u0027path\u0027].count(\u0027/\u0027) \u003d\u003d 1:"},{"line_number":52,"context_line":"            bay_attr \u003d p[\u0027path\u0027].lstrip(\u0027/\u0027)"},{"line_number":53,"context_line":"            if bay_attr not in doc:"},{"line_number":54,"context_line":"                msg \u003d _(\"Adding a new attribute %s to the root of \""},{"line_number":55,"context_line":"                        \"the resource is not allowed.\") % p[\u0027path\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_878bbbc2","line":52,"in_reply_to":"1a26ad4f_67c3ff57","updated":"2015-11-03 09:17:44.000000000","message":"Done","commit_id":"50fe61635ca75d27b86d7cb1a39e90951a98d932"}],"magnum/tests/unit/api/controllers/v1/test_utils.py":[{"author":{"_account_id":18386,"name":"wangqun","email":"bjwqun@cn.ibm.com","username":"wangqun"},"change_message_id":"e489b1f111a9d6137baaf2b147f3cfe14cee6759","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        exc \u003d self.assertRaises(wsme.exc.ClientSideError,"},{"line_number":147,"context_line":"                                utils.apply_jsonpatch,"},{"line_number":148,"context_line":"                                doc, patch)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        self.assertEqual("},{"line_number":151,"context_line":"            \"The attribute (/node_count) has been existed, please use \""},{"line_number":152,"context_line":"            \"\\\u0027replace\\\u0027 operation instead.\", exc.message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_dec68767","line":149,"updated":"2015-11-02 07:37:20.000000000","message":"149 line doesn\u0027t the blank line.","commit_id":"24ee92ee982d1fd17cc1465cc50257107426cde4"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"06a3ae27aec7585639c027efdb582dde63037f7f","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        exc \u003d self.assertRaises(wsme.exc.ClientSideError,"},{"line_number":147,"context_line":"                                utils.apply_jsonpatch,"},{"line_number":148,"context_line":"                                doc, patch)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        self.assertEqual("},{"line_number":151,"context_line":"            \"The attribute (/node_count) has been existed, please use \""},{"line_number":152,"context_line":"            \"\\\u0027replace\\\u0027 operation instead.\", exc.message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_a856d159","line":149,"in_reply_to":"1a26ad4f_dec68767","updated":"2015-11-03 01:15:29.000000000","message":"sure, this is really helpful. thanks for your reviewing.","commit_id":"24ee92ee982d1fd17cc1465cc50257107426cde4"},{"author":{"_account_id":7049,"name":"Kai Qiang Wu(Kennan)","email":"wkq5325@gmail.com","username":"Kennan"},"change_message_id":"ed2c244d0c2dd9ae51a1d39ee8a8b517c142eb7d","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        self.assertEqual("},{"line_number":151,"context_line":"            \"The attribute (/node_count) has been existed, please use \""},{"line_number":152,"context_line":"            \"\\\u0027replace\\\u0027 operation instead.\", exc.message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_58336f62","line":152,"updated":"2015-11-02 05:47:08.000000000","message":"change this msg(check my comments on utils.py)","commit_id":"24ee92ee982d1fd17cc1465cc50257107426cde4"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"06a3ae27aec7585639c027efdb582dde63037f7f","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        self.assertEqual("},{"line_number":151,"context_line":"            \"The attribute (/node_count) has been existed, please use \""},{"line_number":152,"context_line":"            \"\\\u0027replace\\\u0027 operation instead.\", exc.message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_684c39c8","line":152,"in_reply_to":"1a26ad4f_58336f62","updated":"2015-11-03 01:15:29.000000000","message":"agreed.","commit_id":"24ee92ee982d1fd17cc1465cc50257107426cde4"}]}
