)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0dfe14fd829297688efb4265952fc56c9c3bfb2b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Show v3 endpoints in v2 endpoint list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For endpoints not migrated from v2 endpoints, it\u0027s better to show them"},{"line_number":10,"context_line":"from v2 endpoint list API."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_e5732fe6","line":10,"updated":"2015-09-21 08:09:29.000000000","message":"better to mention the reason here, why should show them from v2 API, what\u0027s the impact if we don\u0027t show them.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"08011f6795c800ec719d5a276a3213de9ed595da","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Show v3 endpoints in v2 endpoint list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For endpoints not migrated from v2 endpoints, it\u0027s better to show them"},{"line_number":10,"context_line":"from v2 endpoint list API."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_100418be","line":10,"in_reply_to":"ba15a1d1_00f2d106","updated":"2015-09-22 14:33:02.000000000","message":"++ this doesn\u0027t make sense. Shouldn\u0027t it just be something like: Endpoints created using the V3 API were not being returned in the V2 API\u0027s endpoint list because of an issue in the way the data was being stored.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"3e5c7c29bfcc4f3b4453cf7af8d8187747572360","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Show v3 endpoints in v2 endpoint list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For endpoints not migrated from v2 endpoints, it\u0027s better to show them"},{"line_number":10,"context_line":"from v2 endpoint list API."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_d688d824","line":10,"in_reply_to":"ba15a1d1_100418be","updated":"2015-09-22 14:52:41.000000000","message":"it doesn\u0027t seem like an issue, but was done on purpose, from the old code, that endpoints created by v3 API were ignored.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d1a308dd70c8ef72619238843d2c09905a5b334e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Show v3 endpoints in v2 endpoint list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For endpoints not migrated from v2 endpoints, it\u0027s better to show them"},{"line_number":10,"context_line":"from v2 endpoint list API."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_f98e2ccf","line":10,"in_reply_to":"ba15a1d1_d688d824","updated":"2015-09-22 15:59:56.000000000","message":"Then change the text say why they were not being returned.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"27d0c76cae2dc47fe824a165e4afa9b8cdf29fb2","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Show v3 endpoints in v2 endpoint list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For endpoints not migrated from v2 endpoints, it\u0027s better to show them"},{"line_number":10,"context_line":"from v2 endpoint list API."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_00f2d106","line":10,"in_reply_to":"ba15a1d1_e5732fe6","updated":"2015-09-21 08:19:06.000000000","message":"OK, I\u0027ll try to improve that","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"cf483d0c90626469ea65175b7503f9693b6cafa7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Show v3 endpoints in v2 endpoint list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For endpoints not migrated from v2 endpoints, it\u0027s better to show them"},{"line_number":10,"context_line":"from v2 endpoint list API."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_17f88748","line":10,"in_reply_to":"ba15a1d1_f98e2ccf","updated":"2015-09-22 16:26:49.000000000","message":"Sure, thanks for all your advices.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"29b1617a274515bd6b8412e5e0b61811bfcf33b5","unresolved":false,"context_lines":[{"line_number":9,"context_line":"For endpoints not migrated from v2 endpoints, it\u0027s better to show them"},{"line_number":10,"context_line":"from v2 endpoint list API."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"},{"line_number":14,"context_line":"Closes-Bug: 1480270"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_4a49ca8d","line":12,"updated":"2015-09-21 07:27:43.000000000","message":"Just do a rebase on this commit in order to create a dependency.  The Depends-On tag is for cross-project dependencies.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"fed88e353d2da3596cdf9a03dec3952700862f73","unresolved":false,"context_lines":[{"line_number":9,"context_line":"For endpoints not migrated from v2 endpoints, it\u0027s better to show them"},{"line_number":10,"context_line":"from v2 endpoint list API."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"},{"line_number":14,"context_line":"Closes-Bug: 1480270"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_2931dd0b","line":12,"in_reply_to":"ba15a1d1_255b6730","updated":"2015-09-21 21:35:20.000000000","message":"You can safely remove this now.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"3594b3b53b5240dc807b2fbbe6f67e994762bceb","unresolved":false,"context_lines":[{"line_number":9,"context_line":"For endpoints not migrated from v2 endpoints, it\u0027s better to show them"},{"line_number":10,"context_line":"from v2 endpoint list API."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"},{"line_number":14,"context_line":"Closes-Bug: 1480270"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_255b6730","line":12,"in_reply_to":"ba15a1d1_4a49ca8d","updated":"2015-09-21 07:33:27.000000000","message":"True. A bit special in my case, that I\u0027m not sure if I\u0027m doing right on that commit. I don\u0027t want to base this commit on a uncertain commit.\nSo I added this line here so the tests won\u0027t fail. I\u0027ll remove this after that change is merged","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"29b1617a274515bd6b8412e5e0b61811bfcf33b5","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"},{"line_number":14,"context_line":"Closes-Bug: 1480270"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_ca5dda49","line":14,"updated":"2015-09-21 07:27:43.000000000","message":"NIT: but should be Closes-Bug: #1480270","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"3594b3b53b5240dc807b2fbbe6f67e994762bceb","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: I21b69ae6f0131c000f85cc353d092bd37d03b631"},{"line_number":13,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"},{"line_number":14,"context_line":"Closes-Bug: 1480270"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba15a1d1_056d03cc","line":14,"in_reply_to":"ba15a1d1_ca5dda49","updated":"2015-09-21 07:33:27.000000000","message":"right, will fix it","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":16523,"name":"ZhangLei","display_name":"ZhangLei","email":"zhang.lei@99cloud.net","username":"zhang.lei"},"change_message_id":"54d092c9bb084a2d4c57cd09e667385b3bf784e6","unresolved":false,"context_lines":[{"line_number":9,"context_line":"v3 endpoints that are not migrated from v2 endpoints, were not shown in"},{"line_number":10,"context_line":"v2 endpoint list. While it was more clear, seperating v2 and v3"},{"line_number":11,"context_line":"endpoints, it was not easy for tools or services which are still using"},{"line_number":12,"context_line":"v2 APIs to get the endpoints created by v3 API."},{"line_number":13,"context_line":"Since it won\u0027t do harm to return more information, this commit is to"},{"line_number":14,"context_line":"show v3 endpoints in API call to list v2 endpoints."},{"line_number":15,"context_line":"NOTE: public interface is required in a v2 endpoints, so only v3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a1a9d01_06d18dcd","line":12,"updated":"2015-09-25 02:38:28.000000000","message":"v3 APIs","commit_id":"99b5ae8aa8fcb2ace265b1e20ae2b2f1c61700e5"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"654b695523f73cbdbcc2320a1fc861d4249921c4","unresolved":false,"context_lines":[{"line_number":9,"context_line":"v3 endpoints that are not migrated from v2 endpoints, were not shown in"},{"line_number":10,"context_line":"v2 endpoint list. While it was more clear, seperating v2 and v3"},{"line_number":11,"context_line":"endpoints, it was not easy for tools or services which are still using"},{"line_number":12,"context_line":"v2 APIs to get the endpoints created by v3 API."},{"line_number":13,"context_line":"Since it won\u0027t do harm to return more information, this commit is to"},{"line_number":14,"context_line":"show v3 endpoints in API call to list v2 endpoints."},{"line_number":15,"context_line":"NOTE: public interface is required in a v2 endpoints, so only v3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a1a9d01_3a2607cf","line":12,"in_reply_to":"9a1a9d01_06d18dcd","updated":"2015-09-29 02:46:06.000000000","message":"it\u0027s not a typo. services are still using v2 APIs (generally, for all things) to get the endpoints created by v3 API (endpoints are created by the _one_ v3 API)","commit_id":"99b5ae8aa8fcb2ace265b1e20ae2b2f1c61700e5"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"b3aa89fbe3e96316ed854995c9320c36ab41b61e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Show v3 endpoints in v2 endpoint list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"v3 endpoints that are not migrated from v2 endpoints, were not shown in"},{"line_number":10,"context_line":"v2 endpoint list. While it was more clear, seperating v2 and v3"},{"line_number":11,"context_line":"endpoints, it was not easy for tools or services which are still using"},{"line_number":12,"context_line":"v2 APIs to get the endpoints created by v3 API."},{"line_number":13,"context_line":"Since it won\u0027t do harm to return more information, this commit is to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9a1a9d01_dbde7a10","line":10,"updated":"2015-09-29 18:25:18.000000000","message":"s/seperating/separating/","commit_id":"8ae6fbebbafea40689652e3572458068dfe8aaff"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"52d44a1d5d0269ab58de0252e7346422fbc424bf","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Show v3 endpoints in v2 endpoint list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"v3 endpoints that are not migrated from v2 endpoints, were not shown in"},{"line_number":10,"context_line":"v2 endpoint list. While it was more clear, seperating v2 and v3"},{"line_number":11,"context_line":"endpoints, it was not easy for tools or services which are still using"},{"line_number":12,"context_line":"v2 APIs to get the endpoints created by v3 API."},{"line_number":13,"context_line":"Since it won\u0027t do harm to return more information, this commit is to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9a1a9d01_44b6eaf9","line":10,"in_reply_to":"9a1a9d01_1414b79d","updated":"2015-09-30 13:32:56.000000000","message":"I think you can just update commit message in gerrit :)","commit_id":"8ae6fbebbafea40689652e3572458068dfe8aaff"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"eb41802819724e56a9d4b8c61a874484e5111e97","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Show v3 endpoints in v2 endpoint list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"v3 endpoints that are not migrated from v2 endpoints, were not shown in"},{"line_number":10,"context_line":"v2 endpoint list. While it was more clear, seperating v2 and v3"},{"line_number":11,"context_line":"endpoints, it was not easy for tools or services which are still using"},{"line_number":12,"context_line":"v2 APIs to get the endpoints created by v3 API."},{"line_number":13,"context_line":"Since it won\u0027t do harm to return more information, this commit is to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9a1a9d01_1414b79d","line":10,"in_reply_to":"9a1a9d01_dbde7a10","updated":"2015-09-30 00:31:26.000000000","message":"Thanks :)\n\nJust curious, if everything else is fine, should I commit another one to fix the typo?","commit_id":"8ae6fbebbafea40689652e3572458068dfe8aaff"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"041e1359c26e34d1b50d77943fa14a6294988e16","unresolved":false,"context_lines":[{"line_number":14,"context_line":"show v3 endpoints in API call to list v2 endpoints."},{"line_number":15,"context_line":"NOTE: public interface is required in a v2 endpoints, so only v3"},{"line_number":16,"context_line":"endpoints with public interface are added into the list."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Id9b3822f87e973b6eb7dd9fc715c2dba76b9fe04"},{"line_number":19,"context_line":"Closes-Bug: #1480270"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"9a1a9d01_b70a7277","line":17,"updated":"2015-10-01 07:40:28.000000000","message":"put APIImpact tag here.","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"}],"etc/keystone.conf.sample":[{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"51437b33c3e3099e6aa2e42decee7035c8b86243","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# The value passed as the keyword \"rounds\" to passlib\u0027s encrypt method."},{"line_number":52,"context_line":"# (integer value)"},{"line_number":53,"context_line":"# Minimum value: 1000"},{"line_number":54,"context_line":"# Maximum value: 100000"},{"line_number":55,"context_line":"#crypt_strength \u003d 10000"},{"line_number":56,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"da20952f_6f7b48f5","line":53,"updated":"2015-09-09 20:14:02.000000000","message":"How are the changes in this file related with the proposal of the patch?","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"778f3d64262ad643adb10b241d0e706cdc02afc1","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# The value passed as the keyword \"rounds\" to passlib\u0027s encrypt method."},{"line_number":52,"context_line":"# (integer value)"},{"line_number":53,"context_line":"# Minimum value: 1000"},{"line_number":54,"context_line":"# Maximum value: 100000"},{"line_number":55,"context_line":"#crypt_strength \u003d 10000"},{"line_number":56,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"da20952f_07cf07b4","line":53,"in_reply_to":"da20952f_6f7b48f5","updated":"2015-09-10 07:05:36.000000000","message":"++ revert these change since it\u0027s irrevlevant.","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"95c4e79b9010bf00ef1bf88e53d004ab4c644a82","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# The value passed as the keyword \"rounds\" to passlib\u0027s encrypt method."},{"line_number":52,"context_line":"# (integer value)"},{"line_number":53,"context_line":"# Minimum value: 1000"},{"line_number":54,"context_line":"# Maximum value: 100000"},{"line_number":55,"context_line":"#crypt_strength \u003d 10000"},{"line_number":56,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"da20952f_c484b2d4","line":53,"in_reply_to":"da20952f_6f7b48f5","updated":"2015-09-10 07:59:54.000000000","message":"Must be generated by tox. It\u0027s gone after I rebased to latest master.\nI should\u0027ve been more careful","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"}],"keystone/catalog/controllers.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"778f3d64262ad643adb10b241d0e706cdc02afc1","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        for endpoint in self.catalog_api.list_endpoints():"},{"line_number":72,"context_line":"            # tell endpoints apart by the combination of"},{"line_number":73,"context_line":"            # service_id and region_id"},{"line_number":74,"context_line":"            key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":75,"context_line":"            if key not in endpoints:"},{"line_number":76,"context_line":"                ep \u003d endpoint.copy()"},{"line_number":77,"context_line":"                ep[\u0027id\u0027] \u003d ep.pop(\u0027legacy_endpoint_id\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_820b052b","line":74,"updated":"2015-09-10 07:05:36.000000000","message":"are you assume the combination of \u0027service_id\u0027 and \u0027region_id\u0027 is the key of the endpoint? where is this assumption based?","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"95c4e79b9010bf00ef1bf88e53d004ab4c644a82","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        for endpoint in self.catalog_api.list_endpoints():"},{"line_number":72,"context_line":"            # tell endpoints apart by the combination of"},{"line_number":73,"context_line":"            # service_id and region_id"},{"line_number":74,"context_line":"            key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":75,"context_line":"            if key not in endpoints:"},{"line_number":76,"context_line":"                ep \u003d endpoint.copy()"},{"line_number":77,"context_line":"                ep[\u0027id\u0027] \u003d ep.pop(\u0027legacy_endpoint_id\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_3d6d7b32","line":74,"in_reply_to":"da20952f_820b052b","updated":"2015-09-10 07:59:54.000000000","message":"As I understand, one service has one group of endpoints (with different interface) in one region. I don\u0027t see the point of having two groups, and in the case this is true, I think there is no way to tell the differences between two groups of v3 endpoints with same service_id and region_id.","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"778f3d64262ad643adb10b241d0e706cdc02afc1","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            else:"},{"line_number":84,"context_line":"                ep \u003d endpoints[key]"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"            # add the legacy endpoint with an interface url"},{"line_number":87,"context_line":"            ep[\u0027%surl\u0027 % endpoint[\u0027interface\u0027]] \u003d endpoint[\u0027url\u0027]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            # assign v3 endpoint id with public url to v2 endpoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_c7334f61","line":86,"updated":"2015-09-10 07:05:36.000000000","message":"you are not just dealing with the legacy endpoint here but all of the endpoints.","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"95c4e79b9010bf00ef1bf88e53d004ab4c644a82","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            else:"},{"line_number":84,"context_line":"                ep \u003d endpoints[key]"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"            # add the legacy endpoint with an interface url"},{"line_number":87,"context_line":"            ep[\u0027%surl\u0027 % endpoint[\u0027interface\u0027]] \u003d endpoint[\u0027url\u0027]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            # assign v3 endpoint id with public url to v2 endpoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_fdfb8345","line":86,"in_reply_to":"da20952f_c7334f61","updated":"2015-09-10 07:59:54.000000000","message":"Right, my bad. I should separate the logic to make it clear.","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"778f3d64262ad643adb10b241d0e706cdc02afc1","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            # assign v3 endpoint id with public url to v2 endpoint"},{"line_number":90,"context_line":"            # as legacy_endpoint_id"},{"line_number":91,"context_line":"            if endpoint[\u0027interface\u0027] \u003d\u003d \u0027public\u0027 and ep[\u0027id\u0027] is None:"},{"line_number":92,"context_line":"                ep[\u0027id\u0027] \u003d endpoint[\u0027id\u0027]"},{"line_number":93,"context_line":"        # Public URL is required for v2 endpoints. This is to filter out"},{"line_number":94,"context_line":"        # endpoints generated from v3 endpoints without public URL."}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_224c799c","line":91,"updated":"2015-09-10 07:05:36.000000000","message":"These looks like hacking, you can get all of the endpoints and then write a method to covert it into V2 endpoints if it\u0027s V3 formatted, then it looks more clear I think.","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"95c4e79b9010bf00ef1bf88e53d004ab4c644a82","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            # assign v3 endpoint id with public url to v2 endpoint"},{"line_number":90,"context_line":"            # as legacy_endpoint_id"},{"line_number":91,"context_line":"            if endpoint[\u0027interface\u0027] \u003d\u003d \u0027public\u0027 and ep[\u0027id\u0027] is None:"},{"line_number":92,"context_line":"                ep[\u0027id\u0027] \u003d endpoint[\u0027id\u0027]"},{"line_number":93,"context_line":"        # Public URL is required for v2 endpoints. This is to filter out"},{"line_number":94,"context_line":"        # endpoints generated from v3 endpoints without public URL."}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_7db5337c","line":91,"in_reply_to":"da20952f_224c799c","updated":"2015-09-10 07:59:54.000000000","message":"Thanks, I\u0027ll try.","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"51437b33c3e3099e6aa2e42decee7035c8b86243","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            # as legacy_endpoint_id"},{"line_number":91,"context_line":"            if endpoint[\u0027interface\u0027] \u003d\u003d \u0027public\u0027 and ep[\u0027id\u0027] is None:"},{"line_number":92,"context_line":"                ep[\u0027id\u0027] \u003d endpoint[\u0027id\u0027]"},{"line_number":93,"context_line":"        # Public URL is required for v2 endpoints. This is to filter out"},{"line_number":94,"context_line":"        # endpoints generated from v3 endpoints without public URL."},{"line_number":95,"context_line":"        return {\u0027endpoints\u0027:"},{"line_number":96,"context_line":"                [e for e in endpoints.values() if \u0027publicurl\u0027 in e]}"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_ef72f7af","line":93,"updated":"2015-09-09 20:14:02.000000000","message":"You need tests for this","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"95c4e79b9010bf00ef1bf88e53d004ab4c644a82","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            # as legacy_endpoint_id"},{"line_number":91,"context_line":"            if endpoint[\u0027interface\u0027] \u003d\u003d \u0027public\u0027 and ep[\u0027id\u0027] is None:"},{"line_number":92,"context_line":"                ep[\u0027id\u0027] \u003d endpoint[\u0027id\u0027]"},{"line_number":93,"context_line":"        # Public URL is required for v2 endpoints. This is to filter out"},{"line_number":94,"context_line":"        # endpoints generated from v3 endpoints without public URL."},{"line_number":95,"context_line":"        return {\u0027endpoints\u0027:"},{"line_number":96,"context_line":"                [e for e in endpoints.values() if \u0027publicurl\u0027 in e]}"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_bdd2eb32","line":93,"in_reply_to":"da20952f_ef72f7af","updated":"2015-09-10 07:59:54.000000000","message":"Right, thanks!","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0dfe14fd829297688efb4265952fc56c9c3bfb2b","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        legacy_endpoints \u003d {}"},{"line_number":71,"context_line":"        v3_endpoints \u003d {}"},{"line_number":72,"context_line":"        for endpoint in self.catalog_api.list_endpoints():"},{"line_number":73,"context_line":"            if not endpoint.get(\u0027legacy_endpoint_id\u0027):  # pure v3 endpoint"},{"line_number":74,"context_line":"                # tell endpoints apart by the combination of"},{"line_number":75,"context_line":"                # service_id and region_id."},{"line_number":76,"context_line":"                # Notice: in theory, it\u0027s possible that there are more than one"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_4578dbf8","line":73,"updated":"2015-09-21 08:09:29.000000000","message":"this is not C or Java, pls comment on top of this line.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"3e5c7c29bfcc4f3b4453cf7af8d8187747572360","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        legacy_endpoints \u003d {}"},{"line_number":71,"context_line":"        v3_endpoints \u003d {}"},{"line_number":72,"context_line":"        for endpoint in self.catalog_api.list_endpoints():"},{"line_number":73,"context_line":"            if not endpoint.get(\u0027legacy_endpoint_id\u0027):  # pure v3 endpoint"},{"line_number":74,"context_line":"                # tell endpoints apart by the combination of"},{"line_number":75,"context_line":"                # service_id and region_id."},{"line_number":76,"context_line":"                # Notice: in theory, it\u0027s possible that there are more than one"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_96e7c0e3","line":73,"in_reply_to":"ba15a1d1_4578dbf8","updated":"2015-09-22 14:52:41.000000000","message":"it\u0027s fine for \"if\", but it looks weird to me when the comment line is above \"else\", which seems belong to \"if\"","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"08011f6795c800ec719d5a276a3213de9ed595da","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        legacy_endpoints \u003d {}"},{"line_number":71,"context_line":"        v3_endpoints \u003d {}"},{"line_number":72,"context_line":"        for endpoint in self.catalog_api.list_endpoints():"},{"line_number":73,"context_line":"            if not endpoint.get(\u0027legacy_endpoint_id\u0027):  # pure v3 endpoint"},{"line_number":74,"context_line":"                # tell endpoints apart by the combination of"},{"line_number":75,"context_line":"                # service_id and region_id."},{"line_number":76,"context_line":"                # Notice: in theory, it\u0027s possible that there are more than one"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_b0e0ccfb","line":73,"in_reply_to":"ba15a1d1_4578dbf8","updated":"2015-09-22 14:33:02.000000000","message":"this actually doesn\u0027t bother me","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0dfe14fd829297688efb4265952fc56c9c3bfb2b","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            if not endpoint.get(\u0027legacy_endpoint_id\u0027):  # pure v3 endpoint"},{"line_number":74,"context_line":"                # tell endpoints apart by the combination of"},{"line_number":75,"context_line":"                # service_id and region_id."},{"line_number":76,"context_line":"                # Notice: in theory, it\u0027s possible that there are more than one"},{"line_number":77,"context_line":"                # endpoint of one service, one region and one interface,"},{"line_number":78,"context_line":"                # but in practice, it makes no sense because only one will be"},{"line_number":79,"context_line":"                # used."}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_2587e7d8","line":76,"updated":"2015-09-21 08:09:29.000000000","message":"I think you want to use NOTE instead of Notice?","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"27d0c76cae2dc47fe824a165e4afa9b8cdf29fb2","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            if not endpoint.get(\u0027legacy_endpoint_id\u0027):  # pure v3 endpoint"},{"line_number":74,"context_line":"                # tell endpoints apart by the combination of"},{"line_number":75,"context_line":"                # service_id and region_id."},{"line_number":76,"context_line":"                # Notice: in theory, it\u0027s possible that there are more than one"},{"line_number":77,"context_line":"                # endpoint of one service, one region and one interface,"},{"line_number":78,"context_line":"                # but in practice, it makes no sense because only one will be"},{"line_number":79,"context_line":"                # used."}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_007bb17c","line":76,"in_reply_to":"ba15a1d1_2587e7d8","updated":"2015-09-21 08:19:06.000000000","message":"OK, not quite familiar about the convention. Thanks","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0dfe14fd829297688efb4265952fc56c9c3bfb2b","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                # used."},{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"},{"line_number":83,"context_line":"                # is this a legacy endpoint we haven\u0027t indexed yet?"},{"line_number":84,"context_line":"                if endpoint[\u0027legacy_endpoint_id\u0027] not in legacy_endpoints:"},{"line_number":85,"context_line":"                    legacy_ep \u003d endpoint.copy()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_45c69b17","line":82,"updated":"2015-09-21 08:09:29.000000000","message":"same here, this is not how the comments is given.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0dfe14fd829297688efb4265952fc56c9c3bfb2b","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"},{"line_number":83,"context_line":"                # is this a legacy endpoint we haven\u0027t indexed yet?"},{"line_number":84,"context_line":"                if endpoint[\u0027legacy_endpoint_id\u0027] not in legacy_endpoints:"},{"line_number":85,"context_line":"                    legacy_ep \u003d endpoint.copy()"},{"line_number":86,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d legacy_ep.pop(\u0027legacy_endpoint_id\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_05d0a3c8","line":83,"updated":"2015-09-21 08:09:29.000000000","message":"use FIXME or TODO.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"27d0c76cae2dc47fe824a165e4afa9b8cdf29fb2","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"},{"line_number":83,"context_line":"                # is this a legacy endpoint we haven\u0027t indexed yet?"},{"line_number":84,"context_line":"                if endpoint[\u0027legacy_endpoint_id\u0027] not in legacy_endpoints:"},{"line_number":85,"context_line":"                    legacy_ep \u003d endpoint.copy()"},{"line_number":86,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d legacy_ep.pop(\u0027legacy_endpoint_id\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_60862d67","line":83,"in_reply_to":"ba15a1d1_05d0a3c8","updated":"2015-09-21 08:19:06.000000000","message":"I didn\u0027t change this, which is actually not a question, but the explanation of the following if statement.\nwell, I think it\u0027s quite clear and the comment is unnecessary. I\u0027ll remove it in next commit","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"08011f6795c800ec719d5a276a3213de9ed595da","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                # endpoint uses public endpoint\u0027s id as its id, which can also"},{"line_number":110,"context_line":"                # be an indicator whether a public v3 endpoint is present."},{"line_number":111,"context_line":"                if endpoint[\u0027interface\u0027] \u003d\u003d \u0027public\u0027:"},{"line_number":112,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d endpoint[\u0027id\u0027]"},{"line_number":113,"context_line":"                legacy_ep[\u0027%surl\u0027 % endpoint[\u0027interface\u0027]] \u003d endpoint[\u0027url\u0027]"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"            # this means there is no public URL of this group of v3 endpoints"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_8bdd5d44","line":112,"updated":"2015-09-22 14:33:02.000000000","message":"Why only an ID for public endpoints? In the old code it looks like there is always an ID.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d1a308dd70c8ef72619238843d2c09905a5b334e","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                # endpoint uses public endpoint\u0027s id as its id, which can also"},{"line_number":110,"context_line":"                # be an indicator whether a public v3 endpoint is present."},{"line_number":111,"context_line":"                if endpoint[\u0027interface\u0027] \u003d\u003d \u0027public\u0027:"},{"line_number":112,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d endpoint[\u0027id\u0027]"},{"line_number":113,"context_line":"                legacy_ep[\u0027%surl\u0027 % endpoint[\u0027interface\u0027]] \u003d endpoint[\u0027url\u0027]"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"            # this means there is no public URL of this group of v3 endpoints"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_5944f872","line":112,"in_reply_to":"ba15a1d1_16fdf039","updated":"2015-09-22 15:59:56.000000000","message":"What happens when someone does a GET for that endpoint ID under V2?","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"cf483d0c90626469ea65175b7503f9693b6cafa7","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                # endpoint uses public endpoint\u0027s id as its id, which can also"},{"line_number":110,"context_line":"                # be an indicator whether a public v3 endpoint is present."},{"line_number":111,"context_line":"                if endpoint[\u0027interface\u0027] \u003d\u003d \u0027public\u0027:"},{"line_number":112,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d endpoint[\u0027id\u0027]"},{"line_number":113,"context_line":"                legacy_ep[\u0027%surl\u0027 % endpoint[\u0027interface\u0027]] \u003d endpoint[\u0027url\u0027]"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"            # this means there is no public URL of this group of v3 endpoints"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_d7ca0f1a","line":112,"in_reply_to":"ba15a1d1_5944f872","updated":"2015-09-22 16:26:49.000000000","message":"there is no API for that. So I assume it\u0027s safe to do it.\nclient who want to get one endpoint, has to get the whole list and finding the specific endpoint there, in which case, the returned result is consistent.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"3e5c7c29bfcc4f3b4453cf7af8d8187747572360","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                # endpoint uses public endpoint\u0027s id as its id, which can also"},{"line_number":110,"context_line":"                # be an indicator whether a public v3 endpoint is present."},{"line_number":111,"context_line":"                if endpoint[\u0027interface\u0027] \u003d\u003d \u0027public\u0027:"},{"line_number":112,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d endpoint[\u0027id\u0027]"},{"line_number":113,"context_line":"                legacy_ep[\u0027%surl\u0027 % endpoint[\u0027interface\u0027]] \u003d endpoint[\u0027url\u0027]"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"            # this means there is no public URL of this group of v3 endpoints"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_16fdf039","line":112,"in_reply_to":"ba15a1d1_8bdd5d44","updated":"2015-09-22 14:52:41.000000000","message":"v3 has (usually) 3 endpoints for a service in a region (so 3 ids), v2 has one endpoint for all interfaces (so 1 id).\nhere the logic is to assign v3 pubic interface\u0027s id as the returned v2 endpoint\u0027s id, to have a consistent id","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"b3aa89fbe3e96316ed854995c9320c36ab41b61e","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                # but in practice, it makes no sense because only one will be"},{"line_number":79,"context_line":"                # used."},{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"},{"line_number":83,"context_line":"                # is this a legacy endpoint we haven\u0027t indexed yet?"},{"line_number":84,"context_line":"                if endpoint[\u0027legacy_endpoint_id\u0027] not in legacy_endpoints:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_1b7f12ac","line":81,"updated":"2015-09-29 18:25:18.000000000","message":"If you want to use only 1 endpoint then you should do something like this:\n\nv3_endpoints.setdefault(key, endpoint)\n\nwithout any list stuff you are unpacking below.\n\nIt\u0027s also better to look for public endpoint here too.","commit_id":"8ae6fbebbafea40689652e3572458068dfe8aaff"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"eb41802819724e56a9d4b8c61a874484e5111e97","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                # but in practice, it makes no sense because only one will be"},{"line_number":79,"context_line":"                # used."},{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"},{"line_number":83,"context_line":"                # is this a legacy endpoint we haven\u0027t indexed yet?"},{"line_number":84,"context_line":"                if endpoint[\u0027legacy_endpoint_id\u0027] not in legacy_endpoints:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_f4002368","line":81,"in_reply_to":"9a1a9d01_1b7f12ac","updated":"2015-09-30 00:31:26.000000000","message":"It\u0027s v3 endpoints, so it\u0027s a list, not a single endpoint.\nGenerally, one service and one region has three endpoints: public, admin and internal ones. The list is traversed on line 108.\n\nAs for the public endpoint, surely it can be done here, but it looks more clear this way IMO. Actually, I did it in the first few commits, and I agreed with a comment that the logic is more clear with separation.","commit_id":"8ae6fbebbafea40689652e3572458068dfe8aaff"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"52d44a1d5d0269ab58de0252e7346422fbc424bf","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                # but in practice, it makes no sense because only one will be"},{"line_number":79,"context_line":"                # used."},{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"},{"line_number":83,"context_line":"                # is this a legacy endpoint we haven\u0027t indexed yet?"},{"line_number":84,"context_line":"                if endpoint[\u0027legacy_endpoint_id\u0027] not in legacy_endpoints:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_2425f65a","line":81,"in_reply_to":"9a1a9d01_f4002368","updated":"2015-09-30 13:32:56.000000000","message":"Ok, I\u0027m not strict about that","commit_id":"8ae6fbebbafea40689652e3572458068dfe8aaff"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"b3aa89fbe3e96316ed854995c9320c36ab41b61e","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                # be an indicator whether a public v3 endpoint is present."},{"line_number":112,"context_line":"                # It\u0027s safe to do so is also because that there is no v2 API to"},{"line_number":113,"context_line":"                # get an endpoint by endpoint ID."},{"line_number":114,"context_line":"                if endpoint[\u0027interface\u0027] \u003d\u003d \u0027public\u0027:"},{"line_number":115,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d endpoint[\u0027id\u0027]"},{"line_number":116,"context_line":"                legacy_ep[\u0027%surl\u0027 % endpoint[\u0027interface\u0027]] \u003d endpoint[\u0027url\u0027]"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_763985d6","line":114,"updated":"2015-09-29 18:25:18.000000000","message":"You can move this check to line:81 to select required endpoint instead of collecting everything.","commit_id":"8ae6fbebbafea40689652e3572458068dfe8aaff"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"f7511b852e096ba6eea6a5110d1a2c1d1f49ad09","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        legacy_endpoints \u003d {}"},{"line_number":71,"context_line":"        v3_endpoints \u003d {}"},{"line_number":72,"context_line":"        for endpoint in self.catalog_api.list_endpoints():"},{"line_number":73,"context_line":"            if not endpoint.get(\u0027legacy_endpoint_id\u0027):  # pure v3 endpoint"},{"line_number":74,"context_line":"                # tell endpoints apart by the combination of"},{"line_number":75,"context_line":"                # service_id and region_id."},{"line_number":76,"context_line":"                # NOTE(tony): in theory, it\u0027s possible that there are more than"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_32c3068b","line":73,"updated":"2015-09-30 07:07:18.000000000","message":"nit: I would prefer switching the if/else condition, positive check for v2 is easier to READ than the negative check to see if its v3.","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"32399c05b52347f6b54062acf1d466e10dd6bddb","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        legacy_endpoints \u003d {}"},{"line_number":71,"context_line":"        v3_endpoints \u003d {}"},{"line_number":72,"context_line":"        for endpoint in self.catalog_api.list_endpoints():"},{"line_number":73,"context_line":"            if not endpoint.get(\u0027legacy_endpoint_id\u0027):  # pure v3 endpoint"},{"line_number":74,"context_line":"                # tell endpoints apart by the combination of"},{"line_number":75,"context_line":"                # service_id and region_id."},{"line_number":76,"context_line":"                # NOTE(tony): in theory, it\u0027s possible that there are more than"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_357690d7","line":73,"in_reply_to":"9a1a9d01_32c3068b","updated":"2015-09-30 07:29:05.000000000","message":"I prefer this way because the logic for v3 is simpler (regardless the processing later), and implicitly v3 is in higher priority than v2 (though it\u0027s v2 API).\nYou\u0027re right about readability. I hope you\u0027re OK with current order.","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"35edc6eb6e56ce9786c4f9000fd4735ffbf7de37","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                # NOTE(muyu): in theory, it\u0027s possible that there are more than"},{"line_number":77,"context_line":"                # one endpoint of one service, one region and one interface,"},{"line_number":78,"context_line":"                # but in practice, it makes no sense because only one will be"},{"line_number":79,"context_line":"                # used."},{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a1a9d01_504d4098","line":79,"updated":"2015-09-30 14:42:11.000000000","message":"merge these comments together to be one uniform piece of information.","commit_id":"d979a40fa46623a4b9da47cc86af335ea07ea450"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"e7188a741073f0bd2e4c041d9681e8c5e1310203","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                # NOTE(muyu): in theory, it\u0027s possible that there are more than"},{"line_number":77,"context_line":"                # one endpoint of one service, one region and one interface,"},{"line_number":78,"context_line":"                # but in practice, it makes no sense because only one will be"},{"line_number":79,"context_line":"                # used."},{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a1a9d01_f6756cca","line":79,"in_reply_to":"9a1a9d01_504d4098","updated":"2015-09-30 15:14:35.000000000","message":"Thanks, but is there some guideline about that?\nAs in this case, I think they belong to two paragraph. The NOTE part is like a footnote.","commit_id":"d979a40fa46623a4b9da47cc86af335ea07ea450"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"35edc6eb6e56ce9786c4f9000fd4735ffbf7de37","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"},{"line_number":83,"context_line":"                # is this a legacy endpoint we haven\u0027t indexed yet?"},{"line_number":84,"context_line":"                if endpoint[\u0027legacy_endpoint_id\u0027] not in legacy_endpoints:"},{"line_number":85,"context_line":"                    legacy_ep \u003d endpoint.copy()"},{"line_number":86,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d legacy_ep.pop(\u0027legacy_endpoint_id\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a1a9d01_30468c7b","line":83,"updated":"2015-09-30 14:42:11.000000000","message":"same comment here","commit_id":"d979a40fa46623a4b9da47cc86af335ea07ea450"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"e7188a741073f0bd2e4c041d9681e8c5e1310203","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"},{"line_number":83,"context_line":"                # is this a legacy endpoint we haven\u0027t indexed yet?"},{"line_number":84,"context_line":"                if endpoint[\u0027legacy_endpoint_id\u0027] not in legacy_endpoints:"},{"line_number":85,"context_line":"                    legacy_ep \u003d endpoint.copy()"},{"line_number":86,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d legacy_ep.pop(\u0027legacy_endpoint_id\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a1a9d01_2a129857","line":83,"in_reply_to":"9a1a9d01_30468c7b","updated":"2015-09-30 15:14:35.000000000","message":"Oops, this comment should be removed, but I forgot to.","commit_id":"d979a40fa46623a4b9da47cc86af335ea07ea450"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"181c7e5c72cdcd6f73e86668e261456c9f8c2c90","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # convert collected v3 endpoints into v2 endpoints"},{"line_number":101,"context_line":"        for endpoints in v3_endpoints.values():"},{"line_number":102,"context_line":"            legacy_ep \u003d endpoints[0].copy()"},{"line_number":103,"context_line":"            legacy_ep.pop(\u0027id\u0027)"},{"line_number":104,"context_line":"            legacy_ep.pop(\u0027legacy_endpoint_id\u0027)"},{"line_number":105,"context_line":"            legacy_ep.pop(\u0027interface\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a1a9d01_ce00c736","line":102,"updated":"2015-10-01 01:14:21.000000000","message":"A side-effect of doing this is that the v3 endpoint will have a name, description and maybe other things that don\u0027t appear in the v2 endpoints in the same list. Is that intended?","commit_id":"d979a40fa46623a4b9da47cc86af335ea07ea450"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"3e7a753ddacfbaa2f307c82437f6d95da1eee489","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # convert collected v3 endpoints into v2 endpoints"},{"line_number":101,"context_line":"        for endpoints in v3_endpoints.values():"},{"line_number":102,"context_line":"            legacy_ep \u003d endpoints[0].copy()"},{"line_number":103,"context_line":"            legacy_ep.pop(\u0027id\u0027)"},{"line_number":104,"context_line":"            legacy_ep.pop(\u0027legacy_endpoint_id\u0027)"},{"line_number":105,"context_line":"            legacy_ep.pop(\u0027interface\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a1a9d01_3dbde901","line":102,"in_reply_to":"9a1a9d01_ce00c736","updated":"2015-10-01 01:29:33.000000000","message":"It\u0027s not. However, the old code (line 85) handles it the same way (I\u0027m not sure if the endpoint cannot be changed after migrated from v2 though).\nI haven\u0027t seen how a _real_ v2 endpoint looks like, if it has not \"extra\" field, I think just popping it will do.","commit_id":"d979a40fa46623a4b9da47cc86af335ea07ea450"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"8f5cda6612b6d08e760e668a8164237e1c75702f","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        legacy_endpoints \u003d {}"},{"line_number":71,"context_line":"        v3_endpoints \u003d {}"},{"line_number":72,"context_line":"        for endpoint in self.catalog_api.list_endpoints():"},{"line_number":73,"context_line":"            if not endpoint.get(\u0027legacy_endpoint_id\u0027):  # pure v3 endpoint"},{"line_number":74,"context_line":"                # tell endpoints apart by the combination of"},{"line_number":75,"context_line":"                # service_id and region_id."},{"line_number":76,"context_line":"                # NOTE(muyu): in theory, it\u0027s possible that there are more than"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_46b80e2a","line":73,"updated":"2015-10-01 04:54:00.000000000","message":"nit: the word pure doesn\u0027t make sense, we don\u0027t have a mixed v3 endpoint. v3 endpoint is just v3 endpoint :)","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"acd9ff58c4db636e7307e18ef19575ad4284fe32","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        legacy_endpoints \u003d {}"},{"line_number":71,"context_line":"        v3_endpoints \u003d {}"},{"line_number":72,"context_line":"        for endpoint in self.catalog_api.list_endpoints():"},{"line_number":73,"context_line":"            if not endpoint.get(\u0027legacy_endpoint_id\u0027):  # pure v3 endpoint"},{"line_number":74,"context_line":"                # tell endpoints apart by the combination of"},{"line_number":75,"context_line":"                # service_id and region_id."},{"line_number":76,"context_line":"                # NOTE(muyu): in theory, it\u0027s possible that there are more than"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_46eb29dc","line":73,"in_reply_to":"9a1a9d01_46b80e2a","updated":"2015-10-01 08:54:04.000000000","message":"I just don\u0027t know a better word to describe the difference with the endpoints migrated from v2","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"27235cbb992220c8d7a282fb2a6bb6f35ffd02ad","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                # used."},{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"},{"line_number":83,"context_line":"                if endpoint[\u0027legacy_endpoint_id\u0027] not in legacy_endpoints:"},{"line_number":84,"context_line":"                    legacy_ep \u003d endpoint.copy()"},{"line_number":85,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d legacy_ep.pop(\u0027legacy_endpoint_id\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_91941e8b","line":82,"updated":"2015-10-01 06:09:57.000000000","message":"just throw out a question here, what it will be if the v2 endpoint doesn\u0027t has public interface? return or not return?","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"acd9ff58c4db636e7307e18ef19575ad4284fe32","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                # used."},{"line_number":80,"context_line":"                key \u003d (endpoint[\u0027service_id\u0027], endpoint[\u0027region_id\u0027])"},{"line_number":81,"context_line":"                v3_endpoints.setdefault(key, []).append(endpoint)"},{"line_number":82,"context_line":"            else:  # legacy endpoint"},{"line_number":83,"context_line":"                if endpoint[\u0027legacy_endpoint_id\u0027] not in legacy_endpoints:"},{"line_number":84,"context_line":"                    legacy_ep \u003d endpoint.copy()"},{"line_number":85,"context_line":"                    legacy_ep[\u0027id\u0027] \u003d legacy_ep.pop(\u0027legacy_endpoint_id\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_461a49c7","line":82,"in_reply_to":"9a1a9d01_91941e8b","updated":"2015-10-01 08:54:04.000000000","message":"public interface is required, as in the create_endpoint method in this class. I don\u0027t think we need to consider if the user manually update the database.","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"8f5cda6612b6d08e760e668a8164237e1c75702f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            # used. So only necessary attributes are used here."},{"line_number":105,"context_line":"            # It\u0027s different for legacy v2 endpoints, which are created"},{"line_number":106,"context_line":"            # with the same \"extra\" value when being migrated."},{"line_number":107,"context_line":"            for key in (\u0027service_id\u0027, \u0027enabled\u0027):"},{"line_number":108,"context_line":"                legacy_ep[key] \u003d endpoints[0][key]"},{"line_number":109,"context_line":"            legacy_ep[\u0027region\u0027] \u003d endpoints[0][\u0027region_id\u0027]"},{"line_number":110,"context_line":"            for endpoint in endpoints:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_a649ea32","line":107,"updated":"2015-10-01 04:54:00.000000000","message":"much cleaner than previous version","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"}],"keystone/tests/unit/test_catalog.py":[{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"51437b33c3e3099e6aa2e42decee7035c8b86243","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class V2CatalogTestCase(rest.RestfulTestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(V2CatalogTestCase, self).setUp()"},{"line_number":31,"context_line":"        self.useFixture(database.Database())"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_8f925cf5","line":28,"updated":"2015-09-09 20:14:02.000000000","message":"remove this new line","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"51437b33c3e3099e6aa2e42decee7035c8b86243","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        for field, value in req_body[\u0027endpoint\u0027].items():"},{"line_number":96,"context_line":"            self.assertEqual(response.result[\u0027endpoint\u0027][field], value)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_get_v3_endpoint(self):"},{"line_number":99,"context_line":"        # create a service"},{"line_number":100,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":101,"context_line":"        service \u003d self.new_service_ref()"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_af55dffa","line":98,"updated":"2015-09-09 20:14:02.000000000","message":"what about renaming it to something like test_v3_endpoint_visible_from_v2","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"1f2dd7a3d53907c1d70a883c0a1964b94738bc35","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        for field, value in req_body[\u0027endpoint\u0027].items():"},{"line_number":96,"context_line":"            self.assertEqual(response.result[\u0027endpoint\u0027][field], value)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_get_v3_endpoint(self):"},{"line_number":99,"context_line":"        # create a service"},{"line_number":100,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":101,"context_line":"        service \u003d self.new_service_ref()"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_3f4dc8c4","line":98,"in_reply_to":"da20952f_af55dffa","updated":"2015-09-19 03:23:18.000000000","message":"this is a good suggestion","commit_id":"1dd8a79c2f154ca903a2a4ecb677cb09170201a4"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0dfe14fd829297688efb4265952fc56c9c3bfb2b","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        for field, value in req_body[\u0027endpoint\u0027].items():"},{"line_number":84,"context_line":"            self.assertEqual(response.result[\u0027endpoint\u0027][field], value)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_pure_v3_endpoint_visible_from_v2(self):"},{"line_number":87,"context_line":"        # create a service"},{"line_number":88,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":89,"context_line":"        service \u003d unit.new_service_ref()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_c5886bc9","line":86,"updated":"2015-09-21 08:09:29.000000000","message":"the name of testcase is not clear enough, what about the mix of v2 and v3 endpoints, should them visible by v2 API? I guess so, so why hightlight \u0027pure\u0027 here?","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"fc0d4652dcc084fe39e7e31f7a3b92edd5639b4c","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        for field, value in req_body[\u0027endpoint\u0027].items():"},{"line_number":84,"context_line":"            self.assertEqual(response.result[\u0027endpoint\u0027][field], value)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_pure_v3_endpoint_visible_from_v2(self):"},{"line_number":87,"context_line":"        # create a service"},{"line_number":88,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":89,"context_line":"        service \u003d unit.new_service_ref()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_402be933","line":86,"in_reply_to":"ba15a1d1_00565106","updated":"2015-09-21 08:23:12.000000000","message":"If the v3 parts of the mixed case is visible to v2 API, there is no need to fix. :), it\u0027s fine to have another testcase.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"27d0c76cae2dc47fe824a165e4afa9b8cdf29fb2","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        for field, value in req_body[\u0027endpoint\u0027].items():"},{"line_number":84,"context_line":"            self.assertEqual(response.result[\u0027endpoint\u0027][field], value)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_pure_v3_endpoint_visible_from_v2(self):"},{"line_number":87,"context_line":"        # create a service"},{"line_number":88,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":89,"context_line":"        service \u003d unit.new_service_ref()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_00565106","line":86,"in_reply_to":"ba15a1d1_c5886bc9","updated":"2015-09-21 08:19:06.000000000","message":"this test only test pure v3 endpoint visibility to v2 API, so I used this name.\nv2 endpoints (or the mix) already works via v2 API, and deserves another test (I\u0027m not sure if that exists, if not, I may add one)","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"fed88e353d2da3596cdf9a03dec3952700862f73","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        # create a v3 endpoint with three interfaces"},{"line_number":93,"context_line":"        body \u003d {"},{"line_number":94,"context_line":"            \u0027endpoint\u0027: {"},{"line_number":95,"context_line":"                \u0027name\u0027: uuid.uuid4().hex,"},{"line_number":96,"context_line":"                \u0027description\u0027: uuid.uuid4().hex,"},{"line_number":97,"context_line":"                \u0027service_id\u0027: service_id,"},{"line_number":98,"context_line":"                \u0027url\u0027: \u0027https://\u0027 + uuid.uuid4().hex + \u0027.com\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_f4565805","line":95,"updated":"2015-09-21 21:35:20.000000000","message":"I\u0027d rather you used example strings that more closely match the expected value rather than uuid for most of these.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"08011f6795c800ec719d5a276a3213de9ed595da","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        # create a v3 endpoint with three interfaces"},{"line_number":93,"context_line":"        body \u003d {"},{"line_number":94,"context_line":"            \u0027endpoint\u0027: {"},{"line_number":95,"context_line":"                \u0027name\u0027: uuid.uuid4().hex,"},{"line_number":96,"context_line":"                \u0027description\u0027: uuid.uuid4().hex,"},{"line_number":97,"context_line":"                \u0027service_id\u0027: service_id,"},{"line_number":98,"context_line":"                \u0027url\u0027: \u0027https://\u0027 + uuid.uuid4().hex + \u0027.com\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_6bca4970","line":95,"in_reply_to":"ba15a1d1_f4565805","updated":"2015-09-22 14:33:02.000000000","message":"We typically don\u0027t do this on purpose.","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"fed88e353d2da3596cdf9a03dec3952700862f73","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            self.admin_request(method\u003d\u0027POST\u0027,"},{"line_number":106,"context_line":"                               token\u003dself.get_scoped_token(),"},{"line_number":107,"context_line":"                               path\u003d\u0027/v3/endpoints\u0027,"},{"line_number":108,"context_line":"                               expected_status\u003d201,"},{"line_number":109,"context_line":"                               body\u003dbody)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # create a v3 endpoint without public interface"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_74b9e82d","line":108,"updated":"2015-09-21 21:35:20.000000000","message":"There\u0027s another patch in-flight to remove hard-coded http error codes.  See https://review.openstack.org/#/c/224545/","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"fed88e353d2da3596cdf9a03dec3952700862f73","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            self.admin_request(method\u003d\u0027POST\u0027,"},{"line_number":118,"context_line":"                               token\u003dself.get_scoped_token(),"},{"line_number":119,"context_line":"                               path\u003d\u0027/v3/endpoints\u0027,"},{"line_number":120,"context_line":"                               expected_status\u003d201,"},{"line_number":121,"context_line":"                               body\u003dbody)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        r \u003d self.admin_request(token\u003dself.get_scoped_token(),"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_34829053","line":120,"updated":"2015-09-21 21:35:20.000000000","message":"There\u0027s another patch in-flight to remove hard-coded http error codes.  See https://review.openstack.org/#/c/224545/","commit_id":"5b0463bd95a62e800c671699b1fdcaa60948074b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"7846a6d89a986a11ba30b2237039b06cfc38fb6e","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        for field, value in req_body[\u0027endpoint\u0027].items():"},{"line_number":84,"context_line":"            self.assertEqual(response.result[\u0027endpoint\u0027][field], value)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_pure_v3_endpoint_visible_from_v2(self):"},{"line_number":87,"context_line":"        # create a service"},{"line_number":88,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":89,"context_line":"        service \u003d unit.new_service_ref()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_f510c150","line":86,"updated":"2015-09-24 23:11:13.000000000","message":"There\u0027s no assertion in here on the v2_endpoint. Did you get back what you thought you should? The closest thing is a just counting that you got something back and then you check the v3_endpoint. I wouldn\u0027t even bother with that since I don\u0027t expect it to be changing.","commit_id":"99b5ae8aa8fcb2ace265b1e20ae2b2f1c61700e5"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"7846a6d89a986a11ba30b2237039b06cfc38fb6e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        r \u003d self.admin_request(token\u003dself.get_scoped_token(),"},{"line_number":124,"context_line":"                               path\u003d\u0027/v2.0/endpoints\u0027)"},{"line_number":125,"context_line":"        # v3 endpoints having public url can be fetched via v2.0 API"},{"line_number":126,"context_line":"        self.assertEqual(len(r.result[\u0027endpoints\u0027]), 1)"},{"line_number":127,"context_line":"        v2_endpoint \u003d r.result[\u0027endpoints\u0027][0]"},{"line_number":128,"context_line":"        v3_endpoint \u003d self.catalog_api.get_endpoint(v2_endpoint[\u0027id\u0027])"},{"line_number":129,"context_line":"        # it\u0027s the v3 public endpoint\u0027s id as the generated v2 endpoint"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_92587b58","line":126,"updated":"2015-09-24 23:11:13.000000000","message":"The arguments here are backward. It should be (expected, observed).","commit_id":"99b5ae8aa8fcb2ace265b1e20ae2b2f1c61700e5"},{"author":{"_account_id":16523,"name":"ZhangLei","display_name":"ZhangLei","email":"zhang.lei@99cloud.net","username":"zhang.lei"},"change_message_id":"54d092c9bb084a2d4c57cd09e667385b3bf784e6","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        r \u003d self.admin_request(token\u003dself.get_scoped_token(),"},{"line_number":124,"context_line":"                               path\u003d\u0027/v2.0/endpoints\u0027)"},{"line_number":125,"context_line":"        # v3 endpoints having public url can be fetched via v2.0 API"},{"line_number":126,"context_line":"        self.assertEqual(len(r.result[\u0027endpoints\u0027]), 1)"},{"line_number":127,"context_line":"        v2_endpoint \u003d r.result[\u0027endpoints\u0027][0]"},{"line_number":128,"context_line":"        v3_endpoint \u003d self.catalog_api.get_endpoint(v2_endpoint[\u0027id\u0027])"},{"line_number":129,"context_line":"        # it\u0027s the v3 public endpoint\u0027s id as the generated v2 endpoint"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_01cad7a1","line":126,"in_reply_to":"9a1a9d01_92587b58","updated":"2015-09-25 02:38:28.000000000","message":"+1 David","commit_id":"99b5ae8aa8fcb2ace265b1e20ae2b2f1c61700e5"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"3f5aa662169d132a32023b34ddbe3521af99ee43","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        also be visible as there are no differences about the endpoints"},{"line_number":92,"context_line":"        except the format or the internal implementation."},{"line_number":93,"context_line":"        And because public url is required for v2 API, so only v3 endpoints"},{"line_number":94,"context_line":"        with public interface will be transformed into v2 endpoints."},{"line_number":95,"context_line":"        \"\"\""},{"line_number":96,"context_line":"        # create a service"},{"line_number":97,"context_line":"        service_id \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_1ad76724","line":94,"updated":"2015-09-27 14:14:58.000000000","message":"How about \"only the endpoints of the service which has the public interface endpoint will be  converted into v2 endpoints?\"","commit_id":"0cdc71fc58020a65d6fd04487af60254a169d37b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"2fa2e1d54187f9f2de57738fb9300f0d202e7e7d","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        also be visible as there are no differences about the endpoints"},{"line_number":92,"context_line":"        except the format or the internal implementation."},{"line_number":93,"context_line":"        And because public url is required for v2 API, so only v3 endpoints"},{"line_number":94,"context_line":"        with public interface will be transformed into v2 endpoints."},{"line_number":95,"context_line":"        \"\"\""},{"line_number":96,"context_line":"        # create a service"},{"line_number":97,"context_line":"        service_id \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_a57c2073","line":94,"in_reply_to":"9a1a9d01_1ad76724","updated":"2015-09-28 15:49:40.000000000","message":"It\u0027s better, thanks~","commit_id":"0cdc71fc58020a65d6fd04487af60254a169d37b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"3f5aa662169d132a32023b34ddbe3521af99ee43","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027,"},{"line_number":109,"context_line":"                \u0027enabled\u0027: True,"},{"line_number":110,"context_line":"            }"},{"line_number":111,"context_line":"        }"},{"line_number":112,"context_line":"        for interface in catalog.controllers.INTERFACES:"},{"line_number":113,"context_line":"            body[\u0027endpoint\u0027][\u0027interface\u0027] \u003d interface"},{"line_number":114,"context_line":"            self.admin_request(method\u003d\u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_faddd314","line":111,"updated":"2015-09-27 14:14:58.000000000","message":"maybe you can also use \u0027unit.new_endpoint_ref\u0027 here.","commit_id":"0cdc71fc58020a65d6fd04487af60254a169d37b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"6df4b9d8e220440c33719b6c70fab5d56358c7b4","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027,"},{"line_number":109,"context_line":"                \u0027enabled\u0027: True,"},{"line_number":110,"context_line":"            }"},{"line_number":111,"context_line":"        }"},{"line_number":112,"context_line":"        for interface in catalog.controllers.INTERFACES:"},{"line_number":113,"context_line":"            body[\u0027endpoint\u0027][\u0027interface\u0027] \u003d interface"},{"line_number":114,"context_line":"            self.admin_request(method\u003d\u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_ad65a7b5","line":111,"in_reply_to":"9a1a9d01_335b5a56","updated":"2015-09-29 09:55:45.000000000","message":"Tony - I think you meants some here (https://review.openstack.org/#/c/167534/), \"region_id\" cannot be used here just beacuse you have not create the region while \"region\" can be used just beacuse it\u0027s never got validated in manager layer.\n\nThe simply way imo is trying to create a region, the id would be \"RegionOne\" or whatever.\n\nDon\u0027t use \"region\" here two reasons:\n\n- \"region\" used here bascially mean nothing since it\u0027s neither used nor validated in the manager layer.\n\n- we use \"region_id\" instead of \"region\" in the V3 API, this is also true in the table schema, the assumption you use \"region\" here is already wrong.","commit_id":"0cdc71fc58020a65d6fd04487af60254a169d37b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"1d026d23c640f31d54d40005d67c76a14bf18830","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027,"},{"line_number":109,"context_line":"                \u0027enabled\u0027: True,"},{"line_number":110,"context_line":"            }"},{"line_number":111,"context_line":"        }"},{"line_number":112,"context_line":"        for interface in catalog.controllers.INTERFACES:"},{"line_number":113,"context_line":"            body[\u0027endpoint\u0027][\u0027interface\u0027] \u003d interface"},{"line_number":114,"context_line":"            self.admin_request(method\u003d\u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_f1bcd107","line":111,"in_reply_to":"9a1a9d01_6823fda7","updated":"2015-09-29 13:00:48.000000000","message":"see: http://specs.openstack.org/openstack/keystone-specs/api/v3/identity-api-v3.html#endpoints-v3-endpoints and https://github.com/openstack/keystone/blob/master/keystone/common/sql/migrate_repo/versions/053_endpoint_to_region_association.py.\n\nI think the spec you mentioned should be updated.","commit_id":"0cdc71fc58020a65d6fd04487af60254a169d37b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"ef0ff65a1cf9c2a13052f04de3e47c6ead603b95","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027,"},{"line_number":109,"context_line":"                \u0027enabled\u0027: True,"},{"line_number":110,"context_line":"            }"},{"line_number":111,"context_line":"        }"},{"line_number":112,"context_line":"        for interface in catalog.controllers.INTERFACES:"},{"line_number":113,"context_line":"            body[\u0027endpoint\u0027][\u0027interface\u0027] \u003d interface"},{"line_number":114,"context_line":"            self.admin_request(method\u003d\u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_335b5a56","line":111,"in_reply_to":"9a1a9d01_7071c8df","updated":"2015-09-28 15:54:02.000000000","message":"by \"some problem\", I mean \"region\" should be used, instead of \"region_id\", I\u0027ll see if some tests can be refactored, in another commit.","commit_id":"0cdc71fc58020a65d6fd04487af60254a169d37b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"dc7f7291bc746a9769c4f3d53011d88034a51b5a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027,"},{"line_number":109,"context_line":"                \u0027enabled\u0027: True,"},{"line_number":110,"context_line":"            }"},{"line_number":111,"context_line":"        }"},{"line_number":112,"context_line":"        for interface in catalog.controllers.INTERFACES:"},{"line_number":113,"context_line":"            body[\u0027endpoint\u0027][\u0027interface\u0027] \u003d interface"},{"line_number":114,"context_line":"            self.admin_request(method\u003d\u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_6823fda7","line":111,"in_reply_to":"9a1a9d01_ad65a7b5","updated":"2015-09-29 10:16:36.000000000","message":"According to the specification here http://developer.openstack.org/api-ref-identity-v3.html#createEndpoint, http API accepts \"region\" instead of \"region_id\", and I checked the code, which will create region if \"region\" is posted.\n\nOn one hand, I prefer to sticking to the spec because \"regoin_id\" is not documented, which will cause confusion, on the other hand, \"region_id\" is better because everywhere else uses it.\n\nWhat do you think?","commit_id":"0cdc71fc58020a65d6fd04487af60254a169d37b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"84e28e4e6d56283b53318f4a47e065d170de61ae","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027,"},{"line_number":109,"context_line":"                \u0027enabled\u0027: True,"},{"line_number":110,"context_line":"            }"},{"line_number":111,"context_line":"        }"},{"line_number":112,"context_line":"        for interface in catalog.controllers.INTERFACES:"},{"line_number":113,"context_line":"            body[\u0027endpoint\u0027][\u0027interface\u0027] \u003d interface"},{"line_number":114,"context_line":"            self.admin_request(method\u003d\u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_114aa5ac","line":111,"in_reply_to":"9a1a9d01_f1bcd107","updated":"2015-09-29 13:07:23.000000000","message":"I didn\u0027t know this!\nI really think we need _one_ place to put everything or keep things updated. I\u0027ve seen quite some inconsistence of documents in projects here and there.\n\nThanks, and I\u0027ll fix this problem.","commit_id":"0cdc71fc58020a65d6fd04487af60254a169d37b"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"2fa2e1d54187f9f2de57738fb9300f0d202e7e7d","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027,"},{"line_number":109,"context_line":"                \u0027enabled\u0027: True,"},{"line_number":110,"context_line":"            }"},{"line_number":111,"context_line":"        }"},{"line_number":112,"context_line":"        for interface in catalog.controllers.INTERFACES:"},{"line_number":113,"context_line":"            body[\u0027endpoint\u0027][\u0027interface\u0027] \u003d interface"},{"line_number":114,"context_line":"            self.admin_request(method\u003d\u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_7071c8df","line":111,"in_reply_to":"9a1a9d01_faddd314","updated":"2015-09-28 15:49:40.000000000","message":"unit.new_endpoint_ref has some problem, and no http API call in tests is using it (the only place using it is a catalog_api call). I may commit another patch for that later.","commit_id":"0cdc71fc58020a65d6fd04487af60254a169d37b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"3f5aa662169d132a32023b34ddbe3521af99ee43","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027,"},{"line_number":153,"context_line":"                \u0027enabled\u0027: True,"},{"line_number":154,"context_line":"            }"},{"line_number":155,"context_line":"        }"},{"line_number":156,"context_line":"        # create a v3 endpoint without public interface"},{"line_number":157,"context_line":"        for interface in catalog.controllers.INTERFACES:"},{"line_number":158,"context_line":"            if interface \u003d\u003d \u0027public\u0027:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_7ad22302","line":155,"updated":"2015-09-27 14:14:58.000000000","message":"same here for simplicity.","commit_id":"0cdc71fc58020a65d6fd04487af60254a169d37b"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"f7511b852e096ba6eea6a5110d1a2c1d1f49ad09","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        for field, value in req_body[\u0027endpoint\u0027].items():"},{"line_number":85,"context_line":"            self.assertEqual(value, response.result[\u0027endpoint\u0027][field])"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_pure_v3_endpoint_with_publicurl_visible_from_v2(self):"},{"line_number":88,"context_line":"        \"\"\"Test pure v3 endpoint can be fetched via v2 API."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        For those who are using v2 APIs, endpoints created by v3 API should"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_d54874ce","line":87,"updated":"2015-09-30 07:07:18.000000000","message":"nit: the word \"pure\" seem redundant, are there other type of v3_endpoint being tested?","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"32399c05b52347f6b54062acf1d466e10dd6bddb","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        for field, value in req_body[\u0027endpoint\u0027].items():"},{"line_number":85,"context_line":"            self.assertEqual(value, response.result[\u0027endpoint\u0027][field])"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_pure_v3_endpoint_with_publicurl_visible_from_v2(self):"},{"line_number":88,"context_line":"        \"\"\"Test pure v3 endpoint can be fetched via v2 API."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        For those who are using v2 APIs, endpoints created by v3 API should"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_355d3047","line":87,"in_reply_to":"9a1a9d01_d54874ce","updated":"2015-09-30 07:29:05.000000000","message":"It\u0027s true, in this file. But if it\u0027s tested along with others, I think it\u0027s more clear in the long list. After all, not every one is aware there are test_catalog and test_v3_catalog","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"f7511b852e096ba6eea6a5110d1a2c1d1f49ad09","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        converted into v2 endpoints."},{"line_number":96,"context_line":"        \"\"\""},{"line_number":97,"context_line":"        # create a region and a service"},{"line_number":98,"context_line":"        region_id \u003d \u0027RegionOne\u0027"},{"line_number":99,"context_line":"        self.catalog_api.create_region({\u0027id\u0027: region_id})"},{"line_number":100,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":101,"context_line":"        service \u003d unit.new_service_ref()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_f54338ad","line":98,"updated":"2015-09-30 07:07:18.000000000","message":"region_id doesn\u0027t need to be hard-coded, you can use uuid.uuid4().hex instead","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"f7511b852e096ba6eea6a5110d1a2c1d1f49ad09","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        # v3 endpoints having public url can be fetched via v2.0 API"},{"line_number":120,"context_line":"        self.assertEqual(1, len(r.result[\u0027endpoints\u0027]))"},{"line_number":121,"context_line":"        v2_endpoint \u003d r.result[\u0027endpoints\u0027][0]"},{"line_number":122,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027name\u0027], v2_endpoint[\u0027name\u0027])"},{"line_number":123,"context_line":"        self.assertEqual(service_id, v2_endpoint[\u0027service_id\u0027])"},{"line_number":124,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027publicurl\u0027])"},{"line_number":125,"context_line":"        v3_endpoint \u003d self.catalog_api.get_endpoint(v2_endpoint[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_750e488d","line":122,"updated":"2015-09-30 07:07:18.000000000","message":"why are we testing the name matches?\n\nBased from the code implementation, this will be picked randomly from one of the three endpoints.","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"49c6a0a973a49d17efd064bd710aaf45ff82deeb","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        # v3 endpoints having public url can be fetched via v2.0 API"},{"line_number":120,"context_line":"        self.assertEqual(1, len(r.result[\u0027endpoints\u0027]))"},{"line_number":121,"context_line":"        v2_endpoint \u003d r.result[\u0027endpoints\u0027][0]"},{"line_number":122,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027name\u0027], v2_endpoint[\u0027name\u0027])"},{"line_number":123,"context_line":"        self.assertEqual(service_id, v2_endpoint[\u0027service_id\u0027])"},{"line_number":124,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027publicurl\u0027])"},{"line_number":125,"context_line":"        v3_endpoint \u003d self.catalog_api.get_endpoint(v2_endpoint[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_b837f5fd","line":122,"in_reply_to":"9a1a9d01_1845c144","updated":"2015-09-30 07:59:04.000000000","message":"It\u0027s not as simple as I think. Some places are using \"name\". It can be in extra after all. So I\u0027ll just remove this line.","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"32399c05b52347f6b54062acf1d466e10dd6bddb","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        # v3 endpoints having public url can be fetched via v2.0 API"},{"line_number":120,"context_line":"        self.assertEqual(1, len(r.result[\u0027endpoints\u0027]))"},{"line_number":121,"context_line":"        v2_endpoint \u003d r.result[\u0027endpoints\u0027][0]"},{"line_number":122,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027name\u0027], v2_endpoint[\u0027name\u0027])"},{"line_number":123,"context_line":"        self.assertEqual(service_id, v2_endpoint[\u0027service_id\u0027])"},{"line_number":124,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027publicurl\u0027])"},{"line_number":125,"context_line":"        v3_endpoint \u003d self.catalog_api.get_endpoint(v2_endpoint[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_1845c144","line":122,"in_reply_to":"9a1a9d01_750e488d","updated":"2015-09-30 07:29:05.000000000","message":"Nice catch. I wasn\u0027t thinking of it. Actually, \"name\" is not an attribute of endpoint, I think it should be popped out in unit.new_endpoint_ref.\nI\u0027ll fix that.","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"f7511b852e096ba6eea6a5110d1a2c1d1f49ad09","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        v2_endpoint \u003d r.result[\u0027endpoints\u0027][0]"},{"line_number":122,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027name\u0027], v2_endpoint[\u0027name\u0027])"},{"line_number":123,"context_line":"        self.assertEqual(service_id, v2_endpoint[\u0027service_id\u0027])"},{"line_number":124,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027publicurl\u0027])"},{"line_number":125,"context_line":"        v3_endpoint \u003d self.catalog_api.get_endpoint(v2_endpoint[\u0027id\u0027])"},{"line_number":126,"context_line":"        # it\u0027s the v3 public endpoint\u0027s id as the generated v2 endpoint"},{"line_number":127,"context_line":"        self.assertEqual(\u0027public\u0027, v3_endpoint[\u0027interface\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_35253008","line":124,"updated":"2015-09-30 07:07:18.000000000","message":"should we check the other urls as well?\n\nnit: adding extra space to group v2 and v3 assertions would help with readability","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"32399c05b52347f6b54062acf1d466e10dd6bddb","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        v2_endpoint \u003d r.result[\u0027endpoints\u0027][0]"},{"line_number":122,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027name\u0027], v2_endpoint[\u0027name\u0027])"},{"line_number":123,"context_line":"        self.assertEqual(service_id, v2_endpoint[\u0027service_id\u0027])"},{"line_number":124,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027publicurl\u0027])"},{"line_number":125,"context_line":"        v3_endpoint \u003d self.catalog_api.get_endpoint(v2_endpoint[\u0027id\u0027])"},{"line_number":126,"context_line":"        # it\u0027s the v3 public endpoint\u0027s id as the generated v2 endpoint"},{"line_number":127,"context_line":"        self.assertEqual(\u0027public\u0027, v3_endpoint[\u0027interface\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_18b38151","line":124,"in_reply_to":"9a1a9d01_35253008","updated":"2015-09-30 07:29:05.000000000","message":"Right, I\u0027ll do that. Thanks","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"f7511b852e096ba6eea6a5110d1a2c1d1f49ad09","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self.assertEqual(\u0027public\u0027, v3_endpoint[\u0027interface\u0027])"},{"line_number":128,"context_line":"        self.assertEqual(service_id, v3_endpoint[\u0027service_id\u0027])"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def test_pure_v3_endpoint_without_publicurl_invisible_from_v2(self):"},{"line_number":131,"context_line":"        \"\"\"Test pure v3 endpoint without public url can\u0027t be fetched via v2 API."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        V2 API will return endpoints created by v3 API, but because public url"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_f51a58c5","line":130,"updated":"2015-09-30 07:07:18.000000000","message":"nit: the word \"pure\" seem redundant..","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"f7511b852e096ba6eea6a5110d1a2c1d1f49ad09","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        ignored."},{"line_number":136,"context_line":"        \"\"\""},{"line_number":137,"context_line":"        # create a region and a service"},{"line_number":138,"context_line":"        region_id \u003d \u0027RegionOne\u0027"},{"line_number":139,"context_line":"        self.catalog_api.create_region({\u0027id\u0027: region_id})"},{"line_number":140,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":141,"context_line":"        service \u003d unit.new_service_ref()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_b57f00df","line":138,"updated":"2015-09-30 07:07:18.000000000","message":"region_id doesn\u0027t need to be hard-coded, you can use uuid.uuid4().hex instead","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"f7511b852e096ba6eea6a5110d1a2c1d1f49ad09","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        body \u003d {"},{"line_number":146,"context_line":"            \u0027endpoint\u0027: unit.new_endpoint_ref(service_id,"},{"line_number":147,"context_line":"                                              default_region_id\u003dregion_id)"},{"line_number":148,"context_line":"        }"},{"line_number":149,"context_line":"        for interface in catalog.controllers.INTERFACES:"},{"line_number":150,"context_line":"            if interface \u003d\u003d \u0027public\u0027:"},{"line_number":151,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_558224c9","line":148,"updated":"2015-09-30 07:07:18.000000000","message":"the code from line 137 to here seems like just a copy/paste from the previous method, it could be pulled out into a separate method to remove code duplication","commit_id":"c3df5319bf6b68f7fd7284d50f81ff0e1c8c9e02"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"8f5cda6612b6d08e760e668a8164237e1c75702f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return region_id"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _service_create(self):"},{"line_number":86,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":87,"context_line":"        service \u003d unit.new_service_ref()"},{"line_number":88,"context_line":"        service[\u0027id\u0027] \u003d service_id"},{"line_number":89,"context_line":"        self.catalog_api.create_service(service_id, service)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_461c8e69","line":86,"updated":"2015-10-01 04:54:00.000000000","message":"there is no need to generate the service_id, the id is already generated when new_service_ref() is used.\n\nhttps://github.com/openstack/keystone/blob/master/keystone/tests/unit/core.py#L229","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"0b1b3e0813d60cb69e8b47218291296dc94fe815","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return region_id"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _service_create(self):"},{"line_number":86,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":87,"context_line":"        service \u003d unit.new_service_ref()"},{"line_number":88,"context_line":"        service[\u0027id\u0027] \u003d service_id"},{"line_number":89,"context_line":"        self.catalog_api.create_service(service_id, service)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_6600b202","line":86,"in_reply_to":"9a1a9d01_461c8e69","updated":"2015-10-01 05:56:49.000000000","message":"++","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"041e1359c26e34d1b50d77943fa14a6294988e16","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return region_id"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _service_create(self):"},{"line_number":86,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":87,"context_line":"        service \u003d unit.new_service_ref()"},{"line_number":88,"context_line":"        service[\u0027id\u0027] \u003d service_id"},{"line_number":89,"context_line":"        self.catalog_api.create_service(service_id, service)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_973dee2c","line":86,"in_reply_to":"9a1a9d01_6600b202","updated":"2015-10-01 07:40:28.000000000","message":"i think the author just want to easily get service_id. :)","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"de5cf8ee37534507697d950ed9a2780f936a163f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return region_id"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _service_create(self):"},{"line_number":86,"context_line":"        service_id \u003d uuid.uuid4().hex"},{"line_number":87,"context_line":"        service \u003d unit.new_service_ref()"},{"line_number":88,"context_line":"        service[\u0027id\u0027] \u003d service_id"},{"line_number":89,"context_line":"        self.catalog_api.create_service(service_id, service)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_6fbdc701","line":86,"in_reply_to":"9a1a9d01_973dee2c","updated":"2015-10-01 17:46:54.000000000","message":"It is actually more complicated. :)\n\nFrom two lines:\n\n1. service_id \u003d uuid.uuid4().hex\n\n2. service[\u0027id\u0027] \u003d service_id\n\nit can be changed to one liner:\n\n1. service_id \u003d service[\u0027id\u0027]","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"27235cbb992220c8d7a282fb2a6bb6f35ffd02ad","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        region_id \u003d self._region_create()"},{"line_number":110,"context_line":"        service_id \u003d self._service_create()"},{"line_number":111,"context_line":"        # create a v3 endpoint with three interfaces"},{"line_number":112,"context_line":"        body \u003d {"},{"line_number":113,"context_line":"            \u0027endpoint\u0027: unit.new_endpoint_ref(service_id,"},{"line_number":114,"context_line":"                                              default_region_id\u003dregion_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_260aba8a","line":111,"updated":"2015-10-01 06:09:57.000000000","message":"s/create a v3 endpoint/create v3 endpoints\n\nHow can you create a *v3* endpoint with three interfaces?","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"acd9ff58c4db636e7307e18ef19575ad4284fe32","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        region_id \u003d self._region_create()"},{"line_number":110,"context_line":"        service_id \u003d self._service_create()"},{"line_number":111,"context_line":"        # create a v3 endpoint with three interfaces"},{"line_number":112,"context_line":"        body \u003d {"},{"line_number":113,"context_line":"            \u0027endpoint\u0027: unit.new_endpoint_ref(service_id,"},{"line_number":114,"context_line":"                                              default_region_id\u003dregion_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_29e60644","line":111,"in_reply_to":"9a1a9d01_260aba8a","updated":"2015-10-01 08:54:04.000000000","message":"Done","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"27235cbb992220c8d7a282fb2a6bb6f35ffd02ad","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        r \u003d self.admin_request(token\u003dself.get_scoped_token(),"},{"line_number":125,"context_line":"                               path\u003d\u0027/v2.0/endpoints\u0027)"},{"line_number":126,"context_line":"        # v3 endpoints having public url can be fetched via v2.0 API"},{"line_number":127,"context_line":"        self.assertEqual(1, len(r.result[\u0027endpoints\u0027]))"},{"line_number":128,"context_line":"        v2_endpoint \u003d r.result[\u0027endpoints\u0027][0]"},{"line_number":129,"context_line":"        self.assertEqual(service_id, v2_endpoint[\u0027service_id\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_86cdc667","line":126,"updated":"2015-10-01 06:09:57.000000000","message":"more precisely, it should be the endpoints of the service which has public interface endpoint will be returned via v2.0 API.","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"27235cbb992220c8d7a282fb2a6bb6f35ffd02ad","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self.assertEqual(1, len(r.result[\u0027endpoints\u0027]))"},{"line_number":128,"context_line":"        v2_endpoint \u003d r.result[\u0027endpoints\u0027][0]"},{"line_number":129,"context_line":"        self.assertEqual(service_id, v2_endpoint[\u0027service_id\u0027])"},{"line_number":130,"context_line":"        # check urls just in case."},{"line_number":131,"context_line":"        # This is not the focus of this test, so no different urls are used."},{"line_number":132,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027publicurl\u0027])"},{"line_number":133,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027adminurl\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_e6b7e282","line":130,"updated":"2015-10-01 06:09:57.000000000","message":"in case of what?","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"acd9ff58c4db636e7307e18ef19575ad4284fe32","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self.assertEqual(1, len(r.result[\u0027endpoints\u0027]))"},{"line_number":128,"context_line":"        v2_endpoint \u003d r.result[\u0027endpoints\u0027][0]"},{"line_number":129,"context_line":"        self.assertEqual(service_id, v2_endpoint[\u0027service_id\u0027])"},{"line_number":130,"context_line":"        # check urls just in case."},{"line_number":131,"context_line":"        # This is not the focus of this test, so no different urls are used."},{"line_number":132,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027publicurl\u0027])"},{"line_number":133,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027adminurl\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_069bf118","line":130,"in_reply_to":"9a1a9d01_e6b7e282","updated":"2015-10-01 08:54:04.000000000","message":"in case of anything unexpected. :)\nI just think more checks are better, to make sure the expected endpoint is returned.","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"8f5cda6612b6d08e760e668a8164237e1c75702f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027publicurl\u0027])"},{"line_number":133,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027adminurl\u0027])"},{"line_number":134,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027internalurl\u0027])"},{"line_number":135,"context_line":"        self.assertNotIn(\u0027name\u0027, v2_endpoint)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        v3_endpoint \u003d self.catalog_api.get_endpoint(v2_endpoint[\u0027id\u0027])"},{"line_number":138,"context_line":"        # it\u0027s the v3 public endpoint\u0027s id as the generated v2 endpoint"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_866b86b6","line":135,"updated":"2015-10-01 04:54:00.000000000","message":"I think this can be removed, the name was added before as side effect of using new_endpoint_ref()\n\nhttps://github.com/openstack/keystone/blob/master/keystone/tests/unit/core.py#L230","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"27235cbb992220c8d7a282fb2a6bb6f35ffd02ad","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027publicurl\u0027])"},{"line_number":133,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027adminurl\u0027])"},{"line_number":134,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027internalurl\u0027])"},{"line_number":135,"context_line":"        self.assertNotIn(\u0027name\u0027, v2_endpoint)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        v3_endpoint \u003d self.catalog_api.get_endpoint(v2_endpoint[\u0027id\u0027])"},{"line_number":138,"context_line":"        # it\u0027s the v3 public endpoint\u0027s id as the generated v2 endpoint"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_c66bbeef","line":135,"updated":"2015-10-01 06:09:57.000000000","message":"why need do this?","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"acd9ff58c4db636e7307e18ef19575ad4284fe32","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027publicurl\u0027])"},{"line_number":133,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027adminurl\u0027])"},{"line_number":134,"context_line":"        self.assertEqual(body[\u0027endpoint\u0027][\u0027url\u0027], v2_endpoint[\u0027internalurl\u0027])"},{"line_number":135,"context_line":"        self.assertNotIn(\u0027name\u0027, v2_endpoint)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        v3_endpoint \u003d self.catalog_api.get_endpoint(v2_endpoint[\u0027id\u0027])"},{"line_number":138,"context_line":"        # it\u0027s the v3 public endpoint\u0027s id as the generated v2 endpoint"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_c63c19e3","line":135,"in_reply_to":"9a1a9d01_866b86b6","updated":"2015-10-01 08:54:04.000000000","message":"Had a discussion with dstanek, that different names (and other attributes) can be set for different interfaces, e.g. name\u003dtest1 for interface\u003dpublic, name\u003dtest2 for interface\u003dadmin. To be consistent, all extra attributes are gotten rid of, so you won\u0027t get name\u003dtest1 first, and name\u003dtest2 for another GET.\nThis is to test the logic works.","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"27235cbb992220c8d7a282fb2a6bb6f35ffd02ad","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def test_pure_v3_endpoint_without_publicurl_invisible_from_v2(self):"},{"line_number":143,"context_line":"        \"\"\"Test pure v3 endpoint without public url can\u0027t be fetched via v2 API."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        V2 API will return endpoints created by v3 API, but because public url"},{"line_number":146,"context_line":"        is required for v2 API, so v3 endpoints without public url will be"},{"line_number":147,"context_line":"        ignored."},{"line_number":148,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_86614607","line":145,"updated":"2015-10-01 06:09:57.000000000","message":"del/because","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"acd9ff58c4db636e7307e18ef19575ad4284fe32","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def test_pure_v3_endpoint_without_publicurl_invisible_from_v2(self):"},{"line_number":143,"context_line":"        \"\"\"Test pure v3 endpoint without public url can\u0027t be fetched via v2 API."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        V2 API will return endpoints created by v3 API, but because public url"},{"line_number":146,"context_line":"        is required for v2 API, so v3 endpoints without public url will be"},{"line_number":147,"context_line":"        ignored."},{"line_number":148,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_69e07e29","line":145,"in_reply_to":"9a1a9d01_86614607","updated":"2015-10-01 08:54:04.000000000","message":"Done","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"27235cbb992220c8d7a282fb2a6bb6f35ffd02ad","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        \"\"\"Test pure v3 endpoint without public url can\u0027t be fetched via v2 API."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        V2 API will return endpoints created by v3 API, but because public url"},{"line_number":146,"context_line":"        is required for v2 API, so v3 endpoints without public url will be"},{"line_number":147,"context_line":"        ignored."},{"line_number":148,"context_line":"        \"\"\""},{"line_number":149,"context_line":"        region_id \u003d self._region_create()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_c6397ef3","line":146,"updated":"2015-10-01 06:09:57.000000000","message":"del/so, the endpoints of service which does\u0027t has public url will be ignored.","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"acd9ff58c4db636e7307e18ef19575ad4284fe32","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        \"\"\"Test pure v3 endpoint without public url can\u0027t be fetched via v2 API."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        V2 API will return endpoints created by v3 API, but because public url"},{"line_number":146,"context_line":"        is required for v2 API, so v3 endpoints without public url will be"},{"line_number":147,"context_line":"        ignored."},{"line_number":148,"context_line":"        \"\"\""},{"line_number":149,"context_line":"        region_id \u003d self._region_create()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_a9f1b602","line":146,"in_reply_to":"9a1a9d01_c6397ef3","updated":"2015-10-01 08:54:04.000000000","message":"Done","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"27235cbb992220c8d7a282fb2a6bb6f35ffd02ad","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        r \u003d self.admin_request(token\u003dself.get_scoped_token(),"},{"line_number":167,"context_line":"                               path\u003d\u0027/v2.0/endpoints\u0027)"},{"line_number":168,"context_line":"        # v3 endpoints without public url won\u0027t be fetched via v2.0 API"},{"line_number":169,"context_line":"        self.assertEqual(0, len(r.result[\u0027endpoints\u0027]))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_endpoint_create_with_null_adminurl(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_261e3a70","line":168,"updated":"2015-10-01 06:09:57.000000000","message":"same here.","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"},{"author":{"_account_id":14413,"name":"Tony Wang","username":"tony","inactive":true},"change_message_id":"acd9ff58c4db636e7307e18ef19575ad4284fe32","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        r \u003d self.admin_request(token\u003dself.get_scoped_token(),"},{"line_number":167,"context_line":"                               path\u003d\u0027/v2.0/endpoints\u0027)"},{"line_number":168,"context_line":"        # v3 endpoints without public url won\u0027t be fetched via v2.0 API"},{"line_number":169,"context_line":"        self.assertEqual(0, len(r.result[\u0027endpoints\u0027]))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_endpoint_create_with_null_adminurl(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a1a9d01_e9eb2e11","line":168,"in_reply_to":"9a1a9d01_261e3a70","updated":"2015-10-01 08:54:04.000000000","message":"Done","commit_id":"0d13a85e93737df8c9c130f194839b27d0781890"}]}
