)]}'
{"openstack_dashboard/dashboards/project/instances/console.py":[{"author":{"_account_id":11902,"name":"Randy Bertram","email":"rbertram@us.ibm.com","username":"rbertram"},"change_message_id":"921b0390f102fa5ca5e6f4a0e4602f116b8cb8f7","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"CONSOLES \u003d SortedDict([(\u0027VNC\u0027, api.nova.server_vnc_console),"},{"line_number":29,"context_line":"                       (\u0027SPICE\u0027, api.nova.server_spice_console),"},{"line_number":30,"context_line":"                       (\u0027RDP\u0027, api.nova.server_rdp_console)])"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def get_console_url(request, console_type, instance, url\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_53a333b1","line":30,"updated":"2015-01-09 18:35:04.000000000","message":"Add a comment saying that these keys, as lowercase, will be at the end of the URL. (Alternatively, you could add something else to the tuple or make another dictionary - but not worth it.)","commit_id":"d0a330d59543e6f17ca24319da89c7426aee6228"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"c648a6223b7ddbfc27d6b3627820a1e63759c4a7","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"CONSOLES \u003d SortedDict([(\u0027VNC\u0027, api.nova.server_vnc_console),"},{"line_number":29,"context_line":"                       (\u0027SPICE\u0027, api.nova.server_spice_console),"},{"line_number":30,"context_line":"                       (\u0027RDP\u0027, api.nova.server_rdp_console)])"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def get_console_url(request, console_type, instance, url\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_336f6e95","line":30,"in_reply_to":"3a961159_53a333b1","updated":"2015-01-12 07:52:16.000000000","message":"Done","commit_id":"d0a330d59543e6f17ca24319da89c7426aee6228"},{"author":{"_account_id":11902,"name":"Randy Bertram","email":"rbertram@us.ibm.com","username":"rbertram"},"change_message_id":"921b0390f102fa5ca5e6f4a0e4602f116b8cb8f7","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                       (\u0027RDP\u0027, api.nova.server_rdp_console)])"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def get_console_url(request, console_type, instance, url\u003dTrue):"},{"line_number":34,"context_line":"    \"\"\"Get a console url based on console type.\"\"\""},{"line_number":35,"context_line":"    if console_type \u003d\u003d \u0027AUTO\u0027:"},{"line_number":36,"context_line":"        check_consoles \u003d CONSOLES"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_d3a9e326","line":33,"updated":"2015-01-09 18:35:04.000000000","message":"The two get_console* methods are confusingly named. This one gets an url or a console type (in lowercase); the other one actually always gets the url.\n\nHaving two methods seems unnecessary. Can\u0027t you just leave this one as \"get_console\", and use it as it is? I think you can add new parameters like url\u003dTrue to an existing method, and existing callers who don\u0027t know about the new parm will keep calling it just fine.\n\nI suggest a better name for \"url\u003d\". You\u0027d expect it to pass an actual URL, not a boolean. Something like return_url\u003dTrue. Better yet, how about return_console_type\u003dFalse? Then when you make a call setting it to True, it is clearer to the reader what is happening.","commit_id":"d0a330d59543e6f17ca24319da89c7426aee6228"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"c648a6223b7ddbfc27d6b3627820a1e63759c4a7","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                       (\u0027RDP\u0027, api.nova.server_rdp_console)])"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def get_console_url(request, console_type, instance, url\u003dTrue):"},{"line_number":34,"context_line":"    \"\"\"Get a console url based on console type.\"\"\""},{"line_number":35,"context_line":"    if console_type \u003d\u003d \u0027AUTO\u0027:"},{"line_number":36,"context_line":"        check_consoles \u003d CONSOLES"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_135b52f7","line":33,"in_reply_to":"3a961159_d3a9e326","updated":"2015-01-12 07:52:16.000000000","message":"Done","commit_id":"d0a330d59543e6f17ca24319da89c7426aee6228"},{"author":{"_account_id":11902,"name":"Randy Bertram","email":"rbertram@us.ibm.com","username":"rbertram"},"change_message_id":"ca9277f84db21d0d7167de6deab3b5cd4da39748","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            msg \u003d _(\u0027Console type \"%s\" not supported.\u0027) % console_type"},{"line_number":44,"context_line":"            raise exceptions.NotAvailable(msg)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    for c, api_call in check_consoles.iteritems():"},{"line_number":47,"context_line":"        # Ugly workaround due novaclient API change from 2.17 to 2.18."},{"line_number":48,"context_line":"        try:"},{"line_number":49,"context_line":"            httpnotimplemented \u003d nova_exception.HttpNotImplemented"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_f84a36ac","line":46,"updated":"2015-01-09 23:36:24.000000000","message":"how about a better variable name than c? I know console_type is already taken. maybe con_type?","commit_id":"d0a330d59543e6f17ca24319da89c7426aee6228"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"c648a6223b7ddbfc27d6b3627820a1e63759c4a7","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            msg \u003d _(\u0027Console type \"%s\" not supported.\u0027) % console_type"},{"line_number":44,"context_line":"            raise exceptions.NotAvailable(msg)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    for c, api_call in check_consoles.iteritems():"},{"line_number":47,"context_line":"        # Ugly workaround due novaclient API change from 2.17 to 2.18."},{"line_number":48,"context_line":"        try:"},{"line_number":49,"context_line":"            httpnotimplemented \u003d nova_exception.HttpNotImplemented"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_f355e6c2","line":46,"in_reply_to":"3a961159_f84a36ac","updated":"2015-01-12 07:52:16.000000000","message":"Done","commit_id":"d0a330d59543e6f17ca24319da89c7426aee6228"},{"author":{"_account_id":11902,"name":"Randy Bertram","email":"rbertram@us.ibm.com","username":"rbertram"},"change_message_id":"be0bb981dc7bdb45a609d9b0c87ecafefc6fab61","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    else:"},{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            check_consoles \u003d {\u0027console_type\u0027: CONSOLES[console_type]}"},{"line_number":42,"context_line":"            if return_console_type:"},{"line_number":43,"context_line":"                return console_type.lower()"},{"line_number":44,"context_line":"        except KeyError:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027Console type \"%s\" not supported.\u0027) % console_type"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_d25edd78","line":42,"updated":"2015-01-13 22:41:35.000000000","message":"I\u0027m working with console.py in https://review.openstack.org/#/c/144659 . I found that I need the console_url and console_type to BOTH be returned in some situations, so I changed it so that return_console_type causes a tuple of (console_type,console_url) to be returned. This actually simplified console.py.\n\nYou can delete lines 42 and 43.","commit_id":"2654ebe3a1be1f0f856bab9b1f643add1167d16c"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"b46bc9e44e13d4047615bc315d16487fcf4d9da0","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    else:"},{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            check_consoles \u003d {\u0027console_type\u0027: CONSOLES[console_type]}"},{"line_number":42,"context_line":"            if return_console_type:"},{"line_number":43,"context_line":"                return console_type.lower()"},{"line_number":44,"context_line":"        except KeyError:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027Console type \"%s\" not supported.\u0027) % console_type"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_435ce17d","line":42,"in_reply_to":"3a961159_d25edd78","updated":"2015-01-14 00:26:42.000000000","message":"Done","commit_id":"2654ebe3a1be1f0f856bab9b1f643add1167d16c"},{"author":{"_account_id":11902,"name":"Randy Bertram","email":"rbertram@us.ibm.com","username":"rbertram"},"change_message_id":"be0bb981dc7bdb45a609d9b0c87ecafefc6fab61","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    for con_type, api_call in check_consoles.iteritems():"},{"line_number":49,"context_line":"        # Ugly workaround due novaclient API change from 2.17 to 2.18."},{"line_number":50,"context_line":"        try:"},{"line_number":51,"context_line":"            httpnotimplemented \u003d nova_exception.HttpNotImplemented"},{"line_number":52,"context_line":"        except AttributeError:"},{"line_number":53,"context_line":"            httpnotimplemented \u003d nova_exception.HTTPNotImplemented"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_f2ef5984","line":50,"updated":"2015-01-13 22:41:35.000000000","message":"You may wish to improve the file by moving these try/except lines 50-53 to above the for loop. It makes it easier to read, and more efficient.","commit_id":"2654ebe3a1be1f0f856bab9b1f643add1167d16c"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"b46bc9e44e13d4047615bc315d16487fcf4d9da0","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    for con_type, api_call in check_consoles.iteritems():"},{"line_number":49,"context_line":"        # Ugly workaround due novaclient API change from 2.17 to 2.18."},{"line_number":50,"context_line":"        try:"},{"line_number":51,"context_line":"            httpnotimplemented \u003d nova_exception.HttpNotImplemented"},{"line_number":52,"context_line":"        except AttributeError:"},{"line_number":53,"context_line":"            httpnotimplemented \u003d nova_exception.HTTPNotImplemented"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_23d0b5c8","line":50,"in_reply_to":"3a961159_f2ef5984","updated":"2015-01-14 00:26:42.000000000","message":"Done","commit_id":"2654ebe3a1be1f0f856bab9b1f643add1167d16c"},{"author":{"_account_id":11902,"name":"Randy Bertram","email":"rbertram@us.ibm.com","username":"rbertram"},"change_message_id":"be0bb981dc7bdb45a609d9b0c87ecafefc6fab61","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                      console.url,"},{"line_number":66,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":67,"context_line":"                      instance.id)"},{"line_number":68,"context_line":"        return console_url if not return_console_type else con_type.lower()"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_12d065c8","line":68,"updated":"2015-01-13 22:41:35.000000000","message":"Here, change it to this:\n\nreturn ((con_type.lower(), console_url) if\nreturn_console_type else console_url)\n\nIt avoids negative logic, and returns a tuple so the caller can get both url and type at once. You would also have to change the caller in view.py.","commit_id":"2654ebe3a1be1f0f856bab9b1f643add1167d16c"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"b46bc9e44e13d4047615bc315d16487fcf4d9da0","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                      console.url,"},{"line_number":66,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":67,"context_line":"                      instance.id)"},{"line_number":68,"context_line":"        return console_url if not return_console_type else con_type.lower()"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_a3e3c5a2","line":68,"in_reply_to":"3a961159_12d065c8","updated":"2015-01-14 00:26:42.000000000","message":"Done","commit_id":"2654ebe3a1be1f0f856bab9b1f643add1167d16c"},{"author":{"_account_id":9622,"name":"Cindy Lu","email":"clu@us.ibm.com","username":"clu14"},"change_message_id":"dc5580afc1dcc6756bb79e3a489e212f43069c1c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                       (\u0027RDP\u0027, api.nova.server_rdp_console)])"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def get_console(request, console_type, instance, return_console_type\u003dFalse):"},{"line_number":36,"context_line":"    \"\"\"Get a console url or lowercase of console type based on console type.\"\"\""},{"line_number":37,"context_line":"    if console_type \u003d\u003d \u0027AUTO\u0027:"},{"line_number":38,"context_line":"        check_consoles \u003d CONSOLES"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_3aa1b395","line":35,"updated":"2015-01-14 03:08:37.000000000","message":"with randy\u0027s comment in previous patch, maybe we should call this \"return_console\" since it is a tuple, not just console type...\n\nstill seems kinda weird, since that is the method name...","commit_id":"433ccccc5e0518a4cf28e00bd7ed22aa431be8a5"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"467129cb39b8fc976871446cdf519287d169d53b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                       (\u0027RDP\u0027, api.nova.server_rdp_console)])"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def get_console(request, console_type, instance, return_console_type\u003dFalse):"},{"line_number":36,"context_line":"    \"\"\"Get a console url or lowercase of console type based on console type.\"\"\""},{"line_number":37,"context_line":"    if console_type \u003d\u003d \u0027AUTO\u0027:"},{"line_number":38,"context_line":"        check_consoles \u003d CONSOLES"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_7d5335e2","line":35,"in_reply_to":"3a961159_3aa1b395","updated":"2015-01-14 05:52:14.000000000","message":"I\u0027d prefer return_console_type, more specific.","commit_id":"433ccccc5e0518a4cf28e00bd7ed22aa431be8a5"},{"author":{"_account_id":9622,"name":"Cindy Lu","email":"clu@us.ibm.com","username":"clu14"},"change_message_id":"dc5580afc1dcc6756bb79e3a489e212f43069c1c","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def get_console(request, console_type, instance, return_console_type\u003dFalse):"},{"line_number":36,"context_line":"    \"\"\"Get a console url or lowercase of console type based on console type.\"\"\""},{"line_number":37,"context_line":"    if console_type \u003d\u003d \u0027AUTO\u0027:"},{"line_number":38,"context_line":"        check_consoles \u003d CONSOLES"},{"line_number":39,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_dab7cfd5","line":36,"updated":"2015-01-14 03:08:37.000000000","message":"*or tuple of console url and console type","commit_id":"433ccccc5e0518a4cf28e00bd7ed22aa431be8a5"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"467129cb39b8fc976871446cdf519287d169d53b","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def get_console(request, console_type, instance, return_console_type\u003dFalse):"},{"line_number":36,"context_line":"    \"\"\"Get a console url or lowercase of console type based on console type.\"\"\""},{"line_number":37,"context_line":"    if console_type \u003d\u003d \u0027AUTO\u0027:"},{"line_number":38,"context_line":"        check_consoles \u003d CONSOLES"},{"line_number":39,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_5d6bd985","line":36,"in_reply_to":"3a961159_dab7cfd5","updated":"2015-01-14 05:52:14.000000000","message":"Done","commit_id":"433ccccc5e0518a4cf28e00bd7ed22aa431be8a5"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3b4b4652f00c11808614d7c96650a4f7b9a4a0fd","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# lowercase of the keys will be used at the end of the console URL in"},{"line_number":29,"context_line":"# network topology."},{"line_number":30,"context_line":"CONSOLES \u003d SortedDict([(\u0027VNC\u0027, api.nova.server_vnc_console),"},{"line_number":31,"context_line":"                       (\u0027SPICE\u0027, api.nova.server_spice_console),"},{"line_number":32,"context_line":"                       (\u0027RDP\u0027, api.nova.server_rdp_console)])"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_0336a252","line":29,"updated":"2015-01-21 17:17:00.000000000","message":"It seems the comment is not related to the CONSOLES definition here. Could you move this to the appropriate place where lower case type is actually used.","commit_id":"4c595667a5b151b4af096fbb1430f742ae55ef5a"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"d57dc6e045d490f619cf587a8c4ed3db5108df35","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# lowercase of the keys will be used at the end of the console URL in"},{"line_number":29,"context_line":"# network topology."},{"line_number":30,"context_line":"CONSOLES \u003d SortedDict([(\u0027VNC\u0027, api.nova.server_vnc_console),"},{"line_number":31,"context_line":"                       (\u0027SPICE\u0027, api.nova.server_spice_console),"},{"line_number":32,"context_line":"                       (\u0027RDP\u0027, api.nova.server_rdp_console)])"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_27cd5c32","line":29,"in_reply_to":"1a930d6b_0336a252","updated":"2015-01-22 01:39:39.000000000","message":"Done","commit_id":"4c595667a5b151b4af096fbb1430f742ae55ef5a"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3b4b4652f00c11808614d7c96650a4f7b9a4a0fd","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                      console.url,"},{"line_number":65,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":66,"context_line":"                      instance.id)"},{"line_number":67,"context_line":"        return ((con_type.lower(), console_url) if"},{"line_number":68,"context_line":"                return_console_type else console_url)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_43ca6a50","line":67,"updated":"2015-01-21 17:17:00.000000000","message":"IMO it is better to use either of upper or lower case only, i.e. to return the upper case type here. If network topology code use lower-case console type, it is better to convert a type into lower case in its code rather than converting here. It makes the code more consistent.","commit_id":"4c595667a5b151b4af096fbb1430f742ae55ef5a"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"d57dc6e045d490f619cf587a8c4ed3db5108df35","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                      console.url,"},{"line_number":65,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":66,"context_line":"                      instance.id)"},{"line_number":67,"context_line":"        return ((con_type.lower(), console_url) if"},{"line_number":68,"context_line":"                return_console_type else console_url)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_a7230c04","line":67,"in_reply_to":"1a930d6b_43ca6a50","updated":"2015-01-22 01:39:39.000000000","message":"Done","commit_id":"4c595667a5b151b4af096fbb1430f742ae55ef5a"},{"author":{"_account_id":5623,"name":"David Lyle","email":"dklyle0@gmail.com","username":"david-lyle"},"change_message_id":"d5eaef3fed721ebc5ff333a33f71b5a764e0b5ea","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      console.url,"},{"line_number":63,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":64,"context_line":"                      instance.id)"},{"line_number":65,"context_line":"        return ((con_type, console_url) if"},{"line_number":66,"context_line":"                return_console_type else console_url)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_a5413e0d","line":65,"updated":"2015-02-09 18:36:25.000000000","message":"you\u0027re making a conditional return type? tuple in one case, single value in another? this seems like an opportunity for problems down the road.","commit_id":"8f4193805106235cad723d0692ca4142f4c0d905"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"7a38d6cada47af34b56a629e8864f6315729ec32","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      console.url,"},{"line_number":63,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":64,"context_line":"                      instance.id)"},{"line_number":65,"context_line":"        return ((con_type, console_url) if"},{"line_number":66,"context_line":"                return_console_type else console_url)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_7eb422f2","line":65,"in_reply_to":"da86d52c_2e8b5d1f","updated":"2015-02-10 03:30:14.000000000","message":"the tuple return includes the single one, so we can just return (con_type, console_url) here.","commit_id":"8f4193805106235cad723d0692ca4142f4c0d905"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"55bef80ed2bed8793e5bfc284053e9c9697fc365","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      console.url,"},{"line_number":63,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":64,"context_line":"                      instance.id)"},{"line_number":65,"context_line":"        return ((con_type, console_url) if"},{"line_number":66,"context_line":"                return_console_type else console_url)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_8dd8c580","line":65,"in_reply_to":"da86d52c_7eb422f2","updated":"2015-02-10 07:43:55.000000000","message":"Thanks, Done","commit_id":"8f4193805106235cad723d0692ca4142f4c0d905"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e74863d9652cce3f68eeafdcf7bc08a2a61174f1","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      console.url,"},{"line_number":63,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":64,"context_line":"                      instance.id)"},{"line_number":65,"context_line":"        return ((con_type, console_url) if"},{"line_number":66,"context_line":"                return_console_type else console_url)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_8b77e99e","line":65,"in_reply_to":"da86d52c_a5413e0d","updated":"2015-02-09 19:19:35.000000000","message":"+1, this is trouble waiting to happen","commit_id":"8f4193805106235cad723d0692ca4142f4c0d905"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"09846e7aabb52d901aee7ee099181a1b1fef90db","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      console.url,"},{"line_number":63,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":64,"context_line":"                      instance.id)"},{"line_number":65,"context_line":"        return ((con_type, console_url) if"},{"line_number":66,"context_line":"                return_console_type else console_url)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_2e8b5d1f","line":65,"in_reply_to":"da86d52c_a5413e0d","updated":"2015-02-10 02:06:57.000000000","message":"How about always return (con_type, console_url) and make change to all other places calling this method?","commit_id":"8f4193805106235cad723d0692ca4142f4c0d905"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4d7c80eecaa05f3b61153f440d1c89c37af98cc","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      console.url,"},{"line_number":63,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":64,"context_line":"                      instance.id)"},{"line_number":65,"context_line":"        return (con_type, console_url)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_886f86fb","line":65,"updated":"2015-02-11 18:07:28.000000000","message":"Now we don\u0027t have conditional return. It is good.","commit_id":"ddf67e4a91c24ae2accb82ae61e1c86cafe55db1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"b2eee755984bb14c14e3c0e758801b0d1b777870","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      console.url,"},{"line_number":63,"context_line":"                      urlencode({\u0027title\u0027: getattr(instance, \"name\", \"\")}),"},{"line_number":64,"context_line":"                      instance.id)"},{"line_number":65,"context_line":"        return (con_type, console_url)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    raise exceptions.NotAvailable(_(\u0027No available console found.\u0027))"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_d1cafd4d","line":65,"in_reply_to":"da86d52c_886f86fb","updated":"2015-02-12 01:29:30.000000000","message":": )","commit_id":"ddf67e4a91c24ae2accb82ae61e1c86cafe55db1"}],"openstack_dashboard/dashboards/project/network_topology/views.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"9c3b8359a07dc7d298ccac1eff4bfce08b73dff9","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                        api_call(request, server.id)"},{"line_number":168,"context_line":"                        console \u003d c.lower()"},{"line_number":169,"context_line":"                        break"},{"line_number":170,"context_line":"                    except Exception:"},{"line_number":171,"context_line":"                        continue"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                console \u003d console_type.lower()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_91aac8d0","line":170,"updated":"2014-12-30 03:42:01.000000000","message":"In instance/console, httpnotimplemented is caught. Even though what we need here is a bit different, it is not a good idea to duplicate the logic. Could you share the logic between instance/console and here? For example we can share the logic to determine the supported console type.","commit_id":"c8d44bf8d596388bb07a83b25b0ede72d7d236fb"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"0607a8540f5441cea84d400c9d9f72fb843959e3","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                        api_call(request, server.id)"},{"line_number":168,"context_line":"                        console \u003d c.lower()"},{"line_number":169,"context_line":"                        break"},{"line_number":170,"context_line":"                    except Exception:"},{"line_number":171,"context_line":"                        continue"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                console \u003d console_type.lower()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_b1a8a421","line":170,"in_reply_to":"3a961159_91aac8d0","updated":"2014-12-30 05:36:51.000000000","message":"Done","commit_id":"c8d44bf8d596388bb07a83b25b0ede72d7d236fb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"9c3b8359a07dc7d298ccac1eff4bfce08b73dff9","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                        console \u003d c.lower()"},{"line_number":169,"context_line":"                        break"},{"line_number":170,"context_line":"                    except Exception:"},{"line_number":171,"context_line":"                        continue"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                console \u003d console_type.lower()"},{"line_number":174,"context_line":"            data.append({\u0027name\u0027: server.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_71947c8c","line":171,"updated":"2014-12-30 03:42:01.000000000","message":"If an exception occurs for all console types, \"console\" will be undefined. I think we need to handle the situation.","commit_id":"c8d44bf8d596388bb07a83b25b0ede72d7d236fb"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"0607a8540f5441cea84d400c9d9f72fb843959e3","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                        console \u003d c.lower()"},{"line_number":169,"context_line":"                        break"},{"line_number":170,"context_line":"                    except Exception:"},{"line_number":171,"context_line":"                        continue"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                console \u003d console_type.lower()"},{"line_number":174,"context_line":"            data.append({\u0027name\u0027: server.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d1a53048","line":171,"in_reply_to":"3a961159_71947c8c","updated":"2014-12-30 05:36:51.000000000","message":"Done","commit_id":"c8d44bf8d596388bb07a83b25b0ede72d7d236fb"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"5d0c82f843e089582d4cf86c236896f06bc48ffd","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                        LOG.debug(\u0027Console not available\u0027, exc_info\u003dTrue)"},{"line_number":185,"context_line":"                        continue"},{"line_number":186,"context_line":"            if (console_type \u003d\u003d \u0027VNC\u0027 or"},{"line_number":187,"context_line":"                    console_type \u003d\u003d \u0027SPICE\u0027 or console_type \u003d\u003d \u0027RDP\u0027):"},{"line_number":188,"context_line":"                console \u003d console_type.lower()"},{"line_number":189,"context_line":"            data.append({\u0027name\u0027: server.name,"},{"line_number":190,"context_line":"                         \u0027status\u0027: server.status,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_3fce3ab5","line":187,"updated":"2014-12-30 10:54:14.000000000","message":"Cleaner solution could be: if console_type in [\u0027VNC\u0027, \u0027SPICE\u0027, \u0027RDP\u0027]\n\nEven better if you initialize something like console_supported_types and then check if console_type is one of the following","commit_id":"7192e9d411cedfa9ffc1036d49952ee8d3ba3f05"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"28fc214abc050185858006ff92b4bb83e9588a46","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                        LOG.debug(\u0027Console not available\u0027, exc_info\u003dTrue)"},{"line_number":185,"context_line":"                        continue"},{"line_number":186,"context_line":"            if (console_type \u003d\u003d \u0027VNC\u0027 or"},{"line_number":187,"context_line":"                    console_type \u003d\u003d \u0027SPICE\u0027 or console_type \u003d\u003d \u0027RDP\u0027):"},{"line_number":188,"context_line":"                console \u003d console_type.lower()"},{"line_number":189,"context_line":"            data.append({\u0027name\u0027: server.name,"},{"line_number":190,"context_line":"                         \u0027status\u0027: server.status,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a4084f29","line":187,"in_reply_to":"3a961159_3fce3ab5","updated":"2014-12-31 02:54:48.000000000","message":"Done","commit_id":"7192e9d411cedfa9ffc1036d49952ee8d3ba3f05"},{"author":{"_account_id":11902,"name":"Randy Bertram","email":"rbertram@us.ibm.com","username":"rbertram"},"change_message_id":"cae8ad7cb5fc3909ce9c43abfe538ef5c07db7ce","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                    except Exception:"},{"line_number":184,"context_line":"                        LOG.debug(\u0027Console not available\u0027, exc_info\u003dTrue)"},{"line_number":185,"context_line":"                        continue"},{"line_number":186,"context_line":"            if console_type in [\u0027VNC\u0027, \u0027SPICE\u0027, \u0027RDP\u0027]:"},{"line_number":187,"context_line":"                console \u003d console_type.lower()"},{"line_number":188,"context_line":"            data.append({\u0027name\u0027: server.name,"},{"line_number":189,"context_line":"                         \u0027status\u0027: server.status,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_468933c9","line":186,"updated":"2015-01-05 23:23:57.000000000","message":"This should be:\n\nif console_type in i_console.CONSOLES:\n\nThis avoids duplicating code in instances/console.py.\n\nWith this change, this code will automatically work with the new serial console that is being introduced in https://review.openstack.org/#/c/144659/","commit_id":"7806efce56d663035e29eace02b10531fdd1e09d"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"660d83b7b9f6e69ebf734aaf0ecac6693b193655","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                    except Exception:"},{"line_number":184,"context_line":"                        LOG.debug(\u0027Console not available\u0027, exc_info\u003dTrue)"},{"line_number":185,"context_line":"                        continue"},{"line_number":186,"context_line":"            if console_type in [\u0027VNC\u0027, \u0027SPICE\u0027, \u0027RDP\u0027]:"},{"line_number":187,"context_line":"                console \u003d console_type.lower()"},{"line_number":188,"context_line":"            data.append({\u0027name\u0027: server.name,"},{"line_number":189,"context_line":"                         \u0027status\u0027: server.status,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_bb7e45e2","line":186,"in_reply_to":"3a961159_468933c9","updated":"2015-01-07 03:49:47.000000000","message":"Done","commit_id":"7806efce56d663035e29eace02b10531fdd1e09d"},{"author":{"_account_id":9622,"name":"Cindy Lu","email":"clu@us.ibm.com","username":"clu14"},"change_message_id":"dfe36fc63bfd80ae6cc76c0b63d3498ed0d40b78","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                        continue"},{"line_number":183,"context_line":"                    except Exception:"},{"line_number":184,"context_line":"                        LOG.debug(\u0027Console not available\u0027, exc_info\u003dTrue)"},{"line_number":185,"context_line":"                        continue"},{"line_number":186,"context_line":"            if console_type in i_console.CONSOLES:"},{"line_number":187,"context_line":"                console \u003d console_type.lower()"},{"line_number":188,"context_line":"            data.append({\u0027name\u0027: server.name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_648cfc35","line":185,"updated":"2015-01-09 02:20:49.000000000","message":"as randy mentioned, it would be great if we could reuse more of instances console code, even move it out somewhere like util?","commit_id":"9013e8686f8c03103b8fb124c7ad629a3a1e1c83"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"d697601dd3f40733f4913a97f2a8a41b6731a8b1","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                        continue"},{"line_number":183,"context_line":"                    except Exception:"},{"line_number":184,"context_line":"                        LOG.debug(\u0027Console not available\u0027, exc_info\u003dTrue)"},{"line_number":185,"context_line":"                        continue"},{"line_number":186,"context_line":"            if console_type in i_console.CONSOLES:"},{"line_number":187,"context_line":"                console \u003d console_type.lower()"},{"line_number":188,"context_line":"            data.append({\u0027name\u0027: server.name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_bfc42d92","line":185,"in_reply_to":"3a961159_648cfc35","updated":"2015-01-09 03:22:10.000000000","message":"Done","commit_id":"9013e8686f8c03103b8fb124c7ad629a3a1e1c83"},{"author":{"_account_id":9622,"name":"Cindy Lu","email":"clu@us.ibm.com","username":"clu14"},"change_message_id":"dc5580afc1dcc6756bb79e3a489e212f43069c1c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"#    under the License."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import json"},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from django.conf import settings"},{"line_number":23,"context_line":"from django.core.urlresolvers import reverse"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_94c6fd66","line":20,"updated":"2015-01-14 03:08:37.000000000","message":"unused","commit_id":"433ccccc5e0518a4cf28e00bd7ed22aa431be8a5"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"467129cb39b8fc976871446cdf519287d169d53b","unresolved":false,"context_lines":[{"line_number":17,"context_line":"#    under the License."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import json"},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from django.conf import settings"},{"line_number":23,"context_line":"from django.core.urlresolvers import reverse"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_dd38a9a1","line":20,"in_reply_to":"3a961159_94c6fd66","updated":"2015-01-14 05:52:14.000000000","message":"Done","commit_id":"433ccccc5e0518a4cf28e00bd7ed22aa431be8a5"},{"author":{"_account_id":9622,"name":"Cindy Lu","email":"clu@us.ibm.com","username":"clu14"},"change_message_id":"dc5580afc1dcc6756bb79e3a489e212f43069c1c","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    views as r_views"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class NTCreateRouterView(r_views.CreateView):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_d4b885ea","line":55,"updated":"2015-01-14 03:08:37.000000000","message":"unused","commit_id":"433ccccc5e0518a4cf28e00bd7ed22aa431be8a5"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"467129cb39b8fc976871446cdf519287d169d53b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    views as r_views"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class NTCreateRouterView(r_views.CreateView):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_bd359da9","line":55,"in_reply_to":"3a961159_d4b885ea","updated":"2015-01-14 05:52:14.000000000","message":"Done","commit_id":"433ccccc5e0518a4cf28e00bd7ed22aa431be8a5"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3b4b4652f00c11808614d7c96650a4f7b9a4a0fd","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            servers \u003d []"},{"line_number":161,"context_line":"        data \u003d []"},{"line_number":162,"context_line":"        for server in servers:"},{"line_number":163,"context_line":"            console_type \u003d getattr(settings, \u0027CONSOLE_TYPE\u0027, \u0027AUTO\u0027)"},{"line_number":164,"context_line":"            try:"},{"line_number":165,"context_line":"                console \u003d i_console.get_console("},{"line_number":166,"context_line":"                    request, console_type, server,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_e368b6f7","line":163,"updated":"2015-01-21 17:17:00.000000000","message":"It can be moved to outside of the loop.","commit_id":"4c595667a5b151b4af096fbb1430f742ae55ef5a"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"d57dc6e045d490f619cf587a8c4ed3db5108df35","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            servers \u003d []"},{"line_number":161,"context_line":"        data \u003d []"},{"line_number":162,"context_line":"        for server in servers:"},{"line_number":163,"context_line":"            console_type \u003d getattr(settings, \u0027CONSOLE_TYPE\u0027, \u0027AUTO\u0027)"},{"line_number":164,"context_line":"            try:"},{"line_number":165,"context_line":"                console \u003d i_console.get_console("},{"line_number":166,"context_line":"                    request, console_type, server,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_87261015","line":163,"in_reply_to":"1a930d6b_e368b6f7","updated":"2015-01-22 01:39:39.000000000","message":"Done","commit_id":"4c595667a5b151b4af096fbb1430f742ae55ef5a"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3b4b4652f00c11808614d7c96650a4f7b9a4a0fd","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            try:"},{"line_number":165,"context_line":"                console \u003d i_console.get_console("},{"line_number":166,"context_line":"                    request, console_type, server,"},{"line_number":167,"context_line":"                    return_console_type\u003dTrue)[0]"},{"line_number":168,"context_line":"            except exceptions.NotAvailable:"},{"line_number":169,"context_line":"                # Set default console to vnc"},{"line_number":170,"context_line":"                console \u003d \u0027vnc\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_c3ee5a8b","line":167,"updated":"2015-01-21 17:17:00.000000000","message":"As commented in instance.py, I prefer to converting to lower here.","commit_id":"4c595667a5b151b4af096fbb1430f742ae55ef5a"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"d57dc6e045d490f619cf587a8c4ed3db5108df35","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            try:"},{"line_number":165,"context_line":"                console \u003d i_console.get_console("},{"line_number":166,"context_line":"                    request, console_type, server,"},{"line_number":167,"context_line":"                    return_console_type\u003dTrue)[0]"},{"line_number":168,"context_line":"            except exceptions.NotAvailable:"},{"line_number":169,"context_line":"                # Set default console to vnc"},{"line_number":170,"context_line":"                console \u003d \u0027vnc\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_a76a2c18","line":167,"in_reply_to":"1a930d6b_c3ee5a8b","updated":"2015-01-22 01:39:39.000000000","message":"Done","commit_id":"4c595667a5b151b4af096fbb1430f742ae55ef5a"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3b4b4652f00c11808614d7c96650a4f7b9a4a0fd","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                    return_console_type\u003dTrue)[0]"},{"line_number":168,"context_line":"            except exceptions.NotAvailable:"},{"line_number":169,"context_line":"                # Set default console to vnc"},{"line_number":170,"context_line":"                console \u003d \u0027vnc\u0027"},{"line_number":171,"context_line":"            data.append({\u0027name\u0027: server.name,"},{"line_number":172,"context_line":"                         \u0027status\u0027: server.status,"},{"line_number":173,"context_line":"                         \u0027console\u0027: console,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_63ada631","line":170,"updated":"2015-01-21 17:17:00.000000000","message":"Is it an appropriate default value?\nIf CONSOLE_TYPE is AUTO, even though nova says no console is available, Horizon still tries VNC. It seems odd....","commit_id":"4c595667a5b151b4af096fbb1430f742ae55ef5a"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"d57dc6e045d490f619cf587a8c4ed3db5108df35","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                    return_console_type\u003dTrue)[0]"},{"line_number":168,"context_line":"            except exceptions.NotAvailable:"},{"line_number":169,"context_line":"                # Set default console to vnc"},{"line_number":170,"context_line":"                console \u003d \u0027vnc\u0027"},{"line_number":171,"context_line":"            data.append({\u0027name\u0027: server.name,"},{"line_number":172,"context_line":"                         \u0027status\u0027: server.status,"},{"line_number":173,"context_line":"                         \u0027console\u0027: console,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_8777f0d3","line":170,"in_reply_to":"1a930d6b_63ada631","updated":"2015-01-22 01:39:39.000000000","message":"will change to exceptions.handle in next patch.","commit_id":"4c595667a5b151b4af096fbb1430f742ae55ef5a"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4d7c80eecaa05f3b61153f440d1c89c37af98cc","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                console \u003d i_console.get_console("},{"line_number":168,"context_line":"                    request, console_type, server)[0].lower()"},{"line_number":169,"context_line":"            except exceptions.NotAvailable:"},{"line_number":170,"context_line":"                console \u003d \u0027vnc\u0027"},{"line_number":171,"context_line":"                exceptions.handle(request, _(\u0027No console available.\u0027))"},{"line_number":172,"context_line":"            data.append({\u0027name\u0027: server.name,"},{"line_number":173,"context_line":"                         \u0027status\u0027: server.status,"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_28ef7a88","line":170,"updated":"2015-02-11 18:07:28.000000000","message":"Just a question. If no console type is available, is it appropriate to set the console type to \"vnc\"? I wonder we should disable the console link instead. In my understanding, exception.handle() below does not terminate the processing and \"data\" will be returned at L.178, so \"vnc\" is still used even when NotAvailable is returned.","commit_id":"ddf67e4a91c24ae2accb82ae61e1c86cafe55db1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"b2eee755984bb14c14e3c0e758801b0d1b777870","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                console \u003d i_console.get_console("},{"line_number":168,"context_line":"                    request, console_type, server)[0].lower()"},{"line_number":169,"context_line":"            except exceptions.NotAvailable:"},{"line_number":170,"context_line":"                console \u003d \u0027vnc\u0027"},{"line_number":171,"context_line":"                exceptions.handle(request, _(\u0027No console available.\u0027))"},{"line_number":172,"context_line":"            data.append({\u0027name\u0027: server.name,"},{"line_number":173,"context_line":"                         \u0027status\u0027: server.status,"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_31a7d9a8","line":170,"in_reply_to":"da86d52c_28ef7a88","updated":"2015-02-12 01:29:30.000000000","message":"Make sense, Done","commit_id":"ddf67e4a91c24ae2accb82ae61e1c86cafe55db1"}]}
