Pass the parameters to the parser

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2012-04-05 09:59:16 +10:00
parent ebcb364e79
commit 8a6eb03d62
3 changed files with 5 additions and 4 deletions

View File

@ -39,8 +39,8 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'heat', '__init__.py')):
gettext.install('heat', unicode=1)
from heat import service
from heat.common import utils
from heat.common import config
from heat.common import utils
from heat.db import api as db_api
logger = logging.getLogger('heat.engine')

View File

@ -128,7 +128,8 @@ class StackController(object):
return rpc.call(con, 'engine',
{'method': 'create_stack',
'args': {'stack_name': req.params['StackName'],
'template': stack}})
'template': stack,
'params': dict(req.params)}})
def validate_template(self, req):

View File

@ -91,12 +91,12 @@ class EngineManager(manager.Manager):
return res
def create_stack(self, context, stack_name, template):
def create_stack(self, context, stack_name, template, params):
if stack_db.has_key(stack_name):
return {'Error': 'Stack already exists with that name.'}
logger.info('template is %s' % template)
stack_db[stack_name] = parser.Stack(stack_name, template)
stack_db[stack_name] = parser.Stack(stack_name, template, params)
stack_db[stack_name].start()
return {'stack': {'id': stack_name}}