cinder command support in OSC client

Registered by Sheel Rana

======================
Current command set in OSC
======================

consistency group list

quota set
quota show

volume create
volume delete
volume list
volume set
volume show
volume unset

volume backup create
volume backup delete
volume backup list
volume backup restore
volume backup show

volume qos associate
volume qos create
volume qos delete
volume qos disassociate
volume qos list
volume qos set
volume qos show
volume qos unset

volume service list
volume service set

volume snapshot create
volume snapshot delete
volume snapshot list
volume snapshot set
volume snapshot show
volume snapshot unset

volume transfer request accept
volume transfer request create
volume transfer request delete
volume transfer request list
volume transfer request show

volume type create
volume type delete
volume type list
volume type set
volume type show
volume type unset

===============================================
What needs to be implemented to have parity with cinderclient
===============================================

1. Set image metadata for volume (DONE via "volume set")
2. Remove image metadata for volume (DONE via "volume unset")

3. Reset volume statuses (DONE via "volume set")
4. Set volume bootable status (DONE via "volume set" and "volume create")
5. Set volume to read-only mode (DONE via "volume create and volume set")

6. Create volume transfer (DONE via "volume transfer request create")
7. Delete volume transfer (DONE via "volume transfer request delete")
8. Accept volume transfer (DONE via "volume transfer request accept")
9. List volume transfers (DONE via "volume transfer request list")
10. Show volume transfer details (DONE via "volume transfer request show")

11. Show component specific services - cinder service-list (DONE via "volume service list")
12. Enable volume service (DONE via "volume service set")
13. Disable volume service (DONE via "volume service set")

14. Manage an existing volume (WIP via "volume create" with --remote-source)
15. Manage snapshot (WIP via "snapshot create" with --remote-source)
16. Unmanage volume
17. Unmanage snapshot

18. List consistency groups (DONE via "consistency group list")
19. Create consistency group
20. Create consistency group from source
21. Delete consistency group
22. Show consistency group
23. Update consistency group

24. Create consistency group snapshot
25. Delete consistency group snapshot
26. List consistency group snapshots
27. Show consistency group snapshot

28. Create volume type access
29. Delete volume type access
30. List volume type access

31. Retype a volume
32. Migrate a volume
33. Upload a volume to an image

34. Import backup metadata
35. Export backup metadata

36. Failover a volume host
37. Freeze a volume host
38. Thaw a volume host

39. Show volume stats and properties
40. Show pool information

41. Promote a volume for replication
42. Sync a replicated volume

43. Create encryption type *
44. Delete encryption type *
45. List encryption types *
46. Show encryption type *

* encryption should be the last ones we implement, last time I checked with jgriffith he seemed unsure about porting it over

=====================================================
output from cinder --help (with commands removed as we implement)
=====================================================

v1 and v2
-------------

(see 32 - 33)
migrate Migrates volume to a new host.
upload-to-image Uploads volume to Image Service as an image.

(see 43 - 46)
encryption-type-create Creates encryption type for a volume type. Admin only. *
encryption-type-delete Deletes encryption type for a volume type. Admin only. *
encryption-type-list Shows encryption type details for volume types. Admin only. *
encryption-type-show Shows encryption type details for volume type. Admin only. *

v2 only
----------
(see 34 - 35)
backup-export Export backup metadata record.
backup-import Import backup metadata record.

(see 24 - 27)
cgsnapshot-create Creates a cgsnapshot.
cgsnapshot-delete Removes one or more cgsnapshots.
cgsnapshot-list Lists all cgsnapshots.
cgsnapshot-show Shows cgsnapshot details.

(see 18 - 23)
consisgroup-create Creates a consistency group.
consisgroup-create-from-src Creates a consistency group from a cgsnapshot or a source CG.
consisgroup-delete Removes one or more consistency groups.
consisgroup-list Lists all consistencygroups. (DONE)
consisgroup-show Shows details of a consistency group.
consisgroup-update Updates a consistencygroup.

(see 31)
retype Changes the volume type for a volume.

(see 14 - 17)
manage Manage an existing volume. (WIP)
unmanage Stop managing a volume.
snapshot-manage Manage an existing snapshot. (WIP)
snapshot-unmanage Stop managing a snapshot.

(see 36 - 38)
failover-host Failover a replicating cinder-volume host.
freeze-host Freeze and disable the specified cinder-volume host.
thaw-host Thaw and enable the specified cinder-volume host.

(see 39 - 40)
get-capabilities Show backend volume stats and properties. Admin only.
get-pools Show pool information for backends. Admin only.

(see 41 - 42)
replication-promote Promote a secondary volume to primary for a relationship
replication-reenable Sync the secondary volume with primary for a relationship

(see 28 - 30)
type-access-add Adds volume type access for the given project.
type-access-list Print access information about the given volume type.
type-access-remove Removes volume type access for the given project.

Whiteboard

Reference to BP specifications are present @etherpad:
https://etherpad.openstack.org/p/cinder-command-support

Gerrit topic: https://review.openstack.org/#q,topic:bp/cinder-command-support,n,z

Addressed by: https://review.openstack.org/290424
    Add support for Image-metadata

Addressed by: https://review.openstack.org/290969
    Add support for deleting Image-property

Addressed by: https://review.openstack.org/292043
    WIP: Add support for volume transfer

Addressed by: https://review.openstack.org/293661
    Add support for setting volume-type-access

Addressed by: https://review.openstack.org/293684
    Add support for removing volume-type-access

Addressed by: https://review.openstack.org/295026
    List project access for volume type

Addressed by: https://review.openstack.org/295660
    Support for volume service list/enable/disable

Gerrit topic: https://review.openstack.org/#q,topic:bug/1554891,n,z

Addressed by: https://review.openstack.org/352240
    Implement "volume transfer request create & delete" command

Addressed by: https://review.openstack.org/352716
    Implement "volume transfer request create" command

Addressed by: https://review.openstack.org/356384
    Add "consisgroup" object and implement "consisgroup list" command

Addressed by: https://review.openstack.org/362517
    Implement "volume transfer request show" command

Addressed by: https://review.openstack.org/362677
    Implement "volume transfer request accept" command

Addressed by: https://review.openstack.org/362802
    WIP: Add "volume manage & unmanage" commands in volume v2

Addressed by: https://review.openstack.org/363574
    Add "snapshot manage & unmanage" commands in volume v2

Gerrit topic: https://review.openstack.org/#q,topic:bp/implement-cinder-features,n,z

Addressed by: https://review.openstack.org/380736
    Add "volume migrate" command

Addressed by: https://review.openstack.org/378184
    Add "--read-only" and "--read-write" options in "volume set"

Addressed by: https://review.openstack.org/387825
    Add "--type" and "--retype-policy" options to "volume set" command

Addressed by: https://review.openstack.org/396192
    Add "consistency group create" command

Addressed by: https://review.openstack.org/398123
    Add option to "volume type list" command

Gerrit topic: https://review.openstack.org/#q,topic:bug/1613964,n,z

Addressed by: https://review.openstack.org/398142
    Add "consistency group show" command

Addressed by: https://review.openstack.org/399352
    Add commands for "consistency group snapshot"

Addressed by: https://review.openstack.org/401863
    Add "volume host set" command

Addressed by: https://review.openstack.org/402007
    Add "consistency group delete" command

Addressed by: https://review.openstack.org/404765
    Add "replication-promote" and "replication-reenable" options to "volume set"

Addressed by: https://review.openstack.org/406700
    Add "consistency group set" command

Addressed by: https://review.openstack.org/407833
    Add "consistency-group-snapshot" option to consistency group create

Addressed by: https://review.openstack.org/407983
    Add two consistency group commands

Addressed by: https://review.openstack.org/410008
    Add "--remote" option to "volume snapshot delete"

Addressed by: https://review.openstack.org/410520
    Add some options to "volume create" command

Addressed by: https://review.openstack.org/411259
    Add one option to "volume host set" command

Addressed by: https://review.openstack.org/403393
    Add backup import/export to OpenStack Client

Addressed by: https://review.openstack.org/414197
    WIP: Add options in "volume type set" command

Addressed by: https://review.openstack.org/415785
    Add "--encryption-type" option to "volume type unset" command

Addressed by: https://review.openstack.org/420416
    Add "volume snapshot manage & unmanage" commands in volume v2

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.