From f6c205f66eef6bac572f9f4176b3bc7f90d57ff0 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Mon, 14 Jan 2013 00:58:10 +0000 Subject: More HostAPI() cleanup for cells. This patch contains further changes needed to support HostAPI() with cells. This moves the formatting of hosts API extension responses back to the extension itself. Methods for getting service entries have been added to HostAPI() that can be overriden in a subclass for cells. Also contains a performance improvement for 'show' in hosts extension. Change-Id: Ifd8b68ff8d7495f537dff5e01bd3df75c6c5930a --- nova/db/sqlalchemy/api.py | 9 --------- 1 file changed, 9 deletions(-) (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index e51d7b685..5cac0b065 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -336,15 +336,6 @@ def service_get_all(context, disabled=None): return query.all() -@require_admin_context -def service_does_host_exist(context, host_name, include_disabled): - query = get_session().query(func.count(models.Service.host)).\ - filter_by(host=host_name) - if not include_disabled: - query = query.filter_by(disabled=False) - return query.scalar() > 0 - - @require_admin_context def service_get_all_by_topic(context, topic): return model_query(context, models.Service, read_deleted="no").\ -- cgit