Type errors in credential when do the actions like 'create, list and put'.

Bug #1731848 reported by yangweiwei on 2017-11-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
yangweiwei

Bug Description

Now, keystone has supported serverl auth method, like totp.
Before we use this method, we should create the credential first. And we should create it with type like 'totp'. But now we cannot create credential with this method. Also, I think the type should not have constrains. We can create any type in keystone project. So, we should do these actions too. The type would be more. We cannot control it.

[root@test ~]# openstack credential create test GEZDGNBVGY3TQOJQGEZDGNBVGZQWQZDGNJUGC23KMRUGM23K --type totp
usage: openstack credential create [-h] [-f {json,shell,table,value,yaml}]
                                   [-c COLUMN] [--max-width <integer>]
                                   [--fit-width] [--print-empty] [--noindent]
                                   [--prefix PREFIX] [--type <type>]
                                   [--project <project>]
                                   <user> <data>
openstack credential create: error: argument --type: invalid choice: u'totp' (choose from 'ec2', 'cert')
[root@test ~]# openstack credential list --type totp
usage: openstack credential list [-h] [-f {csv,json,table,value,yaml}]
                                 [-c COLUMN] [--max-width <integer>]
                                 [--fit-width] [--print-empty] [--noindent]
                                 [--quote {all,minimal,none,nonnumeric}]
                                 [--user <user>] [--user-domain <user-domain>]
                                 [--type <type>]
openstack credential list: error: argument --type: invalid choice: u'totp' (choose from 'ec2', 'cert')
[root@test ~]# openstack credential list
+----------------------------------+-------+----------------------------------+--------------------------------------------------------------+------------+
| ID | Type | User ID | Data | Project ID |
+----------------------------------+-------+----------------------------------+--------------------------------------------------------------+------------+
| 09f91cc62fd742eaa8f20ff521daa1dc | totp | e55386464f3c44b1a2f0de0c4301fc05 | GEZDGNBVGY3TQOJQGEZDG | None |
| 340175cc4ca94b6aba0fce1bbbfc03d4 | cert | e55386464f3c44b1a2f0de0c4301fc05 | GEZDGNBVGY3TQOJQGEZDGNBVGZQWQZDGNJUGC23KMRUGM23K | None |
| 346bbabc80684a7da96c4c6bb80c964e | cert | e55386464f3c44b1a2f0de0c4301fc05 | GEZDGNBVGY3TQOJQGEZDG | None |
| a7bfd674fd444ec6a9be701ffee0ea07 | totp1 | e55386464f3c44b1a2f0de0c4301fc05 | GEZDGNBVGY3TQOJQGEZDG | None |
| b1e90c2657cf499598d91105c7c2cfbd | totp | e55386464f3c44b1a2f0de0c4301fc05 | GEZDGNBVGY3TQOJQGEZDGNBVGZQWQZDGNJUGC23KMRUGM23KNBQWIZTLNJUA | None |
| f58ca9d328124e829190deeb6b4651ef | totp | e55386464f3c44b1a2f0de0c4301fc05 | GEZDGNBVGY3TQOJQGEZDGASDFASDFASDF | None |
+----------------------------------+-------+----------------------------------+--------------------------------------------------------------+------------+

yangweiwei (496176919-6) wrote :
Changed in python-openstackclient:
status: New → In Progress
yangweiwei (496176919-6) on 2017-11-17
Changed in python-openstackclient:
assignee: nobody → yangweiwei (496176919-6)

Reviewed: https://review.openstack.org/519254
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=0f749cacc2b0a76226a6a7ab7769ecf1475a160b
Submitter: Zuul
Branch: master

commit 0f749cacc2b0a76226a6a7ab7769ecf1475a160b
Author: yangweiwei <email address hidden>
Date: Fri Nov 17 11:39:15 2017 +0800

    Fix credentials in create, update and list.

    Now, keystone has supported serverl auth method, like 'totp'.
    Before we use this method, we should create the credential first.
    And we need create it with type 'totp'. But now we cannot create
    credential with this method.

    Also, I think the type should not have constrains. We can create
    any type in keystone project. So, we should do these actions too.
    The type would be more which We cannot control.

    Change-Id: Ie0482da3133fb515e4bb8e45f8c54f509589cc5e
    Closes-bug: #1731848

Changed in python-openstackclient:
status: In Progress → Fix Released

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

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

Other bug subscribers