packer-cn/builder/cloudstack/ssh.go

17 lines
300 B
Go
Raw Normal View History

2016-01-11 06:22:41 -05:00
package cloudstack
import (
"fmt"
"github.com/hashicorp/packer/helper/multistep"
2016-01-11 06:22:41 -05:00
)
func commPort(state multistep.StateBag) (int, error) {
commPort, hasPort := state.Get("commPort").(int)
if !hasPort {
return 0, fmt.Errorf("Failed to retrieve communication port")
2016-01-11 06:22:41 -05:00
}
return commPort, nil
2016-01-11 06:22:41 -05:00
}