Merge "Fix credentials in create, update and list."
This commit is contained in:
commit
58e5abf294
doc/source/cli/command-objects
openstackclient
releasenotes/notes
@ -19,7 +19,7 @@ Create new credential
|
|||||||
|
|
||||||
.. option:: --type <type>
|
.. option:: --type <type>
|
||||||
|
|
||||||
New credential type: cert, ec2
|
New credential type: cert, ec2, totp and so on
|
||||||
|
|
||||||
.. option:: --project <project>
|
.. option:: --project <project>
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ List credentials
|
|||||||
|
|
||||||
.. option:: --type <type>
|
.. option:: --type <type>
|
||||||
|
|
||||||
Filter credentials by type: cert, ec2
|
Filter credentials by type: cert, ec2, totp and so on
|
||||||
|
|
||||||
credential set
|
credential set
|
||||||
--------------
|
--------------
|
||||||
@ -96,7 +96,7 @@ Set credential properties
|
|||||||
|
|
||||||
.. option:: --type <type>
|
.. option:: --type <type>
|
||||||
|
|
||||||
New credential type: cert, ec2
|
New credential type: cert, ec2, totp and so on.
|
||||||
|
|
||||||
.. option:: --data <data>
|
.. option:: --data <data>
|
||||||
|
|
||||||
|
@ -43,8 +43,7 @@ class CreateCredential(command.ShowOne):
|
|||||||
'--type',
|
'--type',
|
||||||
default="cert",
|
default="cert",
|
||||||
metavar='<type>',
|
metavar='<type>',
|
||||||
choices=['ec2', 'cert'],
|
help=_('New credential type: cert, ec2, totp and so on'),
|
||||||
help=_('New credential type: cert, ec2'),
|
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'data',
|
'data',
|
||||||
@ -124,8 +123,7 @@ class ListCredential(command.Lister):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--type',
|
'--type',
|
||||||
metavar='<type>',
|
metavar='<type>',
|
||||||
choices=['ec2', 'cert'],
|
help=_('Filter credentials by type: cert, ec2, totp and so on'),
|
||||||
help=_('Filter credentials by type: cert, ec2'),
|
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -173,9 +171,8 @@ class SetCredential(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--type',
|
'--type',
|
||||||
metavar='<type>',
|
metavar='<type>',
|
||||||
choices=['ec2', 'cert'],
|
|
||||||
required=True,
|
required=True,
|
||||||
help=_('New credential type: cert, ec2'),
|
help=_('New credential type: cert, ec2, totp and so on'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--data',
|
'--data',
|
||||||
|
@ -124,20 +124,6 @@ class TestCredentialCreate(TestCredential):
|
|||||||
self.assertEqual(self.columns, columns)
|
self.assertEqual(self.columns, columns)
|
||||||
self.assertEqual(self.data, data)
|
self.assertEqual(self.data, data)
|
||||||
|
|
||||||
def test_credential_create_with_invalid_type(self):
|
|
||||||
arglist = [
|
|
||||||
self.credential.user_id,
|
|
||||||
self.credential.blob,
|
|
||||||
'--type', 'invalid_type',
|
|
||||||
]
|
|
||||||
verifylist = [
|
|
||||||
('user', self.credential.user_id),
|
|
||||||
('data', self.credential.blob),
|
|
||||||
('type', 'invalid_type'),
|
|
||||||
]
|
|
||||||
self.assertRaises(utils.ParserException, self.check_parser,
|
|
||||||
self.cmd, arglist, verifylist)
|
|
||||||
|
|
||||||
|
|
||||||
class TestCredentialDelete(TestCredential):
|
class TestCredentialDelete(TestCredential):
|
||||||
|
|
||||||
|
7
releasenotes/notes/bug-1731848-71d0a5fdb1a34a8b.yaml
Normal file
7
releasenotes/notes/bug-1731848-71d0a5fdb1a34a8b.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Remove the type value limit in credentials when do create,
|
||||||
|
reset or list. Now 'totp' method is supported in keystone
|
||||||
|
project and we could create credentials with 'totp' type.
|
||||||
|
[Bug `1731848 <https://bugs.launchpad.net/bugs/1731848>`_]
|
Loading…
x
Reference in New Issue
Block a user