

def _deploy_from_hot(self, specification, server_endpoint, base_dir=None):
    accommodation = normalize_accommodation((specification.get('accommodation') or specification.get('vm_accommodation')))
    agents = generate_agents(self._get_compute_nodes(accommodation), accommodation, self.stack_name)
    vars_values = {
        'agents': agents,
        'unique': self.stack_name,
    }
    heat_template = utils.read_file(specification['template'], base_dir=base_dir)
    compiled_template = jinja2.Template(heat_template)
    rendered_template = compiled_template.render(vars_values)
    LOG.debug('Rendered template: %s', rendered_template)
    merged_parameters = {
        'server_endpoint': server_endpoint,
        'external_net': self.external_net,
        'image': self.image_name,
        'flavor': self.flavor_name,
    }
    merged_parameters.update(specification.get('template_parameters', {
        
    }))
    self.has_stack = True
    stack_id = heat.create_stack(self.openstack_client.heat, self.stack_name, rendered_template, merged_parameters)
    outputs = heat.get_stack_outputs(self.openstack_client.heat, stack_id)
    override = self._get_override(stack_id.get('override'))
    agents = filter_agents(agents, outputs, override)
    if ((not self.privileged_mode) and (accommodation.get('density', 1) == 1)):
        get_host_fn = functools.partial(nova.get_server_host_id, self.openstack_client.nova)
        agents = distribute_agents(agents, get_host_fn)
    return agents

dataset/ETHPy150Open openstack/shaker/shaker/engine/deploy.py Deployment._deploy_from_hot/VarMisuse@215/339 `specification`->`stack_id`