components/python/keystoneclient/patches/launchpad-1498247.patch
changeset 5405 66fd59fecd68
equal deleted inserted replaced
5404:55e409ba4e72 5405:66fd59fecd68
       
     1 From 13bb2f74b0d65c1fef30f77d710d56e51e5f7841 Mon Sep 17 00:00:00 2001
       
     2 From: Monty Taylor <[email protected]>
       
     3 Date: Thu, 19 Nov 2015 10:22:31 -0500
       
     4 Subject: Swap the order of username deprecation
       
     5 
       
     6 The attempt at a move to user-name is an exercise in churn, and is
       
     7 filling everyone's logs with admonitions to change the name of their
       
     8 variables - which does not work if they do. Swap this, effectively
       
     9 reverting the attempt at a move. user-name will continue to work on
       
    10 the off chance anyone started consuming that path, which is unlikely
       
    11 because none of the consuming programs expose that as an actual option.
       
    12 
       
    13 Closes-Bug: 1498247
       
    14 
       
    15 Change-Id: I62d991fda1df63c9cbabfde2f6836bc031f5147c
       
    16 ---
       
    17 
       
    18 --- python-keystoneclient-1.3.3/keystoneclient/auth/identity/generic/password.py.~1~	2015-11-10 11:46:38.000000000 -0800
       
    19 +++ python-keystoneclient-1.3.3/keystoneclient/auth/identity/generic/password.py	2016-01-18 22:51:57.246982116 -0800
       
    20 @@ -26,8 +26,8 @@ LOG = logging.getLogger(__name__)
       
    21  def get_options():
       
    22      return [
       
    23          cfg.StrOpt('user-id', help='User id'),
       
    24 -        cfg.StrOpt('user-name', dest='username', help='Username',
       
    25 -                   deprecated_name='username'),
       
    26 +        cfg.StrOpt('username', dest='username', help='Username',
       
    27 +                   deprecated_name='user-name'),
       
    28          cfg.StrOpt('user-domain-id', help="User's domain id"),
       
    29          cfg.StrOpt('user-domain-name', help="User's domain name"),
       
    30          cfg.StrOpt('password', help="User's password"),
       
    31 --- python-keystoneclient-1.3.3/keystoneclient/auth/identity/v2.py.~2~	2016-01-18 22:51:57.231526891 -0800
       
    32 +++ python-keystoneclient-1.3.3/keystoneclient/auth/identity/v2.py	2016-01-18 22:51:57.247726713 -0800
       
    33 @@ -149,9 +149,9 @@ class Password(Auth):
       
    34          options = super(Password, cls).get_options()
       
    35  
       
    36          options.extend([
       
    37 -            cfg.StrOpt('user-name',
       
    38 +            cfg.StrOpt('username',
       
    39                         dest='username',
       
    40 -                       deprecated_name='username',
       
    41 +                       deprecated_name='user-name',
       
    42                         help='Username to login with'),
       
    43              cfg.StrOpt('user-id', help='User ID to login with'),
       
    44              cfg.StrOpt('password', secret=True, help='Password to use'),
       
    45 --- python-keystoneclient-1.3.3/keystoneclient/auth/identity/v3/password.py.~1~	2015-11-10 11:46:38.000000000 -0800
       
    46 +++ python-keystoneclient-1.3.3/keystoneclient/auth/identity/v3/password.py	2016-01-18 22:51:57.248446510 -0800
       
    47 @@ -78,8 +78,8 @@ class Password(base.AuthConstructor):
       
    48  
       
    49          options.extend([
       
    50              cfg.StrOpt('user-id', help='User ID'),
       
    51 -            cfg.StrOpt('user-name', dest='username', help='Username',
       
    52 -                       deprecated_name='username'),
       
    53 +            cfg.StrOpt('username', dest='username', help='Username',
       
    54 +                       deprecated_name='user-name'),
       
    55              cfg.StrOpt('user-domain-id', help="User's domain id"),
       
    56              cfg.StrOpt('user-domain-name', help="User's domain name"),
       
    57              cfg.StrOpt('password', secret=True, help="User's password"),
       
    58 --- python-keystoneclient-1.3.3/keystoneclient/contrib/auth/v3/saml2.py.~1~	2015-11-10 11:46:38.000000000 -0800
       
    59 +++ python-keystoneclient-1.3.3/keystoneclient/contrib/auth/v3/saml2.py	2016-01-18 22:51:57.249700774 -0800
       
    60 @@ -72,8 +72,8 @@ class _BaseSAMLPlugin(v3.AuthConstructor
       
    61              cfg.StrOpt('identity-provider', help="Identity Provider's name"),
       
    62              cfg.StrOpt('identity-provider-url',
       
    63                         help="Identity Provider's URL"),
       
    64 -            cfg.StrOpt('user-name', dest='username', help='Username',
       
    65 -                       deprecated_name='username'),
       
    66 +            cfg.StrOpt('username', dest='username', help='Username',
       
    67 +                       deprecated_name='user-name'),
       
    68              cfg.StrOpt('password', help='Password')
       
    69          ])
       
    70          return options
       
    71 --- python-keystoneclient-1.3.3/keystoneclient/tests/unit/auth/test_password.py.~1~	2015-11-10 11:46:38.000000000 -0800
       
    72 +++ python-keystoneclient-1.3.3/keystoneclient/tests/unit/auth/test_password.py	2016-01-18 22:51:57.250527060 -0800
       
    73 @@ -43,7 +43,7 @@ class PasswordTests(utils.GenericPluginT
       
    74      def test_options(self):
       
    75          opts = [o.name for o in self.PLUGIN_CLASS.get_options()]
       
    76  
       
    77 -        allowed_opts = ['user-name',
       
    78 +        allowed_opts = ['username',
       
    79                          'user-domain-id',
       
    80                          'user-domain-name',
       
    81                          'user-id',