)]}'
{"novaclient/base.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"98c5581e579f5dbd1b0e643f84464c57c17381a3","unresolved":false,"context_lines":[{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def _get(self, url, response_key):"},{"line_number":346,"context_line":"        resp, body \u003d self.api.client.get(url)"},{"line_number":347,"context_line":"        if response_key is not None:"},{"line_number":348,"context_line":"            content \u003d body[response_key]"},{"line_number":349,"context_line":"        else:"},{"line_number":350,"context_line":"            content \u003d body"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_afd47deb","line":347,"updated":"2016-08-11 20:08:31.000000000","message":"nit: we might want to add a comment that not all responses have the wrapped body (like in the case of glance) - not sure if we want to obfuscate that or not though. I just get the feeling I\u0027ll forget why we have this in a year from now.","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"}],"novaclient/tests/unit/fakes.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"bd5c2e2e89d454064bba030d4483d3a769a0ffcf","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        called \u003d self.client.callstack[pos][0:2]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        assert expected \u003d\u003d called, \\"},{"line_number":88,"context_line":"            (\u0027\\nExpected: %(expected)s\u0027"},{"line_number":89,"context_line":"             \u0027\\nActual: %(called)s\u0027"},{"line_number":90,"context_line":"             \u0027\\nCall position: %(pos)s\u0027"},{"line_number":91,"context_line":"             \u0027\\nCalls:\\n%(calls)s\u0027 %"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_f4239203","line":88,"range":{"start_line":88,"start_character":12,"end_line":88,"end_character":13},"updated":"2016-08-15 18:11:22.000000000","message":"attonit: this parenthesis could be moved to the end of line 87, which would allow eliminating the backslash continuation :)","commit_id":"f839cf1625714c2e159631c56560d9d92eb9964f"}],"novaclient/v2/images.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"98c5581e579f5dbd1b0e643f84464c57c17381a3","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                num_matches \u003d len(matches)"},{"line_number":72,"context_line":"                if num_matches \u003d\u003d 0:"},{"line_number":73,"context_line":"                    msg \u003d \"No %s matching %s.\" % ("},{"line_number":74,"context_line":"                        self.resource_class.__name__, name_or_id)"},{"line_number":75,"context_line":"                    raise exceptions.NotFound(404, msg)"},{"line_number":76,"context_line":"                elif num_matches \u003e 1:"},{"line_number":77,"context_line":"                    raise exceptions.NoUniqueMatch"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_4fad019a","line":74,"range":{"start_line":74,"start_character":24,"end_line":74,"end_character":52},"updated":"2016-08-11 20:08:31.000000000","message":"nit: might want to add a .lower() to this like how utils.find_resource does it.","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"98c5581e579f5dbd1b0e643f84464c57c17381a3","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                        self.resource_class.__name__, name_or_id)"},{"line_number":75,"context_line":"                    raise exceptions.NotFound(404, msg)"},{"line_number":76,"context_line":"                elif num_matches \u003e 1:"},{"line_number":77,"context_line":"                    raise exceptions.NoUniqueMatch"},{"line_number":78,"context_line":"                else:"},{"line_number":79,"context_line":"                    matches[0].append_request_ids(matches.request_ids)"},{"line_number":80,"context_line":"                    return matches[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_af98fd78","line":77,"updated":"2016-08-11 20:08:31.000000000","message":"I think this is probably supposed to be a CommandError, like how utils.find_resource works. Probably just want to copy that.\n\n        msg \u003d (_(\"Multiple %(class)s matches found for \u0027%(name)s\u0027, use an ID \"\n                 \"to be more specific.\") %\n               {\u0027class\u0027: self.resource_class.__name__.lower(),\n                \u0027name\u0027: name_or_id})\n        raise exceptions.CommandError(msg)\n\nAlternatively we could make GlanceManager extend ManagerWithFind and then just pass ManagerManager to utils.find_resource, but that maybe gets gorpier than we want.","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e87de134d38ab88ca29ce6a82313f8e4db512bb1","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                        self.resource_class.__name__, name_or_id)"},{"line_number":75,"context_line":"                    raise exceptions.NotFound(404, msg)"},{"line_number":76,"context_line":"                elif num_matches \u003e 1:"},{"line_number":77,"context_line":"                    raise exceptions.NoUniqueMatch"},{"line_number":78,"context_line":"                else:"},{"line_number":79,"context_line":"                    matches[0].append_request_ids(matches.request_ids)"},{"line_number":80,"context_line":"                    return matches[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_ed4cb39f","line":77,"in_reply_to":"9ad45d7e_2d824bc8","updated":"2016-08-12 00:32:55.000000000","message":"I\u0027ve already addressed this one w/o find_resource. The major problem with this patch now is the unit test problems with the FakeHTTPClient and the assumption that you can show or use an image with just an int id.","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"f87de79b2b514f08b2168660da07fdd00ac57675","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                        self.resource_class.__name__, name_or_id)"},{"line_number":75,"context_line":"                    raise exceptions.NotFound(404, msg)"},{"line_number":76,"context_line":"                elif num_matches \u003e 1:"},{"line_number":77,"context_line":"                    raise exceptions.NoUniqueMatch"},{"line_number":78,"context_line":"                else:"},{"line_number":79,"context_line":"                    matches[0].append_request_ids(matches.request_ids)"},{"line_number":80,"context_line":"                    return matches[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_2d824bc8","line":77,"in_reply_to":"9ad45d7e_af98fd78","updated":"2016-08-12 00:26:31.000000000","message":"yeh, after looking at find_resource, I wanted to completely avoid it. I think only about 1/2 of those branches do anything any more, so it\u0027s just a giant rats nest.","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"bd5c2e2e89d454064bba030d4483d3a769a0ffcf","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This is used to do name to id lookups for images. Do not use it"},{"line_number":52,"context_line":"    for anything else besides that. You have been warned."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    \"\"\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    resource_class \u003d Image"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_d4e8167f","line":53,"updated":"2016-08-15 18:11:22.000000000","message":"attonit: the blank line here isn\u0027t necessary anymore; it was included in pep8 for the benefit of developers using emacs, but emacs can now deal with docstrings without needing the blank line.","commit_id":"f839cf1625714c2e159631c56560d9d92eb9964f"}],"novaclient/v2/shell.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32afc33ffb6c380588a6fa54c7a7bcb8345045ce","unresolved":false,"context_lines":[{"line_number":1274,"context_line":"    info \u003d image._info.copy()"},{"line_number":1275,"context_line":""},{"line_number":1276,"context_line":"    # ignore links, we don\u0027t need to present those"},{"line_number":1277,"context_line":"    info.pop(\u0027links\u0027)"},{"line_number":1278,"context_line":""},{"line_number":1279,"context_line":"    # try to replace a server entity to just an id"},{"line_number":1280,"context_line":"    server \u003d info.pop(\u0027server\u0027, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_ca455f43","line":1277,"updated":"2016-08-11 20:15:52.000000000","message":"This blows up when doing \u0027nova image-show\u0027:\n\nTraceback (most recent call last):\n  File \"/opt/stack/python-novaclient/novaclient/shell.py\", line 982, in main\n    OpenStackComputeShell().main(argv)\n  File \"/opt/stack/python-novaclient/novaclient/shell.py\", line 909, in main\n    args.func(self.cs, args)\n  File \"/opt/stack/python-novaclient/novaclient/v2/shell.py\", line 1314, in do_image_show\n    _print_image(image)\n  File \"/opt/stack/python-novaclient/novaclient/v2/shell.py\", line 1277, in _print_image\n    info.pop(\u0027links\u0027)\nKeyError: \u0027links\u0027\nERROR (KeyError): \u0027links\u0027","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d615e2ecd2303702ec4d8a347290285383c9c95","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"        pass"},{"line_number":1285,"context_line":""},{"line_number":1286,"context_line":"    # break up metadata and display each on its own row"},{"line_number":1287,"context_line":"    metadata \u003d info.pop(\u0027metadata\u0027, {})"},{"line_number":1288,"context_line":"    try:"},{"line_number":1289,"context_line":"        for key, value in metadata.items():"},{"line_number":1290,"context_line":"            _key \u003d \u0027metadata %s\u0027 % key"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_c4c39336","line":1287,"updated":"2016-08-11 21:30:03.000000000","message":"With a v2 image API response this won\u0027t ever have metadata in it since it\u0027s all flattened in the image as custom properties. This won\u0027t actually fail, but would be a behavior change as we\u0027d stop showing any metadata details for the image. But then again if you\u0027re getting this far you\u0027re using \u0027nova image-show\u0027 which is deprecated...","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea0d1a9060b411965fab4ca2fc310fb3862a2de7","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"        pass"},{"line_number":1285,"context_line":""},{"line_number":1286,"context_line":"    # break up metadata and display each on its own row"},{"line_number":1287,"context_line":"    metadata \u003d info.pop(\u0027metadata\u0027, {})"},{"line_number":1288,"context_line":"    try:"},{"line_number":1289,"context_line":"        for key, value in metadata.items():"},{"line_number":1290,"context_line":"            _key \u003d \u0027metadata %s\u0027 % key"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_67ad89e8","line":1287,"in_reply_to":"9ad45d7e_c4c39336","updated":"2016-08-11 21:36:38.000000000","message":"Oh nvm, this is actually going to work just fine because this is doing the metadata flattening for glance v1, but with glance v2 we\u0027ll just have this already, so yay.","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ab0d263844ed6285f21ea39a1f9cd7ffc699a53","unresolved":false,"context_lines":[{"line_number":2080,"context_line":"    image_uuid \u003d cs.servers.create_image(server, args.name, meta)"},{"line_number":2081,"context_line":""},{"line_number":2082,"context_line":"    if args.poll:"},{"line_number":2083,"context_line":"        _poll_for_status(cs.images.get, image_uuid, \u0027snapshotting\u0027,"},{"line_number":2084,"context_line":"                         [\u0027active\u0027])"},{"line_number":2085,"context_line":""},{"line_number":2086,"context_line":"        # NOTE(sirp):  A race-condition exists between when the image finishes"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_2aecfb28","line":2083,"range":{"start_line":2083,"start_character":25,"end_line":2083,"end_character":38},"updated":"2016-08-11 20:19:28.000000000","message":"Hmm, we should try to use _find_image here.","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ab0d263844ed6285f21ea39a1f9cd7ffc699a53","unresolved":false,"context_lines":[{"line_number":2099,"context_line":"                             show_progress\u003dFalse, silent\u003dTrue)"},{"line_number":2100,"context_line":""},{"line_number":2101,"context_line":"    if args.show:"},{"line_number":2102,"context_line":"        _print_image(cs.images.get(image_uuid))"},{"line_number":2103,"context_line":""},{"line_number":2104,"context_line":""},{"line_number":2105,"context_line":"@utils.arg(\u0027server\u0027, metavar\u003d\u0027\u003cserver\u003e\u0027, help\u003d_(\u0027Name or ID of server.\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_4af5efea","line":2102,"range":{"start_line":2102,"start_character":21,"end_line":2102,"end_character":34},"updated":"2016-08-11 20:19:28.000000000","message":"ditto","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dbf4446b960423a42caccc7ccddc0974898bf374","unresolved":false,"context_lines":[{"line_number":2253,"context_line":""},{"line_number":2254,"context_line":"def _find_image(cs, image):"},{"line_number":2255,"context_line":"    \"\"\"Get an image by name or ID.\"\"\""},{"line_number":2256,"context_line":"    return cs.glance.find_image(image)"},{"line_number":2257,"context_line":""},{"line_number":2258,"context_line":""},{"line_number":2259,"context_line":"def _find_flavor(cs, flavor):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_73dee2dd","line":2256,"updated":"2016-08-12 01:25:43.000000000","message":"So another problem with this is going to be things like \u0027nova image-show\u0027 expect the nova v1 image proxy form of things...so changing to image v2 under the covers may break how this works, at least behavior wise. I\u0027m noticing some of this with the unit test changes. I\u0027m not totally sure how much it\u0027s going to mess with things...maybe not at all, as long as the things using this are just looking up the image to get the id, but I\u0027m sure we don\u0027t have full functional test coverage of the image API proxies in here.\n\nWe could isolate this a bit more to just the places that need the id, like nova boot...but I guess let\u0027s see how this pans out. The unit test changes suck though.","commit_id":"1d299fae1bbe4086fe709f2e9bc7806c2689fe43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b38c1c48650907b5254e10648c49916f48126caf","unresolved":false,"context_lines":[{"line_number":2258,"context_line":"    \"\"\"Get an image by name or ID.\"\"\""},{"line_number":2259,"context_line":"    try:"},{"line_number":2260,"context_line":"        return cs.glance.find_image(image)"},{"line_number":2261,"context_line":"    except exceptions.NoUniqueMatch as e:"},{"line_number":2262,"context_line":"        raise exceptions.CommandError(six.text_type(e))"},{"line_number":2263,"context_line":""},{"line_number":2264,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_ec80fe8d","line":2261,"updated":"2016-08-12 19:42:06.000000000","message":"We should probably also handle NotFound here.","commit_id":"0f7a5db75b2ac62a57e007d8ec97cb7e6aa947de"}]}
