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. This is a cherry-pick of [2], the patch from [1] has been backported to stable/liberty in [3], so we should aim to be consistent here. [1] https://review.openstack.org/247574 [2] https://review.openstack.org/287754 [3] https://review.openstack.org/269364 Change-Id: Ia82536ecebfc5874add36f6fbc349d9a9cbf3a08
This commit is contained in:
parent
877ddce291
commit
aa122e73cc
|
@ -64,10 +64,9 @@ class Password(GenericBaseLoader):
|
||||||
options = super(Password, cls).get_options()
|
options = super(Password, cls).get_options()
|
||||||
options.extend([
|
options.extend([
|
||||||
loading.Opt('user-id', help='User id'),
|
loading.Opt('user-id', help='User id'),
|
||||||
loading.Opt('user-name',
|
loading.Opt('username',
|
||||||
dest='username',
|
|
||||||
help='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-id', help="User's domain id"),
|
||||||
loading.Opt('user-domain-name', help="User's domain name"),
|
loading.Opt('user-domain-name', help="User's domain name"),
|
||||||
loading.Opt('password', secret=True, help="User's password"),
|
loading.Opt('password', secret=True, help="User's password"),
|
||||||
|
|
|
@ -55,11 +55,10 @@ class Password(BaseV2Loader):
|
||||||
options = super(Password, self).get_options()
|
options = super(Password, self).get_options()
|
||||||
|
|
||||||
options.extend([
|
options.extend([
|
||||||
loading.Opt('user-name',
|
loading.Opt('username',
|
||||||
dest='username',
|
deprecated=[loading.Opt('user-name')],
|
||||||
deprecated=[loading.Opt('username')],
|
|
||||||
help='Username to login with'),
|
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'),
|
loading.Opt('password', secret=True, help='Password to use'),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
@ -59,10 +59,9 @@ class Password(BaseV3Loader):
|
||||||
|
|
||||||
options.extend([
|
options.extend([
|
||||||
loading.Opt('user-id', help='User ID'),
|
loading.Opt('user-id', help='User ID'),
|
||||||
loading.Opt('user-name',
|
loading.Opt('username',
|
||||||
dest='username',
|
|
||||||
help='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-id', help="User's domain id"),
|
||||||
loading.Opt('user-domain-name', help="User's domain name"),
|
loading.Opt('user-domain-name', help="User's domain name"),
|
||||||
loading.Opt('password', secret=True, help="User's password"),
|
loading.Opt('password', secret=True, help="User's password"),
|
||||||
|
|
|
@ -19,7 +19,7 @@ class PasswordTests(utils.TestCase):
|
||||||
def test_options(self):
|
def test_options(self):
|
||||||
opts = [o.name for o in generic.Password().get_options()]
|
opts = [o.name for o in generic.Password().get_options()]
|
||||||
|
|
||||||
allowed_opts = ['user-name',
|
allowed_opts = ['username',
|
||||||
'user-domain-id',
|
'user-domain-id',
|
||||||
'user-domain-name',
|
'user-domain-name',
|
||||||
'user-id',
|
'user-id',
|
||||||
|
|
Loading…
Reference in New Issue