code: def _heat_deploy(self, stack, stack_name, template_path, parameters,
                       environments, timeout):
          
  
          self.log.debug("Processing environment files")
          env_files, env = (
              template_utils.process_multiple_environments_and_files(
                  environments))
  
          self.log.debug("Getting template contents")
          template_files, template = template_utils.get_template_contents(
              template_path)
  
          files = dict(list(template_files.items()) + list(env_files.items()))
  
          clients = self.app.client_manager
          orchestration_client = clients.rdomanager_oscplugin.orchestration()
  
          self.log.debug("Deploying stack: %s", stack_name)
          self.log.debug("Deploying template: %s", template)
          self.log.debug("Deploying parameters: %s", parameters)
          self.log.debug("Deploying environment: %s", env)
          self.log.debug("Deploying files: %s", files)
  
          stack_args = {
              'stack_name': stack_name,
              'template': template,
              'parameters': parameters,
              'environment': env,
              'files': files
          }
  
          if timeout:
              stack_args['timeout_mins'] = timeout
  
          if stack is None:
              self.log.info("Performing Heat stack create")
              orchestration_client.stacks.create(**stack_args)
          else:
              self.log.info("Performing Heat stack update")
              # Make sure existing parameters for stack are reused
              stack_args['existing'] = 'true'
              orchestration_client.stacks.update(stack.id, **stack_args)
  
          create_result = utils.wait_for_stack_ready(
              orchestration_client, stack_name)
          if not create_result:
              if stack is None:
                  raise Exception("Heat Stack create failed.")
              else:
                  raise Exception("Heat Stack update failed.")
docs: Verify the Baremetal nodes are available and do a stack update