Bug 1041223

Summary: [RFE][nova]: add delete_on_termination option for attaching volume to an existing server
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, mzheng, sgordon, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: 6.0 (Juno)   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/nova/+spec/add-delete-on-termination-option
Whiteboard: upstream_milestone_none upstream_status_needs-code-review upstream_definition_review
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 16:52:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RHOS Integration 2013-12-12 13:59:44 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/add-delete-on-termination-option.

Description:

There is the delete_on_termination option for attaching volume when creating a server but not for an existing server.

Attach a volume when creating a server, the API contains 'block_device_mapping', such as:
"block_device_mapping": [
            {
                "volume_id": "<VOLUME_ID>",
                "device_name": "/dev/vdc",
                "delete_on_termination": "true"
            }
]

It can contain 'delete_on_termination' option.

But attach a volume to existing server, there is no option 'delete_on_termination', the POST data likes:
{
    "volumeAttachment":{
    "volumeId":"<VOLUME_ID>",
    "device":"/dev/sdb"
    }
}

Specification URL (additional information):

None