Merge "Swap the order of username deprecation" into stable/mitaka

This commit is contained in:
Jenkins 2016-05-04 20:21:44 +00:00 committed by Gerrit Code Review
commit 22d1c9a81e
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',