Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
3 changed files
with
46 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters