예제 #1
0
    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)
예제 #2
0
파일: heat.py 프로젝트: sdnnfv/yardstick
    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)
예제 #3
0
    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)