2017-03-03 03:56:17 -05:00
|
|
|
package ecs
|
|
|
|
|
|
|
|
import (
|
2017-06-01 20:14:51 -04:00
|
|
|
"time"
|
|
|
|
|
2018-01-19 19:18:44 -05:00
|
|
|
"github.com/hashicorp/packer/helper/multistep"
|
2017-05-25 06:27:54 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// modified in tests
|
|
|
|
sshHostSleepDuration = time.Second
|
2017-03-03 03:56:17 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
type alicloudSSHHelper interface {
|
|
|
|
}
|
|
|
|
|
|
|
|
// SSHHost returns a function that can be given to the SSH communicator
|
|
|
|
func SSHHost(e alicloudSSHHelper, private bool) func(multistep.StateBag) (string, error) {
|
|
|
|
return func(state multistep.StateBag) (string, error) {
|
|
|
|
ipAddress := state.Get("ipaddress").(string)
|
|
|
|
return ipAddress, nil
|
|
|
|
}
|
|
|
|
}
|