From fc42f76b24df376c89f94a177f2476dacbc87073 Mon Sep 17 00:00:00 2001 From: Michael J Fork Date: Tue, 15 Jan 2013 12:44:41 +0000 Subject: Populate service list with availability zone and correct unit test Availability zone was removed from the service object and is now added via a separate call to availabilty_zones.set_availability_zones. Fix the fake_services_list structure in test_services to reflect that availability zone is no longer returned but added separately based on the topic. NOTE: original fix was reverted, combining unit test fix and original change here. bug 1099399 Change-Id: Ic9675a88c2c229d6feb20f5b934458e10c17684f --- nova/api/openstack/compute/contrib/services.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/contrib/services.py b/nova/api/openstack/compute/contrib/services.py index c792c72da..2786ad814 100644 --- a/nova/api/openstack/compute/contrib/services.py +++ b/nova/api/openstack/compute/contrib/services.py @@ -21,6 +21,7 @@ import webob.exc from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil +from nova import availability_zones from nova import db from nova import exception from nova.openstack.common import cfg @@ -69,6 +70,7 @@ class ServiceController(object): authorize(context) now = timeutils.utcnow() services = db.service_get_all(context) + services = availability_zones.set_availability_zones(context, services) host = '' if 'host' in req.GET: -- cgit