)]}'
{"keystone/contrib/revoke/backends/fake.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1fdea4c6226d5f3e2c6657b5c3d261cdef7c6470","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    def get_events(self, last_fetch\u003dNone):"},{"line_number":24,"context_line":"        \"\"\"A real implementation would return the revocation events."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"        :param filter: Ignored"},{"line_number":27,"context_line":"        :raises: None"},{"line_number":28,"context_line":"        :returns: []"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F95pY%3D","line":26,"updated":"2014-02-02 04:13:24.000000000","message":"(NIT): update docstring \u0027filter\u0027","commit_id":"f56b0a618b14411a49e7465a4eddb832a6b7b2f0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5b587305a3e3f6d755f61fd6a0c6ee3c10aa340f","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    def get_events(self, last_fetch\u003dNone):"},{"line_number":24,"context_line":"        \"\"\"A real implementation would return the revocation events."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"        :param filter: Ignored"},{"line_number":27,"context_line":"        :raises: None"},{"line_number":28,"context_line":"        :returns: []"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9xno%3D","line":26,"updated":"2014-02-04 03:33:06.000000000","message":"Update doc strings.","commit_id":"6a421aa41fcf7e8b468cd9097bb843343be4c604"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0611138481cb741230381394f2e51f8faa2f4d30","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    def get_events(self, filter\u003dNone):"},{"line_number":24,"context_line":"        \"\"\"A real implementation would return the revocation events."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"        :param filter: Ignored"},{"line_number":27,"context_line":"        :raises: None"},{"line_number":28,"context_line":"        :returns: []"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2Flb4%3D","side":"PARENT","line":26,"updated":"2014-02-12 07:23:04.000000000","message":"Change name to match param","commit_id":"885389681c627e538f91e6604a46055abfc759a7"}],"keystone/contrib/revoke/backends/kvs.py":[{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        pruned \u003d []"},{"line_number":34,"context_line":"        results \u003d []"},{"line_number":35,"context_line":"        expire_delta \u003d datetime.timedelta(seconds\u003dCONF.token.expiration)"},{"line_number":36,"context_line":"        oldest \u003d timeutils.utcnow() - expire_delta"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        for event in self._events:"},{"line_number":39,"context_line":"            revoked_at \u003d event.revoked_at"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9wWA%3D","line":36,"updated":"2014-02-04 10:54:51.000000000","message":"You should use revoke.revoked_before_cutoff() here as well, I suppose.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            revoked_at \u003d event.revoked_at"},{"line_number":40,"context_line":"            if revoked_at \u003e oldest:"},{"line_number":41,"context_line":"                pruned.append(event)"},{"line_number":42,"context_line":"                if last_fetch:"},{"line_number":43,"context_line":"                    if revoked_at \u003e last_fetch:"},{"line_number":44,"context_line":"                        results.append(event)"},{"line_number":45,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9wWc%3D","line":42,"updated":"2014-02-04 10:54:51.000000000","message":"You can drop this check since anything is greater than None.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0611138481cb741230381394f2e51f8faa2f4d30","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def get_events(self, last_fetch\u003dNone):"},{"line_number":51,"context_line":"        \"\"\"List Revocation Events."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        :param last_fetch: Ignored"},{"line_number":54,"context_line":"        :raises: None"},{"line_number":55,"context_line":"        :returns: A list of keystone.contrib.revoke.model.RevocationEvents"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FldE%3D","line":53,"updated":"2014-02-12 07:23:04.000000000","message":"It looks like this isn\u0027t being ignored anymore.","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0611138481cb741230381394f2e51f8faa2f4d30","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        :returns: A list of keystone.contrib.revoke.model.RevocationEvents"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        events \u003d self._prune_expired_events(last_fetch)"},{"line_number":59,"context_line":"        return events"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def revoke(self, event):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2Flbs%3D","line":58,"updated":"2014-02-12 07:23:04.000000000","message":"Any reason not to leave this as a single line?","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"}],"keystone/contrib/revoke/backends/sql.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1fdea4c6226d5f3e2c6657b5c3d261cdef7c6470","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def get_events(self, last_fetch\u003dNone):"},{"line_number":109,"context_line":"        \"\"\"return the revocation events,"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        :param filter:"},{"line_number":112,"context_line":"        :raises: keystone.exception,"},{"line_number":113,"context_line":"        :returns: None."},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F95pQ%3D","line":111,"updated":"2014-02-02 04:13:24.000000000","message":"Update docstrings","commit_id":"f56b0a618b14411a49e7465a4eddb832a6b7b2f0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5b587305a3e3f6d755f61fd6a0c6ee3c10aa340f","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _prune_expired_events(self):"},{"line_number":81,"context_line":"        #add 30 minutes to token expiration to make sure that we don\u0027t have"},{"line_number":82,"context_line":"        #issues with clock skew.  In practice, 5 minutes should be enough."},{"line_number":83,"context_line":"        oldest \u003d revoke.revoked_before_cutoff()"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        session \u003d db_session.get_session()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9xnM%3D","line":82,"updated":"2014-02-04 03:33:06.000000000","message":"According to this comment, we aren\u0027t adding 30 minutes to the token anymore are we?","commit_id":"6a421aa41fcf7e8b468cd9097bb843343be4c604"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5b587305a3e3f6d755f61fd6a0c6ee3c10aa340f","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    def get_events(self, last_fetch\u003dNone):"},{"line_number":106,"context_line":"        \"\"\"return the revocation events,"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        :param filter:"},{"line_number":109,"context_line":"        :raises: keystone.exception,"},{"line_number":110,"context_line":"        :returns: None."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9xnc%3D","line":108,"updated":"2014-02-04 03:33:06.000000000","message":"Update doc strings","commit_id":"6a421aa41fcf7e8b468cd9097bb843343be4c604"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        batch_size \u003d self._flush_batch_size(dialect)"},{"line_number":88,"context_line":"        if batch_size \u003e 0:"},{"line_number":89,"context_line":"            query \u003d session.query(RevocationEvent.id)"},{"line_number":90,"context_line":"            query \u003d query.filter(RevocationEvent.revoked_at \u003c oldest)"},{"line_number":91,"context_line":"            query \u003d query.limit(batch_size).subquery()"},{"line_number":92,"context_line":"            delete_query \u003d (session.query(RevocationEvent)."},{"line_number":93,"context_line":"                            filter(RevocationEvent.id.in_(query)))"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9wVc%3D","line":90,"updated":"2014-02-04 10:54:51.000000000","message":"The same concern here as in revoke.core: are you sure we should filter by revoked_at, not by expires_at?","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"8c86f2b8d49b3b7ce11b6c9e2ca67c18f0a954aa","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        batch_size \u003d self._flush_batch_size(dialect)"},{"line_number":88,"context_line":"        if batch_size \u003e 0:"},{"line_number":89,"context_line":"            query \u003d session.query(RevocationEvent.id)"},{"line_number":90,"context_line":"            query \u003d query.filter(RevocationEvent.revoked_at \u003c oldest)"},{"line_number":91,"context_line":"            query \u003d query.limit(batch_size).subquery()"},{"line_number":92,"context_line":"            delete_query \u003d (session.query(RevocationEvent)."},{"line_number":93,"context_line":"                            filter(RevocationEvent.id.in_(query)))"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9unA%3D","line":90,"in_reply_to":"AAAAUH%2F9wVc%3D","updated":"2014-02-04 17:23:47.000000000","message":"Yes:  Not every token is going to have \"expires at\"  if anything it would be \"issued by\" but the idea is that we want to be able to continually append new events","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                    break"},{"line_number":98,"context_line":"        else:"},{"line_number":99,"context_line":"            query \u003d session.query(RevocationEvent)"},{"line_number":100,"context_line":"            query \u003d query.filter(RevocationEvent.revoked_at \u003c oldest)"},{"line_number":101,"context_line":"            query.delete(synchronize_session\u003dFalse)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        session.flush()"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9wVQ%3D","line":100,"updated":"2014-02-04 10:54:51.000000000","message":"ditto","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        query \u003d session.query(RevocationEvent).order_by("},{"line_number":116,"context_line":"            RevocationEvent.revoked_at)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        #this should be filtered by revokend_at, but it is broken"},{"line_number":119,"context_line":"        #Maybe SQLite?"},{"line_number":120,"context_line":"        if last_fetch:"},{"line_number":121,"context_line":"            query.filter(RevocationEvent.revoked_at \u003e last_fetch)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9wUs%3D","line":118,"updated":"2014-02-04 10:54:51.000000000","message":"Yes, this filter should definitely work on server-side. There might be something off with timezones or time representation though.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0611138481cb741230381394f2e51f8faa2f4d30","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    def get_events(self, last_fetch\u003dNone):"},{"line_number":106,"context_line":"        \"\"\"return the revocation events,"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        :param filter:"},{"line_number":109,"context_line":"        :raises: keystone.exception,"},{"line_number":110,"context_line":"        :returns: None."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2Flbk%3D","line":108,"updated":"2014-02-12 07:23:04.000000000","message":"Change name to match param","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0611138481cb741230381394f2e51f8faa2f4d30","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            query.filter(RevocationEvent.revoked_at \u003e last_fetch)"},{"line_number":122,"context_line":"            events \u003d []"},{"line_number":123,"context_line":"            for e in query:"},{"line_number":124,"context_line":"                if last_fetch and e.revoked_at \u003e last_fetch:"},{"line_number":125,"context_line":"                    events.append(model.RevokeEvent(**e.to_dict(False)))"},{"line_number":126,"context_line":"        else:"},{"line_number":127,"context_line":"            events \u003d [model.RevokeEvent(**e.to_dict(False)) for e in query]"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FlbU%3D","line":124,"updated":"2014-02-12 07:23:04.000000000","message":"Do you need this \u0027if\u0027 statement? The only way to get here is having a last_fetch (testing on line 120) and having the revoked_at greater than last_fetch (forced in the query).\n\nWithout this test this new logic in the method can by much more concise like:\n\n    if last_fetch:\n        query.filter(...)\n\n    return [model.RevokeEvent(**e.to_dict(False)) for e in query]","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e052dd7b1bbfff8c4169b2327e8e0a1109607790","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                    events.append(model.RevokeEvent(**e.to_dict(False)))"},{"line_number":117,"context_line":"        else:"},{"line_number":118,"context_line":"            events \u003d [model.RevokeEvent(**e.to_dict(False)) for e in query]"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        return events"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def revoke(self, event):"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FnOc%3D","side":"PARENT","line":119,"updated":"2014-02-25 17:16:21.000000000","message":"why remove this?","commit_id":"d0b7cada7880d5a50984664a90351ca93bb33109"}],"keystone/contrib/revoke/controllers.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1fdea4c6226d5f3e2c6657b5c3d261cdef7c6470","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                    timeutils.parse_isotime(since))"},{"line_number":43,"context_line":"            except Exception:"},{"line_number":44,"context_line":"                raise exception.ValidationError("},{"line_number":45,"context_line":"                    message\u003d_(\"invalid date format %s\") % since)"},{"line_number":46,"context_line":"        events \u003d self.revoke_api.get_events(last_fetched)"},{"line_number":47,"context_line":"        #TODO(ayoung): fill in the links"},{"line_number":48,"context_line":"        events \u003d {\u0027events\u0027: [event.to_dict() for event in events],"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F95o8%3D","line":45,"updated":"2014-02-02 04:13:24.000000000","message":"s/invalid/Invalid/","commit_id":"f56b0a618b14411a49e7465a4eddb832a6b7b2f0"}],"keystone/contrib/revoke/core.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1fdea4c6226d5f3e2c6657b5c3d261cdef7c6470","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        #the map per greenthread, as it would require processing every"},{"line_number":178,"context_line":"        #event every time."},{"line_number":179,"context_line":"        "},{"line_number":180,"context_line":"        #if timeout"},{"line_number":181,"context_line":"        #get lock"},{"line_number":182,"context_line":"        #if not timeout:"},{"line_number":183,"context_line":"            #release lock"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F95o0%3D","line":180,"updated":"2014-02-02 04:13:24.000000000","message":"Remove whitespace errors","commit_id":"f56b0a618b14411a49e7465a4eddb832a6b7b2f0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1fdea4c6226d5f3e2c6657b5c3d261cdef7c6470","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        for e in self._current_events:"},{"line_number":191,"context_line":"            if e.revoked_at \u003c cutoff:"},{"line_number":192,"context_line":"                self._revoke_map.remove(event)"},{"line_number":193,"context_line":"                self._current_events.remove(e) "},{"line_number":194,"context_line":"            else:"},{"line_number":195,"context_line":"                break"},{"line_number":196,"context_line":"        events \u003d self.get_events(last_fetch\u003dself._last_fetch)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F95ow%3D","line":193,"updated":"2014-02-02 04:13:24.000000000","message":"Remove trailing whitespace","commit_id":"f56b0a618b14411a49e7465a4eddb832a6b7b2f0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1fdea4c6226d5f3e2c6657b5c3d261cdef7c6470","unresolved":false,"context_lines":[{"line_number":221,"context_line":"    def get_events(self, last_fetch\u003dNone):"},{"line_number":222,"context_line":"        \"\"\"return the revocation events, as a list of  objects"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        :param filter:   Not yet supported."},{"line_number":225,"context_line":"        :raises: keystone.exception,"},{"line_number":226,"context_line":"        :returns: A list of keystone.contrib.revoke.model.RevokeEvent"},{"line_number":227,"context_line":"                  that match the filter."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F95oo%3D","line":224,"updated":"2014-02-02 04:13:24.000000000","message":"Update docstrings to be consistent with method signature.","commit_id":"f56b0a618b14411a49e7465a4eddb832a6b7b2f0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5b587305a3e3f6d755f61fd6a0c6ee3c10aa340f","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def revoked_before_cutoff():"},{"line_number":62,"context_line":"    expire_delta \u003d datetime.timedelta("},{"line_number":63,"context_line":"        seconds\u003dCONF.token.expiration + (60 * 30))"},{"line_number":64,"context_line":"    oldest \u003d timeutils.utcnow() - expire_delta"},{"line_number":65,"context_line":"    return oldest"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9xm8%3D","line":63,"updated":"2014-02-04 03:33:06.000000000","message":"here we could add the comment: \n\n    # NOTE(ayoung): add 30 minutes to token expiration to make sure that we don\u0027t have\n    # issues with clock skew.  In practice, 5 minutes should be enough.","commit_id":"6a421aa41fcf7e8b468cd9097bb843343be4c604"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    def _update_revoke_map(self):"},{"line_number":190,"context_line":"        cutoff \u003d revoked_before_cutoff()"},{"line_number":191,"context_line":"        for e in self._current_events:"},{"line_number":192,"context_line":"            if e.revoked_at \u003c cutoff:"},{"line_number":193,"context_line":"                self._revoke_map.remove(e)"},{"line_number":194,"context_line":"                self._current_events.remove(e)"},{"line_number":195,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9wvs%3D","line":192,"updated":"2014-02-04 10:54:51.000000000","message":"Are you sure we should filter revoke events by revoked_at, not by expires_at? It looks like if I revoke now tokens that expire tomorrow, my revoke event will be forgot before it becomes useful.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        for e in self._current_events:"},{"line_number":192,"context_line":"            if e.revoked_at \u003c cutoff:"},{"line_number":193,"context_line":"                self._revoke_map.remove(e)"},{"line_number":194,"context_line":"                self._current_events.remove(e)"},{"line_number":195,"context_line":"            else:"},{"line_number":196,"context_line":"                break"},{"line_number":197,"context_line":"        events \u003d self.get_events(last_fetch\u003dself._last_fetch)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9wys%3D","line":194,"updated":"2014-02-04 10:54:51.000000000","message":"You shouldn\u0027t modify the list you\u0027re iterating over. Iterator itself holds only current index, not some view of the underlying list:\n\n    In [1]: l \u003d range(10)\n\n    In [2]: for i in l:\n       ...:     print i\n       ...:     if i % 3:\n       ...:         l.remove(i)\n       ...:         \n    0\n    1\n    3\n    4\n    6\n    7\n    9","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        events \u003d self.get_events(last_fetch\u003dself._last_fetch)"},{"line_number":198,"context_line":"        self._last_fetch \u003d timeutils.utcnow()"},{"line_number":199,"context_line":"        self._revoke_map.add_events(events)"},{"line_number":200,"context_line":"        self._current_events \u003d self._current_events + events"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def check_token(self, token_values):"},{"line_number":203,"context_line":"        \"\"\"Checks the values from a token against the revocation list"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9wXg%3D","line":200,"updated":"2014-02-04 10:54:51.000000000","message":"For me it looks like it\u0027ll be way more efficient to let revoke_map (mb it should be renamed to tree?) to clear it\u0027s leaves.\n\nAnd since it\u0027s going to be very frequent operation why not pull expires_at to the top of the tree? It would allow us to quickly drop subtrees that are not needed anymore.\n\nI would go one step further and convert the top level of the tree to an ordered list of pairs (expires_at_datetime, subtree). Then we can do this cut with a very simple O(log n) (-ish) operation:\n\n    tree[:bisect.bisect_right(tree, (cutoff_time,))] \u003d []","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5f29db5c1e30cb4c3119cb83bd769023c620e5c2","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def revoked_before_cutoff():"},{"line_number":62,"context_line":"    expire_delta \u003d datetime.timedelta("},{"line_number":63,"context_line":"        seconds\u003dCONF.token.expiration + (60 * 30))"},{"line_number":64,"context_line":"    oldest \u003d timeutils.utcnow() - expire_delta"},{"line_number":65,"context_line":"    return oldest"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FHm4%3D","line":63,"updated":"2014-02-17 01:07:19.000000000","message":"Why 60 * 30, why not 1800? Maybe a comment here detailing that value would be useful","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5f29db5c1e30cb4c3119cb83bd769023c620e5c2","unresolved":false,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        #if timeout"},{"line_number":182,"context_line":"        #get lock"},{"line_number":183,"context_line":"        #if not timeout:"},{"line_number":184,"context_line":"            #release lock"},{"line_number":185,"context_line":"            #return"},{"line_number":186,"context_line":"        self._update_revoke_map()"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FHmw%3D","line":183,"updated":"2014-02-17 01:07:19.000000000","message":"wouldn\u0027t \u0027if not timeout\u0027 be \u0027else:\u0027 matching with the if above?","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0611138481cb741230381394f2e51f8faa2f4d30","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    def get_events(self, last_fetch\u003dNone):"},{"line_number":223,"context_line":"        \"\"\"return the revocation events, as a list of  objects"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        :param filter:   Not yet supported."},{"line_number":226,"context_line":"        :raises: keystone.exception,"},{"line_number":227,"context_line":"        :returns: A list of keystone.contrib.revoke.model.RevokeEvent"},{"line_number":228,"context_line":"                  that match the filter."}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FlZk%3D","line":225,"updated":"2014-02-12 07:23:04.000000000","message":"Change name to match param","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"}],"keystone/contrib/revoke/model.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"bffc5215f33d02f6e2545c38b52c24783add3218","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from keystone.openstack.common import timeutils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"#TODO(ayoung) turn these two lists into the prameter names for the constructor"},{"line_number":24,"context_line":"#for RevokeEvent"},{"line_number":25,"context_line":"#Ordering of the attributes is important.  Nodes that are going to"},{"line_number":26,"context_line":"#have a lot of entires should be as low in the tree as possible."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BQLI%3D","line":23,"updated":"2014-01-28 17:18:53.000000000","message":"parameter","commit_id":"d430f9fc3af926f5d23bff263b1aa79391eae9cc"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"bffc5215f33d02f6e2545c38b52c24783add3218","unresolved":false,"context_lines":[{"line_number":23,"context_line":"#TODO(ayoung) turn these two lists into the prameter names for the constructor"},{"line_number":24,"context_line":"#for RevokeEvent"},{"line_number":25,"context_line":"#Ordering of the attributes is important.  Nodes that are going to"},{"line_number":26,"context_line":"#have a lot of entires should be as low in the tree as possible."},{"line_number":27,"context_line":"_names \u003d [\u0027trust_id\u0027,"},{"line_number":28,"context_line":"          \u0027consumer_id\u0027,"},{"line_number":29,"context_line":"          \u0027access_token_id\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BQK8%3D","line":26,"updated":"2014-01-28 17:18:53.000000000","message":"entries? this could use a \"because\"","commit_id":"d430f9fc3af926f5d23bff263b1aa79391eae9cc"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"bffc5215f33d02f6e2545c38b52c24783add3218","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            if sub is None:"},{"line_number":97,"context_line":"                sub \u003d dict()"},{"line_number":98,"context_line":"                revoke_map[key] \u003d sub"},{"line_number":99,"context_line":"                revoke_map \u003d sub"},{"line_number":100,"context_line":"        revoke_map[\u0027issued_before\u0027] \u003d event.issued_before"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def __init__(self, revoke_events):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BQJA%3D","line":99,"updated":"2014-01-28 17:18:53.000000000","message":"wtf are you trying to accomplish here?","commit_id":"d430f9fc3af926f5d23bff263b1aa79391eae9cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"#The set of attributes common between the RevokeEvent"},{"line_number":24,"context_line":"#and the dictionaries created from the token Data."},{"line_number":25,"context_line":"_names \u003d [\u0027trust_id\u0027,"},{"line_number":26,"context_line":"          \u0027consumer_id\u0027,"},{"line_number":27,"context_line":"          \u0027access_token_id\u0027,"},{"line_number":28,"context_line":"          \u0027expires_at\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zcg%3D","line":25,"updated":"2014-02-03 19:52:00.000000000","message":"I would suggest using uppercase names for global constants.","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                \u0027role_id\u0027,"},{"line_number":73,"context_line":"                \u0027domain_id\u0027,"},{"line_number":74,"context_line":"                \u0027project_id\u0027]"},{"line_number":75,"context_line":"        event \u003d dict((key, self.__dict__[key]) for key in keys)"},{"line_number":76,"context_line":"        event[\u0027id\u0027] \u003d self.id.__str__()"},{"line_number":77,"context_line":"        if self.trust_id is not None:"},{"line_number":78,"context_line":"            event[\u0027OS-TRUST:trust_id\u0027] \u003d self.trust_id"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zbQ%3D","line":75,"updated":"2014-02-03 19:52:00.000000000","message":"You should use getattr(self, key) here","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c69ae4b73afc1f1a7deef9fade66fa8e5259066d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                \u0027role_id\u0027,"},{"line_number":73,"context_line":"                \u0027domain_id\u0027,"},{"line_number":74,"context_line":"                \u0027project_id\u0027]"},{"line_number":75,"context_line":"        event \u003d dict((key, self.__dict__[key]) for key in keys)"},{"line_number":76,"context_line":"        event[\u0027id\u0027] \u003d self.id.__str__()"},{"line_number":77,"context_line":"        if self.trust_id is not None:"},{"line_number":78,"context_line":"            event[\u0027OS-TRUST:trust_id\u0027] \u003d self.trust_id"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9y1o%3D","line":75,"in_reply_to":"AAAAUH%2F9zbQ%3D","updated":"2014-02-04 03:27:38.000000000","message":"Done","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                \u0027domain_id\u0027,"},{"line_number":74,"context_line":"                \u0027project_id\u0027]"},{"line_number":75,"context_line":"        event \u003d dict((key, self.__dict__[key]) for key in keys)"},{"line_number":76,"context_line":"        event[\u0027id\u0027] \u003d self.id.__str__()"},{"line_number":77,"context_line":"        if self.trust_id is not None:"},{"line_number":78,"context_line":"            event[\u0027OS-TRUST:trust_id\u0027] \u003d self.trust_id"},{"line_number":79,"context_line":"        if self.consumer_id is not None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zbM%3D","line":76,"updated":"2014-02-03 19:52:00.000000000","message":"and str(self.id) here.","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c69ae4b73afc1f1a7deef9fade66fa8e5259066d","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                \u0027domain_id\u0027,"},{"line_number":74,"context_line":"                \u0027project_id\u0027]"},{"line_number":75,"context_line":"        event \u003d dict((key, self.__dict__[key]) for key in keys)"},{"line_number":76,"context_line":"        event[\u0027id\u0027] \u003d self.id.__str__()"},{"line_number":77,"context_line":"        if self.trust_id is not None:"},{"line_number":78,"context_line":"            event[\u0027OS-TRUST:trust_id\u0027] \u003d self.trust_id"},{"line_number":79,"context_line":"        if self.consumer_id is not None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9y1s%3D","line":76,"in_reply_to":"AAAAUH%2F9zbM%3D","updated":"2014-02-04 03:27:38.000000000","message":"Done","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return event"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def key_for_name(self, name):"},{"line_number":92,"context_line":"        return \"%s\u003d%s\" % (name, getattr(self, name) or \u0027*\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def attr_keys(self):"},{"line_number":95,"context_line":"        attr_keys \u003d []"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zWM%3D","line":92,"updated":"2014-02-03 19:52:00.000000000","message":"These two methods seem to be too tied to RevokeTree representation. I think they should reside in that class.","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c69ae4b73afc1f1a7deef9fade66fa8e5259066d","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return event"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def key_for_name(self, name):"},{"line_number":92,"context_line":"        return \"%s\u003d%s\" % (name, getattr(self, name) or \u0027*\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def attr_keys(self):"},{"line_number":95,"context_line":"        attr_keys \u003d []"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9xnk%3D","line":92,"in_reply_to":"AAAAUH%2F9zWM%3D","updated":"2014-02-04 03:27:38.000000000","message":"Done","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        for name in _names:"},{"line_number":97,"context_line":"            key \u003d self.key_for_name(name)"},{"line_number":98,"context_line":"            attr_keys.append(key)"},{"line_number":99,"context_line":"        return attr_keys"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def matches(self, token_values):"},{"line_number":102,"context_line":"        \"\"\"See if the token matches the revocation self."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zyE%3D","line":99,"updated":"2014-02-03 19:52:00.000000000","message":"This whole method can be replaced with:\n\n    return map(self.key_for_name, _names)","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c69ae4b73afc1f1a7deef9fade66fa8e5259066d","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        for name in _names:"},{"line_number":97,"context_line":"            key \u003d self.key_for_name(name)"},{"line_number":98,"context_line":"            attr_keys.append(key)"},{"line_number":99,"context_line":"        return attr_keys"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def matches(self, token_values):"},{"line_number":102,"context_line":"        \"\"\"See if the token matches the revocation self."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9xns%3D","line":99,"in_reply_to":"AAAAUH%2F9zyE%3D","updated":"2014-02-04 03:27:38.000000000","message":"Done","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            for attribute_name in [\u0027user_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027]:"},{"line_number":124,"context_line":"                if self.user_id \u003d\u003d token_values[attribute_name]:"},{"line_number":125,"context_line":"                    user_id_matched \u003d True"},{"line_number":126,"context_line":"                    break"},{"line_number":127,"context_line":"            if not user_id_matched:"},{"line_number":128,"context_line":"                return False"},{"line_number":129,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zXg%3D","line":126,"updated":"2014-02-03 19:52:00.000000000","message":"You can use for:..else: here. else: branch will be executed after the loop if there were no \u0027break\u0027s.","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c69ae4b73afc1f1a7deef9fade66fa8e5259066d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            for attribute_name in [\u0027user_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027]:"},{"line_number":124,"context_line":"                if self.user_id \u003d\u003d token_values[attribute_name]:"},{"line_number":125,"context_line":"                    user_id_matched \u003d True"},{"line_number":126,"context_line":"                    break"},{"line_number":127,"context_line":"            if not user_id_matched:"},{"line_number":128,"context_line":"                return False"},{"line_number":129,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9xnw%3D","line":126,"in_reply_to":"AAAAUH%2F9zXg%3D","updated":"2014-02-04 03:27:38.000000000","message":"Done","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                matched \u003d True"},{"line_number":168,"context_line":"            else:"},{"line_number":169,"context_line":"                return False"},{"line_number":170,"context_line":"        matched \u003d (matched and"},{"line_number":171,"context_line":"                   self.issued_before \u003e token_values[\u0027issued_at\u0027])"},{"line_number":172,"context_line":"        return matched"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zXs%3D","line":170,"updated":"2014-02-03 19:52:00.000000000","message":"If we didn\u0027t get into any if, we get unconditional False here.\n\nI think, you should remove matched variable altogether and just rely on \u0027return False\u0027s.","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c69ae4b73afc1f1a7deef9fade66fa8e5259066d","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                matched \u003d True"},{"line_number":168,"context_line":"            else:"},{"line_number":169,"context_line":"                return False"},{"line_number":170,"context_line":"        matched \u003d (matched and"},{"line_number":171,"context_line":"                   self.issued_before \u003e token_values[\u0027issued_at\u0027])"},{"line_number":172,"context_line":"        return matched"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9yu8%3D","line":170,"in_reply_to":"AAAAUH%2F9zXs%3D","updated":"2014-02-04 03:27:38.000000000","message":"Done","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            if sub is None:"},{"line_number":194,"context_line":"                sub \u003d dict()"},{"line_number":195,"context_line":"                revoke_map[key] \u003d sub"},{"line_number":196,"context_line":"            revoke_map \u003d sub"},{"line_number":197,"context_line":"        revoke_map[\u0027issued_before\u0027] \u003d event.issued_before"},{"line_number":198,"context_line":"        return event"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zx0%3D","line":196,"updated":"2014-02-03 19:52:00.000000000","message":"You should use setdefault here:\n\n    revoke_map \u003d revoke_map.set_default(key, {})","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c69ae4b73afc1f1a7deef9fade66fa8e5259066d","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            if sub is None:"},{"line_number":194,"context_line":"                sub \u003d dict()"},{"line_number":195,"context_line":"                revoke_map[key] \u003d sub"},{"line_number":196,"context_line":"            revoke_map \u003d sub"},{"line_number":197,"context_line":"        revoke_map[\u0027issued_before\u0027] \u003d event.issued_before"},{"line_number":198,"context_line":"        return event"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9yvY%3D","line":196,"in_reply_to":"AAAAUH%2F9zx0%3D","updated":"2014-02-04 03:27:38.000000000","message":"Done","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                    if(not any(sub)):"},{"line_number":212,"context_line":"                        revoke_map.pop(key)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        _remove_event(self.revoke_map, _names, event, )"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def add_events(self, revoke_events):"},{"line_number":217,"context_line":"        for event in revoke_events:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zt4%3D","line":214,"updated":"2014-02-03 19:52:00.000000000","message":"Recursion isn\u0027t necessary here:\n\n    stack \u003d []\n    for name in names:\n        key \u003d event.key_for_name(name)\n        nxt \u003d revoke_map.get(key)\n        if nxt is None:\n            break\n        stack.append((revoke_map, key, nxt))\n        revoke_map \u003d nxt\n    else:\n        revoke_map.pop(\u0027issued_before\u0027)\n    \n    for parent, key, child in reversed(stack):\n        if not any(child):\n             del parent[key]","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c69ae4b73afc1f1a7deef9fade66fa8e5259066d","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                    if(not any(sub)):"},{"line_number":212,"context_line":"                        revoke_map.pop(key)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        _remove_event(self.revoke_map, _names, event, )"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def add_events(self, revoke_events):"},{"line_number":217,"context_line":"        for event in revoke_events:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9ywM%3D","line":214,"in_reply_to":"AAAAUH%2F9zt4%3D","updated":"2014-02-04 03:27:38.000000000","message":"Done","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def add_events(self, revoke_events):"},{"line_number":217,"context_line":"        for event in revoke_events:"},{"line_number":218,"context_line":"            self.add_event(event)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def is_revoked(self, token_data):"},{"line_number":221,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zcE%3D","line":218,"updated":"2014-02-03 19:52:00.000000000","message":"map can be used here as well.","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c69ae4b73afc1f1a7deef9fade66fa8e5259066d","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def add_events(self, revoke_events):"},{"line_number":217,"context_line":"        for event in revoke_events:"},{"line_number":218,"context_line":"            self.add_event(event)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def is_revoked(self, token_data):"},{"line_number":221,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9yu4%3D","line":218,"in_reply_to":"AAAAUH%2F9zcE%3D","updated":"2014-02-04 03:27:38.000000000","message":"Done","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"535953f951dac32f2ca2a49767dc6a6baded00f0","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                    revoke_map, names, token_data, name)"},{"line_number":301,"context_line":"            return matched"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        return _check_revoked(self.revoke_map, _names, token_data)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9zfk%3D","line":303,"updated":"2014-02-03 19:52:00.000000000","message":"Let me just suggest a different approach:\n\n    alt_names \u003d {\n        \"user_id\": [\"user_id\", \"trustor_id\", \"trustee_id\"],\n        \"domain_id\": [\"user_domain_id\", \"project_domain_id\"],\n    }\n    forest \u003d [revoke_map]\n    for name in names:\n        faggot \u003d []\n        any_key \u003d \"%s\u003d*\" % (name,)\n        for tree in forest:\n            faggot.append(tree.get(any_key))\n            if name \u003d\u003d \"role_id\":\n                for role_id in token_data[\"roles\"]:\n                    faggot.append(tree.get(\"role_id\u003d%s\" % (role_id,)))\n            else:\n                for alt_name in alt_names.get(name, [name]):\n                    faggot.append(tree.get(\"%s\u003d%s\" % (name, token_data[alt_name])))\n        faggot \u003d filter(None, faggot)\n        if not faggot:\n            return False\n        forest \u003d faggot\n    else:\n        for leaf in forest:\n            issued_before \u003d leaf.get(\u0027issued_before\u0027)\n            if issued_before is None:\n                continue\n            if issued_before \u003e token_data[\u0027issued_at\u0027]:\n                return True","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c69ae4b73afc1f1a7deef9fade66fa8e5259066d","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                    revoke_map, names, token_data, name)"},{"line_number":301,"context_line":"            return matched"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        return _check_revoked(self.revoke_map, _names, token_data)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9xng%3D","line":303,"in_reply_to":"AAAAUH%2F9zfk%3D","updated":"2014-02-04 03:27:38.000000000","message":"Done.  Had to change some variable names.","commit_id":"06b565ad8c28a9cad5812d1e8e60c00b34b1d316"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b171c3aa542b98008725fcb89acb8c39cf7f6cbb","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"#additional arguments for creating a RevokeEvent"},{"line_number":36,"context_line":"_event_args \u003d [\u0027id\u0027, \u0027issued_before\u0027, \u0027revoked_at\u0027]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"_token_keys \u003d [\u0027user_domain_id\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F9xmQ%3D","line":36,"updated":"2014-02-04 03:40:02.000000000","message":"Why not use the same convention on these list (_event_args, _token_keys) as NAMES?","commit_id":"4d128474892cdf8a76d6dc885b7d1d4746a1cf9d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        revoke_map \u003d self.revoke_map"},{"line_number":114,"context_line":"        for key in attr_keys(event):"},{"line_number":115,"context_line":"            revoke_map \u003d revoke_map.setdefault(key, {})"},{"line_number":116,"context_line":"        revoke_map[\u0027issued_before\u0027] \u003d event.issued_before"},{"line_number":117,"context_line":"        return event"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def remove_event(self, event):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9w44%3D","line":116,"updated":"2014-02-04 10:54:51.000000000","message":"It looks like we can get a problem here if we first revoke with issued_before\u003dA and then do the same revoke but with issued_before\u003dB. If B\u003eA then the first revoke event won\u0027t work at all.\n\nI think we should do this assignment only if revoke_map[\u0027issued_before\u0027] is greater than event.issued_before.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"8c86f2b8d49b3b7ce11b6c9e2ca67c18f0a954aa","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        revoke_map \u003d self.revoke_map"},{"line_number":114,"context_line":"        for key in attr_keys(event):"},{"line_number":115,"context_line":"            revoke_map \u003d revoke_map.setdefault(key, {})"},{"line_number":116,"context_line":"        revoke_map[\u0027issued_before\u0027] \u003d event.issued_before"},{"line_number":117,"context_line":"        return event"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def remove_event(self, event):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9u84%3D","line":116,"in_reply_to":"AAAAUH%2F9w44%3D","updated":"2014-02-04 17:23:47.000000000","message":"That is by design.  Think in terms of \"resetting the revoke time.\"  It will actually work correctly, only the later time needs to be checked.  But you are correct that we should only add the later time.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            stack.append((revoke_map, key, nxt))"},{"line_number":128,"context_line":"            revoke_map \u003d nxt"},{"line_number":129,"context_line":"        else:"},{"line_number":130,"context_line":"            revoke_map.pop(\u0027issued_before\u0027)"},{"line_number":131,"context_line":"        for parent, key, child in reversed(stack):"},{"line_number":132,"context_line":"            if not any(child):"},{"line_number":133,"context_line":"                del parent[key]"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9w4Q%3D","line":130,"updated":"2014-02-04 10:54:51.000000000","message":"The same as with addition, we should be careful on deletion. Looks like we should delete this key only if event.issued_before \u003d\u003d revoke_map[\u0027issued_before\u0027]\n\nBut then again if we add three different issued_before\u0027s A \u003c B \u003c C and then delete C and A, we should end up with issued_before \u003d B. Looks like we have to have a list of issued_before\u0027s here.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"8c86f2b8d49b3b7ce11b6c9e2ca67c18f0a954aa","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            stack.append((revoke_map, key, nxt))"},{"line_number":128,"context_line":"            revoke_map \u003d nxt"},{"line_number":129,"context_line":"        else:"},{"line_number":130,"context_line":"            revoke_map.pop(\u0027issued_before\u0027)"},{"line_number":131,"context_line":"        for parent, key, child in reversed(stack):"},{"line_number":132,"context_line":"            if not any(child):"},{"line_number":133,"context_line":"                del parent[key]"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9u8U%3D","line":130,"in_reply_to":"AAAAUH%2F9w4Q%3D","updated":"2014-02-04 17:23:47.000000000","message":"Good point:  I think that we should ignore \"remove\" calls that don\u0027t match the issued_before time.  Probably safe for them to silently fail.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        #if there is no match, exit early."},{"line_number":144,"context_line":"        alternatives \u003d {"},{"line_number":145,"context_line":"            \"user_id\": [\"user_id\", \"trustor_id\", \"trustee_id\"],"},{"line_number":146,"context_line":"            \"domain_id\": [\"user_domain_id\", \"project_domain_id\"]}"},{"line_number":147,"context_line":"        subnode \u003d [self.revoke_map]"},{"line_number":148,"context_line":"        for name in _NAMES:"},{"line_number":149,"context_line":"            bundle \u003d []"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9w00%3D","line":146,"updated":"2014-02-04 10:54:51.000000000","message":"Please end this line with comma and move closing brace to the next line. It\u0027ll be more Git-friendly if anyone wants to add another item to this dict.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"8c86f2b8d49b3b7ce11b6c9e2ca67c18f0a954aa","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        #if there is no match, exit early."},{"line_number":144,"context_line":"        alternatives \u003d {"},{"line_number":145,"context_line":"            \"user_id\": [\"user_id\", \"trustor_id\", \"trustee_id\"],"},{"line_number":146,"context_line":"            \"domain_id\": [\"user_domain_id\", \"project_domain_id\"]}"},{"line_number":147,"context_line":"        subnode \u003d [self.revoke_map]"},{"line_number":148,"context_line":"        for name in _NAMES:"},{"line_number":149,"context_line":"            bundle \u003d []"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9u8Q%3D","line":146,"in_reply_to":"AAAAUH%2F9w00%3D","updated":"2014-02-04 17:23:47.000000000","message":"Done.  JSON doesn\u0027t allow that construct, so we haven\u0027t been encouraging it.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4a518464c2f7e6e9d5bd33a84f1ae7f688e38ce4","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                    for role_id in token_data.get(\"roles\", []):"},{"line_number":155,"context_line":"                        bundle.append(tree.get(\"role_id\u003d%s\" % (role_id,)))"},{"line_number":156,"context_line":"                else:"},{"line_number":157,"context_line":"                        for alt_name in alternatives.get(name, [name]):"},{"line_number":158,"context_line":"                            bundle.append("},{"line_number":159,"context_line":"                                tree.get(\"%s\u003d%s\" % (name,"},{"line_number":160,"context_line":"                                                    token_data[alt_name])))"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9w0o%3D","line":157,"updated":"2014-02-04 10:54:51.000000000","message":"Too much indent here.","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"8c86f2b8d49b3b7ce11b6c9e2ca67c18f0a954aa","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                    for role_id in token_data.get(\"roles\", []):"},{"line_number":155,"context_line":"                        bundle.append(tree.get(\"role_id\u003d%s\" % (role_id,)))"},{"line_number":156,"context_line":"                else:"},{"line_number":157,"context_line":"                        for alt_name in alternatives.get(name, [name]):"},{"line_number":158,"context_line":"                            bundle.append("},{"line_number":159,"context_line":"                                tree.get(\"%s\u003d%s\" % (name,"},{"line_number":160,"context_line":"                                                    token_data[alt_name])))"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9u8M%3D","line":157,"in_reply_to":"AAAAUH%2F9w0o%3D","updated":"2014-02-04 17:23:47.000000000","message":"Done","commit_id":"5e7de54cff8d4a47362b6e5e837e7b489a5c4c2d"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5f29db5c1e30cb4c3119cb83bd769023c620e5c2","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        token_data[name] \u003d None"},{"line_number":53,"context_line":"    for name in _TOKEN_KEYS:"},{"line_number":54,"context_line":"        token_data[name] \u003d None"},{"line_number":55,"context_line":"    #required field"},{"line_number":56,"context_line":"    token_data[\u0027issued_at\u0027] \u003d issued_at"},{"line_number":57,"context_line":"    return token_data"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FHmk%3D","line":55,"updated":"2014-02-17 01:07:19.000000000","message":"what\u0027s a required field?","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5f29db5c1e30cb4c3119cb83bd769023c620e5c2","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                                                       subsecond\u003dTrue)"},{"line_number":89,"context_line":"        return event"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def key_for_name(self, name):"},{"line_number":92,"context_line":"        return \"%s\u003d%s\" % (name, getattr(self, name) or \u0027*\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FHmg%3D","line":91,"updated":"2014-02-17 01:07:19.000000000","message":"add docstrings","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5f29db5c1e30cb4c3119cb83bd769023c620e5c2","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        #Compare each level of the tree with the values from the token,"},{"line_number":142,"context_line":"        #taking into account the attributes that have alternative keys."},{"line_number":143,"context_line":"        #if there is a match, continue down the tree."},{"line_number":144,"context_line":"        #if there is no match, exit early."},{"line_number":145,"context_line":"        alternatives \u003d {"},{"line_number":146,"context_line":"            \"user_id\": [\"user_id\", \"trustor_id\", \"trustee_id\"],"},{"line_number":147,"context_line":"            \"domain_id\": [\"user_domain_id\", \"project_domain_id\"]}"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FHmQ%3D","line":144,"updated":"2014-02-17 01:07:19.000000000","message":"^ this is a good comment, why not turn it into a docstring and doc the parameters/return value as well.","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e052dd7b1bbfff8c4169b2327e8e0a1109607790","unresolved":false,"context_lines":[{"line_number":30,"context_line":"#additional arguments for creating a RevokeEvent"},{"line_number":31,"context_line":"_EVENT_ARGS \u003d [\u0027id\u0027, \u0027issued_before\u0027, \u0027revoked_at\u0027]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"_TOKEN_KEYS \u003d [\u0027user_domain_id\u0027,"},{"line_number":35,"context_line":"               \u0027project_domain_id\u0027,"},{"line_number":36,"context_line":"               \u0027issued_at\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FnM0%3D","line":33,"updated":"2014-02-25 17:16:21.000000000","message":"_NAMES and _EVENT_ARGS have nice comments explains their purpose, could one be added here for _TOKEN_KEYS?","commit_id":"8da87197d5a9eefbcf3fb3fe12b026a4ac361ff6"}],"keystone/tests/test_revoke.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5f29db5c1e30cb4c3119cb83bd769023c620e5c2","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    \"\"\"See if the token matches the revocation event."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    Used as a secondary check on the logic to Check"},{"line_number":46,"context_line":"    By Tree Below:  This is abrute force approach to checking."},{"line_number":47,"context_line":"    Compare each attribute from the event with the corresponding"},{"line_number":48,"context_line":"    value from the token.  If the event does not have a value for"},{"line_number":49,"context_line":"    the attribute, a match is still possible.  If the event has a"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FHl0%3D","line":46,"updated":"2014-02-17 01:07:19.000000000","message":"s/abrute/a brute/","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5f29db5c1e30cb4c3119cb83bd769023c620e5c2","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    token has been revoked"},{"line_number":58,"context_line":"    \"\"\""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    #The token has three attributes that can match the user_id"},{"line_number":61,"context_line":"    if event.user_id is not None:"},{"line_number":62,"context_line":"        for attribute_name in [\u0027user_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027]:"},{"line_number":63,"context_line":"            if event.user_id \u003d\u003d token_values[attribute_name]:"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FHk0%3D","line":60,"updated":"2014-02-17 01:07:19.000000000","message":"Maybe add to this comment: \n\n    # A token has three attributes that can match the event.user_id. If the user_id of the event does match a user_id, trustor_id, or trustee_id then break and continue the matching process, else return False.","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5f29db5c1e30cb4c3119cb83bd769023c620e5c2","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            if (getattr(event, attribute_name) !\u003d"},{"line_number":88,"context_line":"                    token_values[attribute_name]):"},{"line_number":89,"context_line":"                        return False"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    if event.role_id is not None:"},{"line_number":92,"context_line":"        roles \u003d token_values[\u0027roles\u0027]"},{"line_number":93,"context_line":"        role_found \u003d False"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FHkI%3D","line":90,"updated":"2014-02-17 01:07:19.000000000","message":"Since there are comments for the three checks above it would be nice to have a comment here too.","commit_id":"2a3fdd8671e3c4d248d576eeab839d01f645c28c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e052dd7b1bbfff8c4169b2327e8e0a1109607790","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from keystone.openstack.common import timeutils"},{"line_number":20,"context_line":"from keystone import tests"},{"line_number":21,"context_line":"from keystone.tests import test_backend_sql"},{"line_number":22,"context_line":"import uuid"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"CONF \u003d config.CONF"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FnKA%3D","line":22,"updated":"2014-02-25 17:16:21.000000000","message":"Move this up with library imports.","commit_id":"8da87197d5a9eefbcf3fb3fe12b026a4ac361ff6"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e052dd7b1bbfff8c4169b2327e8e0a1109607790","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    #If any one check does not match, the while token does"},{"line_number":75,"context_line":"    #not match the event. The numerous return False indicate"},{"line_number":76,"context_line":"    # that the token is still valid and short-circuits the"},{"line_number":77,"context_line":"    #rest of the logic."},{"line_number":78,"context_line":"    attribute_names \u003d [\u0027project_id\u0027,"},{"line_number":79,"context_line":"                       \u0027expires_at\u0027, \u0027trust_id\u0027, \u0027consumer_id\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FnJs%3D","line":76,"updated":"2014-02-25 17:16:21.000000000","message":"change # that to #that","commit_id":"8da87197d5a9eefbcf3fb3fe12b026a4ac361ff6"}],"keystone/tests/test_v3_auth.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e052dd7b1bbfff8c4169b2327e8e0a1109607790","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from keystone import exception"},{"line_number":20,"context_line":"from keystone import tests"},{"line_number":21,"context_line":"from keystone.tests import test_v3"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"CONF \u003d config.CONF"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FnJY%3D","side":"PARENT","line":22,"updated":"2014-02-25 17:16:21.000000000","message":"why remove this?","commit_id":"d0b7cada7880d5a50984664a90351ca93bb33109"}]}
