diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-01-18 16:42:39 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-01-18 16:42:39 +0000 |
| commit | 885b9aa70da338307c37d8eba84b3bc1533058bb (patch) | |
| tree | 47ecccd6e6f67586372321f22aed9d22cbf5d22c /nova/api | |
| parent | 0c2eb242580caff24dc95a9e2b3092cf0b04e958 (diff) | |
| parent | d328ddcadb24d1b1961bd05a7676bc8f54b6776f (diff) | |
| download | nova-885b9aa70da338307c37d8eba84b3bc1533058bb.tar.gz nova-885b9aa70da338307c37d8eba84b3bc1533058bb.tar.xz nova-885b9aa70da338307c37d8eba84b3bc1533058bb.zip | |
Merge "Separate scheduler host management"
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/zones.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/nova/api/openstack/compute/contrib/zones.py b/nova/api/openstack/compute/contrib/zones.py index 28e6f0772..b68f3f4f5 100644 --- a/nova/api/openstack/compute/contrib/zones.py +++ b/nova/api/openstack/compute/contrib/zones.py @@ -133,16 +133,12 @@ class Controller(object): def info(self, req): """Return name and capabilities for this zone.""" context = req.environ['nova.context'] - items = nova.scheduler.api.get_zone_capabilities(context) - - zone = dict(name=FLAGS.zone_name) - caps = FLAGS.zone_capabilities - for cap in caps: - key, value = cap.split('=') - zone[key] = value - for item, (min_value, max_value) in items.iteritems(): - zone[item] = "%s,%s" % (min_value, max_value) - return dict(zone=zone) + zone_capabs = nova.scheduler.api.get_zone_capabilities(context) + # NOTE(comstud): This should probably return, instead: + # {'zone': {'name': FLAGS.zone_name, + # 'capabilities': zone_capabs}} + zone_capabs['name'] = FLAGS.zone_name + return dict(zone=zone_capabs) @wsgi.serializers(xml=ZoneTemplate) def show(self, req, id): |
