From 64c1593503c1f8879515123d1baffad56ae963f9 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Fri, 23 Mar 2012 11:00:05 -0400 Subject: Remove unused certificate SQL calls. Remove unused certificate_destroy and certificate_update functions from the DB api. Fixes LB Bug #953235. Change-Id: I2e3e07235467b2a5a11e228c2ed8db752c403ce3 --- nova/db/api.py | 14 -------------- nova/db/sqlalchemy/api.py | 22 ---------------------- 2 files changed, 36 deletions(-) diff --git a/nova/db/api.py b/nova/db/api.py index 02eaa14a3..850c772c7 100644 --- a/nova/db/api.py +++ b/nova/db/api.py @@ -209,11 +209,6 @@ def certificate_create(context, values): return IMPL.certificate_create(context, values) -def certificate_destroy(context, certificate_id): - """Destroy the certificate or raise if it does not exist.""" - return IMPL.certificate_destroy(context, certificate_id) - - def certificate_get_all_by_project(context, project_id): """Get all certificates for a project.""" return IMPL.certificate_get_all_by_project(context, project_id) @@ -231,15 +226,6 @@ def certificate_get_all_by_user_and_project(context, user_id, project_id): project_id) -def certificate_update(context, certificate_id, values): - """Set the given properties on an certificate and update it. - - Raises NotFound if service does not exist. - - """ - return IMPL.certificate_update(context, certificate_id, values) - - ################### def floating_ip_get(context, id): diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index d990b970a..ebb8b60e0 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -587,16 +587,6 @@ def certificate_create(context, values): return certificate_ref -@require_admin_context -def certificate_destroy(context, certificate_id): - session = get_session() - with session.begin(): - certificate_ref = certificate_get(context, - certificate_id, - session=session) - certificate_ref.delete(session=session) - - @require_admin_context def certificate_get_all_by_project(context, project_id): return model_query(context, models.Certificate, read_deleted="no").\ @@ -619,18 +609,6 @@ def certificate_get_all_by_user_and_project(context, user_id, project_id): all() -@require_admin_context -def certificate_update(context, certificate_id, values): - session = get_session() - with session.begin(): - certificate_ref = certificate_get(context, - certificate_id, - session=session) - for (key, value) in values.iteritems(): - certificate_ref[key] = value - certificate_ref.save(session=session) - - ################### -- cgit