)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8435,"name":"William C. Arnold","email":"barnold@us.ibm.com","username":"barnold"},"change_message_id":"656fec6f5919824911af2b1456824acbef19a79e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sergey Kraynev \u003cskraynev@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-09-02 15:03:42 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using correct keyword for region in v3"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I886b4c7ac3cbe08ac1b88f490e9ca92a90256961"},{"line_number":10,"context_line":"Closes-Bug: #1364463"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa98f980_4535afd8","line":7,"updated":"2014-09-02 21:57:32.000000000","message":"if you update again, might want to mention the keyword","commit_id":"76e3e6b5859a852550582b9c15c3069b5167c21a"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7e5b495e56047c9f41dfdd9e9575e67f4d1d55c4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sergey Kraynev \u003cskraynev@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-12-18 07:18:42 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using correct keyword for region in v3"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I886b4c7ac3cbe08ac1b88f490e9ca92a90256961"},{"line_number":10,"context_line":"Closes-Bug: #1364463"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"3a961159_af4d5f74","line":7,"updated":"2014-12-18 16:13:37.000000000","message":"the commit message should say what was wrong with it.","commit_id":"a9eaa669409d27d939f65ed00f25aa120cc10873"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"8ed396efe5a7e812faf35d30103cb242ca4c7116","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sergey Kraynev \u003cskraynev@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-12-18 07:18:42 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using correct keyword for region in v3"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I886b4c7ac3cbe08ac1b88f490e9ca92a90256961"},{"line_number":10,"context_line":"Closes-Bug: #1364463"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"3a961159_6c0ae228","line":7,"in_reply_to":"3a961159_af4d5f74","updated":"2014-12-30 10:34:08.000000000","message":"Done","commit_id":"a9eaa669409d27d939f65ed00f25aa120cc10873"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f8cd3547a5a619dfc745a7988d452b8e7d8350b1","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Keystone v3 and v2 have different keywords in endpoint"},{"line_number":10,"context_line":"dictionary. This patch adds ability for keystone client for correct"},{"line_number":11,"context_line":"work with old and new API. "},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I886b4c7ac3cbe08ac1b88f490e9ca92a90256961"},{"line_number":14,"context_line":"Closes-Bug: #1364463"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"3a961159_b11cf66b","line":11,"updated":"2015-01-02 22:11:00.000000000","message":"clean up the trailing space here.","commit_id":"6c466c2018e5b14245adaf35e1f5c2c262702e78"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"c807dc790920640ab54f5a90ee222d131d059ec2","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Keystone v3 and v2 have different keywords in endpoint"},{"line_number":10,"context_line":"dictionary. This patch adds ability for keystone client for correct"},{"line_number":11,"context_line":"work with old and new API. "},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I886b4c7ac3cbe08ac1b88f490e9ca92a90256961"},{"line_number":14,"context_line":"Closes-Bug: #1364463"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"fa81d914_a62c0a4c","line":11,"in_reply_to":"3a961159_b11cf66b","updated":"2015-01-28 10:24:33.000000000","message":"Done","commit_id":"6c466c2018e5b14245adaf35e1f5c2c262702e78"}],"keystoneclient/fixture/v3.py":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"00899c6b2c45993a64b9d6ae2cd59eb453a02b14","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        data \u003d {\u0027interface\u0027: interface,"},{"line_number":30,"context_line":"                \u0027url\u0027: url,"},{"line_number":31,"context_line":"                \u0027region\u0027: region,"},{"line_number":32,"context_line":"                \u0027region_id\u0027: region}"},{"line_number":33,"context_line":"        self.setdefault(\u0027endpoints\u0027, []).append(data)"},{"line_number":34,"context_line":"        return data"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"da86d52c_6d832803","line":32,"updated":"2015-02-19 07:18:07.000000000","message":"This fixture seems wrong, region and region_id won\u0027t be available at the same time. If you\u0027re setting the same value, you won\u0027t be able to test that the logic checks first for region_id then fallbacks to region.","commit_id":"8311708907604f473dbc56e10b9da61670540241"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"532967150ff16fd027facae9f686ffb321c7c90a","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        data \u003d {\u0027interface\u0027: interface,"},{"line_number":30,"context_line":"                \u0027url\u0027: url,"},{"line_number":31,"context_line":"                \u0027region\u0027: region,"},{"line_number":32,"context_line":"                \u0027region_id\u0027: region}"},{"line_number":33,"context_line":"        self.setdefault(\u0027endpoints\u0027, []).append(data)"},{"line_number":34,"context_line":"        return data"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"da86d52c_6dffa866","line":32,"in_reply_to":"da86d52c_6d832803","updated":"2015-02-19 07:23:57.000000000","message":"tested this out, they do actually appear at the same time. my bad.","commit_id":"8311708907604f473dbc56e10b9da61670540241"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"eff518695b0e7718476d592206818472fee3873c","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        data \u003d {\u0027interface\u0027: interface,"},{"line_number":30,"context_line":"                \u0027url\u0027: url,"},{"line_number":31,"context_line":"                \u0027region\u0027: region,"},{"line_number":32,"context_line":"                \u0027region_id\u0027: region}"},{"line_number":33,"context_line":"        self.setdefault(\u0027endpoints\u0027, []).append(data)"},{"line_number":34,"context_line":"        return data"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"da86d52c_e49c8610","line":32,"in_reply_to":"da86d52c_6dffa866","updated":"2015-02-19 14:42:14.000000000","message":"Yes. In 8ea1b14e we moved from region to region_id, but for backward compat we kept region around.","commit_id":"8311708907604f473dbc56e10b9da61670540241"}],"keystoneclient/middleware/auth_token.py":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"720a819af8db157da3bbabba1599a8cbab712948","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        regions \u003d {}"},{"line_number":404,"context_line":"        for v3_endpoint in v3_service.get(\u0027endpoints\u0027, []):"},{"line_number":405,"context_line":"            region_name \u003d \\"},{"line_number":406,"context_line":"                v3_endpoint.get(\u0027region_id\u0027) or v3_endpoint.get(\u0027region\u0027)"},{"line_number":407,"context_line":"            try:"},{"line_number":408,"context_line":"                region \u003d regions[region_name]"},{"line_number":409,"context_line":"            except KeyError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_731ce86a","line":406,"updated":"2014-10-07 23:15:08.000000000","message":"from the hacking doc, it is preferred to use parenthesis rather than breaking lines with \"\\\" \n\n\"It is prefered to wrap long lines in parentheses and not a backslash for line continuation.\"","commit_id":"e9eb3405e6edd9ed85c704d52c435d750ec1f907"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"5f658fc28e3a9a1a547ec4158e14f29f5463975b","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        regions \u003d {}"},{"line_number":404,"context_line":"        for v3_endpoint in v3_service.get(\u0027endpoints\u0027, []):"},{"line_number":405,"context_line":"            region_name \u003d \\"},{"line_number":406,"context_line":"                v3_endpoint.get(\u0027region_id\u0027) or v3_endpoint.get(\u0027region\u0027)"},{"line_number":407,"context_line":"            try:"},{"line_number":408,"context_line":"                region \u003d regions[region_name]"},{"line_number":409,"context_line":"            except KeyError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_bf7ff1de","line":406,"in_reply_to":"baa201ad_731ce86a","updated":"2014-10-08 05:27:50.000000000","message":"Done","commit_id":"e9eb3405e6edd9ed85c704d52c435d750ec1f907"}],"keystoneclient/service_catalog.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"3f1deab4067d53adfda692cdfd5b77d357abfd1c","unresolved":false,"context_lines":[{"line_number":307,"context_line":"    from Keystone."},{"line_number":308,"context_line":"    \"\"\""},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    key_region \u003d \u0027region_id\u0027"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def __init__(self, token, resource_dict, region_name\u003dNone):"},{"line_number":313,"context_line":"        super(ServiceCatalogV3, self).__init__(region_name\u003dregion_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_7eaea582","line":310,"updated":"2014-09-03 16:09:15.000000000","message":"this should really be set in __init__ since you\u0027re accessing it as an instance variable, and not a class attribute.","commit_id":"76e3e6b5859a852550582b9c15c3069b5167c21a"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"39d16c3c0ddcdfb517deb93fff1f727b3043b6b6","unresolved":false,"context_lines":[{"line_number":307,"context_line":"    from Keystone."},{"line_number":308,"context_line":"    \"\"\""},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    key_region \u003d \u0027region_id\u0027"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def __init__(self, token, resource_dict, region_name\u003dNone):"},{"line_number":313,"context_line":"        super(ServiceCatalogV3, self).__init__(region_name\u003dregion_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_12601a00","line":310,"in_reply_to":"fa98f980_7eaea582","updated":"2014-09-04 02:57:57.000000000","message":"disagree - it should be captitalized and left where it is because it\u0027s being used as a constant.","commit_id":"76e3e6b5859a852550582b9c15c3069b5167c21a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"7e6b37710f39e8452a4e29ff5daecbfd31c67ff9","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                        self._is_endpoint_type_match(endpoint, endpoint_type)):"},{"line_number":131,"context_line":"                    continue"},{"line_number":132,"context_line":"                # NOTE: code follow need for backward compatibility"},{"line_number":133,"context_line":"                #       and may be deleted in future."},{"line_number":134,"context_line":"                regions \u003d [endpoint.get(self.key_region)]"},{"line_number":135,"context_line":"                if isinstance(self, ServiceCatalogV3):"},{"line_number":136,"context_line":"                    regions.append(endpoint.get(\u0027region\u0027))"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_a50eede2","line":133,"updated":"2014-10-08 19:37:52.000000000","message":"Under what conditions can it be deleted? Also, can the entire block in green be deleted or are there a few specific lines that can be deleted?","commit_id":"11a7de7fb9d3d2915032b90489be334a73670d00"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"f6eeb8348450667a9e51a7d7dcf310de6d98e125","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                        self._is_endpoint_type_match(endpoint, endpoint_type)):"},{"line_number":131,"context_line":"                    continue"},{"line_number":132,"context_line":"                # NOTE: code follow need for backward compatibility"},{"line_number":133,"context_line":"                #       and may be deleted in future."},{"line_number":134,"context_line":"                regions \u003d [endpoint.get(self.key_region)]"},{"line_number":135,"context_line":"                if isinstance(self, ServiceCatalogV3):"},{"line_number":136,"context_line":"                    regions.append(endpoint.get(\u0027region\u0027))"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_01179f45","line":133,"in_reply_to":"baa201ad_a50eede2","updated":"2014-10-09 07:27:41.000000000","message":"I suppose will be enough first condition:   if isinstance(self, ServiceCatalogV3)\n\nHonestly, when team decide to remove old api (I suppose, that it will be not soon), code below may be changed to:\n\n...\nif (region_name and region_name !\u003d endpoint.get(self.key_region)):\n   continue\n...\n\nI will update note above with these thoughts.","commit_id":"11a7de7fb9d3d2915032b90489be334a73670d00"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"8925132db01707909f91f53feda3b05bd00b6542","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                if (endpoint_type and not"},{"line_number":130,"context_line":"                        self._is_endpoint_type_match(endpoint, endpoint_type)):"},{"line_number":131,"context_line":"                    continue"},{"line_number":132,"context_line":"                # NOTE: code follow need for backward compatibility."},{"line_number":133,"context_line":"                #       after deprecating v2 api follow 3 lines should be"},{"line_number":134,"context_line":"                #       removed and regions should be replaced on"},{"line_number":135,"context_line":"                #       endpoint.get(self.key_region)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_58ebf1af","line":132,"updated":"2014-10-14 03:08:59.000000000","message":"I think this is a TODO.","commit_id":"2ea6e212487f758aa4a69a8ac220aa8909875998"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"dafdebd23499f0967b5c2e6100ae71bf3defd6cc","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                if (endpoint_type and not"},{"line_number":130,"context_line":"                        self._is_endpoint_type_match(endpoint, endpoint_type)):"},{"line_number":131,"context_line":"                    continue"},{"line_number":132,"context_line":"                # NOTE: code follow need for backward compatibility."},{"line_number":133,"context_line":"                #       after deprecating v2 api follow 3 lines should be"},{"line_number":134,"context_line":"                #       removed and regions should be replaced on"},{"line_number":135,"context_line":"                #       endpoint.get(self.key_region)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_59a3f34e","line":132,"in_reply_to":"baa201ad_58ebf1af","updated":"2014-10-14 07:02:15.000000000","message":"Done","commit_id":"2ea6e212487f758aa4a69a8ac220aa8909875998"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"bd8a8d66a873a10c530c65034c8f17dcab34e33d","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                #       after deprecating v2 api follow 3 lines should be"},{"line_number":134,"context_line":"                #       removed and regions should be replaced on"},{"line_number":135,"context_line":"                #       endpoint.get(self.key_region)"},{"line_number":136,"context_line":"                regions \u003d [endpoint.get(self.key_region)]"},{"line_number":137,"context_line":"                if isinstance(self, ServiceCatalogV3):"},{"line_number":138,"context_line":"                    regions.append(endpoint.get(\u0027region\u0027))"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_76b30198","line":136,"updated":"2014-10-27 12:28:41.000000000","message":"we\u0027re not going to be able to deprecate v2 from the client any time soon. \n\nA note explaining why endpoint[\u0027region_id\u0027] matches region_name might be useful though.","commit_id":"eefa504adbc79b2e5a3041112c7a1a110d218444"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"bd8a8d66a873a10c530c65034c8f17dcab34e33d","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                #       endpoint.get(self.key_region)"},{"line_number":136,"context_line":"                regions \u003d [endpoint.get(self.key_region)]"},{"line_number":137,"context_line":"                if isinstance(self, ServiceCatalogV3):"},{"line_number":138,"context_line":"                    regions.append(endpoint.get(\u0027region\u0027))"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"                if (region_name and region_name not in regions):"},{"line_number":141,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_1619d5d6","line":138,"updated":"2014-10-27 12:28:41.000000000","message":"let\u0027s not test the type of a superclass from the base class. If you want to do something like this put in a property/method on the classes.\n\ndef _get_region_id(self, endpoint): \n    try:\n        return endpoint[\u0027region_id\u0027]\n    except KeyError: \n        return endpoint.get(\u0027region\u0027)\n\n\nThis lets us keep the older logic as well - we don\u0027t need to construct a list because the value of region_id should never be different to the value of region.","commit_id":"eefa504adbc79b2e5a3041112c7a1a110d218444"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"5388ce232afaed2b93aa1a444543cf2f545955a5","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                #       endpoint.get(self.key_region)"},{"line_number":136,"context_line":"                regions \u003d [endpoint.get(self.key_region)]"},{"line_number":137,"context_line":"                if isinstance(self, ServiceCatalogV3):"},{"line_number":138,"context_line":"                    regions.append(endpoint.get(\u0027region\u0027))"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"                if (region_name and region_name not in regions):"},{"line_number":141,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_1a86b713","line":138,"in_reply_to":"9aa7fdbe_1619d5d6","updated":"2014-11-21 14:59:40.000000000","message":"Thank you for advice, will do as you suggested.","commit_id":"eefa504adbc79b2e5a3041112c7a1a110d218444"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"6ce6c45b871a5dbfcb7287c0b8bfee93619c824a","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            return endpoint[\u0027region_id\u0027]"},{"line_number":55,"context_line":"        except KeyError:"},{"line_number":56,"context_line":"            return endpoint.get(\u0027region\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @abc.abstractmethod"},{"line_number":59,"context_line":"    def get_token(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_fab9347a","line":56,"updated":"2014-11-27 19:45:45.000000000","message":"why not just:\n\n return endpoint.get(\u0027region_id\u0027) or endpoint.get(\u0027region\u0027)\n\nor even\n\n return endpoint.get(\u0027region_id\u0027) if endpoint.get(\u0027region_id\u0027) else endpoint.get(\u0027region\u0027)\n\nNot sure what others reviewers think, but expect a KeyError and use a get() as fallback doesn\u0027t look right to me.","commit_id":"5e92e30b54d31a9e2fc4b5a53daa59c573f6993c"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"5adc749432de6a46b5c113acc284d9c5899b0543","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            return endpoint[\u0027region_id\u0027]"},{"line_number":55,"context_line":"        except KeyError:"},{"line_number":56,"context_line":"            return endpoint.get(\u0027region\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @abc.abstractmethod"},{"line_number":59,"context_line":"    def get_token(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_7f536e39","line":56,"in_reply_to":"5a890539_fab9347a","updated":"2014-11-28 08:12:41.000000000","message":"Done","commit_id":"5e92e30b54d31a9e2fc4b5a53daa59c573f6993c"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"5c94e90044f5d0fa65ae931afa499c8b6d81996f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        if endpoint.get(\u0027region_id\u0027):"},{"line_number":54,"context_line":"            return endpoint.get(\u0027region_id\u0027)"},{"line_number":55,"context_line":"        else:"},{"line_number":56,"context_line":"            return endpoint.get(\u0027region\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @abc.abstractmethod"},{"line_number":59,"context_line":"    def get_token(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_8e07051d","line":56,"updated":"2014-11-28 12:43:47.000000000","message":"done?","commit_id":"0f2fe3234968e88f291d454ab262f14f55a46f63"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"13adaf75d619576c2a116e96b3a5fe7dfb3e7727","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        if endpoint.get(\u0027region_id\u0027):"},{"line_number":54,"context_line":"            return endpoint.get(\u0027region_id\u0027)"},{"line_number":55,"context_line":"        else:"},{"line_number":56,"context_line":"            return endpoint.get(\u0027region\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @abc.abstractmethod"},{"line_number":59,"context_line":"    def get_token(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_990e7131","line":56,"in_reply_to":"5a890539_8e07051d","updated":"2014-11-28 12:45:15.000000000","message":"why not ?","commit_id":"0f2fe3234968e88f291d454ab262f14f55a46f63"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"98f780bd26ca3f102fb9d14a054d7fe91f8ad836","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        if endpoint.get(\u0027region_id\u0027):"},{"line_number":54,"context_line":"            return endpoint.get(\u0027region_id\u0027)"},{"line_number":55,"context_line":"        else:"},{"line_number":56,"context_line":"            return endpoint.get(\u0027region\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @abc.abstractmethod"},{"line_number":59,"context_line":"    def get_token(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_b9b7ad39","line":56,"in_reply_to":"5a890539_990e7131","updated":"2014-11-28 12:52:52.000000000","message":"yeah, just saw the two conditionals and thought you haven\u0027t changed it, sorry. Although, I think you might use a single line to represent a two way conditional return.","commit_id":"0f2fe3234968e88f291d454ab262f14f55a46f63"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ec7a9b63a9e92de3d9a465e959b72b452462550c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        if endpoint.get(\u0027region_id\u0027):"},{"line_number":54,"context_line":"            return endpoint.get(\u0027region_id\u0027)"},{"line_number":55,"context_line":"        else:"},{"line_number":56,"context_line":"            return endpoint.get(\u0027region\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @abc.abstractmethod"},{"line_number":59,"context_line":"    def get_token(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_f99f7563","line":56,"in_reply_to":"5a890539_b9b7ad39","updated":"2014-11-28 13:02:21.000000000","message":"I do think, that it will be look better if we use one line.\nIMO, current code easier for reading.","commit_id":"0f2fe3234968e88f291d454ab262f14f55a46f63"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"ba5b42f4616767d990162a3466496e91f00a16f8","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return self._region_name"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_region_id(self, endpoint):"},{"line_number":53,"context_line":"        if endpoint.get(\u0027region_id\u0027):"},{"line_number":54,"context_line":"            return endpoint.get(\u0027region_id\u0027)"},{"line_number":55,"context_line":"        else:"},{"line_number":56,"context_line":"            return endpoint.get(\u0027region\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_439ae114","line":53,"range":{"start_line":53,"start_character":15,"end_line":53,"end_character":16},"updated":"2014-12-03 13:14:51.000000000","message":"I like the idea but it can be done using less code:\n\nreturn endpoint.get(\u0027region_id\u0027) or endpoint.get(\u0027region\u0027)","commit_id":"b1a6698931435014ba366770c0fc06cfa2018978"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"235d63eb8e67d3e7cd8e862097de3e345feeb23b","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return self._region_name"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_region_id(self, endpoint):"},{"line_number":53,"context_line":"        if endpoint.get(\u0027region_id\u0027):"},{"line_number":54,"context_line":"            return endpoint.get(\u0027region_id\u0027)"},{"line_number":55,"context_line":"        else:"},{"line_number":56,"context_line":"            return endpoint.get(\u0027region\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_feed24b9","line":53,"in_reply_to":"5a890539_439ae114","updated":"2014-12-03 13:30:00.000000000","message":"let\u0027s finishing it as soon as possible!","commit_id":"b1a6698931435014ba366770c0fc06cfa2018978"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"301563b188b548bc5d0d7048f5cf389b27bd4421","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        # to calls made to the service_catalog. Provide appropriate warning."},{"line_number":50,"context_line":"        return self._region_name"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_region_id(self, endpoint):"},{"line_number":53,"context_line":"        return endpoint.get(\u0027region_id\u0027) or endpoint.get(\u0027region\u0027)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_e6591236","line":52,"updated":"2015-02-11 19:04:00.000000000","message":"NIT: Would naming this to _get_endpoint_region() makes the method more descriptive on what it is used for.","commit_id":"b59bedf06ebbf39030df0e2da2bd906ed8796317"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"4e174721033cf65d1d6c58a4e202089c8e6f71c5","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        # to calls made to the service_catalog. Provide appropriate warning."},{"line_number":50,"context_line":"        return self._region_name"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_region_id(self, endpoint):"},{"line_number":53,"context_line":"        return endpoint.get(\u0027region_id\u0027) or endpoint.get(\u0027region\u0027)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_9edde4e2","line":52,"in_reply_to":"da86d52c_e6591236","updated":"2015-02-12 11:21:32.000000000","message":"Done","commit_id":"b59bedf06ebbf39030df0e2da2bd906ed8796317"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"301563b188b548bc5d0d7048f5cf389b27bd4421","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                if (endpoint_type and not"},{"line_number":134,"context_line":"                        self._is_endpoint_type_match(endpoint, endpoint_type)):"},{"line_number":135,"context_line":"                    continue"},{"line_number":136,"context_line":"                if ((region_name and"},{"line_number":137,"context_line":"                     region_name !\u003d self._get_region_id(endpoint))):"},{"line_number":138,"context_line":"                    continue"},{"line_number":139,"context_line":"                sc[st].append(endpoint)"}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_839688ee","line":136,"updated":"2015-02-11 19:04:00.000000000","message":"There are two enclosing parenthesis. I think we don\u0027t need one of those :)","commit_id":"b59bedf06ebbf39030df0e2da2bd906ed8796317"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"4e174721033cf65d1d6c58a4e202089c8e6f71c5","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                if (endpoint_type and not"},{"line_number":134,"context_line":"                        self._is_endpoint_type_match(endpoint, endpoint_type)):"},{"line_number":135,"context_line":"                    continue"},{"line_number":136,"context_line":"                if ((region_name and"},{"line_number":137,"context_line":"                     region_name !\u003d self._get_region_id(endpoint))):"},{"line_number":138,"context_line":"                    continue"},{"line_number":139,"context_line":"                sc[st].append(endpoint)"}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_1ef1f46a","line":136,"in_reply_to":"da86d52c_839688ee","updated":"2015-02-12 11:21:32.000000000","message":"Done","commit_id":"b59bedf06ebbf39030df0e2da2bd906ed8796317"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"00899c6b2c45993a64b9d6ae2cd59eb453a02b14","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        # to calls made to the service_catalog. Provide appropriate warning."},{"line_number":50,"context_line":"        return self._region_name"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_endpoint_region(self, endpoint):"},{"line_number":53,"context_line":"        return endpoint.get(\u0027region_id\u0027) or endpoint.get(\u0027region\u0027)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":23,"id":"da86d52c_cd69748d","line":52,"updated":"2015-02-19 07:18:07.000000000","message":"NIT: To be more accurate, I think this method should be defined abstract.\n\nAnd the implementation would be:\n* In ServiceCatalogV2, this return the region\n* In ServiceCatalogV3, this return region_id or region","commit_id":"8311708907604f473dbc56e10b9da61670540241"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"9e5b3ba877023103e264462e22125d8ad002e6d1","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        # to calls made to the service_catalog. Provide appropriate warning."},{"line_number":50,"context_line":"        return self._region_name"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_endpoint_region(self, endpoint):"},{"line_number":53,"context_line":"        return endpoint.get(\u0027region_id\u0027) or endpoint.get(\u0027region\u0027)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":23,"id":"da86d52c_f1e7dce0","line":52,"in_reply_to":"da86d52c_84fe6a04","updated":"2015-02-19 18:37:59.000000000","message":"Makes sense, I\u0027m fine with this as is.","commit_id":"8311708907604f473dbc56e10b9da61670540241"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"eff518695b0e7718476d592206818472fee3873c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        # to calls made to the service_catalog. Provide appropriate warning."},{"line_number":50,"context_line":"        return self._region_name"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_endpoint_region(self, endpoint):"},{"line_number":53,"context_line":"        return endpoint.get(\u0027region_id\u0027) or endpoint.get(\u0027region\u0027)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":23,"id":"da86d52c_84fe6a04","line":52,"in_reply_to":"da86d52c_cd69748d","updated":"2015-02-19 14:42:14.000000000","message":"I\u0027m OK with this as-is. If we abstract our such a simple method then we\u0027ll just have to keep copying it for every supported version.","commit_id":"8311708907604f473dbc56e10b9da61670540241"}],"keystoneclient/tests/test_auth_token_middleware.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"20de16fe1cb4b7ecc4143a0b6effecbba50e63b3","unresolved":false,"context_lines":[{"line_number":1943,"context_line":"            self.assertIn(e, expected)"},{"line_number":1944,"context_line":""},{"line_number":1945,"context_line":""},{"line_number":1946,"context_line":"class CatalogConversionV3Tests(CatalogConversionTests):"},{"line_number":1947,"context_line":"    def setUp(self):"},{"line_number":1948,"context_line":"        super(CatalogConversionV3Tests, self).setUp()"},{"line_number":1949,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_5df73cd3","line":1946,"updated":"2014-10-15 04:17:40.000000000","message":"Same basic question here as in the other test file.","commit_id":"98bf04531a1c88fd8610986d01b2ed703a7a51a5"}],"keystoneclient/tests/test_fixtures.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"7e6b37710f39e8452a4e29ff5daecbfd31c67ff9","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        self.assertEqual(service_type, service[\u0027type\u0027])"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        for interface, url in six.iteritems(endpoints):"},{"line_number":236,"context_line":"            endpoint \u003d {\u0027interface\u0027: interface, \u0027url\u0027: url,"},{"line_number":237,"context_line":"                        \u0027region\u0027: region}"},{"line_number":238,"context_line":"            self.assertIn(endpoint, service[\u0027endpoints\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_256bdd85","line":236,"updated":"2014-10-08 19:37:52.000000000","message":"Why make this change?","commit_id":"11a7de7fb9d3d2915032b90489be334a73670d00"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"f6eeb8348450667a9e51a7d7dcf310de6d98e125","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        self.assertEqual(service_type, service[\u0027type\u0027])"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        for interface, url in six.iteritems(endpoints):"},{"line_number":236,"context_line":"            endpoint \u003d {\u0027interface\u0027: interface, \u0027url\u0027: url,"},{"line_number":237,"context_line":"                        \u0027region\u0027: region}"},{"line_number":238,"context_line":"            self.assertIn(endpoint, service[\u0027endpoints\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_46cd3d30","line":236,"in_reply_to":"baa201ad_256bdd85","updated":"2014-10-09 07:27:41.000000000","message":"Ooops, sorry. rebase mistake. will remove.","commit_id":"11a7de7fb9d3d2915032b90489be334a73670d00"}],"keystoneclient/tests/unit/v3/test_service_catalog.py":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"00899c6b2c45993a64b9d6ae2cd59eb453a02b14","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        self.assertRaises(exceptions.EndpointNotFound, sc.url_for, \u0027region_id\u0027,"},{"line_number":235,"context_line":"                          \u0027South\u0027, service_type\u003d\u0027compute\u0027)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def test_service_catalog_endpoints(self):"},{"line_number":238,"context_line":"        auth_ref \u003d access.AccessInfo.factory(self.RESPONSE,"},{"line_number":239,"context_line":"                                             self.AUTH_RESPONSE_BODY)"}],"source_content_type":"text/x-python","patch_set":23,"id":"da86d52c_8da4dca6","line":236,"updated":"2015-02-19 07:18:07.000000000","message":"probably need to have two sets of test, one that test that it has only region and the other test that it only has region_id","commit_id":"8311708907604f473dbc56e10b9da61670540241"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"9e5b3ba877023103e264462e22125d8ad002e6d1","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        self.assertRaises(exceptions.EndpointNotFound, sc.url_for, \u0027region_id\u0027,"},{"line_number":235,"context_line":"                          \u0027South\u0027, service_type\u003d\u0027compute\u0027)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def test_service_catalog_endpoints(self):"},{"line_number":238,"context_line":"        auth_ref \u003d access.AccessInfo.factory(self.RESPONSE,"},{"line_number":239,"context_line":"                                             self.AUTH_RESPONSE_BODY)"}],"source_content_type":"text/x-python","patch_set":23,"id":"da86d52c_11271013","line":236,"in_reply_to":"da86d52c_8da4dca6","updated":"2015-02-19 18:37:59.000000000","message":"nevermind, the older test already checks for the case where \"region\" is used.","commit_id":"8311708907604f473dbc56e10b9da61670540241"}],"keystoneclient/tests/v3/test_service_catalog.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"20de16fe1cb4b7ecc4143a0b6effecbba50e63b3","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                          endpoint_type\u003d\u0027public\u0027)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"class ServiceCatalogV3Test(ServiceCatalogTest):"},{"line_number":225,"context_line":"    def setUp(self):"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        def add_endpoint(self, interface, url, region\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_3dfa78bd","line":224,"updated":"2014-10-15 04:17:40.000000000","message":"Do you actually want to run all of the ServiceCatalogTests with this new setup? Or were you trying to just reuse some code from it?","commit_id":"98bf04531a1c88fd8610986d01b2ed703a7a51a5"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"55da843dd2e0b21eda768ddea8aedc3de30b4a2e","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                          endpoint_type\u003d\u0027public\u0027)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"class ServiceCatalogV3Test(ServiceCatalogTest):"},{"line_number":225,"context_line":"    def setUp(self):"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        def add_endpoint(self, interface, url, region\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_dbbb34e3","line":224,"in_reply_to":"baa201ad_3dfa78bd","updated":"2014-10-15 06:19:14.000000000","message":"Honestly I wanted to demonstrate, that changes in keyword does not affect other code (tests). So it\u0027s expected inheritance.","commit_id":"98bf04531a1c88fd8610986d01b2ed703a7a51a5"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"161c6eb388883fe8314909e003b82c718f435636","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":235,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":236,"context_line":"        self.useFixture(fixture_)"},{"line_number":237,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def test_building_a_service_catalog(self):"},{"line_number":240,"context_line":"        auth_ref \u003d access.AccessInfo.factory(self.RESPONSE,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_7944d249","line":237,"updated":"2014-10-27 12:32:49.000000000","message":"I don\u0027t see where this is used?\n\nwhen you call add_endpoint the value returned is a dictionary that you can modify. so you can do: \n\ne \u003d s.add_endpoint(.....) \ne[\u0027region_id\u0027] \u003d e.pop(\u0027region\u0027) \n\nrather than monkey patch it. Once that has happened we can look at updating the fixture (though i\u0027m inclined to think the fixture should remain as the oldest possible code to make sure we always support the original way of doing things.","commit_id":"eefa504adbc79b2e5a3041112c7a1a110d218444"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"5388ce232afaed2b93aa1a444543cf2f545955a5","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":235,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":236,"context_line":"        self.useFixture(fixture_)"},{"line_number":237,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def test_building_a_service_catalog(self):"},{"line_number":240,"context_line":"        auth_ref \u003d access.AccessInfo.factory(self.RESPONSE,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_8fba5adf","line":237,"in_reply_to":"9aa7fdbe_7944d249","updated":"2014-11-21 14:59:40.000000000","message":"It\u0027s used to re-writing this staff: https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/fixture/v3.py#L28-L33\n\nBecause base _Service, used in tests has another method, which returns dict without new name of key.","commit_id":"eefa504adbc79b2e5a3041112c7a1a110d218444"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"98f780bd26ca3f102fb9d14a054d7fe91f8ad836","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                         \"https://compute.north.host/novapi/public\")"},{"line_number":246,"context_line":"        self.assertEqual(sc.url_for(service_type\u003d\u0027compute\u0027,"},{"line_number":247,"context_line":"                                    endpoint_type\u003d\u0027internal\u0027),"},{"line_number":248,"context_line":"                         \"https://compute.north.host/novapi/internal\")"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        self.assertRaises(exceptions.EndpointNotFound, sc.url_for, \"region_id\","},{"line_number":251,"context_line":"                          \"South\", service_type\u003d\u0027compute\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_d98b9966","line":248,"updated":"2014-11-28 12:52:52.000000000","message":"choose between single/double quotes... the file seems to be using single quotes everywhere","commit_id":"0f2fe3234968e88f291d454ab262f14f55a46f63"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ec7a9b63a9e92de3d9a465e959b72b452462550c","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                         \"https://compute.north.host/novapi/public\")"},{"line_number":246,"context_line":"        self.assertEqual(sc.url_for(service_type\u003d\u0027compute\u0027,"},{"line_number":247,"context_line":"                                    endpoint_type\u003d\u0027internal\u0027),"},{"line_number":248,"context_line":"                         \"https://compute.north.host/novapi/internal\")"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        self.assertRaises(exceptions.EndpointNotFound, sc.url_for, \"region_id\","},{"line_number":251,"context_line":"                          \"South\", service_type\u003d\u0027compute\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_79e54509","line":248,"in_reply_to":"5a890539_d98b9966","updated":"2014-11-28 13:02:21.000000000","message":"Done","commit_id":"0f2fe3234968e88f291d454ab262f14f55a46f63"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"7f7225eb9583d18906dd44297dd1f8e9957b5854","unresolved":false,"context_lines":[{"line_number":9,"context_line":"# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":"import fixtures"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"from keystoneclient import access"},{"line_number":15,"context_line":"from keystoneclient import exceptions"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_3e739116","line":12,"updated":"2014-12-17 16:39:27.000000000","message":"(nit) There should be a newline in between the license and the code.","commit_id":"675e302bf8f78fd30ba54d840be22f8820c0fe94"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"644a880a92f0e143a70e93740fe5acf7cec617d6","unresolved":false,"context_lines":[{"line_number":9,"context_line":"# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":"import fixtures"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"from keystoneclient import access"},{"line_number":15,"context_line":"from keystoneclient import exceptions"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_e885ac59","line":12,"in_reply_to":"3a961159_3e739116","updated":"2014-12-18 12:18:47.000000000","message":"Done","commit_id":"675e302bf8f78fd30ba54d840be22f8820c0fe94"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"7f7225eb9583d18906dd44297dd1f8e9957b5854","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        self.assertRaises(exceptions.EndpointNotFound, sc.url_for, \"region\","},{"line_number":54,"context_line":"                          \"South\", service_type\u003d\u0027compute\u0027)"},{"line_number":55,"context_line":"        self.assertRaises(exceptions.EndpointNotFound, sc.url_for, \"region_id\","},{"line_number":56,"context_line":"                          \"South\", service_type\u003d\u0027compute\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_service_catalog_endpoints(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_10f4f9cd","line":55,"updated":"2014-12-17 16:39:27.000000000","message":"I\u0027m not sure how useful this assertion is because I can change the string \"region_id\" to be whatever I want and get the correct exception.","commit_id":"675e302bf8f78fd30ba54d840be22f8820c0fe94"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"644a880a92f0e143a70e93740fe5acf7cec617d6","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        self.assertRaises(exceptions.EndpointNotFound, sc.url_for, \"region\","},{"line_number":54,"context_line":"                          \"South\", service_type\u003d\u0027compute\u0027)"},{"line_number":55,"context_line":"        self.assertRaises(exceptions.EndpointNotFound, sc.url_for, \"region_id\","},{"line_number":56,"context_line":"                          \"South\", service_type\u003d\u0027compute\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_service_catalog_endpoints(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_7e7252e4","line":55,"in_reply_to":"3a961159_10f4f9cd","updated":"2014-12-18 12:18:47.000000000","message":"ok, will remove, because it\u0027s piece of old code and really is not necessary here","commit_id":"675e302bf8f78fd30ba54d840be22f8820c0fe94"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"7f7225eb9583d18906dd44297dd1f8e9957b5854","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                          endpoint_type\u003d\u0027public\u0027)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"class ServiceCatalogV3Test(ServiceCatalogTest):"},{"line_number":225,"context_line":"    def setUp(self):"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        def add_endpoint(self, interface, url, region\u003dNone):"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_506761b7","line":224,"updated":"2014-12-17 16:39:27.000000000","message":"What cases is this actually testing?","commit_id":"675e302bf8f78fd30ba54d840be22f8820c0fe94"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"644a880a92f0e143a70e93740fe5acf7cec617d6","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                          endpoint_type\u003d\u0027public\u0027)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"class ServiceCatalogV3Test(ServiceCatalogTest):"},{"line_number":225,"context_line":"    def setUp(self):"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        def add_endpoint(self, interface, url, region\u003dNone):"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_b9185476","line":224,"in_reply_to":"3a961159_506761b7","updated":"2014-12-18 12:18:47.000000000","message":"This is same part of test like for V2.\nFirst test check that created service_catalog works as previously (and replacing region on region_id do not break existed logic/methods).\nThe second case check, that we can got correct endpoint in cases, when new region_id key is used.","commit_id":"675e302bf8f78fd30ba54d840be22f8820c0fe94"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7e5b495e56047c9f41dfdd9e9575e67f4d1d55c4","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_ef6e87c8","line":234,"updated":"2014-12-18 16:13:37.000000000","message":"Change the fixture code so that add_endpoint takes a parameter to use region_id rather than region rather than monkey-patching.","commit_id":"a9eaa669409d27d939f65ed00f25aa120cc10873"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"8ed396efe5a7e812faf35d30103cb242ca4c7116","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_4c160657","line":234,"in_reply_to":"3a961159_4faa3bd3","updated":"2014-12-30 10:34:08.000000000","message":"Brant, there is only one fixture for all tests and this fixture contains \u0027region\u0027 keyword.\nIf I create new one it takes a lot of redundant duplicate code, which returns necessary endpoint.\nAnother way is just add \u0027region_id\u0027 key without removing \u0027region\u0027, but it is not make sense, because this tests check, that catalog will work without \u0027region\u0027 keyword in data.\nSo I think, that current approach is simplest and  obvious for current situation.","commit_id":"a9eaa669409d27d939f65ed00f25aa120cc10873"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1b65bfb8d6ac65f2c9162e86e9996a0ebdb65e0b","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_4faa3bd3","line":234,"in_reply_to":"3a961159_ef6e87c8","updated":"2014-12-18 16:14:15.000000000","message":"Actually, the fixture should use region_id by default since this is how keystone works.","commit_id":"a9eaa669409d27d939f65ed00f25aa120cc10873"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f8cd3547a5a619dfc745a7988d452b8e7d8350b1","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_11294a89","line":234,"updated":"2015-01-02 22:11:00.000000000","message":"Monkeypatching a test fixture is confusing. Change the fixture so that it can generate the right data.","commit_id":"6c466c2018e5b14245adaf35e1f5c2c262702e78"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"c807dc790920640ab54f5a90ee222d131d059ec2","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa81d914_06f956e9","line":234,"in_reply_to":"3a961159_11294a89","updated":"2015-01-28 10:24:33.000000000","message":"I don\u0027t think,that it is possible: \n1. If I add new key in existing fixture, it will not verify way, when endpoint contains only region_id.\n2. if I want a create new one fixture, it will be a lot of lines duplicate code.","commit_id":"6c466c2018e5b14245adaf35e1f5c2c262702e78"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"02b90da0ff5cb19cd00a891d8399dce6f6061b30","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_f60eb43c","line":234,"in_reply_to":"3a961159_11294a89","updated":"2015-01-20 08:18:14.000000000","message":"or simply the value returned by the add_endpoint will be a dict (or subclass of) so build your own token and do:\n\ne \u003d s.add_endpoint(...)\ne[\u0027region_id\u0027] \u003d e.pop(\u0027region\u0027)","commit_id":"6c466c2018e5b14245adaf35e1f5c2c262702e78"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"c807dc790920640ab54f5a90ee222d131d059ec2","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa81d914_8600e6ab","line":234,"in_reply_to":"3a961159_f60eb43c","updated":"2015-01-28 10:24:33.000000000","message":"Could you explain where you offer to do it?\nAll tests below use service catalog object, and I can not re-define code inside its without mocking.\nAlso I can not use your example in setUp, because in this way service catalog still return endpoint without \u0027region_id\u0027.","commit_id":"6c466c2018e5b14245adaf35e1f5c2c262702e78"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fedf323b8afa20bdce46b35f8df777e55714f76c","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_96681ff7","line":234,"updated":"2015-02-01 15:32:12.000000000","message":"Rather than monkeypatching, pass a parameter to keystoneclient.fixture.v3._Service so that add_endpoint knows to work the way it needs to for this test.","commit_id":"b59bedf06ebbf39030df0e2da2bd906ed8796317"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"4e174721033cf65d1d6c58a4e202089c8e6f71c5","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_3e9b1819","line":234,"in_reply_to":"da86d52c_38b7d9d9","updated":"2015-02-12 11:21:32.000000000","message":"ok. I will just extend fixture in the same way it works and looks now.","commit_id":"b59bedf06ebbf39030df0e2da2bd906ed8796317"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"0bdb9388ef2faffcd28fd4ee250b57ea39615be6","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_38b7d9d9","line":234,"in_reply_to":"da86d52c_58056d0f","updated":"2015-02-11 14:34:17.000000000","message":"Fixture returns only region. The service side has such fix: https://review.openstack.org/#/c/118667/\n\nSo currently service returns both keys.\nCurrent test demonstrate situation, when endpoint does not have endpoint, which is preferable.","commit_id":"b59bedf06ebbf39030df0e2da2bd906ed8796317"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f56cae282bbb31bce844012c7b626a29c56708b4","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            return data"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        fixture_ \u003d fixtures.MonkeyPatch("},{"line_number":234,"context_line":"            \u0027keystoneclient.fixture.v3._Service.add_endpoint\u0027, add_endpoint)"},{"line_number":235,"context_line":"        self.useFixture(fixture_)"},{"line_number":236,"context_line":"        super(ServiceCatalogV3Test, self).setUp()"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_58056d0f","line":234,"in_reply_to":"da86d52c_96681ff7","updated":"2015-02-11 14:22:44.000000000","message":"Is the fixture actually wrong? Should the v3 fixture always return region_id or does the service actually switch between region and region_id?","commit_id":"b59bedf06ebbf39030df0e2da2bd906ed8796317"}]}
