)]}'
{"mistral/tests/unit/utils/test_keystone_utils.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b374c10c483fe0a4b5d5040a14b26aca6ad588ba","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def test_service_endpoints_select(self):"},{"line_number":46,"context_line":"        def find(name, typ, catalog\u003dNone):"},{"line_number":47,"context_line":"            if catalog is None:"},{"line_number":48,"context_line":"                catalog \u003d ["},{"line_number":49,"context_line":"                    {"},{"line_number":50,"context_line":"                        \"type\": \"compute\","},{"line_number":51,"context_line":"                        \"name\": \"nova\","}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_83c3e989","line":48,"range":{"start_line":48,"start_character":26,"end_line":48,"end_character":27},"updated":"2016-06-16 11:51:01.000000000","message":"Would it be better to move this huge fixture object out of test method body?","commit_id":"7935d57e22f11ba6a9f37b212029efbd43ed3e49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"20718fc4769a810bdc0982444ea098933ab8df6c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def test_service_endpoints_select(self):"},{"line_number":46,"context_line":"        def find(name, typ, catalog\u003dNone):"},{"line_number":47,"context_line":"            if catalog is None:"},{"line_number":48,"context_line":"                catalog \u003d ["},{"line_number":49,"context_line":"                    {"},{"line_number":50,"context_line":"                        \"type\": \"compute\","},{"line_number":51,"context_line":"                        \"name\": \"nova\","}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_e6b75bd5","line":48,"range":{"start_line":48,"start_character":26,"end_line":48,"end_character":27},"in_reply_to":"7aa08908_06cf07b4","updated":"2016-06-16 12:39:04.000000000","message":"Well, it\u0027s a matter of taste, of course, and I\u0027m not insisting. It just seems to me that it\u0027s hard to read the method if it has another method inside which defines such a huge immutable value. If you look at other tests you\u0027ll see that we typically define such huge dicts as global variables in the beginning of methods.","commit_id":"7935d57e22f11ba6a9f37b212029efbd43ed3e49"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"bbc25dfe3fe2c535aed1d30b2988d894f25f4ccf","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def test_service_endpoints_select(self):"},{"line_number":46,"context_line":"        def find(name, typ, catalog\u003dNone):"},{"line_number":47,"context_line":"            if catalog is None:"},{"line_number":48,"context_line":"                catalog \u003d ["},{"line_number":49,"context_line":"                    {"},{"line_number":50,"context_line":"                        \"type\": \"compute\","},{"line_number":51,"context_line":"                        \"name\": \"nova\","}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_06cf07b4","line":48,"range":{"start_line":48,"start_character":26,"end_line":48,"end_character":27},"in_reply_to":"7aa08908_83c3e989","updated":"2016-06-16 12:12:39.000000000","message":"Is it Ok to leave it in this file or should it be moved completely out of this scope?","commit_id":"7935d57e22f11ba6a9f37b212029efbd43ed3e49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6b953cfa097ec1f581862d723f54c80aa203ed24","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        )"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_service_endpoints_select(self):"},{"line_number":97,"context_line":"        def find(name, typ\u003dNone, catalog\u003dSERVICES_CATALOG):"},{"line_number":98,"context_line":"            return keystone.select_service_endpoints(name, typ, catalog)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        endpoints \u003d find(\u0027nova\u0027, \u0027compute\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_449552e2","line":97,"range":{"start_line":97,"start_character":23,"end_line":97,"end_character":26},"updated":"2016-06-17 10:04:39.000000000","message":"Now IMO it looks much better. Is \"typ\" is a typo or you use it intentionally instead of \"type\"?","commit_id":"29f73f840db64cd0954f8defab54e57b34966bd9"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"2d151ce222324ba260bba8d3f158d7d225a320dc","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        )"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_service_endpoints_select(self):"},{"line_number":97,"context_line":"        def find(name, typ\u003dNone, catalog\u003dSERVICES_CATALOG):"},{"line_number":98,"context_line":"            return keystone.select_service_endpoints(name, typ, catalog)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        endpoints \u003d find(\u0027nova\u0027, \u0027compute\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_4be745b0","line":97,"range":{"start_line":97,"start_character":23,"end_line":97,"end_character":26},"in_reply_to":"5a9d85d2_3ac1a1e5","updated":"2016-06-23 05:00:07.000000000","message":"Ooh, right. That\u0027s ok.","commit_id":"29f73f840db64cd0954f8defab54e57b34966bd9"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"751fe7acb842b93ae5a87ce3105c3ac40fed9bc4","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        )"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_service_endpoints_select(self):"},{"line_number":97,"context_line":"        def find(name, typ\u003dNone, catalog\u003dSERVICES_CATALOG):"},{"line_number":98,"context_line":"            return keystone.select_service_endpoints(name, typ, catalog)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        endpoints \u003d find(\u0027nova\u0027, \u0027compute\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_3ac1a1e5","line":97,"range":{"start_line":97,"start_character":23,"end_line":97,"end_character":26},"in_reply_to":"7aa08908_449552e2","updated":"2016-06-20 14:23:08.000000000","message":"type is a python \u0027keywordish\u0027 thing. I didn\u0027t want to override it. Will change to somehthing better.","commit_id":"29f73f840db64cd0954f8defab54e57b34966bd9"}],"mistral/utils/openstack/keystone.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b374c10c483fe0a4b5d5040a14b26aca6ad588ba","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            continue"},{"line_number":96,"context_line":"        for endpoint in catalog[\"endpoints\"]:"},{"line_number":97,"context_line":"            if endpoint[\"interface\"] \u003d\u003d \u0027public\u0027:"},{"line_number":98,"context_line":"                yield Endpoint(None, endpoint, loaded\u003dTrue)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"def get_keystone_endpoint_v2():"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_43562107","line":98,"range":{"start_line":98,"start_character":16,"end_line":98,"end_character":21},"updated":"2016-06-16 11:51:01.000000000","message":"Why do you use \"yield\" here?","commit_id":"7935d57e22f11ba6a9f37b212029efbd43ed3e49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"20718fc4769a810bdc0982444ea098933ab8df6c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            continue"},{"line_number":96,"context_line":"        for endpoint in catalog[\"endpoints\"]:"},{"line_number":97,"context_line":"            if endpoint[\"interface\"] \u003d\u003d \u0027public\u0027:"},{"line_number":98,"context_line":"                yield Endpoint(None, endpoint, loaded\u003dTrue)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"def get_keystone_endpoint_v2():"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_e19e2562","line":98,"range":{"start_line":98,"start_character":16,"end_line":98,"end_character":21},"in_reply_to":"7aa08908_26f5e3ec","updated":"2016-06-16 12:39:04.000000000","message":"Yep, usually \"yield\" is used for a certain serious reason when we need some asynchronous behavior. Not sure why we need it here.","commit_id":"7935d57e22f11ba6a9f37b212029efbd43ed3e49"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"bbc25dfe3fe2c535aed1d30b2988d894f25f4ccf","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            continue"},{"line_number":96,"context_line":"        for endpoint in catalog[\"endpoints\"]:"},{"line_number":97,"context_line":"            if endpoint[\"interface\"] \u003d\u003d \u0027public\u0027:"},{"line_number":98,"context_line":"                yield Endpoint(None, endpoint, loaded\u003dTrue)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"def get_keystone_endpoint_v2():"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_26f5e3ec","line":98,"range":{"start_line":98,"start_character":16,"end_line":98,"end_character":21},"in_reply_to":"7aa08908_43562107","updated":"2016-06-16 12:12:39.000000000","message":"This way the method becomes a generator and can return all the endpoints in all regions. It may be cleaner to collect all endpoints and return the list.","commit_id":"7935d57e22f11ba6a9f37b212029efbd43ed3e49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6b953cfa097ec1f581862d723f54c80aa203ed24","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    token \u003d ctx.auth_token"},{"line_number":74,"context_line":"    response \u003d client().tokens.get_token_data(token, include_catalog\u003dTrue)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    endpoints \u003d \\"},{"line_number":77,"context_line":"        select_service_endpoints(service_name, service_type,"},{"line_number":78,"context_line":"                                 response[\"token\"][\"catalog\"])"},{"line_number":79,"context_line":"    if not endpoints:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_6445ee6d","line":76,"range":{"start_line":76,"start_character":16,"end_line":76,"end_character":17},"updated":"2016-06-17 10:04:39.000000000","message":"There\u0027s a style guideline in OpenStack that forbids using back slashes for line breaks. Please user form:\n\nendpoints \u003d select_service_endpoints(\n    service_name,\n    service_type,\n    response[\"token\"][\"catalog\"]\n)","commit_id":"29f73f840db64cd0954f8defab54e57b34966bd9"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"751fe7acb842b93ae5a87ce3105c3ac40fed9bc4","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    token \u003d ctx.auth_token"},{"line_number":74,"context_line":"    response \u003d client().tokens.get_token_data(token, include_catalog\u003dTrue)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    endpoints \u003d \\"},{"line_number":77,"context_line":"        select_service_endpoints(service_name, service_type,"},{"line_number":78,"context_line":"                                 response[\"token\"][\"catalog\"])"},{"line_number":79,"context_line":"    if not endpoints:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_45d5ae41","line":76,"range":{"start_line":76,"start_character":16,"end_line":76,"end_character":17},"in_reply_to":"7aa08908_6445ee6d","updated":"2016-06-20 14:23:08.000000000","message":"Done","commit_id":"29f73f840db64cd0954f8defab54e57b34966bd9"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6b953cfa097ec1f581862d723f54c80aa203ed24","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def select_service_endpoints(service_name, service_type, services):"},{"line_number":92,"context_line":"    endpoints \u003d []"},{"line_number":93,"context_line":"    for catalog in services:"},{"line_number":94,"context_line":"        if service_name and catalog[\"name\"] !\u003d service_name:"},{"line_number":95,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_871c5c67","line":92,"range":{"start_line":92,"start_character":4,"end_line":92,"end_character":13},"updated":"2016-06-17 10:04:39.000000000","message":"Soft: usually we insert blank lines before all control structures like \"for\", \"if\", \"return\" etc. unless they are in the beginning of a method. That way code logical units are clearly separated when we read them. So I\u0027d ask you to add a blank line before line 93 and 101.","commit_id":"29f73f840db64cd0954f8defab54e57b34966bd9"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"751fe7acb842b93ae5a87ce3105c3ac40fed9bc4","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def select_service_endpoints(service_name, service_type, services):"},{"line_number":92,"context_line":"    endpoints \u003d []"},{"line_number":93,"context_line":"    for catalog in services:"},{"line_number":94,"context_line":"        if service_name and catalog[\"name\"] !\u003d service_name:"},{"line_number":95,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_a5ca929f","line":92,"range":{"start_line":92,"start_character":4,"end_line":92,"end_character":13},"in_reply_to":"7aa08908_871c5c67","updated":"2016-06-20 14:23:08.000000000","message":"Done","commit_id":"29f73f840db64cd0954f8defab54e57b34966bd9"}]}
