)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4bc93c861ad43d8163512a3f431e793e60b370a1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Always return the service name in the catalog"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fix implemention of service catalog creation in v2, to handle the case"},{"line_number":10,"context_line":"when the service name is not available. Using service.get(\u0027name\u0027, \u0027\u0027)"},{"line_number":11,"context_line":"does not work because that doesn\u0027t invoke the __getitem__() from"},{"line_number":12,"context_line":"sql.DictBase parent class of Service. Instead the service name have to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a890539_fde9d7b7","line":9,"updated":"2014-11-21 16:17:16.000000000","message":"This comment seems incorrect since this change is for v2 and v3 catalog responses.","commit_id":"cbae37b5732cf2b6d701d7456c9bb235b5ff8232"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"93876322bb41af9eb27426669a2c1c9f84e80a52","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Always return the service name in the catalog"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fix implemention of service catalog creation in v2, to handle the case"},{"line_number":10,"context_line":"when the service name is not available. Using service.get(\u0027name\u0027, \u0027\u0027)"},{"line_number":11,"context_line":"does not work because that doesn\u0027t invoke the __getitem__() from"},{"line_number":12,"context_line":"sql.DictBase parent class of Service. Instead the service name have to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a890539_f2557ec2","line":9,"in_reply_to":"5a890539_fde9d7b7","updated":"2014-11-21 19:57:32.000000000","message":"To handle the case when empty service name throws an error only occurs for v2 catalog.\n\nThe second sentence describes the change that applies to both.","commit_id":"cbae37b5732cf2b6d701d7456c9bb235b5ff8232"}],"keystone/catalog/backends/sql.py":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"bf2be1fe4cfc7ce9aac62cc486dc437740d0041c","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            service_type \u003d endpoint.service[\u0027type\u0027]"},{"line_number":294,"context_line":"            default_service \u003d {"},{"line_number":295,"context_line":"                \u0027id\u0027: endpoint[\u0027id\u0027],"},{"line_number":296,"context_line":"                \u0027name\u0027: endpoint.service.extra.get(\u0027name\u0027, \u0027\u0027),"},{"line_number":297,"context_line":"                \u0027publicURL\u0027: \u0027\u0027"},{"line_number":298,"context_line":"            }"},{"line_number":299,"context_line":"            catalog.setdefault(region, {})"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_1aaa6119","line":296,"updated":"2014-11-20 10:56:21.000000000","message":"Accessing the \"extra\" is necessary, otherwise the name could not be retrieved. It is same approach used in line: 333 so I think it is safe to change it here too for consistency as well.\n\nWithout accessing the \"extra\", the tests fails: http://logs.openstack.org/08/135808/1/check/gate-keystone-python27/b9894fc/console.html\n\nI am not sure if there is anything change in one of the Keystone dependencies that caused this to happen. But adding the \"extra\" works in my system and in tests.","commit_id":"0b361bf8bb58b8220b04de21a217493f82a33e6a"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ce1b166eacc99474124a34f219d0520b05d71523","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            service_type \u003d endpoint.service[\u0027type\u0027]"},{"line_number":294,"context_line":"            default_service \u003d {"},{"line_number":295,"context_line":"                \u0027id\u0027: endpoint[\u0027id\u0027],"},{"line_number":296,"context_line":"                \u0027name\u0027: endpoint.service.extra.get(\u0027name\u0027, \u0027\u0027),"},{"line_number":297,"context_line":"                \u0027publicURL\u0027: \u0027\u0027"},{"line_number":298,"context_line":"            }"},{"line_number":299,"context_line":"            catalog.setdefault(region, {})"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_0e63eb41","line":296,"updated":"2015-01-02 21:35:32.000000000","message":"what about ensuring that service[\u0027name\u0027] is always set before writing to the database, or passing to the driver? We do this with other things like region[\u0027description\u0027] https://github.com/openstack/keystone/blob/f5c06d619c762d5d39e8ec3bc752215ec02b2756/keystone/catalog/core.py#L112\n\nThen we wouldn\u0027t have to have logic specific to the sql catalog backend if we did something like the following in the Manager layer: \n\n    def create_service(self, service_id, service_ref):\n        service_ref.setdefault(\u0027enabled\u0027, True)\n        service_ref.setdefault(\u0027name\u0027, \u0027\u0027)\n        return self.driver.create_service(service_id, service_ref)\n\nThen in the case that a service name isn\u0027t provided on service create, the default case is that service.extra.name will be \u0027\u0027, and it will be consistent regardless of backends.","commit_id":"ca3df19da46e330cd9ce1de77224452177f06071"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"45d330d0733f4e1eb48e18f107005878fe8f2db9","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            service_type \u003d endpoint.service[\u0027type\u0027]"},{"line_number":294,"context_line":"            default_service \u003d {"},{"line_number":295,"context_line":"                \u0027id\u0027: endpoint[\u0027id\u0027],"},{"line_number":296,"context_line":"                \u0027name\u0027: endpoint.service.extra.get(\u0027name\u0027, \u0027\u0027),"},{"line_number":297,"context_line":"                \u0027publicURL\u0027: \u0027\u0027"},{"line_number":298,"context_line":"            }"},{"line_number":299,"context_line":"            catalog.setdefault(region, {})"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_1d087bd8","line":296,"in_reply_to":"3a961159_0e63eb41","updated":"2015-01-03 19:59:10.000000000","message":"That could be doable, but that would only work for new data and  doesn\u0027t guarantee existing data with no \"name\" set would work.","commit_id":"ca3df19da46e330cd9ce1de77224452177f06071"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9aeabb6a0c173a418447aab097e1fb53801d56b1","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            service_type \u003d endpoint.service[\u0027type\u0027]"},{"line_number":294,"context_line":"            default_service \u003d {"},{"line_number":295,"context_line":"                \u0027id\u0027: endpoint[\u0027id\u0027],"},{"line_number":296,"context_line":"                \u0027name\u0027: endpoint.service.extra.get(\u0027name\u0027, \u0027\u0027),"},{"line_number":297,"context_line":"                \u0027publicURL\u0027: \u0027\u0027"},{"line_number":298,"context_line":"            }"},{"line_number":299,"context_line":"            catalog.setdefault(region, {})"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_af918a53","line":296,"in_reply_to":"3a961159_19b088dc","updated":"2015-01-07 20:45:26.000000000","message":"we could keep both so that we cover both cases. new data would assume the default similar to how region[\u0027description\u0027] data does it and existing data would use the path above.","commit_id":"ca3df19da46e330cd9ce1de77224452177f06071"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"a345b44c3b2c018ba44cc6e50318e58fe7c3cca7","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            service_type \u003d endpoint.service[\u0027type\u0027]"},{"line_number":294,"context_line":"            default_service \u003d {"},{"line_number":295,"context_line":"                \u0027id\u0027: endpoint[\u0027id\u0027],"},{"line_number":296,"context_line":"                \u0027name\u0027: endpoint.service.extra.get(\u0027name\u0027, \u0027\u0027),"},{"line_number":297,"context_line":"                \u0027publicURL\u0027: \u0027\u0027"},{"line_number":298,"context_line":"            }"},{"line_number":299,"context_line":"            catalog.setdefault(region, {})"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_19b088dc","line":296,"in_reply_to":"3a961159_1d087bd8","updated":"2015-01-05 03:09:38.000000000","message":"also, if the templated catalog is used, there\u0027s no guarantee that \u0027name\u0027 is set.","commit_id":"ca3df19da46e330cd9ce1de77224452177f06071"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"1ae9e69373295ca4704c3da83fbe3c1395b1c525","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            service_type \u003d endpoint.service[\u0027type\u0027]"},{"line_number":294,"context_line":"            default_service \u003d {"},{"line_number":295,"context_line":"                \u0027id\u0027: endpoint[\u0027id\u0027],"},{"line_number":296,"context_line":"                \u0027name\u0027: endpoint.service.extra.get(\u0027name\u0027, \u0027\u0027),"},{"line_number":297,"context_line":"                \u0027publicURL\u0027: \u0027\u0027"},{"line_number":298,"context_line":"            }"},{"line_number":299,"context_line":"            catalog.setdefault(region, {})"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_6f3c02e2","line":296,"in_reply_to":"3a961159_af918a53","updated":"2015-01-07 21:01:09.000000000","message":"Can we address this as a separate bug/patch then?  I can open the bug and follow-up on the fix.","commit_id":"ca3df19da46e330cd9ce1de77224452177f06071"}],"keystone/tests/test_catalog.py":[{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"32eb80e9da5a786714a48c040b2bbcd1851288ed","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        catalog \u003d self.catalog_api.get_catalog(user_id, tenant_id)"},{"line_number":198,"context_line":"        for service_types in catalog.values():"},{"line_number":199,"context_line":"            for service_details in service_types.values():"},{"line_number":200,"context_line":"                self.assertTrue(\u0027name\u0027 in service_details)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_adaae717","line":200,"updated":"2014-11-20 16:44:40.000000000","message":"assertIn maybe?","commit_id":"0b361bf8bb58b8220b04de21a217493f82a33e6a"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"f3ab32f31c1403ebe5c0fdda90fd23464fc5b76c","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        catalog \u003d self.catalog_api.get_catalog(user_id, tenant_id)"},{"line_number":198,"context_line":"        for service_types in catalog.values():"},{"line_number":199,"context_line":"            for service_details in service_types.values():"},{"line_number":200,"context_line":"                self.assertTrue(\u0027name\u0027 in service_details)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_bf012c3b","line":200,"in_reply_to":"5a890539_adaae717","updated":"2014-11-20 17:49:35.000000000","message":"We still need python 2.6, and assertIn introduced in 2.7","commit_id":"0b361bf8bb58b8220b04de21a217493f82a33e6a"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"d3267eb96db3e52243c4bf876cf5b8bdfd2cb613","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        catalog \u003d self.catalog_api.get_catalog(user_id, tenant_id)"},{"line_number":198,"context_line":"        for service_types in catalog.values():"},{"line_number":199,"context_line":"            for service_details in service_types.values():"},{"line_number":200,"context_line":"                self.assertTrue(\u0027name\u0027 in service_details)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_9501b16c","line":200,"in_reply_to":"5a890539_bf012c3b","updated":"2014-11-20 18:39:00.000000000","message":"$ grep assertIn -r . | wc -l\n\n258\n\nI checked that it won\u0027t be worse before suggesting ;)","commit_id":"0b361bf8bb58b8220b04de21a217493f82a33e6a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"8140fd61685cf70f77c2145713eeab5a56d53bcd","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        catalog \u003d self.catalog_api.get_catalog(user_id, tenant_id)"},{"line_number":198,"context_line":"        for service_types in catalog.values():"},{"line_number":199,"context_line":"            for service_details in service_types.values():"},{"line_number":200,"context_line":"                self.assertTrue(\u0027name\u0027 in service_details)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_e03bf5e8","line":200,"in_reply_to":"5a890539_bf012c3b","updated":"2014-11-21 13:04:49.000000000","message":"Why do we still need Python 2.6?","commit_id":"0b361bf8bb58b8220b04de21a217493f82a33e6a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4fed8d57c93cae59c694b8a7b5a633de885e0f0e","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        self.catalog_api \u003d catalog.Manager()"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        self.service_id \u003d uuid.uuid4().hex"},{"line_number":134,"context_line":"        service \u003d {\u0027id\u0027: self.service_id, \u0027type\u0027: uuid.uuid4().hex,"},{"line_number":135,"context_line":"                   \u0027name\u0027: uuid.uuid4().hex}"},{"line_number":136,"context_line":"        self.catalog_api.create_service(self.service_id, service)"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_6b3a9435","line":134,"updated":"2014-11-21 13:05:17.000000000","message":"What was this change for? I removed it locally and all of the tests still passed.","commit_id":"c8bc01551a0329a68e3e65a3ecc70fd6883a1428"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"23ee291487cf523b5c15c0c2fcdf99dae50a447c","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        self.catalog_api \u003d catalog.Manager()"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        self.service_id \u003d uuid.uuid4().hex"},{"line_number":134,"context_line":"        service \u003d {\u0027id\u0027: self.service_id, \u0027type\u0027: uuid.uuid4().hex,"},{"line_number":135,"context_line":"                   \u0027name\u0027: uuid.uuid4().hex}"},{"line_number":136,"context_line":"        self.catalog_api.create_service(self.service_id, service)"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_e3e85f7e","line":134,"in_reply_to":"5a890539_6b3a9435","updated":"2014-11-21 13:34:26.000000000","message":"Yes, the type is not really used. I added the type value since it is a required value for a Service - just for data correctness.","commit_id":"c8bc01551a0329a68e3e65a3ecc70fd6883a1428"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"dc6f37c806ee3c71b68615a0a7741c3259225ee6","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        self.catalog_api \u003d catalog.Manager()"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        self.service_id \u003d uuid.uuid4().hex"},{"line_number":134,"context_line":"        service \u003d {\u0027id\u0027: self.service_id, \u0027type\u0027: uuid.uuid4().hex,"},{"line_number":135,"context_line":"                   \u0027name\u0027: uuid.uuid4().hex}"},{"line_number":136,"context_line":"        self.catalog_api.create_service(self.service_id, service)"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_d6ab2387","line":134,"in_reply_to":"5a890539_a3181785","updated":"2014-11-21 13:52:45.000000000","message":"I\u0027ll take the change out. opened https://bugs.launchpad.net/keystone/+bug/1394995","commit_id":"c8bc01551a0329a68e3e65a3ecc70fd6883a1428"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"9eae462d86dcabcf7037b33a032ff23242ff6fdb","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        self.catalog_api \u003d catalog.Manager()"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        self.service_id \u003d uuid.uuid4().hex"},{"line_number":134,"context_line":"        service \u003d {\u0027id\u0027: self.service_id, \u0027type\u0027: uuid.uuid4().hex,"},{"line_number":135,"context_line":"                   \u0027name\u0027: uuid.uuid4().hex}"},{"line_number":136,"context_line":"        self.catalog_api.create_service(self.service_id, service)"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_a3181785","line":134,"in_reply_to":"5a890539_e3e85f7e","updated":"2014-11-21 13:38:47.000000000","message":"I would put this in another patch. Something is wrong with the existing tests/code if this is actually required and working without it.","commit_id":"c8bc01551a0329a68e3e65a3ecc70fd6883a1428"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4fed8d57c93cae59c694b8a7b5a633de885e0f0e","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        # all three endpoints appear in the backend"},{"line_number":182,"context_line":"        self.assertEqual(3, len(self.catalog_api.list_endpoints()))"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def test_get_catalog_returns_name_attr_with_no_service_name(self):"},{"line_number":185,"context_line":"        user_id \u003d uuid.uuid4().hex"},{"line_number":186,"context_line":"        tenant_id \u003d uuid.uuid4().hex"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_66964b96","line":184,"updated":"2014-11-21 13:05:17.000000000","message":"Is there anyway to make this test more specific to check for the expected value of \u0027name\u0027?","commit_id":"c8bc01551a0329a68e3e65a3ecc70fd6883a1428"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"23ee291487cf523b5c15c0c2fcdf99dae50a447c","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        # all three endpoints appear in the backend"},{"line_number":182,"context_line":"        self.assertEqual(3, len(self.catalog_api.list_endpoints()))"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def test_get_catalog_returns_name_attr_with_no_service_name(self):"},{"line_number":185,"context_line":"        user_id \u003d uuid.uuid4().hex"},{"line_number":186,"context_line":"        tenant_id \u003d uuid.uuid4().hex"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_63938ffa","line":184,"in_reply_to":"5a890539_66964b96","updated":"2014-11-21 13:34:26.000000000","message":"Actually, what I like to test is that the name attribute always exist. \n\nI can update the test to check for existence and value of name","commit_id":"c8bc01551a0329a68e3e65a3ecc70fd6883a1428"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4bc93c861ad43d8163512a3f431e793e60b370a1","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        for service in self.catalog_api.list_services():"},{"line_number":207,"context_line":"            service_names.append(service.get(\u0027name\u0027, \u0027\u0027))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        # all endpoints must have the name attribute and match"},{"line_number":210,"context_line":"        # in one of the fetched service names"},{"line_number":211,"context_line":"        catalog \u003d self.catalog_api.get_catalog(user_id, tenant_id)"},{"line_number":212,"context_line":"        for service_types in catalog.values():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_3d6b5f1f","line":209,"updated":"2014-11-21 16:17:16.000000000","message":"I was hoping to make this test more precise. Make sure that a service without a name returns \u0027\u0027 and one with a name returns the correct name.","commit_id":"cbae37b5732cf2b6d701d7456c9bb235b5ff8232"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"0f2f0d4c7a4967e51f67ecddc8b116140e319172","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        for service in self.catalog_api.list_services():"},{"line_number":207,"context_line":"            service_names.append(service.get(\u0027name\u0027, \u0027\u0027))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        # all endpoints must have the name attribute and match"},{"line_number":210,"context_line":"        # in one of the fetched service names"},{"line_number":211,"context_line":"        catalog \u003d self.catalog_api.get_catalog(user_id, tenant_id)"},{"line_number":212,"context_line":"        for service_types in catalog.values():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_d0ce9e82","line":209,"in_reply_to":"5a890539_1462e73d","updated":"2014-11-24 11:24:52.000000000","message":"Thanks for the help, it looks good! I\u0027ll go with that then.","commit_id":"cbae37b5732cf2b6d701d7456c9bb235b5ff8232"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"93876322bb41af9eb27426669a2c1c9f84e80a52","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        for service in self.catalog_api.list_services():"},{"line_number":207,"context_line":"            service_names.append(service.get(\u0027name\u0027, \u0027\u0027))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        # all endpoints must have the name attribute and match"},{"line_number":210,"context_line":"        # in one of the fetched service names"},{"line_number":211,"context_line":"        catalog \u003d self.catalog_api.get_catalog(user_id, tenant_id)"},{"line_number":212,"context_line":"        for service_types in catalog.values():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_72c50e5b","line":209,"in_reply_to":"5a890539_3d6b5f1f","updated":"2014-11-21 19:57:32.000000000","message":"How do you suggest I go about mapping the service endpoints from catalog to the expected service name?  Map the service-type from service endpoint back the service-type in the service object?","commit_id":"cbae37b5732cf2b6d701d7456c9bb235b5ff8232"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"c984476af4d6f164b68441c0181f0a101bfb0bfd","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        for service in self.catalog_api.list_services():"},{"line_number":207,"context_line":"            service_names.append(service.get(\u0027name\u0027, \u0027\u0027))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        # all endpoints must have the name attribute and match"},{"line_number":210,"context_line":"        # in one of the fetched service names"},{"line_number":211,"context_line":"        catalog \u003d self.catalog_api.get_catalog(user_id, tenant_id)"},{"line_number":212,"context_line":"        for service_types in catalog.values():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_1462e73d","line":209,"in_reply_to":"5a890539_72c50e5b","updated":"2014-11-23 15:09:49.000000000","message":"I submitted a patchset that changes this test to match what I was thinking. The same sort of thing would still need to be done for the other test if you agree with the approach.","commit_id":"cbae37b5732cf2b6d701d7456c9bb235b5ff8232"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"766f131827cdffc2874000e749ccd3af079a2aef","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        }"},{"line_number":193,"context_line":"        self.catalog_api.create_service(named_svc[\u0027id\u0027], named_svc)"},{"line_number":194,"context_line":"        endpoint \u003d self.new_endpoint_ref(service_id\u003dnamed_svc[\u0027id\u0027])"},{"line_number":195,"context_line":"        self.catalog_api.create_endpoint(endpoint[\u0027id\u0027], endpoint)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        # create a service, with no name"},{"line_number":198,"context_line":"        unnamed_svc \u003d {\u0027id\u0027: uuid.uuid4().hex, \u0027type\u0027: uuid.uuid4().hex}"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_f4439bac","line":195,"updated":"2014-11-23 15:08:34.000000000","message":"I\u0027m keeping the original service ref so I can use it later.","commit_id":"9fa76d279557f33a525d5c5118f51e73bfc98e2c"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"766f131827cdffc2874000e749ccd3af079a2aef","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        endpoint \u003d self.new_endpoint_ref(service_id\u003dunnamed_svc[\u0027id\u0027])"},{"line_number":201,"context_line":"        self.catalog_api.create_endpoint(endpoint[\u0027id\u0027], endpoint)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        region \u003d None"},{"line_number":204,"context_line":"        catalog \u003d self.catalog_api.get_catalog(user_id, tenant_id)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        self.assertEqual(named_svc[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_7486cbdc","line":203,"updated":"2014-11-23 15:08:34.000000000","message":"Now I find the specific endpoint that were created and check the service name. This prevents two possible test bugs:\n  - parallel tests could create endpoints between capturing the service list and doing the assertions - this would make the test fail if the service name was unknown\n  - if one service name was an empty string i could change the catalog to alway output empty string for service name and this test would still pass","commit_id":"9fa76d279557f33a525d5c5118f51e73bfc98e2c"}],"keystone/tests/test_v3_catalog.py":[{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"32eb80e9da5a786714a48c040b2bbcd1851288ed","unresolved":false,"context_lines":[{"line_number":705,"context_line":"        # all endpoints must have the name attribute"},{"line_number":706,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(user_id, tenant_id)"},{"line_number":707,"context_line":"        for endpoints in catalog:"},{"line_number":708,"context_line":"                self.assertTrue(\u0027name\u0027 in endpoints)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"# TODO(dstanek): this needs refactoring with the test above, but we are in a"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_0d313b0b","line":708,"updated":"2014-11-20 16:44:40.000000000","message":"indentation;\nalso, assertIn","commit_id":"0b361bf8bb58b8220b04de21a217493f82a33e6a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4fed8d57c93cae59c694b8a7b5a633de885e0f0e","unresolved":false,"context_lines":[{"line_number":705,"context_line":"        # all endpoints must have the name attribute"},{"line_number":706,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(user_id, tenant_id)"},{"line_number":707,"context_line":"        for endpoints in catalog:"},{"line_number":708,"context_line":"                self.assertIn(\u0027name\u0027, endpoints)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"# TODO(dstanek): this needs refactoring with the test above, but we are in a"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_66dd6b70","line":708,"updated":"2014-11-21 13:05:17.000000000","message":"Same as the other test....also is the indentation here correct?","commit_id":"c8bc01551a0329a68e3e65a3ecc70fd6883a1428"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4bc93c861ad43d8163512a3f431e793e60b370a1","unresolved":false,"context_lines":[{"line_number":717,"context_line":"            service_names.append(service.get(\u0027name\u0027, \u0027\u0027))"},{"line_number":718,"context_line":""},{"line_number":719,"context_line":"        # all endpoints must have the name attribute and match"},{"line_number":720,"context_line":"        # in one of the fetched service names"},{"line_number":721,"context_line":"        catalog \u003d self.catalog_api.get_v3_catalog(user_id, tenant_id)"},{"line_number":722,"context_line":"        for service_endpoints in catalog:"},{"line_number":723,"context_line":"            self.assertIn(\u0027name\u0027, service_endpoints)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_5d74abfd","line":720,"updated":"2014-11-21 16:17:16.000000000","message":"Same here","commit_id":"cbae37b5732cf2b6d701d7456c9bb235b5ff8232"}]}
