]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Change default exchange to heat-engine from nova. Hook up 'list' though
authorIan Main <imain@redhat.com>
Fri, 30 Mar 2012 20:38:48 +0000 (13:38 -0700)
committerIan Main <imain@redhat.com>
Fri, 30 Mar 2012 20:38:48 +0000 (13:38 -0700)
it doesn't work yet.

Signed-off-by: Ian Main <imain@redhat.com>
heat/api/v1/stacks.py
heat/common/config.py

index bfff3a78c0a30cc9439fa952a1cd9f43465f98ba..fe15c5997912668529092f5cd29fe1f97b636ebc 100644 (file)
@@ -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):
         """
index 1e367fed45d22ab6b4bee5c90085b1fe67f9a3db..7812e15565b7e7d65c2b471f904897fc8dc28b70 100644 (file)
@@ -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'),
 
     ]