)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14107,"name":"zhurong","email":"aaronzhu1121@gmail.com","username":"zhurong"},"change_message_id":"5d27d1e471851ff05dd9ea16bf3848939bb1803b","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-11-11 15:10:38 +0900"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Attaching a default project_id in request header"},{"line_number":8,"context_line":"for noauth authentication backend."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Zaqar client through below exception for noauth backend."},{"line_number":11,"context_line":"\"MalformedRequest: The header X-PROJECT-ID was missing\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da85f559_04727249","line":8,"updated":"2015-11-11 06:35:53.000000000","message":"No need to wrap, and the title should be shorter","commit_id":"48d3605fd99d0152dd2f9cbf5771b180b706a2ab"},{"author":{"_account_id":14107,"name":"zhurong","email":"aaronzhu1121@gmail.com","username":"zhurong"},"change_message_id":"5d27d1e471851ff05dd9ea16bf3848939bb1803b","unresolved":false,"context_lines":[{"line_number":11,"context_line":"\"MalformedRequest: The header X-PROJECT-ID was missing\""},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch will fix it."},{"line_number":14,"context_line":"Closes-Bug: bug/1494154"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I2e56654846a41ea136e4c06cd1daf697683aed46"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da85f559_24d1b623","line":14,"updated":"2015-11-11 06:35:53.000000000","message":"should have a Enter before this line,\nand the format like this \u0027Closes-bug: #1494154\u0027","commit_id":"48d3605fd99d0152dd2f9cbf5771b180b706a2ab"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"488455ec5e4d03b52bc7d1822487038cfe46d02d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Attaching a default project_id in request header"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Zaqar client through below exception for noauth backend."},{"line_number":10,"context_line":"MalformedRequest: The header X-PROJECT-ID was missing"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch will attach a default project_id \u003c123456\u003e in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da85f559_4b1aaf7e","line":9,"updated":"2015-11-11 16:14:32.000000000","message":"I think you meant \"threw\" not \"through\", yes?","commit_id":"27b8f24db6e33bff55be2f40b0d9b479e396f257"},{"author":{"_account_id":18009,"name":"Md Nadeem","email":"mail2nadeem92@gmail.com","username":"mail2nadeem92"},"change_message_id":"bd38438344a2efcc71f20a70332a9c8aa91506ef","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Attaching a default project_id in request header"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Zaqar client through below exception for noauth backend."},{"line_number":10,"context_line":"MalformedRequest: The header X-PROJECT-ID was missing"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch will attach a default project_id \u003c123456\u003e in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da85f559_0e9a5f6e","line":9,"in_reply_to":"da85f559_4b1aaf7e","updated":"2015-11-12 00:19:47.000000000","message":"Done","commit_id":"27b8f24db6e33bff55be2f40b0d9b479e396f257"}],"zaqarclient/transport/request.py":[{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"488455ec5e4d03b52bc7d1822487038cfe46d02d","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    req.headers[\u0027X-Project-Id\u0027] \u003d auth_opts.get(\u0027options\u0027,"},{"line_number":50,"context_line":"                                                {}).get(\u0027os_project_id\u0027)"},{"line_number":51,"context_line":"    # If \"noauth\" is selected as authentication backend"},{"line_number":52,"context_line":"    # then a default project id shoud be set in request header."},{"line_number":53,"context_line":"    if not req.headers[\u0027X-Project-Id\u0027]:"},{"line_number":54,"context_line":"        req.headers[\u0027X-Project-Id\u0027] \u003d \"123456\""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_ce6a2db3","line":52,"updated":"2015-11-11 16:14:32.000000000","message":"Perhaps this is a ridiculous question, but why does this work?  Is it the care that the project ID header needs to exist but it\u0027s value is completely irrelevant?  \n\nAlso, if \u0027123456\u0027 is a special value then it should probably be a constant.","commit_id":"27b8f24db6e33bff55be2f40b0d9b479e396f257"},{"author":{"_account_id":18009,"name":"Md Nadeem","email":"mail2nadeem92@gmail.com","username":"mail2nadeem92"},"change_message_id":"bd38438344a2efcc71f20a70332a9c8aa91506ef","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    req.headers[\u0027X-Project-Id\u0027] \u003d auth_opts.get(\u0027options\u0027,"},{"line_number":50,"context_line":"                                                {}).get(\u0027os_project_id\u0027)"},{"line_number":51,"context_line":"    # If \"noauth\" is selected as authentication backend"},{"line_number":52,"context_line":"    # then a default project id shoud be set in request header."},{"line_number":53,"context_line":"    if not req.headers[\u0027X-Project-Id\u0027]:"},{"line_number":54,"context_line":"        req.headers[\u0027X-Project-Id\u0027] \u003d \"123456\""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_8eadef9c","line":52,"in_reply_to":"da85f559_ce6a2db3","updated":"2015-11-12 00:19:47.000000000","message":"Yes, it will work with any value.\nAs zaqar server used \"123456\" as the default project ID header for functional test. So to keep symmetry with that i too use the same default value. Please have a look at below link:\nhttps://github.com/openstack/zaqar/blob/master/zaqar/tests/functional/config.py#L43","commit_id":"27b8f24db6e33bff55be2f40b0d9b479e396f257"},{"author":{"_account_id":12321,"name":"Ryan Brown","email":"rybrown@redhat.com","username":"ryansb"},"change_message_id":"6b9ff4ade80d85f77fc3ba2021ab5a1c20dcdccc","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                                                {}).get(\u0027os_project_id\u0027)"},{"line_number":51,"context_line":"    # If \"noauth\" is selected as authentication backend"},{"line_number":52,"context_line":"    # then a default project id shoud be set in request header."},{"line_number":53,"context_line":"    if not req.headers[\u0027X-Project-Id\u0027]:"},{"line_number":54,"context_line":"        req.headers[\u0027X-Project-Id\u0027] \u003d \"123456\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if data is not None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_321be582","line":53,"updated":"2015-11-12 18:18:41.000000000","message":"I think it\u0027d be clearer to use:\n\nreq.headers[\u0027X-Project-Id\u0027] \u003d auth_opts.get(\u0027options\u0027, {}).get(\u0027os_project_id\u0027, \"123456\")","commit_id":"1b3415931efe3bd05871112cd2418094366cde93"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"9837b48b07254fa9307d1e6024bc5c8c768cea17","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    # TODO(flaper87): Do something smarter"},{"line_number":47,"context_line":"    # to get the api_version."},{"line_number":48,"context_line":"    req \u003d auth_backend.authenticate(1, req)"},{"line_number":49,"context_line":"    req.headers[\u0027X-Project-Id\u0027] \u003d auth_opts.get("},{"line_number":50,"context_line":"        \u0027options\u0027, {}).get(\u0027os_project_id\u0027, \"123456\")"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    if data is not None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_de3334f5","line":49,"updated":"2015-11-22 21:47:30.000000000","message":"(question): I haven\u0027t tested, but i have a concern if user may run into a case like: using keystone auth but get this fake project id. Is it possible? Should we check the auth method to double confirm? Thanks.","commit_id":"5325cfa0f840a4739d98769f00db3a7dcf567e61"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e32f4de303f55b45490201953a180be1e06896f7","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \u0027options\u0027, {}).get(\u0027os_project_id\u0027, {})"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    # In case of noauth backend, a default project id will be added to header."},{"line_number":53,"context_line":"    if not req.headers[\u0027X-Project-Id\u0027]:"},{"line_number":54,"context_line":"        if \"backend\" in auth_opts and auth_opts[\"backend\"] \u003d\u003d \"noauth\":"},{"line_number":55,"context_line":"            req.headers[\u0027X-Project-Id\u0027] \u003d \"123456\""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_3107f11d","line":53,"updated":"2015-11-26 03:18:36.000000000","message":"(nit): How about merging the two if? like:\nif not req.headers[\u0027X-Project-Id\u0027] and auth_opts.get(\u0027backend\u0027) \u003d\u003d \u0027noauth\u0027:\n\nBesides, could we use \u0027fake_project_id_for_noauth\u0027 as the  project id to make it more implicit? IMHO, \u0027123456\u0027 is too magic.","commit_id":"197c55dee986fb2111ad99b8ac896425ce413fc2"},{"author":{"_account_id":18009,"name":"Md Nadeem","email":"mail2nadeem92@gmail.com","username":"mail2nadeem92"},"change_message_id":"833e1586af775c0856a4ef4d0f3560b9a3d226de","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \u0027options\u0027, {}).get(\u0027os_project_id\u0027, {})"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    # In case of noauth backend, a default project id will be added to header."},{"line_number":53,"context_line":"    if not req.headers[\u0027X-Project-Id\u0027]:"},{"line_number":54,"context_line":"        if \"backend\" in auth_opts and auth_opts[\"backend\"] \u003d\u003d \"noauth\":"},{"line_number":55,"context_line":"            req.headers[\u0027X-Project-Id\u0027] \u003d \"123456\""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_b7e1759c","line":53,"in_reply_to":"9a8ffd7b_3107f11d","updated":"2015-11-26 08:20:36.000000000","message":"Oh that look really nice :)\nThanks for suggesting Fei Long Wang.","commit_id":"197c55dee986fb2111ad99b8ac896425ce413fc2"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"2f23b84422331c84073fdb48dd1a8f0f0694c843","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \u0027options\u0027, {}).get(\u0027os_project_id\u0027, {})"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    # In case of noauth backend, a default project id will be added to header."},{"line_number":53,"context_line":"    if not req.headers[\u0027X-Project-Id\u0027]\\"},{"line_number":54,"context_line":"            and auth_opts.get(\"backend\") \u003d\u003d \"noauth\":"},{"line_number":55,"context_line":"        req.headers[\u0027X-Project-Id\u0027] \u003d \"fake_project_id_for_noauth\""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_036fe3c5","line":53,"updated":"2015-11-26 09:29:06.000000000","message":"(nit): Please use () instead of \\ for breaking line","commit_id":"a9c4b8db94ffea3f5af5beeb815c06f987cebc12"},{"author":{"_account_id":18009,"name":"Md Nadeem","email":"mail2nadeem92@gmail.com","username":"mail2nadeem92"},"change_message_id":"11e27c0570ee73ed6c6713619b00f8cd1b144d26","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \u0027options\u0027, {}).get(\u0027os_project_id\u0027, {})"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    # In case of noauth backend, a default project id will be added to header."},{"line_number":53,"context_line":"    if not req.headers[\u0027X-Project-Id\u0027]\\"},{"line_number":54,"context_line":"            and auth_opts.get(\"backend\") \u003d\u003d \"noauth\":"},{"line_number":55,"context_line":"        req.headers[\u0027X-Project-Id\u0027] \u003d \"fake_project_id_for_noauth\""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_df8bebc1","line":53,"in_reply_to":"9a8ffd7b_036fe3c5","updated":"2015-11-26 09:58:19.000000000","message":"Done","commit_id":"a9c4b8db94ffea3f5af5beeb815c06f987cebc12"}]}
