summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2015-11-19 10:22:31 -0500
committerBrant Knudson <bknudson@us.ibm.com>2016-01-18 17:27:32 -0600
commitf15c176ba30efdcc15886e8f7203f32deb60c2a2 (patch)
tree1f3333bfeb9c1f6edbc66ab05b36ec3ddb25406d
parent4552013e113445691fb7d8316c8cb950325b0656 (diff)
downloadpython-keystoneclient-f15c176ba30efdcc15886e8f7203f32deb60c2a2.tar.gz
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 (cherry picked from commit 13bb2f74b0d65c1fef30f77d710d56e51e5f7841)
-rw-r--r--keystoneclient/auth/identity/generic/password.py4
-rw-r--r--keystoneclient/auth/identity/v2.py4
-rw-r--r--keystoneclient/auth/identity/v3/password.py4
-rw-r--r--keystoneclient/contrib/auth/v3/saml2.py4
-rw-r--r--keystoneclient/tests/unit/auth/test_password.py2
5 files changed, 9 insertions, 9 deletions
diff --git a/keystoneclient/auth/identity/generic/password.py b/keystoneclient/auth/identity/generic/password.py
index f1c8aa6..3c4180c 100644
--- a/keystoneclient/auth/identity/generic/password.py
+++ b/keystoneclient/auth/identity/generic/password.py
@@ -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"),
diff --git a/keystoneclient/auth/identity/v2.py b/keystoneclient/auth/identity/v2.py
index fd8b422..4d4db7b 100644
--- a/keystoneclient/auth/identity/v2.py
+++ b/keystoneclient/auth/identity/v2.py
@@ -187,9 +187,9 @@ class Password(Auth):
options = super(Password, cls).get_options()
options.extend([
- 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'),
diff --git a/keystoneclient/auth/identity/v3/password.py b/keystoneclient/auth/identity/v3/password.py
index d9cfa4a..374b89c 100644
--- a/keystoneclient/auth/identity/v3/password.py
+++ b/keystoneclient/auth/identity/v3/password.py
@@ -79,8 +79,8 @@ class Password(base.AuthConstructor):
options.extend([
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"),
diff --git a/keystoneclient/contrib/auth/v3/saml2.py b/keystoneclient/contrib/auth/v3/saml2.py
index 3a311d4..2e74996 100644
--- a/keystoneclient/contrib/auth/v3/saml2.py
+++ b/keystoneclient/contrib/auth/v3/saml2.py
@@ -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
diff --git a/keystoneclient/tests/unit/auth/test_password.py b/keystoneclient/tests/unit/auth/test_password.py
index 7926a22..020eb12 100644
--- a/keystoneclient/tests/unit/auth/test_password.py
+++ b/keystoneclient/tests/unit/auth/test_password.py
@@ -46,7 +46,7 @@ class PasswordTests(utils.GenericPluginTestCase):
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',