diff options
author | Maru Newby <mnewby@internap.com> | 2012-03-12 23:19:16 -0700 |
---|---|---|
committer | Brian Waldon <bcwaldon@gmail.com> | 2012-03-13 10:09:12 -0700 |
commit | 0929e3a289af39fc38b46c4a55db06b8888e671e (patch) | |
tree | e7c90b6bfd014b06a4cc612b1c91e18a247e6111 /nova/context.py | |
parent | 094985ea657f590936906829486829846a558f05 (diff) | |
download | nova-0929e3a289af39fc38b46c4a55db06b8888e671e.tar.gz nova-0929e3a289af39fc38b46c4a55db06b8888e671e.tar.xz nova-0929e3a289af39fc38b46c4a55db06b8888e671e.zip |
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
Diffstat (limited to 'nova/context.py')
0 files changed, 0 insertions, 0 deletions