)]}'
{"openstack_dashboard/api/nova.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"c578737f8c70ab4a9faa268171d934f81ecd1c2a","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"@profiler.trace"},{"line_number":287,"context_line":"def server_vnc_console(request, instance_id, console_type\u003d\u0027novnc\u0027):"},{"line_number":288,"context_line":"    return VNCConsole(novaclient(request).servers.get_vnc_console("},{"line_number":289,"context_line":"        instance_id, console_type)[_get_console_key(request)])"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_e3048e4c","line":288,"range":{"start_line":288,"start_character":22,"end_line":288,"end_character":41},"updated":"2017-11-14 17:40:10.000000000","message":"This means you use the default API version (i.e., 2.0). With API version 2.0, the response contains \u0027console\u0027, so I am afraid the next line will fail.\n\nYou need to pass the requested version to novaclient() function like:\n\n  ver \u003d get_microversion(request, \u0027server_remote_consoles\u0027)\n  client \u003d novaclient(request, version\u003dver)\n  console_info \u003d client.servers.get_vnc_console(instance_id, console_type)\n  console_key \u003d \u0027remote_console\u0027 if ver else \u0027console\u0027\n  return VNCConsole(console_info[console_key])","commit_id":"a95cca80d967ec7dcb6fcda0e028f76afc3fa5fc"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fbf312b8efa35a5e898bb3230b857cb3a54060e8","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"@profiler.trace"},{"line_number":287,"context_line":"def server_vnc_console(request, instance_id, console_type\u003d\u0027novnc\u0027):"},{"line_number":288,"context_line":"    return VNCConsole(novaclient(request).servers.get_vnc_console("},{"line_number":289,"context_line":"        instance_id, console_type)[_get_console_key(request)])"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_bedd7243","line":288,"range":{"start_line":288,"start_character":22,"end_line":288,"end_character":41},"in_reply_to":"1f485f77_152fce3f","updated":"2017-11-15 09:59:57.000000000","message":"First of all, is_feature_available() just checks if micro-versions specified in MICROVERSION_FEATURES is available in API version range returned by Nova.\nThus, is_feature_available() does not check the requested feature is available in an API version specified in OPENSTACK_API_VERSION.\n\nIn this case, is_feature_available() returns True if at least one of version 2.6 or 2.53 is included in the support version range.\nI think this is a reason we are not in the same page.\n\nThe following is the detail of a case where an error happens.\nAssume the horizon default settings of OPENSTACK_API_VERSION (no specific setting).\nIn this case, the default Nova version is 2.\nNova returns API version range from 2.1 to 2.53 (latest), so is_feature_available(\u0027server_remote_console\u0027) returns True and _get_console_key() returns \u0027remote_console\u0027.\nOn the other hand, novaclient(request) returns nova client object with version 2.1 (\u003d 2.0)\nand get_vnc_console() returns {\u0027console\u0027: {....}}.\nThis does not match a key returned by _get_console_key(), so it fails.\nThis is the scenario I mentioned in the last comment above.","commit_id":"a95cca80d967ec7dcb6fcda0e028f76afc3fa5fc"},{"author":{"_account_id":3031,"name":"Sam Morrison","email":"sorrison@gmail.com","username":"sorrison"},"change_message_id":"495a468d0c54d2786c64b47c03abcc02162a3739","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"@profiler.trace"},{"line_number":287,"context_line":"def server_vnc_console(request, instance_id, console_type\u003d\u0027novnc\u0027):"},{"line_number":288,"context_line":"    return VNCConsole(novaclient(request).servers.get_vnc_console("},{"line_number":289,"context_line":"        instance_id, console_type)[_get_console_key(request)])"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_45a33cb3","line":288,"range":{"start_line":288,"start_character":22,"end_line":288,"end_character":41},"in_reply_to":"1f485f77_beab3287","updated":"2017-11-15 22:05:31.000000000","message":"Ah ok, thanks for explaining. I\u0027ll fix it up as you suggested. Cheers!","commit_id":"a95cca80d967ec7dcb6fcda0e028f76afc3fa5fc"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ddc9a534a18571280c86dc79582f0d2f38b37e60","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"@profiler.trace"},{"line_number":287,"context_line":"def server_vnc_console(request, instance_id, console_type\u003d\u0027novnc\u0027):"},{"line_number":288,"context_line":"    return VNCConsole(novaclient(request).servers.get_vnc_console("},{"line_number":289,"context_line":"        instance_id, console_type)[_get_console_key(request)])"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_beab3287","line":288,"range":{"start_line":288,"start_character":22,"end_line":288,"end_character":41},"in_reply_to":"1f485f77_bedd7243","updated":"2017-11-15 10:01:18.000000000","message":"After applying this patch with the default horizon configuration without OPENSTACK_API_VERSION), I could not open a console.\n\nI think you assume an environment with OPENSTACK_API_VERSION, but you need to consider the default setting case.","commit_id":"a95cca80d967ec7dcb6fcda0e028f76afc3fa5fc"},{"author":{"_account_id":3031,"name":"Sam Morrison","email":"sorrison@gmail.com","username":"sorrison"},"change_message_id":"998b6f74dde65d000c9defb99cce9c12458d3c17","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"@profiler.trace"},{"line_number":287,"context_line":"def server_vnc_console(request, instance_id, console_type\u003d\u0027novnc\u0027):"},{"line_number":288,"context_line":"    return VNCConsole(novaclient(request).servers.get_vnc_console("},{"line_number":289,"context_line":"        instance_id, console_type)[_get_console_key(request)])"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_152fce3f","line":288,"range":{"start_line":288,"start_character":22,"end_line":288,"end_character":41},"in_reply_to":"1f485f77_e3048e4c","updated":"2017-11-15 02:44:47.000000000","message":"We don\u0027t want to override what the operator sets as the nova version under OPENSTACK_API_VERSIONS\n\nIf they don\u0027t override it they will get the default which is 2.0 and will still work.\n\nCan you explain which line will fail and why?","commit_id":"a95cca80d967ec7dcb6fcda0e028f76afc3fa5fc"}]}
