Merge "Fix uses of service_get_all_compute_by_host"
This commit is contained in:
commit
635d250f16
@ -151,9 +151,12 @@ def service_get_all_by_host(context, host):
|
||||
return IMPL.service_get_all_by_host(context, host)
|
||||
|
||||
|
||||
def service_get_all_compute_by_host(context, host):
|
||||
"""Get all compute services for a given host."""
|
||||
return IMPL.service_get_all_compute_by_host(context, host)
|
||||
def service_get_by_compute_host(context, host):
|
||||
"""Get the service entry for a given compute host.
|
||||
|
||||
Returns the service entry joined with the compute_node entry.
|
||||
"""
|
||||
return IMPL.service_get_by_compute_host(context, host)
|
||||
|
||||
|
||||
def service_get_all_compute_sorted(context):
|
||||
|
@ -370,12 +370,12 @@ def service_get_all_by_host(context, host):
|
||||
|
||||
|
||||
@require_admin_context
|
||||
def service_get_all_compute_by_host(context, host):
|
||||
def service_get_by_compute_host(context, host):
|
||||
result = model_query(context, models.Service, read_deleted="no").\
|
||||
options(joinedload('compute_node')).\
|
||||
filter_by(host=host).\
|
||||
filter_by(topic=CONF.compute_topic).\
|
||||
all()
|
||||
first()
|
||||
|
||||
if not result:
|
||||
raise exception.ComputeHostNotFound(host=host)
|
||||
|
Loading…
x
Reference in New Issue
Block a user