github.com/rothwerx/packer@v0.9.0/builder/parallels/common/ssh_config.go (about)

     1  package common
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/mitchellh/packer/helper/communicator"
     7  	"github.com/mitchellh/packer/template/interpolate"
     8  )
     9  
    10  type SSHConfig struct {
    11  	Comm communicator.Config `mapstructure:",squash"`
    12  
    13  	// These are deprecated, but we keep them around for BC
    14  	// TODO(@mitchellh): remove
    15  	SSHWaitTimeout time.Duration `mapstructure:"ssh_wait_timeout"`
    16  }
    17  
    18  func (c *SSHConfig) Prepare(ctx *interpolate.Context) []error {
    19  	// TODO: backwards compatibility, write fixer instead
    20  	if c.SSHWaitTimeout != 0 {
    21  		c.Comm.SSHTimeout = c.SSHWaitTimeout
    22  	}
    23  
    24  	return c.Comm.Prepare(ctx)
    25  }