From e212c68684f516d670b3e7376b6abd028539aa3e Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 14 Jun 2013 21:23:06 -0400 Subject: Remove unused cert db method. nova.db.sqlalchemy.api contained a certificate_get() method that was unused. It was not in the main db.api. This method was also the only reference to CertificateNotFound, so remove that as well. Change-Id: Iba9aece2302e2f175e5d60e48b23959885a81c8d --- nova/db/sqlalchemy/api.py | 12 ------------ nova/exception.py | 4 ---- 2 files changed, 16 deletions(-) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 8fd946963..03c6678c8 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -602,18 +602,6 @@ def compute_node_statistics(context): ################### -@require_admin_context -def certificate_get(context, certificate_id): - result = model_query(context, models.Certificate).\ - filter_by(id=certificate_id).\ - first() - - if not result: - raise exception.CertificateNotFound(certificate_id=certificate_id) - - return result - - @require_admin_context def certificate_create(context, values): certificate_ref = models.Certificate() diff --git a/nova/exception.py b/nova/exception.py index 68cf1f991..44e7709c5 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -673,10 +673,6 @@ class KeypairNotFound(NotFound): message = _("Keypair %(name)s not found for user %(user_id)s") -class CertificateNotFound(NotFound): - message = _("Certificate %(certificate_id)s not found.") - - class ServiceNotFound(NotFound): message = _("Service %(service_id)s could not be found.") -- cgit