)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2bf2673a2c9c029b1067153d14b7265072479551","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Since then an instance was booted with a flavor, the flavor could be"},{"line_number":10,"context_line":"deleted or become unavailable (private flavors). As a result novaclient"},{"line_number":11,"context_line":"fails to show the instance with memer role user."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch set adds handling of unavailable flavors to showing of"},{"line_number":14,"context_line":"instances as it is done for unavailable images."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9aa53dc9_cb962b94","line":11,"updated":"2015-04-06 22:11:26.000000000","message":"typo \"memer\"","commit_id":"addcb3b804f0d0a6860d114c630e48e54427f264"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"bf3e701b14fb62b8c5a23c4bb82b70f3e01e7a97","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Since then an instance was booted with a flavor, the flavor could be"},{"line_number":10,"context_line":"deleted or become unavailable (private flavors). As a result novaclient"},{"line_number":11,"context_line":"fails to show the instance with memer role user."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch set adds handling of unavailable flavors to showing of"},{"line_number":14,"context_line":"instances as it is done for unavailable images."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9aa53dc9_c44bb0af","line":11,"in_reply_to":"9aa53dc9_cb962b94","updated":"2015-04-07 08:38:02.000000000","message":"Done","commit_id":"addcb3b804f0d0a6860d114c630e48e54427f264"}],"novaclient/tests/unit/v2/fakes.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0020f86cc90faefdec5f7b93fe88a96bc9046747","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                \"name\": \"sample-server\","},{"line_number":255,"context_line":"                \"image\": {"},{"line_number":256,"context_line":"                    \"id\": 2,"},{"line_number":257,"context_line":"                    \"name\": \"sample image\","},{"line_number":258,"context_line":"                },"},{"line_number":259,"context_line":"                \"flavor\": {"},{"line_number":260,"context_line":"                    \"id\": 1,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_5e62e4d9","side":"PARENT","line":257,"updated":"2015-04-06 16:08:07.000000000","message":"I don\u0027t understand why you\u0027re removing these pieces.  You should be able to create your new test by just adding a single server to the list that is missing the flavor (and image) name.","commit_id":"3681c186f784b0b64f871050a0dfdb3b1bed37b8"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"34b7f028528150fe8f1f1eb4e1e1571caee77c52","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                \"name\": \"sample-server\","},{"line_number":255,"context_line":"                \"image\": {"},{"line_number":256,"context_line":"                    \"id\": 2,"},{"line_number":257,"context_line":"                    \"name\": \"sample image\","},{"line_number":258,"context_line":"                },"},{"line_number":259,"context_line":"                \"flavor\": {"},{"line_number":260,"context_line":"                    \"id\": 1,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_e0f7cef3","side":"PARENT","line":257,"in_reply_to":"9aa53dc9_14fe786b","updated":"2015-04-07 08:28:06.000000000","message":"Done","commit_id":"3681c186f784b0b64f871050a0dfdb3b1bed37b8"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"049fe21e212f081292ec3e32673f0b7d9bd54570","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                \"name\": \"sample-server\","},{"line_number":255,"context_line":"                \"image\": {"},{"line_number":256,"context_line":"                    \"id\": 2,"},{"line_number":257,"context_line":"                    \"name\": \"sample image\","},{"line_number":258,"context_line":"                },"},{"line_number":259,"context_line":"                \"flavor\": {"},{"line_number":260,"context_line":"                    \"id\": 1,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_5e76643f","side":"PARENT","line":257,"in_reply_to":"9aa53dc9_5e62e4d9","updated":"2015-04-06 16:18:35.000000000","message":"Nova doesn\u0027t return names for instance\u0027s images and flavors.\n\nThis is just cleaning, it\u0027s not needed for the new test (which uses a separate fake instance).","commit_id":"3681c186f784b0b64f871050a0dfdb3b1bed37b8"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"e40135e45b78f020beda57310996d8df5d3b367b","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                \"name\": \"sample-server\","},{"line_number":255,"context_line":"                \"image\": {"},{"line_number":256,"context_line":"                    \"id\": 2,"},{"line_number":257,"context_line":"                    \"name\": \"sample image\","},{"line_number":258,"context_line":"                },"},{"line_number":259,"context_line":"                \"flavor\": {"},{"line_number":260,"context_line":"                    \"id\": 1,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_14fe786b","side":"PARENT","line":257,"in_reply_to":"9aa53dc9_5e76643f","updated":"2015-04-06 19:03:28.000000000","message":"Ah, I see.  I\u0027d prefer you do this cleanup to a separate patch, though.  If you insist on leaving it in this patch, at least add an explanation to your commit message.","commit_id":"3681c186f784b0b64f871050a0dfdb3b1bed37b8"}],"novaclient/v2/shell.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2bf2673a2c9c029b1067153d14b7265072479551","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"        try:"},{"line_number":1834,"context_line":"            info[\u0027flavor\u0027] \u003d \u0027%s (%s)\u0027 % (_find_flavor(cs, flavor_id).name,"},{"line_number":1835,"context_line":"                                          flavor_id)"},{"line_number":1836,"context_line":"        except Exception:"},{"line_number":1837,"context_line":"            info[\u0027flavor\u0027] \u003d \u0027%s (%s)\u0027 % (_(\"Flavor not found\"), flavor_id)"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    if \u0027security_groups\u0027 in info:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_cb13cb5b","line":1836,"updated":"2015-04-06 22:11:26.000000000","message":"I think this should catch exceptions.NotFound instead","commit_id":"addcb3b804f0d0a6860d114c630e48e54427f264"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"bf3e701b14fb62b8c5a23c4bb82b70f3e01e7a97","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"        try:"},{"line_number":1834,"context_line":"            info[\u0027flavor\u0027] \u003d \u0027%s (%s)\u0027 % (_find_flavor(cs, flavor_id).name,"},{"line_number":1835,"context_line":"                                          flavor_id)"},{"line_number":1836,"context_line":"        except Exception:"},{"line_number":1837,"context_line":"            info[\u0027flavor\u0027] \u003d \u0027%s (%s)\u0027 % (_(\"Flavor not found\"), flavor_id)"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    if \u0027security_groups\u0027 in info:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_2fcb5555","line":1836,"in_reply_to":"9aa53dc9_06cacaa1","updated":"2015-04-07 08:38:02.000000000","message":"It\u0027s unexpected for me too. Thus it seems that to make such handlers clearer more deep refactoring is needed. I.e. introduce a new CommandErrorNotFound exception and use it, or add a boolean parameter to find_resource to get a desired exception kind (i.e. native_exceptions or internal_request).","commit_id":"addcb3b804f0d0a6860d114c630e48e54427f264"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4aac44271977b82ec2a849857a2b3887f30c9c50","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"        try:"},{"line_number":1834,"context_line":"            info[\u0027flavor\u0027] \u003d \u0027%s (%s)\u0027 % (_find_flavor(cs, flavor_id).name,"},{"line_number":1835,"context_line":"                                          flavor_id)"},{"line_number":1836,"context_line":"        except Exception:"},{"line_number":1837,"context_line":"            info[\u0027flavor\u0027] \u003d \u0027%s (%s)\u0027 % (_(\"Flavor not found\"), flavor_id)"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    if \u0027security_groups\u0027 in info:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_0cabe81e","line":1836,"in_reply_to":"9aa53dc9_2fcb5555","updated":"2015-04-07 15:56:10.000000000","message":"Or refactor with a policy of only allowing CommandError to be raised by do_*() functions…","commit_id":"addcb3b804f0d0a6860d114c630e48e54427f264"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2371a02f9c5154255f9a8fe4ef15ea940be7b8bf","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"        try:"},{"line_number":1834,"context_line":"            info[\u0027flavor\u0027] \u003d \u0027%s (%s)\u0027 % (_find_flavor(cs, flavor_id).name,"},{"line_number":1835,"context_line":"                                          flavor_id)"},{"line_number":1836,"context_line":"        except Exception:"},{"line_number":1837,"context_line":"            info[\u0027flavor\u0027] \u003d \u0027%s (%s)\u0027 % (_(\"Flavor not found\"), flavor_id)"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    if \u0027security_groups\u0027 in info:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_06cacaa1","line":1836,"in_reply_to":"9aa53dc9_abdac776","updated":"2015-04-06 23:12:31.000000000","message":"Hm, good eye, I didn\u0027t notice the image find was catching all (and also not logging the exception).\n\nThe code on L1855 made me concerned so I did a test in devstack, and it turns out the exception that comes through here is actually exceptions.CommandError, in novaclient/utils.py exceptions.NotFound is caught and then exceptions.CommandError is raised.\n\nTraceback (most recent call last):\n  File \"/home/vagrant/python-novaclient/novaclient/shell.py\", line 911, in main\n    OpenStackComputeShell().main(argv)\n  File \"/home/vagrant/python-novaclient/novaclient/shell.py\", line 838, in main\n    args.func(self.cs, args)\n  File \"/home/vagrant/python-novaclient/novaclient/v2/shell.py\", line 1872, in do_show\n    _print_server(cs, args)\n  File \"/home/vagrant/python-novaclient/novaclient/v2/shell.py\", line 1850, in _print_server\n    info[\u0027image\u0027] \u003d \u0027%s (%s)\u0027 % (_find_image(cs, image_id).name,\n  File \"/home/vagrant/python-novaclient/novaclient/v2/shell.py\", line 1900, in _find_image\n    return utils.find_resource(cs.images, image)\n  File \"/home/vagrant/python-novaclient/novaclient/utils.py\", line 227, in find_resource\n    raise exceptions.CommandError(msg)","commit_id":"addcb3b804f0d0a6860d114c630e48e54427f264"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"8f1097f02b5f3e219a2d8955a447e5fbe70dd8ee","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"        try:"},{"line_number":1834,"context_line":"            info[\u0027flavor\u0027] \u003d \u0027%s (%s)\u0027 % (_find_flavor(cs, flavor_id).name,"},{"line_number":1835,"context_line":"                                          flavor_id)"},{"line_number":1836,"context_line":"        except Exception:"},{"line_number":1837,"context_line":"            info[\u0027flavor\u0027] \u003d \u0027%s (%s)\u0027 % (_(\"Flavor not found\"), flavor_id)"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    if \u0027security_groups\u0027 in info:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_abdac776","line":1836,"in_reply_to":"9aa53dc9_cb13cb5b","updated":"2015-04-06 22:14:54.000000000","message":"should i change this for images as well (see line 1855)?","commit_id":"addcb3b804f0d0a6860d114c630e48e54427f264"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"8f1097f02b5f3e219a2d8955a447e5fbe70dd8ee","unresolved":false,"context_lines":[{"line_number":1851,"context_line":"        else:"},{"line_number":1852,"context_line":"            try:"},{"line_number":1853,"context_line":"                info[\u0027image\u0027] \u003d \u0027%s (%s)\u0027 % (_find_image(cs, image_id).name,"},{"line_number":1854,"context_line":"                                             image_id)"},{"line_number":1855,"context_line":"            except Exception:"},{"line_number":1856,"context_line":"                info[\u0027image\u0027] \u003d \u0027%s (%s)\u0027 % (_(\"Image not found\"), image_id)"},{"line_number":1857,"context_line":"    else:  # Booted from volume"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_ebce8fb3","line":1854,"updated":"2015-04-06 22:14:54.000000000","message":"\"not found\" handler for images","commit_id":"addcb3b804f0d0a6860d114c630e48e54427f264"}]}
