)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"ec3f65afca942f471dd4b496af48f303194ed5bc","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Fixed other tests that now implicitly rely on endpoint_filter_api."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-bug: 1410543"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I7301555522b7184237d6e3facef38dc83cf2198a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"fabf19d9_e0511610","line":19,"updated":"2015-04-18 07:29:27.000000000","message":"feel free to take over bug #1436704 if you want to consolidate that bug within this patch, add Closes-Bug: #1436704 here.\n\nBTW, s/Closes-bug: 1410543/Closes-Bug: #1410543","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"679c8129fdf9f7ab5e60f9931b6ca211b3c9022e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Fixed other tests that now implicitly rely on endpoint_filter_api."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-bug: 1410543"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I7301555522b7184237d6e3facef38dc83cf2198a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"dac4157f_3e1151ad","line":19,"in_reply_to":"fabf19d9_e0511610","updated":"2015-04-20 15:32:12.000000000","message":"Done","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"c3d4c80c289d3fd7afaee78233bdeebcb82e7e4f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"service within the catalog."},{"line_number":16,"context_line":"Fixed other tests that now implicitly rely on endpoint_filter_api."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1436704"},{"line_number":19,"context_line":"Closes-Bug: #1410543"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I7301555522b7184237d6e3facef38dc83cf2198a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"dac4157f_9f000903","line":18,"updated":"2015-04-22 08:29:55.000000000","message":"Currently, what I can see is this patch may potentially address this bug partially, that bug intends to include both SQL and Tempalate driver.\n\nI should detail this in the bug. :(","commit_id":"28690f08e5ccde913459ff5e568c937b6e33091b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5cd39c092086c3a48619cf983c3b34437dbc1108","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Move endpoint catalog filtering to default driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Restored name to services listed in catalog"},{"line_number":10,"context_line":"Moved endpoint filtering from keystone.contrib.endpoint_filter.backends.catalog_sql.py"},{"line_number":11,"context_line":"to keystone.catalog.backends.sql.py so that filtering is both the default and supported"},{"line_number":12,"context_line":"by the default driver."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"3afb71cf_7efc98b7","line":9,"updated":"2015-06-19 19:49:05.000000000","message":"(nit) you should make it more obvious that this is a list of changes. maybe prefix each one with a - or *?","commit_id":"2e41ad70cc9de767dc65e689d420fa073809fe40"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"63f4bcd8d062e4b51a88fb86c6d849f0a205ab7d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Move endpoint catalog filtering to default driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Restored name to services listed in catalog"},{"line_number":10,"context_line":"Moved endpoint filtering from keystone.contrib.endpoint_filter.backends.catalog_sql.py"},{"line_number":11,"context_line":"to keystone.catalog.backends.sql.py so that filtering is both the default and supported"},{"line_number":12,"context_line":"by the default driver."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"fa32b979_fd65d51c","line":9,"in_reply_to":"3afb71cf_7efc98b7","updated":"2015-06-22 17:22:47.000000000","message":"Done","commit_id":"2e41ad70cc9de767dc65e689d420fa073809fe40"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5cd39c092086c3a48619cf983c3b34437dbc1108","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Restored name to services listed in catalog"},{"line_number":10,"context_line":"Moved endpoint filtering from keystone.contrib.endpoint_filter.backends.catalog_sql.py"},{"line_number":11,"context_line":"to keystone.catalog.backends.sql.py so that filtering is both the default and supported"},{"line_number":12,"context_line":"by the default driver."},{"line_number":13,"context_line":"Maintained support for CONF.endpoint_filter.return_all_endpoints_if_no_filter flag."},{"line_number":14,"context_line":"Added tests to verify both filtering function and also that \u0027name\u0027 is returned in each"},{"line_number":15,"context_line":"service within the catalog."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"3afb71cf_7eea58dc","line":12,"updated":"2015-06-19 19:49:05.000000000","message":"This is really the only one that\u0027s valuable. I can see what you did by looking at the code. This one seems to be the why and that\u0027s what should be highlighted in a commit message.","commit_id":"2e41ad70cc9de767dc65e689d420fa073809fe40"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"63f4bcd8d062e4b51a88fb86c6d849f0a205ab7d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Restored name to services listed in catalog"},{"line_number":10,"context_line":"Moved endpoint filtering from keystone.contrib.endpoint_filter.backends.catalog_sql.py"},{"line_number":11,"context_line":"to keystone.catalog.backends.sql.py so that filtering is both the default and supported"},{"line_number":12,"context_line":"by the default driver."},{"line_number":13,"context_line":"Maintained support for CONF.endpoint_filter.return_all_endpoints_if_no_filter flag."},{"line_number":14,"context_line":"Added tests to verify both filtering function and also that \u0027name\u0027 is returned in each"},{"line_number":15,"context_line":"service within the catalog."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"fa32b979_dd625116","line":12,"in_reply_to":"3afb71cf_7eea58dc","updated":"2015-06-22 17:22:47.000000000","message":"Done","commit_id":"2e41ad70cc9de767dc65e689d420fa073809fe40"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"ceefe7fdf55cd516ca7452245dc7a0e03bc74a1f","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Co-Authored-By: Guang Yee \u003cguang.yee@hpe.com\u003e"},{"line_number":15,"context_line":"Co-Authored-By: David Stanek \u003cdstanek@dstanek.com\u003e"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1410543"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I7301555522b7184237d6e3facef38dc83cf2198a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"ba15a1d1_a2eac6aa","line":17,"updated":"2015-09-22 13:35:37.000000000","message":"I think my modified query also closes: #1436704","commit_id":"fa85b4985aef7bd57be6ed1da25062f69f3740d7"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"587703521a855b8a4a21090eedd0ce4dd8398278","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Co-Authored-By: Guang Yee \u003cguang.yee@hpe.com\u003e"},{"line_number":15,"context_line":"Co-Authored-By: David Stanek \u003cdstanek@dstanek.com\u003e"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1410543"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I7301555522b7184237d6e3facef38dc83cf2198a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"ba15a1d1_45c5f48b","line":17,"in_reply_to":"ba15a1d1_a2eac6aa","updated":"2015-09-22 13:46:05.000000000","message":"Partially, but I think there\u0027s also something in there to be considered about services that have endpoints that need formatting and have missing values for the format string.","commit_id":"fa85b4985aef7bd57be6ed1da25062f69f3740d7"}],"etc/keystone.conf.sample":[{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"b35baa07d2c8dca761b1ece10951bae636b12c2f","unresolved":false,"context_lines":[{"line_number":503,"context_line":""},{"line_number":504,"context_line":"# Toggle for domain config caching. This has no effect unless global caching is"},{"line_number":505,"context_line":"# enabled. (boolean value)"},{"line_number":506,"context_line":"#caching \u003d true"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"# TTL (in seconds) to cache domain config data. This has no effect unless"},{"line_number":509,"context_line":"# domain config caching is enabled. (integer value)"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"9aa53dc9_3ec65c68","line":506,"updated":"2015-04-10 02:25:15.000000000","message":"Unrelated change?","commit_id":"da03c431a508ff72dda53022f7698c97e1a45c58"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"10379788d6b05f643e5d9ac7717475666f5505e2","unresolved":false,"context_lines":[{"line_number":503,"context_line":""},{"line_number":504,"context_line":"# Toggle for domain config caching. This has no effect unless global caching is"},{"line_number":505,"context_line":"# enabled. (boolean value)"},{"line_number":506,"context_line":"#caching \u003d true"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"# TTL (in seconds) to cache domain config data. This has no effect unless"},{"line_number":509,"context_line":"# domain config caching is enabled. (integer value)"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"9aa53dc9_d23cfcc9","line":506,"in_reply_to":"9aa53dc9_3ec65c68","updated":"2015-04-10 09:02:48.000000000","message":"Unintentional, I\u0027ve no idea where this came from.  Fixed for next patch set.","commit_id":"da03c431a508ff72dda53022f7698c97e1a45c58"}],"keystone/catalog/backends/sql.py":[{"author":{"_account_id":14966,"name":"Denis Cavalcante","email":"dencaval@gmail.com","username":"denis.cavalcante"},"change_message_id":"8f8227f05c80c7d482e94870afce7583ae178efb","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            ref.extra \u003d new_endpoint.extra"},{"line_number":271,"context_line":"        return ref.to_dict()"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    def get_catalog(self, user_id, tenant_id, metadata\u003dNone):"},{"line_number":274,"context_line":"        substitutions \u003d dict("},{"line_number":275,"context_line":"            itertools.chain(six.iteritems(CONF),"},{"line_number":276,"context_line":"                            six.iteritems(CONF.eventlet_server)))"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9b358b_89e9381d","line":273,"updated":"2015-03-30 14:23:27.000000000","message":"In this bug fixing, when is the metadata parameter used in get_catalog?","commit_id":"4c84c39d8e204c38415f33e7460fbc6ae68cf74f"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"af4a2aea80477bb61ca89ab2410a0b2ba3fa3da7","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            ref.extra \u003d new_endpoint.extra"},{"line_number":271,"context_line":"        return ref.to_dict()"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    def get_catalog(self, user_id, tenant_id, metadata\u003dNone):"},{"line_number":274,"context_line":"        substitutions \u003d dict("},{"line_number":275,"context_line":"            itertools.chain(six.iteritems(CONF),"},{"line_number":276,"context_line":"                            six.iteritems(CONF.eventlet_server)))"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9b358b_89ba58e0","line":273,"in_reply_to":"da9b358b_89e9381d","updated":"2015-03-30 14:30:52.000000000","message":"Done","commit_id":"4c84c39d8e204c38415f33e7460fbc6ae68cf74f"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"b05fa38e8a24eb56876d3c473ba01a51543de758","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            del service_obj[\u0027description\u0027]"},{"line_number":339,"context_line":"            return service_obj"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        services \u003d {}"},{"line_number":342,"context_line":"        if not unfiltered:"},{"line_number":343,"context_line":"            # use the endpoint filter api"},{"line_number":344,"context_line":"            refs \u003d self.endpoint_filter_api.list_endpoints_for_project("}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_a4586833","line":341,"updated":"2015-03-31 18:12:28.000000000","message":"Is there any way to put this in a separate method? This adds a ton of code to an already long method.","commit_id":"8882dd5a5757020f9d06069a069ffb36aea89ec0"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"7ffba881c8fe6cc8fdc717795a35e4ee251aa139","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            del service_obj[\u0027description\u0027]"},{"line_number":339,"context_line":"            return service_obj"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        services \u003d {}"},{"line_number":342,"context_line":"        if not unfiltered:"},{"line_number":343,"context_line":"            # use the endpoint filter api"},{"line_number":344,"context_line":"            refs \u003d self.endpoint_filter_api.list_endpoints_for_project("}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_a2ff25a9","line":341,"in_reply_to":"da9b358b_a4586833","updated":"2015-04-01 08:07:49.000000000","message":"Agreed.","commit_id":"8882dd5a5757020f9d06069a069ffb36aea89ec0"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"b05fa38e8a24eb56876d3c473ba01a51543de758","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    CONF.endpoint_filter.return_all_endpoints_if_no_filter):"},{"line_number":350,"context_line":"                # recurse to this method but don\u0027t filter this time"},{"line_number":351,"context_line":"                return self.get_v3_catalog("},{"line_number":352,"context_line":"                    user_id, tenant_id, metadata\u003dmetadata, unfiltered\u003dTrue)"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"            for entry in refs:"},{"line_number":355,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_a4a6280e","line":352,"updated":"2015-03-31 18:12:28.000000000","message":"So this calls itself? This is sort of weird.","commit_id":"8882dd5a5757020f9d06069a069ffb36aea89ec0"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"7ffba881c8fe6cc8fdc717795a35e4ee251aa139","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    CONF.endpoint_filter.return_all_endpoints_if_no_filter):"},{"line_number":350,"context_line":"                # recurse to this method but don\u0027t filter this time"},{"line_number":351,"context_line":"                return self.get_v3_catalog("},{"line_number":352,"context_line":"                    user_id, tenant_id, metadata\u003dmetadata, unfiltered\u003dTrue)"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"            for entry in refs:"},{"line_number":355,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_622fddf6","line":352,"in_reply_to":"da9b358b_a4a6280e","updated":"2015-04-01 08:07:49.000000000","message":"Yes, I am trying here to merge two very different methods of obtaining an endpoint list.  Given the conf property that mandates the return of an unfiltered list if the filtered list is empty I set this recursion.  It\u0027s not great, I agree and I have come up with another approach which obtains the full endpoint list with a joined load (as is done at line 383 et seq) then filters it.  It has the additional advantage that only two calls are made rather than a call per endpoint (via line 356).  If the filtered list is empty then the unfiltered list is returned or and empty list - depending on the conf property.  I wasn\u0027t sure whether to push that as a separate review or in this one but given your very valid comments perhaps I\u0027ll put it here.","commit_id":"8882dd5a5757020f9d06069a069ffb36aea89ec0"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        def add_endpoint_to_filtered_catalog(catalog_map, catalog_service,"},{"line_number":345,"context_line":"                                             service_endpoint):"},{"line_number":346,"context_line":"            if not catalog_service[\u0027id\u0027] in catalog_map:"},{"line_number":347,"context_line":"                catalog_map[catalog_service[\u0027id\u0027]] \u003d \\"},{"line_number":348,"context_line":"                    catalog_service.copy()"},{"line_number":349,"context_line":"                catalog_map[catalog_service[\u0027id\u0027]][\u0027endpoints\u0027] \u003d ["},{"line_number":350,"context_line":"                    service_endpoint]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_baf20e99","line":347,"updated":"2015-04-06 23:59:56.000000000","message":"use ()\u0027s instead of \\","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                                catalog_service,"},{"line_number":366,"context_line":"                                service_endpoint"},{"line_number":367,"context_line":"                            )"},{"line_number":368,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":369,"context_line":"        refs \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":370,"context_line":"            tenant_id"},{"line_number":371,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_babe8efd","line":368,"updated":"2015-04-06 23:59:56.000000000","message":"nit: toss in a new line here to separate the functions","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":376,"context_line":"        filtered_catalog_map \u003d {}"},{"line_number":377,"context_line":"        for association in refs:"},{"line_number":378,"context_line":"            map_association_to_catalog_service("},{"line_number":379,"context_line":"                association,"},{"line_number":380,"context_line":"                filtered_catalog_map,"},{"line_number":381,"context_line":"                unfiltered_catalog)"},{"line_number":382,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_bac44e40","line":379,"updated":"2015-04-06 23:59:56.000000000","message":"it would be nice if these parameters could match the named parameters of the function","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":385,"context_line":""},{"line_number":386,"context_line":"        # if there are no endpoints assigned to the project check"},{"line_number":387,"context_line":"        # whether all endpoints should be returned"},{"line_number":388,"context_line":"        if CONF.endpoint_filter.return_all_endpoints_if_no_filter \\"},{"line_number":389,"context_line":"                and not filtered_catalog_map:"},{"line_number":390,"context_line":"            v3_catalog \u003d unfiltered_catalog"},{"line_number":391,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_fa72d67b","line":388,"updated":"2015-04-06 23:59:56.000000000","message":"use ()\u0027s instead of \\","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5a023dbfbe29601d3d1c54964929ebd85c44d963","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        session \u003d sql.get_session()"},{"line_number":357,"context_line":"        # this joined load means that all the endpoints will be populated"},{"line_number":358,"context_line":"        # from the same query that retrieves the service - so it\u0027s efficient"},{"line_number":359,"context_line":"        # in comparison to multiple sub-interrogations of the db or of"},{"line_number":360,"context_line":"        # of the keystone REST api for the same information"},{"line_number":361,"context_line":"        all_services \u003d ("},{"line_number":362,"context_line":"            session.query(Service).filter(Service.enabled \u003d\u003d true())."}],"source_content_type":"text/x-python","patch_set":8,"id":"3ab451fb_943158a5","line":359,"updated":"2015-04-17 16:06:40.000000000","message":"s/of//","commit_id":"169686fb609e114cf9ceab7b772152b2749ca66a"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"c6e8406347f7a633d3821abb2b05b0d8fe0f2038","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        session \u003d sql.get_session()"},{"line_number":357,"context_line":"        # this joined load means that all the endpoints will be populated"},{"line_number":358,"context_line":"        # from the same query that retrieves the service - so it\u0027s efficient"},{"line_number":359,"context_line":"        # in comparison to multiple sub-interrogations of the db or of"},{"line_number":360,"context_line":"        # of the keystone REST api for the same information"},{"line_number":361,"context_line":"        all_services \u003d ("},{"line_number":362,"context_line":"            session.query(Service).filter(Service.enabled \u003d\u003d true())."}],"source_content_type":"text/x-python","patch_set":8,"id":"3ab451fb_0fcc1588","line":359,"in_reply_to":"3ab451fb_943158a5","updated":"2015-04-17 16:23:16.000000000","message":"Done.\n\nThank you.","commit_id":"169686fb609e114cf9ceab7b772152b2749ca66a"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"ec3f65afca942f471dd4b496af48f303194ed5bc","unresolved":false,"context_lines":[{"line_number":383,"context_line":"                yield endpoint"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        # TODO(davechen): If there is service with no endpoints, we should skip"},{"line_number":386,"context_line":"        # the service instead of keeping it in the catalog, see bug #1436704."},{"line_number":387,"context_line":"        def make_v3_service(svc):"},{"line_number":388,"context_line":"            eps \u003d list(make_v3_endpoints(svc.endpoints))"},{"line_number":389,"context_line":"            service \u003d {\u0027endpoints\u0027: eps, \u0027id\u0027: svc.id, \u0027type\u0027: svc.type}"}],"source_content_type":"text/x-python","patch_set":9,"id":"fabf19d9_3d93bbfc","line":386,"updated":"2015-04-18 07:29:27.000000000","message":"feel free to remove this \"TODO\" if this patch would address that issue, just a soft suggestion.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"679c8129fdf9f7ab5e60f9931b6ca211b3c9022e","unresolved":false,"context_lines":[{"line_number":383,"context_line":"                yield endpoint"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        # TODO(davechen): If there is service with no endpoints, we should skip"},{"line_number":386,"context_line":"        # the service instead of keeping it in the catalog, see bug #1436704."},{"line_number":387,"context_line":"        def make_v3_service(svc):"},{"line_number":388,"context_line":"            eps \u003d list(make_v3_endpoints(svc.endpoints))"},{"line_number":389,"context_line":"            service \u003d {\u0027endpoints\u0027: eps, \u0027id\u0027: svc.id, \u0027type\u0027: svc.type}"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_de2015fa","line":386,"in_reply_to":"fabf19d9_3d93bbfc","updated":"2015-04-20 15:32:12.000000000","message":"Done","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"7e47cdd6971a6d134c4cb4c51e3e8ce663eb66ea","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            else:"},{"line_number":400,"context_line":"                filtered_catalog[service[\u0027id\u0027]][\u0027endpoints\u0027].append(endpoint)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        def map_association_to_catalog_service(project_association,"},{"line_number":403,"context_line":"                                               filtered_catalog,"},{"line_number":404,"context_line":"                                               unfiltered_catalog):"},{"line_number":405,"context_line":"            endpoint_id \u003d project_association[\u0027endpoint_id\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_3a738d82","line":402,"updated":"2015-04-17 16:40:42.000000000","message":"Also is there any way to tighten this or change the algorithm? This is three nested \u0027for\u0027 loops and the second one (unfiltered_catalog) can actually keep growing.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"d384b13e51424d2cad4e6e9e5be8543733890b45","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            else:"},{"line_number":400,"context_line":"                filtered_catalog[service[\u0027id\u0027]][\u0027endpoints\u0027].append(endpoint)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        def map_association_to_catalog_service(project_association,"},{"line_number":403,"context_line":"                                               filtered_catalog,"},{"line_number":404,"context_line":"                                               unfiltered_catalog):"},{"line_number":405,"context_line":"            endpoint_id \u003d project_association[\u0027endpoint_id\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_95d5d244","line":402,"in_reply_to":"3ab451fb_3a738d82","updated":"2015-04-17 17:03:54.000000000","message":"2 for loops. Is there a more elegant way to code this up?","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"679c8129fdf9f7ab5e60f9931b6ca211b3c9022e","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            else:"},{"line_number":400,"context_line":"                filtered_catalog[service[\u0027id\u0027]][\u0027endpoints\u0027].append(endpoint)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        def map_association_to_catalog_service(project_association,"},{"line_number":403,"context_line":"                                               filtered_catalog,"},{"line_number":404,"context_line":"                                               unfiltered_catalog):"},{"line_number":405,"context_line":"            endpoint_id \u003d project_association[\u0027endpoint_id\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_5e83e5cc","line":402,"in_reply_to":"3ab451fb_95d5d244","updated":"2015-04-20 15:32:12.000000000","message":"I\u0027ve tried but it\u0027s debatable whether it\u0027s more elegant.  In PS#10 the for is still there but it\u0027s embedded in a generator designed to yield just the endpoint that we want rather than looping explicitly through all of them.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"bc22060a61ccd85d434bb6d110f5a22938abb6a7","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            else:"},{"line_number":400,"context_line":"                filtered_catalog[service[\u0027id\u0027]][\u0027endpoints\u0027].append(endpoint)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        def map_association_to_catalog_service(project_association,"},{"line_number":403,"context_line":"                                               filtered_catalog,"},{"line_number":404,"context_line":"                                               unfiltered_catalog):"},{"line_number":405,"context_line":"            endpoint_id \u003d project_association[\u0027endpoint_id\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_52b6318b","line":402,"in_reply_to":"3ab451fb_95d5d244","updated":"2015-04-20 18:26:46.000000000","message":"It\u0027s actually 3 loops because this is called inside of a loop.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0b3884eabf5bb5c8c29ef18c180722ba76e0aa36","unresolved":false,"context_lines":[{"line_number":414,"context_line":"                            )"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":417,"context_line":"        associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":418,"context_line":"            tenant_id)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        # create a catalog of services mapped by id, omitting any that"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_cf550d1e","line":417,"updated":"2015-04-17 16:36:39.000000000","message":"Why do this work and the \u0027for\u0027 loop immediately below if it may not be used at all? Seems like we can check the config value first.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"679c8129fdf9f7ab5e60f9931b6ca211b3c9022e","unresolved":false,"context_lines":[{"line_number":414,"context_line":"                            )"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":417,"context_line":"        associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":418,"context_line":"            tenant_id)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        # create a catalog of services mapped by id, omitting any that"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_dee5b5a8","line":417,"in_reply_to":"3ab451fb_156662ed","updated":"2015-04-20 15:32:12.000000000","message":"Yes, what Guang said.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"d384b13e51424d2cad4e6e9e5be8543733890b45","unresolved":false,"context_lines":[{"line_number":414,"context_line":"                            )"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":417,"context_line":"        associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":418,"context_line":"            tenant_id)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        # create a catalog of services mapped by id, omitting any that"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_156662ed","line":417,"in_reply_to":"3ab451fb_cf550d1e","updated":"2015-04-17 17:03:54.000000000","message":"Config is for returning all endpoints if there are no filtered endpoints. We have to check whether there are filtered endpoints first regardless.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"e7b33f6177cc295f22c83ca4394a05bf757f9b46","unresolved":false,"context_lines":[{"line_number":414,"context_line":"                            )"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":417,"context_line":"        associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":418,"context_line":"            tenant_id)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        # create a catalog of services mapped by id, omitting any that"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_472c1a02","line":417,"in_reply_to":"dac4157f_0dde586d","updated":"2015-04-21 08:33:25.000000000","message":"The logic is (as I understand it - I didn\u0027t invent this):\n\nif filtered_catalog is not empty then:\n  return filtered_catalog\nelse:\n if CONF.endpoint_filter_.return_all_endpoints_if_no_filter \u003d true then:\n    return unfiltered_catalog\n  else\n    return nothing\n\nso we need to prepare the filtered catalog - or at least determine that it will be empty no matter what.  We can\u0027t go round it.  Guang\u0027s idea in PS#12 to check the endpoint associations and the conf property first before preparing the filtered list might work.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"e35efc5e25d51161b40ddee862be7fdbb2446c01","unresolved":false,"context_lines":[{"line_number":414,"context_line":"                            )"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":417,"context_line":"        associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":418,"context_line":"            tenant_id)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        # create a catalog of services mapped by id, omitting any that"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_0dde586d","line":417,"in_reply_to":"dac4157f_dee5b5a8","updated":"2015-04-20 18:36:47.000000000","message":"You could check CONF.endpoint_filter_.return_all_endpoints_if_no_filter before creating the filtered_catalog. If that config value is False then it doesn\u0027t matter what is in the filtered_catalog.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"ec3f65afca942f471dd4b496af48f303194ed5bc","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":417,"context_line":"        associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":418,"context_line":"            tenant_id)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        # create a catalog of services mapped by id, omitting any that"},{"line_number":421,"context_line":"        # have no endpoints assigned and ensuring that the service is"}],"source_content_type":"text/x-python","patch_set":9,"id":"fabf19d9_5d5b0f55","line":418,"updated":"2015-04-18 07:29:27.000000000","message":"be caution here, suppose `tenant_id` is None (see bug #1261468), we would not get associations and then `filtered_catalog` will be empty, what we will get at last?","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"679c8129fdf9f7ab5e60f9931b6ca211b3c9022e","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":417,"context_line":"        associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":418,"context_line":"            tenant_id)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        # create a catalog of services mapped by id, omitting any that"},{"line_number":421,"context_line":"        # have no endpoints assigned and ensuring that the service is"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_9eee1d8a","line":418,"in_reply_to":"fabf19d9_5d5b0f55","updated":"2015-04-20 15:32:12.000000000","message":"I\u0027ve checked this against how a domain scope behaves before this change and it appears to be consistent.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0b3884eabf5bb5c8c29ef18c180722ba76e0aa36","unresolved":false,"context_lines":[{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        # if there are no endpoints assigned to the project check"},{"line_number":431,"context_line":"        # whether all endpoints should be returned"},{"line_number":432,"context_line":"        if (CONF.endpoint_filter.return_all_endpoints_if_no_filter and"},{"line_number":433,"context_line":"                not filtered_catalog):"},{"line_number":434,"context_line":"            v3_catalog \u003d unfiltered_catalog"},{"line_number":435,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_cf7e2dae","line":432,"updated":"2015-04-17 16:36:39.000000000","message":"If this is no longer a function of the extension should we make the config option a part of the catalog section?","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"d384b13e51424d2cad4e6e9e5be8543733890b45","unresolved":false,"context_lines":[{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        # if there are no endpoints assigned to the project check"},{"line_number":431,"context_line":"        # whether all endpoints should be returned"},{"line_number":432,"context_line":"        if (CONF.endpoint_filter.return_all_endpoints_if_no_filter and"},{"line_number":433,"context_line":"                not filtered_catalog):"},{"line_number":434,"context_line":"            v3_catalog \u003d unfiltered_catalog"},{"line_number":435,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_da03890e","line":432,"in_reply_to":"3ab451fb_cf7e2dae","updated":"2015-04-17 17:03:54.000000000","message":"That\u0027s debatable. Externally, endpoint filtering is still a separate function. We are just consolidating the functionally internally. Since config options are externally facing, we may want to leave them along for now.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"e35efc5e25d51161b40ddee862be7fdbb2446c01","unresolved":false,"context_lines":[{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        # if there are no endpoints assigned to the project check"},{"line_number":431,"context_line":"        # whether all endpoints should be returned"},{"line_number":432,"context_line":"        if (CONF.endpoint_filter.return_all_endpoints_if_no_filter and"},{"line_number":433,"context_line":"                not filtered_catalog):"},{"line_number":434,"context_line":"            v3_catalog \u003d unfiltered_catalog"},{"line_number":435,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_4d7c5072","line":432,"in_reply_to":"3ab451fb_da03890e","updated":"2015-04-20 18:36:47.000000000","message":"The commit message is a little hard to follow, but I think it says that this patch defaults the behavior to be on. IMO that\u0027s no longer an extension.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"e7b33f6177cc295f22c83ca4394a05bf757f9b46","unresolved":false,"context_lines":[{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        # if there are no endpoints assigned to the project check"},{"line_number":431,"context_line":"        # whether all endpoints should be returned"},{"line_number":432,"context_line":"        if (CONF.endpoint_filter.return_all_endpoints_if_no_filter and"},{"line_number":433,"context_line":"                not filtered_catalog):"},{"line_number":434,"context_line":"            v3_catalog \u003d unfiltered_catalog"},{"line_number":435,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_4713fab8","line":432,"in_reply_to":"dac4157f_4d7c5072","updated":"2015-04-21 08:33:25.000000000","message":"I have no judgement on this.  I need a steer on what to do.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"c62322aebda63ed9567d380e0e89fb3cca180cd9","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                                               unfiltered_catalog):"},{"line_number":403,"context_line":"            endpoint_id \u003d project_association[\u0027endpoint_id\u0027]"},{"line_number":404,"context_line":"            for service in unfiltered_catalog:"},{"line_number":405,"context_line":"                endpoints \u003d service.get(\u0027endpoints\u0027)"},{"line_number":406,"context_line":"                endpoint \u003d next("},{"line_number":407,"context_line":"                    (ept for ept in endpoints if ept[\u0027id\u0027] \u003d\u003d endpoint_id),"},{"line_number":408,"context_line":"                    None"}],"source_content_type":"text/x-python","patch_set":11,"id":"dac4157f_ad31acee","line":405,"updated":"2015-04-20 18:31:25.000000000","message":"Another possible algorithm is that loop through the endpoints once to make a dictionary {endpoint_id: endpoint} and do a O(1) lookup into that dictionary instead of looping through.","commit_id":"eb0bf8e968d8c12a1e61b052d1308a452fc56ec4"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"c62322aebda63ed9567d380e0e89fb3cca180cd9","unresolved":false,"context_lines":[{"line_number":404,"context_line":"            for service in unfiltered_catalog:"},{"line_number":405,"context_line":"                endpoints \u003d service.get(\u0027endpoints\u0027)"},{"line_number":406,"context_line":"                endpoint \u003d next("},{"line_number":407,"context_line":"                    (ept for ept in endpoints if ept[\u0027id\u0027] \u003d\u003d endpoint_id),"},{"line_number":408,"context_line":"                    None"},{"line_number":409,"context_line":"                )"},{"line_number":410,"context_line":"                if endpoint:"}],"source_content_type":"text/x-python","patch_set":11,"id":"dac4157f_721db572","line":407,"updated":"2015-04-20 18:31:25.000000000","message":"The algorithm is a little better now, but I think spelling out the explicit \u0027for\u0027 loop makes it easier to read. How about just adding a break in the loop to not have to exhaust it?","commit_id":"eb0bf8e968d8c12a1e61b052d1308a452fc56ec4"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"6f6df65c03877ff175473828992db78e093ccd9b","unresolved":false,"context_lines":[{"line_number":421,"context_line":"            # whether all endpoints should be returned"},{"line_number":422,"context_line":"            return unfiltered_catalog"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        # create a catalog of services mapped by id, omitting any that"},{"line_number":425,"context_line":"        # have no endpoints assigned and ensuring that the service is"},{"line_number":426,"context_line":"        # only included once if there are multiple endpoints for it"},{"line_number":427,"context_line":"        endpoint_lookup_dict \u003d create_endpoint_lookup_dict(unfiltered_catalog)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dac4157f_4a965ff1","line":424,"updated":"2015-04-21 09:07:50.000000000","message":"This is not accurate.  The mapping is of endpoints (including details of the service) by endpoint id.","commit_id":"83d64421e09ea9151aabb46166e921ab310d68e1"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"6f6df65c03877ff175473828992db78e093ccd9b","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            endpoint \u003d endpoint_lookup_dict.get("},{"line_number":431,"context_line":"                project_association[\u0027endpoint_id\u0027])"},{"line_number":432,"context_line":"            if endpoint:"},{"line_number":433,"context_line":"                # need to remove the service_id from the formatted endpoint"},{"line_number":434,"context_line":"                service \u003d endpoint.pop(\u0027service\u0027)"},{"line_number":435,"context_line":"                add_endpoint_to_filtered_catalog("},{"line_number":436,"context_line":"                    filtered_catalog,"}],"source_content_type":"text/x-python","patch_set":12,"id":"dac4157f_eab9b37a","line":433,"updated":"2015-04-21 09:07:50.000000000","message":"This is not accurate.  The key \u0027service\u0027 and associated value are what is removed from the dict here.","commit_id":"83d64421e09ea9151aabb46166e921ab310d68e1"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"c3d4c80c289d3fd7afaee78233bdeebcb82e7e4f","unresolved":false,"context_lines":[{"line_number":416,"context_line":"            tenant_id)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        if (CONF.endpoint_filter.return_all_endpoints_if_no_filter and"},{"line_number":419,"context_line":"                not associations):"},{"line_number":420,"context_line":"            # if there are no endpoints assigned to the project check"},{"line_number":421,"context_line":"            # whether all endpoints should be returned"},{"line_number":422,"context_line":"            return unfiltered_catalog"}],"source_content_type":"text/x-python","patch_set":13,"id":"dac4157f_346a44b4","line":419,"updated":"2015-04-22 08:29:55.000000000","message":"I am still not postive here.\n\nSuppose it\u0027s domain scoped and could pass this condition, so it will return `unfiltered_catalog` here.\n\nBut `unfiltered_catalog` may contain the service which has no endpoints assigned, pls refer to compute service. By default, all of the urls of compute service may needs tenant_id as a replacement.\n\nThe service with no endpoints could be happened after \"core.format_url\", endpoints is not empty initially but will be empty after replacements. I think there might be some misunderstanding here.\n\nYou can found this if you get a domain scoped token with this patch.\n\nBesides, I am also looks forward some testcase to prove the fix for the bug #1436704. If this PS expected to address that bug.","commit_id":"28690f08e5ccde913459ff5e568c937b6e33091b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"dfb73fd3c025f8acefa7261ee51b5b482bd31ae0","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"                yield endpoint"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        def make_v3_service(svc):"},{"line_number":386,"context_line":"            eps \u003d list(make_v3_endpoints(svc.endpoints))"},{"line_number":387,"context_line":"            service \u003d {\u0027endpoints\u0027: eps, \u0027id\u0027: svc.id, \u0027type\u0027: svc.type}"},{"line_number":388,"context_line":"            service[\u0027name\u0027] \u003d svc.extra.get(\u0027name\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dac4157f_1d851306","line":385,"updated":"2015-04-22 14:53:44.000000000","message":"Sorry, I am leading you to the wrong direction, pls revert the TODO comment back if this patch not intends to fix it.\nsee may comment in PS13.","commit_id":"cb9be8216d02be2d659900fe3862bcc272a02e34"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"e31a13e5d64eb00c9e34760d7e3db1bf5f1dc767","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            silent_keyerror_failures \u003d [\u0027tenant_id\u0027]"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        session \u003d sql.get_session()"},{"line_number":357,"context_line":"        # this joined load means that all the endpoints will be populated"},{"line_number":358,"context_line":"        # from the same query that retrieves the service - so it\u0027s efficient"},{"line_number":359,"context_line":"        # in comparison to multiple sub-interrogations of the db or of the"},{"line_number":360,"context_line":"        # keystone REST api for the same information"}],"source_content_type":"text/x-python","patch_set":18,"id":"3acd31a7_c465d845","line":357,"updated":"2015-04-30 16:48:24.000000000","message":"nit s/this/This\n\nI think that this more then a comment, this can be a note.","commit_id":"90bd964213c972153cd2d5d470735acbfd12888e"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"e7b74879138f92f36097da4bb228b2a1284a6557","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            silent_keyerror_failures \u003d [\u0027tenant_id\u0027]"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        session \u003d sql.get_session()"},{"line_number":357,"context_line":"        # this joined load means that all the endpoints will be populated"},{"line_number":358,"context_line":"        # from the same query that retrieves the service - so it\u0027s efficient"},{"line_number":359,"context_line":"        # in comparison to multiple sub-interrogations of the db or of the"},{"line_number":360,"context_line":"        # keystone REST api for the same information"}],"source_content_type":"text/x-python","patch_set":18,"id":"3acd31a7_c6226b01","line":357,"in_reply_to":"3acd31a7_c465d845","updated":"2015-05-01 10:52:29.000000000","message":"I\u0027ve shortened it.  The comment was initially to justify this approach over the one taken in the initial endpoint filtering extension.  I don\u0027t really think it\u0027s necessary so I\u0027ve made it more concise.","commit_id":"90bd964213c972153cd2d5d470735acbfd12888e"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"e31a13e5d64eb00c9e34760d7e3db1bf5f1dc767","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        session \u003d sql.get_session()"},{"line_number":357,"context_line":"        # this joined load means that all the endpoints will be populated"},{"line_number":358,"context_line":"        # from the same query that retrieves the service - so it\u0027s efficient"},{"line_number":359,"context_line":"        # in comparison to multiple sub-interrogations of the db or of the"},{"line_number":360,"context_line":"        # keystone REST api for the same information"},{"line_number":361,"context_line":"        all_services \u003d ("}],"source_content_type":"text/x-python","patch_set":18,"id":"3acd31a7_4452e868","line":358,"updated":"2015-04-30 16:48:24.000000000","message":"maybe s/-/. ?","commit_id":"90bd964213c972153cd2d5d470735acbfd12888e"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"e7b74879138f92f36097da4bb228b2a1284a6557","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        session \u003d sql.get_session()"},{"line_number":357,"context_line":"        # this joined load means that all the endpoints will be populated"},{"line_number":358,"context_line":"        # from the same query that retrieves the service - so it\u0027s efficient"},{"line_number":359,"context_line":"        # in comparison to multiple sub-interrogations of the db or of the"},{"line_number":360,"context_line":"        # keystone REST api for the same information"},{"line_number":361,"context_line":"        all_services \u003d ("}],"source_content_type":"text/x-python","patch_set":18,"id":"3acd31a7_a621affd","line":358,"in_reply_to":"3acd31a7_4452e868","updated":"2015-05-01 10:52:29.000000000","message":"Done by removal.","commit_id":"90bd964213c972153cd2d5d470735acbfd12888e"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"73aaab69deeac650028f259757adf77c54f611b7","unresolved":false,"context_lines":[{"line_number":419,"context_line":"            associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":420,"context_line":"                tenant_id)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # if this is a domain scoped token then return the lot, otherwise"},{"line_number":423,"context_line":"        # if there are no endpoints assigned to the project check"},{"line_number":424,"context_line":"        # whether all endpoints should be returned"},{"line_number":425,"context_line":"        if not tenant_id:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3acd31a7_366270ae","line":422,"updated":"2015-05-01 06:08:54.000000000","message":"what\u0027s the meaning of lot here? just curious :-)","commit_id":"90bd964213c972153cd2d5d470735acbfd12888e"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"e7b74879138f92f36097da4bb228b2a1284a6557","unresolved":false,"context_lines":[{"line_number":419,"context_line":"            associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":420,"context_line":"                tenant_id)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # if this is a domain scoped token then return the lot, otherwise"},{"line_number":423,"context_line":"        # if there are no endpoints assigned to the project check"},{"line_number":424,"context_line":"        # whether all endpoints should be returned"},{"line_number":425,"context_line":"        if not tenant_id:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3acd31a7_667a77f3","line":422,"in_reply_to":"3acd31a7_366270ae","updated":"2015-05-01 10:52:29.000000000","message":"Yes.  Ambiguous, I agree.  I\u0027ve changed the comment to me more literal.","commit_id":"90bd964213c972153cd2d5d470735acbfd12888e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5cd39c092086c3a48619cf983c3b34437dbc1108","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        def create_endpoint_lookup_dict(unfiltered_catalog):"},{"line_number":400,"context_line":"            endpoint_lookup_dict \u003d {}"},{"line_number":401,"context_line":"            for service in unfiltered_catalog:"},{"line_number":402,"context_line":"                for endpoint in service.get(\u0027endpoints\u0027):"},{"line_number":403,"context_line":"                    if not endpoint_lookup_dict.get(endpoint[\u0027id\u0027]):"},{"line_number":404,"context_line":"                        new_endpoint \u003d endpoint.copy()"},{"line_number":405,"context_line":"                        # need to preserve the service so we don\u0027t have"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_9eacf49f","line":402,"updated":"2015-06-19 19:49:05.000000000","message":"If endpoint isn\u0027t in the dict then this code is broken. If it is always expect use the __getitem__ syntax.","commit_id":"2e41ad70cc9de767dc65e689d420fa073809fe40"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"63f4bcd8d062e4b51a88fb86c6d849f0a205ab7d","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        def create_endpoint_lookup_dict(unfiltered_catalog):"},{"line_number":400,"context_line":"            endpoint_lookup_dict \u003d {}"},{"line_number":401,"context_line":"            for service in unfiltered_catalog:"},{"line_number":402,"context_line":"                for endpoint in service.get(\u0027endpoints\u0027):"},{"line_number":403,"context_line":"                    if not endpoint_lookup_dict.get(endpoint[\u0027id\u0027]):"},{"line_number":404,"context_line":"                        new_endpoint \u003d endpoint.copy()"},{"line_number":405,"context_line":"                        # need to preserve the service so we don\u0027t have"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_3d46dd4f","line":402,"in_reply_to":"3afb71cf_9eacf49f","updated":"2015-06-22 17:22:47.000000000","message":"It\u0027s always in there as it\u0027s added at line 386.\n\nDone.","commit_id":"2e41ad70cc9de767dc65e689d420fa073809fe40"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5cd39c092086c3a48619cf983c3b34437dbc1108","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            endpoint_lookup_dict \u003d {}"},{"line_number":401,"context_line":"            for service in unfiltered_catalog:"},{"line_number":402,"context_line":"                for endpoint in service.get(\u0027endpoints\u0027):"},{"line_number":403,"context_line":"                    if not endpoint_lookup_dict.get(endpoint[\u0027id\u0027]):"},{"line_number":404,"context_line":"                        new_endpoint \u003d endpoint.copy()"},{"line_number":405,"context_line":"                        # need to preserve the service so we don\u0027t have"},{"line_number":406,"context_line":"                        # to look it up later"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afb71cf_7e7ff814","line":403,"updated":"2015-06-19 19:49:05.000000000","message":"So we expect the \u0027id\u0027 to be set to None sometimes?","commit_id":"2e41ad70cc9de767dc65e689d420fa073809fe40"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"63f4bcd8d062e4b51a88fb86c6d849f0a205ab7d","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            endpoint_lookup_dict \u003d {}"},{"line_number":401,"context_line":"            for service in unfiltered_catalog:"},{"line_number":402,"context_line":"                for endpoint in service.get(\u0027endpoints\u0027):"},{"line_number":403,"context_line":"                    if not endpoint_lookup_dict.get(endpoint[\u0027id\u0027]):"},{"line_number":404,"context_line":"                        new_endpoint \u003d endpoint.copy()"},{"line_number":405,"context_line":"                        # need to preserve the service so we don\u0027t have"},{"line_number":406,"context_line":"                        # to look it up later"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_6272807e","line":403,"in_reply_to":"3afb71cf_7e7ff814","updated":"2015-06-22 17:22:47.000000000","message":"No, it just might not be in the lookup dict.  In which case we add it.","commit_id":"2e41ad70cc9de767dc65e689d420fa073809fe40"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d3b36771c880f6f924ae4e10c1805e6fa0102d5b","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            silent_keyerror_failures \u003d [\u0027tenant_id\u0027]"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        session \u003d sql.get_session()"},{"line_number":357,"context_line":"        # Do a joined load so all the service endpoints will be populated"},{"line_number":358,"context_line":"        all_services \u003d ("},{"line_number":359,"context_line":"            session.query(Service).join(Service.endpoints)"},{"line_number":360,"context_line":"            .filter(Service.enabled \u003d\u003d true())."}],"source_content_type":"text/x-python","patch_set":23,"id":"3a50d1a3_ae11ea53","line":357,"updated":"2015-08-04 20:19:03.000000000","message":"Didn\u0027t you switch away from doing a joined load here? Is there any reason you went from eager loading to lazy loading?","commit_id":"564044b939995b89069703ca4585d13647fa1390"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"725f146fdaa6b845fad48697d7d7bfb86941f6bf","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            silent_keyerror_failures \u003d [\u0027tenant_id\u0027]"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        session \u003d sql.get_session()"},{"line_number":357,"context_line":"        # Do a joined load so all the service endpoints will be populated"},{"line_number":358,"context_line":"        all_services \u003d ("},{"line_number":359,"context_line":"            session.query(Service).join(Service.endpoints)"},{"line_number":360,"context_line":"            .filter(Service.enabled \u003d\u003d true())."}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_7a967540","line":357,"in_reply_to":"3a50d1a3_ae11ea53","updated":"2015-08-05 15:06:38.000000000","message":"I don\u0027t understand.  No, I introduced the join here to obviate multiple round trips to the database.","commit_id":"564044b939995b89069703ca4585d13647fa1390"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d3b36771c880f6f924ae4e10c1805e6fa0102d5b","unresolved":false,"context_lines":[{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        if tenant_id:"},{"line_number":416,"context_line":"            associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":417,"context_line":"                tenant_id)"},{"line_number":418,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"3a50d1a3_4e1706ee","line":415,"updated":"2015-08-04 20:19:03.000000000","message":"To make this more readable I would put the \u0027if not tenant_id\u0027 here to break early. Then when you so the associations assignment you don\u0027t need to wrap it in an \u0027if\u0027 statement.","commit_id":"564044b939995b89069703ca4585d13647fa1390"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"725f146fdaa6b845fad48697d7d7bfb86941f6bf","unresolved":false,"context_lines":[{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        if tenant_id:"},{"line_number":416,"context_line":"            associations \u003d self.endpoint_filter_api.list_endpoints_for_project("},{"line_number":417,"context_line":"                tenant_id)"},{"line_number":418,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_65b81ac9","line":415,"in_reply_to":"3a50d1a3_4e1706ee","updated":"2015-08-05 15:06:38.000000000","message":"Done","commit_id":"564044b939995b89069703ca4585d13647fa1390"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e518fd1a2cd5088ed683b75d01369f74e6b1bfbe","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        \"\"\""},{"line_number":288,"context_line":"        substitutions \u003d dict("},{"line_number":289,"context_line":"            itertools.chain(six.iteritems(CONF),"},{"line_number":290,"context_line":"                            six.iteritems(CONF.eventlet_server)))"},{"line_number":291,"context_line":"        substitutions.update({\u0027user_id\u0027: user_id})"},{"line_number":292,"context_line":"        silent_keyerror_failures \u003d []"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_50d87bef","line":289,"updated":"2015-09-21 17:54:32.000000000","message":"this change is unrelated to \"Move endpoint catalog filtering to default driver\", revert it.","commit_id":"cb68d57c71b9e5ec9fb0ed921554492da370b7c7"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"cf936e9478d75a3b260cc78b31725f7e6a2aa9a1","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        \"\"\""},{"line_number":288,"context_line":"        substitutions \u003d dict("},{"line_number":289,"context_line":"            itertools.chain(six.iteritems(CONF),"},{"line_number":290,"context_line":"                            six.iteritems(CONF.eventlet_server)))"},{"line_number":291,"context_line":"        substitutions.update({\u0027user_id\u0027: user_id})"},{"line_number":292,"context_line":"        silent_keyerror_failures \u003d []"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_a173cbb3","line":289,"in_reply_to":"ba15a1d1_50d87bef","updated":"2015-09-21 18:41:12.000000000","message":"There is also no reason here to use iteritems. It is sufficient to just stick with .items","commit_id":"cb68d57c71b9e5ec9fb0ed921554492da370b7c7"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"2a7dfb724e7ee7185431f8ebf730f6630f987c52","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        \"\"\""},{"line_number":288,"context_line":"        substitutions \u003d dict("},{"line_number":289,"context_line":"            itertools.chain(six.iteritems(CONF),"},{"line_number":290,"context_line":"                            six.iteritems(CONF.eventlet_server)))"},{"line_number":291,"context_line":"        substitutions.update({\u0027user_id\u0027: user_id})"},{"line_number":292,"context_line":"        silent_keyerror_failures \u003d []"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_b72a297d","line":289,"in_reply_to":"ba15a1d1_a173cbb3","updated":"2015-09-21 19:16:59.000000000","message":"Agreed. Done","commit_id":"cb68d57c71b9e5ec9fb0ed921554492da370b7c7"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d34a11e1a98ecc76aedc2d88379933482af17a07","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        \"\"\""},{"line_number":342,"context_line":"        d \u003d dict("},{"line_number":343,"context_line":"            itertools.chain(CONF.items(), CONF.eventlet_server.items()))"},{"line_number":344,"context_line":"        d.update({\u0027user_id\u0027: user_id})"},{"line_number":345,"context_line":"        silent_keyerror_failures \u003d []"},{"line_number":346,"context_line":"        if tenant_id:"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_2079f2fc","side":"PARENT","line":343,"updated":"2015-09-21 20:25:16.000000000","message":"Wasn\u0027t this change supposed to be reverted?","commit_id":"fb9fbbafcd54dfdcb7607db29aff6d9daf8800de"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"d1253e62e5cd2304915cb41b23105ebf98d83fa0","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        \"\"\""},{"line_number":342,"context_line":"        d \u003d dict("},{"line_number":343,"context_line":"            itertools.chain(CONF.items(), CONF.eventlet_server.items()))"},{"line_number":344,"context_line":"        d.update({\u0027user_id\u0027: user_id})"},{"line_number":345,"context_line":"        silent_keyerror_failures \u003d []"},{"line_number":346,"context_line":"        if tenant_id:"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_432e70fb","side":"PARENT","line":343,"in_reply_to":"ba15a1d1_2079f2fc","updated":"2015-09-21 22:07:10.000000000","message":"Yes definitely. For some reason my local change is lost! Need to trouble my dev env.","commit_id":"fb9fbbafcd54dfdcb7607db29aff6d9daf8800de"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d34a11e1a98ecc76aedc2d88379933482af17a07","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        all_services \u003d ("},{"line_number":358,"context_line":"            session.query(Service).join(Service.endpoints)"},{"line_number":359,"context_line":"            .filter(Service.enabled \u003d\u003d true())."},{"line_number":360,"context_line":"            all())"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        def make_v3_endpoints(endpoints):"},{"line_number":363,"context_line":"            for endpoint in (ep.to_dict() for ep in endpoints if ep.enabled):"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_c0683624","line":360,"updated":"2015-09-21 20:25:16.000000000","message":"What is the difference between the generated queries here?","commit_id":"cfbfddd9ca93e5c73f9b5cd601fcada392182c61"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"d1253e62e5cd2304915cb41b23105ebf98d83fa0","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        all_services \u003d ("},{"line_number":358,"context_line":"            session.query(Service).join(Service.endpoints)"},{"line_number":359,"context_line":"            .filter(Service.enabled \u003d\u003d true())."},{"line_number":360,"context_line":"            all())"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        def make_v3_endpoints(endpoints):"},{"line_number":363,"context_line":"            for endpoint in (ep.to_dict() for ep in endpoints if ep.enabled):"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_0fae5998","line":360,"in_reply_to":"ba15a1d1_c0683624","updated":"2015-09-21 22:07:10.000000000","message":"I\u0027ll let D. Kennedy answer this question.","commit_id":"cfbfddd9ca93e5c73f9b5cd601fcada392182c61"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d34a11e1a98ecc76aedc2d88379933482af17a07","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                return []"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"        # Create a catalog of endpoints mapped by id"},{"line_number":429,"context_line":"        endpoint_lookup_dict \u003d create_endpoint_lookup_dict(unfiltered_catalog)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        filtered_catalog \u003d {}"},{"line_number":432,"context_line":"        for project_association in associations:"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_436190a7","line":429,"updated":"2015-09-21 20:25:16.000000000","message":"This is probably something that can be fixed later, but this algorithm feels strange the way inverts the catalog and pieces it back together later. For instance, if we got back a set of ints as associations then we would just look through the unfiltered catalog and delete things that are not in that set. I think that would read better.","commit_id":"cfbfddd9ca93e5c73f9b5cd601fcada392182c61"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"d1253e62e5cd2304915cb41b23105ebf98d83fa0","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                return []"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"        # Create a catalog of endpoints mapped by id"},{"line_number":429,"context_line":"        endpoint_lookup_dict \u003d create_endpoint_lookup_dict(unfiltered_catalog)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        filtered_catalog \u003d {}"},{"line_number":432,"context_line":"        for project_association in associations:"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_cf906151","line":429,"in_reply_to":"ba15a1d1_436190a7","updated":"2015-09-21 22:07:10.000000000","message":"Let me see if I can incorporate your suggestion in the next patch.","commit_id":"cfbfddd9ca93e5c73f9b5cd601fcada392182c61"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"d484e1ea758f81fa7df417e8f5a016abaf42bd7b","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        session \u003d sql.get_session()"},{"line_number":352,"context_line":"        services \u003d (session.query(Service).filter(Service.enabled \u003d\u003d true())."},{"line_number":353,"context_line":"                    options(sql.joinedload(Service.endpoints))."},{"line_number":354,"context_line":"                    all())"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        def make_v3_endpoints(endpoints):"},{"line_number":357,"context_line":"            for endpoint in (ep.to_dict() for ep in endpoints if ep.enabled):"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba15a1d1_1512e609","side":"PARENT","line":354,"updated":"2015-09-21 23:27:51.000000000","message":"This one yield the follow SQL statement\n\n  SELECT service.id AS service_id, service.type AS service_type, service.enabled AS service_enabled, service.extra AS service_extra, endpoint_1.id AS endpoint_1_id, endpoint_1.legacy_endpoint_id AS endpoint_1_legacy_endpoint_id, endpoint_1.interface AS endpoint_1_interface, endpoint_1.region_id AS endpoint_1_region_id, endpoint_1.service_id AS endpoint_1_service_id, endpoint_1.url AS endpoint_1_url, endpoint_1.enabled AS endpoint_1_enabled, endpoint_1.extra AS endpoint_1_extra\n    FROM service LEFT OUTER JOIN endpoint AS endpoint_1 ON service.id \u003d endpoint_1.service_id\n    WHERE service.enabled \u003d 1\n\n\nThe other one actuall produces two SQL statements\n\n  SELECT service.id AS service_id, service.type AS service_type, service.enabled AS service_enabled, service.extra AS service_extra \n    FROM service JOIN endpoint ON service.id \u003d endpoint.service_id\n    WHERE service.enabled \u003d 1\n    \n  SELECT endpoint.id AS endpoint_id, endpoint.legacy_endpoint_id AS endpoint_legacy_endpoint_id, endpoint.interface AS endpoint_interface, endpoint.region_id AS endpoint_region_id, endpoint.service_id AS endpoint_service_id, endpoint.url AS endpoint_url, endpoint.enabled AS endpoint_enabled, endpoint.extra AS endpoint_extra\n    FROM endpoint\n    WHERE ? \u003d endpoint.service_id\n\nDavid (Kennedy), can you please explain why you make the change? Seem like the first one is more efficient.","commit_id":"fb9fbbafcd54dfdcb7607db29aff6d9daf8800de"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"936fe2ae108cf6e61bec3ffe2e0766d8c258311d","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        session \u003d sql.get_session()"},{"line_number":352,"context_line":"        services \u003d (session.query(Service).filter(Service.enabled \u003d\u003d true())."},{"line_number":353,"context_line":"                    options(sql.joinedload(Service.endpoints))."},{"line_number":354,"context_line":"                    all())"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        def make_v3_endpoints(endpoints):"},{"line_number":357,"context_line":"            for endpoint in (ep.to_dict() for ep in endpoints if ep.enabled):"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba15a1d1_caca8c4f","side":"PARENT","line":354,"in_reply_to":"ba15a1d1_1512e609","updated":"2015-09-22 01:02:23.000000000","message":"The second query will be made for each service returned from the first query. I\u0027m testing a change now that will fix this query to do an inner join.","commit_id":"fb9fbbafcd54dfdcb7607db29aff6d9daf8800de"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"bc8d1030444b5cda12f335a46d31dc2522330f7c","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        session \u003d sql.get_session()"},{"line_number":352,"context_line":"        services \u003d (session.query(Service).filter(Service.enabled \u003d\u003d true())."},{"line_number":353,"context_line":"                    options(sql.joinedload(Service.endpoints))."},{"line_number":354,"context_line":"                    all())"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        def make_v3_endpoints(endpoints):"},{"line_number":357,"context_line":"            for endpoint in (ep.to_dict() for ep in endpoints if ep.enabled):"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba15a1d1_db001569","side":"PARENT","line":354,"in_reply_to":"ba15a1d1_caca8c4f","updated":"2015-09-22 08:42:47.000000000","message":"Thanks, David.  Yes, the first one uses a left outer join which returns services which have no endpoint.  The second does an inner join.  However, as you point out it\u0027s not a full inner join populating the fields required.  If the first query can be changed to use an inner join then that would be far better (and what I had initially intended).","commit_id":"fb9fbbafcd54dfdcb7607db29aff6d9daf8800de"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f835f55c734701f4d0241bdf3c35d8a94e757cf7","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        session \u003d sql.get_session()"},{"line_number":352,"context_line":"        services \u003d (session.query(Service).filter(Service.enabled \u003d\u003d true())."},{"line_number":353,"context_line":"                    options(sql.joinedload(Service.endpoints))."},{"line_number":354,"context_line":"                    all())"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        def make_v3_endpoints(endpoints):"},{"line_number":357,"context_line":"            for endpoint in (ep.to_dict() for ep in endpoints if ep.enabled):"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba15a1d1_427dea1a","side":"PARENT","line":354,"in_reply_to":"ba15a1d1_db001569","updated":"2015-09-22 13:33:55.000000000","message":"Yes, it can be and it seems to work fine. joinedload() take a kwarg \u0027innerjoin\u0027 that is a boolean. http://paste.openstack.org/show/473487/","commit_id":"fb9fbbafcd54dfdcb7607db29aff6d9daf8800de"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        all_services \u003d ("},{"line_number":356,"context_line":"            session.query(Service)"},{"line_number":357,"context_line":"            .filter(Service.enabled \u003d\u003d true())"},{"line_number":358,"context_line":"            .options(sql.joinedload(Service.endpoints, innerjoin\u003dTrue))"},{"line_number":359,"context_line":"            .all())"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        def make_v3_endpoints(endpoints):"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_c0b55931","line":358,"updated":"2015-09-28 21:06:21.000000000","message":"why did this change? There should be a comment why innerjoin is used here vs the default of \"left outer join\".\n\nThis change should probably be a separate commit. There\u0027s no explanation in the commit message why this is needed for the bug fix.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        unfiltered_catalog \u003d [make_v3_service(svc) for svc in all_services]"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        # If this is a domain scoped token then return the unfiltered catalog."},{"line_number":391,"context_line":"        # Otherwise if there are no endpoints associated with the project"},{"line_number":392,"context_line":"        # check whether all endpoints should be returned"},{"line_number":393,"context_line":"        if not tenant_id:"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_1b0ae021","line":390,"updated":"2015-09-28 21:06:21.000000000","message":"this comment is unnecessary, it just says what the code below already does. Comments should say \"why\"... why return the unfiltered catalog for domain-scoped tokens?","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":395,"context_line":""},{"line_number":396,"context_line":"        associations \u003d set([endpoint[\u0027endpoint_id\u0027] for endpoint in"},{"line_number":397,"context_line":"                            self.endpoint_filter_api"},{"line_number":398,"context_line":"                                .list_endpoints_for_project(tenant_id)])"},{"line_number":399,"context_line":"        if not associations:"},{"line_number":400,"context_line":"            if CONF.endpoint_filter.return_all_endpoints_if_no_filter:"},{"line_number":401,"context_line":"                return unfiltered_catalog"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_7b2afc7f","line":398,"updated":"2015-09-28 21:06:21.000000000","message":"there\u0027s no need to try to fit this all in 1 statement, and it\u0027s extra confusing. split it up.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        if not associations:"},{"line_number":400,"context_line":"            if CONF.endpoint_filter.return_all_endpoints_if_no_filter:"},{"line_number":401,"context_line":"                return unfiltered_catalog"},{"line_number":402,"context_line":"            else:"},{"line_number":403,"context_line":"                return []"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        filtered_catalog \u003d []"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_5b75b895","line":402,"updated":"2015-09-28 21:06:21.000000000","message":"suggest remove the else or be consistent in using else even when returning from if statement.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        filtered_catalog \u003d []"},{"line_number":406,"context_line":"        for service in unfiltered_catalog:"},{"line_number":407,"context_line":"            endpoints, service[\u0027endpoints\u0027] \u003d service[\u0027endpoints\u0027], []"},{"line_number":408,"context_line":"            for endpoint in endpoints:"},{"line_number":409,"context_line":"                if endpoint[\u0027id\u0027] in associations:"},{"line_number":410,"context_line":"                    service[\u0027endpoints\u0027].append(endpoint)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_fbd92c84","line":407,"updated":"2015-09-28 21:06:21.000000000","message":"is the goal here to write code as obscure as possible?","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"}],"keystone/contrib/endpoint_filter/backends/catalog_sql.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"748ec17c19e9bb17d6acb42d911bf73157b5a693","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        LOG.warning(_LW(\u0027The EndpointFilterCatalog is deprecated.  \u0027"},{"line_number":32,"context_line":"                        \u0027EndpointFiltering is now supported in the \u0027"},{"line_number":33,"context_line":"                        \u0027default sql catalog driver.\u0027))"},{"line_number":34,"context_line":"        return super(EndpointFilterCatalog, self).get_v3_catalog("},{"line_number":35,"context_line":"            user_id,"},{"line_number":36,"context_line":"            project_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_2dbe9dd4","line":33,"updated":"2015-04-03 03:11:23.000000000","message":"this needs to use the appropriate decorator:\n\n  @versionutils.deprecated(what\u003d\u0027keystone.contrib.endpoint_filter, backends.catalog_sql.EndPointFilterCatalog\u0027, \n                           as_of\u003dversionutils.deprecated.KILO,\n                           in_favor_of\u003d\u0027keystone.catalog.backends.sql.Catalog\u0027)\n\ninstead of a LW in the method itself. This Whole class is deprecated. Release notes will cover the details.","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"099161f26a8f95dcd0998984611f13a26a15f0ce","unresolved":false,"context_lines":[{"line_number":28,"context_line":"class EndpointFilterCatalog(sql.Catalog):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @versionutils.deprecated("},{"line_number":31,"context_line":"        what\u003d(\u0027keystone.contrib.endpoint_filter, \u0027"},{"line_number":32,"context_line":"              \u0027backends.catalog_sql.EndPointFilterCatalog\u0027),"},{"line_number":33,"context_line":"        as_of\u003dversionutils.deprecated.KILO,"},{"line_number":34,"context_line":"        remove_in\u003d+1,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_61e8567d","line":31,"updated":"2015-04-07 07:46:28.000000000","message":"Instead of \u0027keystone.contrib.endpoint_filter, \u0027 should this be \u0027keystone.contrib.endpoint_filter.\u0027 ?  - trailing comma replaced with period","commit_id":"dfbc588e9685ca3a15d0efd7a2da112277a64e0a"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"417fc2326b1bf3719b9de1a811d7e0622daab702","unresolved":false,"context_lines":[{"line_number":28,"context_line":"class EndpointFilterCatalog(sql.Catalog):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @versionutils.deprecated("},{"line_number":31,"context_line":"        what\u003d(\u0027keystone.contrib.endpoint_filter, \u0027"},{"line_number":32,"context_line":"              \u0027backends.catalog_sql.EndPointFilterCatalog\u0027),"},{"line_number":33,"context_line":"        as_of\u003dversionutils.deprecated.KILO,"},{"line_number":34,"context_line":"        remove_in\u003d+1,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_6fd15dcd","line":31,"in_reply_to":"9aa53dc9_61e8567d","updated":"2015-04-07 08:42:15.000000000","message":"Done","commit_id":"dfbc588e9685ca3a15d0efd7a2da112277a64e0a"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"b35baa07d2c8dca761b1ece10951bae636b12c2f","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"CONF \u003d cfg.CONF"},{"line_number":24,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"@dependency.requires(\u0027endpoint_filter_api\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_9e8568d0","line":24,"updated":"2015-04-10 02:25:15.000000000","message":"We did not use this.","commit_id":"da03c431a508ff72dda53022f7698c97e1a45c58"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"10379788d6b05f643e5d9ac7717475666f5505e2","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"CONF \u003d cfg.CONF"},{"line_number":24,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"@dependency.requires(\u0027endpoint_filter_api\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_d2151c40","line":24,"in_reply_to":"9aa53dc9_9e8568d0","updated":"2015-04-10 09:02:48.000000000","message":"Thanks, yes.  Done for next patch set.","commit_id":"da03c431a508ff72dda53022f7698c97e1a45c58"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"ec3f65afca942f471dd4b496af48f303194ed5bc","unresolved":false,"context_lines":[{"line_number":22,"context_line":"CONF \u003d cfg.CONF"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"@dependency.requires(\u0027endpoint_filter_api\u0027)"},{"line_number":26,"context_line":"class EndpointFilterCatalog(sql.Catalog):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @versionutils.deprecated("}],"source_content_type":"text/x-python","patch_set":9,"id":"fabf19d9_bdfd8b70","line":25,"updated":"2015-04-18 07:29:27.000000000","message":"Can we remove this requires? Since this requirement has posted into catalog SQL driver.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"679c8129fdf9f7ab5e60f9931b6ca211b3c9022e","unresolved":false,"context_lines":[{"line_number":22,"context_line":"CONF \u003d cfg.CONF"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"@dependency.requires(\u0027endpoint_filter_api\u0027)"},{"line_number":26,"context_line":"class EndpointFilterCatalog(sql.Catalog):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @versionutils.deprecated("}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_fead1932","line":25,"in_reply_to":"fabf19d9_bdfd8b70","updated":"2015-04-20 15:32:12.000000000","message":"Done","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"ec3f65afca942f471dd4b496af48f303194ed5bc","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        super(EndpointFilterCatalog, self).__init__()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_v3_catalog(self, user_id, project_id,"},{"line_number":38,"context_line":"                       metadata\u003dNone, unfiltered\u003dFalse):"},{"line_number":39,"context_line":"        return super(EndpointFilterCatalog, self).get_v3_catalog("},{"line_number":40,"context_line":"            user_id,"},{"line_number":41,"context_line":"            project_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fabf19d9_9debe7b0","line":38,"updated":"2015-04-18 07:29:27.000000000","message":"Is there any need to pass \"unfiltered\" parameter here?  If true, we should handle it in the catalog SQL driver.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"679c8129fdf9f7ab5e60f9931b6ca211b3c9022e","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        super(EndpointFilterCatalog, self).__init__()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_v3_catalog(self, user_id, project_id,"},{"line_number":38,"context_line":"                       metadata\u003dNone, unfiltered\u003dFalse):"},{"line_number":39,"context_line":"        return super(EndpointFilterCatalog, self).get_v3_catalog("},{"line_number":40,"context_line":"            user_id,"},{"line_number":41,"context_line":"            project_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_9e63bd1a","line":38,"in_reply_to":"fabf19d9_9debe7b0","updated":"2015-04-20 15:32:12.000000000","message":"No. There is not.  Thank you.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"1dacf6fc98ca25adfe949f6345436770a4e53887","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from oslo_config import cfg"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from keystone.catalog.backends import sql"},{"line_number":18,"context_line":"from keystone.openstack.common import versionutils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_b1316e5b","line":18,"updated":"2015-06-24 02:09:37.000000000","message":"there is a error on this line \"ImportError: cannot import name versionutils\"","commit_id":"882b9a8f9de6f1215dc64f3eac2d7615bd9e094b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"f96dfe079f2d81103f924ea34bd20ea777b08c9a","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    @versionutils.deprecated("},{"line_number":27,"context_line":"        what\u003d(\u0027keystone.contrib.endpoint_filter.\u0027"},{"line_number":28,"context_line":"              \u0027backends.catalog_sql.EndPointFilterCatalog\u0027),"},{"line_number":29,"context_line":"        as_of\u003dversionutils.deprecated.KILO,"},{"line_number":30,"context_line":"        remove_in\u003d+1,"},{"line_number":31,"context_line":"        in_favor_of\u003d\u0027keystone.catalog.backends.sql.Catalog\u0027)"},{"line_number":32,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a50d1a3_ed188377","line":29,"updated":"2015-07-22 09:02:57.000000000","message":"aren\u0027t we in Liberty now?","commit_id":"1901d377aae3acc687a78b241f35dced05e897ae"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"8f07d0c313aeb9e103c36731786a78e06bf712ae","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    @versionutils.deprecated("},{"line_number":27,"context_line":"        what\u003d(\u0027keystone.contrib.endpoint_filter.\u0027"},{"line_number":28,"context_line":"              \u0027backends.catalog_sql.EndPointFilterCatalog\u0027),"},{"line_number":29,"context_line":"        as_of\u003dversionutils.deprecated.KILO,"},{"line_number":30,"context_line":"        remove_in\u003d+1,"},{"line_number":31,"context_line":"        in_favor_of\u003d\u0027keystone.catalog.backends.sql.Catalog\u0027)"},{"line_number":32,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a50d1a3_3b421eaf","line":29,"in_reply_to":"3a50d1a3_ed188377","updated":"2015-07-22 10:06:40.000000000","message":"Done","commit_id":"1901d377aae3acc687a78b241f35dced05e897ae"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d3b36771c880f6f924ae4e10c1805e6fa0102d5b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    def __init__(self):"},{"line_number":33,"context_line":"        super(EndpointFilterCatalog, self).__init__()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def get_v3_catalog(self, user_id, project_id,"},{"line_number":36,"context_line":"                       metadata\u003dNone):"},{"line_number":37,"context_line":"        return super(EndpointFilterCatalog, self).get_v3_catalog("},{"line_number":38,"context_line":"            user_id,"}],"source_content_type":"text/x-python","patch_set":23,"id":"3a50d1a3_0e9c9ebe","line":35,"updated":"2015-08-04 20:19:03.000000000","message":"Where does metadata come from? I can\u0027t find where this was originally needed....and if you don\u0027t need it we can delete this method entirely.","commit_id":"564044b939995b89069703ca4585d13647fa1390"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"725f146fdaa6b845fad48697d7d7bfb86941f6bf","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    def __init__(self):"},{"line_number":33,"context_line":"        super(EndpointFilterCatalog, self).__init__()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def get_v3_catalog(self, user_id, project_id,"},{"line_number":36,"context_line":"                       metadata\u003dNone):"},{"line_number":37,"context_line":"        return super(EndpointFilterCatalog, self).get_v3_catalog("},{"line_number":38,"context_line":"            user_id,"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_e5fbcabf","line":35,"in_reply_to":"3a50d1a3_0e9c9ebe","updated":"2015-08-05 15:06:38.000000000","message":"If you compare patch set 1 with base, you see \u0027metadata\u0027 there.  Somewhere along the line I must have fluffed a rebase and reintroduced it.  Thanks for catching this.","commit_id":"564044b939995b89069703ca4585d13647fa1390"}],"keystone/tests/unit/test_backend_sql.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"b05fa38e8a24eb56876d3c473ba01a51543de758","unresolved":false,"context_lines":[{"line_number":718,"context_line":"            \u0027domain_id\u0027: DEFAULT_DOMAIN_ID}"},{"line_number":719,"context_line":"        self.resource_api.create_project(project_ref[\u0027id\u0027], project_ref)"},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"        CONF.endpoint_filter.return_all_endpoints_if_no_filter \u003d False"},{"line_number":722,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, project_ref[\u0027id\u0027])"},{"line_number":723,"context_line":"        self.assertEqual("},{"line_number":724,"context_line":"            0, len(catalog),"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_a984c1d3","line":721,"updated":"2015-03-31 18:12:28.000000000","message":"This should be using the config fixture.","commit_id":"8882dd5a5757020f9d06069a069ffb36aea89ec0"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"246c6d8d6f26de2fbaba95de4ec67f79c872fc21","unresolved":false,"context_lines":[{"line_number":718,"context_line":"            \u0027domain_id\u0027: DEFAULT_DOMAIN_ID}"},{"line_number":719,"context_line":"        self.resource_api.create_project(project_ref[\u0027id\u0027], project_ref)"},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"        CONF.endpoint_filter.return_all_endpoints_if_no_filter \u003d False"},{"line_number":722,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, project_ref[\u0027id\u0027])"},{"line_number":723,"context_line":"        self.assertEqual("},{"line_number":724,"context_line":"            0, len(catalog),"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_a02a748e","line":721,"in_reply_to":"da9b358b_a984c1d3","updated":"2015-04-01 13:00:58.000000000","message":"Done","commit_id":"8882dd5a5757020f9d06069a069ffb36aea89ec0"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"b05fa38e8a24eb56876d3c473ba01a51543de758","unresolved":false,"context_lines":[{"line_number":725,"context_line":"            \"There should be no services in the catalog %s\" %"},{"line_number":726,"context_line":"            catalog)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"        CONF.endpoint_filter.return_all_endpoints_if_no_filter \u003d True"},{"line_number":729,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, project_ref[\u0027id\u0027])"},{"line_number":730,"context_line":"        self.assertEqual(1, len(catalog),"},{"line_number":731,"context_line":"                         \"There should be one service in the catalog %s\" %"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_696fd92b","line":728,"updated":"2015-03-31 18:12:28.000000000","message":"This too","commit_id":"8882dd5a5757020f9d06069a069ffb36aea89ec0"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"246c6d8d6f26de2fbaba95de4ec67f79c872fc21","unresolved":false,"context_lines":[{"line_number":725,"context_line":"            \"There should be no services in the catalog %s\" %"},{"line_number":726,"context_line":"            catalog)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"        CONF.endpoint_filter.return_all_endpoints_if_no_filter \u003d True"},{"line_number":729,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, project_ref[\u0027id\u0027])"},{"line_number":730,"context_line":"        self.assertEqual(1, len(catalog),"},{"line_number":731,"context_line":"                         \"There should be one service in the catalog %s\" %"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_601fcc6c","line":728,"in_reply_to":"da9b358b_696fd92b","updated":"2015-04-01 13:00:58.000000000","message":"Done","commit_id":"8882dd5a5757020f9d06069a069ffb36aea89ec0"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":530,"context_line":""},{"line_number":531,"context_line":"class SqlCatalogV3(SqlTests):"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    def create_test_service(self):"},{"line_number":534,"context_line":"        service \u003d {"},{"line_number":535,"context_line":"            \u0027id\u0027: \u0027service_id_%s\u0027 % uuid.uuid4().hex,"},{"line_number":536,"context_line":"            \u0027type\u0027: \u0027type_%s\u0027 % uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_fa6d3633","line":533,"updated":"2015-04-06 23:59:56.000000000","message":"rename this to just \u0027create_service\u0027? there\u0027s nothing being tested here","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    def create_test_service(self):"},{"line_number":534,"context_line":"        service \u003d {"},{"line_number":535,"context_line":"            \u0027id\u0027: \u0027service_id_%s\u0027 % uuid.uuid4().hex,"},{"line_number":536,"context_line":"            \u0027type\u0027: \u0027type_%s\u0027 % uuid.uuid4().hex,"},{"line_number":537,"context_line":"            \u0027name\u0027: \u0027name_%s\u0027 % uuid.uuid4().hex,"},{"line_number":538,"context_line":"            \u0027description\u0027: \u0027desc_%s\u0027 % uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_fa265615","line":535,"updated":"2015-04-06 23:59:56.000000000","message":"nit: there is no need for these prefixes","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    def create_service_endpoint(self, service_id):"},{"line_number":544,"context_line":"        endpoint \u003d {"},{"line_number":545,"context_line":"            \u0027id\u0027: \u0027endpoint_id_%s\u0027 % uuid.uuid4().hex,"},{"line_number":546,"context_line":"            \u0027region_id\u0027: None,"},{"line_number":547,"context_line":"            \u0027interface\u0027: \u0027public\u0027,"},{"line_number":548,"context_line":"            \u0027url\u0027: \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_9a74eafd","line":545,"updated":"2015-04-06 23:59:56.000000000","message":"same thing about the prefix","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    def test_catalog_get_v3_catalog(self):"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"        service_1 \u003d self.create_test_service()"},{"line_number":557,"context_line":"        endpoint_1 \u003d self.create_service_endpoint(service_1[\u0027id\u0027])"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, \u0027tenant\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_5a654243","line":556,"updated":"2015-04-06 23:59:56.000000000","message":"there\u0027s also no point in naming these _1, as there is no _2","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, project_1[\u0027id\u0027])"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"        self.assertEqual(1, len(catalog),"},{"line_number":616,"context_line":"                         \"There should be one service in the catalog %s\" %"},{"line_number":617,"context_line":"                         catalog)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"        catalog_service \u003d catalog[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_3a5a7e84","line":616,"updated":"2015-04-06 23:59:56.000000000","message":"use single quotes when you can","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":628,"context_line":"        catalog_service_endpoints \u003d catalog_service[\u0027endpoints\u0027]"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        self.assertEqual(1, len(catalog_service_endpoints),"},{"line_number":631,"context_line":"                         \"There should be one endpoint in \""},{"line_number":632,"context_line":"                         \"the catalog service %s\" % catalog_service_endpoints)"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        catalog_service_endpoint \u003d catalog_service_endpoints[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_5acc2235","line":631,"updated":"2015-04-06 23:59:56.000000000","message":"single quotes here too","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":695,"context_line":"        catalog_service_endpoints \u003d catalog_service[\u0027endpoints\u0027]"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"        self.assertEqual(1, len(catalog_service_endpoints),"},{"line_number":698,"context_line":"                         \"There should be one endpoint in \""},{"line_number":699,"context_line":"                         \"the catalog service %s\" % catalog_service_endpoints)"},{"line_number":700,"context_line":""},{"line_number":701,"context_line":"        catalog_service_endpoint \u003d catalog_service_endpoints[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_1aa45a55","line":698,"updated":"2015-04-06 23:59:56.000000000","message":"use single quotes","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":720,"context_line":"                                   return_all_endpoints_if_no_filter\u003dFalse)"},{"line_number":721,"context_line":"        # create a service and endpoint even though we don\u0027t use them"},{"line_number":722,"context_line":"        # - they need to be filtered out"},{"line_number":723,"context_line":"        service_1 \u003d self.create_test_service()"},{"line_number":724,"context_line":"        self.create_service_endpoint(service_1[\u0027id\u0027])"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        project_ref \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_5ac1c2e3","line":723,"updated":"2015-04-06 23:59:56.000000000","message":"just use \u0027service\u0027","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":733,"context_line":"        self.assertEqual("},{"line_number":734,"context_line":"            0, len(catalog),"},{"line_number":735,"context_line":"            \"There should be no services in the catalog %s\" %"},{"line_number":736,"context_line":"            catalog)"},{"line_number":737,"context_line":""},{"line_number":738,"context_line":"    def test_catalog_populated_unfiltered_v3_catalog_with_ept_filtering(self):"},{"line_number":739,"context_line":"        # set up the scenario"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_ba932efa","line":736,"updated":"2015-04-06 23:59:56.000000000","message":"put this in the line above?","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":739,"context_line":"        # set up the scenario"},{"line_number":740,"context_line":"        self.config_fixture.config(group\u003d\u0027endpoint_filter\u0027,"},{"line_number":741,"context_line":"                                   return_all_endpoints_if_no_filter\u003dTrue)"},{"line_number":742,"context_line":"        # CONF.endpoint_filter.return_all_endpoints_if_no_filter \u003d True"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        service_1 \u003d self.create_test_service()"},{"line_number":745,"context_line":"        # create a service to muddy the waters"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_fadbf6eb","line":742,"updated":"2015-04-06 23:59:56.000000000","message":"remove this if it\u0027s not necessary","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":762,"context_line":"        catalog_service \u003d catalog[0]"},{"line_number":763,"context_line":"        self.assertEqual(service_1[\u0027name\u0027],"},{"line_number":764,"context_line":"                         catalog_service[\u0027name\u0027],"},{"line_number":765,"context_line":"                         catalog_service)"},{"line_number":766,"context_line":"        self.assertEqual(service_1[\u0027type\u0027], catalog_service[\u0027type\u0027],"},{"line_number":767,"context_line":"                         catalog_service)"},{"line_number":768,"context_line":"        self.assertEqual(service_1[\u0027id\u0027], catalog_service[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_1abb3a74","line":765,"updated":"2015-04-06 23:59:56.000000000","message":"this third arg should be a message","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        self.assertEqual(service_1[\u0027type\u0027], catalog_service[\u0027type\u0027],"},{"line_number":767,"context_line":"                         catalog_service)"},{"line_number":768,"context_line":"        self.assertEqual(service_1[\u0027id\u0027], catalog_service[\u0027id\u0027],"},{"line_number":769,"context_line":"                         catalog_service)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"        catalog_service_endpoints \u003d catalog_service[\u0027endpoints\u0027]"},{"line_number":772,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_1a49fa8b","line":769,"updated":"2015-04-06 23:59:56.000000000","message":"you can probably create a private helper function that checks if 2 catalogs have the same type, id and endpoints","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":771,"context_line":"        catalog_service_endpoints \u003d catalog_service[\u0027endpoints\u0027]"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":"        self.assertEqual(1, len(catalog_service_endpoints),"},{"line_number":774,"context_line":"                         \"There should be one endpoint in \""},{"line_number":775,"context_line":"                         \"the catalog service %s\" % catalog_service_endpoints)"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"        catalog_service_endpoint \u003d catalog_service_endpoints[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_1aed7a8b","line":774,"updated":"2015-04-06 23:59:56.000000000","message":"use single quotes","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":776,"context_line":""},{"line_number":777,"context_line":"        catalog_service_endpoint \u003d catalog_service_endpoints[0]"},{"line_number":778,"context_line":"        self.assertEqual(endpoint_1[\u0027id\u0027], catalog_service_endpoint[\u0027id\u0027])"},{"line_number":779,"context_line":"        self.assertEqual(\u0027\u0027, catalog_service_endpoint[\u0027url\u0027],"},{"line_number":780,"context_line":"                         catalog_service_endpoint[\u0027url\u0027])"},{"line_number":781,"context_line":"        self.assertEqual(catalog_service_endpoint.get(\u0027interface\u0027),"},{"line_number":782,"context_line":"                         catalog_service_endpoint[\u0027interface\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_bafc4e3f","line":779,"updated":"2015-04-06 23:59:56.000000000","message":"assertEqual(0, len(catalog_service_endpoint[\u0027url\u0027]))","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"abff25bf1b1bec56a6eb1f82893416f531596ed1","unresolved":false,"context_lines":[{"line_number":777,"context_line":"        catalog_service_endpoint \u003d catalog_service_endpoints[0]"},{"line_number":778,"context_line":"        self.assertEqual(endpoint_1[\u0027id\u0027], catalog_service_endpoint[\u0027id\u0027])"},{"line_number":779,"context_line":"        self.assertEqual(\u0027\u0027, catalog_service_endpoint[\u0027url\u0027],"},{"line_number":780,"context_line":"                         catalog_service_endpoint[\u0027url\u0027])"},{"line_number":781,"context_line":"        self.assertEqual(catalog_service_endpoint.get(\u0027interface\u0027),"},{"line_number":782,"context_line":"                         catalog_service_endpoint[\u0027interface\u0027])"},{"line_number":783,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_5af30274","line":780,"updated":"2015-04-06 23:59:56.000000000","message":"this isn\u0027t a message","commit_id":"f275fbc284fb242715a3f281a5b11eb1d6201187"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5a023dbfbe29601d3d1c54964929ebd85c44d963","unresolved":false,"context_lines":[{"line_number":699,"context_line":"        # set up the scenario"},{"line_number":700,"context_line":"        self.config_fixture.config(group\u003d\u0027endpoint_filter\u0027,"},{"line_number":701,"context_line":"                                   return_all_endpoints_if_no_filter\u003dFalse)"},{"line_number":702,"context_line":"        # create a service with an endpoints"},{"line_number":703,"context_line":"        service \u003d self.create_service()"},{"line_number":704,"context_line":"        self.create_service_endpoint(service[\u0027id\u0027])"},{"line_number":705,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3ab451fb_740c8c94","line":702,"updated":"2015-04-17 16:06:40.000000000","message":"s/endpoints/endpoint/","commit_id":"169686fb609e114cf9ceab7b772152b2749ca66a"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"c6e8406347f7a633d3821abb2b05b0d8fe0f2038","unresolved":false,"context_lines":[{"line_number":699,"context_line":"        # set up the scenario"},{"line_number":700,"context_line":"        self.config_fixture.config(group\u003d\u0027endpoint_filter\u0027,"},{"line_number":701,"context_line":"                                   return_all_endpoints_if_no_filter\u003dFalse)"},{"line_number":702,"context_line":"        # create a service with an endpoints"},{"line_number":703,"context_line":"        service \u003d self.create_service()"},{"line_number":704,"context_line":"        self.create_service_endpoint(service[\u0027id\u0027])"},{"line_number":705,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3ab451fb_0fe53508","line":702,"in_reply_to":"3ab451fb_740c8c94","updated":"2015-04-17 16:23:16.000000000","message":"Done.\n\nThank you.  Of what was I thinking?","commit_id":"169686fb609e114cf9ceab7b772152b2749ca66a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0b3884eabf5bb5c8c29ef18c180722ba76e0aa36","unresolved":false,"context_lines":[{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def assertEndpointEqual(self, endpoint, catalog_endpoint):"},{"line_number":560,"context_line":"        new_endpoint \u003d endpoint.copy()"},{"line_number":561,"context_line":"        if \u0027service_id\u0027 in new_endpoint:"},{"line_number":562,"context_line":"            del new_endpoint[\u0027service_id\u0027]"},{"line_number":563,"context_line":"        new_endpoint[\u0027region\u0027] \u003d None"},{"line_number":564,"context_line":"        self.assertDictEqual(new_endpoint, catalog_endpoint)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_fa1d2567","line":561,"updated":"2015-04-17 16:36:39.000000000","message":"Can you comment on why these 3 lines are needed? The method assertEndpointEqual is actually manipulating the objects before comparisson...","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"679c8129fdf9f7ab5e60f9931b6ca211b3c9022e","unresolved":false,"context_lines":[{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def assertEndpointEqual(self, endpoint, catalog_endpoint):"},{"line_number":560,"context_line":"        new_endpoint \u003d endpoint.copy()"},{"line_number":561,"context_line":"        if \u0027service_id\u0027 in new_endpoint:"},{"line_number":562,"context_line":"            del new_endpoint[\u0027service_id\u0027]"},{"line_number":563,"context_line":"        new_endpoint[\u0027region\u0027] \u003d None"},{"line_number":564,"context_line":"        self.assertDictEqual(new_endpoint, catalog_endpoint)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_5ee765e4","line":561,"in_reply_to":"3ab451fb_fa1d2567","updated":"2015-04-20 15:32:12.000000000","message":"In PS#10 I\u0027ve added comments to make this clear.  The catalog endpoint will not have all the properties that we send to the create call when setting up the test (which is the one we\u0027re comparing it to).  That\u0027s quite correct - so we have to copy and adjust the latter to enable the former to be validated.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0b3884eabf5bb5c8c29ef18c180722ba76e0aa36","unresolved":false,"context_lines":[{"line_number":670,"context_line":"            2,"},{"line_number":671,"context_line":"            len(catalog),"},{"line_number":672,"context_line":"            \u0027There should be two services in the catalog %s\u0027 % (catalog))"},{"line_number":673,"context_line":"        sorted_services \u003d {}"},{"line_number":674,"context_line":"        for service in catalog:"},{"line_number":675,"context_line":"            sorted_services[service[\u0027id\u0027]] \u003d service"},{"line_number":676,"context_line":"        catalog_service \u003d sorted_services[service1[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_7a57d502","line":673,"updated":"2015-04-17 16:36:39.000000000","message":"What exactly is sorted?","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"679c8129fdf9f7ab5e60f9931b6ca211b3c9022e","unresolved":false,"context_lines":[{"line_number":670,"context_line":"            2,"},{"line_number":671,"context_line":"            len(catalog),"},{"line_number":672,"context_line":"            \u0027There should be two services in the catalog %s\u0027 % (catalog))"},{"line_number":673,"context_line":"        sorted_services \u003d {}"},{"line_number":674,"context_line":"        for service in catalog:"},{"line_number":675,"context_line":"            sorted_services[service[\u0027id\u0027]] \u003d service"},{"line_number":676,"context_line":"        catalog_service \u003d sorted_services[service1[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_1e0d6d3e","line":673,"in_reply_to":"3ab451fb_7a57d502","updated":"2015-04-20 15:32:12.000000000","message":"I\u0027ve adjusted this.  I concede that it may not have been the best name.  The reason for this dict was just to make it easier to validate the services by mapping them by their id.  \u0027mapped_services\u0027 may have been better but either way I\u0027ve now changed this to retrieve the service by id direct from the list using a generator.","commit_id":"2548c0852c95e216b298f193bad117471581c437"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"73aaab69deeac650028f259757adf77c54f611b7","unresolved":false,"context_lines":[{"line_number":676,"context_line":"                         \u0027the second catalog service\u0027)"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"    def test_get_v3_catalog_domain_token_no_unfiltered_catalog(self):"},{"line_number":679,"context_line":"        # domain token should get all services whatever"},{"line_number":680,"context_line":"        self.config_fixture.config(group\u003d\u0027endpoint_filter\u0027,"},{"line_number":681,"context_line":"                                   return_all_endpoints_if_no_filter\u003dFalse)"},{"line_number":682,"context_line":"        service_1 \u003d self.create_service()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3acd31a7_510616cf","line":679,"updated":"2015-05-01 06:08:54.000000000","message":"Aha, I think the name of this testcase could be more accurate.\nHere, the only difference I see with this testcase \"test_catalog_get_v3_catalog_domain_scoped_token\" is `return_all_endpoints_if_no_filter` flag is set to false, both of the case we want it to return `unfiltered_catalog` instead of *no* unfiltered_catalog, am I right? something more, I am thinking whether we can combine two case together.","commit_id":"90bd964213c972153cd2d5d470735acbfd12888e"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"e7b74879138f92f36097da4bb228b2a1284a6557","unresolved":false,"context_lines":[{"line_number":676,"context_line":"                         \u0027the second catalog service\u0027)"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"    def test_get_v3_catalog_domain_token_no_unfiltered_catalog(self):"},{"line_number":679,"context_line":"        # domain token should get all services whatever"},{"line_number":680,"context_line":"        self.config_fixture.config(group\u003d\u0027endpoint_filter\u0027,"},{"line_number":681,"context_line":"                                   return_all_endpoints_if_no_filter\u003dFalse)"},{"line_number":682,"context_line":"        service_1 \u003d self.create_service()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3acd31a7_068743d8","line":679,"in_reply_to":"3acd31a7_510616cf","updated":"2015-05-01 10:52:29.000000000","message":"Yes, I\u0027ve consolidated the tests into one.  In order to avoid duplicating all the assertions over two catalogs I\u0027ve added a function within the method.  Ugly really but better than this I reckon.  Thanks for picking up on this.","commit_id":"90bd964213c972153cd2d5d470735acbfd12888e"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"1dacf6fc98ca25adfe949f6345436770a4e53887","unresolved":false,"context_lines":[{"line_number":596,"context_line":"            \u0027region_id\u0027: None,"},{"line_number":597,"context_line":"            \u0027interface\u0027: \u0027public\u0027,"},{"line_number":598,"context_line":"            \u0027url\u0027: \u0027https://localhost:8080\u0027,"},{"line_number":599,"context_line":"            \u0027service_id\u0027: service_id"},{"line_number":600,"context_line":"        }"},{"line_number":601,"context_line":"        self.catalog_api.create_endpoint(endpoint[\u0027id\u0027], endpoint.copy())"},{"line_number":602,"context_line":"        return endpoint"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_91d9caf5","line":599,"updated":"2015-06-24 02:09:37.000000000","message":"I think that you can change a little bit this code, maybe call self.create_service() here and set the service_id were.","commit_id":"882b9a8f9de6f1215dc64f3eac2d7615bd9e094b"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"7b3a0e1bd6b1862911eb959a4a0f27f7f74de6c4","unresolved":false,"context_lines":[{"line_number":596,"context_line":"            \u0027region_id\u0027: None,"},{"line_number":597,"context_line":"            \u0027interface\u0027: \u0027public\u0027,"},{"line_number":598,"context_line":"            \u0027url\u0027: \u0027https://localhost:8080\u0027,"},{"line_number":599,"context_line":"            \u0027service_id\u0027: service_id"},{"line_number":600,"context_line":"        }"},{"line_number":601,"context_line":"        self.catalog_api.create_endpoint(endpoint[\u0027id\u0027], endpoint.copy())"},{"line_number":602,"context_line":"        return endpoint"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_ddd4b148","line":599,"in_reply_to":"fa32b979_91d9caf5","updated":"2015-07-20 11:28:47.000000000","message":"I see what you\u0027re suggesting but I\u0027m not sure that there is a significant advantage.  One line less code in each test and it all becomes less explicit.  We also run into complexity within this method if we\u0027re creating a second endpoint for an already created service as I do at lines 645 and 646","commit_id":"882b9a8f9de6f1215dc64f3eac2d7615bd9e094b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"1dacf6fc98ca25adfe949f6345436770a4e53887","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        # get the catalog - no services are associated with the project so"},{"line_number":623,"context_line":"        # the CONF.endpoint_filter.return_all_endpoints_if_no_filter property"},{"line_number":624,"context_line":"        # (default True) will ensure all endpoints are returned"},{"line_number":625,"context_line":"        service \u003d self.create_service()"},{"line_number":626,"context_line":"        endpoint \u003d self.create_service_endpoint(service[\u0027id\u0027])"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, \u0027tenant\u0027)"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_f1ee168a","line":625,"updated":"2015-06-24 02:09:37.000000000","message":"With that change, we don\u0027t need to create a new service here, only create the endpoint.","commit_id":"882b9a8f9de6f1215dc64f3eac2d7615bd9e094b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"1dacf6fc98ca25adfe949f6345436770a4e53887","unresolved":false,"context_lines":[{"line_number":641,"context_line":"    def test_catalog_get_v3_catalog_domain_scoped_token(self):"},{"line_number":642,"context_line":"        # domain token should get all services whatever the value of"},{"line_number":643,"context_line":"        # the return_all_endpoints_if_no_filter config property"},{"line_number":644,"context_line":"        service_1 \u003d self.create_service()"},{"line_number":645,"context_line":"        endpoint \u003d self.create_service_endpoint(service_1[\u0027id\u0027])"},{"line_number":646,"context_line":"        endpoint1 \u003d self.create_service_endpoint(service_1[\u0027id\u0027])"},{"line_number":647,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_b1e40ea8","line":644,"updated":"2015-06-24 02:09:37.000000000","message":"same here and in the others create_service() below.","commit_id":"882b9a8f9de6f1215dc64f3eac2d7615bd9e094b"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"9ea2252389cd90aa03eaf41ef74ae08ca1980c83","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        self.assertEqual("},{"line_number":846,"context_line":"            1,"},{"line_number":847,"context_line":"            len(catalog),"},{"line_number":848,"context_line":"            \u0027There should be 1 service in the catalog %s\u0027 % (catalog))"},{"line_number":849,"context_line":"        self.assert_service_equal(service, catalog[0])"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        catalog_service_endpoints \u003d catalog[0][\u0027endpoints\u0027]"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba15a1d1_f063a43f","line":848,"updated":"2015-09-22 14:14:53.000000000","message":"To keep it consistent s/1/one/","commit_id":"fa85b4985aef7bd57be6ed1da25062f69f3740d7"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":587,"context_line":"            \u0027type\u0027: uuid.uuid4().hex,"},{"line_number":588,"context_line":"            \u0027name\u0027: uuid.uuid4().hex,"},{"line_number":589,"context_line":"            \u0027description\u0027: uuid.uuid4().hex"},{"line_number":590,"context_line":"        }"},{"line_number":591,"context_line":"        self.catalog_api.create_service(service[\u0027id\u0027], service.copy())"},{"line_number":592,"context_line":"        return service"},{"line_number":593,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_27f6aaf9","line":590,"updated":"2015-09-28 21:06:21.000000000","message":"use unit.new_service_ref()","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":588,"context_line":"            \u0027name\u0027: uuid.uuid4().hex,"},{"line_number":589,"context_line":"            \u0027description\u0027: uuid.uuid4().hex"},{"line_number":590,"context_line":"        }"},{"line_number":591,"context_line":"        self.catalog_api.create_service(service[\u0027id\u0027], service.copy())"},{"line_number":592,"context_line":"        return service"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"    def create_service_endpoint(self, service_id):"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_07a36601","line":591,"updated":"2015-09-28 21:06:21.000000000","message":"no need to copy.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":589,"context_line":"            \u0027description\u0027: uuid.uuid4().hex"},{"line_number":590,"context_line":"        }"},{"line_number":591,"context_line":"        self.catalog_api.create_service(service[\u0027id\u0027], service.copy())"},{"line_number":592,"context_line":"        return service"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"    def create_service_endpoint(self, service_id):"},{"line_number":595,"context_line":"        endpoint \u003d {"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_c7c6ce99","line":592,"updated":"2015-09-28 21:06:21.000000000","message":"suggest return the value from create_service. That\u0027s the service that was actually created.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":598,"context_line":"            \u0027interface\u0027: \u0027public\u0027,"},{"line_number":599,"context_line":"            \u0027url\u0027: \u0027https://localhost:8080\u0027,"},{"line_number":600,"context_line":"            \u0027service_id\u0027: service_id"},{"line_number":601,"context_line":"        }"},{"line_number":602,"context_line":"        self.catalog_api.create_endpoint(endpoint[\u0027id\u0027], endpoint.copy())"},{"line_number":603,"context_line":"        return endpoint"},{"line_number":604,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_e7dc3275","line":601,"updated":"2015-09-28 21:06:21.000000000","message":"use unit.new_endpoint_ref()","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":599,"context_line":"            \u0027url\u0027: \u0027https://localhost:8080\u0027,"},{"line_number":600,"context_line":"            \u0027service_id\u0027: service_id"},{"line_number":601,"context_line":"        }"},{"line_number":602,"context_line":"        self.catalog_api.create_endpoint(endpoint[\u0027id\u0027], endpoint.copy())"},{"line_number":603,"context_line":"        return endpoint"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def assert_service_equal(self, service, catalog_service):"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_27a8eada","line":602,"updated":"2015-09-28 21:06:21.000000000","message":"no need to copy.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":600,"context_line":"            \u0027service_id\u0027: service_id"},{"line_number":601,"context_line":"        }"},{"line_number":602,"context_line":"        self.catalog_api.create_endpoint(endpoint[\u0027id\u0027], endpoint.copy())"},{"line_number":603,"context_line":"        return endpoint"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def assert_service_equal(self, service, catalog_service):"},{"line_number":606,"context_line":"        self.assertEqual(service[\u0027name\u0027], catalog_service[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_67d7c24b","line":603,"updated":"2015-09-28 21:06:21.000000000","message":"suggest return the value from create_endpoint","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":609,"context_line":""},{"line_number":610,"context_line":"    def assert_endpoint_equal(self, endpoint, catalog_endpoint):"},{"line_number":611,"context_line":"        # Compares the endpoint we created with one returned in the"},{"line_number":612,"context_line":"        # catalogue.  They will differ so we need to copy the one we created"},{"line_number":613,"context_line":"        # and adjust it slightly."},{"line_number":614,"context_line":"        new_endpoint \u003d endpoint.copy()"},{"line_number":615,"context_line":"        # endpoint returned in the catalog will not have a service_id"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_8753f6e1","line":612,"updated":"2015-09-28 21:06:21.000000000","message":"change \"catalogue\" to \"catalog\". This applies in other places where \"catalogue\" is used.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":614,"context_line":"        new_endpoint \u003d endpoint.copy()"},{"line_number":615,"context_line":"        # endpoint returned in the catalog will not have a service_id"},{"line_number":616,"context_line":"        if \u0027service_id\u0027 in new_endpoint:"},{"line_number":617,"context_line":"            del new_endpoint[\u0027service_id\u0027]"},{"line_number":618,"context_line":"        # endpoint returned in the catalog will have the region None"},{"line_number":619,"context_line":"        new_endpoint[\u0027region\u0027] \u003d None"},{"line_number":620,"context_line":"        self.assertDictEqual(new_endpoint, catalog_endpoint)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_070da6e7","line":617,"updated":"2015-09-28 21:06:21.000000000","message":"replace these 2 lines with\n\n  new_endpoint.pop(\u0027service_id\u0027, None)\n\nAlso, I\u0027d prefer it if the tests didn\u0027t have to guess if the endpoint has a service ID or now.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":628,"context_line":""},{"line_number":629,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, \u0027tenant\u0027)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"        self.assertEqual(1, len(catalog),"},{"line_number":632,"context_line":"                         \u0027There should be only one service in the catalog\u0027)"},{"line_number":633,"context_line":"        self.assert_service_equal(service, catalog[0])"},{"line_number":634,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_c7224e52","line":631,"updated":"2015-09-28 21:06:21.000000000","message":"suggest use the HasLength matcher so we get a nicer error message. This applies to all the other places where checking the length.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        def make_catalog_assertions(catalog, all_endpoints_config_value):"},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"            catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, None)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"            context \u003d (\u0027, return_all_endpoints_if_no_filter \u003d %s\u0027 %"},{"line_number":657,"context_line":"                       all_endpoints_config_value)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_c7d00e22","line":654,"updated":"2015-09-28 21:06:21.000000000","message":"provide a name for the \u0027user\u0027 and None parameters so we know what they\u0027re for.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":658,"context_line":""},{"line_number":659,"context_line":"            self.assertEqual("},{"line_number":660,"context_line":"                2, len(catalog),"},{"line_number":661,"context_line":"                \u0027There should be two services in the catalog %s\u0027 % context)"},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"            catalog_service_1 \u003d [svc for svc in catalog"},{"line_number":664,"context_line":"                                 if svc[\u0027id\u0027] \u003d\u003d service_1[\u0027id\u0027]][0]"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_07e5a6da","line":661,"updated":"2015-09-28 21:06:21.000000000","message":"there\u0027s an extra space after catalog.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":668,"context_line":""},{"line_number":669,"context_line":"            self.assertEqual(2, len(catalog_service_endpoints),"},{"line_number":670,"context_line":"                             \u0027There should be two endpoints in \u0027"},{"line_number":671,"context_line":"                             \u0027the first catalog service, %s\u0027 % context)"},{"line_number":672,"context_line":"            self.assert_endpoint_equal("},{"line_number":673,"context_line":"                endpoint,"},{"line_number":674,"context_line":"                [ept for ept in catalog_service_endpoints"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_c7d32e03","line":671,"updated":"2015-09-28 21:06:21.000000000","message":"there\u0027s an extra \u0027, \u0027 at the end of the string. Check the other ones, too.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":687,"context_line":""},{"line_number":688,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, None)"},{"line_number":689,"context_line":"        make_catalog_assertions(catalog, True)"},{"line_number":690,"context_line":"        # domain token should get all services whatever"},{"line_number":691,"context_line":"        self.config_fixture.config(group\u003d\u0027endpoint_filter\u0027,"},{"line_number":692,"context_line":"                                   return_all_endpoints_if_no_filter\u003dFalse)"},{"line_number":693,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, None)"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_87f0d692","line":690,"updated":"2015-09-28 21:06:21.000000000","message":"whatever ... the config value is set to?","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":691,"context_line":"        self.config_fixture.config(group\u003d\u0027endpoint_filter\u0027,"},{"line_number":692,"context_line":"                                   return_all_endpoints_if_no_filter\u003dFalse)"},{"line_number":693,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, None)"},{"line_number":694,"context_line":"        make_catalog_assertions(catalog, False)"},{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    def test_get_v3_catalog_with_single_service_and_ep_filtering(self):"},{"line_number":697,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_2738ea3c","line":694,"updated":"2015-09-28 21:06:21.000000000","message":"these should be split up into separate test methods.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":735,"context_line":"            1,"},{"line_number":736,"context_line":"            len(catalog_service_endpoints),"},{"line_number":737,"context_line":"            \u0027There should be one endpoint in the \u0027"},{"line_number":738,"context_line":"            \u0027catalog service %s\u0027 % (catalog_service_endpoints))"},{"line_number":739,"context_line":"        self.assert_endpoint_equal(endpoint1, catalog_service_endpoints[0])"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(\u0027user\u0027, project2[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_877536fb","line":738,"updated":"2015-09-28 21:06:21.000000000","message":"remove extra parenthesis. This applies in other places, too (e.g., line 745)","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fd7a49e572d4eea58254d9a123ee579eea6f41dc","unresolved":false,"context_lines":[{"line_number":751,"context_line":"        catalog_service_endpoint_ids \u003d [catalog_endpoint[\u0027id\u0027]"},{"line_number":752,"context_line":"                                        for catalog_endpoint"},{"line_number":753,"context_line":"                                        in catalog_service_endpoints]"},{"line_number":754,"context_line":"        self.assertTrue(endpoint1[\u0027id\u0027] in catalog_service_endpoint_ids)"},{"line_number":755,"context_line":"        self.assertTrue(endpoint2[\u0027id\u0027] in catalog_service_endpoint_ids)"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"    def test_get_v3_catalog_with_multiple_services_and_ep_filtering(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a1a9d01_6767c24d","line":754,"updated":"2015-09-28 21:06:21.000000000","message":"use assertIn . This applies to the next line, too.","commit_id":"ed6d53508dfda5f695df8020feac1fa686aae0fb"}],"keystone/tests/unit/test_v3_catalog.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e518fd1a2cd5088ed683b75d01369f74e6b1bfbe","unresolved":false,"context_lines":[{"line_number":802,"context_line":"                      expected_status\u003d400)"},{"line_number":803,"context_line":""},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"class TestCatalogAPISQL(tests.TestCase):"},{"line_number":806,"context_line":"    \"\"\"Tests for the catalog Manager against the SQL backend."},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_50ff1b34","line":805,"updated":"2015-09-21 17:54:32.000000000","message":"This change is unrelated, revert it.","commit_id":"cb68d57c71b9e5ec9fb0ed921554492da370b7c7"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"2a7dfb724e7ee7185431f8ebf730f6630f987c52","unresolved":false,"context_lines":[{"line_number":802,"context_line":"                      expected_status\u003d400)"},{"line_number":803,"context_line":""},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"class TestCatalogAPISQL(tests.TestCase):"},{"line_number":806,"context_line":"    \"\"\"Tests for the catalog Manager against the SQL backend."},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_3765b9e0","line":805,"in_reply_to":"ba15a1d1_50ff1b34","updated":"2015-09-21 19:16:59.000000000","message":"done","commit_id":"cb68d57c71b9e5ec9fb0ed921554492da370b7c7"}]}
