support restore image from volume

Registered by wanghong on 2014-03-25

Now, we can create a volume from an image and also can create a new image from the volume. However, the new image just can have several properties such as name, disk_format, container_format. It will be useful that we can supply the properties that need to be restored from the original image. The API might be like this:

    URI: /volumes/<volume_id>/action
    Request body: JSON
        {
            "os-volume_upload_image": {
                "force": true,
                "restore_properties": ["container_format", "disk_format", "visibility", ...]
                "image_name": new_image
            }
        }

If users want to regenerate some properties of the image, they can supply them in the request body.
These supplied properties will recover the properties in the "restore_properties" parameter. An API example:
    URI: /volumes/<volume_id>/action
    Request body: JSON
        {
            "os-volume_upload_image": {
                "force": true,
                "restore_properties": ["visibility", ...]
                "image_name": new_image,
                "container_format": "bare",
                "disk_format": "vdi"
            }
        }

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
wanghong
Direction:
Needs approval
Assignee:
wanghong
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Sean McGinnis on 2015-10-18

Related branches

Sprints

Whiteboard

(smcginnis): Marking obsolete as this has been sitting out there for a long time. If this is still needed, please submit a new bp.

Some metadata (like container format, size) can change between download and upload (e.g. We can source from QCOW but always upload raw). These fields will need processing.
-- DuncanT

Yes, I have updated the description.
--wanghong

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.