)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"73f2c032ccababee0c824a87b9f619079ee3539c","unresolved":false,"context_lines":[{"line_number":14,"context_line":"set \u0027remaining_uses\u0027 to None. Perhaps, other clients also do this. Not"},{"line_number":15,"context_line":"relaxing the check would break them."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Finally, modified a unit test to expect the new excecption"},{"line_number":18,"context_line":"(400 instead of 403)."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I989e138a98e43c398a7dd47f8f630737300fbf49"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a41bdd9_f736ad01","line":17,"updated":"2015-07-16 13:21:46.000000000","message":"s/excecption/excecption","commit_id":"1bf03047fc622ff19b87e0b88369a1b64b77c80e"},{"author":{"_account_id":15225,"name":"Deepti Ramakrishna","email":"deepti.ramakrishna@intel.com","username":"dramakri"},"change_message_id":"21d3247c704870e77aab4f278612a8a075e99486","unresolved":false,"context_lines":[{"line_number":14,"context_line":"set \u0027remaining_uses\u0027 to None. Perhaps, other clients also do this. Not"},{"line_number":15,"context_line":"relaxing the check would break them."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Finally, modified a unit test to expect the new excecption"},{"line_number":18,"context_line":"(400 instead of 403)."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I989e138a98e43c398a7dd47f8f630737300fbf49"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a41bdd9_b76ed394","line":17,"in_reply_to":"9a41bdd9_f736ad01","updated":"2015-07-16 17:38:06.000000000","message":"Done","commit_id":"1bf03047fc622ff19b87e0b88369a1b64b77c80e"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"96adeb9f5aac262de5fe45533c57a45ab4b28cf2","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-07-16 10:42:15 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add missing \"raise\" when throwing exception."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Also, slightly relaxed the related check to allow \u0027remaining_uses\u0027 to be set"},{"line_number":10,"context_line":"to None for redelegatable trusts. Previously, it would require that key"},{"line_number":11,"context_line":"\u0027remaining_uses\u0027 not even exist. The new check is still consistent with the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a50d1a3_bede6e6b","line":8,"updated":"2015-07-21 02:56:27.000000000","message":"nit: I would avoid making the commit message description a continuation of the title of the commit. So avoid starting the description with \"Also\". Not a big thing though..","commit_id":"713be9f7e19728b4d70e7b476e2c79cf5e28c186"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"d8356a0740adbe1b8aa712a8eda1373944ed524b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"spec at http://specs.openstack.org/openstack/keystone-specs/api/v3/"},{"line_number":13,"context_line":"identity-api-v3-os-trust-ext.html. All existing tests for redelegatable trusts"},{"line_number":14,"context_line":"set \u0027remaining_uses\u0027 to None. Perhaps, other clients also do this. Not"},{"line_number":15,"context_line":"relaxing the check would break them."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Finally, modified a unit test to expect the new exception"},{"line_number":18,"context_line":"(400 instead of 403)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a50d1a3_de9fc45d","line":15,"updated":"2015-07-20 21:14:31.000000000","message":"This *sounds* like we are weakening our testing...rather than changing the tests to be correct...is that true?","commit_id":"713be9f7e19728b4d70e7b476e2c79cf5e28c186"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"8c8614b842ac083bdd12eb5812a16b2b2c9ffed4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"spec at http://specs.openstack.org/openstack/keystone-specs/api/v3/"},{"line_number":13,"context_line":"identity-api-v3-os-trust-ext.html. All existing tests for redelegatable trusts"},{"line_number":14,"context_line":"set \u0027remaining_uses\u0027 to None. Perhaps, other clients also do this. Not"},{"line_number":15,"context_line":"relaxing the check would break them."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Finally, modified a unit test to expect the new exception"},{"line_number":18,"context_line":"(400 instead of 403)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a50d1a3_840f5c87","line":15,"in_reply_to":"3a50d1a3_9da4dfa6","updated":"2015-07-22 07:26:48.000000000","message":"Ok, got it now.","commit_id":"713be9f7e19728b4d70e7b476e2c79cf5e28c186"},{"author":{"_account_id":15225,"name":"Deepti Ramakrishna","email":"deepti.ramakrishna@intel.com","username":"dramakri"},"change_message_id":"c22a3f1e0eb6f93ba4238d9cc921886e45ba9530","unresolved":false,"context_lines":[{"line_number":12,"context_line":"spec at http://specs.openstack.org/openstack/keystone-specs/api/v3/"},{"line_number":13,"context_line":"identity-api-v3-os-trust-ext.html. All existing tests for redelegatable trusts"},{"line_number":14,"context_line":"set \u0027remaining_uses\u0027 to None. Perhaps, other clients also do this. Not"},{"line_number":15,"context_line":"relaxing the check would break them."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Finally, modified a unit test to expect the new exception"},{"line_number":18,"context_line":"(400 instead of 403)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a50d1a3_9da4dfa6","line":15,"in_reply_to":"3a50d1a3_de9fc45d","updated":"2015-07-20 23:28:27.000000000","message":"Henry, from the spec (http://specs.openstack.org/openstack/keystone-specs/api/v3/identity-api-v3-os-trust-ext.html), its not very clear whether \u0027remaining_uses\u0027 *value* must not be set or whether \u0027remaining_uses\u0027 *key* itself must not be set. \n\nGiven many tests (I think 9 of them) assumed that it was okay to have \u0027remaining_uses\u0027 key, I thought of fixing the logic in the code since it didn\u0027t break the spec. Also, I wasn\u0027t sure if there are already other clients who are doing such similar checks and if not relaxing this feature could break their code.","commit_id":"713be9f7e19728b4d70e7b476e2c79cf5e28c186"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"80d713a9ba8e8876099aa61dcf4b474c2c5a5afd","unresolved":false,"context_lines":[{"line_number":14,"context_line":"set \u0027remaining_uses\u0027 to None. Perhaps, other clients also do this. Not"},{"line_number":15,"context_line":"relaxing the check would break them."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Finally, modified a unit test to expect the new exception"},{"line_number":18,"context_line":"(400 instead of 403)."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I989e138a98e43c398a7dd47f8f630737300fbf49"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a50d1a3_eb2b2480","line":17,"updated":"2015-07-23 18:54:09.000000000","message":"change \"exception\" to \"response code\"","commit_id":"713be9f7e19728b4d70e7b476e2c79cf5e28c186"}],"keystone/trust/core.py":[{"author":{"_account_id":10795,"name":"Rajesh Tailor","email":"tailor.rajesh88@gmail.com","username":"rajeshtailor"},"change_message_id":"0260336fde6df4ee4f55c599d6293a47b15ea7c9","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                    {\u0027requested_count\u0027: requested_count,"},{"line_number":148,"context_line":"                     \u0027max_count\u0027: max_redelegation_count})"},{"line_number":149,"context_line":"            # Decline remaining_uses"},{"line_number":150,"context_line":"            if trust.get(\u0027remaining_uses\u0027, None) is not None:"},{"line_number":151,"context_line":"                raise exception.ValidationError("},{"line_number":152,"context_line":"                    _(\u0027remaining_uses must not be set if redelegation is \u0027"},{"line_number":153,"context_line":"                      \u0027allowed\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_d7a369b0","line":150,"updated":"2015-07-16 12:53:07.000000000","message":"I don\u0027t think there is any need to change the condition.\n\nThe output will be same, but the former is more readable.","commit_id":"1bf03047fc622ff19b87e0b88369a1b64b77c80e"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"73f2c032ccababee0c824a87b9f619079ee3539c","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                    {\u0027requested_count\u0027: requested_count,"},{"line_number":148,"context_line":"                     \u0027max_count\u0027: max_redelegation_count})"},{"line_number":149,"context_line":"            # Decline remaining_uses"},{"line_number":150,"context_line":"            if trust.get(\u0027remaining_uses\u0027, None) is not None:"},{"line_number":151,"context_line":"                raise exception.ValidationError("},{"line_number":152,"context_line":"                    _(\u0027remaining_uses must not be set if redelegation is \u0027"},{"line_number":153,"context_line":"                      \u0027allowed\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_5298c777","line":150,"updated":"2015-07-16 13:21:46.000000000","message":"yep, there is no difference if we make this as the condition.\n.get will return the same value regardless the key existing with None or key is not existing at all.","commit_id":"1bf03047fc622ff19b87e0b88369a1b64b77c80e"},{"author":{"_account_id":15225,"name":"Deepti Ramakrishna","email":"deepti.ramakrishna@intel.com","username":"dramakri"},"change_message_id":"21d3247c704870e77aab4f278612a8a075e99486","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                    {\u0027requested_count\u0027: requested_count,"},{"line_number":148,"context_line":"                     \u0027max_count\u0027: max_redelegation_count})"},{"line_number":149,"context_line":"            # Decline remaining_uses"},{"line_number":150,"context_line":"            if trust.get(\u0027remaining_uses\u0027, None) is not None:"},{"line_number":151,"context_line":"                raise exception.ValidationError("},{"line_number":152,"context_line":"                    _(\u0027remaining_uses must not be set if redelegation is \u0027"},{"line_number":153,"context_line":"                      \u0027allowed\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_fc476075","line":150,"in_reply_to":"9a41bdd9_d7a369b0","updated":"2015-07-16 17:38:06.000000000","message":"The two conditions are different. The original one ensures that \u0027remaining_uses\u0027 is not even defined in the trust. My change allows it being defined as long as it is set to None. In the spec, a value of \u0027None\u0027 is the same as unlimited. So, this slight relaxation is still consistent with the spec.\n\nI simplified the check as per Dave\u0027s comment but it is still different from the original condition as explained above.\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\n$ python\n\nPython 2.7.6 (default, Jun 22 2015, 17:58:13)\n\n[GCC 4.8.2] on linux2\n\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\n\u003e\u003e\u003e trust\u003ddict()\n\n\u003e\u003e\u003e trust[\u0027remaining_uses\u0027] \u003d None\n\n\u003e\u003e\u003e if \u0027remaining_uses\u0027 in trust:\n\n...    print \"Original condition raises Exception\"\n\n...\n\nOriginal condition raises Exception\n\n\u003e\u003e\u003e if trust.get(\u0027remaining_uses\u0027) is not None:\n\n...    print \"New condition raises Exception\"\n\n...\n\n\u003e\u003e\u003e","commit_id":"1bf03047fc622ff19b87e0b88369a1b64b77c80e"}]}
