Correct heat/stack_data template print

Currently flame returns:

  ### Heat Template ###
  ... heat template ...

  None

  ### Stack Data ###
  ... heat template ...

  None

Because TemplateGenerator.heat_template/stack_data_template print
templates and return None instead of returning templates. This change
corrects previous methods to output:

  ### Heat Template ###
  ... heat template ...

  ### Stack Data ###
  ... heat template ...

Change-Id: I9f9ad3e859beba583c9db4a0420ec2dd9c3bc8c9
This commit is contained in:
Cedric Brandily 2014-11-07 21:23:01 +01:00
parent ca3f5b8dcc
commit e479b5714a
1 changed files with 4 additions and 4 deletions

View File

@ -111,8 +111,8 @@ class TemplateGenerator(object):
for index, element in enumerate(data))
@staticmethod
def print_generated(filename):
print(yaml.safe_dump(filename, default_flow_style=False))
def format_template(filename):
return yaml.safe_dump(filename, default_flow_style=False)
def add_resource(self, name, status, resource_id, resource_type):
resource = {
@ -606,7 +606,7 @@ class TemplateGenerator(object):
self._extract_volumes()
def heat_template(self):
return self.print_generated(self.template)
return self.format_template(self.template)
def stack_data_template(self):
return self.print_generated(self.stack_data)
return self.format_template(self.stack_data)