Implement encryption-type commands of cinderclient in OSC

Bug #1651117 reported by aohuanxuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
High
aohuanxuan

Bug Description

cinderclient has the commands below:

volume v1:
encryption-type-create Creates encryption type for a volume type. encryption-type-delete Deletes encryption type for a volume type.
encryption-type-list Shows encryption type details for volume types.
encryption-type-show Shows encryption type details for volume type.

volume v2:
encryption-type-create Creates encryption type for a volume type.
encryption-type-delete Deletes encryption type for a volume type.
encryption-type-list Shows encryption type details for volume types.
encryption-type-show Shows encryption type details for volume type.
encryption-type-update Update encryption type information for a volume type.

It is a plan for implementing it in OSC:

1.0)encryption-type-delete
--> volume type unset [--encryption-type]
option "encryption-type": remove encryption type of this volume type (admin only)

2.0)encryption-type-show
--> volume type show [--encryption-type]
option "encryption-type": Show encryption type for this volume type (admin only)

3.0)encryption-type-list
--> volume type list [--encryption-type]
option "encryption-type": List all encryption types (admin only)

4.0)encryption-type-create and encryption-type-update
Thinking about implementing these two in one command in OSC:
--> volume type set [--encryption-type-provider <provider>]
                    [--encryption-type-cipher <cipher>]
                    [--encryption-type-key-size <key-size>]
                    [--encryption-type-control-location <control-location>]
These options can be used for both creating and updating, if the volume type has no encryption type, then create a new one, otherwise update it.

aohuanxuan (huanxuan-ao)
Changed in python-openstackclient:
assignee: nobody → aohuanxuan (huanxuan-ao)
description: updated
Changed in python-openstackclient:
importance: Undecided → High
Revision history for this message
Steve Martinelli (stevemar) wrote :

I have a few questions.

1) Can a volume-type only be associated with one encryption type?

2) Will --encryption-types for list() have different columns? (New columns are OK, but not less)

3) Will show() still list the volume type information? or just the encryption type information?

Revision history for this message
aohuanxuan (huanxuan-ao) wrote :

@Steve
1) I think one volume type can be only associated with one encryption type since we get/update/delete encryption type by specified volume type.
2) we have two choices for --encryption-type for list(), list all information including volume types and their encryption types (add 4 new columns for the original list), or list only information of encryption types (5 columns)
3) about --encryption-type for show(), we have two choices too, show all information including volume type and its encryption type (add 4 new attributes in the original table for showing) or show only information of encryption type.

In 2) 3), which choice is make sense for UX?

Revision history for this message
Steve Martinelli (stevemar) wrote :

I think we should provide more information (so the original volume type information + encryption details). But I worry that when listing volume types it'll be too much.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/414197

Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
aohuanxuan (huanxuan-ao) wrote :

Maybe we can combine all encryption informations into one column with a dictionary since it is not too many

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/415785

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-openstackclient (master)

Change abandoned by Huanxuan Ao (<email address hidden>) on branch: master
Review: https://review.openstack.org/415785
Reason: See:
https://review.openstack.org/#/c/414197/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/414197
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=b2fd8ba869cd4b8e927118f7712d0ed7fb60309f
Submitter: Jenkins
Branch: master

commit b2fd8ba869cd4b8e927118f7712d0ed7fb60309f
Author: Huanxuan Ao <email address hidden>
Date: Thu Dec 22 23:27:26 2016 +0800

    Add "encryption-*" options in volume type commands

    Add "--encryption-provider", "--encryption-cipher",
    "--encryption-key-size" and "--encryption-control-location"
    options to "volume type set" and "volume type create" commands.
    Add "--encryption-type" option to "volume type unset",
    "volume type list" and "volume type show" commands.

    Change-Id: I3572635d5913d971a723a62d7790ffe0f20ec39a
    Implements: bp cinder-command-support
    Closes-Bug: #1651117

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstackclient 3.9.0

This issue was fixed in the openstack/python-openstackclient 3.9.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.