)]}'
{"keystone/tests/unit/test_backend.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"764dc93a4fa9aab4f0f2de5641c299f5b1c4e654","unresolved":false,"context_lines":[{"line_number":5331,"context_line":"        # create endpoint project association"},{"line_number":5332,"context_line":"        project_id \u003d self.tenant_baz[\u0027id\u0027]"},{"line_number":5333,"context_line":"        random_endpoint_id \u003d uuid.uuid4().hex"},{"line_number":5334,"context_line":"        self.catalog_api.add_endpoint_to_project(random_endpoint_id,"},{"line_number":5335,"context_line":"                                                 project_id)"},{"line_number":5336,"context_line":"        refs \u003d self.catalog_api.driver.list_endpoints_for_project(project_id)"},{"line_number":5337,"context_line":"        self.assertThat(refs, matchers.HasLength(1))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_e6008668","line":5334,"range":{"start_line":5334,"start_character":25,"end_line":5334,"end_character":48},"updated":"2015-12-19 06:20:56.000000000","message":"shouldn\u0027t `add_endpoint_to_project` perform validation that the endpoint exists?","commit_id":"a3074ec2d28fa9c590ba94310489b70752eddadd"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0aa5125d4418052654c49aee8eb3342bd2451ad5","unresolved":false,"context_lines":[{"line_number":5331,"context_line":"        # create endpoint project association"},{"line_number":5332,"context_line":"        project_id \u003d self.tenant_baz[\u0027id\u0027]"},{"line_number":5333,"context_line":"        random_endpoint_id \u003d uuid.uuid4().hex"},{"line_number":5334,"context_line":"        self.catalog_api.add_endpoint_to_project(random_endpoint_id,"},{"line_number":5335,"context_line":"                                                 project_id)"},{"line_number":5336,"context_line":"        refs \u003d self.catalog_api.driver.list_endpoints_for_project(project_id)"},{"line_number":5337,"context_line":"        self.assertThat(refs, matchers.HasLength(1))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_aefbec77","line":5334,"range":{"start_line":5334,"start_character":25,"end_line":5334,"end_character":48},"in_reply_to":"3a7e1126_8660a202","updated":"2015-12-22 05:34:22.000000000","message":"ah, this was checked in the controller layer, the code there to remove the invalid endpoint might be redundant.\n\nsee: https://github.com/openstack/keystone/blob/master/keystone/catalog/controllers.py#L410-L416","commit_id":"a3074ec2d28fa9c590ba94310489b70752eddadd"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"5bd68f271adda7bbe9cebc9c09163a772f42a07b","unresolved":false,"context_lines":[{"line_number":5331,"context_line":"        # create endpoint project association"},{"line_number":5332,"context_line":"        project_id \u003d self.tenant_baz[\u0027id\u0027]"},{"line_number":5333,"context_line":"        random_endpoint_id \u003d uuid.uuid4().hex"},{"line_number":5334,"context_line":"        self.catalog_api.add_endpoint_to_project(random_endpoint_id,"},{"line_number":5335,"context_line":"                                                 project_id)"},{"line_number":5336,"context_line":"        refs \u003d self.catalog_api.driver.list_endpoints_for_project(project_id)"},{"line_number":5337,"context_line":"        self.assertThat(refs, matchers.HasLength(1))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_8660a202","line":5334,"range":{"start_line":5334,"start_character":25,"end_line":5334,"end_character":48},"in_reply_to":"3a7e1126_e6008668","updated":"2015-12-19 06:54:01.000000000","message":"This was not validated when the endpoint is added, maybe we can do that.\n\nI was thinking there should be a FK in the table but catalog has other backends besides SQL although only SQL works for this endpoint filter. So, it might be okay to check the logic in the code instead of in SQL schema.","commit_id":"a3074ec2d28fa9c590ba94310489b70752eddadd"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"764dc93a4fa9aab4f0f2de5641c299f5b1c4e654","unresolved":false,"context_lines":[{"line_number":5337,"context_line":"        self.assertThat(refs, matchers.HasLength(1))"},{"line_number":5338,"context_line":""},{"line_number":5339,"context_line":"        # list endpoints for project will remove the invalid endpoints"},{"line_number":5340,"context_line":"        self.catalog_api.list_endpoints_for_project(project_id)"},{"line_number":5341,"context_line":""},{"line_number":5342,"context_line":"        refs \u003d self.catalog_api.driver.list_endpoints_for_project(project_id)"},{"line_number":5343,"context_line":"        self.assertThat(refs, matchers.HasLength(0))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_a63efe25","line":5340,"range":{"start_line":5340,"start_character":25,"end_line":5340,"end_character":51},"updated":"2015-12-19 06:20:56.000000000","message":"why did calling it a second time remove the endpoints? as opposed to the first time at line 5336?","commit_id":"a3074ec2d28fa9c590ba94310489b70752eddadd"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"5bd68f271adda7bbe9cebc9c09163a772f42a07b","unresolved":false,"context_lines":[{"line_number":5337,"context_line":"        self.assertThat(refs, matchers.HasLength(1))"},{"line_number":5338,"context_line":""},{"line_number":5339,"context_line":"        # list endpoints for project will remove the invalid endpoints"},{"line_number":5340,"context_line":"        self.catalog_api.list_endpoints_for_project(project_id)"},{"line_number":5341,"context_line":""},{"line_number":5342,"context_line":"        refs \u003d self.catalog_api.driver.list_endpoints_for_project(project_id)"},{"line_number":5343,"context_line":"        self.assertThat(refs, matchers.HasLength(0))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_061a727d","line":5340,"range":{"start_line":5340,"start_character":25,"end_line":5340,"end_character":51},"in_reply_to":"3a7e1126_a63efe25","updated":"2015-12-19 06:54:01.000000000","message":"since self.catalog_api.driver.list_endpoints_for_project will check whether the endpoints is valid or not.\n\nremove the endpoint if the endpoint is invalid.\nsee: https://github.com/openstack/keystone/blob/master/keystone/catalog/core.py#L367-L370\n\nI moved these code from catalog_sql.py to catalog manager.\n\nThis logic is not tested anywhere, this patch just want to cover this.","commit_id":"a3074ec2d28fa9c590ba94310489b70752eddadd"}]}
