summaryrefslogtreecommitdiff
path: root/keystoneclient
diff options
context:
space:
mode:
Diffstat (limited to 'keystoneclient')
-rw-r--r--keystoneclient/client.py4
-rw-r--r--keystoneclient/shell.py14
-rw-r--r--keystoneclient/v2_0/client.py2
-rw-r--r--keystoneclient/v2_0/tokens.py6
4 files changed, 13 insertions, 13 deletions
diff --git a/keystoneclient/client.py b/keystoneclient/client.py
index aad2446..a29e34a 100644
--- a/keystoneclient/client.py
+++ b/keystoneclient/client.py
@@ -38,11 +38,11 @@ class HTTPClient(httplib2.Http):
USER_AGENT = 'python-keystoneclient'
- def __init__(self, user_name=None, tenant_id=None, tenant_name=None,
+ def __init__(self, username=None, tenant_id=None, tenant_name=None,
password=None, project_id=None, auth_url=None,
region_name=None, timeout=None, endpoint=None, token=None):
super(HTTPClient, self).__init__(timeout=timeout)
- self.user_name = user_name
+ self.username = username
self.tenant_id = tenant_id
self.tenant_name = tenant_name
self.password = password
diff --git a/keystoneclient/shell.py b/keystoneclient/shell.py
index 01f53c4..9232d14 100644
--- a/keystoneclient/shell.py
+++ b/keystoneclient/shell.py
@@ -55,9 +55,9 @@ class OpenStackIdentityShell(object):
action='store_true',
help=argparse.SUPPRESS)
- parser.add_argument('--user_name',
- default=env('OS_USER_NAME'),
- help='Defaults to env[OS_USER_NAME].')
+ parser.add_argument('--username',
+ default=env('OS_USERNAME'),
+ help='Defaults to env[OS_USERNAME].')
parser.add_argument('--password',
default=env('OS_PASSWORD'),
@@ -151,9 +151,9 @@ class OpenStackIdentityShell(object):
#FIXME(usrleon): Here should be restrict for project id same as
# for username or apikey but for compatibility it is not.
- if not args.user_name:
- raise exc.CommandError("You must provide a user name:"
- "via --user_name or env[OS_USER_NAME]")
+ if not args.username:
+ raise exc.CommandError("You must provide a username:"
+ "via --username or env[OS_USERNAME]")
if not args.password:
raise exc.CommandError("You must provide a password, either"
"via --password or env[OS_PASSWORD]")
@@ -163,7 +163,7 @@ class OpenStackIdentityShell(object):
"via --auth_url or via"
"env[OS_AUTH_URL")
- self.cs = self.get_api_class(options.version)(user_name=args.user_name,
+ self.cs = self.get_api_class(options.version)(username=args.username,
tenant_name=args.tenant_name,
tenant_id=args.tenant_id,
password=args.password,
diff --git a/keystoneclient/v2_0/client.py b/keystoneclient/v2_0/client.py
index 1dee548..627634c 100644
--- a/keystoneclient/v2_0/client.py
+++ b/keystoneclient/v2_0/client.py
@@ -86,7 +86,7 @@ class Client(client.HTTPClient):
"""
self.management_url = self.auth_url
# try:
- raw_token = self.tokens.authenticate(user_name=self.user_name,
+ raw_token = self.tokens.authenticate(username=self.username,
tenant_id=self.tenant_id,
tenant_name=self.tenant_name,
password=self.password,
diff --git a/keystoneclient/v2_0/tokens.py b/keystoneclient/v2_0/tokens.py
index a79c1a5..0b3c579 100644
--- a/keystoneclient/v2_0/tokens.py
+++ b/keystoneclient/v2_0/tokens.py
@@ -21,12 +21,12 @@ class Token(base.Resource):
class TokenManager(base.ManagerWithFind):
resource_class = Token
- def authenticate(self, user_name=None, tenant_id=None, tenant_name=None,
+ def authenticate(self, username=None, tenant_id=None, tenant_name=None,
password=None, token=None, return_raw=False):
if token and token != password:
params = {"auth": {"token": {"id": token}}}
- elif user_name and password:
- params = {"auth": {"passwordCredentials": {"username": user_name,
+ elif username and password:
+ params = {"auth": {"passwordCredentials": {"username": username,
"password": password}}}
else:
raise ValueError('A username and password or token is required.')