Browse Source

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

Jenkins 3 years ago
parent
commit
22d1c9a81e

+ 2
- 3
keystoneauth1/loading/_plugins/identity/generic.py View File

@@ -41,10 +41,9 @@ class Password(loading.BaseGenericLoader):
41 41
         options = super(Password, cls).get_options()
42 42
         options.extend([
43 43
             loading.Opt('user-id', help='User id'),
44
-            loading.Opt('user-name',
45
-                        dest='username',
44
+            loading.Opt('username',
46 45
                         help='Username',
47
-                        deprecated=[loading.Opt('username')]),
46
+                        deprecated=[loading.Opt('user-name')]),
48 47
             loading.Opt('user-domain-id', help="User's domain id"),
49 48
             loading.Opt('user-domain-name', help="User's domain name"),
50 49
             loading.Opt('password', secret=True, help="User's password"),

+ 3
- 4
keystoneauth1/loading/_plugins/identity/v2.py View File

@@ -40,11 +40,10 @@ class Password(loading.BaseV2Loader):
40 40
         options = super(Password, self).get_options()
41 41
 
42 42
         options.extend([
43
-            loading.Opt('user-name',
44
-                       dest='username',
45
-                       deprecated=[loading.Opt('username')],
43
+            loading.Opt('username',
44
+                       deprecated=[loading.Opt('user-name')],
46 45
                        help='Username to login with'),
47
-            loading.Opt('user-id', help='User ID to longin with'),
46
+            loading.Opt('user-id', help='User ID to login with'),
48 47
             loading.Opt('password', secret=True, help='Password to use'),
49 48
         ])
50 49
 

+ 2
- 3
keystoneauth1/loading/_plugins/identity/v3.py View File

@@ -26,10 +26,9 @@ class Password(loading.BaseV3Loader):
26 26
 
27 27
         options.extend([
28 28
             loading.Opt('user-id', help='User ID'),
29
-            loading.Opt('user-name',
30
-                        dest='username',
29
+            loading.Opt('username',
31 30
                         help='Username',
32
-                        deprecated=[loading.Opt('username')]),
31
+                        deprecated=[loading.Opt('user-name')]),
33 32
             loading.Opt('user-domain-id', help="User's domain id"),
34 33
             loading.Opt('user-domain-name', help="User's domain name"),
35 34
             loading.Opt('password', secret=True, help="User's password"),

+ 1
- 1
keystoneauth1/tests/unit/loading/test_generic.py View File

@@ -24,7 +24,7 @@ class PasswordTests(utils.TestCase):
24 24
     def test_options(self):
25 25
         opts = [o.name for o in generic.Password().get_options()]
26 26
 
27
-        allowed_opts = ['user-name',
27
+        allowed_opts = ['username',
28 28
                         'user-domain-id',
29 29
                         'user-domain-name',
30 30
                         'user-id',

Loading…
Cancel
Save