This commit is contained in:
Mitchell Hashimoto 2015-06-08 21:34:20 -07:00
parent fa2bcb8bc5
commit 23a48d6619
13 changed files with 16 additions and 17 deletions

View File

@ -1,9 +1,9 @@
package digitalocean package digitalocean
import ( import (
"golang.org/x/crypto/ssh"
"fmt" "fmt"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"golang.org/x/crypto/ssh"
) )
func sshAddress(state multistep.StateBag) (string, error) { func sshAddress(state multistep.StateBag) (string, error) {

View File

@ -1,9 +1,9 @@
package googlecompute package googlecompute
import ( import (
"golang.org/x/crypto/ssh"
"fmt" "fmt"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"golang.org/x/crypto/ssh"
) )
// sshAddress returns the ssh address. // sshAddress returns the ssh address.

View File

@ -1,10 +1,10 @@
package null package null
import ( import (
gossh "golang.org/x/crypto/ssh"
"fmt" "fmt"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"github.com/mitchellh/packer/communicator/ssh" "github.com/mitchellh/packer/communicator/ssh"
gossh "golang.org/x/crypto/ssh"
"io/ioutil" "io/ioutil"
) )

View File

@ -1,10 +1,10 @@
package openstack package openstack
import ( import (
"golang.org/x/crypto/ssh"
"errors" "errors"
"fmt" "fmt"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"golang.org/x/crypto/ssh"
"time" "time"
"github.com/mitchellh/gophercloud-fork-40444fb" "github.com/mitchellh/gophercloud-fork-40444fb"

View File

@ -3,10 +3,10 @@ package common
import ( import (
"fmt" "fmt"
"golang.org/x/crypto/ssh"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
commonssh "github.com/mitchellh/packer/common/ssh" commonssh "github.com/mitchellh/packer/common/ssh"
packerssh "github.com/mitchellh/packer/communicator/ssh" packerssh "github.com/mitchellh/packer/communicator/ssh"
"golang.org/x/crypto/ssh"
) )
func SSHAddress(state multistep.StateBag) (string, error) { func SSHAddress(state multistep.StateBag) (string, error) {

View File

@ -3,10 +3,10 @@ package qemu
import ( import (
"fmt" "fmt"
gossh "golang.org/x/crypto/ssh"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
commonssh "github.com/mitchellh/packer/common/ssh" commonssh "github.com/mitchellh/packer/common/ssh"
"github.com/mitchellh/packer/communicator/ssh" "github.com/mitchellh/packer/communicator/ssh"
gossh "golang.org/x/crypto/ssh"
) )
func sshAddress(state multistep.StateBag) (string, error) { func sshAddress(state multistep.StateBag) (string, error) {

View File

@ -3,10 +3,10 @@ package common
import ( import (
"fmt" "fmt"
gossh "golang.org/x/crypto/ssh"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
commonssh "github.com/mitchellh/packer/common/ssh" commonssh "github.com/mitchellh/packer/common/ssh"
"github.com/mitchellh/packer/communicator/ssh" "github.com/mitchellh/packer/communicator/ssh"
gossh "golang.org/x/crypto/ssh"
) )
func SSHAddress(state multistep.StateBag) (string, error) { func SSHAddress(state multistep.StateBag) (string, error) {

View File

@ -7,10 +7,10 @@ import (
"log" "log"
"os" "os"
gossh "golang.org/x/crypto/ssh"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
commonssh "github.com/mitchellh/packer/common/ssh" commonssh "github.com/mitchellh/packer/common/ssh"
"github.com/mitchellh/packer/communicator/ssh" "github.com/mitchellh/packer/communicator/ssh"
gossh "golang.org/x/crypto/ssh"
) )
func SSHAddressFunc(config *SSHConfig) func(multistep.StateBag) (string, error) { func SSHAddressFunc(config *SSHConfig) func(multistep.StateBag) (string, error) {

View File

@ -3,12 +3,11 @@ package iso
import ( import (
"fmt" "fmt"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
vmwcommon "github.com/mitchellh/packer/builder/vmware/common" vmwcommon "github.com/mitchellh/packer/builder/vmware/common"
"github.com/mitchellh/packer/packer"
"path/filepath" "path/filepath"
) )
// This step upload the VMX to the remote host // This step upload the VMX to the remote host
// //
// Uses: // Uses:
@ -18,7 +17,7 @@ import (
// //
// Produces: // Produces:
// <nothing> // <nothing>
type StepUploadVMX struct{ type StepUploadVMX struct {
RemoteType string RemoteType string
} }
@ -31,7 +30,7 @@ func (c *StepUploadVMX) Run(state multistep.StateBag) multistep.StepAction {
if c.RemoteType == "esx5" { if c.RemoteType == "esx5" {
remoteDriver, ok := driver.(RemoteDriver) remoteDriver, ok := driver.(RemoteDriver)
if ok { if ok {
remoteVmxPath := filepath.ToSlash(filepath.Join(fmt.Sprintf("%s",remoteDriver), filepath.Base(vmxPath))) remoteVmxPath := filepath.ToSlash(filepath.Join(fmt.Sprintf("%s", remoteDriver), filepath.Base(vmxPath)))
if err := remoteDriver.upload(remoteVmxPath, vmxPath); err != nil { if err := remoteDriver.upload(remoteVmxPath, vmxPath); err != nil {
state.Put("error", fmt.Errorf("Error writing VMX: %s", err)) state.Put("error", fmt.Errorf("Error writing VMX: %s", err))
return multistep.ActionHalt return multistep.ActionHalt

View File

@ -1,12 +1,12 @@
package common package common
import ( import (
gossh "golang.org/x/crypto/ssh"
"errors" "errors"
"fmt" "fmt"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"github.com/mitchellh/packer/communicator/ssh" "github.com/mitchellh/packer/communicator/ssh"
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
gossh "golang.org/x/crypto/ssh"
"log" "log"
"strings" "strings"
"time" "time"

View File

@ -3,10 +3,10 @@ package ssh
import ( import (
"bufio" "bufio"
"bytes" "bytes"
"golang.org/x/crypto/ssh"
"errors" "errors"
"fmt" "fmt"
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
"golang.org/x/crypto/ssh"
"io" "io"
"io/ioutil" "io/ioutil"
"log" "log"

View File

@ -4,9 +4,9 @@ package ssh
import ( import (
"bytes" "bytes"
"golang.org/x/crypto/ssh"
"fmt" "fmt"
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
"golang.org/x/crypto/ssh"
"net" "net"
"testing" "testing"
) )