)]}'
{"examples/pki/cms/auth_token_scoped.json":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"212ae9e1126fff421674cff9ec84263e46328ce5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{\"access\": {\"serviceCatalog\": [{\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:8776/v1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"region\": \"regionOne\", \"internalURL\": \"http://127.0.0.1:8776/v1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"publicURL\": \"http://127.0.0.1:8776/v1/64b6f3fbcc53435e8a60fcf89bb6617a\"}], \"endpoints_links\": [], \"type\": \"volume\", \"name\": \"volume\"}, {\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:9292/v1\", \"region\": \"regionOne\", \"internalURL\": \"http://127.0.0.1:9292/v1\", \"publicURL\": \"http://127.0.0.1:9292/v1\"}], \"endpoints_links\": [], \"type\": \"image\", \"name\": \"glance\"}, {\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:8774/v1.1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"region\": \"regionOne\", \"internalURL\": \"http://127.0.0.1:8774/v1.1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"publicURL\": \"http://127.0.0.1:8774/v1.1/64b6f3fbcc53435e8a60fcf89bb6617a\"}], \"endpoints_links\": [], \"type\": \"compute\", \"name\": \"nova\"}, {\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:35357/v2.0\", \"region\": \"RegionOne\", \"internalURL\": \"http://127.0.0.1:35357/v2.0\", \"publicURL\": \"http://127.0.0.1:5000/v2.0\"}], \"endpoints_links\": [], \"type\": \"identity\", \"name\": \"keystone\"}],\"token\": {\"expires\": \"2038-01-18T21:14:07Z\", \"issued_at\": \"2000-01-18T21:14:07Z\", \"id\": \"placeholder\", \"tenant\": {\"enabled\": true, \"description\": null, \"name\": \"tenant_name1\", \"id\": \"tenant_id1\"}}, \"user\": {\"username\": \"user_name1\", \"roles_links\": [\"role1\",\"role2\"], \"id\": \"user_id1\", \"roles\": [{\"name\": \"role1\"}, {\"name\": \"role2\"}], \"name\": \"user_name1\"}}}"}],"source_content_type":"application/json","patch_set":24,"id":"baada198_54db797b","line":1,"updated":"2014-07-11 14:26:08.000000000","message":"Could you submit this json file in a nicer format? it\u0027s a bit hard to read if it\u0027s in one line","commit_id":"0990e0522c90401ee0030bb2bd348af48c2a5346"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"0e25436423e144f9e87be1eb1c81b172cf344728","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{\"access\": {\"serviceCatalog\": [{\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:8776/v1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"region\": \"regionOne\", \"internalURL\": \"http://127.0.0.1:8776/v1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"publicURL\": \"http://127.0.0.1:8776/v1/64b6f3fbcc53435e8a60fcf89bb6617a\"}], \"endpoints_links\": [], \"type\": \"volume\", \"name\": \"volume\"}, {\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:9292/v1\", \"region\": \"regionOne\", \"internalURL\": \"http://127.0.0.1:9292/v1\", \"publicURL\": \"http://127.0.0.1:9292/v1\"}], \"endpoints_links\": [], \"type\": \"image\", \"name\": \"glance\"}, {\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:8774/v1.1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"region\": \"regionOne\", \"internalURL\": \"http://127.0.0.1:8774/v1.1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"publicURL\": \"http://127.0.0.1:8774/v1.1/64b6f3fbcc53435e8a60fcf89bb6617a\"}], \"endpoints_links\": [], \"type\": \"compute\", \"name\": \"nova\"}, {\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:35357/v2.0\", \"region\": \"RegionOne\", \"internalURL\": \"http://127.0.0.1:35357/v2.0\", \"publicURL\": \"http://127.0.0.1:5000/v2.0\"}], \"endpoints_links\": [], \"type\": \"identity\", \"name\": \"keystone\"}],\"token\": {\"expires\": \"2038-01-18T21:14:07Z\", \"issued_at\": \"2000-01-18T21:14:07Z\", \"id\": \"placeholder\", \"tenant\": {\"enabled\": true, \"description\": null, \"name\": \"tenant_name1\", \"id\": \"tenant_id1\"}}, \"user\": {\"username\": \"user_name1\", \"roles_links\": [\"role1\",\"role2\"], \"id\": \"user_id1\", \"roles\": [{\"name\": \"role1\"}, {\"name\": \"role2\"}], \"name\": \"user_name1\"}}}"}],"source_content_type":"application/json","patch_set":29,"id":"baada198_7a3a1cce","line":1,"updated":"2014-07-18 20:22:47.000000000","message":"(NIT):I would prefer this to be the human-readable format (pretty printed) like the auth_v3_token_scoped.json (next file). \n\nThis can be done as a subsequent patch.","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{\"access\": {\"serviceCatalog\": [{\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:8776/v1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"region\": \"regionOne\", \"internalURL\": \"http://127.0.0.1:8776/v1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"publicURL\": \"http://127.0.0.1:8776/v1/64b6f3fbcc53435e8a60fcf89bb6617a\"}], \"endpoints_links\": [], \"type\": \"volume\", \"name\": \"volume\"}, {\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:9292/v1\", \"region\": \"regionOne\", \"internalURL\": \"http://127.0.0.1:9292/v1\", \"publicURL\": \"http://127.0.0.1:9292/v1\"}], \"endpoints_links\": [], \"type\": \"image\", \"name\": \"glance\"}, {\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:8774/v1.1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"region\": \"regionOne\", \"internalURL\": \"http://127.0.0.1:8774/v1.1/64b6f3fbcc53435e8a60fcf89bb6617a\", \"publicURL\": \"http://127.0.0.1:8774/v1.1/64b6f3fbcc53435e8a60fcf89bb6617a\"}], \"endpoints_links\": [], \"type\": \"compute\", \"name\": \"nova\"}, {\"endpoints\": [{\"adminURL\": \"http://127.0.0.1:35357/v2.0\", \"region\": \"RegionOne\", \"internalURL\": \"http://127.0.0.1:35357/v2.0\", \"publicURL\": \"http://127.0.0.1:5000/v2.0\"}], \"endpoints_links\": [], \"type\": \"identity\", \"name\": \"keystone\"}],\"token\": {\"expires\": \"2038-01-18T21:14:07Z\", \"issued_at\": \"2000-01-18T21:14:07Z\", \"id\": \"placeholder\", \"tenant\": {\"enabled\": true, \"description\": null, \"name\": \"tenant_name1\", \"id\": \"tenant_id1\"}}, \"user\": {\"username\": \"user_name1\", \"roles_links\": [\"role1\",\"role2\"], \"id\": \"user_id1\", \"roles\": [{\"name\": \"role1\"}, {\"name\": \"role2\"}], \"name\": \"user_name1\"}}}"}],"source_content_type":"application/json","patch_set":29,"id":"baada198_01dd2914","line":1,"in_reply_to":"baada198_7a3a1cce","updated":"2014-07-19 19:15:51.000000000","message":"I will go through and make all the json objects human readable in another cleanup commit.","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"}],"examples/responses/revocation_events.json":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cff99f2fb3d58d85f5da915db38b4fbb3fba12b8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{\"events\": ["},{"line_number":2,"context_line":"    {"},{"line_number":3,"context_line":"        \"user_id\": \"7f18776c00f94734953fb276ab5da83e\","},{"line_number":4,"context_line":"        \"domain_id\": \"default\","}],"source_content_type":"application/json","patch_set":26,"id":"baada198_8e17bded","line":1,"updated":"2014-07-11 16:11:51.000000000","message":"Can this be nested like here: https://github.com/openstack/identity-api/blob/master/v3/src/markdown/identity-api-v3.md#nested-collections\n\n\n    {\n        \"events\": [ \n        ....\n        ....\n        ]\n    }","commit_id":"488f39c720bce8cb9545ac13ebaec97067816732"}],"examples/scripts/generate_revocation_events.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d3ee2f55a3ca8af00f128d6915d7d94c12a66fd0","unresolved":false,"context_lines":[{"line_number":14,"context_line":"from keystoneclient.common import cms"},{"line_number":15,"context_line":"from keystoneclient.openstack.common import jsonutils"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"#assumes initialize keystone has been run."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"#usernames randomly selected from a list of on the most popular last names"},{"line_number":20,"context_line":"usernames \u003d [\u0027astanley\u0027, \u0027chess\u0027, \u0027cli\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2Bosc%3D","line":17,"updated":"2014-03-25 13:22:51.000000000","message":"space after #","commit_id":"bf80d7928c63607ce9f75cf0bf825259e1b6c3e8"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d3ee2f55a3ca8af00f128d6915d7d94c12a66fd0","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"#assumes initialize keystone has been run."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"#usernames randomly selected from a list of on the most popular last names"},{"line_number":20,"context_line":"usernames \u003d [\u0027astanley\u0027, \u0027chess\u0027, \u0027cli\u0027,"},{"line_number":21,"context_line":"             \u0027mstevens\u0027, \u0027ofox\u0027, \u0027odunn\u0027,"},{"line_number":22,"context_line":"             \u0027ohart\u0027, \u0027pray\u0027, \u0027qlane\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BosY%3D","line":19,"updated":"2014-03-25 13:22:51.000000000","message":"space after #","commit_id":"bf80d7928c63607ce9f75cf0bf825259e1b6c3e8"}],"keystoneclient/contrib/revoke/model.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d3ee2f55a3ca8af00f128d6915d7d94c12a66fd0","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def revoked_before_cutoff_time():"},{"line_number":109,"context_line":"    return timeutils.utcnow() - datetime.timedelta(hours\u003d2)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def attr_keys(event):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2Boqs%3D","line":109,"updated":"2014-03-25 13:22:51.000000000","message":"should hours be configurable, or can a comment be added to explain the reasoning behind using 2 hours?","commit_id":"bf80d7928c63607ce9f75cf0bf825259e1b6c3e8"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d3ee2f55a3ca8af00f128d6915d7d94c12a66fd0","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        revoke_map \u003d self.revoke_map"},{"line_number":142,"context_line":"        for key in attr_keys(event):"},{"line_number":143,"context_line":"            revoke_map \u003d revoke_map.setdefault(key, {})"},{"line_number":144,"context_line":"        revoke_map[\u0027issued_before\u0027] \u003d max("},{"line_number":145,"context_line":"            event.issued_before, revoke_map.get("},{"line_number":146,"context_line":"                \u0027issued_before\u0027, event.issued_before))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2Bopc%3D","line":143,"updated":"2014-03-25 13:22:51.000000000","message":"does the dictionary have to be reassigned to a new var? Why wouldn\u0027t\n\n    for key in attr_keys(event): \n        revoke_map.setdefault(key, {})\n\nwork?","commit_id":"bf80d7928c63607ce9f75cf0bf825259e1b6c3e8"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d3ee2f55a3ca8af00f128d6915d7d94c12a66fd0","unresolved":false,"context_lines":[{"line_number":369,"context_line":"    if version \u003d\u003d V3:"},{"line_number":370,"context_line":"        return _build_token_values_v3(token)"},{"line_number":371,"context_line":"    #Should never reach here, as the exception would be thrown"},{"line_number":372,"context_line":"    #by _get_token_version"},{"line_number":373,"context_line":"    raise exceptions.UnsupportedTokenVersionException()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2Borg%3D","line":372,"updated":"2014-03-25 13:22:51.000000000","message":"missing spaces after #","commit_id":"bf80d7928c63607ce9f75cf0bf825259e1b6c3e8"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1d8e8b54e0684b7e5dc3f4d844ace55c0a6b1591","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        return _build_token_values_v2(token, \u0027default\u0027)"},{"line_number":370,"context_line":"    if version \u003d\u003d V3:"},{"line_number":371,"context_line":"        return _build_token_values_v3(token)"},{"line_number":372,"context_line":"    #Should never reach here, as the exception would be thrown"},{"line_number":373,"context_line":"    #by _get_token_version"},{"line_number":374,"context_line":"    raise exceptions.UnsupportedTokenVersionException()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2Fb2Y%3D","line":372,"updated":"2014-04-21 20:26:42.000000000","message":"missing space between # and comment.","commit_id":"a36a02df5b5041bd4303e86a531db5a2b9344209"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7b4b03e28cf59d983a0451d0aba3f31633ca6b39","unresolved":false,"context_lines":[{"line_number":8,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import datetime"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FJhE%3D","line":11,"updated":"2014-04-23 17:23:14.000000000","message":"Spacing in the copyright is different than other new files in this commit.","commit_id":"97df303bf255b04a95aaed6fb540a89e29353af8"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"59b9595457dc0586439dda892a8d88b79130aed2","unresolved":false,"context_lines":[{"line_number":8,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import datetime"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FCb0%3D","line":11,"in_reply_to":"AAAAXH%2F%2FJhE%3D","updated":"2014-04-24 13:40:16.000000000","message":"both variations already seem to be fairly prevalent unfortunately","commit_id":"97df303bf255b04a95aaed6fb540a89e29353af8"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"59b9595457dc0586439dda892a8d88b79130aed2","unresolved":false,"context_lines":[{"line_number":22,"context_line":"# TODO(ayoung): This Should be in token."},{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"},{"line_number":24,"context_line":"V3 \u003d \u0027v3.0\u0027"},{"line_number":25,"context_line":"VERSIONS \u003d frozenset([V2, V3])"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# The set of attributes common between the RevokeEvent"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FCac%3D","line":25,"updated":"2014-04-24 13:40:16.000000000","message":"these don\u0027t appear to be used anyway - remove them","commit_id":"97df303bf255b04a95aaed6fb540a89e29353af8"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"b5ed66c6eeb10ea1d29fb911eda50dd25672be82","unresolved":false,"context_lines":[{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"},{"line_number":24,"context_line":"V3 \u003d \u0027v3.0\u0027"},{"line_number":25,"context_line":"VERSIONS \u003d frozenset([V2, V3])"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# The set of attributes common between the RevokeEvent"},{"line_number":29,"context_line":"# and the dictionaries created from the token Data."}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXX%2F%2F%2BX8%3D","line":26,"updated":"2014-04-24 22:27:28.000000000","message":"See last two functions in this file.","commit_id":"97df303bf255b04a95aaed6fb540a89e29353af8"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b980ebb7dee0f3859103f16826dbc83398793b15","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    The Tree is an index to quickly match tokens against events."},{"line_number":121,"context_line":"    Each node is a hashtable of key\u003dvalue combinations from revocation events."},{"line_number":122,"context_line":"    The"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    \"\"\""},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7adec928_fb80888d","line":122,"updated":"2014-05-07 19:44:10.000000000","message":"remove \u0027The\u0027. Unless there is more to add here?","commit_id":"4516e60b2e0def20bc211e84a664098f21a4f324"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b980ebb7dee0f3859103f16826dbc83398793b15","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        Compare the values for each level of the tree with the values from"},{"line_number":187,"context_line":"        the token, accounting for attributes that have alternative"},{"line_number":188,"context_line":"        keys, and for wildcard matches."},{"line_number":189,"context_line":"        if there is a match, continue down the tree."},{"line_number":190,"context_line":"        if there is no match, exit early."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        token_data is a map based on a flattened view of token."}],"source_content_type":"text/x-python","patch_set":12,"id":"7adec928_db210cb6","line":189,"updated":"2014-05-07 19:44:10.000000000","message":"capitalize \u0027if\u0027.","commit_id":"4516e60b2e0def20bc211e84a664098f21a4f324"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b980ebb7dee0f3859103f16826dbc83398793b15","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        the token, accounting for attributes that have alternative"},{"line_number":188,"context_line":"        keys, and for wildcard matches."},{"line_number":189,"context_line":"        if there is a match, continue down the tree."},{"line_number":190,"context_line":"        if there is no match, exit early."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        token_data is a map based on a flattened view of token."},{"line_number":193,"context_line":"        The required fields are:"}],"source_content_type":"text/x-python","patch_set":12,"id":"7adec928_fb2ec8a4","line":190,"updated":"2014-05-07 19:44:10.000000000","message":"same comment here.","commit_id":"4516e60b2e0def20bc211e84a664098f21a4f324"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b980ebb7dee0f3859103f16826dbc83398793b15","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if there is a match, continue down the tree."},{"line_number":190,"context_line":"        if there is no match, exit early."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        token_data is a map based on a flattened view of token."},{"line_number":193,"context_line":"        The required fields are:"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"           \u0027expires_at\u0027,\u0027user_id\u0027, \u0027project_id\u0027, \u0027identity_domain_id\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"7adec928_3b183084","line":192,"updated":"2014-05-07 19:44:10.000000000","message":"and here","commit_id":"4516e60b2e0def20bc211e84a664098f21a4f324"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b980ebb7dee0f3859103f16826dbc83398793b15","unresolved":false,"context_lines":[{"line_number":195,"context_line":"           \u0027expires_at\u0027,\u0027user_id\u0027, \u0027project_id\u0027, \u0027identity_domain_id\u0027,"},{"line_number":196,"context_line":"           \u0027assignment_domain_id\u0027, \u0027trust_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027"},{"line_number":197,"context_line":"           \u0027consumer_id\u0027, \u0027access_token_id\u0027"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        \"\"\""},{"line_number":200,"context_line":"        # Alternative names to be checked in token for every field in"},{"line_number":201,"context_line":"        # revoke tree."}],"source_content_type":"text/x-python","patch_set":12,"id":"7adec928_7e09c62b","line":198,"updated":"2014-05-07 19:44:10.000000000","message":"Docstrings and return value?","commit_id":"4516e60b2e0def20bc211e84a664098f21a4f324"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"8a4660fd330ea54f20227d4e75dc506b1bd5ab27","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        :param token_data:  Data from token flattened into a dictionary"},{"line_number":199,"context_line":"            via build_token_values below into a dictionary."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        :return: True if the Token is revoked, false otherwise."},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        \"\"\""},{"line_number":204,"context_line":"        # Alternative names to be checked in token for every field in"}],"source_content_type":"text/x-python","patch_set":13,"id":"7adec928_c672ab48","line":201,"updated":"2014-05-13 21:20:46.000000000","message":"False*","commit_id":"9caeedd5b32343354e3036dbd3cecdf103663ba0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"530c70ee261a49c4265c158959522a1402069df7","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# TODO(ayoung): This Should be in token."},{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"},{"line_number":24,"context_line":"V3 \u003d \u0027v3.0\u0027"},{"line_number":25,"context_line":"VERSIONS \u003d frozenset([V2, V3])"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_74a133f7","line":24,"updated":"2014-06-12 16:31:14.000000000","message":"does \u0027v3.0\u0027 need to be \u0027v3\u0027?","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"ef5d48c6c6b6e5ad75ae1d5afd06e841295818d3","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# TODO(ayoung): This Should be in token."},{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"},{"line_number":24,"context_line":"V3 \u003d \u0027v3.0\u0027"},{"line_number":25,"context_line":"VERSIONS \u003d frozenset([V2, V3])"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_cdcb39a2","line":24,"in_reply_to":"1ae5cdf2_74a133f7","updated":"2014-06-13 15:02:58.000000000","message":"NO.  It is just a string that is matched later on.  Could be either, but this allows for sub-versions","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"530c70ee261a49c4265c158959522a1402069df7","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                # If there is wildcard node on current level we take it."},{"line_number":221,"context_line":"                bundle.append(tree.get(wildcard))"},{"line_number":222,"context_line":"                if name \u003d\u003d \u0027role_id\u0027:"},{"line_number":223,"context_line":"                    # Roles are very special since token have a list of them"},{"line_number":224,"context_line":"                    # and any one of them will suffice."},{"line_number":225,"context_line":"                    for role_id in token_data.get(\u0027roles\u0027, []):"},{"line_number":226,"context_line":"                        bundle.append(tree.get(\u0027role_id\u003d%s\u0027 % role_id))"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_0f5ffa0f","line":223,"updated":"2014-06-12 16:31:14.000000000","message":"tokens*?","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"43f55f01c6f35ea881e764f8c1d20b9c947cc56b","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                # If there is wildcard node on current level we take it."},{"line_number":221,"context_line":"                bundle.append(tree.get(wildcard))"},{"line_number":222,"context_line":"                if name \u003d\u003d \u0027role_id\u0027:"},{"line_number":223,"context_line":"                    # Roles are very special since token have a list of them"},{"line_number":224,"context_line":"                    # and any one of them will suffice."},{"line_number":225,"context_line":"                    for role_id in token_data.get(\u0027roles\u0027, []):"},{"line_number":226,"context_line":"                        bundle.append(tree.get(\u0027role_id\u003d%s\u0027 % role_id))"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_8d1771a2","line":223,"in_reply_to":"1ae5cdf2_0f5ffa0f","updated":"2014-06-13 15:14:41.000000000","message":"Done","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"530c70ee261a49c4265c158959522a1402069df7","unresolved":false,"context_lines":[{"line_number":242,"context_line":"                # Note that else: branch will not happen after this."},{"line_number":243,"context_line":"                break"},{"line_number":244,"context_line":"            # On the next iteration we walk through collected branches and"},{"line_number":245,"context_line":"            # collect their subbranches."},{"line_number":246,"context_line":"            forest \u003d bundle"},{"line_number":247,"context_line":"        # The last (leaf) level is checked in a special way because we verify"},{"line_number":248,"context_line":"        # issued_at field differently."}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_af5a86ef","line":245,"updated":"2014-06-12 16:31:14.000000000","message":"sub-branches*","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"43f55f01c6f35ea881e764f8c1d20b9c947cc56b","unresolved":false,"context_lines":[{"line_number":242,"context_line":"                # Note that else: branch will not happen after this."},{"line_number":243,"context_line":"                break"},{"line_number":244,"context_line":"            # On the next iteration we walk through collected branches and"},{"line_number":245,"context_line":"            # collect their subbranches."},{"line_number":246,"context_line":"            forest \u003d bundle"},{"line_number":247,"context_line":"        # The last (leaf) level is checked in a special way because we verify"},{"line_number":248,"context_line":"        # issued_at field differently."}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_ad0a6d76","line":245,"in_reply_to":"1ae5cdf2_af5a86ef","updated":"2014-06-13 15:14:41.000000000","message":"Done","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"45c35cc077f5588a3d63d03410a1c08559c3302e","unresolved":false,"context_lines":[{"line_number":8,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import datetime"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_f73aec96","line":11,"updated":"2014-07-10 22:24:57.000000000","message":"unnecessary whitespace change","commit_id":"5699858a8eee2ee8b2f6499ed100fa0a1d70dc05"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"45c35cc077f5588a3d63d03410a1c08559c3302e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# TODO(ayoung): This Should be in token."},{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"},{"line_number":24,"context_line":"V3 \u003d \u0027v3.0\u0027"},{"line_number":25,"context_line":"VERSIONS \u003d frozenset([V2, V3])"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_7746dc22","line":22,"updated":"2014-07-10 22:24:57.000000000","message":"why is it here / why should it be in token? and what is \u0027token\u0027?","commit_id":"5699858a8eee2ee8b2f6499ed100fa0a1d70dc05"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"45c35cc077f5588a3d63d03410a1c08559c3302e","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# The set of attributes common between the RevokeEvent"},{"line_number":29,"context_line":"# and the dictionaries created from the token Data."},{"line_number":30,"context_line":"_NAMES \u003d [\u0027trust_id\u0027,"},{"line_number":31,"context_line":"          \u0027consumer_id\u0027,"},{"line_number":32,"context_line":"          \u0027access_token_id\u0027,"},{"line_number":33,"context_line":"          \u0027expires_at\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_37d544b9","line":30,"updated":"2014-07-10 22:24:57.000000000","message":"rename variable to something more descriptive in another patch","commit_id":"5699858a8eee2ee8b2f6499ed100fa0a1d70dc05"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"45c35cc077f5588a3d63d03410a1c08559c3302e","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            self.revoked_at \u003d timeutils.utcnow()"},{"line_number":74,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":75,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"},{"line_number":76,"context_line":"        self.revoked_at \u003d timeutils.normalize_time(self.revoked_at)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if self.issued_before is None:"},{"line_number":79,"context_line":"            self.issued_before \u003d self.revoked_at"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_37b464d0","line":76,"updated":"2014-07-10 22:24:57.000000000","message":"inline comments explaining the datasources for each of the possible formats/values (string time, None, or ... something else?) would be super helpful","commit_id":"5699858a8eee2ee8b2f6499ed100fa0a1d70dc05"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"45c35cc077f5588a3d63d03410a1c08559c3302e","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        return \"%s\u003d%s\" % (name, getattr(self, name) or \u0027*\u0027)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def revoked_before_cutoff_time():"},{"line_number":110,"context_line":"    return timeutils.utcnow() - datetime.timedelta(hours\u003d2)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_d7dde815","line":109,"updated":"2014-07-10 22:24:57.000000000","message":"this reads as if it\u0027s going to return true/false, but it returns a time delta? docstr! and possibly a function rename","commit_id":"5699858a8eee2ee8b2f6499ed100fa0a1d70dc05"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"45c35cc077f5588a3d63d03410a1c08559c3302e","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                del parent[key]"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def add_events(self, revoke_events):"},{"line_number":178,"context_line":"        events \u003d revoke_events or []"},{"line_number":179,"context_line":"        for event in events:"},{"line_number":180,"context_line":"            self.add_event(event)"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_17368052","line":178,"updated":"2014-07-10 22:24:57.000000000","message":"inline comment or remove: why would revoke_events ever be falsey?","commit_id":"5699858a8eee2ee8b2f6499ed100fa0a1d70dc05"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"45c35cc077f5588a3d63d03410a1c08559c3302e","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            \u0027domain_id\u0027: [\u0027identity_domain_id\u0027, \u0027assignment_domain_id\u0027],"},{"line_number":209,"context_line":"        }"},{"line_number":210,"context_line":"        # Contains current forest (collection of trees) to be checked."},{"line_number":211,"context_line":"        forest \u003d [self.revoke_map]"},{"line_number":212,"context_line":"        # We iterate over every layer of our revoke tree (except the last one)."},{"line_number":213,"context_line":"        for name in _NAMES:"},{"line_number":214,"context_line":"            # Here we will collect branches (subtrees) of every tree in current"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_375e2477","line":211,"updated":"2014-07-10 22:24:57.000000000","message":"separate refactoring from this feature patch?","commit_id":"5699858a8eee2ee8b2f6499ed100fa0a1d70dc05"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"45c35cc077f5588a3d63d03410a1c08559c3302e","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                bundle.append(tree.get(wildcard))"},{"line_number":222,"context_line":"                if name \u003d\u003d \u0027role_id\u0027:"},{"line_number":223,"context_line":"                    # Roles are very special since tokens have a list of them"},{"line_number":224,"context_line":"                    # and any one of them will suffice."},{"line_number":225,"context_line":"                    for role_id in token_data.get(\u0027roles\u0027, []):"},{"line_number":226,"context_line":"                        bundle.append(tree.get(\u0027role_id\u003d%s\u0027 % role_id))"},{"line_number":227,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_974e10c0","line":224,"updated":"2014-07-10 22:24:57.000000000","message":"suffice for what purpose?","commit_id":"5699858a8eee2ee8b2f6499ed100fa0a1d70dc05"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"45c35cc077f5588a3d63d03410a1c08559c3302e","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            # definitelly not in the revoke tree and all further iterations"},{"line_number":240,"context_line":"            # will be for nothing."},{"line_number":241,"context_line":"            if not bundle:"},{"line_number":242,"context_line":"                # Note that else: branch will not happen after this."},{"line_number":243,"context_line":"                break"},{"line_number":244,"context_line":"            # On the next iteration we walk through collected branches and"},{"line_number":245,"context_line":"            # collect their sub-branches."}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_17a04042","line":242,"updated":"2014-07-10 22:24:57.000000000","message":"which \u0027else\u0027 branch is not immediately clear","commit_id":"5699858a8eee2ee8b2f6499ed100fa0a1d70dc05"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"45c35cc077f5588a3d63d03410a1c08559c3302e","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                    # But if it does, we throw away tokens that conform it."},{"line_number":255,"context_line":"                    if issued_before \u003e token_data[\u0027issued_at\u0027]:"},{"line_number":256,"context_line":"                        return True"},{"line_number":257,"context_line":"        # If we made it out of the loop then no element in revokation tree"},{"line_number":258,"context_line":"        # corresponds to our token and it is good."},{"line_number":259,"context_line":"        return False"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_17b76087","line":257,"updated":"2014-07-10 22:24:57.000000000","message":"maybe keep the correct spelling","commit_id":"5699858a8eee2ee8b2f6499ed100fa0a1d70dc05"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c0cb294ca68a97d8f3e630d163d8025157551988","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# TODO(ayoung): This Should be in token."},{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"},{"line_number":24,"context_line":"V3 \u003d \u0027v3.0\u0027"},{"line_number":25,"context_line":"VERSIONS \u003d frozenset([V2, V3])"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_62d61cc5","line":22,"updated":"2014-07-10 22:55:19.000000000","message":"should*","commit_id":"a477cb52fdd462e35c20c15b622f136e79a07c31"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c0cb294ca68a97d8f3e630d163d8025157551988","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# The set of attributes common between the RevokeEvent"},{"line_number":29,"context_line":"# and the dictionaries created from the token Data."},{"line_number":30,"context_line":"_NAMES \u003d [\u0027trust_id\u0027,"},{"line_number":31,"context_line":"          \u0027consumer_id\u0027,"},{"line_number":32,"context_line":"          \u0027access_token_id\u0027,"},{"line_number":33,"context_line":"          \u0027expires_at\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_c2636818","line":30,"updated":"2014-07-10 22:55:19.000000000","message":"rename this to something a little more descriptive: \n\n    _ATTR_NAMES\n\nfor example.","commit_id":"a477cb52fdd462e35c20c15b622f136e79a07c31"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c0cb294ca68a97d8f3e630d163d8025157551988","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def revoked_before_cutoff_time():"},{"line_number":110,"context_line":"    return timeutils.utcnow() - datetime.timedelta(hours\u003d2)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"def attr_keys(event):"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_023c80e1","line":110,"updated":"2014-07-10 22:55:19.000000000","message":"See Dolph\u0027s previous comments on this file from patch set 21. \n\nWe can rename this method to be something a little more descriptive of the logic. The current name makes it seem like this is a method that returns a boolean, when we\u0027re actually returning a datetime object.","commit_id":"a477cb52fdd462e35c20c15b622f136e79a07c31"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"212ae9e1126fff421674cff9ec84263e46328ce5","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        # need to be normalized so that they can be compared consistantly."},{"line_number":77,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":78,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"},{"line_number":79,"context_line":"        self.revoked_at \u003d timeutils.normalize_time(self.revoked_at)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        if self.issued_before is None:"},{"line_number":82,"context_line":"            self.issued_before \u003d self.revoked_at"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_54cc5989","line":79,"updated":"2014-07-11 14:26:08.000000000","message":"I see this duplicated, could this be a separate function?","commit_id":"0990e0522c90401ee0030bb2bd348af48c2a5346"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cff99f2fb3d58d85f5da915db38b4fbb3fba12b8","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# TODO(ayoung): This Should be in token."},{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"},{"line_number":24,"context_line":"V3 \u003d \u0027v3.0\u0027"},{"line_number":25,"context_line":"VERSIONS \u003d frozenset([V2, V3])"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_2ee071f9","line":22,"updated":"2014-07-11 16:11:51.000000000","message":"should*","commit_id":"488f39c720bce8cb9545ac13ebaec97067816732"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cff99f2fb3d58d85f5da915db38b4fbb3fba12b8","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# The set of attributes common between the RevokeEvent"},{"line_number":29,"context_line":"# and the dictionaries created from the token Data."},{"line_number":30,"context_line":"_NAMES \u003d [\u0027trust_id\u0027,"},{"line_number":31,"context_line":"          \u0027consumer_id\u0027,"},{"line_number":32,"context_line":"          \u0027access_token_id\u0027,"},{"line_number":33,"context_line":"          \u0027expires_at\u0027,"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_ae99e17a","line":30,"updated":"2014-07-11 16:11:51.000000000","message":"See comments from patch set 21","commit_id":"488f39c720bce8cb9545ac13ebaec97067816732"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cff99f2fb3d58d85f5da915db38b4fbb3fba12b8","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":75,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"},{"line_number":76,"context_line":"        self.revoked_at \u003d timeutils.normalize_time(self.revoked_at)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if self.issued_before is None:"},{"line_number":79,"context_line":"            self.issued_before \u003d self.revoked_at"},{"line_number":80,"context_line":"        elif isinstance(self.issued_before, six.text_type):"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_ee8e792d","line":77,"updated":"2014-07-11 16:11:51.000000000","message":"see comments from patch set 21","commit_id":"488f39c720bce8cb9545ac13ebaec97067816732"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cff99f2fb3d58d85f5da915db38b4fbb3fba12b8","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        return \"%s\u003d%s\" % (name, getattr(self, name) or \u0027*\u0027)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def revoked_before_cutoff_time():"},{"line_number":110,"context_line":"    return timeutils.utcnow() - datetime.timedelta(hours\u003d2)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_cebb75e3","line":109,"updated":"2014-07-11 16:11:51.000000000","message":"See comments from previous patch set 21","commit_id":"488f39c720bce8cb9545ac13ebaec97067816732"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cff99f2fb3d58d85f5da915db38b4fbb3fba12b8","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def add_events(self, revoke_events):"},{"line_number":178,"context_line":"        events \u003d revoke_events or []"},{"line_number":179,"context_line":"        for event in events:"},{"line_number":180,"context_line":"            self.add_event(event)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def is_revoked(self, token_data):"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_6e7a6925","line":179,"updated":"2014-07-11 16:11:51.000000000","message":"see comments from patch set 21","commit_id":"488f39c720bce8cb9545ac13ebaec97067816732"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cff99f2fb3d58d85f5da915db38b4fbb3fba12b8","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        }"},{"line_number":210,"context_line":"        # Contains current forest (collection of trees) to be checked."},{"line_number":211,"context_line":"        partial_matches \u003d [self.revoke_map]"},{"line_number":212,"context_line":"        # We iterate over every layer of our revoke tree (except the last one)."},{"line_number":213,"context_line":"        for name in _NAMES:"},{"line_number":214,"context_line":"            # bundle is the set of partial matches for the next level down"},{"line_number":215,"context_line":"            # the tree"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_ce90d545","line":212,"updated":"2014-07-11 16:11:51.000000000","message":"see comments from patch set 21","commit_id":"488f39c720bce8cb9545ac13ebaec97067816732"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cff99f2fb3d58d85f5da915db38b4fbb3fba12b8","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                bundle.append(tree.get(wildcard))"},{"line_number":222,"context_line":"                if name \u003d\u003d \u0027role_id\u0027:"},{"line_number":223,"context_line":"                    # Roles are very special since a token has a list of them."},{"line_number":224,"context_line":"                    # If the revocation event matches any one of them,"},{"line_number":225,"context_line":"                    # revoke the token."},{"line_number":226,"context_line":"                    for role_id in token_data.get(\u0027roles\u0027, []):"},{"line_number":227,"context_line":"                        bundle.append(tree.get(\u0027role_id\u003d%s\u0027 % role_id))"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_2e9cf15c","line":224,"updated":"2014-07-11 16:11:51.000000000","message":"see comments from patch set 21","commit_id":"488f39c720bce8cb9545ac13ebaec97067816732"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ffddc5b77d5f91e879f67d2ed879d16a10613479","unresolved":false,"context_lines":[{"line_number":51,"context_line":"               \u0027trustor_id\u0027,"},{"line_number":52,"context_line":"               \u0027trustee_id\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"REVOKE_KEYS \u003d _ATTR_NAMES + _EVENT_ARGS"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_4e8a05c0","line":54,"updated":"2014-07-11 16:40:57.000000000","message":"an inline comment here explaining how _ATTR_NAMES and _EVENT_ARGS makes up REVOKE_KEYS","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ffddc5b77d5f91e879f67d2ed879d16a10613479","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        for k in REVOKE_KEYS:"},{"line_number":72,"context_line":"            v \u003d kwargs.get(k, None)"},{"line_number":73,"context_line":"            setattr(self, k, v)"},{"line_number":74,"context_line":"        # When a revocation event is first created, initialize revoked_at time"},{"line_number":75,"context_line":"        # to now. If a value for revokend_at is set, it is due to marshalling"},{"line_number":76,"context_line":"        # a previously recorded event."},{"line_number":77,"context_line":"        if self.revoked_at is None:"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_2eb95179","line":74,"updated":"2014-07-11 16:40:57.000000000","message":"s/initialize/update/","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"caae48c2293bc23ec2b2c81c4b600de6787c8276","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        # to now. If a value for revokend_at is set, it is due to marshalling"},{"line_number":76,"context_line":"        # a previously recorded event."},{"line_number":77,"context_line":"        if self.revoked_at is None:"},{"line_number":78,"context_line":"            self.revoked_at \u003d timeutils.utcnow()"},{"line_number":79,"context_line":"        # When marshalling from JSON and Database formats, the dates may not"},{"line_number":80,"context_line":"        # Be in the same format.  Ensure that we are always working with a"},{"line_number":81,"context_line":"        # date in a normalized format."}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_29386b3c","line":78,"updated":"2014-07-11 16:40:28.000000000","message":"if revoked_at is not None, is untested","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ffddc5b77d5f91e879f67d2ed879d16a10613479","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        if self.revoked_at is None:"},{"line_number":78,"context_line":"            self.revoked_at \u003d timeutils.utcnow()"},{"line_number":79,"context_line":"        # When marshalling from JSON and Database formats, the dates may not"},{"line_number":80,"context_line":"        # Be in the same format.  Ensure that we are always working with a"},{"line_number":81,"context_line":"        # date in a normalized format."},{"line_number":82,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":83,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_6eaee92f","line":80,"updated":"2014-07-11 16:40:57.000000000","message":"be*","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"caae48c2293bc23ec2b2c81c4b600de6787c8276","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        # Be in the same format.  Ensure that we are always working with a"},{"line_number":81,"context_line":"        # date in a normalized format."},{"line_number":82,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":83,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"},{"line_number":84,"context_line":"        self.revoked_at \u003d timeutils.normalize_time(self.revoked_at)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        if self.issued_before is None:"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_0933a762","line":83,"updated":"2014-07-11 16:40:28.000000000","message":"this is untested","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ffddc5b77d5f91e879f67d2ed879d16a10613479","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        # Be in the same format.  Ensure that we are always working with a"},{"line_number":81,"context_line":"        # date in a normalized format."},{"line_number":82,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":83,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"},{"line_number":84,"context_line":"        self.revoked_at \u003d timeutils.normalize_time(self.revoked_at)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        if self.issued_before is None:"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_0e42cd67","line":83,"updated":"2014-07-11 16:40:57.000000000","message":"this won\u0027t raise some weird exception will it if it\u0027s not in the right format will it? If so we should catch it here.","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"caae48c2293bc23ec2b2c81c4b600de6787c8276","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        # date in a normalized format."},{"line_number":82,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":83,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"},{"line_number":84,"context_line":"        self.revoked_at \u003d timeutils.normalize_time(self.revoked_at)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        if self.issued_before is None:"},{"line_number":87,"context_line":"            self.issued_before \u003d self.revoked_at"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_6ecc298a","line":84,"updated":"2014-07-11 16:40:28.000000000","message":"This same pattern is twice in the code, just a few lines below, could this be a separate function? for it to be clearer.\nSomething like:\n\nself.revoked_at \u003d self._get_normalized_time(self.revoked_at)\n\n...\n\nself.issued_before \u003d self._get_normalized_time(self.issued_before)","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"caae48c2293bc23ec2b2c81c4b600de6787c8276","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        if self.issued_before is None:"},{"line_number":87,"context_line":"            self.issued_before \u003d self.revoked_at"},{"line_number":88,"context_line":"        elif isinstance(self.issued_before, six.text_type):"},{"line_number":89,"context_line":"            self.issued_before \u003d timeutils.parse_isotime(self.issued_before)"},{"line_number":90,"context_line":"        self.issued_before \u003d timeutils.normalize_time(self.issued_before)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def to_dict(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_891df7c0","line":89,"updated":"2014-07-11 16:40:28.000000000","message":"an else: case for this is untested","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ffddc5b77d5f91e879f67d2ed879d16a10613479","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            self.issued_before \u003d self.revoked_at"},{"line_number":88,"context_line":"        elif isinstance(self.issued_before, six.text_type):"},{"line_number":89,"context_line":"            self.issued_before \u003d timeutils.parse_isotime(self.issued_before)"},{"line_number":90,"context_line":"        self.issued_before \u003d timeutils.normalize_time(self.issued_before)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def to_dict(self):"},{"line_number":93,"context_line":"        keys \u003d [\u0027user_id\u0027,"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_a92e3b8a","line":90,"updated":"2014-07-11 16:40:57.000000000","message":"this is duplicate logic from above, maybe this can be pulled into a separate method and called with self.revoked_at and self.issued_before respectively.","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"caae48c2293bc23ec2b2c81c4b600de6787c8276","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            self.issued_before \u003d timeutils.parse_isotime(self.issued_before)"},{"line_number":90,"context_line":"        self.issued_before \u003d timeutils.normalize_time(self.issued_before)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def to_dict(self):"},{"line_number":93,"context_line":"        keys \u003d [\u0027user_id\u0027,"},{"line_number":94,"context_line":"                \u0027role_id\u0027,"},{"line_number":95,"context_line":"                \u0027domain_id\u0027,"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_a9439bad","line":92,"updated":"2014-07-11 16:40:28.000000000","message":"This whole branch is untested","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ffddc5b77d5f91e879f67d2ed879d16a10613479","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        return \"%s\u003d%s\" % (name, getattr(self, name) or \u0027*\u0027)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def get_revoked_before_cutoff_time():"},{"line_number":118,"context_line":"    return timeutils.utcnow() - datetime.timedelta(hours\u003d2)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_09a3a700","line":117,"updated":"2014-07-11 16:40:57.000000000","message":"docstrings here would be helpful, explaining the 2 hour limit as well.","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ffddc5b77d5f91e879f67d2ed879d16a10613479","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    \"\"\""},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def __init__(self, revoke_events\u003d[]):"},{"line_number":134,"context_line":"        self.revoke_map \u003d dict()"},{"line_number":135,"context_line":"        self.add_events(revoke_events)"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_095647ce","line":133,"updated":"2014-07-11 16:40:57.000000000","message":"why change this from None? Are you sure you want to pass in the same object by default every time this is called without revoke_events set? \n\nhttp://paste.openstack.org/show/86127/\n\nYou can carry the validation of revoke_events in __init__ and check it if was set: \n\n    def __init__(self, revoke_events\u003dNone):\n        if revoke_events is None: \n            revoke_events \u003d []\n        else: \n            # do something with the list that was passed in if needed\n\nIf we keep this as: \n\n    \u003e\u003e\u003e class RevokeTree(object):\n    ...     def __init__(self, revoke_events\u003d[]):\n    ...         self.revoke_tree \u003d revoke_events\n    ...  \n    \u003e\u003e\u003e rt1 \u003d RevokeTree()\n    \u003e\u003e\u003e rt2 \u003d RevokeTree()\n    \u003e\u003e\u003e rt1.revoke_tree\n    [] \n    \u003e\u003e\u003e id(rt1.revoke_tree)\n    45849272\n    \u003e\u003e\u003e id(rt2.revoke_tree)\n    45849272\n\nWe will end up with multiple revoke tree objects referencing the same revoke_events list by default. Is this the intended behavior?","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"caae48c2293bc23ec2b2c81c4b600de6787c8276","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    return token_values"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"def _get_token_version(token_data):"},{"line_number":357,"context_line":"    if token_data and isinstance(token_data, dict):"},{"line_number":358,"context_line":"        if \u0027token_version\u0027 in token_data:"},{"line_number":359,"context_line":"            if token_data[\u0027token_version\u0027] in token.provider.VERSIONS:"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_09580789","line":356,"updated":"2014-07-11 16:40:28.000000000","message":"This function is not properly tested.","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ffddc5b77d5f91e879f67d2ed879d16a10613479","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        if \u0027access\u0027 in token_data:"},{"line_number":366,"context_line":"            return V2"},{"line_number":367,"context_line":"        if \u0027token\u0027 in token_data and \u0027methods\u0027 in token_data[\u0027token\u0027]:"},{"line_number":368,"context_line":"            return V3"},{"line_number":369,"context_line":"    raise exceptions.UnsupportedTokenVersionException()"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_89efb7b0","line":368,"updated":"2014-07-11 16:40:57.000000000","message":"can an else be added here or readability? \n\n    if token_data is a dictionary: \n        # do something useful\n    else:\n        raise an exception","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"caae48c2293bc23ec2b2c81c4b600de6787c8276","unresolved":false,"context_lines":[{"line_number":369,"context_line":"    raise exceptions.UnsupportedTokenVersionException()"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"def build_token_values(token):"},{"line_number":373,"context_line":"    version \u003d _get_token_version(token)"},{"line_number":374,"context_line":"    if version \u003d\u003d V2:"},{"line_number":375,"context_line":"        return _build_token_values_v2(token, \u0027default\u0027)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_295dcb79","line":372,"updated":"2014-07-11 16:40:28.000000000","message":"neither this one.","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ffddc5b77d5f91e879f67d2ed879d16a10613479","unresolved":false,"context_lines":[{"line_number":373,"context_line":"    version \u003d _get_token_version(token)"},{"line_number":374,"context_line":"    if version \u003d\u003d V2:"},{"line_number":375,"context_line":"        return _build_token_values_v2(token, \u0027default\u0027)"},{"line_number":376,"context_line":"    if version \u003d\u003d V3:"},{"line_number":377,"context_line":"        return _build_token_values_v3(token)"},{"line_number":378,"context_line":"    # Should never reach here, as the exception would be thrown"},{"line_number":379,"context_line":"    # by _get_token_version"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_c9c8cf24","line":376,"updated":"2014-07-11 16:40:57.000000000","message":"this should be an elif?","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ffddc5b77d5f91e879f67d2ed879d16a10613479","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        return _build_token_values_v3(token)"},{"line_number":378,"context_line":"    # Should never reach here, as the exception would be thrown"},{"line_number":379,"context_line":"    # by _get_token_version"},{"line_number":380,"context_line":"    raise exceptions.UnsupportedTokenVersionException()"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_e9667350","line":380,"updated":"2014-07-11 16:40:57.000000000","message":"same comment here as above.","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"baa5d8e5d27691b68cfe576806313c397910d27a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import datetime"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import six"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_42618310","line":12,"updated":"2014-07-15 19:48:41.000000000","message":"datetime is no longer used after removing \tdef get_revoked_before_cutoff_time():","commit_id":"c3e51c47f75a2e07c6e710d22428aecd3e48c43d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"cfb75ff035d150704d76909cfd872e119a830aae","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    if token_data and isinstance(token_data, dict):"},{"line_number":354,"context_line":"        if \u0027token_version\u0027 in token_data:"},{"line_number":355,"context_line":"            if token_data[\u0027token_version\u0027] in token.provider.VERSIONS:"},{"line_number":356,"context_line":"                return token_data[\u0027token_version\u0027]"},{"line_number":357,"context_line":"        # FIXME(morganfainberg): deprecate the following logic in future"},{"line_number":358,"context_line":"        # revisions. It is better to just specify the token_version in"},{"line_number":359,"context_line":"        # the token_data itself. This way we can support future versions"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_103e5f8c","line":356,"updated":"2014-07-11 19:49:00.000000000","message":"I would prefer if this was tested.","commit_id":"c3e51c47f75a2e07c6e710d22428aecd3e48c43d"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"087d6d721ad13ce38675745a1ccbad825a41a6e3","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# TODO(ayoung): These costants should be moved to AccessInfo, and then the"},{"line_number":21,"context_line":"# Revoke Tree should expect an AccessInfo, not a dictionary, to unify how we"},{"line_number":22,"context_line":"# represetn token Data in Python code."},{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_184e8138","line":20,"updated":"2014-07-19 04:42:08.000000000","message":"s/costants/constants","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# TODO(ayoung): These costants should be moved to AccessInfo, and then the"},{"line_number":21,"context_line":"# Revoke Tree should expect an AccessInfo, not a dictionary, to unify how we"},{"line_number":22,"context_line":"# represetn token Data in Python code."},{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_81f7798b","line":20,"in_reply_to":"baada198_184e8138","updated":"2014-07-19 19:15:51.000000000","message":"Done","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11717,"name":"Ryan Oshima","email":"ryan.oshima@hp.com","username":"RyanOshima"},"change_message_id":"a72b88acfd1a45930bfd9ee54327202c98293390","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# TODO(ayoung): These costants should be moved to AccessInfo, and then the"},{"line_number":21,"context_line":"# Revoke Tree should expect an AccessInfo, not a dictionary, to unify how we"},{"line_number":22,"context_line":"# represetn token Data in Python code."},{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"},{"line_number":24,"context_line":"V3 \u003d \u0027v3.0\u0027"},{"line_number":25,"context_line":"VERSIONS \u003d frozenset([V2, V3])"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_24e9661a","line":22,"updated":"2014-07-18 23:09:14.000000000","message":"\"represtn\"-\u003e\"represent","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# TODO(ayoung): These costants should be moved to AccessInfo, and then the"},{"line_number":21,"context_line":"# Revoke Tree should expect an AccessInfo, not a dictionary, to unify how we"},{"line_number":22,"context_line":"# represetn token Data in Python code."},{"line_number":23,"context_line":"V2 \u003d \u0027v2.0\u0027"},{"line_number":24,"context_line":"V3 \u003d \u0027v3.0\u0027"},{"line_number":25,"context_line":"VERSIONS \u003d frozenset([V2, V3])"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_a1f47d87","line":22,"in_reply_to":"baada198_24e9661a","updated":"2014-07-19 19:15:51.000000000","message":"Done","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"087d6d721ad13ce38675745a1ccbad825a41a6e3","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            v \u003d kwargs.get(k, None)"},{"line_number":71,"context_line":"            setattr(self, k, v)"},{"line_number":72,"context_line":"        # When a revocation event is first created, initialize revoked_at time"},{"line_number":73,"context_line":"        # to now. If a value for revokend_at is set, it is due to marshalling"},{"line_number":74,"context_line":"        # a previously recorded event."},{"line_number":75,"context_line":"        if self.revoked_at is None:"},{"line_number":76,"context_line":"            self.revoked_at \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_385ee5e9","line":73,"updated":"2014-07-19 04:42:08.000000000","message":"s/revokend_at/revoked_at","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            v \u003d kwargs.get(k, None)"},{"line_number":71,"context_line":"            setattr(self, k, v)"},{"line_number":72,"context_line":"        # When a revocation event is first created, initialize revoked_at time"},{"line_number":73,"context_line":"        # to now. If a value for revokend_at is set, it is due to marshalling"},{"line_number":74,"context_line":"        # a previously recorded event."},{"line_number":75,"context_line":"        if self.revoked_at is None:"},{"line_number":76,"context_line":"            self.revoked_at \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_21306d55","line":73,"in_reply_to":"baada198_385ee5e9","updated":"2014-07-19 19:15:51.000000000","message":"Done","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"087d6d721ad13ce38675745a1ccbad825a41a6e3","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if self.revoked_at is None:"},{"line_number":76,"context_line":"            self.revoked_at \u003d timeutils.utcnow()"},{"line_number":77,"context_line":"        # When marshalling from JSON and Database formats, the dates may not"},{"line_number":78,"context_line":"        # Be in the same format.  Ensure that we are always working with a"},{"line_number":79,"context_line":"        # date in a normalized format."},{"line_number":80,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":81,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_9859b1ff","line":78,"updated":"2014-07-19 04:42:08.000000000","message":"s/Be/be","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if self.revoked_at is None:"},{"line_number":76,"context_line":"            self.revoked_at \u003d timeutils.utcnow()"},{"line_number":77,"context_line":"        # When marshalling from JSON and Database formats, the dates may not"},{"line_number":78,"context_line":"        # Be in the same format.  Ensure that we are always working with a"},{"line_number":79,"context_line":"        # date in a normalized format."},{"line_number":80,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":81,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_4131e157","line":78,"in_reply_to":"baada198_9859b1ff","updated":"2014-07-19 19:15:51.000000000","message":"Done","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"fa5c9d285be9559182e9d6018b889f239dd2cbb6","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        # date in a normalized format."},{"line_number":80,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":81,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"},{"line_number":82,"context_line":"        self.revoked_at \u003d timeutils.normalize_time(self.revoked_at)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if self.issued_before is None:"},{"line_number":85,"context_line":"            self.issued_before \u003d self.revoked_at"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_79b9d1ca","line":82,"updated":"2014-07-16 04:10:15.000000000","message":"This pattern repeats itself just below. It would be nice to have it as a function.","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"0c1413ac9908c08f3f56f9bf0f55ba25cce4c60f","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        # date in a normalized format."},{"line_number":80,"context_line":"        elif isinstance(self.revoked_at, six.text_type):"},{"line_number":81,"context_line":"            self.revoked_at \u003d timeutils.parse_isotime(self.revoked_at)"},{"line_number":82,"context_line":"        self.revoked_at \u003d timeutils.normalize_time(self.revoked_at)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if self.issued_before is None:"},{"line_number":85,"context_line":"            self.issued_before \u003d self.revoked_at"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_5aebeddb","line":82,"in_reply_to":"baada198_79b9d1ca","updated":"2014-07-17 02:35:10.000000000","message":"the function would be longer than the repeated code.","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"0e25436423e144f9e87be1eb1c81b172cf344728","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def __init__(self, revoke_events\u003d[]):"},{"line_number":128,"context_line":"        self.revoke_map \u003d dict()"},{"line_number":129,"context_line":"        self.add_events(revoke_events)"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_fa746c9d","line":127,"updated":"2014-07-18 20:22:47.000000000","message":"This should not be changed from None as that introduces a mutible default argument. Please change this back to None and add this at the startof the method:\n\n    if revoke_events is None:\n        revoke_events \u003d []\n\nUnless we have a real reason this should be a mutable default.","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def __init__(self, revoke_events\u003d[]):"},{"line_number":128,"context_line":"        self.revoke_map \u003d dict()"},{"line_number":129,"context_line":"        self.add_events(revoke_events)"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_c14411ba","line":127,"in_reply_to":"baada198_fa746c9d","updated":"2014-07-19 19:15:51.000000000","message":"Done","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"0e25436423e144f9e87be1eb1c81b172cf344728","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def add_events(self, revoke_events):"},{"line_number":180,"context_line":"        for event in revoke_events:"},{"line_number":181,"context_line":"            self.add_event(event)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def is_revoked(self, token_data):"},{"line_number":184,"context_line":"        \"\"\"Check if a token matches the revocation event"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_ba5e7411","line":181,"updated":"2014-07-18 20:22:47.000000000","message":"Why change this? This could be changed back and my previous comment about setting the revoke events to [] on \"None\" could be ignored.\n\nSuggest revert this and revert the change on 127","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def add_events(self, revoke_events):"},{"line_number":180,"context_line":"        for event in revoke_events:"},{"line_number":181,"context_line":"            self.add_event(event)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def is_revoked(self, token_data):"},{"line_number":184,"context_line":"        \"\"\"Check if a token matches the revocation event"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_41cd612f","line":181,"in_reply_to":"baada198_ba5e7411","updated":"2014-07-19 19:15:51.000000000","message":"Done","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"087d6d721ad13ce38675745a1ccbad825a41a6e3","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        the token, accounting for attributes that have alternative"},{"line_number":188,"context_line":"        keys, and for wildcard matches."},{"line_number":189,"context_line":"        If there is a match, continue down the tree."},{"line_number":190,"context_line":"        If there is no match, exit early."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        token_data is a map based on a flattened view of token."},{"line_number":193,"context_line":"        The required fields are:"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_b8711579","line":190,"updated":"2014-07-19 04:42:08.000000000","message":"nit: Change to: \"Otherwise, if there is no match, exit early.\"","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        the token, accounting for attributes that have alternative"},{"line_number":188,"context_line":"        keys, and for wildcard matches."},{"line_number":189,"context_line":"        If there is a match, continue down the tree."},{"line_number":190,"context_line":"        If there is no match, exit early."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        token_data is a map based on a flattened view of token."},{"line_number":193,"context_line":"        The required fields are:"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_41080180","line":190,"in_reply_to":"baada198_b8711579","updated":"2014-07-19 19:15:51.000000000","message":"Done","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"087d6d721ad13ce38675745a1ccbad825a41a6e3","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        token_data is a map based on a flattened view of token."},{"line_number":193,"context_line":"        The required fields are:"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"           \u0027expires_at\u0027,\u0027user_id\u0027, \u0027project_id\u0027, \u0027identity_domain_id\u0027,"},{"line_number":196,"context_line":"           \u0027assignment_domain_id\u0027, \u0027trust_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027"},{"line_number":197,"context_line":"           \u0027consumer_id\u0027, \u0027access_token_id\u0027"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_380505c2","line":195,"updated":"2014-07-19 04:42:08.000000000","message":"add space for consistency between first two entries","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        token_data is a map based on a flattened view of token."},{"line_number":193,"context_line":"        The required fields are:"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"           \u0027expires_at\u0027,\u0027user_id\u0027, \u0027project_id\u0027, \u0027identity_domain_id\u0027,"},{"line_number":196,"context_line":"           \u0027assignment_domain_id\u0027, \u0027trust_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027"},{"line_number":197,"context_line":"           \u0027consumer_id\u0027, \u0027access_token_id\u0027"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_0160c933","line":195,"in_reply_to":"baada198_380505c2","updated":"2014-07-19 19:15:51.000000000","message":"Done","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"087d6d721ad13ce38675745a1ccbad825a41a6e3","unresolved":false,"context_lines":[{"line_number":196,"context_line":"           \u0027assignment_domain_id\u0027, \u0027trust_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027"},{"line_number":197,"context_line":"           \u0027consumer_id\u0027, \u0027access_token_id\u0027"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        :param token_data:  Data from token flattened into a dictionary"},{"line_number":200,"context_line":"            via build_token_values below into a dictionary."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        :return: True if the Token is revoked, False otherwise."}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_780bfdd4","line":199,"updated":"2014-07-19 04:42:08.000000000","message":"double spacing after second colon","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":196,"context_line":"           \u0027assignment_domain_id\u0027, \u0027trust_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027"},{"line_number":197,"context_line":"           \u0027consumer_id\u0027, \u0027access_token_id\u0027"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        :param token_data:  Data from token flattened into a dictionary"},{"line_number":200,"context_line":"            via build_token_values below into a dictionary."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        :return: True if the Token is revoked, False otherwise."}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_610d058f","line":199,"in_reply_to":"baada198_780bfdd4","updated":"2014-07-19 19:15:51.000000000","message":"Done","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"0e25436423e144f9e87be1eb1c81b172cf344728","unresolved":false,"context_lines":[{"line_number":255,"context_line":""},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"def _build_token_values_v2(token, default_domain_id):"},{"line_number":258,"context_line":"    token_data \u003d token[\u0027access\u0027][\u0027token\u0027]"},{"line_number":259,"context_line":"    token_values \u003d {"},{"line_number":260,"context_line":"        \u0027expires_at\u0027: timeutils.normalize_time("},{"line_number":261,"context_line":"            timeutils.parse_isotime(token_data[\u0027expires\u0027])),"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_bab59433","line":258,"updated":"2014-07-18 20:22:47.000000000","message":"Do we need any guarding here or is a KeyError acceptible if bad data is passed in (e.g. caught higher up).\n\nThis can likely be left as is.","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"9023532a3728e8711df5d7fa584aa9e5ca541713","unresolved":false,"context_lines":[{"line_number":255,"context_line":""},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"def _build_token_values_v2(token, default_domain_id):"},{"line_number":258,"context_line":"    token_data \u003d token[\u0027access\u0027][\u0027token\u0027]"},{"line_number":259,"context_line":"    token_values \u003d {"},{"line_number":260,"context_line":"        \u0027expires_at\u0027: timeutils.normalize_time("},{"line_number":261,"context_line":"            timeutils.parse_isotime(token_data[\u0027expires\u0027])),"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_1ac0404f","line":258,"in_reply_to":"baada198_bab59433","updated":"2014-07-18 20:25:43.000000000","message":"Left as is clarification: it is probably ok without handling the key error","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"087d6d721ad13ce38675745a1ccbad825a41a6e3","unresolved":false,"context_lines":[{"line_number":296,"context_line":"    return token_values"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"def _build_token_values_v3(token_data):"},{"line_number":300,"context_line":"    token_data \u003d token_data[\u0027token\u0027]"},{"line_number":301,"context_line":"    token_values \u003d {"},{"line_number":302,"context_line":"        \u0027expires_at\u0027: timeutils.normalize_time("}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_18fcc1b4","line":299,"updated":"2014-07-19 04:42:08.000000000","message":"Can we call the parameter \"token\" instead of token_data?","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"0ca739b0e4b9e9f33be707391f607f7c0ceee5c4","unresolved":false,"context_lines":[{"line_number":296,"context_line":"    return token_values"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"def _build_token_values_v3(token_data):"},{"line_number":300,"context_line":"    token_data \u003d token_data[\u0027token\u0027]"},{"line_number":301,"context_line":"    token_values \u003d {"},{"line_number":302,"context_line":"        \u0027expires_at\u0027: timeutils.normalize_time("}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_c1725111","line":299,"in_reply_to":"baada198_18fcc1b4","updated":"2014-07-19 19:15:51.000000000","message":"Done","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"fa5c9d285be9559182e9d6018b889f239dd2cbb6","unresolved":false,"context_lines":[{"line_number":350,"context_line":"def _get_token_version(token_data):"},{"line_number":351,"context_line":"    if token_data and isinstance(token_data, dict):"},{"line_number":352,"context_line":"        if \u0027token_version\u0027 in token_data:"},{"line_number":353,"context_line":"            if token_data[\u0027token_version\u0027] in token.provider.VERSIONS:"},{"line_number":354,"context_line":"                return token_data[\u0027token_version\u0027]"},{"line_number":355,"context_line":"        # FIXME(morganfainberg): deprecate the following logic in future"},{"line_number":356,"context_line":"        # revisions. It is better to just specify the token_version in"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_99fce574","line":353,"updated":"2014-07-16 04:10:15.000000000","message":"This branch is not tested","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"0c1413ac9908c08f3f56f9bf0f55ba25cce4c60f","unresolved":false,"context_lines":[{"line_number":350,"context_line":"def _get_token_version(token_data):"},{"line_number":351,"context_line":"    if token_data and isinstance(token_data, dict):"},{"line_number":352,"context_line":"        if \u0027token_version\u0027 in token_data:"},{"line_number":353,"context_line":"            if token_data[\u0027token_version\u0027] in token.provider.VERSIONS:"},{"line_number":354,"context_line":"                return token_data[\u0027token_version\u0027]"},{"line_number":355,"context_line":"        # FIXME(morganfainberg): deprecate the following logic in future"},{"line_number":356,"context_line":"        # revisions. It is better to just specify the token_version in"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_fa1e810c","line":353,"in_reply_to":"baada198_99fce574","updated":"2014-07-17 02:35:10.000000000","message":"this is future proofing.  There is no token_version value set yet.  I think this might be premature, as this section is likely to get merged with work Jamie Lennox is working on elsewhere.","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"0e25436423e144f9e87be1eb1c81b172cf344728","unresolved":false,"context_lines":[{"line_number":350,"context_line":"def _get_token_version(token_data):"},{"line_number":351,"context_line":"    if token_data and isinstance(token_data, dict):"},{"line_number":352,"context_line":"        if \u0027token_version\u0027 in token_data:"},{"line_number":353,"context_line":"            if token_data[\u0027token_version\u0027] in token.provider.VERSIONS:"},{"line_number":354,"context_line":"                return token_data[\u0027token_version\u0027]"},{"line_number":355,"context_line":"        # FIXME(morganfainberg): deprecate the following logic in future"},{"line_number":356,"context_line":"        # revisions. It is better to just specify the token_version in"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_ba19147c","line":353,"in_reply_to":"baada198_fa1e810c","updated":"2014-07-18 20:22:47.000000000","message":"The token version *should* be added to the token_data, but as of yet has not been (in keystone or in the fixtures). I\u0027m ok with keeping this as is for now.","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"}],"keystoneclient/tests/test_revoke.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1d8e8b54e0684b7e5dc3f4d844ace55c0a6b1591","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    \"\"\"See if the token matches the revocation event."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    Used as a secondary check on the logic to Check"},{"line_number":53,"context_line":"    By Tree Below:  This is abrute force approach to checking."},{"line_number":54,"context_line":"    Compare each attribute from the event with the corresponding"},{"line_number":55,"context_line":"    value from the token.  If the event does not have a value for"},{"line_number":56,"context_line":"    the attribute, a match is still possible.  If the event has a"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2Fb1c%3D","line":53,"updated":"2014-04-21 20:26:42.000000000","message":"a brute*","commit_id":"a36a02df5b5041bd4303e86a531db5a2b9344209"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1d8e8b54e0684b7e5dc3f4d844ace55c0a6b1591","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    value for the attribute, and it does not match the token, no match"},{"line_number":58,"context_line":"    is possible, so skip the remaining checks."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    :param event one revocation event to match"},{"line_number":61,"context_line":"    :param token_values dictionary with set of values taken from the"},{"line_number":62,"context_line":"    token"},{"line_number":63,"context_line":"    :returns if the token matches the revocation event, indicating the"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2Fb1M%3D","line":60,"updated":"2014-04-21 20:26:42.000000000","message":"(NIT): \n\n    :param event:\n    :param  token_values:\n    :returns: true if the token matches and false if the token doesn\u0027t match.","commit_id":"a36a02df5b5041bd4303e86a531db5a2b9344209"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1d8e8b54e0684b7e5dc3f4d844ace55c0a6b1591","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        #should no longer throw an exception"},{"line_number":166,"context_line":"        #self.revoke_api.check_token(token_values)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"#simple wrapper to make remote calls mirror the server side revoke_api calls"},{"line_number":170,"context_line":"class JsonRevokeAPI(object):"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2Fb0k%3D","line":168,"updated":"2014-04-21 20:26:42.000000000","message":"missing space between # and comment, applies to all instances in this module.","commit_id":"a36a02df5b5041bd4303e86a531db5a2b9344209"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b980ebb7dee0f3859103f16826dbc83398793b15","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        self.revoke_api.revoke_by_user(user_id\u003d2)"},{"line_number":119,"context_line":"        self.assertEqual(2, len(self.revoke_api.get_events()))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def xxtest_list_since(self):"},{"line_number":122,"context_line":"        self.revoke_api.revoke_by_user(user_id\u003d1)"},{"line_number":123,"context_line":"        self.revoke_api.revoke_by_user(user_id\u003d2)"},{"line_number":124,"context_line":"        past \u003d timeutils.utcnow() - datetime.timedelta(seconds\u003d1000)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7adec928_b911a8ae","line":121,"updated":"2014-05-07 19:44:10.000000000","message":"why xx before test?","commit_id":"4516e60b2e0def20bc211e84a664098f21a4f324"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b980ebb7dee0f3859103f16826dbc83398793b15","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        future \u003d timeutils.utcnow() + datetime.timedelta(seconds\u003d1000)"},{"line_number":127,"context_line":"        self.assertEqual(0, len(self.revoke_api.get_events(future)))"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def xxtest_past_expiry_are_removed(self):"},{"line_number":130,"context_line":"        user_id \u003d 1"},{"line_number":131,"context_line":"        self.revoke_api.revoke_by_expiration(user_id, _future_time())"},{"line_number":132,"context_line":"        self.assertEqual(1, len(self.revoke_api.get_events()))"}],"source_content_type":"text/x-python","patch_set":12,"id":"7adec928_1920dcf6","line":129,"updated":"2014-05-07 19:44:10.000000000","message":"same comment here.","commit_id":"4516e60b2e0def20bc211e84a664098f21a4f324"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b980ebb7dee0f3859103f16826dbc83398793b15","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        mock_utcnow.return_value \u003d now_plus_2h"},{"line_number":165,"context_line":"        self.revoke_api.revoke_by_expiration(_new_id(), now_plus_2h)"},{"line_number":166,"context_line":"        #should no longer throw an exception"},{"line_number":167,"context_line":"        #self.revoke_api.check_token(token_values)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"# A simple wrapper to make remote calls mirror the server side revoke_api calls"}],"source_content_type":"text/x-python","patch_set":12,"id":"7adec928_39e2f89f","line":167,"updated":"2014-05-07 19:44:10.000000000","message":"remove unused code.","commit_id":"4516e60b2e0def20bc211e84a664098f21a4f324"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b980ebb7dee0f3859103f16826dbc83398793b15","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    def get_events(self, last_fetch\u003dNone):"},{"line_number":178,"context_line":"        return self._events"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    #TODO(ayoung): should be exception based on a 403"},{"line_number":181,"context_line":"    def check_token(self, token_values):"},{"line_number":182,"context_line":"        if self._tree.is_revoked(token_values):"},{"line_number":183,"context_line":"            raise exceptions.InvalidTokenException(\u0027token is revoked\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7adec928_39f9184e","line":180,"updated":"2014-05-07 19:44:10.000000000","message":"space after #","commit_id":"4516e60b2e0def20bc211e84a664098f21a4f324"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b980ebb7dee0f3859103f16826dbc83398793b15","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            raise exceptions.InvalidTokenException(\u0027token is revoked\u0027)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def revoke(self, event):"},{"line_number":186,"context_line":"        #mirrors the server side marshalling"},{"line_number":187,"context_line":"        as_json \u003d jsonutils.dumps(event.to_dict())"},{"line_number":188,"context_line":"        as_dict \u003d jsonutils.loads(as_json)"},{"line_number":189,"context_line":"        as_event \u003d model.RevokeEvent(**as_dict)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7adec928_599504e3","line":186,"updated":"2014-05-07 19:44:10.000000000","message":"space after #","commit_id":"4516e60b2e0def20bc211e84a664098f21a4f324"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"8a4660fd330ea54f20227d4e75dc506b1bd5ab27","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def _assertTokenNotRevoked(self, token_data):"},{"line_number":162,"context_line":"        self.assertFalse(any([_matches(e, token_data) for e in self.events]))"},{"line_number":163,"context_line":"        return self.assertFalse(self.tree.is_revoked(token_data),"},{"line_number":164,"context_line":"                                \u0027Token should not be revoked\u0027)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _revoke_by_user(self, user_id):"},{"line_number":167,"context_line":"        return self.tree.add_event("}],"source_content_type":"text/x-python","patch_set":13,"id":"7adec928_66f9d77f","line":164,"updated":"2014-05-13 21:20:46.000000000","message":"Should these assertions be put in a more common place?","commit_id":"9caeedd5b32343354e3036dbd3cecdf103663ba0"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"e999a234998f4d6aa9392584833b8b8291a874d1","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def _assertTokenNotRevoked(self, token_data):"},{"line_number":162,"context_line":"        self.assertFalse(any([_matches(e, token_data) for e in self.events]))"},{"line_number":163,"context_line":"        return self.assertFalse(self.tree.is_revoked(token_data),"},{"line_number":164,"context_line":"                                \u0027Token should not be revoked\u0027)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _revoke_by_user(self, user_id):"},{"line_number":167,"context_line":"        return self.tree.add_event("}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_b2d3af5e","line":164,"in_reply_to":"7adec928_66f9d77f","updated":"2014-06-05 17:05:39.000000000","message":"Not yet.  Once the revocation event tree is the default means for checking token revocation, we cann pull it up, but for now, it would confuse people in other tests that don\u0027t have access to the fixtures for testing against the tree.","commit_id":"9caeedd5b32343354e3036dbd3cecdf103663ba0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"530c70ee261a49c4265c158959522a1402069df7","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    :param event: one revocation event to match"},{"line_number":59,"context_line":"    :param token_values:dictionary with set of values taken from the"},{"line_number":60,"context_line":"    token"},{"line_number":61,"context_line":"    :returns: true if the token matches the revocation event, indicating the"},{"line_number":62,"context_line":"    token has been revoked, and false if the token doesn\u0027t match"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_cfcef282","line":59,"updated":"2014-06-12 16:31:14.000000000","message":"missing space before dictionary","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"43f55f01c6f35ea881e764f8c1d20b9c947cc56b","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    :param event: one revocation event to match"},{"line_number":59,"context_line":"    :param token_values:dictionary with set of values taken from the"},{"line_number":60,"context_line":"    token"},{"line_number":61,"context_line":"    :returns: true if the token matches the revocation event, indicating the"},{"line_number":62,"context_line":"    token has been revoked, and false if the token doesn\u0027t match"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_4d19e9cf","line":59,"in_reply_to":"1ae5cdf2_cfcef282","updated":"2014-06-13 15:14:41.000000000","message":"Done","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"530c70ee261a49c4265c158959522a1402069df7","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            return False"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    # If any one check does not match, the while token does"},{"line_number":84,"context_line":"    # not match the event. The numerous return False indicate"},{"line_number":85,"context_line":"    # that the token is still valid and short-circuits the"},{"line_number":86,"context_line":"    # rest of the logic."},{"line_number":87,"context_line":"    attribute_names \u003d [\u0027project_id\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_cf7c3223","line":84,"updated":"2014-06-12 16:31:14.000000000","message":"define numerous","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"43f55f01c6f35ea881e764f8c1d20b9c947cc56b","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            return False"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    # If any one check does not match, the while token does"},{"line_number":84,"context_line":"    # not match the event. The numerous return False indicate"},{"line_number":85,"context_line":"    # that the token is still valid and short-circuits the"},{"line_number":86,"context_line":"    # rest of the logic."},{"line_number":87,"context_line":"    attribute_names \u003d [\u0027project_id\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_2d1e5dbb","line":84,"in_reply_to":"1ae5cdf2_cf7c3223","updated":"2014-06-13 15:14:41.000000000","message":"Done","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"caae48c2293bc23ec2b2c81c4b600de6787c8276","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from keystoneclient.tests import utils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def _new_id():"},{"line_number":24,"context_line":"    return uuid.uuid4().hex"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_2eea31ac","line":23,"updated":"2014-07-11 16:40:28.000000000","message":"_get_new_id() ?","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"caae48c2293bc23ec2b2c81c4b600de6787c8276","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    return uuid.uuid4().hex"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _future_time():"},{"line_number":28,"context_line":"    expire_delta \u003d datetime.timedelta(seconds\u003d1000)"},{"line_number":29,"context_line":"    future_time \u003d timeutils.utcnow() + expire_delta"},{"line_number":30,"context_line":"    return future_time"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_4ed20501","line":27,"updated":"2014-07-11 16:40:28.000000000","message":"_get_future_time() ?","commit_id":"9f0c5b16d542e411552c482b17481f541bd3cee2"}],"keystoneclient/tests/v3/test_revoke.py":[{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"087d6d721ad13ce38675745a1ccbad825a41a6e3","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    \"\"\"See if the token matches the revocation event."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    Used as a secondary check on the logic to Check"},{"line_number":144,"context_line":"    By Tree Below:  This is abrute force approach to checking."},{"line_number":145,"context_line":"    Compare each attribute from the event with the corresponding"},{"line_number":146,"context_line":"    value from the token.  If the event does not have a value for"},{"line_number":147,"context_line":"    the attribute, a match is still possible.  If the event has a"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_b81f5508","line":144,"updated":"2014-07-19 04:42:08.000000000","message":"s/abrute/\"a brute\"","commit_id":"95760c717b8e37a267c7297b6647e15a13e0d243"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"cc083d4a10479b2b364900bdfc10067337c3a5d0","unresolved":false,"context_lines":[{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        for event in self.events:"},{"line_number":464,"context_line":"            self.tree.remove_event(event)"},{"line_number":465,"context_line":"        self._assertEmpty(self.tree.revoke_map)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_e83108a3","line":465,"updated":"2015-01-06 02:37:17.000000000","message":"At the end of this file, we should add this:\n    def load_tests(loader, tests, pattern):\n        return testresources.OptimisingTestSuite(tests)\nhttps://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/tests/client_fixtures.py#L43","commit_id":"7578258553e77808bf66bf0cc3c078edcb8dacdc"}],"keystoneclient/v3/contrib/revoke.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"c44075dc72d65981a7e2ac11a7c46db6569eb170","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from keystoneclient.contrib.revoke import model"},{"line_number":16,"context_line":"from keystoneclient import exceptions"},{"line_number":17,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class RevocationEventManager(object):"},{"line_number":21,"context_line":"    \"\"\"Manager class for fetching Revocation Events.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2F1GE%3D","line":18,"updated":"2014-04-17 05:42:19.000000000","message":"Should it have a base RevocationEvent object?","commit_id":"a36a02df5b5041bd4303e86a531db5a2b9344209"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"775a34352f2ac0af5699385ef6cd468fe65476ac","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from keystoneclient.contrib.revoke import model"},{"line_number":16,"context_line":"from keystoneclient import exceptions"},{"line_number":17,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class RevocationEventManager(object):"},{"line_number":21,"context_line":"    \"\"\"Manager class for fetching Revocation Events.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2FvU8%3D","line":18,"in_reply_to":"AAAAXH%2F%2F1GE%3D","updated":"2014-04-17 19:44:46.000000000","message":"No.  There is no hierarchy here.","commit_id":"a36a02df5b5041bd4303e86a531db5a2b9344209"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"c44075dc72d65981a7e2ac11a7c46db6569eb170","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class RevocationEventManager(object):"},{"line_number":21,"context_line":"    \"\"\"Manager class for fetching Revocation Events.\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    def __init__(self, client):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2F1F4%3D","line":20,"updated":"2014-04-17 05:42:19.000000000","message":"I guess we\u0027re not extending Base.CrudManager for this one?","commit_id":"a36a02df5b5041bd4303e86a531db5a2b9344209"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"775a34352f2ac0af5699385ef6cd468fe65476ac","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class RevocationEventManager(object):"},{"line_number":21,"context_line":"    \"\"\"Manager class for fetching Revocation Events.\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    def __init__(self, client):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2FvUc%3D","line":20,"in_reply_to":"AAAAXH%2F%2F1F4%3D","updated":"2014-04-17 19:44:46.000000000","message":"Nope.  Don\u0027t do enough CRUD operations to call for it.  Never deleted.  This code is basically moved from the server to the client.","commit_id":"a36a02df5b5041bd4303e86a531db5a2b9344209"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"c44075dc72d65981a7e2ac11a7c46db6569eb170","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    def synchronize(self):"},{"line_number":39,"context_line":"        \"\"\"Fetches events since last_fetch and updates the tree.\"\"\""},{"line_number":40,"context_line":"        cutoff \u003d model.revoked_before_cutoff_time()"},{"line_number":41,"context_line":"        for e in self._current_events:"},{"line_number":42,"context_line":"            if e.revoked_at \u003c cutoff:"},{"line_number":43,"context_line":"                self.revoke_map.remove(e)"},{"line_number":44,"context_line":"                self._current_events.remove(e)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2F1GI%3D","line":41,"updated":"2014-04-17 05:42:19.000000000","message":"no need to shorten it, write out event instead of e","commit_id":"a36a02df5b5041bd4303e86a531db5a2b9344209"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"775a34352f2ac0af5699385ef6cd468fe65476ac","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    def synchronize(self):"},{"line_number":39,"context_line":"        \"\"\"Fetches events since last_fetch and updates the tree.\"\"\""},{"line_number":40,"context_line":"        cutoff \u003d model.revoked_before_cutoff_time()"},{"line_number":41,"context_line":"        for e in self._current_events:"},{"line_number":42,"context_line":"            if e.revoked_at \u003c cutoff:"},{"line_number":43,"context_line":"                self.revoke_map.remove(e)"},{"line_number":44,"context_line":"                self._current_events.remove(e)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2FvUI%3D","line":41,"in_reply_to":"AAAAXH%2F%2F1GI%3D","updated":"2014-04-17 19:44:46.000000000","message":"that used to conflict with a different variable.","commit_id":"a36a02df5b5041bd4303e86a531db5a2b9344209"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7b4b03e28cf59d983a0451d0aba3f31633ca6b39","unresolved":false,"context_lines":[{"line_number":8,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import datetime"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FJgo%3D","line":11,"updated":"2014-04-23 17:23:14.000000000","message":"same comment as previous","commit_id":"97df303bf255b04a95aaed6fb540a89e29353af8"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"ec72456a1fbff6430d8fe84e01e6703e5ab40198","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        self._current_events \u003d []"},{"line_number":27,"context_line":"        self._tree \u003d model.RevokeTree()"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def list(self, **kwargs):"},{"line_number":30,"context_line":"        \"\"\"List Revocation Events.\"\"\""},{"line_number":31,"context_line":"        base_url \u003d \u0027/OS-REVOKE/events\u0027"},{"line_number":32,"context_line":"        response, values \u003d self._client.get(base_url)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad9bd40_1484815c","line":29,"updated":"2014-05-06 19:21:41.000000000","message":"you don\u0027t do anything with kwargs","commit_id":"0c65bc1e3cad1f40e70e68069bfa5f7a828b20c4"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"ec72456a1fbff6430d8fe84e01e6703e5ab40198","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        events \u003d []"},{"line_number":34,"context_line":"        for event in values[\u0027events\u0027]:"},{"line_number":35,"context_line":"            events.append(model.RevokeEvent(**event))"},{"line_number":36,"context_line":"        return events"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def synchronize(self):"},{"line_number":39,"context_line":"        \"\"\"Fetches events since last_fetch and updates the tree.\"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad9bd40_d4aa1970","line":36,"updated":"2014-05-06 19:21:41.000000000","message":"i was going to suggest a map(), but the necessity of building kwargs requires a lambda, which i suppose makes this less readable... but fwiw:\n\n  return map(lambda e: model.RevokeEvent(**e), values[\u0027events\u0027])","commit_id":"0c65bc1e3cad1f40e70e68069bfa5f7a828b20c4"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"ec72456a1fbff6430d8fe84e01e6703e5ab40198","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            events.append(model.RevokeEvent(**event))"},{"line_number":36,"context_line":"        return events"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def synchronize(self):"},{"line_number":39,"context_line":"        \"\"\"Fetches events since last_fetch and updates the tree.\"\"\""},{"line_number":40,"context_line":"        cutoff \u003d model.revoked_before_cutoff_time()"},{"line_number":41,"context_line":"        for e in self._current_events:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad9bd40_7444ed1a","line":38,"updated":"2014-05-06 19:21:41.000000000","message":"why does this need to be a public method?","commit_id":"0c65bc1e3cad1f40e70e68069bfa5f7a828b20c4"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"ec72456a1fbff6430d8fe84e01e6703e5ab40198","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                self.revoke_map.remove(e)"},{"line_number":44,"context_line":"                self._current_events.remove(e)"},{"line_number":45,"context_line":"            else:"},{"line_number":46,"context_line":"                break"},{"line_number":47,"context_line":"        events \u003d self.list(last_fetch\u003dself._last_fetch)"},{"line_number":48,"context_line":"        self._last_fetch \u003d timeutils.utcnow()"},{"line_number":49,"context_line":"        self._tree.add_events(events)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad9bd40_14d2c15b","line":46,"updated":"2014-05-06 19:21:41.000000000","message":"inline comment explaining why you can break here? i.e. how are _current_events sorted such that this makes sense?","commit_id":"0c65bc1e3cad1f40e70e68069bfa5f7a828b20c4"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"ec72456a1fbff6430d8fe84e01e6703e5ab40198","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                self._current_events.remove(e)"},{"line_number":45,"context_line":"            else:"},{"line_number":46,"context_line":"                break"},{"line_number":47,"context_line":"        events \u003d self.list(last_fetch\u003dself._last_fetch)"},{"line_number":48,"context_line":"        self._last_fetch \u003d timeutils.utcnow()"},{"line_number":49,"context_line":"        self._tree.add_events(events)"},{"line_number":50,"context_line":"        self._current_events \u003d self._current_events + events"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad9bd40_94f97182","line":47,"updated":"2014-05-06 19:21:41.000000000","message":"last_fetch is ignored, and i assume this should be since\u003dself._last_fetch with some love from RFC 1123","commit_id":"0c65bc1e3cad1f40e70e68069bfa5f7a828b20c4"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"ec72456a1fbff6430d8fe84e01e6703e5ab40198","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self._current_events \u003d self._current_events + events"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _sync_if_stale(self):"},{"line_number":53,"context_line":"        delta \u003d datetime.timedelta(seconds\u003d1)"},{"line_number":54,"context_line":"        if self._last_fetch and self._last_fetch \u003e timeutils.utcnow() + delta:"},{"line_number":55,"context_line":"            return"},{"line_number":56,"context_line":"        self.synchronize()"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad9bd40_947df11e","line":53,"updated":"2014-05-06 19:21:41.000000000","message":"i hope this is configurable at some point, because it shouldn\u0027t be this class\u0027s responsibility to determine a reasonable value for this","commit_id":"0c65bc1e3cad1f40e70e68069bfa5f7a828b20c4"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"ec72456a1fbff6430d8fe84e01e6703e5ab40198","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            return"},{"line_number":56,"context_line":"        self.synchronize()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def is_revoked(self, token):"},{"line_number":59,"context_line":"        self._sync_if_stale()"},{"line_number":60,"context_line":"        token_data \u003d model.build_token_values(token)"},{"line_number":61,"context_line":"        return self._tree.is_revoked(token_data)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad9bd40_f4147dea","line":58,"updated":"2014-05-06 19:21:41.000000000","message":"this seems to be the one useful public method in the class","commit_id":"0c65bc1e3cad1f40e70e68069bfa5f7a828b20c4"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"ec72456a1fbff6430d8fe84e01e6703e5ab40198","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def check_token(self, token):"},{"line_number":64,"context_line":"        if self.is_revoked(token):"},{"line_number":65,"context_line":"            raise exceptions.InvalidTokenException()"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad9bd40_343345ac","line":65,"updated":"2014-05-06 19:21:41.000000000","message":"why would anyone need is_revoked() and check_token(), both?","commit_id":"0c65bc1e3cad1f40e70e68069bfa5f7a828b20c4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"530c70ee261a49c4265c158959522a1402069df7","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                self._current_events.remove(e)"},{"line_number":46,"context_line":"            else:"},{"line_number":47,"context_line":"                # Events are stored in time order.  All events from this point"},{"line_number":48,"context_line":"                # Until the end of the list are after the cutoff"},{"line_number":49,"context_line":"                break"},{"line_number":50,"context_line":"        events \u003d self.list(since\u003dself._last_fetch)"},{"line_number":51,"context_line":"        self._last_fetch \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_0fd8da1c","line":48,"updated":"2014-06-12 16:31:14.000000000","message":"until* and add a period.","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"43f55f01c6f35ea881e764f8c1d20b9c947cc56b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                self._current_events.remove(e)"},{"line_number":46,"context_line":"            else:"},{"line_number":47,"context_line":"                # Events are stored in time order.  All events from this point"},{"line_number":48,"context_line":"                # Until the end of the list are after the cutoff"},{"line_number":49,"context_line":"                break"},{"line_number":50,"context_line":"        events \u003d self.list(since\u003dself._last_fetch)"},{"line_number":51,"context_line":"        self._last_fetch \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_ed6e352e","line":48,"in_reply_to":"1ae5cdf2_0fd8da1c","updated":"2014-06-13 15:14:41.000000000","message":"Done","commit_id":"0a161a1c0a2653fa7477125b8ebc7f1e18796fc5"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"58a53fc69af88b344642b08b627560052b9a6eb0","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        for e in self._current_events:"},{"line_number":42,"context_line":"            if e.revoked_at \u003c cutoff_time:"},{"line_number":43,"context_line":"                self.revoke_map.remove(e)"},{"line_number":44,"context_line":"                self._current_events.remove(e)"},{"line_number":45,"context_line":"            else:"},{"line_number":46,"context_line":"                # Events are stored in time order.  All events from this point"},{"line_number":47,"context_line":"                # until the end of the list are after the cutoff."}],"source_content_type":"text/x-python","patch_set":32,"id":"baa201ad_d5e306d7","line":44,"updated":"2014-10-15 01:07:12.000000000","message":"Where is revoke_map initialized?","commit_id":"f285219b2ba90b99788544a41272b7a95839546f"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"cc083d4a10479b2b364900bdfc10067337c3a5d0","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \"\"\"Fetches events since last_fetch and updates the tree.\"\"\""},{"line_number":42,"context_line":"        for e in self._current_events:"},{"line_number":43,"context_line":"            if e.revoked_at \u003c cutoff_time:"},{"line_number":44,"context_line":"                self.revoke_map.remove(e)"},{"line_number":45,"context_line":"                self._current_events.remove(e)"},{"line_number":46,"context_line":"            else:"},{"line_number":47,"context_line":"                # Events are stored in time order.  All events from this point"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_6d5b6a54","line":44,"updated":"2015-01-06 02:37:17.000000000","message":"It seams that RevocationEventManager doesn\u0027t have \u0027revoke_map\u0027 attribute.","commit_id":"7578258553e77808bf66bf0cc3c078edcb8dacdc"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"cc083d4a10479b2b364900bdfc10067337c3a5d0","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _sync_if_stale(self, cutoff_time, window):"},{"line_number":56,"context_line":"        delta \u003d datetime.timedelta(seconds\u003dwindow)"},{"line_number":57,"context_line":"        if self._last_fetch and self._last_fetch \u003e timeutils.utcnow() + delta:"},{"line_number":58,"context_line":"            return"},{"line_number":59,"context_line":"        self.synchronize(cutoff_time)"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_4d0cee42","line":57,"updated":"2015-01-06 02:37:17.000000000","message":"I think this should be \u0027self._last_fetch \u003e timeutils.utcnow() - delta\u0027 or \u0027timeutils.utcnow() \u003e self._last_fetch + delta\u0027?","commit_id":"7578258553e77808bf66bf0cc3c078edcb8dacdc"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"cc083d4a10479b2b364900bdfc10067337c3a5d0","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            return"},{"line_number":59,"context_line":"        self.synchronize(cutoff_time)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def is_revoked(self, token, cutoff_time, cache_duration_seconds\u003d1):"},{"line_number":62,"context_line":"        self._sync_if_stale(cutoff_time, cache_duration_seconds)"},{"line_number":63,"context_line":"        token_data \u003d model.build_token_values(token)"},{"line_number":64,"context_line":"        return self._tree.is_revoked(token_data)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_6dad2a31","line":61,"updated":"2015-01-06 02:37:17.000000000","message":"I think this method needs a doc string. At least a comment tells users the parameter type of token.","commit_id":"7578258553e77808bf66bf0cc3c078edcb8dacdc"}]}
