summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2013-03-25 12:57:00 -0400
committerRussell Bryant <rbryant@redhat.com>2013-03-25 12:59:15 -0400
commitfb04fdb7576ec1885be93d4e67b61cebeb06a699 (patch)
treef3400da10bfad77e8569413f6a74f1481d7d79fb /nova/api
parentd40bdd43bc8fec44925788faf3eb32dac0ae06d2 (diff)
downloadnova-fb04fdb7576ec1885be93d4e67b61cebeb06a699.tar.gz
nova-fb04fdb7576ec1885be93d4e67b61cebeb06a699.tar.xz
nova-fb04fdb7576ec1885be93d4e67b61cebeb06a699.zip
Add missing info to docstring.
The example return value in this docstring did not reflect that the zone for each service is included as well. Add 'zone', and also add a compute of compute entries to the list. Fix bug 1159897. Change-Id: I8979a4a307d0ad77e8eff4fa71e0be3062a526e2
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/hosts.py33
1 files changed, 24 insertions, 9 deletions
diff --git a/nova/api/openstack/compute/contrib/hosts.py b/nova/api/openstack/compute/contrib/hosts.py
index 3727f35d9..7e9f3f6a6 100644
--- a/nova/api/openstack/compute/contrib/hosts.py
+++ b/nova/api/openstack/compute/contrib/hosts.py
@@ -98,23 +98,38 @@ class HostController(object):
:returns: A dict in the format:
{'hosts': [{'host_name': 'some.host.name',
- 'service': 'cells'},
+ 'service': 'cells',
+ 'zone': 'internal'},
{'host_name': 'some.other.host.name',
- 'service': 'cells'},
+ 'service': 'cells',
+ 'zone': 'internal'},
{'host_name': 'some.celly.host.name',
- 'service': 'cells'},
+ 'service': 'cells',
+ 'zone': 'internal'},
{'host_name': 'console1.host.com',
- 'service': 'consoleauth'},
+ 'service': 'consoleauth',
+ 'zone': 'internal'},
{'host_name': 'network1.host.com',
- 'service': 'network'},
+ 'service': 'network',
+ 'zone': 'internal'},
{'host_name': 'netwwork2.host.com',
- 'service': 'network'},
+ 'service': 'network',
+ 'zone': 'internal'},
+ {'host_name': 'compute1.host.com',
+ 'service': 'compute',
+ 'zone': 'nova'},
+ {'host_name': 'compute2.host.com',
+ 'service': 'compute',
+ 'zone': 'nova'},
{'host_name': 'sched1.host.com',
- 'service': 'scheduler'},
+ 'service': 'scheduler',
+ 'zone': 'internal'},
{'host_name': 'sched2.host.com',
- 'service': 'scheduler'},
+ 'service': 'scheduler',
+ 'zone': 'internal'},
{'host_name': 'vol1.host.com',
- 'service': 'volume'}]}
+ 'service': 'volume'},
+ 'zone': 'internal']}
"""
context = req.environ['nova.context']
authorize(context)