def __init__(self, name, template_file=None, heat_parameters=None): super(HeatTemplate, self).__init__() self.name = name self.state = "NOT_CREATED" self.keystone_client = None self.heat_parameters = {} # heat_parameters is passed to heat in stack create, empty dict when # yardstick creates the template (no get_param in resources part) if heat_parameters: self.heat_parameters = heat_parameters if template_file: with open(template_file) as stream: print("Parsing external template:", template_file) template_str = stream.read() self._template = template_format.parse(template_str) self._parameters = heat_parameters else: self._init_template() # holds results of requested output after deployment self.outputs = {} log.debug("template object '%s' created", name)
def __init__(self, name, template_file=None, heat_parameters=None): super(HeatTemplate, self).__init__() self.name = name self.state = "NOT_CREATED" self.keystone_client = None self.heat_client = None self.heat_parameters = {} # heat_parameters is passed to heat in stack create, empty dict when # yardstick creates the template (no get_param in resources part) if heat_parameters: self.heat_parameters = heat_parameters if template_file: with open(template_file) as stream: print "Parsing external template:", template_file template_str = stream.read() self._template = template_format.parse(template_str) self._parameters = heat_parameters else: self._init_template() # holds results of requested output after deployment self.outputs = {} log.debug("template object '%s' created", name)
def __init__(self, name, template_file=None, heat_parameters=None): self.name = name self.keystone_client = None self.heat_parameters = {} # heat_parameters is passed to heat in stack create, empty dict when # yardstick creates the template (no get_param in resources part) if heat_parameters: self.heat_parameters = heat_parameters if template_file: with open(template_file) as stream: log.info('Parsing external template: %s', template_file) template_str = stream.read() self._template = template_format.parse(template_str) self._parameters = heat_parameters else: self._init_template() log.debug("template object '%s' created", name)