Ability to create multiple volumes at the same time
The goal of the blueprint is to allow the creation of more volumes at the same time (of sequentially) from the cinder create command. The idea is the same as nova, thus a new option (new parameter of 'create') should be added like so:
$ cinder create --num-volumes 3 --display-name volume <size>
e.g.
$cinder create --num-volumes 2 --display-name testvolume 1
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2014-01-
| description | None |
| id | 78234f50-
| metadata | {} |
| name | testvolume-1 |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| user_id | c1d40fde5dbf4c1
| volume_type | None |
+------
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2014-01-
| description | None |
| id | 88445533-
| metadata | {} |
| name | testvolume-2 |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| user_id | c1d40fde5dbf4c1
| volume_type | None |
+------
$ cinder create --num-volumes 2 1
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2014-01-
| description | None |
| id | 78234f50-
| metadata | {} |
| name | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| user_id | c1d40fde5dbf4c1
| volume_type | None |
+------
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2014-01-
| description | None |
| id | 88445533-
| metadata | {} |
| name | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| user_id | c1d40fde5dbf4c1
| volume_type | None |
+------
Additional formatting parameter added in the cinderclient --summarize which will display the condensed output for multiple volume creation.
e.g.
$ cinder create --num-volumes 2 --summarize true --display-name test2 1
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| 78234f50-
+------
| 88776644-
+------
This will also need additional input parameters on dashboard for number of volumes.
Blueprint information
- Status:
- Complete
- Approver:
- John Griffith
- Priority:
- Undefined
- Drafter:
- Sébastien Han
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
-
Good progress
- Milestone target:
- None
- Started by
- Swapnil Kulkarni
- Completed by
- Sean McGinnis
Related branches
Related bugs
Sprints
Whiteboard
Currently Understood User Stories are
1. As a Openstack End User I want to create multiple volumes at the same time using OpenStack CLI & REST interface.
2. As a Openstack End User I want to create multiple volumes at the same time using OpenStack Dashboard.
Duncan, I updated the cinderclient code for creating multiple volumes, but If i do the changes only in cinderclient, for every other client using cinder client will need similar changes? Since I did the changes on cinderclient, did the changes on dashboard to accept the number of volumes, but with similar changes I cannot create multiple volumes from dashboard. I need to update the dashboard api to include the additional input parameters still it does not understand its a multiple volume request and creates only one volume.
Gerrit topic: https:/
cinderclient changeset : https:/
horizon changeset : https:/
Every client needs to change whether you do this client or server side. I struggle to envisage a client for which a for loop is a significant issue.
I have never looked that the dashboard code TBH, but I imagine it will need work to support multiple volumes and to sensibly display the result. The nova thing of only displaying the last instance created is a bit poor IMO
DuncanT- I code changes have been updated as per discussion in IRC
Addressed by: https:/
Ability to create multiple volumes from cli