)]}'
{"keystone/common/controller.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e400a9cc24a9f9da655d653880a681b6a5ccd9d4","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _delete_tokens_for_trust(self, context, user_id, trust_id):"},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            self.token_api.delete_token_for_user(context, user_id,"},{"line_number":159,"context_line":"                                                 trust_id\u003dtrust_id)"},{"line_number":160,"context_line":"        except exception.NotFound:"},{"line_number":161,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F45k%3D","line":158,"updated":"2013-05-20 22:02:09.000000000","message":"Should the function be called delete_tokens_for_user since it deletes multiple tokens?","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"2c17fb5bee364f199af01662c897ea2df0608f9c","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _delete_tokens_for_trust(self, context, user_id, trust_id):"},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            self.token_api.delete_token_for_user(context, user_id,"},{"line_number":159,"context_line":"                                                 trust_id\u003dtrust_id)"},{"line_number":160,"context_line":"        except exception.NotFound:"},{"line_number":161,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F4eU%3D","line":158,"in_reply_to":"AAAAPH%2F%2F45k%3D","updated":"2013-05-21 08:50:24.000000000","message":"Done","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"d0a88297063606fed266b269af1349b53d2e448b","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            self.token_api.delete_tokens_for_user(context, user_id,"},{"line_number":159,"context_line":"                                                  trust_id\u003dtrust_id)"},{"line_number":160,"context_line":"        except exception.NotFound:"},{"line_number":161,"context_line":"            pass"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _delete_tokens_for_user(self, context, user_id, project_id\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FyKI%3D","line":160,"updated":"2013-05-23 04:38:37.000000000","message":"I think the except should go in the default implementation in core and not in the controller. \n\nIt cannot be raised by the SQL backend, and in the default impl it can be raised by first listing a user\u0027s tokens and then that token being missing when it comes to being deleted. In that unlikely scenario we shouldn\u0027t exit the whole delete loop but skip that one missing token. (ie inside the for loop)","commit_id":"f0fbb54e0dca6aea5414afb623d304bd2f390ade"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"53db49f568bfe76508665d393eb332f7eed448cb","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            self.token_api.delete_tokens_for_user(context, user_id,"},{"line_number":159,"context_line":"                                                  trust_id\u003dtrust_id)"},{"line_number":160,"context_line":"        except exception.NotFound:"},{"line_number":161,"context_line":"            pass"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _delete_tokens_for_user(self, context, user_id, project_id\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FuLc%3D","line":160,"in_reply_to":"AAAAPH%2F%2FyKI%3D","updated":"2013-05-24 14:34:27.000000000","message":"Good catch, I will fix it.","commit_id":"f0fbb54e0dca6aea5414afb623d304bd2f390ade"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"d0a88297063606fed266b269af1349b53d2e448b","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            self.token_api.delete_tokens_for_user(context,"},{"line_number":167,"context_line":"                                                  user_id,"},{"line_number":168,"context_line":"                                                  tenant_id\u003dproject_id)"},{"line_number":169,"context_line":"        except exception.NotFound:"},{"line_number":170,"context_line":"            pass"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        #delete tokens generated from trusts"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FyKE%3D","line":169,"updated":"2013-05-23 04:38:37.000000000","message":"ditto above","commit_id":"f0fbb54e0dca6aea5414afb623d304bd2f390ade"}],"keystone/exception.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"55698688c29831aa692f6c299b03741c164d6350","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"class TokenForUserNotFound(NotFound):"},{"line_number":188,"context_line":"    \"\"\"Could not find token for user: %(user_id)s\"\"\""},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"class UserNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F2sE%3D","line":188,"updated":"2013-05-21 16:21:12.000000000","message":"I don\u0027t see why this needs to exist","commit_id":"39841826f1948a894be61624499493e0187ece3e"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"480c5259b879f9ef6d1959c7d8bcf2eda2362ef3","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"class TokenForUserNotFound(NotFound):"},{"line_number":188,"context_line":"    \"\"\"Could not find token for user: %(user_id)s\"\"\""},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"class UserNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F1Wc%3D","line":188,"in_reply_to":"AAAAPH%2F%2F2sE%3D","updated":"2013-05-23 04:49:31.000000000","message":"I will remove it.","commit_id":"39841826f1948a894be61624499493e0187ece3e"}],"keystone/token/backends/kvs.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e400a9cc24a9f9da655d653880a681b6a5ccd9d4","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def delete_token_for_user(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":63,"context_line":"        token_list \u003d self.list_tokens(user_id, tenant_id\u003dtenant_id,"},{"line_number":64,"context_line":"                                      trust_id\u003dtrust_id)"},{"line_number":65,"context_line":"        try:"},{"line_number":66,"context_line":"            for token in token_list:"},{"line_number":67,"context_line":"                self.delete_token(token)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F47k%3D","line":64,"updated":"2013-05-20 22:02:09.000000000","message":"is this where you want to check for TokenNotFound?","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"2c17fb5bee364f199af01662c897ea2df0608f9c","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def delete_token_for_user(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":63,"context_line":"        token_list \u003d self.list_tokens(user_id, tenant_id\u003dtenant_id,"},{"line_number":64,"context_line":"                                      trust_id\u003dtrust_id)"},{"line_number":65,"context_line":"        try:"},{"line_number":66,"context_line":"            for token in token_list:"},{"line_number":67,"context_line":"                self.delete_token(token)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F4T4%3D","line":64,"in_reply_to":"AAAAPH%2F%2F47k%3D","updated":"2013-05-21 08:50:24.000000000","message":"The list_tokens is not throw the TokenNotFound exception, so I need not check it here.","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e400a9cc24a9f9da655d653880a681b6a5ccd9d4","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        try:"},{"line_number":66,"context_line":"            for token in token_list:"},{"line_number":67,"context_line":"                self.delete_token(token)"},{"line_number":68,"context_line":"        except exception.TokenNotFound:"},{"line_number":69,"context_line":"            raise exception.TokenForUserNotFound(user_id\u003duser_id)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def is_not_expired(self, now, ref):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F47w%3D","line":68,"updated":"2013-05-20 22:02:09.000000000","message":"it seems unneccessary and confusing to me to check for this error here, because we just got the list of tokens, so deleting one of them shouldn\u0027t fail.","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"2c17fb5bee364f199af01662c897ea2df0608f9c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        try:"},{"line_number":66,"context_line":"            for token in token_list:"},{"line_number":67,"context_line":"                self.delete_token(token)"},{"line_number":68,"context_line":"        except exception.TokenNotFound:"},{"line_number":69,"context_line":"            raise exception.TokenForUserNotFound(user_id\u003duser_id)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def is_not_expired(self, now, ref):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F4Tw%3D","line":68,"in_reply_to":"AAAAPH%2F%2F47w%3D","updated":"2013-05-21 08:50:24.000000000","message":"delete_token function will throw the exception.TokenNotFound, I have to catch it here.","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"55698688c29831aa692f6c299b03741c164d6350","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            for token in token_list:"},{"line_number":68,"context_line":"                self.delete_token(token)"},{"line_number":69,"context_line":"        except exception.TokenNotFound:"},{"line_number":70,"context_line":"            raise exception.TokenForUserNotFound(user_id\u003duser_id)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def is_not_expired(self, now, ref):"},{"line_number":73,"context_line":"        return not ref.get(\u0027expires\u0027) and ref.get(\u0027expires\u0027) \u003c now"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F2r8%3D","line":70,"updated":"2013-05-21 16:21:12.000000000","message":"why would a token be not found and why would it be valid to suddenly stop deleting tokens and raise an exception to the api?? it seems like you should wrap the delete_token call in a try/except rather than the entire loop and simply log a warning if any tokens that fail to be deleted, if anything?","commit_id":"39841826f1948a894be61624499493e0187ece3e"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"480c5259b879f9ef6d1959c7d8bcf2eda2362ef3","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            for token in token_list:"},{"line_number":68,"context_line":"                self.delete_token(token)"},{"line_number":69,"context_line":"        except exception.TokenNotFound:"},{"line_number":70,"context_line":"            raise exception.TokenForUserNotFound(user_id\u003duser_id)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def is_not_expired(self, now, ref):"},{"line_number":73,"context_line":"        return not ref.get(\u0027expires\u0027) and ref.get(\u0027expires\u0027) \u003c now"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F1XM%3D","line":70,"in_reply_to":"AAAAPH%2F%2F2r8%3D","updated":"2013-05-23 04:49:31.000000000","message":"I will remove the try/except and the TokenNotFound exception will be handled by the \u0027delete_token\u0027","commit_id":"39841826f1948a894be61624499493e0187ece3e"}],"keystone/token/backends/memcache.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e400a9cc24a9f9da655d653880a681b6a5ccd9d4","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    def delete_token_for_user(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":105,"context_line":"        token_list \u003d self.list_tokens(user_id,"},{"line_number":106,"context_line":"                                      tenant_id\u003dtenant_id,"},{"line_number":107,"context_line":"                                      trust_id\u003dtrust_id)"},{"line_number":108,"context_line":"        try:"},{"line_number":109,"context_line":"            for token in token_list:"},{"line_number":110,"context_line":"                self.delete_token(token)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F47U%3D","line":107,"updated":"2013-05-20 22:02:09.000000000","message":"Check for TokenNotFound here?","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"2c17fb5bee364f199af01662c897ea2df0608f9c","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    def delete_token_for_user(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":105,"context_line":"        token_list \u003d self.list_tokens(user_id,"},{"line_number":106,"context_line":"                                      tenant_id\u003dtenant_id,"},{"line_number":107,"context_line":"                                      trust_id\u003dtrust_id)"},{"line_number":108,"context_line":"        try:"},{"line_number":109,"context_line":"            for token in token_list:"},{"line_number":110,"context_line":"                self.delete_token(token)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F4To%3D","line":107,"in_reply_to":"AAAAPH%2F%2F47U%3D","updated":"2013-05-21 08:50:24.000000000","message":"Please see my reply in kvs.py.","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e400a9cc24a9f9da655d653880a681b6a5ccd9d4","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        try:"},{"line_number":109,"context_line":"            for token in token_list:"},{"line_number":110,"context_line":"                self.delete_token(token)"},{"line_number":111,"context_line":"        except exception.TokenNotFound:"},{"line_number":112,"context_line":"            raise exception.TokenForUserNotFound(user_id\u003duser_id)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def list_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F47Q%3D","line":111,"updated":"2013-05-20 22:02:09.000000000","message":"How would this happen, since you just got the list of tokens?","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"2c17fb5bee364f199af01662c897ea2df0608f9c","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        try:"},{"line_number":109,"context_line":"            for token in token_list:"},{"line_number":110,"context_line":"                self.delete_token(token)"},{"line_number":111,"context_line":"        except exception.TokenNotFound:"},{"line_number":112,"context_line":"            raise exception.TokenForUserNotFound(user_id\u003duser_id)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def list_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F4Tk%3D","line":111,"in_reply_to":"AAAAPH%2F%2F47Q%3D","updated":"2013-05-21 08:50:24.000000000","message":"Please see my reply in kvs.py.","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"55698688c29831aa692f6c299b03741c164d6350","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            for token in token_list:"},{"line_number":110,"context_line":"                self.delete_token(token)"},{"line_number":111,"context_line":"        except exception.TokenNotFound:"},{"line_number":112,"context_line":"            raise exception.TokenForUserNotFound(user_id\u003duser_id)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def list_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":115,"context_line":"        tokens \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F2rw%3D","line":112,"updated":"2013-05-21 16:21:12.000000000","message":"this is a totally generic implementation that should exist in the base driver, rather than specific driver implementations... this is literally a copy/paste from kvs","commit_id":"39841826f1948a894be61624499493e0187ece3e"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"480c5259b879f9ef6d1959c7d8bcf2eda2362ef3","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            for token in token_list:"},{"line_number":110,"context_line":"                self.delete_token(token)"},{"line_number":111,"context_line":"        except exception.TokenNotFound:"},{"line_number":112,"context_line":"            raise exception.TokenForUserNotFound(user_id\u003duser_id)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def list_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":115,"context_line":"        tokens \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F1YA%3D","line":112,"in_reply_to":"AAAAPH%2F%2F2rw%3D","updated":"2013-05-23 04:49:31.000000000","message":"Done","commit_id":"39841826f1948a894be61624499493e0187ece3e"}],"keystone/token/backends/sql.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e400a9cc24a9f9da655d653880a681b6a5ccd9d4","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            if trust_id:"},{"line_number":90,"context_line":"                query \u003d query.filter(TokenModel.trust_id \u003d\u003d trust_id)"},{"line_number":91,"context_line":"            else:"},{"line_number":92,"context_line":"                query \u003d query.filter(TokenModel.user_id \u003d\u003d user_id)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":95,"context_line":"            if not token_references:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F47A%3D","line":92,"updated":"2013-05-20 22:02:09.000000000","message":"This is confusing ... if the trust_id is set, then don\u0027t use user_id? This function could use comments to explain what it\u0027s doing.","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"2c17fb5bee364f199af01662c897ea2df0608f9c","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            if trust_id:"},{"line_number":90,"context_line":"                query \u003d query.filter(TokenModel.trust_id \u003d\u003d trust_id)"},{"line_number":91,"context_line":"            else:"},{"line_number":92,"context_line":"                query \u003d query.filter(TokenModel.user_id \u003d\u003d user_id)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":95,"context_line":"            if not token_references:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F4Tc%3D","line":92,"in_reply_to":"AAAAPH%2F%2F47A%3D","updated":"2013-05-21 08:50:24.000000000","message":"This is keeping consistent with the logic in list_tokens:\n    def list_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):\n        if trust_id:\n            return self._list_tokens_for_trust(trust_id)\n        else:\n            return self._list_tokens_for_user(user_id, tenant_id)","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"95e956233eb519cdc6168266b225c90d495f88e8","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            if trust_id:"},{"line_number":87,"context_line":"                query \u003d query.filter(TokenModel.trust_id \u003d\u003d trust_id)"},{"line_number":88,"context_line":"            else:"},{"line_number":89,"context_line":"                query \u003d query.filter(TokenModel.user_id \u003d\u003d user_id)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":92,"context_line":"            if not token_references:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F3OY%3D","line":89,"updated":"2013-05-21 13:47:43.000000000","message":"I agree with Brant here. Some comments would be really helpful in explaining what each case is doing. Are there benefits to using one over the other? Will my results vary? What\u0027s the difference in using trust_id vs. user_id?Things like that might cross one\u0027s mind when looking through this.","commit_id":"39841826f1948a894be61624499493e0187ece3e"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"55698688c29831aa692f6c299b03741c164d6350","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            if trust_id:"},{"line_number":87,"context_line":"                query \u003d query.filter(TokenModel.trust_id \u003d\u003d trust_id)"},{"line_number":88,"context_line":"            else:"},{"line_number":89,"context_line":"                query \u003d query.filter(TokenModel.user_id \u003d\u003d user_id)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":92,"context_line":"            if not token_references:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F2rk%3D","line":89,"in_reply_to":"AAAAPH%2F%2F26Y%3D","updated":"2013-05-21 16:21:12.000000000","message":"if you\u0027re only allowing tenant_id OR trust_id to be specified, this should be validated by the manager","commit_id":"39841826f1948a894be61624499493e0187ece3e"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"3ee42875cd6e64b1aef2d185a9a1baaa420435ba","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            if trust_id:"},{"line_number":87,"context_line":"                query \u003d query.filter(TokenModel.trust_id \u003d\u003d trust_id)"},{"line_number":88,"context_line":"            else:"},{"line_number":89,"context_line":"                query \u003d query.filter(TokenModel.user_id \u003d\u003d user_id)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":92,"context_line":"            if not token_references:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F2p4%3D","line":89,"in_reply_to":"AAAAPH%2F%2F2rk%3D","updated":"2013-05-22 15:30:22.000000000","message":"No, it is that user_id will be ignored if the trust_id is specified.  user_id will always be specified, but trust id is rare.\n\nJust filtering user_id is not be sufficient in the trust case, as we need to deal with both trustor  and trustee users.  The user_id will only be one or the other.","commit_id":"39841826f1948a894be61624499493e0187ece3e"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"65753615e201059040288cb8a1e836605c1113bf","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            if trust_id:"},{"line_number":87,"context_line":"                query \u003d query.filter(TokenModel.trust_id \u003d\u003d trust_id)"},{"line_number":88,"context_line":"            else:"},{"line_number":89,"context_line":"                query \u003d query.filter(TokenModel.user_id \u003d\u003d user_id)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":92,"context_line":"            if not token_references:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F26Y%3D","line":89,"in_reply_to":"AAAAPH%2F%2F3OY%3D","updated":"2013-05-21 15:24:14.000000000","message":"As I mentioned in the patch set 1\u0027s response, this is just from the function \u0027list_tokens\u0027 to make it consistent.","commit_id":"39841826f1948a894be61624499493e0187ece3e"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"d0a88297063606fed266b269af1349b53d2e448b","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                        token_ref_dict \u003d token_ref.to_dict()"},{"line_number":99,"context_line":"                        if not self._tenant_matches(tenant_id, token_ref_dict):"},{"line_number":100,"context_line":"                            continue"},{"line_number":101,"context_line":"                    token_ref.valid \u003d False"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            session.flush()"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FyJ4%3D","line":101,"updated":"2013-05-23 04:38:37.000000000","message":"(discussion) if this is sort of thing is going to be something we do often maybe tenant_id should go on the token table so we can just add it to the filter, same for list_tokens.","commit_id":"f0fbb54e0dca6aea5414afb623d304bd2f390ade"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"53db49f568bfe76508665d393eb332f7eed448cb","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                        token_ref_dict \u003d token_ref.to_dict()"},{"line_number":99,"context_line":"                        if not self._tenant_matches(tenant_id, token_ref_dict):"},{"line_number":100,"context_line":"                            continue"},{"line_number":101,"context_line":"                    token_ref.valid \u003d False"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            session.flush()"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FuI0%3D","line":101,"in_reply_to":"AAAAPH%2F%2FyJ4%3D","updated":"2013-05-24 14:34:27.000000000","message":"As I know, there is multitenancy blueprint which is working on refine the token table (add new project id and domain id volume). I am not sure whether it was already be implemented or still on going.","commit_id":"f0fbb54e0dca6aea5414afb623d304bd2f390ade"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"799ff2f2f00ad11ac13f90f2ff3c832117e85a95","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            session.flush()"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def delete_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":81,"context_line":"        # Deletes all tokens in one session"},{"line_number":82,"context_line":"        # The user_id will be ignored if the trust_id is specified. user_id"},{"line_number":83,"context_line":"        # will always be specified"},{"line_number":84,"context_line":"        session \u003d self.get_session()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2FtR0%3D","line":81,"updated":"2013-05-24 20:32:22.000000000","message":"make this a docstr?","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"856aa0c329b17b5422cf13573641de89443c5202","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            session.flush()"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def delete_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":81,"context_line":"        # Deletes all tokens in one session"},{"line_number":82,"context_line":"        # The user_id will be ignored if the trust_id is specified. user_id"},{"line_number":83,"context_line":"        # will always be specified"},{"line_number":84,"context_line":"        session \u003d self.get_session()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2Fq9w%3D","line":81,"in_reply_to":"AAAAPH%2F%2FtR0%3D","updated":"2013-05-28 08:16:09.000000000","message":"Done","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"799ff2f2f00ad11ac13f90f2ff3c832117e85a95","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    def delete_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":81,"context_line":"        # Deletes all tokens in one session"},{"line_number":82,"context_line":"        # The user_id will be ignored if the trust_id is specified. user_id"},{"line_number":83,"context_line":"        # will always be specified"},{"line_number":84,"context_line":"        session \u003d self.get_session()"},{"line_number":85,"context_line":"        with session.begin():"},{"line_number":86,"context_line":"            now \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2FtRo%3D","line":83,"updated":"2013-05-24 20:32:22.000000000","message":"i find that to be a very non-intuitive behavior... there should definitely be an explanation as to *why* it makes sense to ignore the user_id if a trust_id is specified (and why it makes sense to specify both)... it just looks like the caller is doing it wrong and should expect an exception","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"856aa0c329b17b5422cf13573641de89443c5202","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    def delete_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":81,"context_line":"        # Deletes all tokens in one session"},{"line_number":82,"context_line":"        # The user_id will be ignored if the trust_id is specified. user_id"},{"line_number":83,"context_line":"        # will always be specified"},{"line_number":84,"context_line":"        session \u003d self.get_session()"},{"line_number":85,"context_line":"        with session.begin():"},{"line_number":86,"context_line":"            now \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2Fqmg%3D","line":83,"in_reply_to":"AAAAPH%2F%2FtRo%3D","updated":"2013-05-28 08:16:09.000000000","message":"I will update the comments, but I hope ayoung can help to review it.","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"799ff2f2f00ad11ac13f90f2ff3c832117e85a95","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            else:"},{"line_number":92,"context_line":"                query \u003d query.filter(TokenModel.user_id \u003d\u003d user_id)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":95,"context_line":"            if token_references:"},{"line_number":96,"context_line":"                for token_ref in token_references:"},{"line_number":97,"context_line":"                    if tenant_id:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2FtRc%3D","line":94,"updated":"2013-05-24 20:32:22.000000000","message":"move this filter up with the expires \u003e now -- they appear together a lot. also, you haven\u0027t actually evaluated the query yet, so no token references end up on the left side of this assignment","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"856aa0c329b17b5422cf13573641de89443c5202","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            else:"},{"line_number":92,"context_line":"                query \u003d query.filter(TokenModel.user_id \u003d\u003d user_id)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":95,"context_line":"            if token_references:"},{"line_number":96,"context_line":"                for token_ref in token_references:"},{"line_number":97,"context_line":"                    if tenant_id:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2Fq8M%3D","line":94,"in_reply_to":"AAAAPH%2F%2FtRc%3D","updated":"2013-05-28 08:16:09.000000000","message":"Done","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"799ff2f2f00ad11ac13f90f2ff3c832117e85a95","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                query \u003d query.filter(TokenModel.user_id \u003d\u003d user_id)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":95,"context_line":"            if token_references:"},{"line_number":96,"context_line":"                for token_ref in token_references:"},{"line_number":97,"context_line":"                    if tenant_id:"},{"line_number":98,"context_line":"                        token_ref_dict \u003d token_ref.to_dict()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2FtRY%3D","line":95,"updated":"2013-05-24 20:32:22.000000000","message":"remove this if statement completely, it\u0027s redundant with the behavior of the for loop","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"856aa0c329b17b5422cf13573641de89443c5202","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                query \u003d query.filter(TokenModel.user_id \u003d\u003d user_id)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":95,"context_line":"            if token_references:"},{"line_number":96,"context_line":"                for token_ref in token_references:"},{"line_number":97,"context_line":"                    if tenant_id:"},{"line_number":98,"context_line":"                        token_ref_dict \u003d token_ref.to_dict()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2Fq9s%3D","line":95,"in_reply_to":"AAAAPH%2F%2FtRY%3D","updated":"2013-05-28 08:16:09.000000000","message":"Done","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"799ff2f2f00ad11ac13f90f2ff3c832117e85a95","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":95,"context_line":"            if token_references:"},{"line_number":96,"context_line":"                for token_ref in token_references:"},{"line_number":97,"context_line":"                    if tenant_id:"},{"line_number":98,"context_line":"                        token_ref_dict \u003d token_ref.to_dict()"},{"line_number":99,"context_line":"                        if not self._tenant_matches(tenant_id, token_ref_dict):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2FtRU%3D","line":96,"updated":"2013-05-24 20:32:22.000000000","message":"for token_ref in q.all():","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"856aa0c329b17b5422cf13573641de89443c5202","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            token_references \u003d query.filter_by(valid\u003dTrue)"},{"line_number":95,"context_line":"            if token_references:"},{"line_number":96,"context_line":"                for token_ref in token_references:"},{"line_number":97,"context_line":"                    if tenant_id:"},{"line_number":98,"context_line":"                        token_ref_dict \u003d token_ref.to_dict()"},{"line_number":99,"context_line":"                        if not self._tenant_matches(tenant_id, token_ref_dict):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2Fq9g%3D","line":96,"in_reply_to":"AAAAPH%2F%2FtRU%3D","updated":"2013-05-28 08:16:09.000000000","message":"Done","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"799ff2f2f00ad11ac13f90f2ff3c832117e85a95","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                        token_ref_dict \u003d token_ref.to_dict()"},{"line_number":99,"context_line":"                        if not self._tenant_matches(tenant_id, token_ref_dict):"},{"line_number":100,"context_line":"                            continue"},{"line_number":101,"context_line":"                    token_ref.valid \u003d False"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            session.flush()"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2FtRM%3D","line":101,"updated":"2013-05-24 20:32:22.000000000","message":"suggest moving this to the top of the for loop, as it looks like the for loop doesn\u0027t actually do anything (at first glance) if a tenant id wasn\u0027t specified","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"856aa0c329b17b5422cf13573641de89443c5202","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                        token_ref_dict \u003d token_ref.to_dict()"},{"line_number":99,"context_line":"                        if not self._tenant_matches(tenant_id, token_ref_dict):"},{"line_number":100,"context_line":"                            continue"},{"line_number":101,"context_line":"                    token_ref.valid \u003d False"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            session.flush()"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2Fq8Y%3D","line":101,"in_reply_to":"AAAAPH%2F%2FtRM%3D","updated":"2013-05-28 08:16:09.000000000","message":"But actually, if tenant_id and tenant_matches is False, we need not update set token_ref.valid \u003d False.","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"799ff2f2f00ad11ac13f90f2ff3c832117e85a95","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            session.flush()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _tenant_matches(self, tenant_id, token_ref_dict):"},{"line_number":106,"context_line":"        return ((tenant_id is None) or"},{"line_number":107,"context_line":"                (token_ref_dict.get(\u0027tenant\u0027) and"},{"line_number":108,"context_line":"                 token_ref_dict[\u0027tenant\u0027].get(\u0027id\u0027) \u003d\u003d tenant_id))"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2FtQ8%3D","line":106,"updated":"2013-05-24 20:32:22.000000000","message":"the way this is being called, tenant_id will never be none, and the rest might be more clearly expressed (IMO) as:\n\n  try: \n    return token_ref_dict[\u0027tenant\u0027][\u0027id\u0027] \u003d\u003d tenant_id\n  except KeyError:\n    return False","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"856aa0c329b17b5422cf13573641de89443c5202","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            session.flush()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _tenant_matches(self, tenant_id, token_ref_dict):"},{"line_number":106,"context_line":"        return ((tenant_id is None) or"},{"line_number":107,"context_line":"                (token_ref_dict.get(\u0027tenant\u0027) and"},{"line_number":108,"context_line":"                 token_ref_dict[\u0027tenant\u0027].get(\u0027id\u0027) \u003d\u003d tenant_id))"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2Fq9U%3D","line":106,"in_reply_to":"AAAAPH%2F%2FtQ8%3D","updated":"2013-05-28 08:16:09.000000000","message":"Dolph, I think your assumption is incorrect, the tenant_id is maybe none in the existing test cases, and I think we need to keep the original logical to keep checking it.","commit_id":"09336e40baeb13fb3828b07773f612f67eef76c0"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"01671b1ccc171c622137ac25e99b8ada304c9d97","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        The user_id will be ignored if the trust_id is specified. user_id"},{"line_number":84,"context_line":"        will always be specified."},{"line_number":85,"context_line":"        If using a trust, the token\u0027s user_id is set to the trustee\u0027s user ID"},{"line_number":86,"context_line":"        or the trustor\u0027s user ID, so will use trust_id to query the tokens."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        session \u003d self.get_session()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fp8c%3D","line":86,"updated":"2013-05-28 14:13:08.000000000","message":"This is correct.","commit_id":"40060b9f41b2d652e2bf1de78cb79483ad954006"}],"keystone/token/core.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e400a9cc24a9f9da655d653880a681b6a5ccd9d4","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        raise exception.NotImplemented()"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def delete_token_for_user(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":170,"context_line":"        \"\"\"Deletes a token by user id."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        :param user_id: identity of user"},{"line_number":173,"context_line":"        :type token_id: string"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F454%3D","line":170,"updated":"2013-05-20 22:02:09.000000000","message":"Suggest \n\n Invalidates all tokens for a user.","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"2c17fb5bee364f199af01662c897ea2df0608f9c","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        raise exception.NotImplemented()"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def delete_token_for_user(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":170,"context_line":"        \"\"\"Deletes a token by user id."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        :param user_id: identity of user"},{"line_number":173,"context_line":"        :type token_id: string"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F4TY%3D","line":170,"in_reply_to":"AAAAPH%2F%2F454%3D","updated":"2013-05-21 08:50:24.000000000","message":"Done","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e400a9cc24a9f9da655d653880a681b6a5ccd9d4","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def delete_token_for_user(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":170,"context_line":"        \"\"\"Deletes a token by user id."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        :param user_id: identity of user"},{"line_number":173,"context_line":"        :type token_id: string"},{"line_number":174,"context_line":"        :param tenant_id: identity of the tenant"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F45I%3D","line":171,"updated":"2013-05-20 22:02:09.000000000","message":"Add an explanation of what happens when tenant_id is None or when trust_id is None.","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"2c17fb5bee364f199af01662c897ea2df0608f9c","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def delete_token_for_user(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":170,"context_line":"        \"\"\"Deletes a token by user id."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        :param user_id: identity of user"},{"line_number":173,"context_line":"        :type token_id: string"},{"line_number":174,"context_line":"        :param tenant_id: identity of the tenant"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F4SY%3D","line":171,"in_reply_to":"AAAAPH%2F%2F45I%3D","updated":"2013-05-21 08:50:24.000000000","message":"Done","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"55698688c29831aa692f6c299b03741c164d6350","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        :raises: keystone.exception.TokenForUserNotFound"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        \"\"\""},{"line_number":186,"context_line":"        raise exception.NotImplemented()"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def list_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":189,"context_line":"        \"\"\"Returns a list of current token_id\u0027s for a user"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F2rc%3D","line":186,"updated":"2013-05-21 16:21:12.000000000","message":"put a base implementation here","commit_id":"39841826f1948a894be61624499493e0187ece3e"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"480c5259b879f9ef6d1959c7d8bcf2eda2362ef3","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        :raises: keystone.exception.TokenForUserNotFound"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        \"\"\""},{"line_number":186,"context_line":"        raise exception.NotImplemented()"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def list_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":189,"context_line":"        \"\"\"Returns a list of current token_id\u0027s for a user"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F1WA%3D","line":186,"in_reply_to":"AAAAPH%2F%2F2rc%3D","updated":"2013-05-23 04:49:31.000000000","message":"Done","commit_id":"39841826f1948a894be61624499493e0187ece3e"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"d0a88297063606fed266b269af1349b53d2e448b","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        \"\"\""},{"line_number":167,"context_line":"        raise exception.NotImplemented()"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def delete_tokens_for_user(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":170,"context_line":"        \"\"\"Deletes tokens by user id."},{"line_number":171,"context_line":"        If the tenant_id is not None, only delete the tokens by user id under"},{"line_number":172,"context_line":"        the specified tenant."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FyKg%3D","line":169,"updated":"2013-05-23 04:38:37.000000000","message":"Given that the parameters are exactly the same as list_tokens can we just call this delete_tokens? or maybe list_tokens should be list_tokens_for_user.","commit_id":"f0fbb54e0dca6aea5414afb623d304bd2f390ade"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"53db49f568bfe76508665d393eb332f7eed448cb","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        \"\"\""},{"line_number":167,"context_line":"        raise exception.NotImplemented()"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def delete_tokens_for_user(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"},{"line_number":170,"context_line":"        \"\"\"Deletes tokens by user id."},{"line_number":171,"context_line":"        If the tenant_id is not None, only delete the tokens by user id under"},{"line_number":172,"context_line":"        the specified tenant."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FuK4%3D","line":169,"in_reply_to":"AAAAPH%2F%2FyKg%3D","updated":"2013-05-24 14:34:27.000000000","message":"I will change the name to delete_tokens.","commit_id":"f0fbb54e0dca6aea5414afb623d304bd2f390ade"}],"tests/test_backend.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d603c1a241a2c17bf961665999c898f95e752af9","unresolved":false,"context_lines":[{"line_number":2004,"context_line":"        token_id1 \u003d self.create_token_sample_data(\u0027testtenantid\u0027)"},{"line_number":2005,"context_line":"        tokens \u003d self.token_api.list_tokens(\u0027testuserid\u0027)"},{"line_number":2006,"context_line":"        self.assertEquals(len(tokens), 1)"},{"line_number":2007,"context_line":"        self.assertIn(token_id1, tokens)"},{"line_number":2008,"context_line":"        token_id2 \u003d self.create_token_sample_data(\u0027testtenantid\u0027)"},{"line_number":2009,"context_line":"        tokens \u003d self.token_api.list_tokens(\u0027testuserid\u0027)"},{"line_number":2010,"context_line":"        self.assertEquals(len(tokens), 2)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FU3A%3D","line":2007,"updated":"2013-05-14 16:06:03.000000000","message":"Is this line needed if we are checking it again at line 2012?","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":6526,"name":"David Geng","email":"gengjh@cn.ibm.com","username":"genggjh"},"change_message_id":"2c17fb5bee364f199af01662c897ea2df0608f9c","unresolved":false,"context_lines":[{"line_number":2004,"context_line":"        token_id1 \u003d self.create_token_sample_data(\u0027testtenantid\u0027)"},{"line_number":2005,"context_line":"        tokens \u003d self.token_api.list_tokens(\u0027testuserid\u0027)"},{"line_number":2006,"context_line":"        self.assertEquals(len(tokens), 1)"},{"line_number":2007,"context_line":"        self.assertIn(token_id1, tokens)"},{"line_number":2008,"context_line":"        token_id2 \u003d self.create_token_sample_data(\u0027testtenantid\u0027)"},{"line_number":2009,"context_line":"        tokens \u003d self.token_api.list_tokens(\u0027testuserid\u0027)"},{"line_number":2010,"context_line":"        self.assertEquals(len(tokens), 2)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F4SA%3D","line":2007,"in_reply_to":"AAAAOn%2F%2FU3A%3D","updated":"2013-05-21 08:50:24.000000000","message":"Done, remove unnecessary check.","commit_id":"7aa1913875f9fe8b54f61e74e4157e2ce7ac99f5"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"9f405c21f5b28be1d8e2f83f7196581586b73b8e","unresolved":false,"context_lines":[{"line_number":2077,"context_line":"        self.token_api.delete_tokens(user_id\u003d\u0027testuserid\u0027,"},{"line_number":2078,"context_line":"                                     tenant_id\u003d\u0027testtenantid\u0027)"},{"line_number":2079,"context_line":"        tokens \u003d self.token_api.list_tokens(\u0027testuserid\u0027)"},{"line_number":2080,"context_line":"        self.assertEquals(len(tokens), 0)"},{"line_number":2081,"context_line":""},{"line_number":2082,"context_line":"    def test_delete_tokens_trust(self):"},{"line_number":2083,"context_line":"        tokens \u003d self.token_api.list_tokens(user_id\u003d\u0027testuserid\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fpq8%3D","line":2080,"updated":"2013-05-28 15:32:18.000000000","message":"I think we should probably have slightly better testing than this - for example if your new code just deleted all tokens, these tests would still pass.  I\u0027d suggest you add some other tokens into the mix which should still remain after you have deleted the ones for testtenantid","commit_id":"40060b9f41b2d652e2bf1de78cb79483ad954006"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2b6519b6df4cb996d4e9d18236371d75725111ba","unresolved":false,"context_lines":[{"line_number":2077,"context_line":"        self.token_api.delete_tokens(user_id\u003d\u0027testuserid\u0027,"},{"line_number":2078,"context_line":"                                     tenant_id\u003d\u0027testtenantid\u0027)"},{"line_number":2079,"context_line":"        tokens \u003d self.token_api.list_tokens(\u0027testuserid\u0027)"},{"line_number":2080,"context_line":"        self.assertEquals(len(tokens), 0)"},{"line_number":2081,"context_line":""},{"line_number":2082,"context_line":"    def test_delete_tokens_trust(self):"},{"line_number":2083,"context_line":"        tokens \u003d self.token_api.list_tokens(user_id\u003d\u0027testuserid\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fk80%3D","line":2080,"in_reply_to":"AAAAPH%2F%2Fpq8%3D","updated":"2013-05-30 04:39:01.000000000","message":"agree; additionally, no on really cares about the output of list_tokens()... what we care about is if the individual tokens are still valid according to get_token()","commit_id":"40060b9f41b2d652e2bf1de78cb79483ad954006"}]}
