Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
202 changes: 0 additions & 202 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ You can check out packer [here](https://packer.io).


## Dependencies
* Packer >= 0.7.2 (https://packer.io)
* Packer >= 1.5.3 (https://packer.io)
* XenServer > 6.2 (http://xenserver.org)
* Golang (tested with 1.2.1)
* Golang (tested with 1.13.6)


## Install Go
Expand All @@ -23,10 +23,10 @@ Follow these instructions and install golang on your system:
Clone the Packer repository:

```shell
git clone https://github.com/mitchellh/packer.git
git clone https://github.com/hashicorp/packer.git
```

Then follow the [instructions to build and install a development version of Packer](https://github.com/mitchellh/packer#developing-packer).
Then follow the [instructions to build and install a development version of Packer](https://github.com/hashicorp/packer/blob/master/.github/CONTRIBUTING.md#setting-up-go-to-work-on-packer).

## Compile the plugin

Expand Down
2 changes: 1 addition & 1 deletion builder/xenserver/common/artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package common

import (
"fmt"
"github.com/mitchellh/packer/packer"
"github.com/hashicorp/packer/packer"
"os"
"path/filepath"
)
Expand Down
8 changes: 4 additions & 4 deletions builder/xenserver/common/common_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os"
"time"

"github.com/hashicorp/packer/common"
helperssh "github.com/hashicorp/packer/helper/ssh"
"github.com/hashicorp/packer/template/interpolate"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/common"
commonssh "github.com/mitchellh/packer/common/ssh"
"github.com/mitchellh/packer/template/interpolate"
xsclient "github.com/xenserver/go-xenserver-client"
)

Expand Down Expand Up @@ -163,7 +163,7 @@ func (c *CommonConfig) Prepare(ctx *interpolate.Context, pc *common.PackerConfig
if c.SSHKeyPath != "" {
if _, err := os.Stat(c.SSHKeyPath); err != nil {
errs = append(errs, fmt.Errorf("ssh_key_path is invalid: %s", err))
} else if _, err := commonssh.FileSigner(c.SSHKeyPath); err != nil {
} else if _, err := helperssh.FileSigner(c.SSHKeyPath); err != nil {
errs = append(errs, fmt.Errorf("ssh_key_path is invalid: %s", err))
}
}
Expand Down
2 changes: 1 addition & 1 deletion builder/xenserver/common/http_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"crypto/tls"
"fmt"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"github.com/hashicorp/packer/packer"
xsclient "github.com/xenserver/go-xenserver-client"
"log"
"net/http"
Expand Down
15 changes: 9 additions & 6 deletions builder/xenserver/common/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package common
import (
"bytes"
"fmt"
"github.com/mitchellh/multistep"
commonssh "github.com/mitchellh/packer/common/ssh"
"github.com/mitchellh/packer/communicator/ssh"
"github.com/hashicorp/packer/communicator/ssh"
"github.com/hashicorp/packer/helper/multistep"
helperssh "github.com/hashicorp/packer/helper/ssh"
gossh "golang.org/x/crypto/ssh"
"io"
"log"
Expand Down Expand Up @@ -47,7 +47,7 @@ func SSHConfigFunc(config SSHConfig) func(multistep.StateBag) (*gossh.ClientConf
}

if config.SSHKeyPath != "" {
signer, err := commonssh.FileSigner(config.SSHKeyPath)
signer, err := helperssh.FileSigner(config.SSHKeyPath)
if err != nil {
return nil, err
}
Expand All @@ -56,8 +56,9 @@ func SSHConfigFunc(config SSHConfig) func(multistep.StateBag) (*gossh.ClientConf
}

return &gossh.ClientConfig{
User: config.SSHUser,
Auth: auth,
User: config.SSHUser,
Auth: auth,
HostKeyCallback: gossh.InsecureIgnoreHostKey(),
}, nil
}
}
Expand Down Expand Up @@ -94,6 +95,7 @@ func ExecuteHostSSHCmd(state multistep.StateBag, cmd string) (stdout string, err
Auth: []gossh.AuthMethod{
gossh.Password(config.Password),
},
HostKeyCallback: gossh.InsecureIgnoreHostKey(),
}
return doExecuteSSHCmd(cmd, sshAddress, sshConfig)
}
Expand Down Expand Up @@ -162,6 +164,7 @@ func ssh_port_forward(local_listener net.Listener, remote_port uint, remote_dest
Auth: []gossh.AuthMethod{
gossh.Password(password),
},
HostKeyCallback: gossh.InsecureIgnoreHostKey(),
}

for {
Expand Down
8 changes: 4 additions & 4 deletions builder/xenserver/common/ssh_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"time"

"github.com/mitchellh/packer/helper/communicator"
"github.com/mitchellh/packer/template/interpolate"
"github.com/hashicorp/packer/helper/communicator"
"github.com/hashicorp/packer/template/interpolate"
)

type SSHConfig struct {
Expand All @@ -17,7 +17,7 @@ type SSHConfig struct {

// These are deprecated, but we keep them around for BC
// TODO(@mitchellh): remove
SSHKeyPath string `mapstructure:"ssh_key_path"`
SSHKeyPath []byte `mapstructure:"ssh_key_path"`
SSHWaitTimeout time.Duration `mapstructure:"ssh_wait_timeout"`
}

Expand All @@ -31,7 +31,7 @@ func (c *SSHConfig) Prepare(ctx *interpolate.Context) []error {
}

// TODO: backwards compatibility, write fixer instead
if c.SSHKeyPath != "" {
if len(c.SSHKeyPath) == 0 {
c.Comm.SSHPrivateKey = c.SSHKeyPath
}
if c.SSHWaitTimeout != 0 {
Expand Down
7 changes: 4 additions & 3 deletions builder/xenserver/common/step_attach_vdi.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package common

import (
"context"
"fmt"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"github.com/hashicorp/packer/helper/multistep"
"github.com/hashicorp/packer/packer"
xsclient "github.com/xenserver/go-xenserver-client"
"log"
)
Expand All @@ -15,7 +16,7 @@ type StepAttachVdi struct {
vdi *xsclient.VDI
}

func (self *StepAttachVdi) Run(state multistep.StateBag) multistep.StepAction {
func (self *StepAttachVdi) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction {
ui := state.Get("ui").(packer.Ui)
client := state.Get("client").(xsclient.XenAPIClient)

Expand Down
7 changes: 4 additions & 3 deletions builder/xenserver/common/step_boot_wait.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package common

import (
"context"
"fmt"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"github.com/hashicorp/packer/helper/multistep"
"github.com/hashicorp/packer/packer"
xsclient "github.com/xenserver/go-xenserver-client"
)

type StepBootWait struct{}

func (self *StepBootWait) Run(state multistep.StateBag) multistep.StepAction {
func (self *StepBootWait) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction {
client := state.Get("client").(xsclient.XenAPIClient)
config := state.Get("commonconfig").(CommonConfig)
ui := state.Get("ui").(packer.Ui)
Expand Down
Loading