From: Ian Main Date: Fri, 30 Mar 2012 20:38:48 +0000 (-0700) Subject: Change default exchange to heat-engine from nova. Hook up 'list' though X-Git-Tag: 2014.1~2088^2~7 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=cfdd2e4545a36f342866664df206d8397b749a93;p=openstack-build%2Fheat-build.git Change default exchange to heat-engine from nova. Hook up 'list' though it doesn't work yet. Signed-off-by: Ian Main --- diff --git a/heat/api/v1/stacks.py b/heat/api/v1/stacks.py index bfff3a78..fe15c599 100644 --- a/heat/api/v1/stacks.py +++ b/heat/api/v1/stacks.py @@ -31,6 +31,7 @@ from webob.exc import (HTTPNotFound, from heat.common import wsgi from heat.engine import client as engine +from heat.common import config from heat import rpc from heat import context @@ -52,15 +53,9 @@ class StackController(object): """ Returns the following information for all stacks: """ - c = engine.get_engine_client(req.context) - stack_list = c.get_stacks(**req.params) - - res = {'ListStacksResponse': {'ListStacksResult': {'StackSummaries': [] } } } - summaries = res['ListStacksResponse']['ListStacksResult']['StackSummaries'] - for s in stack_list: - summaries.append(s) + con = context.get_admin_context() - return res + return rpc.call(con, 'engine', {'method': 'list'}) def describe(self, req): """ diff --git a/heat/common/config.py b/heat/common/config.py index 1e367fed..7812e155 100644 --- a/heat/common/config.py +++ b/heat/common/config.py @@ -88,7 +88,7 @@ class HeatEngineConfigOpts(cfg.CommonConfigOpts): help='maximum retries with trying to connect to RabbitMQ ' '(the default of 0 implies an infinite retry count)'), cfg.StrOpt('control_exchange', - default='nova', + default='heat-engine', help='the main RabbitMQ exchange to connect to'), ]