Swap the order of username deprecation
The deprecation of username in favor of user-name has been reverted in python-keystoneclient in [1], we should keep this in sync here. [1] https://review.openstack.org/247574 Change-Id: Ia82536ecebfc5874add36f6fbc349d9a9cbf3a08
This commit is contained in:
@@ -41,10 +41,9 @@ class Password(loading.BaseGenericLoader):
|
||||
options = super(Password, cls).get_options()
|
||||
options.extend([
|
||||
loading.Opt('user-id', help='User id'),
|
||||
loading.Opt('user-name',
|
||||
dest='username',
|
||||
loading.Opt('username',
|
||||
help='Username',
|
||||
deprecated=[loading.Opt('username')]),
|
||||
deprecated=[loading.Opt('user-name')]),
|
||||
loading.Opt('user-domain-id', help="User's domain id"),
|
||||
loading.Opt('user-domain-name', help="User's domain name"),
|
||||
loading.Opt('password', secret=True, help="User's password"),
|
||||
|
||||
@@ -40,11 +40,10 @@ class Password(loading.BaseV2Loader):
|
||||
options = super(Password, self).get_options()
|
||||
|
||||
options.extend([
|
||||
loading.Opt('user-name',
|
||||
dest='username',
|
||||
deprecated=[loading.Opt('username')],
|
||||
loading.Opt('username',
|
||||
deprecated=[loading.Opt('user-name')],
|
||||
help='Username to login with'),
|
||||
loading.Opt('user-id', help='User ID to longin with'),
|
||||
loading.Opt('user-id', help='User ID to login with'),
|
||||
loading.Opt('password', secret=True, help='Password to use'),
|
||||
])
|
||||
|
||||
|
||||
@@ -26,10 +26,9 @@ class Password(loading.BaseV3Loader):
|
||||
|
||||
options.extend([
|
||||
loading.Opt('user-id', help='User ID'),
|
||||
loading.Opt('user-name',
|
||||
dest='username',
|
||||
loading.Opt('username',
|
||||
help='Username',
|
||||
deprecated=[loading.Opt('username')]),
|
||||
deprecated=[loading.Opt('user-name')]),
|
||||
loading.Opt('user-domain-id', help="User's domain id"),
|
||||
loading.Opt('user-domain-name', help="User's domain name"),
|
||||
loading.Opt('password', secret=True, help="User's password"),
|
||||
|
||||
@@ -24,7 +24,7 @@ class PasswordTests(utils.TestCase):
|
||||
def test_options(self):
|
||||
opts = [o.name for o in generic.Password().get_options()]
|
||||
|
||||
allowed_opts = ['user-name',
|
||||
allowed_opts = ['username',
|
||||
'user-domain-id',
|
||||
'user-domain-name',
|
||||
'user-id',
|
||||
|
||||
Reference in New Issue
Block a user