)]}'
{"openstackclient/compute/v2/server.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5cdfde0f3a4a36fa86edc7ae024539205bb2e959","unresolved":false,"context_lines":[{"line_number":782,"context_line":"        }"},{"line_number":783,"context_line":"        LOG.debug(\u0027search options: %s\u0027, search_opts)"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"        if parsed_args.long:"},{"line_number":786,"context_line":"            columns \u003d ("},{"line_number":787,"context_line":"                \u0027ID\u0027,"},{"line_number":788,"context_line":"                \u0027Name\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_9e5dc949","line":785,"range":{"start_line":785,"start_character":8,"end_line":785,"end_character":28},"updated":"2016-07-05 22:56:24.000000000","message":"we would also want the image to be included in the \"long\" since it\u0027s a logical superset of the regular output","commit_id":"aebb7d0dd31293a7aa53220d7030cfb3a351e278"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"dd107de3ea5162f67ed3c24b5ed2a0576b15bf5f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        return \u0027N/A\u0027"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"def _get_image_name(compute_client, image_dict):"},{"line_number":84,"context_line":"    if \u0027id\u0027 not in image_dict:"},{"line_number":85,"context_line":"        return \u0027\u0027"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    return utils.find_resource(compute_client.images,"},{"line_number":88,"context_line":"                               image_dict[\u0027id\u0027]).name"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_2ff58156","line":85,"range":{"start_line":83,"start_character":0,"end_line":85,"end_character":17},"updated":"2016-07-06 00:59:31.000000000","message":"we do similar stuff in osc already, we typically create a naive cache that is stored in the take_action call. Just call images.list() and save the results\n\nthen when you are getting the image name you can grab it from the local dict, instead of making a call for every server you list, especially since, i\u0027m assuming, many will have the same image id?\n\nhttps://github.com/openstack/python-openstackclient/blob/30bcaebd000ce4e7c79516de1f48fdbdd46332bd/openstackclient/volume/v2/volume.py#L280-L287","commit_id":"ea3aa4eefd408a6cfb30e460acd768efe4a65d1a"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"dd107de3ea5162f67ed3c24b5ed2a0576b15bf5f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    if \u0027id\u0027 not in image_dict:"},{"line_number":85,"context_line":"        return \u0027\u0027"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    return utils.find_resource(compute_client.images,"},{"line_number":88,"context_line":"                               image_dict[\u0027id\u0027]).name"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_ef725910","line":87,"range":{"start_line":87,"start_character":31,"end_line":87,"end_character":45},"updated":"2016-07-06 00:59:31.000000000","message":"do we want to use the compute_client or image_client here? we should probably call glance instead of nova, i would think.\n\nyeah, it\u0027s deprecated: https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/images.py#L16","commit_id":"ea3aa4eefd408a6cfb30e460acd768efe4a65d1a"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cc8823b8708553b21a6e298d378b33775b2c4b97","unresolved":false,"context_lines":[{"line_number":828,"context_line":"                                           limit\u003dparsed_args.limit)"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"        images \u003d {}"},{"line_number":831,"context_line":"        for i in self.app.client_manager.image.images.list():"},{"line_number":832,"context_line":"            images[i.id] \u003d i"},{"line_number":833,"context_line":""},{"line_number":834,"context_line":"        for s in data:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_e84eb36d","line":831,"range":{"start_line":831,"start_character":8,"end_line":831,"end_character":61},"updated":"2016-07-06 13:30:23.000000000","message":"may want to do a try/except around this, in case the user doesn\u0027t have permission to run this command, and just pass if any exception happens","commit_id":"017be43e1453f859f87744c3793e13a7b45c0cce"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cc8823b8708553b21a6e298d378b33775b2c4b97","unresolved":false,"context_lines":[{"line_number":833,"context_line":""},{"line_number":834,"context_line":"        for s in data:"},{"line_number":835,"context_line":"            if \u0027id\u0027 in s.image:"},{"line_number":836,"context_line":"                s.image_name \u003d images.get(s.image[\u0027id\u0027]).name"},{"line_number":837,"context_line":"                s.image_id \u003d s.image[\u0027id\u0027]"},{"line_number":838,"context_line":"            else:"},{"line_number":839,"context_line":"                s.image_name \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_68df6369","line":836,"range":{"start_line":836,"start_character":31,"end_line":836,"end_character":56},"updated":"2016-07-06 13:30:23.000000000","message":"i think you want to check if the server image is in the images list (the image could be private in glance v2) before doing this, since you may get a None back here and call .name on a None.","commit_id":"017be43e1453f859f87744c3793e13a7b45c0cce"}]}
