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:
Jens Rosenboom 2016-03-03 13:18:10 +01:00
parent 73475f09e6
commit bc2354de33
4 changed files with 8 additions and 11 deletions

View File

@ -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"),

View File

@ -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'),
])

View File

@ -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"),

View File

@ -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',