From 13bb2f74b0d65c1fef30f77d710d56e51e5f7841 Mon Sep 17 00:00:00 2001
From: Monty Taylor <mordred@inaugust.com>
Date: Thu, 19 Nov 2015 10:22:31 -0500
Subject: Swap the order of username deprecation
The attempt at a move to user-name is an exercise in churn, and is
filling everyone's logs with admonitions to change the name of their
variables - which does not work if they do. Swap this, effectively
reverting the attempt at a move. user-name will continue to work on
the off chance anyone started consuming that path, which is unlikely
because none of the consuming programs expose that as an actual option.
Closes-Bug: 1498247
Change-Id: I62d991fda1df63c9cbabfde2f6836bc031f5147c
---
--- python-keystoneclient-1.3.3/keystoneclient/auth/identity/generic/password.py.~1~ 2015-11-10 11:46:38.000000000 -0800
+++ python-keystoneclient-1.3.3/keystoneclient/auth/identity/generic/password.py 2016-01-18 22:51:57.246982116 -0800
@@ -26,8 +26,8 @@ LOG = logging.getLogger(__name__)
def get_options():
return [
cfg.StrOpt('user-id', help='User id'),
- cfg.StrOpt('user-name', dest='username', help='Username',
- deprecated_name='username'),
+ cfg.StrOpt('username', dest='username', help='Username',
+ deprecated_name='user-name'),
cfg.StrOpt('user-domain-id', help="User's domain id"),
cfg.StrOpt('user-domain-name', help="User's domain name"),
cfg.StrOpt('password', help="User's password"),
--- python-keystoneclient-1.3.3/keystoneclient/auth/identity/v2.py.~2~ 2016-01-18 22:51:57.231526891 -0800
+++ python-keystoneclient-1.3.3/keystoneclient/auth/identity/v2.py 2016-01-18 22:51:57.247726713 -0800
@@ -149,9 +149,9 @@ class Password(Auth):
options = super(Password, cls).get_options()
- cfg.StrOpt('user-name',
+ cfg.StrOpt('username',
dest='username',
- deprecated_name='username',
+ deprecated_name='user-name',
help='Username to login with'),
cfg.StrOpt('user-id', help='User ID to login with'),
cfg.StrOpt('password', secret=True, help='Password to use'),
--- python-keystoneclient-1.3.3/keystoneclient/auth/identity/v3/password.py.~1~ 2015-11-10 11:46:38.000000000 -0800
+++ python-keystoneclient-1.3.3/keystoneclient/auth/identity/v3/password.py 2016-01-18 22:51:57.248446510 -0800
@@ -78,8 +78,8 @@ class Password(base.AuthConstructor):
cfg.StrOpt('user-id', help='User ID'),
- cfg.StrOpt('user-name', dest='username', help='Username',
- deprecated_name='username'),
+ cfg.StrOpt('username', dest='username', help='Username',
+ deprecated_name='user-name'),
cfg.StrOpt('user-domain-id', help="User's domain id"),
cfg.StrOpt('user-domain-name', help="User's domain name"),
cfg.StrOpt('password', secret=True, help="User's password"),
--- python-keystoneclient-1.3.3/keystoneclient/contrib/auth/v3/saml2.py.~1~ 2015-11-10 11:46:38.000000000 -0800
+++ python-keystoneclient-1.3.3/keystoneclient/contrib/auth/v3/saml2.py 2016-01-18 22:51:57.249700774 -0800
@@ -72,8 +72,8 @@ class _BaseSAMLPlugin(v3.AuthConstructor
cfg.StrOpt('identity-provider', help="Identity Provider's name"),
cfg.StrOpt('identity-provider-url',
help="Identity Provider's URL"),
- cfg.StrOpt('user-name', dest='username', help='Username',
- deprecated_name='username'),
+ cfg.StrOpt('username', dest='username', help='Username',
+ deprecated_name='user-name'),
cfg.StrOpt('password', help='Password')
])
return options
--- python-keystoneclient-1.3.3/keystoneclient/tests/unit/auth/test_password.py.~1~ 2015-11-10 11:46:38.000000000 -0800
+++ python-keystoneclient-1.3.3/keystoneclient/tests/unit/auth/test_password.py 2016-01-18 22:51:57.250527060 -0800
@@ -43,7 +43,7 @@ class PasswordTests(utils.GenericPluginT
def test_options(self):
opts = [o.name for o in self.PLUGIN_CLASS.get_options()]
- allowed_opts = ['user-name',
+ allowed_opts = ['username',
'user-domain-id',
'user-domain-name',
'user-id',