Comment 4 for bug 948286

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/5268
Committed: http://github.com/openstack/nova/commit/0929e3a289af39fc38b46c4a55db06b8888e671e
Submitter: Jenkins
Branch: master

commit 0929e3a289af39fc38b46c4a55db06b8888e671e
Author: Maru Newby <email address hidden>
Date: Mon Mar 12 23:19:16 2012 -0700

    Refactor glance id<->internal id conversion for s3

     * Moves nova.image.s3.S3ImageService functions for converting
       between glance ('image_uuid') and internal (db) ids to ec2utils:

           get_image_id => ec2utils.glance_id_to_id
           get_image_uuid => ec2utils.id_to_glance_id

     * Refactors ec2utils.glance_id_to_id to create a new S3Image
       object associating a glance id to an internal id if such a
       mapping does not already exist. Previously, only calls to
       nova.api.ec2.cloud.CloudController.describe_images would
       add new mappings, but now any attempt to convert a glance id
       to an internal id will succeed, resolving bug 948286.

     * Adds 2 convenience methods to ec2utils, as per bcwaldon:

           ec2_id_to_glance_id
           glance_id_to_ec2_id

     * Since this is a strict refactor and only streamlines existing
       well-tested functionality, this change includes no new tests.

    Change-Id: I810afe05223228df1bcc20a0ac688d8c62c472b4