summaryrefslogtreecommitdiffstats
path: root/nova/db
diff options
context:
space:
mode:
authorTodd Willey <todd@ansolabs.com>2011-02-24 21:59:36 -0500
committerTodd Willey <todd@ansolabs.com>2011-02-24 21:59:36 -0500
commit2218cb025adca1ded3e6596acc182b88742e3a51 (patch)
treeb04fec30c75d606ec4e59779117f627f86436cd4 /nova/db
parented7c71f56c5f5e2ba71273cf0099393fb986ebf9 (diff)
downloadnova-2218cb025adca1ded3e6596acc182b88742e3a51.tar.gz
nova-2218cb025adca1ded3e6596acc182b88742e3a51.tar.xz
nova-2218cb025adca1ded3e6596acc182b88742e3a51.zip
Rename auth_token db methods to follow standard.
Diffstat (limited to 'nova/db')
-rw-r--r--nova/db/api.py12
-rw-r--r--nova/db/sqlalchemy/api.py6
2 files changed, 9 insertions, 9 deletions
diff --git a/nova/db/api.py b/nova/db/api.py
index 0a010e727..aeb9b7ebf 100644
--- a/nova/db/api.py
+++ b/nova/db/api.py
@@ -630,19 +630,19 @@ def iscsi_target_create_safe(context, values):
###############
-def auth_destroy_token(context, token):
+def auth_token_destroy(context, token):
"""Destroy an auth token."""
- return IMPL.auth_destroy_token(context, token)
+ return IMPL.auth_token_destroy(context, token)
-def auth_get_token(context, token_hash):
+def auth_token_get(context, token_hash):
"""Retrieves a token given the hash representing it."""
- return IMPL.auth_get_token(context, token_hash)
+ return IMPL.auth_token_get(context, token_hash)
-def auth_create_token(context, token):
+def auth_token_create(context, token):
"""Creates a new token."""
- return IMPL.auth_create_token(context, token)
+ return IMPL.auth_token_create(context, token)
###################
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index d8751bef4..0c11b2982 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -1262,13 +1262,13 @@ def iscsi_target_create_safe(context, values):
@require_admin_context
-def auth_destroy_token(_context, token):
+def auth_token_destroy(_context, token):
session = get_session()
session.delete(token)
@require_admin_context
-def auth_get_token(_context, token_hash):
+def auth_token_get(_context, token_hash):
session = get_session()
tk = session.query(models.AuthToken).\
filter_by(token_hash=token_hash).\
@@ -1279,7 +1279,7 @@ def auth_get_token(_context, token_hash):
@require_admin_context
-def auth_create_token(_context, token):
+def auth_token_create(_context, token):
tk = models.AuthToken()
tk.update(token)
tk.save()