From fb04fdb7576ec1885be93d4e67b61cebeb06a699 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 25 Mar 2013 12:57:00 -0400 Subject: 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 --- nova/api/openstack/compute/contrib/hosts.py | 33 +++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'nova/api') 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) -- cgit