)]}'
{"keystone/common/kvs/legacy.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f188309231672ecfefea8ffa8e0a5b7b16b152a6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            db \u003d DictKvs(db)"},{"line_number":67,"context_line":"        self.db \u003d db"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _calc_user_name_key_from_name(self, name, domain_id):"},{"line_number":70,"context_line":"        return (\u0027user_name-%s-%s\u0027 % (domain_id, name))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _calc_user_name_key(self, user):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FxrA%3D","line":69,"updated":"2014-01-08 16:04:08.000000000","message":"the fact that this second function is trying to guess the domain ID just looks like it\u0027s going to lead to bugs... refactor this into one method where the domain_id must be explicitly provided\n\n  @staticmethod\n  def user_name_key(user_name, domain_id):\n    pass","commit_id":"ec092aa14e90b42bcad09272b815af9e32cf7360"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"04c2aec08906d7b31d68619127d4b16f161dc03a","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            db \u003d DictKvs(db)"},{"line_number":67,"context_line":"        self.db \u003d db"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _calc_user_name_key_from_name(self, name, domain_id):"},{"line_number":70,"context_line":"        return (\u0027user_name-%s-%s\u0027 % (domain_id, name))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _calc_user_name_key(self, user):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FvQo%3D","line":69,"in_reply_to":"AAAAUH%2F%2FxrA%3D","updated":"2014-01-09 00:56:57.000000000","message":"Done","commit_id":"ec092aa14e90b42bcad09272b815af9e32cf7360"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"81f363bc156bb3d2cb197bfdd06356ab611063f6","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        self.db \u003d db"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _calc_user_name_key(self, name, domain_id):"},{"line_number":65,"context_line":"        \"\"\"Calculate the name of the \"user name\" key."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        Calculates the name of the key used to store the mapping of user name"},{"line_number":68,"context_line":"        and domain to user ID. This allows quick lookup of the user ID given"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FNCA%3D","line":65,"updated":"2014-01-16 12:51:04.000000000","message":"Is there a reason this ended up on the DB itself instead of on the identity driver (or similarly something like the UserIdToDomain object).  It seems odd this is on the base kvs class instead of in the identity specific location.","commit_id":"1a2bc93b63d9031a2fab8eeb4d4abf5e80a2481c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"dd31dff60c2a86bf2f2859b21f014610e4024a94","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        self.db \u003d db"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _calc_user_name_key(self, name, domain_id):"},{"line_number":65,"context_line":"        \"\"\"Calculate the name of the \"user name\" key."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        Calculates the name of the key used to store the mapping of user name"},{"line_number":68,"context_line":"        and domain to user ID. This allows quick lookup of the user ID given"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FMG4%3D","line":65,"in_reply_to":"AAAAUH%2F%2FMso%3D","updated":"2014-01-16 16:14:01.000000000","message":"Submitted the change with https://review.openstack.org/67204","commit_id":"1a2bc93b63d9031a2fab8eeb4d4abf5e80a2481c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8be80f93e96418b4701593cbae17f69e46d5ea49","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        self.db \u003d db"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _calc_user_name_key(self, name, domain_id):"},{"line_number":65,"context_line":"        \"\"\"Calculate the name of the \"user name\" key."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        Calculates the name of the key used to store the mapping of user name"},{"line_number":68,"context_line":"        and domain to user ID. This allows quick lookup of the user ID given"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FMso%3D","line":65,"in_reply_to":"AAAAUH%2F%2FNCA%3D","updated":"2014-01-16 15:36:53.000000000","message":"For some reason both the assignment and identity backend look up the user ID by user name, see the previous file in this review... keystone/assignment/backends/kvs.py\n\nTaking a look at keystone/assignment/backends/kvs.py, it looks like the function that calls this isn\u0027t used, so I\u0027ll look at getting rid of it and then I can move this into identity/backends/kvs.py instead. The change to remove those functions will be a separate patch.","commit_id":"1a2bc93b63d9031a2fab8eeb4d4abf5e80a2481c"}],"keystone/identity/backends/kvs.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f188309231672ecfefea8ffa8e0a5b7b16b152a6","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def update_user(self, user_id, user):"},{"line_number":99,"context_line":"        if \u0027name\u0027 in user:"},{"line_number":100,"context_line":"            existing \u003d self.db.get(self._calc_user_name_key(user), False)"},{"line_number":101,"context_line":"            if existing and user_id !\u003d existing[\u0027id\u0027]:"},{"line_number":102,"context_line":"                msg \u003d \u0027Duplicate name, %s.\u0027 % user[\u0027name\u0027]"},{"line_number":103,"context_line":"                raise exception.Conflict(type\u003d\u0027user\u0027, details\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Fxpw%3D","line":100,"updated":"2014-01-08 16:04:08.000000000","message":"the user might not have a domain_id here, and then they get shoved into the default domain?","commit_id":"ec092aa14e90b42bcad09272b815af9e32cf7360"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"04c2aec08906d7b31d68619127d4b16f161dc03a","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def update_user(self, user_id, user):"},{"line_number":99,"context_line":"        if \u0027name\u0027 in user:"},{"line_number":100,"context_line":"            existing \u003d self.db.get(self._calc_user_name_key(user), False)"},{"line_number":101,"context_line":"            if existing and user_id !\u003d existing[\u0027id\u0027]:"},{"line_number":102,"context_line":"                msg \u003d \u0027Duplicate name, %s.\u0027 % user[\u0027name\u0027]"},{"line_number":103,"context_line":"                raise exception.Conflict(type\u003d\u0027user\u0027, details\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FvQs%3D","line":100,"in_reply_to":"AAAAUH%2F%2Fxpw%3D","updated":"2014-01-09 00:56:57.000000000","message":"Done","commit_id":"ec092aa14e90b42bcad09272b815af9e32cf7360"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d8cf110e88a3f629349092f42bb56f8cf82662d6","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def update_user(self, user_id, user):"},{"line_number":99,"context_line":"        if \u0027name\u0027 in user:"},{"line_number":100,"context_line":"            existing \u003d self.db.get(self._calc_user_name_key(user), False)"},{"line_number":101,"context_line":"            if existing and user_id !\u003d existing[\u0027id\u0027]:"},{"line_number":102,"context_line":"                msg \u003d \u0027Duplicate name, %s.\u0027 % user[\u0027name\u0027]"},{"line_number":103,"context_line":"                raise exception.Conflict(type\u003d\u0027user\u0027, details\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FvZ8%3D","line":100,"in_reply_to":"AAAAUH%2F%2Fxpw%3D","updated":"2014-01-09 00:16:53.000000000","message":"you\u0027re right... this is totally broken. we need some way to look up the domain for the user. Not sure why the manager doesn\u0027t just pass down the domain ID since it knows it.","commit_id":"ec092aa14e90b42bcad09272b815af9e32cf7360"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"54106b20bc1c81d8309ccf4ec80e0ce4a03ff007","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self.db.delete(self._calc_user_id_to_domain_id_key(user_id))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _get_domain_id_for_user(self, user_id):"},{"line_number":66,"context_line":"        return self.db.get(self._calc_user_id_to_domain_id_key(user_id))"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def get_user(self, user_id):"},{"line_number":69,"context_line":"        return identity.filter_user(self._get_user(user_id))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FcZM%3D","line":66,"updated":"2014-01-13 20:38:31.000000000","message":"can you add brief doc strings to these - it\u0027s not obvious from the method signature what i should expect","commit_id":"ad07806a5ef3b6ae68a96056a220f5da1c07ef25"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d975b7af738e098247aad70c28487ff03680c2b6","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self.db.delete(self._calc_user_id_to_domain_id_key(user_id))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _get_domain_id_for_user(self, user_id):"},{"line_number":66,"context_line":"        return self.db.get(self._calc_user_id_to_domain_id_key(user_id))"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def get_user(self, user_id):"},{"line_number":69,"context_line":"        return identity.filter_user(self._get_user(user_id))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FaVk%3D","line":66,"in_reply_to":"AAAAUH%2F%2FcZM%3D","updated":"2014-01-14 01:24:17.000000000","message":"Done","commit_id":"ad07806a5ef3b6ae68a96056a220f5da1c07ef25"}]}
