diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5fc387f58..e6881a2d3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,8 +4,8 @@ Describe the change you are making here! Please include tests. Check out these examples: -- https://github.com/mitchellh/packer/blob/master/builder/virtualbox/common/ssh_config_test.go#L19-L37 -- https://github.com/mitchellh/packer/blob/master/post-processor/compress/post-processor_test.go#L153-L182 +- https://github.com/hashicorp/packer/blob/master/builder/virtualbox/common/ssh_config_test.go#L19-L37 +- https://github.com/hashicorp/packer/blob/master/post-processor/compress/post-processor_test.go#L153-L182 If your PR resolves any open issue(s), please indicate them like this so they will be closed when your PR is merged: diff --git a/CHANGELOG.md b/CHANGELOG.md index 74db92757..bc9cd6389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,22 @@ ## (Unreleased) +### IMPROVEMENTS: + +* builder/amazon: validate ami name. [GH-4762] +* builder/digitalocean: Added support for monitoring. [GH-4782] +* builder/openstack: Add ssh agent support. [GH-4655] +* builder/parallels-iso: Configuration of disk type, plain or expanding. + [GH-4621] + +## 1.0.0 (April 4, 2017) + ### BUG FIXES: -* builder/googlecompute: Correct values for `on_host_maintenance`. [GH-4643] -* builder/amazon: Fix crash in `step_region_copy`. [GH-4642] +* core: fix version number +* communicator/ssh: don't return error if we can't close connection. #4741 +* builder/googlecompute: Use "default" service account. [GH-4749] +* core: Invoking packer `--help` or `--version` now exits with status 0. + [GH-4723] * core: show correct step name when debugging. [GH-4672] * builder/virtualbox: fix `none` communicator by allowing skipping upload of version file. [GH-4678] @@ -12,22 +25,21 @@ * builder/amazon: Fix b/c issue by reporting again the tags we create. [GH-4704] * builder/virtualbox: retry removing floppy controller. [GH-4705] -* builder/googlecompute: Use "default" service account. [GH-4749] +* builder/googlecompute: Correct values for `on_host_maintenance`. [GH-4643] +* builder/amazon: Fix crash in `step_region_copy`. [GH-4642] -### IMRPOVEMENTS: +### IMPROVEMENTS: -* builder/amazon: validate ssh key name/file. [GH-4665] -* builder/amazon: set force_deregister to true on -force. [GH-4649] -* builder/hyper-v: validate output dir in step, not in config. [GH-4645] -* website: fix display on ios devices. [GH-4618] -* builder/openstack: Add ssh agent support. [GH-4655] -* builder/parallels-iso: Configuration of disk type, plain or expanding. - [GH-4621] +* More diligently try to complete azure-setup.sh. [GH-4752] * builder/ansible: Clearer error message when we have problems getting the ansible version. [GH-4694] * builder/amazon-chroot: Ability to give an empty list in `copy_files` to prevent the default `/etc/resolv.conf` file from being copied. If `copy_files` isn't given at all, the default behavior remains. [GH-4708] +* builder/amazon: validate ssh key name/file. [GH-4665] +* builder/amazon: set force_deregister to true on -force. [GH-4649] +* builder/hyper-v: validate output dir in step, not in config. [GH-4645] +* website: fix display on ios devices. [GH-4618] ## 0.12.3 (March 1, 2017) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 131c27256..b4025859e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,28 +65,28 @@ following steps in order to be able to compile and test Packer. These instructio ``` 3. Download the Packer source (and its dependencies) by running `go get - github.com/mitchellh/packer`. This will download the Packer source to - `$GOPATH/src/github.com/mitchellh/packer`. + github.com/hashicorp/packer`. This will download the Packer source to + `$GOPATH/src/github.com/hashicorp/packer`. -4. When working on packer `cd $GOPATH/src/github.com/mitchellh/packer` so you +4. When working on packer `cd $GOPATH/src/github.com/hashicorp/packer` so you can run `make` and easily access other files. Run `make help` to get information about make targets. 5. Make your changes to the Packer source. You can run `make` in - `$GOPATH/src/github.com/mitchellh/packer` to run tests and build the packer + `$GOPATH/src/github.com/hashicorp/packer` to run tests and build the packer binary. Any compilation errors will be shown when the binaries are rebuilding. If you don't have `make` you can simply run `go build -o bin/packer .` from the project root. 6. After running building packer successfully, use - `$GOPATH/src/github.com/mitchellh/packer/bin/packer` to build a machine and - verify your changes work. For instance: `$GOPATH/src/github.com/mitchellh/packer/bin/packer build template.json`. + `$GOPATH/src/github.com/hashicorp/packer/bin/packer` to build a machine and + verify your changes work. For instance: `$GOPATH/src/github.com/hashicorp/packer/bin/packer build template.json`. 7. If everything works well and the tests pass, run `go fmt` on your code before submitting a pull-request. ### Opening an Pull Request -When you are ready to open a pull-request, you will need to [fork packer](https://github.com/mitchellh/packer#fork-destination-box), push your changes to your fork, and then open a pull-request. +When you are ready to open a pull-request, you will need to [fork packer](https://github.com/hashicorp/packer#fork-destination-box), push your changes to your fork, and then open a pull-request. For example, my github username is `cbednarski` so I would do the following: @@ -104,7 +104,7 @@ From there, open your fork in your browser to open a new pull-request. The easiest way to work on a fork is to set it as a remote of the packer project. After following the steps in "Setting up Go to work on Packer": -1. Navigate to $GOPATH/src/github.com/mitchellh/packer +1. Navigate to $GOPATH/src/github.com/hashicorp/packer 2. Add the remote `git remote add `. For example `git remote add mwhooker https://github.com/mwhooker/packer.git`. 3. Checkout a feature branch: `git checkout -b new-feature` 4. Make changes diff --git a/README.md b/README.md index 6c767ce49..b61dd6d8b 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ [![GoDoc][godoc-badge]][godoc] [![GoReportCard][report-badge]][report] -[travis-badge]: https://travis-ci.org/mitchellh/packer.svg?branch=master -[travis]: https://travis-ci.org/mitchellh/packer +[travis-badge]: https://travis-ci.org/hashicorp/packer.svg?branch=master +[travis]: https://travis-ci.org/hashicorp/packer [appveyor-badge]: https://ci.appveyor.com/api/projects/status/github/mitchellh/packer?branch=master&svg=true [appveyor]: https://ci.appveyor.com/project/hashicorp/packer [godoc-badge]: https://godoc.org/github.com/mitchellh/packer?status.svg @@ -49,7 +49,7 @@ The images that Packer creates can easily be turned into ## Quick Start Download and install packages and dependencies ``` -go get github.com/mitchellh/packer +go get github.com/hashicorp/packer ``` **Note:** There is a great @@ -107,4 +107,4 @@ http://www.packer.io/docs ## Developing Packer -See [CONTRIBUTING.md](https://github.com/mitchellh/packer/blob/master/CONTRIBUTING.md) for best practices and instructions on setting up your development environment to work on Packer. +See [CONTRIBUTING.md](https://github.com/hashicorp/packer/blob/master/CONTRIBUTING.md) for best practices and instructions on setting up your development environment to work on Packer. diff --git a/appveyor.yml b/appveyor.yml index 516d58ccc..ecdff4f91 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,9 +29,9 @@ build_script: - ps: | go.exe test (go.exe list ./... ` |? { -not $_.Contains('/vendor/') } ` - |? { $_ -ne 'github.com/mitchellh/packer/builder/parallels/common' } ` - |? { $_ -ne 'github.com/mitchellh/packer/common' }` - |? { $_ -ne 'github.com/mitchellh/packer/provisioner/ansible' }) + |? { $_ -ne 'github.com/hashicorp/packer/builder/parallels/common' } ` + |? { $_ -ne 'github.com/hashicorp/packer/common' }` + |? { $_ -ne 'github.com/hashicorp/packer/provisioner/ansible' }) test: off diff --git a/builder/amazon/chroot/builder.go b/builder/amazon/chroot/builder.go index e3958ace0..cd32d3bce 100644 --- a/builder/amazon/chroot/builder.go +++ b/builder/amazon/chroot/builder.go @@ -11,12 +11,12 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) // The unique ID for this builder diff --git a/builder/amazon/chroot/builder_test.go b/builder/amazon/chroot/builder_test.go index 525291d8c..a52714030 100644 --- a/builder/amazon/chroot/builder_test.go +++ b/builder/amazon/chroot/builder_test.go @@ -3,7 +3,7 @@ package chroot import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/builder/amazon/chroot/communicator.go b/builder/amazon/chroot/communicator.go index 24284efab..854522caa 100644 --- a/builder/amazon/chroot/communicator.go +++ b/builder/amazon/chroot/communicator.go @@ -12,7 +12,7 @@ import ( "strings" "syscall" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // Communicator is a special communicator that works by executing diff --git a/builder/amazon/chroot/communicator_test.go b/builder/amazon/chroot/communicator_test.go index 56745a681..7017b9e02 100644 --- a/builder/amazon/chroot/communicator_test.go +++ b/builder/amazon/chroot/communicator_test.go @@ -1,7 +1,7 @@ package chroot import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/amazon/chroot/run_local_commands.go b/builder/amazon/chroot/run_local_commands.go index bc339ed11..024a208f8 100644 --- a/builder/amazon/chroot/run_local_commands.go +++ b/builder/amazon/chroot/run_local_commands.go @@ -3,9 +3,9 @@ package chroot import ( "fmt" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/post-processor/shell-local" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/post-processor/shell-local" + "github.com/hashicorp/packer/template/interpolate" ) func RunLocalCommands(commands []string, wrappedCommand CommandWrapper, ctx interpolate.Context, ui packer.Ui) error { diff --git a/builder/amazon/chroot/step_attach_volume.go b/builder/amazon/chroot/step_attach_volume.go index 486948c27..6b83f440b 100644 --- a/builder/amazon/chroot/step_attach_volume.go +++ b/builder/amazon/chroot/step_attach_volume.go @@ -7,9 +7,9 @@ import ( "time" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" ) // StepAttachVolume attaches the previously created volume to an diff --git a/builder/amazon/chroot/step_check_root_device.go b/builder/amazon/chroot/step_check_root_device.go index 29df2933d..fa0097aa4 100644 --- a/builder/amazon/chroot/step_check_root_device.go +++ b/builder/amazon/chroot/step_check_root_device.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepCheckRootDevice makes sure the root device on the AMI is EBS-backed. diff --git a/builder/amazon/chroot/step_chroot_provision.go b/builder/amazon/chroot/step_chroot_provision.go index 168b65bb8..941e071b1 100644 --- a/builder/amazon/chroot/step_chroot_provision.go +++ b/builder/amazon/chroot/step_chroot_provision.go @@ -3,8 +3,8 @@ package chroot import ( "log" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepChrootProvision provisions the instance within a chroot. diff --git a/builder/amazon/chroot/step_copy_files.go b/builder/amazon/chroot/step_copy_files.go index 844e9e5c1..534ec268a 100644 --- a/builder/amazon/chroot/step_copy_files.go +++ b/builder/amazon/chroot/step_copy_files.go @@ -3,8 +3,8 @@ package chroot import ( "bytes" "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" "path/filepath" ) diff --git a/builder/amazon/chroot/step_create_volume.go b/builder/amazon/chroot/step_create_volume.go index a527d86dd..c1ecbf1a9 100644 --- a/builder/amazon/chroot/step_create_volume.go +++ b/builder/amazon/chroot/step_create_volume.go @@ -6,9 +6,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" ) // StepCreateVolume creates a new volume from the snapshot of the root diff --git a/builder/amazon/chroot/step_early_cleanup.go b/builder/amazon/chroot/step_early_cleanup.go index a7b08a26b..edcef49fc 100644 --- a/builder/amazon/chroot/step_early_cleanup.go +++ b/builder/amazon/chroot/step_early_cleanup.go @@ -2,8 +2,8 @@ package chroot import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/amazon/chroot/step_early_unflock.go b/builder/amazon/chroot/step_early_unflock.go index 138e06495..4b24b8581 100644 --- a/builder/amazon/chroot/step_early_unflock.go +++ b/builder/amazon/chroot/step_early_unflock.go @@ -2,8 +2,8 @@ package chroot import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/amazon/chroot/step_flock.go b/builder/amazon/chroot/step_flock.go index 9f7ca54b8..648ec2acc 100644 --- a/builder/amazon/chroot/step_flock.go +++ b/builder/amazon/chroot/step_flock.go @@ -2,8 +2,8 @@ package chroot import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" "os" "path/filepath" diff --git a/builder/amazon/chroot/step_instance_info.go b/builder/amazon/chroot/step_instance_info.go index ceba307cc..9f331189c 100644 --- a/builder/amazon/chroot/step_instance_info.go +++ b/builder/amazon/chroot/step_instance_info.go @@ -5,9 +5,9 @@ import ( "log" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" ) // StepInstanceInfo verifies that this builder is running on an EC2 instance. diff --git a/builder/amazon/chroot/step_mount_device.go b/builder/amazon/chroot/step_mount_device.go index 0ea3b0529..8f740bd6e 100644 --- a/builder/amazon/chroot/step_mount_device.go +++ b/builder/amazon/chroot/step_mount_device.go @@ -9,9 +9,9 @@ import ( "strings" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type mountPathData struct { diff --git a/builder/amazon/chroot/step_mount_extra.go b/builder/amazon/chroot/step_mount_extra.go index b3ef764b5..3bd8951c7 100644 --- a/builder/amazon/chroot/step_mount_extra.go +++ b/builder/amazon/chroot/step_mount_extra.go @@ -3,8 +3,8 @@ package chroot import ( "bytes" "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "os" "os/exec" "syscall" diff --git a/builder/amazon/chroot/step_post_mount_commands.go b/builder/amazon/chroot/step_post_mount_commands.go index 2eb50926c..de927f9aa 100644 --- a/builder/amazon/chroot/step_post_mount_commands.go +++ b/builder/amazon/chroot/step_post_mount_commands.go @@ -1,8 +1,8 @@ package chroot import ( + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type postMountCommandsData struct { diff --git a/builder/amazon/chroot/step_pre_mount_commands.go b/builder/amazon/chroot/step_pre_mount_commands.go index e4561c2d7..63aa6d15a 100644 --- a/builder/amazon/chroot/step_pre_mount_commands.go +++ b/builder/amazon/chroot/step_pre_mount_commands.go @@ -1,8 +1,8 @@ package chroot import ( + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type preMountCommandsData struct { diff --git a/builder/amazon/chroot/step_prepare_device.go b/builder/amazon/chroot/step_prepare_device.go index 62ac82b93..6cbefb2cc 100644 --- a/builder/amazon/chroot/step_prepare_device.go +++ b/builder/amazon/chroot/step_prepare_device.go @@ -5,8 +5,8 @@ import ( "log" "os" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepPrepareDevice finds an available device and sets it. diff --git a/builder/amazon/chroot/step_register_ami.go b/builder/amazon/chroot/step_register_ami.go index 8523b595a..d387eada8 100644 --- a/builder/amazon/chroot/step_register_ami.go +++ b/builder/amazon/chroot/step_register_ami.go @@ -5,9 +5,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" ) // StepRegisterAMI creates the AMI. diff --git a/builder/amazon/chroot/step_snapshot.go b/builder/amazon/chroot/step_snapshot.go index 4761abed6..5cd646662 100644 --- a/builder/amazon/chroot/step_snapshot.go +++ b/builder/amazon/chroot/step_snapshot.go @@ -6,9 +6,9 @@ import ( "time" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" ) // StepSnapshot creates a snapshot of the created volume. diff --git a/builder/amazon/common/access_config.go b/builder/amazon/common/access_config.go index 1fd66d091..eb501e070 100644 --- a/builder/amazon/common/access_config.go +++ b/builder/amazon/common/access_config.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // AccessConfig is for common configuration related to AWS access diff --git a/builder/amazon/common/ami_config.go b/builder/amazon/common/ami_config.go index a60d0d788..a0f299d37 100644 --- a/builder/amazon/common/ami_config.go +++ b/builder/amazon/common/ami_config.go @@ -2,8 +2,9 @@ package common import ( "fmt" + "regexp" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // AMIConfig is for common configuration related to creating AMIs. @@ -68,6 +69,18 @@ func (c *AMIConfig) Prepare(ctx *interpolate.Context) []error { errs = append(errs, fmt.Errorf("Cannot share snapshot encrypted with default KMS key")) } + if len(c.AMIName) < 3 || len(c.AMIName) > 128 { + errs = append(errs, fmt.Errorf("AMIName must be between 3 and 128 characters long")) + } + + amiNameRe := regexp.MustCompile(`^[0-9a-zA-Z().\-/_]+$`) + if !amiNameRe.MatchString(c.AMIName) { + errs = append(errs, fmt.Errorf("AMIName should only contain letters,"+ + " numbers, '(', ')', '.', '-', '/' and '_'. You can use the "+ + "`clean_ami_name` template filter to automatically clean your ami "+ + "name.")) + } + if len(errs) > 0 { return errs } diff --git a/builder/amazon/common/ami_config_test.go b/builder/amazon/common/ami_config_test.go index ecb88bcb4..ce85e7fef 100644 --- a/builder/amazon/common/ami_config_test.go +++ b/builder/amazon/common/ami_config_test.go @@ -74,3 +74,37 @@ func TestAMIConfigPrepare_Share_EncryptedBoot(t *testing.T) { t.Fatal("shouldn't be able to share ami with encrypted boot volume") } } + +func TestAMINameValidation(t *testing.T) { + c := testAMIConfig() + + c.AMIName = "aa" + if err := c.Prepare(nil); err == nil { + t.Fatal("shouldn't be able to have an ami name with less than 3 characters") + } + + var longAmiName string + for i := 0; i < 129; i++ { + longAmiName += "a" + } + c.AMIName = longAmiName + if err := c.Prepare(nil); err == nil { + t.Fatal("shouldn't be able to have an ami name with great than 128 characters") + } + + c.AMIName = "+aaa" + if err := c.Prepare(nil); err == nil { + t.Fatal("shouldn't be able to have an ami name with invalid characters") + } + + c.AMIName = "foo().-/_bar" + if err := c.Prepare(nil); err != nil { + t.Fatal("expected 'foobar' to be a valid ami name") + } + + c.AMIName = `xyz-base-2017-04-05-1934` + if err := c.Prepare(nil); err != nil { + t.Fatalf("expected `xyz-base-2017-04-05-1934` to pass validation.") + } + +} diff --git a/builder/amazon/common/artifact.go b/builder/amazon/common/artifact.go index 28331a4ec..c9f9a08b5 100644 --- a/builder/amazon/common/artifact.go +++ b/builder/amazon/common/artifact.go @@ -9,7 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // Artifact is an artifact implementation that contains built AMIs. diff --git a/builder/amazon/common/artifact_test.go b/builder/amazon/common/artifact_test.go index 46dfedf3f..ccbf0a1e3 100644 --- a/builder/amazon/common/artifact_test.go +++ b/builder/amazon/common/artifact_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestArtifact_Impl(t *testing.T) { diff --git a/builder/amazon/common/block_device.go b/builder/amazon/common/block_device.go index 949241463..57f6a4307 100644 --- a/builder/amazon/common/block_device.go +++ b/builder/amazon/common/block_device.go @@ -5,7 +5,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // BlockDevice diff --git a/builder/amazon/common/run_config.go b/builder/amazon/common/run_config.go index 154a519e9..0190df9f3 100644 --- a/builder/amazon/common/run_config.go +++ b/builder/amazon/common/run_config.go @@ -7,9 +7,9 @@ import ( "regexp" "time" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/template/interpolate" ) var reShutdownBehavior = regexp.MustCompile("^(stop|terminate)$") diff --git a/builder/amazon/common/run_config_test.go b/builder/amazon/common/run_config_test.go index ddf8822a2..7cf42ded1 100644 --- a/builder/amazon/common/run_config_test.go +++ b/builder/amazon/common/run_config_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/mitchellh/packer/helper/communicator" + "github.com/hashicorp/packer/helper/communicator" ) func init() { diff --git a/builder/amazon/common/ssh.go b/builder/amazon/common/ssh.go index 3057bf171..685914331 100644 --- a/builder/amazon/common/ssh.go +++ b/builder/amazon/common/ssh.go @@ -8,8 +8,8 @@ import ( "time" "github.com/aws/aws-sdk-go/service/ec2" + packerssh "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - packerssh "github.com/mitchellh/packer/communicator/ssh" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/agent" ) diff --git a/builder/amazon/common/step_ami_region_copy.go b/builder/amazon/common/step_ami_region_copy.go index 96496fe47..6020ae1de 100644 --- a/builder/amazon/common/step_ami_region_copy.go +++ b/builder/amazon/common/step_ami_region_copy.go @@ -8,8 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepAMIRegionCopy struct { diff --git a/builder/amazon/common/step_create_tags.go b/builder/amazon/common/step_create_tags.go index 42c221dbb..81ede5482 100644 --- a/builder/amazon/common/step_create_tags.go +++ b/builder/amazon/common/step_create_tags.go @@ -7,10 +7,10 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" + retry "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - retry "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type StepCreateTags struct { diff --git a/builder/amazon/common/step_deregister_ami.go b/builder/amazon/common/step_deregister_ami.go index 75c3fe239..139e2159c 100644 --- a/builder/amazon/common/step_deregister_ami.go +++ b/builder/amazon/common/step_deregister_ami.go @@ -5,8 +5,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepDeregisterAMI struct { diff --git a/builder/amazon/common/step_encrypted_ami.go b/builder/amazon/common/step_encrypted_ami.go index 6a4c2967e..8580927a2 100644 --- a/builder/amazon/common/step_encrypted_ami.go +++ b/builder/amazon/common/step_encrypted_ami.go @@ -6,8 +6,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepCreateEncryptedAMICopy struct { diff --git a/builder/amazon/common/step_get_password.go b/builder/amazon/common/step_get_password.go index 618e3bbb8..b457658b9 100644 --- a/builder/amazon/common/step_get_password.go +++ b/builder/amazon/common/step_get_password.go @@ -11,9 +11,9 @@ import ( "time" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" ) // StepGetPassword reads the password from a Windows server and sets it diff --git a/builder/amazon/common/step_key_pair.go b/builder/amazon/common/step_key_pair.go index c5e3ff13a..29972c9bc 100644 --- a/builder/amazon/common/step_key_pair.go +++ b/builder/amazon/common/step_key_pair.go @@ -7,8 +7,8 @@ import ( "runtime" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepKeyPair struct { diff --git a/builder/amazon/common/step_modify_ami_attributes.go b/builder/amazon/common/step_modify_ami_attributes.go index 647a37a25..3e86e5391 100644 --- a/builder/amazon/common/step_modify_ami_attributes.go +++ b/builder/amazon/common/step_modify_ami_attributes.go @@ -6,9 +6,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type StepModifyAMIAttributes struct { diff --git a/builder/amazon/common/step_modify_ebs_instance.go b/builder/amazon/common/step_modify_ebs_instance.go index 4f16eded7..11fa629d9 100644 --- a/builder/amazon/common/step_modify_ebs_instance.go +++ b/builder/amazon/common/step_modify_ebs_instance.go @@ -5,8 +5,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepModifyEBSBackedInstance struct { diff --git a/builder/amazon/common/step_pre_validate.go b/builder/amazon/common/step_pre_validate.go index 9ba97264f..01e1c6ddc 100644 --- a/builder/amazon/common/step_pre_validate.go +++ b/builder/amazon/common/step_pre_validate.go @@ -5,8 +5,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepPreValidate provides an opportunity to pre-validate any configuration for diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go index 0f33611a2..e6f0a2a87 100644 --- a/builder/amazon/common/step_run_source_instance.go +++ b/builder/amazon/common/step_run_source_instance.go @@ -11,9 +11,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type StepRunSourceInstance struct { diff --git a/builder/amazon/common/step_security_group.go b/builder/amazon/common/step_security_group.go index 3206fd254..5de1ebbc5 100644 --- a/builder/amazon/common/step_security_group.go +++ b/builder/amazon/common/step_security_group.go @@ -8,10 +8,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/private/waiter" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" ) type StepSecurityGroup struct { diff --git a/builder/amazon/common/step_source_ami_info.go b/builder/amazon/common/step_source_ami_info.go index 2346502fc..386e8e8db 100644 --- a/builder/amazon/common/step_source_ami_info.go +++ b/builder/amazon/common/step_source_ami_info.go @@ -7,8 +7,8 @@ import ( "time" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepSourceAMIInfo extracts critical information from the source AMI diff --git a/builder/amazon/common/step_stop_ebs_instance.go b/builder/amazon/common/step_stop_ebs_instance.go index cca60e75f..7a3f2bc15 100644 --- a/builder/amazon/common/step_stop_ebs_instance.go +++ b/builder/amazon/common/step_stop_ebs_instance.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepStopEBSBackedInstance struct { diff --git a/builder/amazon/common/step_tag_ebs_volumes.go b/builder/amazon/common/step_tag_ebs_volumes.go index 4d9c5d66a..cf4c69a17 100644 --- a/builder/amazon/common/step_tag_ebs_volumes.go +++ b/builder/amazon/common/step_tag_ebs_volumes.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type StepTagEBSVolumes struct { diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go index c36cb33e8..c4891ba4a 100644 --- a/builder/amazon/ebs/builder.go +++ b/builder/amazon/ebs/builder.go @@ -11,13 +11,13 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) // The unique ID for this builder diff --git a/builder/amazon/ebs/builder_acc_test.go b/builder/amazon/ebs/builder_acc_test.go index 2b3c3cc3e..c59712390 100644 --- a/builder/amazon/ebs/builder_acc_test.go +++ b/builder/amazon/ebs/builder_acc_test.go @@ -8,9 +8,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/mitchellh/packer/builder/amazon/common" - builderT "github.com/mitchellh/packer/helper/builder/testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/builder/amazon/common" + builderT "github.com/hashicorp/packer/helper/builder/testing" + "github.com/hashicorp/packer/packer" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/amazon/ebs/builder_test.go b/builder/amazon/ebs/builder_test.go index 945afbd95..4630a36cb 100644 --- a/builder/amazon/ebs/builder_test.go +++ b/builder/amazon/ebs/builder_test.go @@ -3,7 +3,7 @@ package ebs import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/builder/amazon/ebs/step_cleanup_volumes.go b/builder/amazon/ebs/step_cleanup_volumes.go index 6fbe31a75..29d8ffcaf 100644 --- a/builder/amazon/ebs/step_cleanup_volumes.go +++ b/builder/amazon/ebs/step_cleanup_volumes.go @@ -5,9 +5,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" ) // stepCleanupVolumes cleans up any orphaned volumes that were not designated to diff --git a/builder/amazon/ebs/step_create_ami.go b/builder/amazon/ebs/step_create_ami.go index d78922b98..a93740d27 100644 --- a/builder/amazon/ebs/step_create_ami.go +++ b/builder/amazon/ebs/step_create_ami.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" ) type stepCreateAMI struct { diff --git a/builder/amazon/ebs/tags_acc_test.go b/builder/amazon/ebs/tags_acc_test.go index d7114dc91..1d0eb69b9 100644 --- a/builder/amazon/ebs/tags_acc_test.go +++ b/builder/amazon/ebs/tags_acc_test.go @@ -7,9 +7,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/mitchellh/packer/builder/amazon/common" - builderT "github.com/mitchellh/packer/helper/builder/testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/builder/amazon/common" + builderT "github.com/hashicorp/packer/helper/builder/testing" + "github.com/hashicorp/packer/packer" ) type TFBuilder struct { diff --git a/builder/amazon/ebssurrogate/builder.go b/builder/amazon/ebssurrogate/builder.go index b3b02aeab..dd6a76b83 100644 --- a/builder/amazon/ebssurrogate/builder.go +++ b/builder/amazon/ebssurrogate/builder.go @@ -10,13 +10,13 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/errwrap" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const BuilderId = "mitchellh.amazon.ebssurrogate" diff --git a/builder/amazon/ebssurrogate/builder_test.go b/builder/amazon/ebssurrogate/builder_test.go index 89a134ba8..94fdacd6b 100644 --- a/builder/amazon/ebssurrogate/builder_test.go +++ b/builder/amazon/ebssurrogate/builder_test.go @@ -3,7 +3,7 @@ package ebssurrogate import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/builder/amazon/ebssurrogate/root_block_device.go b/builder/amazon/ebssurrogate/root_block_device.go index db8a44f72..2c4849732 100644 --- a/builder/amazon/ebssurrogate/root_block_device.go +++ b/builder/amazon/ebssurrogate/root_block_device.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type RootBlockDevice struct { diff --git a/builder/amazon/ebssurrogate/step_register_ami.go b/builder/amazon/ebssurrogate/step_register_ami.go index 5aef1c724..95212903a 100644 --- a/builder/amazon/ebssurrogate/step_register_ami.go +++ b/builder/amazon/ebssurrogate/step_register_ami.go @@ -5,9 +5,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" ) // StepRegisterAMI creates the AMI. diff --git a/builder/amazon/ebssurrogate/step_snapshot_new_root.go b/builder/amazon/ebssurrogate/step_snapshot_new_root.go index 858f04934..e00a75cdb 100644 --- a/builder/amazon/ebssurrogate/step_snapshot_new_root.go +++ b/builder/amazon/ebssurrogate/step_snapshot_new_root.go @@ -6,9 +6,9 @@ import ( "time" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" ) // StepSnapshotNewRootVolume creates a snapshot of the created volume. diff --git a/builder/amazon/ebsvolume/artifact.go b/builder/amazon/ebsvolume/artifact.go index e8787d993..9198bb79b 100644 --- a/builder/amazon/ebsvolume/artifact.go +++ b/builder/amazon/ebsvolume/artifact.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // map of region to list of volume IDs diff --git a/builder/amazon/ebsvolume/block_device.go b/builder/amazon/ebsvolume/block_device.go index c5b45027c..5a23821b3 100644 --- a/builder/amazon/ebsvolume/block_device.go +++ b/builder/amazon/ebsvolume/block_device.go @@ -1,8 +1,8 @@ package ebsvolume import ( - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/template/interpolate" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/template/interpolate" ) type BlockDevice struct { diff --git a/builder/amazon/ebsvolume/builder.go b/builder/amazon/ebsvolume/builder.go index c906febce..9221f3b1c 100644 --- a/builder/amazon/ebsvolume/builder.go +++ b/builder/amazon/ebsvolume/builder.go @@ -9,13 +9,13 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/errwrap" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const BuilderId = "mitchellh.amazon.ebsvolume" diff --git a/builder/amazon/ebsvolume/builder_test.go b/builder/amazon/ebsvolume/builder_test.go index 61a8f2ff1..7c209f0a4 100644 --- a/builder/amazon/ebsvolume/builder_test.go +++ b/builder/amazon/ebsvolume/builder_test.go @@ -3,7 +3,7 @@ package ebsvolume import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/builder/amazon/ebsvolume/step_tag_ebs_volumes.go b/builder/amazon/ebsvolume/step_tag_ebs_volumes.go index 48d373ba1..992459560 100644 --- a/builder/amazon/ebsvolume/step_tag_ebs_volumes.go +++ b/builder/amazon/ebsvolume/step_tag_ebs_volumes.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type stepTagEBSVolumes struct { diff --git a/builder/amazon/instance/builder.go b/builder/amazon/instance/builder.go index d1e6c50a0..f14a5aea7 100644 --- a/builder/amazon/instance/builder.go +++ b/builder/amazon/instance/builder.go @@ -11,13 +11,13 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) // The unique ID for this builder diff --git a/builder/amazon/instance/builder_test.go b/builder/amazon/instance/builder_test.go index bb18e54a8..56ba3911c 100644 --- a/builder/amazon/instance/builder_test.go +++ b/builder/amazon/instance/builder_test.go @@ -1,7 +1,7 @@ package instance import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io/ioutil" "os" "testing" diff --git a/builder/amazon/instance/step_bundle_volume.go b/builder/amazon/instance/step_bundle_volume.go index 5d839177f..a8e27d635 100644 --- a/builder/amazon/instance/step_bundle_volume.go +++ b/builder/amazon/instance/step_bundle_volume.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type bundleCmdData struct { diff --git a/builder/amazon/instance/step_register_ami.go b/builder/amazon/instance/step_register_ami.go index c21c618ed..01ba46bd9 100644 --- a/builder/amazon/instance/step_register_ami.go +++ b/builder/amazon/instance/step_register_ami.go @@ -5,9 +5,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/packer" ) type StepRegisterAMI struct{} diff --git a/builder/amazon/instance/step_upload_bundle.go b/builder/amazon/instance/step_upload_bundle.go index fc641e1c6..91a64918e 100644 --- a/builder/amazon/instance/step_upload_bundle.go +++ b/builder/amazon/instance/step_upload_bundle.go @@ -3,9 +3,9 @@ package instance import ( "fmt" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type uploadCmdData struct { diff --git a/builder/amazon/instance/step_upload_x509_cert.go b/builder/amazon/instance/step_upload_x509_cert.go index ee24cff98..1de1aa311 100644 --- a/builder/amazon/instance/step_upload_x509_cert.go +++ b/builder/amazon/instance/step_upload_x509_cert.go @@ -2,8 +2,8 @@ package instance import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "os" ) diff --git a/builder/azure/arm/azure_client.go b/builder/azure/arm/azure_client.go index 096979b04..8f7025e69 100644 --- a/builder/azure/arm/azure_client.go +++ b/builder/azure/arm/azure_client.go @@ -19,8 +19,8 @@ import ( "github.com/Azure/azure-sdk-for-go/storage" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/mitchellh/packer/builder/azure/common" - "github.com/mitchellh/packer/version" + "github.com/hashicorp/packer/builder/azure/common" + "github.com/hashicorp/packer/version" ) const ( diff --git a/builder/azure/arm/builder.go b/builder/azure/arm/builder.go index a82caebe6..b1fe484a1 100644 --- a/builder/azure/arm/builder.go +++ b/builder/azure/arm/builder.go @@ -10,17 +10,17 @@ import ( "strings" "time" - packerAzureCommon "github.com/mitchellh/packer/builder/azure/common" + packerAzureCommon "github.com/hashicorp/packer/builder/azure/common" "github.com/Azure/go-autorest/autorest/azure" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/builder/azure/common/lin" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/builder/azure/common/lin" + packerCommon "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - packerCommon "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" ) type Builder struct { diff --git a/builder/azure/arm/builder_test.go b/builder/azure/arm/builder_test.go index 436ddc04c..47f7a74b5 100644 --- a/builder/azure/arm/builder_test.go +++ b/builder/azure/arm/builder_test.go @@ -6,7 +6,7 @@ package arm import ( "testing" - "github.com/mitchellh/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/builder/azure/common/constants" ) func TestStateBagShouldBePopulatedExpectedValues(t *testing.T) { diff --git a/builder/azure/arm/config.go b/builder/azure/arm/config.go index 0b5b158fa..c7348d2ee 100644 --- a/builder/azure/arm/config.go +++ b/builder/azure/arm/config.go @@ -22,13 +22,13 @@ import ( "github.com/Azure/go-autorest/autorest/to" "github.com/masterzen/winrm" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/builder/azure/pkcs12" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/builder/azure/pkcs12" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "golang.org/x/crypto/ssh" ) diff --git a/builder/azure/arm/config_retriever.go b/builder/azure/arm/config_retriever.go index b31340f46..3e8a3e655 100644 --- a/builder/azure/arm/config_retriever.go +++ b/builder/azure/arm/config_retriever.go @@ -9,7 +9,7 @@ package arm import ( "github.com/Azure/go-autorest/autorest/azure" - "github.com/mitchellh/packer/builder/azure/common" + "github.com/hashicorp/packer/builder/azure/common" ) type configRetriever struct { diff --git a/builder/azure/arm/config_test.go b/builder/azure/arm/config_test.go index 680d8301b..1d859d014 100644 --- a/builder/azure/arm/config_test.go +++ b/builder/azure/arm/config_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" ) // List of configuration parameters that are required by the ARM builder. diff --git a/builder/azure/arm/inspector.go b/builder/azure/arm/inspector.go index 2ad5ab807..d3fbd4ccd 100644 --- a/builder/azure/arm/inspector.go +++ b/builder/azure/arm/inspector.go @@ -8,7 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/mitchellh/packer/builder/azure/common/logutil" + "github.com/hashicorp/packer/builder/azure/common/logutil" "io" ) diff --git a/builder/azure/arm/step.go b/builder/azure/arm/step.go index 53da60c3d..574527f8d 100644 --- a/builder/azure/arm/step.go +++ b/builder/azure/arm/step.go @@ -4,9 +4,9 @@ package arm import ( + "github.com/hashicorp/packer/builder/azure/common" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func processInterruptibleResult( diff --git a/builder/azure/arm/step_capture_image.go b/builder/azure/arm/step_capture_image.go index e1ab17424..d579747d4 100644 --- a/builder/azure/arm/step_capture_image.go +++ b/builder/azure/arm/step_capture_image.go @@ -7,10 +7,10 @@ import ( "fmt" "github.com/Azure/azure-sdk-for-go/arm/compute" + "github.com/hashicorp/packer/builder/azure/common" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/packer" ) type StepCaptureImage struct { diff --git a/builder/azure/arm/step_capture_image_test.go b/builder/azure/arm/step_capture_image_test.go index f1fe2c06a..c25345c6e 100644 --- a/builder/azure/arm/step_capture_image_test.go +++ b/builder/azure/arm/step_capture_image_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/arm/compute" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func TestStepCaptureImageShouldFailIfCaptureFails(t *testing.T) { diff --git a/builder/azure/arm/step_create_resource_group.go b/builder/azure/arm/step_create_resource_group.go index 9295ff36d..d5115019f 100644 --- a/builder/azure/arm/step_create_resource_group.go +++ b/builder/azure/arm/step_create_resource_group.go @@ -7,9 +7,9 @@ import ( "fmt" "github.com/Azure/azure-sdk-for-go/arm/resources/resources" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/packer" ) type StepCreateResourceGroup struct { diff --git a/builder/azure/arm/step_create_resource_group_test.go b/builder/azure/arm/step_create_resource_group_test.go index affab4a04..ca0c8f18b 100644 --- a/builder/azure/arm/step_create_resource_group_test.go +++ b/builder/azure/arm/step_create_resource_group_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func TestStepCreateResourceGroupShouldFailIfCreateFails(t *testing.T) { diff --git a/builder/azure/arm/step_delete_os_disk.go b/builder/azure/arm/step_delete_os_disk.go index ba079cdbe..697502837 100644 --- a/builder/azure/arm/step_delete_os_disk.go +++ b/builder/azure/arm/step_delete_os_disk.go @@ -8,10 +8,10 @@ import ( "net/url" "strings" - "github.com/mitchellh/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepDeleteOSDisk struct { diff --git a/builder/azure/arm/step_delete_os_disk_test.go b/builder/azure/arm/step_delete_os_disk_test.go index 2355bf283..5e3adfb6b 100644 --- a/builder/azure/arm/step_delete_os_disk_test.go +++ b/builder/azure/arm/step_delete_os_disk_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func TestStepDeleteOSDiskShouldFailIfGetFails(t *testing.T) { diff --git a/builder/azure/arm/step_delete_resource_group.go b/builder/azure/arm/step_delete_resource_group.go index 82b9adfb0..05677fa59 100644 --- a/builder/azure/arm/step_delete_resource_group.go +++ b/builder/azure/arm/step_delete_resource_group.go @@ -6,10 +6,10 @@ package arm import ( "fmt" + "github.com/hashicorp/packer/builder/azure/common" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/packer" ) type StepDeleteResourceGroup struct { diff --git a/builder/azure/arm/step_delete_resource_group_test.go b/builder/azure/arm/step_delete_resource_group_test.go index 310116d0f..fb2882a49 100644 --- a/builder/azure/arm/step_delete_resource_group_test.go +++ b/builder/azure/arm/step_delete_resource_group_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func TestStepDeleteResourceGroupShouldFailIfDeleteFails(t *testing.T) { diff --git a/builder/azure/arm/step_deploy_template.go b/builder/azure/arm/step_deploy_template.go index 9ad9d1ba9..291ebf2c3 100644 --- a/builder/azure/arm/step_deploy_template.go +++ b/builder/azure/arm/step_deploy_template.go @@ -6,10 +6,10 @@ package arm import ( "fmt" + "github.com/hashicorp/packer/builder/azure/common" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/packer" ) type StepDeployTemplate struct { diff --git a/builder/azure/arm/step_deploy_template_test.go b/builder/azure/arm/step_deploy_template_test.go index 171c2659a..57bfce7d4 100644 --- a/builder/azure/arm/step_deploy_template_test.go +++ b/builder/azure/arm/step_deploy_template_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func TestStepDeployTemplateShouldFailIfDeployFails(t *testing.T) { diff --git a/builder/azure/arm/step_get_certificate.go b/builder/azure/arm/step_get_certificate.go index fb2a36ccc..8253ff8ed 100644 --- a/builder/azure/arm/step_get_certificate.go +++ b/builder/azure/arm/step_get_certificate.go @@ -7,9 +7,9 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/packer" ) type StepGetCertificate struct { diff --git a/builder/azure/arm/step_get_certificate_test.go b/builder/azure/arm/step_get_certificate_test.go index 46b105291..46c921a36 100644 --- a/builder/azure/arm/step_get_certificate_test.go +++ b/builder/azure/arm/step_get_certificate_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func TestStepGetCertificateShouldFailIfGetFails(t *testing.T) { diff --git a/builder/azure/arm/step_get_ip_address.go b/builder/azure/arm/step_get_ip_address.go index d0b24e82c..7c127f71b 100644 --- a/builder/azure/arm/step_get_ip_address.go +++ b/builder/azure/arm/step_get_ip_address.go @@ -6,9 +6,9 @@ package arm import ( "fmt" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/packer" ) type EndpointType int diff --git a/builder/azure/arm/step_get_ip_address_test.go b/builder/azure/arm/step_get_ip_address_test.go index d6e29a2d7..a0b854ed0 100644 --- a/builder/azure/arm/step_get_ip_address_test.go +++ b/builder/azure/arm/step_get_ip_address_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func TestStepGetIPAddressShouldFailIfGetFails(t *testing.T) { diff --git a/builder/azure/arm/step_get_os_disk.go b/builder/azure/arm/step_get_os_disk.go index 810159ea2..098960f88 100644 --- a/builder/azure/arm/step_get_os_disk.go +++ b/builder/azure/arm/step_get_os_disk.go @@ -8,10 +8,10 @@ import ( "github.com/Azure/azure-sdk-for-go/arm/compute" - "github.com/mitchellh/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepGetOSDisk struct { diff --git a/builder/azure/arm/step_get_os_disk_test.go b/builder/azure/arm/step_get_os_disk_test.go index 2062fd444..e1857fb93 100644 --- a/builder/azure/arm/step_get_os_disk_test.go +++ b/builder/azure/arm/step_get_os_disk_test.go @@ -9,7 +9,7 @@ import ( "github.com/Azure/azure-sdk-for-go/arm/compute" - "github.com/mitchellh/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" ) diff --git a/builder/azure/arm/step_power_off_compute.go b/builder/azure/arm/step_power_off_compute.go index bb702d0c7..33b9bf1c5 100644 --- a/builder/azure/arm/step_power_off_compute.go +++ b/builder/azure/arm/step_power_off_compute.go @@ -6,10 +6,10 @@ package arm import ( "fmt" + "github.com/hashicorp/packer/builder/azure/common" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/packer" ) type StepPowerOffCompute struct { diff --git a/builder/azure/arm/step_power_off_compute_test.go b/builder/azure/arm/step_power_off_compute_test.go index a1b8a7b37..71004256c 100644 --- a/builder/azure/arm/step_power_off_compute_test.go +++ b/builder/azure/arm/step_power_off_compute_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func TestStepPowerOffComputeShouldFailIfPowerOffFails(t *testing.T) { diff --git a/builder/azure/arm/step_set_certificate.go b/builder/azure/arm/step_set_certificate.go index 79ed9fa25..a2263d12a 100644 --- a/builder/azure/arm/step_set_certificate.go +++ b/builder/azure/arm/step_set_certificate.go @@ -4,9 +4,9 @@ package arm import ( + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/packer" ) type StepSetCertificate struct { diff --git a/builder/azure/arm/step_set_certificate_test.go b/builder/azure/arm/step_set_certificate_test.go index 3ea03730c..5bcb7dffa 100644 --- a/builder/azure/arm/step_set_certificate_test.go +++ b/builder/azure/arm/step_set_certificate_test.go @@ -6,8 +6,8 @@ package arm import ( "testing" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func TestStepSetCertificateShouldPassIfGetPasses(t *testing.T) { diff --git a/builder/azure/arm/step_test.go b/builder/azure/arm/step_test.go index b0f2bfe81..060c12355 100644 --- a/builder/azure/arm/step_test.go +++ b/builder/azure/arm/step_test.go @@ -5,9 +5,9 @@ package arm import ( "fmt" + "github.com/hashicorp/packer/builder/azure/common" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common" - "github.com/mitchellh/packer/builder/azure/common/constants" "testing" ) diff --git a/builder/azure/arm/step_validate_template.go b/builder/azure/arm/step_validate_template.go index 25a6fbd27..f2e286b0b 100644 --- a/builder/azure/arm/step_validate_template.go +++ b/builder/azure/arm/step_validate_template.go @@ -6,9 +6,9 @@ package arm import ( "fmt" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/packer" ) type StepValidateTemplate struct { diff --git a/builder/azure/arm/step_validate_template_test.go b/builder/azure/arm/step_validate_template_test.go index eb82a8848..071d10d86 100644 --- a/builder/azure/arm/step_validate_template_test.go +++ b/builder/azure/arm/step_validate_template_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" ) func TestStepValidateTemplateShouldFailIfValidateFails(t *testing.T) { diff --git a/builder/azure/arm/template_factory.go b/builder/azure/arm/template_factory.go index ba2e4ebc6..f4157e5d0 100644 --- a/builder/azure/arm/template_factory.go +++ b/builder/azure/arm/template_factory.go @@ -6,8 +6,8 @@ import ( "github.com/Azure/azure-sdk-for-go/arm/compute" "github.com/Azure/azure-sdk-for-go/arm/resources/resources" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/builder/azure/common/template" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/builder/azure/common/template" ) type templateFactoryFunc func(*Config) (*resources.Deployment, error) diff --git a/builder/azure/arm/template_factory_test.go b/builder/azure/arm/template_factory_test.go index e27669435..8ad32d6d0 100644 --- a/builder/azure/arm/template_factory_test.go +++ b/builder/azure/arm/template_factory_test.go @@ -7,8 +7,8 @@ import ( "github.com/Azure/azure-sdk-for-go/arm/resources/resources" "github.com/approvals/go-approval-tests" - "github.com/mitchellh/packer/builder/azure/common/constants" - "github.com/mitchellh/packer/builder/azure/common/template" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/builder/azure/common/template" ) // Ensure the link values are not set, and the concrete values are set. diff --git a/builder/azure/arm/tempname.go b/builder/azure/arm/tempname.go index 6298a1943..22e14097d 100644 --- a/builder/azure/arm/tempname.go +++ b/builder/azure/arm/tempname.go @@ -6,7 +6,7 @@ package arm import ( "fmt" - "github.com/mitchellh/packer/builder/azure/common" + "github.com/hashicorp/packer/builder/azure/common" ) const ( diff --git a/builder/azure/common/devicelogin.go b/builder/azure/common/devicelogin.go index 0197f98bb..4cde8fbdf 100644 --- a/builder/azure/common/devicelogin.go +++ b/builder/azure/common/devicelogin.go @@ -11,8 +11,8 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" + "github.com/hashicorp/packer/version" "github.com/mitchellh/go-homedir" - "github.com/mitchellh/packer/version" ) var ( diff --git a/builder/azure/common/lin/ssh.go b/builder/azure/common/lin/ssh.go index a869978fe..f12ee09ea 100644 --- a/builder/azure/common/lin/ssh.go +++ b/builder/azure/common/lin/ssh.go @@ -5,8 +5,8 @@ package lin import ( "fmt" + "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/azure/common/constants" "golang.org/x/crypto/ssh" ) diff --git a/builder/azure/common/lin/step_create_cert.go b/builder/azure/common/lin/step_create_cert.go index 08b60f45a..6ef4ff560 100644 --- a/builder/azure/common/lin/step_create_cert.go +++ b/builder/azure/common/lin/step_create_cert.go @@ -15,10 +15,10 @@ import ( "math/big" "time" - "github.com/mitchellh/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/builder/azure/common/constants" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepCreateCert struct { diff --git a/builder/azure/common/lin/step_generalize_os.go b/builder/azure/common/lin/step_generalize_os.go index e36d39009..1c355c2c6 100644 --- a/builder/azure/common/lin/step_generalize_os.go +++ b/builder/azure/common/lin/step_generalize_os.go @@ -6,8 +6,8 @@ package lin import ( "bytes" "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/azure/pkcs12/crypto.go b/builder/azure/pkcs12/crypto.go index 17bca7d79..5095a4f7f 100644 --- a/builder/azure/pkcs12/crypto.go +++ b/builder/azure/pkcs12/crypto.go @@ -12,7 +12,7 @@ import ( "errors" "io" - "github.com/mitchellh/packer/builder/azure/pkcs12/rc2" + "github.com/hashicorp/packer/builder/azure/pkcs12/rc2" ) const ( diff --git a/builder/cloudstack/artifact_test.go b/builder/cloudstack/artifact_test.go index 9d93d645b..f1b062e5e 100644 --- a/builder/cloudstack/artifact_test.go +++ b/builder/cloudstack/artifact_test.go @@ -3,7 +3,7 @@ package cloudstack import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "github.com/xanzy/go-cloudstack/cloudstack" ) diff --git a/builder/cloudstack/builder.go b/builder/cloudstack/builder.go index 880b21169..8e562354e 100644 --- a/builder/cloudstack/builder.go +++ b/builder/cloudstack/builder.go @@ -1,10 +1,10 @@ package cloudstack import ( + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" "github.com/xanzy/go-cloudstack/cloudstack" ) diff --git a/builder/cloudstack/builder_test.go b/builder/cloudstack/builder_test.go index f5fc453cf..6d7ab1444 100644 --- a/builder/cloudstack/builder_test.go +++ b/builder/cloudstack/builder_test.go @@ -3,7 +3,7 @@ package cloudstack import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestBuilder_Impl(t *testing.T) { diff --git a/builder/cloudstack/config.go b/builder/cloudstack/config.go index fc57a3d48..5394d3c9c 100644 --- a/builder/cloudstack/config.go +++ b/builder/cloudstack/config.go @@ -6,12 +6,12 @@ import ( "os" "time" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) // Config holds all the details needed to configure the builder. diff --git a/builder/cloudstack/ssh.go b/builder/cloudstack/ssh.go index b980102f4..192293bda 100644 --- a/builder/cloudstack/ssh.go +++ b/builder/cloudstack/ssh.go @@ -4,8 +4,8 @@ import ( "fmt" "io/ioutil" + packerssh "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - packerssh "github.com/mitchellh/packer/communicator/ssh" "github.com/xanzy/go-cloudstack/cloudstack" "golang.org/x/crypto/ssh" ) diff --git a/builder/cloudstack/step_configure_networking.go b/builder/cloudstack/step_configure_networking.go index 71a71e1cc..ae736a07f 100644 --- a/builder/cloudstack/step_configure_networking.go +++ b/builder/cloudstack/step_configure_networking.go @@ -6,8 +6,8 @@ import ( "strings" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "github.com/xanzy/go-cloudstack/cloudstack" ) diff --git a/builder/cloudstack/step_create_instance.go b/builder/cloudstack/step_create_instance.go index 7d1b687fa..c1caa9f36 100644 --- a/builder/cloudstack/step_create_instance.go +++ b/builder/cloudstack/step_create_instance.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "github.com/xanzy/go-cloudstack/cloudstack" ) diff --git a/builder/cloudstack/step_create_template.go b/builder/cloudstack/step_create_template.go index 5c80a15a2..9845a3166 100644 --- a/builder/cloudstack/step_create_template.go +++ b/builder/cloudstack/step_create_template.go @@ -4,8 +4,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "github.com/xanzy/go-cloudstack/cloudstack" ) diff --git a/builder/cloudstack/step_prepare_config.go b/builder/cloudstack/step_prepare_config.go index 7aafc9292..82b75dccf 100644 --- a/builder/cloudstack/step_prepare_config.go +++ b/builder/cloudstack/step_prepare_config.go @@ -5,8 +5,8 @@ import ( "io/ioutil" "regexp" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "github.com/xanzy/go-cloudstack/cloudstack" ) diff --git a/builder/cloudstack/step_shutdown_instance.go b/builder/cloudstack/step_shutdown_instance.go index 1f7df43a2..d472a79d8 100644 --- a/builder/cloudstack/step_shutdown_instance.go +++ b/builder/cloudstack/step_shutdown_instance.go @@ -3,8 +3,8 @@ package cloudstack import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "github.com/xanzy/go-cloudstack/cloudstack" ) diff --git a/builder/digitalocean/artifact.go b/builder/digitalocean/artifact.go index 8f6e81161..9630686e3 100644 --- a/builder/digitalocean/artifact.go +++ b/builder/digitalocean/artifact.go @@ -1,6 +1,7 @@ package digitalocean import ( + "context" "fmt" "log" "strconv" @@ -45,6 +46,6 @@ func (a *Artifact) State(name string) interface{} { func (a *Artifact) Destroy() error { log.Printf("Destroying image: %d (%s)", a.snapshotId, a.snapshotName) - _, err := a.client.Images.Delete(a.snapshotId) + _, err := a.client.Images.Delete(context.TODO(), a.snapshotId) return err } diff --git a/builder/digitalocean/artifact_test.go b/builder/digitalocean/artifact_test.go index 5646be0be..8b11348da 100644 --- a/builder/digitalocean/artifact_test.go +++ b/builder/digitalocean/artifact_test.go @@ -3,7 +3,7 @@ package digitalocean import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestArtifact_Impl(t *testing.T) { diff --git a/builder/digitalocean/builder.go b/builder/digitalocean/builder.go index bafad7522..1dc93b793 100644 --- a/builder/digitalocean/builder.go +++ b/builder/digitalocean/builder.go @@ -9,10 +9,10 @@ import ( "net/url" "github.com/digitalocean/godo" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" "golang.org/x/oauth2" ) diff --git a/builder/digitalocean/builder_acc_test.go b/builder/digitalocean/builder_acc_test.go index 4e7931ade..3a091697e 100644 --- a/builder/digitalocean/builder_acc_test.go +++ b/builder/digitalocean/builder_acc_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - builderT "github.com/mitchellh/packer/helper/builder/testing" + builderT "github.com/hashicorp/packer/helper/builder/testing" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/digitalocean/builder_test.go b/builder/digitalocean/builder_test.go index 000cf7f1a..9ef7c0ad7 100644 --- a/builder/digitalocean/builder_test.go +++ b/builder/digitalocean/builder_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/builder/digitalocean/config.go b/builder/digitalocean/config.go index 9406f739e..0447e9cdf 100644 --- a/builder/digitalocean/config.go +++ b/builder/digitalocean/config.go @@ -6,13 +6,13 @@ import ( "os" "time" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/mapstructure" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type Config struct { @@ -27,6 +27,7 @@ type Config struct { Image string `mapstructure:"image"` PrivateNetworking bool `mapstructure:"private_networking"` + Monitoring bool `mapstructure:"monitoring"` SnapshotName string `mapstructure:"snapshot_name"` StateTimeout time.Duration `mapstructure:"state_timeout"` DropletName string `mapstructure:"droplet_name"` diff --git a/builder/digitalocean/step_create_droplet.go b/builder/digitalocean/step_create_droplet.go index 0a214199a..9789e7b99 100644 --- a/builder/digitalocean/step_create_droplet.go +++ b/builder/digitalocean/step_create_droplet.go @@ -1,13 +1,14 @@ package digitalocean import ( + "context" "fmt" "io/ioutil" "github.com/digitalocean/godo" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepCreateDroplet struct { @@ -34,7 +35,7 @@ func (s *stepCreateDroplet) Run(state multistep.StateBag) multistep.StepAction { userData = string(contents) } - droplet, _, err := client.Droplets.Create(&godo.DropletCreateRequest{ + droplet, _, err := client.Droplets.Create(context.TODO(), &godo.DropletCreateRequest{ Name: c.DropletName, Region: c.Region, Size: c.Size, @@ -45,6 +46,7 @@ func (s *stepCreateDroplet) Run(state multistep.StateBag) multistep.StepAction { {ID: sshKeyId}, }, PrivateNetworking: c.PrivateNetworking, + Monitoring: c.Monitoring, UserData: userData, }) if err != nil { @@ -74,7 +76,7 @@ func (s *stepCreateDroplet) Cleanup(state multistep.StateBag) { // Destroy the droplet we just created ui.Say("Destroying droplet...") - _, err := client.Droplets.Delete(s.dropletId) + _, err := client.Droplets.Delete(context.TODO(), s.dropletId) if err != nil { ui.Error(fmt.Sprintf( "Error destroying droplet. Please destroy it manually: %s", err)) diff --git a/builder/digitalocean/step_create_ssh_key.go b/builder/digitalocean/step_create_ssh_key.go index ce65cb425..d255ffde0 100644 --- a/builder/digitalocean/step_create_ssh_key.go +++ b/builder/digitalocean/step_create_ssh_key.go @@ -1,6 +1,7 @@ package digitalocean import ( + "context" "crypto/rand" "crypto/rsa" "crypto/x509" @@ -11,9 +12,9 @@ import ( "runtime" "github.com/digitalocean/godo" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/packer" "golang.org/x/crypto/ssh" ) @@ -52,7 +53,7 @@ func (s *stepCreateSSHKey) Run(state multistep.StateBag) multistep.StepAction { name := fmt.Sprintf("packer-%s", uuid.TimeOrderedUUID()) // Create the key! - key, _, err := client.Keys.Create(&godo.KeyCreateRequest{ + key, _, err := client.Keys.Create(context.TODO(), &godo.KeyCreateRequest{ Name: name, PublicKey: pub_sshformat, }) @@ -109,7 +110,7 @@ func (s *stepCreateSSHKey) Cleanup(state multistep.StateBag) { ui := state.Get("ui").(packer.Ui) ui.Say("Deleting temporary ssh key...") - _, err := client.Keys.DeleteByID(s.keyId) + _, err := client.Keys.DeleteByID(context.TODO(), s.keyId) if err != nil { log.Printf("Error cleaning up ssh key: %s", err) ui.Error(fmt.Sprintf( diff --git a/builder/digitalocean/step_droplet_info.go b/builder/digitalocean/step_droplet_info.go index abdc2b698..4d24bb899 100644 --- a/builder/digitalocean/step_droplet_info.go +++ b/builder/digitalocean/step_droplet_info.go @@ -1,11 +1,12 @@ package digitalocean import ( + "context" "fmt" "github.com/digitalocean/godo" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepDropletInfo struct{} @@ -27,7 +28,7 @@ func (s *stepDropletInfo) Run(state multistep.StateBag) multistep.StepAction { } // Set the IP on the state for later - droplet, _, err := client.Droplets.Get(dropletID) + droplet, _, err := client.Droplets.Get(context.TODO(), dropletID) if err != nil { err := fmt.Errorf("Error retrieving droplet: %s", err) state.Put("error", err) diff --git a/builder/digitalocean/step_power_off.go b/builder/digitalocean/step_power_off.go index 0f38e6a52..aeded228a 100644 --- a/builder/digitalocean/step_power_off.go +++ b/builder/digitalocean/step_power_off.go @@ -1,12 +1,13 @@ package digitalocean import ( + "context" "fmt" "log" "github.com/digitalocean/godo" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepPowerOff struct{} @@ -17,7 +18,7 @@ func (s *stepPowerOff) Run(state multistep.StateBag) multistep.StepAction { ui := state.Get("ui").(packer.Ui) dropletId := state.Get("droplet_id").(int) - droplet, _, err := client.Droplets.Get(dropletId) + droplet, _, err := client.Droplets.Get(context.TODO(), dropletId) if err != nil { err := fmt.Errorf("Error checking droplet state: %s", err) state.Put("error", err) @@ -32,7 +33,7 @@ func (s *stepPowerOff) Run(state multistep.StateBag) multistep.StepAction { // Pull the plug on the Droplet ui.Say("Forcefully shutting down Droplet...") - _, _, err = client.DropletActions.PowerOff(dropletId) + _, _, err = client.DropletActions.PowerOff(context.TODO(), dropletId) if err != nil { err := fmt.Errorf("Error powering off droplet: %s", err) state.Put("error", err) diff --git a/builder/digitalocean/step_shutdown.go b/builder/digitalocean/step_shutdown.go index a01b26ef2..dfa47dc4a 100644 --- a/builder/digitalocean/step_shutdown.go +++ b/builder/digitalocean/step_shutdown.go @@ -1,13 +1,14 @@ package digitalocean import ( + "context" "fmt" "log" "time" "github.com/digitalocean/godo" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepShutdown struct{} @@ -23,7 +24,7 @@ func (s *stepShutdown) Run(state multistep.StateBag) multistep.StepAction { // did absolutely nothing (*ALAKAZAM!* magic!). We give up after // a pretty arbitrary amount of time. ui.Say("Gracefully shutting down droplet...") - _, _, err := client.DropletActions.Shutdown(dropletId) + _, _, err := client.DropletActions.Shutdown(context.TODO(), dropletId) if err != nil { // If we get an error the first time, actually report it err := fmt.Errorf("Error shutting down droplet: %s", err) @@ -50,7 +51,7 @@ func (s *stepShutdown) Run(state multistep.StateBag) multistep.StepAction { for attempts := 2; attempts > 0; attempts++ { log.Printf("ShutdownDroplet attempt #%d...", attempts) - _, _, err := client.DropletActions.Shutdown(dropletId) + _, _, err := client.DropletActions.Shutdown(context.TODO(), dropletId) if err != nil { log.Printf("Shutdown retry error: %s", err) } diff --git a/builder/digitalocean/step_snapshot.go b/builder/digitalocean/step_snapshot.go index 129a0d5b1..c5f24e5c9 100644 --- a/builder/digitalocean/step_snapshot.go +++ b/builder/digitalocean/step_snapshot.go @@ -1,14 +1,15 @@ package digitalocean import ( + "context" "errors" "fmt" "log" "time" "github.com/digitalocean/godo" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepSnapshot struct{} @@ -20,7 +21,7 @@ func (s *stepSnapshot) Run(state multistep.StateBag) multistep.StepAction { dropletId := state.Get("droplet_id").(int) ui.Say(fmt.Sprintf("Creating snapshot: %v", c.SnapshotName)) - action, _, err := client.DropletActions.Snapshot(dropletId, c.SnapshotName) + action, _, err := client.DropletActions.Snapshot(context.TODO(), dropletId, c.SnapshotName) if err != nil { err := fmt.Errorf("Error creating snapshot: %s", err) state.Put("error", err) @@ -51,7 +52,7 @@ func (s *stepSnapshot) Run(state multistep.StateBag) multistep.StepAction { } log.Printf("Looking up snapshot ID for snapshot: %s", c.SnapshotName) - images, _, err := client.Droplets.Snapshots(dropletId, nil) + images, _, err := client.Droplets.Snapshots(context.TODO(), dropletId, nil) if err != nil { err := fmt.Errorf("Error looking up snapshot ID: %s", err) state.Put("error", err) diff --git a/builder/digitalocean/wait.go b/builder/digitalocean/wait.go index 35446674c..e870096cd 100644 --- a/builder/digitalocean/wait.go +++ b/builder/digitalocean/wait.go @@ -1,6 +1,7 @@ package digitalocean import ( + "context" "fmt" "log" "time" @@ -22,7 +23,7 @@ func waitForDropletUnlocked( attempts += 1 log.Printf("[DEBUG] Checking droplet lock state... (attempt: %d)", attempts) - droplet, _, err := client.Droplets.Get(dropletId) + droplet, _, err := client.Droplets.Get(context.TODO(), dropletId) if err != nil { result <- err return @@ -72,7 +73,7 @@ func waitForDropletState( attempts += 1 log.Printf("Checking droplet status... (attempt: %d)", attempts) - droplet, _, err := client.Droplets.Get(dropletId) + droplet, _, err := client.Droplets.Get(context.TODO(), dropletId) if err != nil { result <- err return @@ -122,7 +123,7 @@ func waitForActionState( attempts += 1 log.Printf("Checking action status... (attempt: %d)", attempts) - action, _, err := client.DropletActions.Get(dropletId, actionId) + action, _, err := client.DropletActions.Get(context.TODO(), dropletId, actionId) if err != nil { result <- err return diff --git a/builder/docker/artifact_export_test.go b/builder/docker/artifact_export_test.go index be7ce2444..784535f1b 100644 --- a/builder/docker/artifact_export_test.go +++ b/builder/docker/artifact_export_test.go @@ -1,7 +1,7 @@ package docker import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/docker/artifact_import_test.go b/builder/docker/artifact_import_test.go index 971143953..0a002344c 100644 --- a/builder/docker/artifact_import_test.go +++ b/builder/docker/artifact_import_test.go @@ -2,7 +2,7 @@ package docker import ( "errors" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/docker/builder.go b/builder/docker/builder.go index 8e7e2cf19..c59456e80 100644 --- a/builder/docker/builder.go +++ b/builder/docker/builder.go @@ -3,10 +3,10 @@ package docker import ( "log" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" ) const ( diff --git a/builder/docker/builder_test.go b/builder/docker/builder_test.go index c8da72224..e196b0b30 100644 --- a/builder/docker/builder_test.go +++ b/builder/docker/builder_test.go @@ -1,7 +1,7 @@ package docker import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/docker/comm.go b/builder/docker/comm.go index a42d12525..c064c0550 100644 --- a/builder/docker/comm.go +++ b/builder/docker/comm.go @@ -4,9 +4,9 @@ import ( "fmt" "io/ioutil" + "github.com/hashicorp/packer/communicator/ssh" + "github.com/hashicorp/packer/helper/communicator" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/communicator/ssh" - "github.com/mitchellh/packer/helper/communicator" gossh "golang.org/x/crypto/ssh" ) diff --git a/builder/docker/communicator.go b/builder/docker/communicator.go index 092782ded..d33f79e95 100644 --- a/builder/docker/communicator.go +++ b/builder/docker/communicator.go @@ -14,7 +14,7 @@ import ( "syscall" "github.com/hashicorp/go-version" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) type Communicator struct { diff --git a/builder/docker/communicator_test.go b/builder/docker/communicator_test.go index fb005de06..908593a5e 100644 --- a/builder/docker/communicator_test.go +++ b/builder/docker/communicator_test.go @@ -8,10 +8,10 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/provisioner/file" - "github.com/mitchellh/packer/provisioner/shell" - "github.com/mitchellh/packer/template" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/provisioner/file" + "github.com/hashicorp/packer/provisioner/shell" + "github.com/hashicorp/packer/template" ) func TestCommunicator_impl(t *testing.T) { diff --git a/builder/docker/config.go b/builder/docker/config.go index e24280432..7ba1f4587 100644 --- a/builder/docker/config.go +++ b/builder/docker/config.go @@ -4,12 +4,12 @@ import ( "fmt" "os" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/mapstructure" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) var ( diff --git a/builder/docker/driver_docker.go b/builder/docker/driver_docker.go index 53a62832c..ac691a3a4 100644 --- a/builder/docker/driver_docker.go +++ b/builder/docker/driver_docker.go @@ -12,8 +12,8 @@ import ( "sync" "github.com/hashicorp/go-version" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type DockerDriver struct { diff --git a/builder/docker/exec.go b/builder/docker/exec.go index 598702410..201055b74 100644 --- a/builder/docker/exec.go +++ b/builder/docker/exec.go @@ -2,8 +2,8 @@ package docker import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/iochan" - "github.com/mitchellh/packer/packer" "io" "log" "os/exec" diff --git a/builder/docker/step_commit.go b/builder/docker/step_commit.go index 2e0281bd4..94205bc2f 100644 --- a/builder/docker/step_commit.go +++ b/builder/docker/step_commit.go @@ -2,8 +2,8 @@ package docker import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepCommit commits the container to a image. diff --git a/builder/docker/step_export.go b/builder/docker/step_export.go index b09ea0bd4..428055a48 100644 --- a/builder/docker/step_export.go +++ b/builder/docker/step_export.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepExport exports the container to a flat tar file. diff --git a/builder/docker/step_pull.go b/builder/docker/step_pull.go index 3f5b1b62a..9e38f7b49 100644 --- a/builder/docker/step_pull.go +++ b/builder/docker/step_pull.go @@ -2,8 +2,8 @@ package docker import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/docker/step_run.go b/builder/docker/step_run.go index a3df4bda6..92803f932 100644 --- a/builder/docker/step_run.go +++ b/builder/docker/step_run.go @@ -2,8 +2,8 @@ package docker import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepRun struct { diff --git a/builder/docker/step_temp_dir.go b/builder/docker/step_temp_dir.go index 58b264a4d..7e84b908f 100644 --- a/builder/docker/step_temp_dir.go +++ b/builder/docker/step_temp_dir.go @@ -2,8 +2,8 @@ package docker import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "io/ioutil" "os" ) diff --git a/builder/docker/step_temp_dir_test.go b/builder/docker/step_temp_dir_test.go index 5cf851f77..cc12932f3 100644 --- a/builder/docker/step_temp_dir_test.go +++ b/builder/docker/step_temp_dir_test.go @@ -5,8 +5,8 @@ import ( "path/filepath" "testing" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) func TestStepTempDir_impl(t *testing.T) { diff --git a/builder/docker/step_test.go b/builder/docker/step_test.go index 0bc190830..4278fb50d 100644 --- a/builder/docker/step_test.go +++ b/builder/docker/step_test.go @@ -2,8 +2,8 @@ package docker import ( "bytes" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "testing" ) diff --git a/builder/file/artifact_test.go b/builder/file/artifact_test.go index 0aa77894b..c2c73d660 100644 --- a/builder/file/artifact_test.go +++ b/builder/file/artifact_test.go @@ -3,7 +3,7 @@ package file import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestNullArtifact(t *testing.T) { diff --git a/builder/file/builder.go b/builder/file/builder.go index 9a2c2cc7f..1ac87331c 100644 --- a/builder/file/builder.go +++ b/builder/file/builder.go @@ -11,8 +11,8 @@ import ( "io/ioutil" "os" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) const BuilderId = "packer.file" diff --git a/builder/file/builder_test.go b/builder/file/builder_test.go index 3ce9e77ae..3979ab853 100644 --- a/builder/file/builder_test.go +++ b/builder/file/builder_test.go @@ -5,8 +5,8 @@ import ( "io/ioutil" "testing" - builderT "github.com/mitchellh/packer/helper/builder/testing" - "github.com/mitchellh/packer/packer" + builderT "github.com/hashicorp/packer/helper/builder/testing" + "github.com/hashicorp/packer/packer" ) func TestBuilder_implBuilder(t *testing.T) { diff --git a/builder/file/config.go b/builder/file/config.go index 6702e6894..7fc6ebc22 100644 --- a/builder/file/config.go +++ b/builder/file/config.go @@ -3,10 +3,10 @@ package file import ( "fmt" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) var ErrTargetRequired = fmt.Errorf("target required") diff --git a/builder/googlecompute/artifact_test.go b/builder/googlecompute/artifact_test.go index a892a3e53..9d028c1a3 100644 --- a/builder/googlecompute/artifact_test.go +++ b/builder/googlecompute/artifact_test.go @@ -1,7 +1,7 @@ package googlecompute import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/googlecompute/builder.go b/builder/googlecompute/builder.go index d1413d83a..1cb79f2a7 100644 --- a/builder/googlecompute/builder.go +++ b/builder/googlecompute/builder.go @@ -6,10 +6,10 @@ import ( "fmt" "log" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" ) // The unique ID for this builder. diff --git a/builder/googlecompute/config.go b/builder/googlecompute/config.go index fd8b7ba8a..4250f1824 100644 --- a/builder/googlecompute/config.go +++ b/builder/googlecompute/config.go @@ -6,12 +6,12 @@ import ( "regexp" "time" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) var reImageFamily = regexp.MustCompile(`^[a-z]([-a-z0-9]{0,61}[a-z0-9])?$`) diff --git a/builder/googlecompute/driver_gce.go b/builder/googlecompute/driver_gce.go index 0708d0f43..b4cdd8d84 100644 --- a/builder/googlecompute/driver_gce.go +++ b/builder/googlecompute/driver_gce.go @@ -16,9 +16,9 @@ import ( "google.golang.org/api/compute/v1" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/version" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/version" "golang.org/x/oauth2" "golang.org/x/oauth2/google" diff --git a/builder/googlecompute/step_check_existing_image.go b/builder/googlecompute/step_check_existing_image.go index dbad5cf1c..d5f2f5e73 100644 --- a/builder/googlecompute/step_check_existing_image.go +++ b/builder/googlecompute/step_check_existing_image.go @@ -3,8 +3,8 @@ package googlecompute import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepCheckExistingImage represents a Packer build step that checks if the diff --git a/builder/googlecompute/step_create_image.go b/builder/googlecompute/step_create_image.go index 79d0c3df6..13339d82f 100644 --- a/builder/googlecompute/step_create_image.go +++ b/builder/googlecompute/step_create_image.go @@ -5,8 +5,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepCreateImage represents a Packer build step that creates GCE machine diff --git a/builder/googlecompute/step_create_instance.go b/builder/googlecompute/step_create_instance.go index bbd8867a7..adb08e7bd 100644 --- a/builder/googlecompute/step_create_instance.go +++ b/builder/googlecompute/step_create_instance.go @@ -6,8 +6,8 @@ import ( "io/ioutil" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepCreateInstance represents a Packer build step that creates GCE instances. diff --git a/builder/googlecompute/step_create_ssh_key.go b/builder/googlecompute/step_create_ssh_key.go index 1012867b6..fd6d7f55a 100644 --- a/builder/googlecompute/step_create_ssh_key.go +++ b/builder/googlecompute/step_create_ssh_key.go @@ -9,8 +9,8 @@ import ( "io/ioutil" "os" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "golang.org/x/crypto/ssh" ) diff --git a/builder/googlecompute/step_create_windows_password.go b/builder/googlecompute/step_create_windows_password.go index 4c16cb604..312e54512 100644 --- a/builder/googlecompute/step_create_windows_password.go +++ b/builder/googlecompute/step_create_windows_password.go @@ -12,8 +12,8 @@ import ( "os" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepCreateWindowsPassword represents a Packer build step that sets the windows password on a Windows GCE instance. diff --git a/builder/googlecompute/step_instance_info.go b/builder/googlecompute/step_instance_info.go index 63653f420..d5ece22e7 100644 --- a/builder/googlecompute/step_instance_info.go +++ b/builder/googlecompute/step_instance_info.go @@ -5,8 +5,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // stepInstanceInfo represents a Packer build step that gathers GCE instance info. diff --git a/builder/googlecompute/step_teardown_instance.go b/builder/googlecompute/step_teardown_instance.go index 9f998a059..58585d78f 100644 --- a/builder/googlecompute/step_teardown_instance.go +++ b/builder/googlecompute/step_teardown_instance.go @@ -5,8 +5,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepTeardownInstance represents a Packer build step that tears down GCE diff --git a/builder/googlecompute/step_test.go b/builder/googlecompute/step_test.go index 4c1ceff55..3e9b843f4 100644 --- a/builder/googlecompute/step_test.go +++ b/builder/googlecompute/step_test.go @@ -4,8 +4,8 @@ import ( "bytes" "testing" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) func testState(t *testing.T) multistep.StateBag { diff --git a/builder/googlecompute/step_wait_startup_script.go b/builder/googlecompute/step_wait_startup_script.go index 7a13d5457..78bb4e4e3 100644 --- a/builder/googlecompute/step_wait_startup_script.go +++ b/builder/googlecompute/step_wait_startup_script.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/packer" ) type StepWaitStartupScript int diff --git a/builder/googlecompute/winrm.go b/builder/googlecompute/winrm.go index 8f744f9aa..ec617cba5 100644 --- a/builder/googlecompute/winrm.go +++ b/builder/googlecompute/winrm.go @@ -1,8 +1,8 @@ package googlecompute import ( + "github.com/hashicorp/packer/helper/communicator" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/helper/communicator" ) // winrmConfig returns the WinRM configuration. diff --git a/builder/hyperv/common/artifact.go b/builder/hyperv/common/artifact.go index 63b123eee..06537449d 100644 --- a/builder/hyperv/common/artifact.go +++ b/builder/hyperv/common/artifact.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // This is the common builder ID to all of these artifacts. diff --git a/builder/hyperv/common/artifact_test.go b/builder/hyperv/common/artifact_test.go index f9ddc5dbf..023d2dd44 100644 --- a/builder/hyperv/common/artifact_test.go +++ b/builder/hyperv/common/artifact_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestArtifact_impl(t *testing.T) { diff --git a/builder/hyperv/common/config_test.go b/builder/hyperv/common/config_test.go index eeeda864a..e6a902cc2 100644 --- a/builder/hyperv/common/config_test.go +++ b/builder/hyperv/common/config_test.go @@ -3,7 +3,7 @@ package common import ( "testing" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) func testConfigTemplate(t *testing.T) *interpolate.Context { diff --git a/builder/hyperv/common/driver_ps_4.go b/builder/hyperv/common/driver_ps_4.go index e563f89ea..c954a3d46 100644 --- a/builder/hyperv/common/driver_ps_4.go +++ b/builder/hyperv/common/driver_ps_4.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" - "github.com/mitchellh/packer/common/powershell" - "github.com/mitchellh/packer/common/powershell/hyperv" + "github.com/hashicorp/packer/common/powershell" + "github.com/hashicorp/packer/common/powershell/hyperv" ) type HypervPS4Driver struct { diff --git a/builder/hyperv/common/floppy_config.go b/builder/hyperv/common/floppy_config.go index d656e103a..b0d6a5ab9 100644 --- a/builder/hyperv/common/floppy_config.go +++ b/builder/hyperv/common/floppy_config.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // FloppyConfig is configuration related to created floppy disks and attaching diff --git a/builder/hyperv/common/output_config.go b/builder/hyperv/common/output_config.go index 7b5ddcd45..14eced008 100644 --- a/builder/hyperv/common/output_config.go +++ b/builder/hyperv/common/output_config.go @@ -3,8 +3,8 @@ package common import ( "fmt" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/template/interpolate" ) type OutputConfig struct { diff --git a/builder/hyperv/common/output_config_test.go b/builder/hyperv/common/output_config_test.go index 3da8bda58..3a87dc18f 100644 --- a/builder/hyperv/common/output_config_test.go +++ b/builder/hyperv/common/output_config_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/mitchellh/packer/common" + "github.com/hashicorp/packer/common" ) func TestOutputConfigPrepare(t *testing.T) { diff --git a/builder/hyperv/common/run_config.go b/builder/hyperv/common/run_config.go index 35cdb3b5d..a189a0355 100644 --- a/builder/hyperv/common/run_config.go +++ b/builder/hyperv/common/run_config.go @@ -2,7 +2,7 @@ package common import ( "fmt" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" "time" ) diff --git a/builder/hyperv/common/shutdown_config.go b/builder/hyperv/common/shutdown_config.go index 83d2224c3..faa90268f 100644 --- a/builder/hyperv/common/shutdown_config.go +++ b/builder/hyperv/common/shutdown_config.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type ShutdownConfig struct { diff --git a/builder/hyperv/common/ssh.go b/builder/hyperv/common/ssh.go index 1bb06bfd2..50db23ac2 100644 --- a/builder/hyperv/common/ssh.go +++ b/builder/hyperv/common/ssh.go @@ -1,9 +1,9 @@ package common import ( + commonssh "github.com/hashicorp/packer/common/ssh" + "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - commonssh "github.com/mitchellh/packer/common/ssh" - "github.com/mitchellh/packer/communicator/ssh" gossh "golang.org/x/crypto/ssh" ) diff --git a/builder/hyperv/common/ssh_config.go b/builder/hyperv/common/ssh_config.go index 3569a00b6..152230ccd 100644 --- a/builder/hyperv/common/ssh_config.go +++ b/builder/hyperv/common/ssh_config.go @@ -1,8 +1,8 @@ package common import ( - "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 { diff --git a/builder/hyperv/common/step_configure_ip.go b/builder/hyperv/common/step_configure_ip.go index 330f784a0..deac917f8 100644 --- a/builder/hyperv/common/step_configure_ip.go +++ b/builder/hyperv/common/step_configure_ip.go @@ -6,8 +6,8 @@ import ( "strings" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepConfigureIp struct { diff --git a/builder/hyperv/common/step_configure_vlan.go b/builder/hyperv/common/step_configure_vlan.go index cb81a8a6c..5d713ac99 100644 --- a/builder/hyperv/common/step_configure_vlan.go +++ b/builder/hyperv/common/step_configure_vlan.go @@ -3,8 +3,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepConfigureVlan struct { diff --git a/builder/hyperv/common/step_create_external_switch.go b/builder/hyperv/common/step_create_external_switch.go index 112d79f45..8443202b3 100644 --- a/builder/hyperv/common/step_create_external_switch.go +++ b/builder/hyperv/common/step_create_external_switch.go @@ -3,9 +3,9 @@ package common import ( "fmt" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/packer" ) // This step creates switch for VM. diff --git a/builder/hyperv/common/step_create_switch.go b/builder/hyperv/common/step_create_switch.go index 4f84e6bf1..7e5ea2751 100644 --- a/builder/hyperv/common/step_create_switch.go +++ b/builder/hyperv/common/step_create_switch.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) const ( diff --git a/builder/hyperv/common/step_create_tempdir.go b/builder/hyperv/common/step_create_tempdir.go index 8ecb81b40..269ba4eae 100644 --- a/builder/hyperv/common/step_create_tempdir.go +++ b/builder/hyperv/common/step_create_tempdir.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "io/ioutil" "os" ) diff --git a/builder/hyperv/common/step_create_vm.go b/builder/hyperv/common/step_create_vm.go index 9fa65b1a8..13dd37e1f 100644 --- a/builder/hyperv/common/step_create_vm.go +++ b/builder/hyperv/common/step_create_vm.go @@ -3,8 +3,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step creates the actual virtual machine. diff --git a/builder/hyperv/common/step_disable_vlan.go b/builder/hyperv/common/step_disable_vlan.go index fd101c7a1..883ff76c4 100644 --- a/builder/hyperv/common/step_disable_vlan.go +++ b/builder/hyperv/common/step_disable_vlan.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepDisableVlan struct { diff --git a/builder/hyperv/common/step_enable_integration_service.go b/builder/hyperv/common/step_enable_integration_service.go index 399e1af44..0889bed22 100644 --- a/builder/hyperv/common/step_enable_integration_service.go +++ b/builder/hyperv/common/step_enable_integration_service.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepEnableIntegrationService struct { diff --git a/builder/hyperv/common/step_export_vm.go b/builder/hyperv/common/step_export_vm.go index 904a4b62e..8c32052a3 100644 --- a/builder/hyperv/common/step_export_vm.go +++ b/builder/hyperv/common/step_export_vm.go @@ -2,10 +2,11 @@ package common import ( "fmt" - "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "io/ioutil" "path/filepath" + + "github.com/hashicorp/packer/packer" + "github.com/mitchellh/multistep" ) const ( @@ -67,7 +68,7 @@ func (s *StepExportVm) Run(state multistep.StateBag) multistep.StepAction { } } - ui.Say("Coping to output dir...") + ui.Say("Copying to output dir...") err = driver.CopyExportedVirtualMachine(expPath, outputPath, vhdDir, vmDir) if err != nil { errorMsg = "Error exporting vm: %s" diff --git a/builder/hyperv/common/step_mount_dvddrive.go b/builder/hyperv/common/step_mount_dvddrive.go index 58426a252..632120053 100644 --- a/builder/hyperv/common/step_mount_dvddrive.go +++ b/builder/hyperv/common/step_mount_dvddrive.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/hyperv/common/step_mount_floppydrive.go b/builder/hyperv/common/step_mount_floppydrive.go index bb9272c54..c787b1fe7 100644 --- a/builder/hyperv/common/step_mount_floppydrive.go +++ b/builder/hyperv/common/step_mount_floppydrive.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "io" "io/ioutil" "log" diff --git a/builder/hyperv/common/step_mount_guest_additions.go b/builder/hyperv/common/step_mount_guest_additions.go index 66e3a8bc6..954075d08 100644 --- a/builder/hyperv/common/step_mount_guest_additions.go +++ b/builder/hyperv/common/step_mount_guest_additions.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/hyperv/common/step_mount_secondary_dvd_images.go b/builder/hyperv/common/step_mount_secondary_dvd_images.go index 2550cd9f0..4e7663d40 100644 --- a/builder/hyperv/common/step_mount_secondary_dvd_images.go +++ b/builder/hyperv/common/step_mount_secondary_dvd_images.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/hyperv/common/step_output_dir.go b/builder/hyperv/common/step_output_dir.go index 1443e5791..0054d1994 100644 --- a/builder/hyperv/common/step_output_dir.go +++ b/builder/hyperv/common/step_output_dir.go @@ -7,8 +7,8 @@ import ( "path/filepath" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepOutputDir sets up the output directory by creating it if it does diff --git a/builder/hyperv/common/step_polling_installation.go b/builder/hyperv/common/step_polling_installation.go index aa61a1e53..8586940b1 100644 --- a/builder/hyperv/common/step_polling_installation.go +++ b/builder/hyperv/common/step_polling_installation.go @@ -8,8 +8,8 @@ import ( "strings" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) const port string = "13000" diff --git a/builder/hyperv/common/step_reboot_vm.go b/builder/hyperv/common/step_reboot_vm.go index 6e45dfd62..9446781a2 100644 --- a/builder/hyperv/common/step_reboot_vm.go +++ b/builder/hyperv/common/step_reboot_vm.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "time" ) diff --git a/builder/hyperv/common/step_run.go b/builder/hyperv/common/step_run.go index b052b1050..12d621e1c 100644 --- a/builder/hyperv/common/step_run.go +++ b/builder/hyperv/common/step_run.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "time" ) diff --git a/builder/hyperv/common/step_shutdown.go b/builder/hyperv/common/step_shutdown.go index 84a20c26b..9b341b395 100644 --- a/builder/hyperv/common/step_shutdown.go +++ b/builder/hyperv/common/step_shutdown.go @@ -7,8 +7,8 @@ import ( "log" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step shuts down the machine. It first attempts to do so gracefully, diff --git a/builder/hyperv/common/step_sleep.go b/builder/hyperv/common/step_sleep.go index ce61753e4..23f7e344f 100644 --- a/builder/hyperv/common/step_sleep.go +++ b/builder/hyperv/common/step_sleep.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "time" ) diff --git a/builder/hyperv/common/step_type_boot_command.go b/builder/hyperv/common/step_type_boot_command.go index 2955813d4..dfeca6196 100644 --- a/builder/hyperv/common/step_type_boot_command.go +++ b/builder/hyperv/common/step_type_boot_command.go @@ -7,10 +7,10 @@ import ( "unicode" "unicode/utf8" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type bootCommandTemplateData struct { diff --git a/builder/hyperv/common/step_unmount_dvddrive.go b/builder/hyperv/common/step_unmount_dvddrive.go index 3af6566b3..7ba748f2f 100644 --- a/builder/hyperv/common/step_unmount_dvddrive.go +++ b/builder/hyperv/common/step_unmount_dvddrive.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepUnmountDvdDrive struct { diff --git a/builder/hyperv/common/step_unmount_floppydrive.go b/builder/hyperv/common/step_unmount_floppydrive.go index c183f463b..2d271584d 100644 --- a/builder/hyperv/common/step_unmount_floppydrive.go +++ b/builder/hyperv/common/step_unmount_floppydrive.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepUnmountFloppyDrive struct { diff --git a/builder/hyperv/common/step_unmount_guest_additions.go b/builder/hyperv/common/step_unmount_guest_additions.go index 16a4c14e8..b47e969d1 100644 --- a/builder/hyperv/common/step_unmount_guest_additions.go +++ b/builder/hyperv/common/step_unmount_guest_additions.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepUnmountGuestAdditions struct { diff --git a/builder/hyperv/common/step_unmount_secondary_dvd_images.go b/builder/hyperv/common/step_unmount_secondary_dvd_images.go index 175f6484b..e59ad6014 100644 --- a/builder/hyperv/common/step_unmount_secondary_dvd_images.go +++ b/builder/hyperv/common/step_unmount_secondary_dvd_images.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepUnmountSecondaryDvdImages struct { diff --git a/builder/hyperv/common/step_wait_for_install_to_complete.go b/builder/hyperv/common/step_wait_for_install_to_complete.go index b1674b2d6..51736ddb5 100644 --- a/builder/hyperv/common/step_wait_for_install_to_complete.go +++ b/builder/hyperv/common/step_wait_for_install_to_complete.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "time" ) diff --git a/builder/hyperv/iso/builder.go b/builder/hyperv/iso/builder.go index ede06cca0..cd73c4873 100644 --- a/builder/hyperv/iso/builder.go +++ b/builder/hyperv/iso/builder.go @@ -7,15 +7,15 @@ import ( "os" "strings" + hypervcommon "github.com/hashicorp/packer/builder/hyperv/common" + "github.com/hashicorp/packer/common" + powershell "github.com/hashicorp/packer/common/powershell" + "github.com/hashicorp/packer/common/powershell/hyperv" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - hypervcommon "github.com/mitchellh/packer/builder/hyperv/common" - "github.com/mitchellh/packer/common" - powershell "github.com/mitchellh/packer/common/powershell" - "github.com/mitchellh/packer/common/powershell/hyperv" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const ( diff --git a/builder/hyperv/iso/builder_test.go b/builder/hyperv/iso/builder_test.go index 3adf05aa9..561b6110c 100644 --- a/builder/hyperv/iso/builder_test.go +++ b/builder/hyperv/iso/builder_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/builder/null/artifact_export_test.go b/builder/null/artifact_export_test.go index 9e71613a6..aa0540851 100644 --- a/builder/null/artifact_export_test.go +++ b/builder/null/artifact_export_test.go @@ -1,7 +1,7 @@ package null import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/null/builder.go b/builder/null/builder.go index cce9227d6..08eb363b5 100644 --- a/builder/null/builder.go +++ b/builder/null/builder.go @@ -3,10 +3,10 @@ package null import ( "log" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" ) const BuilderId = "fnoeding.null" diff --git a/builder/null/builder_test.go b/builder/null/builder_test.go index 3749b2f68..2f77ccb39 100644 --- a/builder/null/builder_test.go +++ b/builder/null/builder_test.go @@ -1,7 +1,7 @@ package null import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/null/config.go b/builder/null/config.go index 697d40ce9..17d4925a1 100644 --- a/builder/null/config.go +++ b/builder/null/config.go @@ -3,11 +3,11 @@ package null import ( "fmt" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/builder/null/config_test.go b/builder/null/config_test.go index 428533e0e..29114806b 100644 --- a/builder/null/config_test.go +++ b/builder/null/config_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/mitchellh/packer/helper/communicator" + "github.com/hashicorp/packer/helper/communicator" ) func testConfig() map[string]interface{} { diff --git a/builder/null/ssh.go b/builder/null/ssh.go index 483390e86..3c31df5cc 100644 --- a/builder/null/ssh.go +++ b/builder/null/ssh.go @@ -2,8 +2,8 @@ package null import ( "fmt" + "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/communicator/ssh" gossh "golang.org/x/crypto/ssh" "io/ioutil" ) diff --git a/builder/oneandone/builder.go b/builder/oneandone/builder.go index 050a5f38e..f4f8e1dc3 100644 --- a/builder/oneandone/builder.go +++ b/builder/oneandone/builder.go @@ -3,10 +3,10 @@ package oneandone import ( "errors" "fmt" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/oneandone/builder_acc_test.go b/builder/oneandone/builder_acc_test.go index a15dce6d5..57ca974f2 100644 --- a/builder/oneandone/builder_acc_test.go +++ b/builder/oneandone/builder_acc_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - builderT "github.com/mitchellh/packer/helper/builder/testing" + builderT "github.com/hashicorp/packer/helper/builder/testing" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/oneandone/builder_test.go b/builder/oneandone/builder_test.go index 808caf46a..ae90f72b2 100644 --- a/builder/oneandone/builder_test.go +++ b/builder/oneandone/builder_test.go @@ -2,7 +2,7 @@ package oneandone import ( "fmt" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/oneandone/config.go b/builder/oneandone/config.go index fcc3fca97..e71ef2c9f 100644 --- a/builder/oneandone/config.go +++ b/builder/oneandone/config.go @@ -3,12 +3,12 @@ package oneandone import ( "errors" "github.com/1and1/oneandone-cloudserver-sdk-go" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/mapstructure" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" "os" "strings" ) diff --git a/builder/oneandone/ssh.go b/builder/oneandone/ssh.go index 669c571a5..8f1856a8e 100644 --- a/builder/oneandone/ssh.go +++ b/builder/oneandone/ssh.go @@ -2,8 +2,8 @@ package oneandone import ( "fmt" + "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/communicator/ssh" gossh "golang.org/x/crypto/ssh" ) diff --git a/builder/oneandone/step_create_server.go b/builder/oneandone/step_create_server.go index f6825a00b..2ad268ff8 100644 --- a/builder/oneandone/step_create_server.go +++ b/builder/oneandone/step_create_server.go @@ -3,8 +3,8 @@ package oneandone import ( "fmt" "github.com/1and1/oneandone-cloudserver-sdk-go" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "strings" "time" ) diff --git a/builder/oneandone/step_create_sshkey.go b/builder/oneandone/step_create_sshkey.go index bb655d39d..0ad089c23 100644 --- a/builder/oneandone/step_create_sshkey.go +++ b/builder/oneandone/step_create_sshkey.go @@ -4,8 +4,8 @@ import ( "crypto/x509" "encoding/pem" "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "golang.org/x/crypto/ssh" "io/ioutil" ) diff --git a/builder/oneandone/step_take_snapshot.go b/builder/oneandone/step_take_snapshot.go index 8e8cb88fd..b19790c7d 100644 --- a/builder/oneandone/step_take_snapshot.go +++ b/builder/oneandone/step_take_snapshot.go @@ -2,8 +2,8 @@ package oneandone import ( "github.com/1and1/oneandone-cloudserver-sdk-go" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepTakeSnapshot struct{} diff --git a/builder/openstack/access_config.go b/builder/openstack/access_config.go index 04e7c854d..10b4fd02e 100644 --- a/builder/openstack/access_config.go +++ b/builder/openstack/access_config.go @@ -8,7 +8,7 @@ import ( "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/openstack" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // AccessConfig is for common configuration related to openstack access diff --git a/builder/openstack/artifact_test.go b/builder/openstack/artifact_test.go index 313fea7cf..20f5fe3b5 100644 --- a/builder/openstack/artifact_test.go +++ b/builder/openstack/artifact_test.go @@ -1,7 +1,7 @@ package openstack import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/openstack/builder.go b/builder/openstack/builder.go index 3d4263433..46d0e4e67 100644 --- a/builder/openstack/builder.go +++ b/builder/openstack/builder.go @@ -7,12 +7,12 @@ import ( "fmt" "log" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) // The unique ID for this builder diff --git a/builder/openstack/builder_test.go b/builder/openstack/builder_test.go index ce15873eb..14fb8f2f9 100644 --- a/builder/openstack/builder_test.go +++ b/builder/openstack/builder_test.go @@ -1,7 +1,7 @@ package openstack import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/openstack/image_config.go b/builder/openstack/image_config.go index 3e4319547..3bdc1fc50 100644 --- a/builder/openstack/image_config.go +++ b/builder/openstack/image_config.go @@ -5,7 +5,7 @@ import ( "strings" imageservice "github.com/gophercloud/gophercloud/openstack/imageservice/v2/images" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // ImageConfig is for common configuration related to creating Images. @@ -26,7 +26,7 @@ func (c *ImageConfig) Prepare(ctx *interpolate.Context) []error { // "snapshot", since it came from snapshotting a VM. A "snapshot" looks // slightly different in the OpenStack UI and OpenStack won't show "snapshot" // images as a choice in the list of images to boot from for a new instance. - // See https://github.com/mitchellh/packer/issues/3038 + // See https://github.com/hashicorp/packer/issues/3038 if c.ImageMetadata == nil { c.ImageMetadata = map[string]string{"image_type": "image"} } else if c.ImageMetadata["image_type"] == "" { diff --git a/builder/openstack/run_config.go b/builder/openstack/run_config.go index eddbae1ed..1c138f790 100644 --- a/builder/openstack/run_config.go +++ b/builder/openstack/run_config.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/template/interpolate" ) // RunConfig contains configuration for running an instance from a source diff --git a/builder/openstack/run_config_test.go b/builder/openstack/run_config_test.go index 1a71b3ca2..151dcd99d 100644 --- a/builder/openstack/run_config_test.go +++ b/builder/openstack/run_config_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/mitchellh/packer/helper/communicator" + "github.com/hashicorp/packer/helper/communicator" ) func init() { diff --git a/builder/openstack/ssh.go b/builder/openstack/ssh.go index 9738c278e..3bf003e5e 100644 --- a/builder/openstack/ssh.go +++ b/builder/openstack/ssh.go @@ -11,8 +11,8 @@ import ( "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" + packerssh "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - packerssh "github.com/mitchellh/packer/communicator/ssh" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/agent" ) diff --git a/builder/openstack/step_add_image_members.go b/builder/openstack/step_add_image_members.go index cd26b822f..642ed3d46 100644 --- a/builder/openstack/step_add_image_members.go +++ b/builder/openstack/step_add_image_members.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/gophercloud/gophercloud/openstack/imageservice/v2/members" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepAddImageMembers struct{} diff --git a/builder/openstack/step_allocate_ip.go b/builder/openstack/step_allocate_ip.go index 18f385053..521e42634 100644 --- a/builder/openstack/step_allocate_ip.go +++ b/builder/openstack/step_allocate_ip.go @@ -6,8 +6,8 @@ import ( "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" "github.com/gophercloud/gophercloud/pagination" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepAllocateIp struct { diff --git a/builder/openstack/step_create_image.go b/builder/openstack/step_create_image.go index c5b12b85e..126bd4971 100644 --- a/builder/openstack/step_create_image.go +++ b/builder/openstack/step_create_image.go @@ -8,8 +8,8 @@ import ( "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/openstack/compute/v2/images" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepCreateImage struct{} diff --git a/builder/openstack/step_get_password.go b/builder/openstack/step_get_password.go index dd11c98f3..10800d5be 100644 --- a/builder/openstack/step_get_password.go +++ b/builder/openstack/step_get_password.go @@ -7,9 +7,9 @@ import ( "time" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" "golang.org/x/crypto/ssh" ) diff --git a/builder/openstack/step_key_pair.go b/builder/openstack/step_key_pair.go index b28994030..5125c6c8f 100644 --- a/builder/openstack/step_key_pair.go +++ b/builder/openstack/step_key_pair.go @@ -9,8 +9,8 @@ import ( "runtime" "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/keypairs" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "golang.org/x/crypto/ssh" ) @@ -123,7 +123,7 @@ func (s *StepKeyPair) Run(state multistep.StateBag) multistep.StepAction { return multistep.ActionContinue } -// Work around for https://github.com/mitchellh/packer/issues/2526 +// Work around for https://github.com/hashicorp/packer/issues/2526 func berToDer(ber string, ui packer.Ui) string { // Check if x/crypto/ssh can parse the key _, err := ssh.ParsePrivateKey([]byte(ber)) diff --git a/builder/openstack/step_key_pair_test.go b/builder/openstack/step_key_pair_test.go index 997844611..0ce45d6a7 100644 --- a/builder/openstack/step_key_pair_test.go +++ b/builder/openstack/step_key_pair_test.go @@ -5,7 +5,7 @@ import ( "os/exec" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "golang.org/x/crypto/ssh" ) diff --git a/builder/openstack/step_load_extensions.go b/builder/openstack/step_load_extensions.go index 4a3362fac..84ab0c8d2 100644 --- a/builder/openstack/step_load_extensions.go +++ b/builder/openstack/step_load_extensions.go @@ -6,8 +6,8 @@ import ( "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions" "github.com/gophercloud/gophercloud/pagination" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepLoadExtensions gets the FlavorRef from a Flavor. It first assumes diff --git a/builder/openstack/step_load_flavor.go b/builder/openstack/step_load_flavor.go index bac84bfa9..816e0d8f4 100644 --- a/builder/openstack/step_load_flavor.go +++ b/builder/openstack/step_load_flavor.go @@ -5,8 +5,8 @@ import ( "log" "github.com/gophercloud/gophercloud/openstack/compute/v2/flavors" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepLoadFlavor gets the FlavorRef from a Flavor. It first assumes diff --git a/builder/openstack/step_run_source_server.go b/builder/openstack/step_run_source_server.go index 2d02173fa..427f507dc 100644 --- a/builder/openstack/step_run_source_server.go +++ b/builder/openstack/step_run_source_server.go @@ -7,8 +7,8 @@ import ( "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/keypairs" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepRunSourceServer struct { diff --git a/builder/openstack/step_stop_server.go b/builder/openstack/step_stop_server.go index ede909b54..e0f240fbd 100644 --- a/builder/openstack/step_stop_server.go +++ b/builder/openstack/step_stop_server.go @@ -5,8 +5,8 @@ import ( "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/startstop" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepStopServer struct{} diff --git a/builder/openstack/step_update_image_visibility.go b/builder/openstack/step_update_image_visibility.go index 96bd9d59c..fb83134bd 100644 --- a/builder/openstack/step_update_image_visibility.go +++ b/builder/openstack/step_update_image_visibility.go @@ -4,8 +4,8 @@ import ( "fmt" imageservice "github.com/gophercloud/gophercloud/openstack/imageservice/v2/images" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepUpdateImageVisibility struct{} diff --git a/builder/openstack/step_wait_for_rackconnect.go b/builder/openstack/step_wait_for_rackconnect.go index 0afbe1379..d791e9db0 100644 --- a/builder/openstack/step_wait_for_rackconnect.go +++ b/builder/openstack/step_wait_for_rackconnect.go @@ -5,8 +5,8 @@ import ( "time" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepWaitForRackConnect struct { diff --git a/builder/parallels/common/artifact.go b/builder/parallels/common/artifact.go index 04961974b..ec236151f 100644 --- a/builder/parallels/common/artifact.go +++ b/builder/parallels/common/artifact.go @@ -6,7 +6,7 @@ import ( "path/filepath" "regexp" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // BuilderId is the common builder ID to all of these artifacts. diff --git a/builder/parallels/common/artifact_test.go b/builder/parallels/common/artifact_test.go index 3f2438200..cb2da6d39 100644 --- a/builder/parallels/common/artifact_test.go +++ b/builder/parallels/common/artifact_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestArtifact_impl(t *testing.T) { diff --git a/builder/parallels/common/config_test.go b/builder/parallels/common/config_test.go index eeeda864a..e6a902cc2 100644 --- a/builder/parallels/common/config_test.go +++ b/builder/parallels/common/config_test.go @@ -3,7 +3,7 @@ package common import ( "testing" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) func testConfigTemplate(t *testing.T) *interpolate.Context { diff --git a/builder/parallels/common/output_config.go b/builder/parallels/common/output_config.go index 7514cf089..f2e6cea50 100644 --- a/builder/parallels/common/output_config.go +++ b/builder/parallels/common/output_config.go @@ -5,8 +5,8 @@ import ( "os" "path" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/template/interpolate" ) // OutputConfig contains the configuration for builder's output. diff --git a/builder/parallels/common/output_config_test.go b/builder/parallels/common/output_config_test.go index 1bfac27fe..c3161ff42 100644 --- a/builder/parallels/common/output_config_test.go +++ b/builder/parallels/common/output_config_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/mitchellh/packer/common" + "github.com/hashicorp/packer/common" ) func TestOutputConfigPrepare(t *testing.T) { diff --git a/builder/parallels/common/prlctl_config.go b/builder/parallels/common/prlctl_config.go index f69ddf9ed..5d42c5ea4 100644 --- a/builder/parallels/common/prlctl_config.go +++ b/builder/parallels/common/prlctl_config.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // PrlctlConfig contains the configuration for running "prlctl" commands diff --git a/builder/parallels/common/prlctl_post_config.go b/builder/parallels/common/prlctl_post_config.go index 5077bb1b3..27f5cb234 100644 --- a/builder/parallels/common/prlctl_post_config.go +++ b/builder/parallels/common/prlctl_post_config.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // PrlctlPostConfig contains the configuration for running "prlctl" commands diff --git a/builder/parallels/common/prlctl_version_config.go b/builder/parallels/common/prlctl_version_config.go index b47d46fc5..ab2641cb3 100644 --- a/builder/parallels/common/prlctl_version_config.go +++ b/builder/parallels/common/prlctl_version_config.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // PrlctlVersionConfig contains the configuration for `prlctl` version. diff --git a/builder/parallels/common/run_config.go b/builder/parallels/common/run_config.go index a3c4aba55..53fb8757b 100644 --- a/builder/parallels/common/run_config.go +++ b/builder/parallels/common/run_config.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // RunConfig contains the configuration for VM run. diff --git a/builder/parallels/common/shutdown_config.go b/builder/parallels/common/shutdown_config.go index ee37ab938..4ebdf405f 100644 --- a/builder/parallels/common/shutdown_config.go +++ b/builder/parallels/common/shutdown_config.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // ShutdownConfig contains the configuration for VM shutdown. diff --git a/builder/parallels/common/ssh.go b/builder/parallels/common/ssh.go index cdc5eab5c..c4c76fabf 100644 --- a/builder/parallels/common/ssh.go +++ b/builder/parallels/common/ssh.go @@ -1,9 +1,9 @@ package common import ( + commonssh "github.com/hashicorp/packer/common/ssh" + packerssh "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - commonssh "github.com/mitchellh/packer/common/ssh" - packerssh "github.com/mitchellh/packer/communicator/ssh" "golang.org/x/crypto/ssh" ) diff --git a/builder/parallels/common/ssh_config.go b/builder/parallels/common/ssh_config.go index 8612cc0c2..10fdb30cc 100644 --- a/builder/parallels/common/ssh_config.go +++ b/builder/parallels/common/ssh_config.go @@ -3,8 +3,8 @@ package common import ( "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" ) // SSHConfig contains the configuration for SSH communicator. diff --git a/builder/parallels/common/ssh_config_test.go b/builder/parallels/common/ssh_config_test.go index 64889195f..43b83f3ad 100644 --- a/builder/parallels/common/ssh_config_test.go +++ b/builder/parallels/common/ssh_config_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/mitchellh/packer/helper/communicator" + "github.com/hashicorp/packer/helper/communicator" ) func testSSHConfig() *SSHConfig { diff --git a/builder/parallels/common/step_attach_floppy.go b/builder/parallels/common/step_attach_floppy.go index 64bf9ffa0..8b970fef2 100644 --- a/builder/parallels/common/step_attach_floppy.go +++ b/builder/parallels/common/step_attach_floppy.go @@ -4,8 +4,8 @@ import ( "fmt" "log" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepAttachFloppy is a step that attaches a floppy to the virtual machine. diff --git a/builder/parallels/common/step_attach_parallels_tools.go b/builder/parallels/common/step_attach_parallels_tools.go index a4fd0559b..87d602df7 100644 --- a/builder/parallels/common/step_attach_parallels_tools.go +++ b/builder/parallels/common/step_attach_parallels_tools.go @@ -4,8 +4,8 @@ import ( "fmt" "log" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepAttachParallelsTools is a step that attaches Parallels Tools ISO image diff --git a/builder/parallels/common/step_compact_disk.go b/builder/parallels/common/step_compact_disk.go index c6bd4e65e..2e88e7bd5 100644 --- a/builder/parallels/common/step_compact_disk.go +++ b/builder/parallels/common/step_compact_disk.go @@ -3,8 +3,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepCompactDisk is a step that removes all empty blocks from expanding diff --git a/builder/parallels/common/step_output_dir.go b/builder/parallels/common/step_output_dir.go index 0634dbdbb..3accd2cbb 100644 --- a/builder/parallels/common/step_output_dir.go +++ b/builder/parallels/common/step_output_dir.go @@ -7,8 +7,8 @@ import ( "path/filepath" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepOutputDir sets up the output directory by creating it if it does diff --git a/builder/parallels/common/step_prlctl.go b/builder/parallels/common/step_prlctl.go index 7b29919f0..a38d8b7fe 100644 --- a/builder/parallels/common/step_prlctl.go +++ b/builder/parallels/common/step_prlctl.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type commandTemplate struct { diff --git a/builder/parallels/common/step_run.go b/builder/parallels/common/step_run.go index 84b003de3..8f86e089b 100644 --- a/builder/parallels/common/step_run.go +++ b/builder/parallels/common/step_run.go @@ -4,8 +4,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepRun is a step that starts the virtual machine. diff --git a/builder/parallels/common/step_shutdown.go b/builder/parallels/common/step_shutdown.go index 3a93c1767..f8ec90009 100644 --- a/builder/parallels/common/step_shutdown.go +++ b/builder/parallels/common/step_shutdown.go @@ -7,8 +7,8 @@ import ( "log" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepShutdown is a step that shuts down the machine. It first attempts to do diff --git a/builder/parallels/common/step_shutdown_test.go b/builder/parallels/common/step_shutdown_test.go index 72a4af6cf..de3baabda 100644 --- a/builder/parallels/common/step_shutdown_test.go +++ b/builder/parallels/common/step_shutdown_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) func TestStepShutdown_impl(t *testing.T) { diff --git a/builder/parallels/common/step_test.go b/builder/parallels/common/step_test.go index 82ad8f442..cdaab7922 100644 --- a/builder/parallels/common/step_test.go +++ b/builder/parallels/common/step_test.go @@ -4,8 +4,8 @@ import ( "bytes" "testing" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) func testState(t *testing.T) multistep.StateBag { diff --git a/builder/parallels/common/step_type_boot_command.go b/builder/parallels/common/step_type_boot_command.go index 01f9743cb..c3076b82c 100644 --- a/builder/parallels/common/step_type_boot_command.go +++ b/builder/parallels/common/step_type_boot_command.go @@ -8,10 +8,10 @@ import ( "unicode" "unicode/utf8" + packer_common "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - packer_common "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type bootCommandTemplateData struct { diff --git a/builder/parallels/common/step_type_boot_command_test.go b/builder/parallels/common/step_type_boot_command_test.go index 066ea2518..ea33b9369 100644 --- a/builder/parallels/common/step_type_boot_command_test.go +++ b/builder/parallels/common/step_type_boot_command_test.go @@ -4,8 +4,8 @@ import ( "strings" "testing" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) func TestStepTypeBootCommand(t *testing.T) { diff --git a/builder/parallels/common/step_upload_parallels_tools.go b/builder/parallels/common/step_upload_parallels_tools.go index 97ba02d72..5769f1be5 100644 --- a/builder/parallels/common/step_upload_parallels_tools.go +++ b/builder/parallels/common/step_upload_parallels_tools.go @@ -5,9 +5,9 @@ import ( "log" "os" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) // This step uploads the Parallels Tools ISO to the virtual machine. diff --git a/builder/parallels/common/step_upload_parallels_tools_test.go b/builder/parallels/common/step_upload_parallels_tools_test.go index 25f0242ea..263571ff6 100644 --- a/builder/parallels/common/step_upload_parallels_tools_test.go +++ b/builder/parallels/common/step_upload_parallels_tools_test.go @@ -3,8 +3,8 @@ package common import ( "testing" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) func TestStepUploadParallelsTools_impl(t *testing.T) { diff --git a/builder/parallels/common/step_upload_version.go b/builder/parallels/common/step_upload_version.go index a120f1478..6824b035e 100644 --- a/builder/parallels/common/step_upload_version.go +++ b/builder/parallels/common/step_upload_version.go @@ -5,8 +5,8 @@ import ( "fmt" "log" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepUploadVersion is a step that uploads a file containing the version of diff --git a/builder/parallels/common/step_upload_version_test.go b/builder/parallels/common/step_upload_version_test.go index c6ae76dec..8aaf9cc90 100644 --- a/builder/parallels/common/step_upload_version_test.go +++ b/builder/parallels/common/step_upload_version_test.go @@ -3,8 +3,8 @@ package common import ( "testing" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) func TestStepUploadVersion_impl(t *testing.T) { diff --git a/builder/parallels/common/tools_config.go b/builder/parallels/common/tools_config.go index c587a77ad..c273d2e87 100644 --- a/builder/parallels/common/tools_config.go +++ b/builder/parallels/common/tools_config.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // These are the different valid mode values for "parallels_tools_mode" which diff --git a/builder/parallels/iso/builder.go b/builder/parallels/iso/builder.go index e53509c50..14ae2991d 100644 --- a/builder/parallels/iso/builder.go +++ b/builder/parallels/iso/builder.go @@ -5,13 +5,13 @@ import ( "fmt" "log" + parallelscommon "github.com/hashicorp/packer/builder/parallels/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - parallelscommon "github.com/mitchellh/packer/builder/parallels/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const BuilderId = "rickard-von-essen.parallels" diff --git a/builder/parallels/iso/builder_test.go b/builder/parallels/iso/builder_test.go index 8230941a1..b4b9eb917 100644 --- a/builder/parallels/iso/builder_test.go +++ b/builder/parallels/iso/builder_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/builder/parallels/iso/step_attach_iso.go b/builder/parallels/iso/step_attach_iso.go index df957081b..4dead4705 100644 --- a/builder/parallels/iso/step_attach_iso.go +++ b/builder/parallels/iso/step_attach_iso.go @@ -4,9 +4,9 @@ import ( "fmt" "log" + parallelscommon "github.com/hashicorp/packer/builder/parallels/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - parallelscommon "github.com/mitchellh/packer/builder/parallels/common" - "github.com/mitchellh/packer/packer" ) // This step attaches the ISO to the virtual machine. diff --git a/builder/parallels/iso/step_create_disk.go b/builder/parallels/iso/step_create_disk.go index 1737dcf6a..0333472be 100644 --- a/builder/parallels/iso/step_create_disk.go +++ b/builder/parallels/iso/step_create_disk.go @@ -4,9 +4,9 @@ import ( "fmt" "strconv" + parallelscommon "github.com/hashicorp/packer/builder/parallels/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - parallelscommon "github.com/mitchellh/packer/builder/parallels/common" - "github.com/mitchellh/packer/packer" ) // This step creates the virtual disk that will be used as the diff --git a/builder/parallels/iso/step_create_vm.go b/builder/parallels/iso/step_create_vm.go index ca8c7c44e..52cbf3fbf 100644 --- a/builder/parallels/iso/step_create_vm.go +++ b/builder/parallels/iso/step_create_vm.go @@ -3,9 +3,9 @@ package iso import ( "fmt" + parallelscommon "github.com/hashicorp/packer/builder/parallels/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - parallelscommon "github.com/mitchellh/packer/builder/parallels/common" - "github.com/mitchellh/packer/packer" ) // This step creates the actual virtual machine. diff --git a/builder/parallels/iso/step_set_boot_order.go b/builder/parallels/iso/step_set_boot_order.go index 8880c0310..a32249173 100644 --- a/builder/parallels/iso/step_set_boot_order.go +++ b/builder/parallels/iso/step_set_boot_order.go @@ -3,9 +3,9 @@ package iso import ( "fmt" + parallelscommon "github.com/hashicorp/packer/builder/parallels/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - parallelscommon "github.com/mitchellh/packer/builder/parallels/common" - "github.com/mitchellh/packer/packer" ) // This step sets the device boot order for the virtual machine. diff --git a/builder/parallels/pvm/builder.go b/builder/parallels/pvm/builder.go index bcfc75b8b..5db72bbaa 100644 --- a/builder/parallels/pvm/builder.go +++ b/builder/parallels/pvm/builder.go @@ -5,11 +5,11 @@ import ( "fmt" "log" + parallelscommon "github.com/hashicorp/packer/builder/parallels/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - parallelscommon "github.com/mitchellh/packer/builder/parallels/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" ) // Builder implements packer.Builder and builds the actual Parallels diff --git a/builder/parallels/pvm/config.go b/builder/parallels/pvm/config.go index ddcadcfee..7641e0c9d 100644 --- a/builder/parallels/pvm/config.go +++ b/builder/parallels/pvm/config.go @@ -4,11 +4,11 @@ import ( "fmt" "os" - parallelscommon "github.com/mitchellh/packer/builder/parallels/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + parallelscommon "github.com/hashicorp/packer/builder/parallels/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) // Config is the configuration structure for the builder. diff --git a/builder/parallels/pvm/config_test.go b/builder/parallels/pvm/config_test.go index 87fd96b3d..c6c36a0b4 100644 --- a/builder/parallels/pvm/config_test.go +++ b/builder/parallels/pvm/config_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig(t *testing.T) map[string]interface{} { diff --git a/builder/parallels/pvm/step_import.go b/builder/parallels/pvm/step_import.go index 123050f18..91b8878af 100644 --- a/builder/parallels/pvm/step_import.go +++ b/builder/parallels/pvm/step_import.go @@ -3,9 +3,9 @@ package pvm import ( "fmt" + parallelscommon "github.com/hashicorp/packer/builder/parallels/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - parallelscommon "github.com/mitchellh/packer/builder/parallels/common" - "github.com/mitchellh/packer/packer" ) // This step imports an PVM VM into Parallels. diff --git a/builder/parallels/pvm/step_test.go b/builder/parallels/pvm/step_test.go index b9fdbb404..827850a35 100644 --- a/builder/parallels/pvm/step_test.go +++ b/builder/parallels/pvm/step_test.go @@ -4,9 +4,9 @@ import ( "bytes" "testing" + parallelscommon "github.com/hashicorp/packer/builder/parallels/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - parallelscommon "github.com/mitchellh/packer/builder/parallels/common" - "github.com/mitchellh/packer/packer" ) func testState(t *testing.T) multistep.StateBag { diff --git a/builder/profitbricks/artifact_test.go b/builder/profitbricks/artifact_test.go index 5b9ad1a8c..1760f3b6a 100644 --- a/builder/profitbricks/artifact_test.go +++ b/builder/profitbricks/artifact_test.go @@ -3,7 +3,7 @@ package profitbricks import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestArtifact_Impl(t *testing.T) { diff --git a/builder/profitbricks/builder.go b/builder/profitbricks/builder.go index a7f3a371f..95a2b1b2d 100644 --- a/builder/profitbricks/builder.go +++ b/builder/profitbricks/builder.go @@ -2,10 +2,10 @@ package profitbricks import ( "fmt" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/profitbricks/builder_acc_test.go b/builder/profitbricks/builder_acc_test.go index 921dc9d73..93fd7946d 100644 --- a/builder/profitbricks/builder_acc_test.go +++ b/builder/profitbricks/builder_acc_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - builderT "github.com/mitchellh/packer/helper/builder/testing" + builderT "github.com/hashicorp/packer/helper/builder/testing" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/profitbricks/builder_test.go b/builder/profitbricks/builder_test.go index 65e284690..70b73226f 100644 --- a/builder/profitbricks/builder_test.go +++ b/builder/profitbricks/builder_test.go @@ -2,7 +2,7 @@ package profitbricks import ( "fmt" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/profitbricks/config.go b/builder/profitbricks/config.go index 79c697a19..62ffc18c8 100644 --- a/builder/profitbricks/config.go +++ b/builder/profitbricks/config.go @@ -2,12 +2,12 @@ package profitbricks import ( "errors" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/mapstructure" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" "os" ) diff --git a/builder/profitbricks/ssh.go b/builder/profitbricks/ssh.go index 55aa80950..7069a77ba 100644 --- a/builder/profitbricks/ssh.go +++ b/builder/profitbricks/ssh.go @@ -2,8 +2,8 @@ package profitbricks import ( "fmt" + "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/communicator/ssh" gossh "golang.org/x/crypto/ssh" ) diff --git a/builder/profitbricks/step_create_server.go b/builder/profitbricks/step_create_server.go index ef606e380..70c9148d5 100644 --- a/builder/profitbricks/step_create_server.go +++ b/builder/profitbricks/step_create_server.go @@ -8,8 +8,8 @@ import ( "strings" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "github.com/profitbricks/profitbricks-sdk-go" ) diff --git a/builder/profitbricks/step_create_ssh_key.go b/builder/profitbricks/step_create_ssh_key.go index eba23fc9d..0afccb494 100644 --- a/builder/profitbricks/step_create_ssh_key.go +++ b/builder/profitbricks/step_create_ssh_key.go @@ -4,8 +4,8 @@ import ( "crypto/x509" "encoding/pem" "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "golang.org/x/crypto/ssh" "io/ioutil" ) diff --git a/builder/profitbricks/step_take_snapshot.go b/builder/profitbricks/step_take_snapshot.go index 1c172daef..db63df73c 100644 --- a/builder/profitbricks/step_take_snapshot.go +++ b/builder/profitbricks/step_take_snapshot.go @@ -4,8 +4,8 @@ import ( "encoding/json" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "github.com/profitbricks/profitbricks-sdk-go" ) diff --git a/builder/qemu/builder.go b/builder/qemu/builder.go index 3e2b79b11..2b6b206d9 100644 --- a/builder/qemu/builder.go +++ b/builder/qemu/builder.go @@ -10,12 +10,12 @@ import ( "runtime" "time" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const BuilderId = "transcend.qemu" diff --git a/builder/qemu/builder_test.go b/builder/qemu/builder_test.go index 9704d37b8..24c5dc47e 100644 --- a/builder/qemu/builder_test.go +++ b/builder/qemu/builder_test.go @@ -7,7 +7,7 @@ import ( "reflect" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) var testPem = ` diff --git a/builder/qemu/ssh.go b/builder/qemu/ssh.go index 498d3fbe9..83c923f67 100644 --- a/builder/qemu/ssh.go +++ b/builder/qemu/ssh.go @@ -1,9 +1,9 @@ package qemu import ( + commonssh "github.com/hashicorp/packer/common/ssh" + "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - commonssh "github.com/mitchellh/packer/common/ssh" - "github.com/mitchellh/packer/communicator/ssh" gossh "golang.org/x/crypto/ssh" ) diff --git a/builder/qemu/step_boot_wait.go b/builder/qemu/step_boot_wait.go index 8557900a5..3e4e48320 100644 --- a/builder/qemu/step_boot_wait.go +++ b/builder/qemu/step_boot_wait.go @@ -2,8 +2,8 @@ package qemu import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "time" ) diff --git a/builder/qemu/step_configure_vnc.go b/builder/qemu/step_configure_vnc.go index bda624f89..2cbfd6820 100644 --- a/builder/qemu/step_configure_vnc.go +++ b/builder/qemu/step_configure_vnc.go @@ -6,8 +6,8 @@ import ( "math/rand" "net" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step configures the VM to enable the VNC server. diff --git a/builder/qemu/step_convert_disk.go b/builder/qemu/step_convert_disk.go index 5017470fc..db7fe52c3 100644 --- a/builder/qemu/step_convert_disk.go +++ b/builder/qemu/step_convert_disk.go @@ -4,8 +4,8 @@ import ( "fmt" "path/filepath" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "os" ) diff --git a/builder/qemu/step_copy_disk.go b/builder/qemu/step_copy_disk.go index e5d53fa56..633d8d6b8 100644 --- a/builder/qemu/step_copy_disk.go +++ b/builder/qemu/step_copy_disk.go @@ -4,8 +4,8 @@ import ( "fmt" "path/filepath" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step copies the virtual disk that will be used as the diff --git a/builder/qemu/step_create_disk.go b/builder/qemu/step_create_disk.go index 3af48cd4b..5d844e2a0 100644 --- a/builder/qemu/step_create_disk.go +++ b/builder/qemu/step_create_disk.go @@ -4,8 +4,8 @@ import ( "fmt" "path/filepath" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step creates the virtual disk that will be used as the diff --git a/builder/qemu/step_forward_ssh.go b/builder/qemu/step_forward_ssh.go index c0653171b..7737fcbd8 100644 --- a/builder/qemu/step_forward_ssh.go +++ b/builder/qemu/step_forward_ssh.go @@ -6,8 +6,8 @@ import ( "math/rand" "net" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step adds a NAT port forwarding definition so that SSH is available diff --git a/builder/qemu/step_prepare_output_dir.go b/builder/qemu/step_prepare_output_dir.go index 0f3bd1278..7023ac9b8 100644 --- a/builder/qemu/step_prepare_output_dir.go +++ b/builder/qemu/step_prepare_output_dir.go @@ -1,8 +1,8 @@ package qemu import ( + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" "os" "time" diff --git a/builder/qemu/step_resize_disk.go b/builder/qemu/step_resize_disk.go index 22c56dc37..fbbd8d572 100644 --- a/builder/qemu/step_resize_disk.go +++ b/builder/qemu/step_resize_disk.go @@ -4,8 +4,8 @@ import ( "fmt" "path/filepath" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step resizes the virtual disk that will be used as the diff --git a/builder/qemu/step_run.go b/builder/qemu/step_run.go index 12316dd97..dc9dd2faa 100644 --- a/builder/qemu/step_run.go +++ b/builder/qemu/step_run.go @@ -7,9 +7,9 @@ import ( "strconv" "strings" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) // stepRun runs the virtual machine diff --git a/builder/qemu/step_set_iso.go b/builder/qemu/step_set_iso.go index eb39f1448..f32a2687b 100644 --- a/builder/qemu/step_set_iso.go +++ b/builder/qemu/step_set_iso.go @@ -4,8 +4,8 @@ import ( "fmt" "net/http" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step set iso_patch to available url diff --git a/builder/qemu/step_shutdown.go b/builder/qemu/step_shutdown.go index 2bca7a09e..88fa42c34 100644 --- a/builder/qemu/step_shutdown.go +++ b/builder/qemu/step_shutdown.go @@ -6,8 +6,8 @@ import ( "log" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step shuts down the machine. It first attempts to do so gracefully, diff --git a/builder/qemu/step_type_boot_command.go b/builder/qemu/step_type_boot_command.go index 2ec581685..526a792e3 100644 --- a/builder/qemu/step_type_boot_command.go +++ b/builder/qemu/step_type_boot_command.go @@ -10,11 +10,11 @@ import ( "unicode" "unicode/utf8" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/go-vnc" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" "os" ) diff --git a/builder/triton/access_config.go b/builder/triton/access_config.go index 08deefdff..229f63ec9 100644 --- a/builder/triton/access_config.go +++ b/builder/triton/access_config.go @@ -6,11 +6,11 @@ import ( "log" "os" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/template/interpolate" "github.com/joyent/gocommon/client" "github.com/joyent/gosdc/cloudapi" "github.com/joyent/gosign/auth" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/template/interpolate" ) // AccessConfig is for common configuration related to Triton access diff --git a/builder/triton/builder.go b/builder/triton/builder.go index 3c9f3e856..dd9ba30b9 100644 --- a/builder/triton/builder.go +++ b/builder/triton/builder.go @@ -4,11 +4,11 @@ import ( "log" "github.com/hashicorp/go-multierror" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" ) const ( diff --git a/builder/triton/config.go b/builder/triton/config.go index 683fb807c..9a08508b5 100644 --- a/builder/triton/config.go +++ b/builder/triton/config.go @@ -1,9 +1,9 @@ package triton import ( - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/builder/triton/driver_triton.go b/builder/triton/driver_triton.go index 277ab8ef9..cef18bab8 100644 --- a/builder/triton/driver_triton.go +++ b/builder/triton/driver_triton.go @@ -5,8 +5,8 @@ import ( "strings" "time" + "github.com/hashicorp/packer/packer" "github.com/joyent/gosdc/cloudapi" - "github.com/mitchellh/packer/packer" ) type driverTriton struct { diff --git a/builder/triton/source_machine_config.go b/builder/triton/source_machine_config.go index d98cce05b..549a2a114 100644 --- a/builder/triton/source_machine_config.go +++ b/builder/triton/source_machine_config.go @@ -3,7 +3,7 @@ package triton import ( "fmt" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // SourceMachineConfig represents the configuration to run a machine using diff --git a/builder/triton/ssh.go b/builder/triton/ssh.go index 084ad8909..496379318 100644 --- a/builder/triton/ssh.go +++ b/builder/triton/ssh.go @@ -3,8 +3,8 @@ package triton import ( "fmt" + packerssh "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - packerssh "github.com/mitchellh/packer/communicator/ssh" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/agent" "io/ioutil" diff --git a/builder/triton/step_create_image_from_machine.go b/builder/triton/step_create_image_from_machine.go index dd2201576..76c46a768 100644 --- a/builder/triton/step_create_image_from_machine.go +++ b/builder/triton/step_create_image_from_machine.go @@ -4,8 +4,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepCreateImageFromMachine creates an image with the specified attributes diff --git a/builder/triton/step_create_source_machine.go b/builder/triton/step_create_source_machine.go index 6de30143e..b5a8aec15 100644 --- a/builder/triton/step_create_source_machine.go +++ b/builder/triton/step_create_source_machine.go @@ -4,8 +4,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepCreateSourceMachine creates an machine with the specified attributes diff --git a/builder/triton/step_delete_machine.go b/builder/triton/step_delete_machine.go index 1538212b6..d766f9833 100644 --- a/builder/triton/step_delete_machine.go +++ b/builder/triton/step_delete_machine.go @@ -4,8 +4,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepDeleteMachine deletes the machine with the ID specified in state["machine"] diff --git a/builder/triton/step_stop_machine.go b/builder/triton/step_stop_machine.go index 1974eb733..00eb75958 100644 --- a/builder/triton/step_stop_machine.go +++ b/builder/triton/step_stop_machine.go @@ -4,8 +4,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepStopMachine stops the machine with the given Machine ID, and waits diff --git a/builder/triton/step_test.go b/builder/triton/step_test.go index 1816af279..61580edfe 100644 --- a/builder/triton/step_test.go +++ b/builder/triton/step_test.go @@ -2,8 +2,8 @@ package triton import ( "bytes" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "testing" ) diff --git a/builder/triton/step_wait_for_stop_to_not_fail.go b/builder/triton/step_wait_for_stop_to_not_fail.go index dfe719466..cd4df4704 100644 --- a/builder/triton/step_wait_for_stop_to_not_fail.go +++ b/builder/triton/step_wait_for_stop_to_not_fail.go @@ -3,8 +3,8 @@ package triton import ( "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepWaitForStopNotToFail waits for 10 seconds before returning with continue diff --git a/builder/triton/target_image_config.go b/builder/triton/target_image_config.go index 3a180a8ee..53a9f58f7 100644 --- a/builder/triton/target_image_config.go +++ b/builder/triton/target_image_config.go @@ -3,7 +3,7 @@ package triton import ( "fmt" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // TargetImageConfig represents the configuration for the image to be created diff --git a/builder/virtualbox/common/artifact.go b/builder/virtualbox/common/artifact.go index c28fb6c59..e560e788d 100644 --- a/builder/virtualbox/common/artifact.go +++ b/builder/virtualbox/common/artifact.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // This is the common builder ID to all of these artifacts. diff --git a/builder/virtualbox/common/artifact_test.go b/builder/virtualbox/common/artifact_test.go index f9ddc5dbf..023d2dd44 100644 --- a/builder/virtualbox/common/artifact_test.go +++ b/builder/virtualbox/common/artifact_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestArtifact_impl(t *testing.T) { diff --git a/builder/virtualbox/common/config_test.go b/builder/virtualbox/common/config_test.go index eeeda864a..e6a902cc2 100644 --- a/builder/virtualbox/common/config_test.go +++ b/builder/virtualbox/common/config_test.go @@ -3,7 +3,7 @@ package common import ( "testing" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) func testConfigTemplate(t *testing.T) *interpolate.Context { diff --git a/builder/virtualbox/common/export_config.go b/builder/virtualbox/common/export_config.go index 62e11e607..08dfb267c 100644 --- a/builder/virtualbox/common/export_config.go +++ b/builder/virtualbox/common/export_config.go @@ -3,7 +3,7 @@ package common import ( "errors" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type ExportConfig struct { diff --git a/builder/virtualbox/common/export_opts.go b/builder/virtualbox/common/export_opts.go index cd66da586..de94a7caa 100644 --- a/builder/virtualbox/common/export_opts.go +++ b/builder/virtualbox/common/export_opts.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type ExportOpts struct { diff --git a/builder/virtualbox/common/output_config.go b/builder/virtualbox/common/output_config.go index 7b5ddcd45..14eced008 100644 --- a/builder/virtualbox/common/output_config.go +++ b/builder/virtualbox/common/output_config.go @@ -3,8 +3,8 @@ package common import ( "fmt" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/template/interpolate" ) type OutputConfig struct { diff --git a/builder/virtualbox/common/output_config_test.go b/builder/virtualbox/common/output_config_test.go index a4d8e7999..08cff37d1 100644 --- a/builder/virtualbox/common/output_config_test.go +++ b/builder/virtualbox/common/output_config_test.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/common" + "github.com/hashicorp/packer/common" "io/ioutil" "os" "testing" diff --git a/builder/virtualbox/common/run_config.go b/builder/virtualbox/common/run_config.go index 595667b11..6d3f58686 100644 --- a/builder/virtualbox/common/run_config.go +++ b/builder/virtualbox/common/run_config.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type RunConfig struct { diff --git a/builder/virtualbox/common/shutdown_config.go b/builder/virtualbox/common/shutdown_config.go index cbb939645..05180ef09 100644 --- a/builder/virtualbox/common/shutdown_config.go +++ b/builder/virtualbox/common/shutdown_config.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type ShutdownConfig struct { diff --git a/builder/virtualbox/common/ssh.go b/builder/virtualbox/common/ssh.go index 0ad514be9..5316a1c31 100644 --- a/builder/virtualbox/common/ssh.go +++ b/builder/virtualbox/common/ssh.go @@ -1,9 +1,9 @@ package common import ( + commonssh "github.com/hashicorp/packer/common/ssh" + "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - commonssh "github.com/mitchellh/packer/common/ssh" - "github.com/mitchellh/packer/communicator/ssh" gossh "golang.org/x/crypto/ssh" ) diff --git a/builder/virtualbox/common/ssh_config.go b/builder/virtualbox/common/ssh_config.go index 3d31781f1..3136bca98 100644 --- a/builder/virtualbox/common/ssh_config.go +++ b/builder/virtualbox/common/ssh_config.go @@ -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 { diff --git a/builder/virtualbox/common/ssh_config_test.go b/builder/virtualbox/common/ssh_config_test.go index d31ab4f0b..b7dc7f90e 100644 --- a/builder/virtualbox/common/ssh_config_test.go +++ b/builder/virtualbox/common/ssh_config_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/mitchellh/packer/helper/communicator" + "github.com/hashicorp/packer/helper/communicator" ) func testSSHConfig() *SSHConfig { diff --git a/builder/virtualbox/common/step_attach_floppy.go b/builder/virtualbox/common/step_attach_floppy.go index 5ebcf9b5f..238619551 100644 --- a/builder/virtualbox/common/step_attach_floppy.go +++ b/builder/virtualbox/common/step_attach_floppy.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "io" "io/ioutil" "log" diff --git a/builder/virtualbox/common/step_attach_guest_additions.go b/builder/virtualbox/common/step_attach_guest_additions.go index 6017079d4..de51237a5 100644 --- a/builder/virtualbox/common/step_attach_guest_additions.go +++ b/builder/virtualbox/common/step_attach_guest_additions.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/virtualbox/common/step_configure_vrdp.go b/builder/virtualbox/common/step_configure_vrdp.go index b48a70d60..9a966c508 100644 --- a/builder/virtualbox/common/step_configure_vrdp.go +++ b/builder/virtualbox/common/step_configure_vrdp.go @@ -6,8 +6,8 @@ import ( "math/rand" "net" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step configures the VM to enable the VRDP server diff --git a/builder/virtualbox/common/step_download_guest_additions.go b/builder/virtualbox/common/step_download_guest_additions.go index 5ade2457c..8039d0fa4 100644 --- a/builder/virtualbox/common/step_download_guest_additions.go +++ b/builder/virtualbox/common/step_download_guest_additions.go @@ -9,10 +9,10 @@ import ( "os" "strings" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) var additionsVersionMap = map[string]string{ diff --git a/builder/virtualbox/common/step_export.go b/builder/virtualbox/common/step_export.go index cf1bd18cf..4e7a6411f 100644 --- a/builder/virtualbox/common/step_export.go +++ b/builder/virtualbox/common/step_export.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" "path/filepath" "strings" diff --git a/builder/virtualbox/common/step_forward_ssh.go b/builder/virtualbox/common/step_forward_ssh.go index 0f514a843..002397395 100644 --- a/builder/virtualbox/common/step_forward_ssh.go +++ b/builder/virtualbox/common/step_forward_ssh.go @@ -6,9 +6,9 @@ import ( "math/rand" "net" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" ) // This step adds a NAT port forwarding definition so that SSH is available diff --git a/builder/virtualbox/common/step_output_dir.go b/builder/virtualbox/common/step_output_dir.go index 1443e5791..0054d1994 100644 --- a/builder/virtualbox/common/step_output_dir.go +++ b/builder/virtualbox/common/step_output_dir.go @@ -7,8 +7,8 @@ import ( "path/filepath" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepOutputDir sets up the output directory by creating it if it does diff --git a/builder/virtualbox/common/step_remove_devices.go b/builder/virtualbox/common/step_remove_devices.go index 6508a138f..52d32f1b2 100644 --- a/builder/virtualbox/common/step_remove_devices.go +++ b/builder/virtualbox/common/step_remove_devices.go @@ -4,9 +4,9 @@ import ( "fmt" "log" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/packer" ) // This step removes any devices (floppy disks, ISOs, etc.) from the diff --git a/builder/virtualbox/common/step_run.go b/builder/virtualbox/common/step_run.go index 487f31430..3019c57d6 100644 --- a/builder/virtualbox/common/step_run.go +++ b/builder/virtualbox/common/step_run.go @@ -4,8 +4,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step starts the virtual machine. diff --git a/builder/virtualbox/common/step_shutdown.go b/builder/virtualbox/common/step_shutdown.go index 1b70485b6..82bcb05ab 100644 --- a/builder/virtualbox/common/step_shutdown.go +++ b/builder/virtualbox/common/step_shutdown.go @@ -3,8 +3,8 @@ package common import ( "errors" "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" "time" ) diff --git a/builder/virtualbox/common/step_shutdown_test.go b/builder/virtualbox/common/step_shutdown_test.go index a80dec7cd..769ed64f0 100644 --- a/builder/virtualbox/common/step_shutdown_test.go +++ b/builder/virtualbox/common/step_shutdown_test.go @@ -1,8 +1,8 @@ package common import ( + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "testing" "time" ) diff --git a/builder/virtualbox/common/step_suppress_messages.go b/builder/virtualbox/common/step_suppress_messages.go index a99576f12..863606526 100644 --- a/builder/virtualbox/common/step_suppress_messages.go +++ b/builder/virtualbox/common/step_suppress_messages.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/virtualbox/common/step_test.go b/builder/virtualbox/common/step_test.go index 9bf6d5d67..c6424b692 100644 --- a/builder/virtualbox/common/step_test.go +++ b/builder/virtualbox/common/step_test.go @@ -2,8 +2,8 @@ package common import ( "bytes" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "testing" ) diff --git a/builder/virtualbox/common/step_type_boot_command.go b/builder/virtualbox/common/step_type_boot_command.go index 26d5a9658..3220ca8b8 100644 --- a/builder/virtualbox/common/step_type_boot_command.go +++ b/builder/virtualbox/common/step_type_boot_command.go @@ -8,10 +8,10 @@ import ( "unicode" "unicode/utf8" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const KeyLeftShift uint32 = 0xFFE1 diff --git a/builder/virtualbox/common/step_upload_guest_additions.go b/builder/virtualbox/common/step_upload_guest_additions.go index ccc054616..a98676555 100644 --- a/builder/virtualbox/common/step_upload_guest_additions.go +++ b/builder/virtualbox/common/step_upload_guest_additions.go @@ -5,9 +5,9 @@ import ( "log" "os" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type guestAdditionsPathTemplate struct { diff --git a/builder/virtualbox/common/step_upload_version.go b/builder/virtualbox/common/step_upload_version.go index 02566c8cb..ab1ca6c7f 100644 --- a/builder/virtualbox/common/step_upload_version.go +++ b/builder/virtualbox/common/step_upload_version.go @@ -3,8 +3,8 @@ package common import ( "bytes" "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/virtualbox/common/step_upload_version_test.go b/builder/virtualbox/common/step_upload_version_test.go index 234c4b5df..1414a2278 100644 --- a/builder/virtualbox/common/step_upload_version_test.go +++ b/builder/virtualbox/common/step_upload_version_test.go @@ -1,8 +1,8 @@ package common import ( + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "testing" ) diff --git a/builder/virtualbox/common/step_vboxmanage.go b/builder/virtualbox/common/step_vboxmanage.go index 4eae387ee..7544dbbce 100644 --- a/builder/virtualbox/common/step_vboxmanage.go +++ b/builder/virtualbox/common/step_vboxmanage.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type commandTemplate struct { diff --git a/builder/virtualbox/common/vbox_version_config.go b/builder/virtualbox/common/vbox_version_config.go index 5ece4d12a..2b2b87886 100644 --- a/builder/virtualbox/common/vbox_version_config.go +++ b/builder/virtualbox/common/vbox_version_config.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type VBoxVersionConfig struct { diff --git a/builder/virtualbox/common/vboxmanage_config.go b/builder/virtualbox/common/vboxmanage_config.go index 1670aee0d..7ee0a19ce 100644 --- a/builder/virtualbox/common/vboxmanage_config.go +++ b/builder/virtualbox/common/vboxmanage_config.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type VBoxManageConfig struct { diff --git a/builder/virtualbox/common/vboxmanage_post_config.go b/builder/virtualbox/common/vboxmanage_post_config.go index 570e9b1fc..d05913f9f 100644 --- a/builder/virtualbox/common/vboxmanage_post_config.go +++ b/builder/virtualbox/common/vboxmanage_post_config.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type VBoxManagePostConfig struct { diff --git a/builder/virtualbox/iso/builder.go b/builder/virtualbox/iso/builder.go index f9def2528..f5442184e 100644 --- a/builder/virtualbox/iso/builder.go +++ b/builder/virtualbox/iso/builder.go @@ -6,13 +6,13 @@ import ( "log" "strings" + vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - vboxcommon "github.com/mitchellh/packer/builder/virtualbox/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const BuilderId = "mitchellh.virtualbox" diff --git a/builder/virtualbox/iso/builder_acc_test.go b/builder/virtualbox/iso/builder_acc_test.go index d756f452e..630d4094f 100644 --- a/builder/virtualbox/iso/builder_acc_test.go +++ b/builder/virtualbox/iso/builder_acc_test.go @@ -3,7 +3,7 @@ package iso import ( "testing" - builderT "github.com/mitchellh/packer/helper/builder/testing" + builderT "github.com/hashicorp/packer/helper/builder/testing" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/virtualbox/iso/builder_test.go b/builder/virtualbox/iso/builder_test.go index 5cf8bde28..370ebe675 100644 --- a/builder/virtualbox/iso/builder_test.go +++ b/builder/virtualbox/iso/builder_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - "github.com/mitchellh/packer/builder/virtualbox/common" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/builder/virtualbox/common" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/builder/virtualbox/iso/step_attach_iso.go b/builder/virtualbox/iso/step_attach_iso.go index dfba91b7b..a997ee823 100644 --- a/builder/virtualbox/iso/step_attach_iso.go +++ b/builder/virtualbox/iso/step_attach_iso.go @@ -2,9 +2,9 @@ package iso import ( "fmt" + vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vboxcommon "github.com/mitchellh/packer/builder/virtualbox/common" - "github.com/mitchellh/packer/packer" ) // This step attaches the ISO to the virtual machine. diff --git a/builder/virtualbox/iso/step_create_disk.go b/builder/virtualbox/iso/step_create_disk.go index 52e159687..bc581040e 100644 --- a/builder/virtualbox/iso/step_create_disk.go +++ b/builder/virtualbox/iso/step_create_disk.go @@ -2,9 +2,9 @@ package iso import ( "fmt" + vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vboxcommon "github.com/mitchellh/packer/builder/virtualbox/common" - "github.com/mitchellh/packer/packer" "path/filepath" "strconv" "strings" diff --git a/builder/virtualbox/iso/step_create_vm.go b/builder/virtualbox/iso/step_create_vm.go index 66cd75139..149fd6d9a 100644 --- a/builder/virtualbox/iso/step_create_vm.go +++ b/builder/virtualbox/iso/step_create_vm.go @@ -2,9 +2,9 @@ package iso import ( "fmt" + vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vboxcommon "github.com/mitchellh/packer/builder/virtualbox/common" - "github.com/mitchellh/packer/packer" "time" ) diff --git a/builder/virtualbox/ovf/builder.go b/builder/virtualbox/ovf/builder.go index 9607a0717..475bbebcf 100644 --- a/builder/virtualbox/ovf/builder.go +++ b/builder/virtualbox/ovf/builder.go @@ -5,11 +5,11 @@ import ( "fmt" "log" + vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vboxcommon "github.com/mitchellh/packer/builder/virtualbox/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" ) // Builder implements packer.Builder and builds the actual VirtualBox diff --git a/builder/virtualbox/ovf/config.go b/builder/virtualbox/ovf/config.go index 0151c3ca1..51d394fdb 100644 --- a/builder/virtualbox/ovf/config.go +++ b/builder/virtualbox/ovf/config.go @@ -4,11 +4,11 @@ import ( "fmt" "strings" - vboxcommon "github.com/mitchellh/packer/builder/virtualbox/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) // Config is the configuration structure for the builder. diff --git a/builder/virtualbox/ovf/config_test.go b/builder/virtualbox/ovf/config_test.go index 9797c4831..980c4d4ef 100644 --- a/builder/virtualbox/ovf/config_test.go +++ b/builder/virtualbox/ovf/config_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig(t *testing.T) map[string]interface{} { diff --git a/builder/virtualbox/ovf/step_import.go b/builder/virtualbox/ovf/step_import.go index 2d8887444..6e293d31b 100644 --- a/builder/virtualbox/ovf/step_import.go +++ b/builder/virtualbox/ovf/step_import.go @@ -2,9 +2,9 @@ package ovf import ( "fmt" + vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vboxcommon "github.com/mitchellh/packer/builder/virtualbox/common" - "github.com/mitchellh/packer/packer" ) // This step imports an OVF VM into VirtualBox. diff --git a/builder/virtualbox/ovf/step_import_test.go b/builder/virtualbox/ovf/step_import_test.go index 7d535dc05..217fee632 100644 --- a/builder/virtualbox/ovf/step_import_test.go +++ b/builder/virtualbox/ovf/step_import_test.go @@ -1,8 +1,8 @@ package ovf import ( + vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" "github.com/mitchellh/multistep" - vboxcommon "github.com/mitchellh/packer/builder/virtualbox/common" "testing" ) diff --git a/builder/virtualbox/ovf/step_test.go b/builder/virtualbox/ovf/step_test.go index d53e29154..cbd18dbd5 100644 --- a/builder/virtualbox/ovf/step_test.go +++ b/builder/virtualbox/ovf/step_test.go @@ -2,9 +2,9 @@ package ovf import ( "bytes" + vboxcommon "github.com/hashicorp/packer/builder/virtualbox/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vboxcommon "github.com/mitchellh/packer/builder/virtualbox/common" - "github.com/mitchellh/packer/packer" "testing" ) diff --git a/builder/vmware/common/artifact.go b/builder/vmware/common/artifact.go index 15d797f3f..48fcb8139 100644 --- a/builder/vmware/common/artifact.go +++ b/builder/vmware/common/artifact.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // BuilderId for the local artifacts diff --git a/builder/vmware/common/artifact_test.go b/builder/vmware/common/artifact_test.go index a0379b82d..e081cc358 100644 --- a/builder/vmware/common/artifact_test.go +++ b/builder/vmware/common/artifact_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestLocalArtifact_impl(t *testing.T) { diff --git a/builder/vmware/common/config_test.go b/builder/vmware/common/config_test.go index eeeda864a..e6a902cc2 100644 --- a/builder/vmware/common/config_test.go +++ b/builder/vmware/common/config_test.go @@ -3,7 +3,7 @@ package common import ( "testing" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) func testConfigTemplate(t *testing.T) *interpolate.Context { diff --git a/builder/vmware/common/driver_config.go b/builder/vmware/common/driver_config.go index ecd42b0f5..13c9e96ac 100644 --- a/builder/vmware/common/driver_config.go +++ b/builder/vmware/common/driver_config.go @@ -3,7 +3,7 @@ package common import ( "os" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type DriverConfig struct { diff --git a/builder/vmware/common/output_config.go b/builder/vmware/common/output_config.go index 7b5ddcd45..14eced008 100644 --- a/builder/vmware/common/output_config.go +++ b/builder/vmware/common/output_config.go @@ -3,8 +3,8 @@ package common import ( "fmt" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/template/interpolate" ) type OutputConfig struct { diff --git a/builder/vmware/common/output_config_test.go b/builder/vmware/common/output_config_test.go index 7de378d89..34983710f 100644 --- a/builder/vmware/common/output_config_test.go +++ b/builder/vmware/common/output_config_test.go @@ -3,7 +3,7 @@ package common import ( "testing" - "github.com/mitchellh/packer/common" + "github.com/hashicorp/packer/common" ) func TestOutputConfigPrepare(t *testing.T) { diff --git a/builder/vmware/common/run_config.go b/builder/vmware/common/run_config.go index 7af3b9634..89f48b9c6 100644 --- a/builder/vmware/common/run_config.go +++ b/builder/vmware/common/run_config.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type RunConfig struct { diff --git a/builder/vmware/common/shutdown_config.go b/builder/vmware/common/shutdown_config.go index 83d2224c3..faa90268f 100644 --- a/builder/vmware/common/shutdown_config.go +++ b/builder/vmware/common/shutdown_config.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type ShutdownConfig struct { diff --git a/builder/vmware/common/ssh.go b/builder/vmware/common/ssh.go index 86e184bb5..c03a4e2df 100644 --- a/builder/vmware/common/ssh.go +++ b/builder/vmware/common/ssh.go @@ -7,9 +7,9 @@ import ( "log" "os" + commonssh "github.com/hashicorp/packer/common/ssh" + "github.com/hashicorp/packer/communicator/ssh" "github.com/mitchellh/multistep" - commonssh "github.com/mitchellh/packer/common/ssh" - "github.com/mitchellh/packer/communicator/ssh" gossh "golang.org/x/crypto/ssh" ) diff --git a/builder/vmware/common/ssh_config.go b/builder/vmware/common/ssh_config.go index a0bbf942e..47cb9b917 100644 --- a/builder/vmware/common/ssh_config.go +++ b/builder/vmware/common/ssh_config.go @@ -3,8 +3,8 @@ package common import ( "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 { diff --git a/builder/vmware/common/ssh_config_test.go b/builder/vmware/common/ssh_config_test.go index 64889195f..43b83f3ad 100644 --- a/builder/vmware/common/ssh_config_test.go +++ b/builder/vmware/common/ssh_config_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/mitchellh/packer/helper/communicator" + "github.com/hashicorp/packer/helper/communicator" ) func testSSHConfig() *SSHConfig { diff --git a/builder/vmware/common/step_clean_files.go b/builder/vmware/common/step_clean_files.go index de3debccc..6dc1a730c 100644 --- a/builder/vmware/common/step_clean_files.go +++ b/builder/vmware/common/step_clean_files.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "os" "path/filepath" ) diff --git a/builder/vmware/common/step_clean_vmx.go b/builder/vmware/common/step_clean_vmx.go index 42870f48e..816a353b6 100755 --- a/builder/vmware/common/step_clean_vmx.go +++ b/builder/vmware/common/step_clean_vmx.go @@ -6,8 +6,8 @@ import ( "regexp" "strings" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step cleans up the VMX by removing or changing this prior to diff --git a/builder/vmware/common/step_compact_disk.go b/builder/vmware/common/step_compact_disk.go index 9a81c98c8..d3eabec6f 100644 --- a/builder/vmware/common/step_compact_disk.go +++ b/builder/vmware/common/step_compact_disk.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/vmware/common/step_configure_vmx.go b/builder/vmware/common/step_configure_vmx.go index 7c8ca7717..854922a2c 100755 --- a/builder/vmware/common/step_configure_vmx.go +++ b/builder/vmware/common/step_configure_vmx.go @@ -7,8 +7,8 @@ import ( "regexp" "strings" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step configures a VMX by setting some default settings as well diff --git a/builder/vmware/common/step_configure_vnc.go b/builder/vmware/common/step_configure_vnc.go index bc65fc649..4b6a6cdae 100644 --- a/builder/vmware/common/step_configure_vnc.go +++ b/builder/vmware/common/step_configure_vnc.go @@ -8,8 +8,8 @@ import ( "net" "os" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step configures the VM to enable the VNC server. diff --git a/builder/vmware/common/step_output_dir.go b/builder/vmware/common/step_output_dir.go index 9807296ba..2b679f1fc 100644 --- a/builder/vmware/common/step_output_dir.go +++ b/builder/vmware/common/step_output_dir.go @@ -5,8 +5,8 @@ import ( "log" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepOutputDir sets up the output directory by creating it if it does diff --git a/builder/vmware/common/step_run.go b/builder/vmware/common/step_run.go index 3e81dab33..bd463799d 100644 --- a/builder/vmware/common/step_run.go +++ b/builder/vmware/common/step_run.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "time" ) diff --git a/builder/vmware/common/step_shutdown.go b/builder/vmware/common/step_shutdown.go index 8fcef7496..829ea1a3b 100644 --- a/builder/vmware/common/step_shutdown.go +++ b/builder/vmware/common/step_shutdown.go @@ -4,8 +4,8 @@ import ( "bytes" "errors" "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" "regexp" "runtime" diff --git a/builder/vmware/common/step_shutdown_test.go b/builder/vmware/common/step_shutdown_test.go index cdbda852d..b693527da 100644 --- a/builder/vmware/common/step_shutdown_test.go +++ b/builder/vmware/common/step_shutdown_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) func testStepShutdownState(t *testing.T) multistep.StateBag { diff --git a/builder/vmware/common/step_suppress_messages.go b/builder/vmware/common/step_suppress_messages.go index a02b69336..ca83506bf 100644 --- a/builder/vmware/common/step_suppress_messages.go +++ b/builder/vmware/common/step_suppress_messages.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/vmware/common/step_test.go b/builder/vmware/common/step_test.go index 9bf6d5d67..c6424b692 100644 --- a/builder/vmware/common/step_test.go +++ b/builder/vmware/common/step_test.go @@ -2,8 +2,8 @@ package common import ( "bytes" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "testing" ) diff --git a/builder/vmware/common/step_type_boot_command.go b/builder/vmware/common/step_type_boot_command.go index f4d7367c8..e82a07031 100644 --- a/builder/vmware/common/step_type_boot_command.go +++ b/builder/vmware/common/step_type_boot_command.go @@ -11,11 +11,11 @@ import ( "unicode" "unicode/utf8" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/go-vnc" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const KeyLeftShift uint32 = 0xFFE1 diff --git a/builder/vmware/common/step_upload_tools.go b/builder/vmware/common/step_upload_tools.go index 3f7214965..dfa8fcb88 100644 --- a/builder/vmware/common/step_upload_tools.go +++ b/builder/vmware/common/step_upload_tools.go @@ -4,9 +4,9 @@ import ( "fmt" "os" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type toolsUploadPathTemplate struct { diff --git a/builder/vmware/common/tools_config.go b/builder/vmware/common/tools_config.go index 923e531bf..8bf5c9bad 100644 --- a/builder/vmware/common/tools_config.go +++ b/builder/vmware/common/tools_config.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type ToolsConfig struct { diff --git a/builder/vmware/common/vmx_config.go b/builder/vmware/common/vmx_config.go index aac16d1e0..c8f19fa0d 100644 --- a/builder/vmware/common/vmx_config.go +++ b/builder/vmware/common/vmx_config.go @@ -1,7 +1,7 @@ package common import ( - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type VMXConfig struct { diff --git a/builder/vmware/iso/artifact_test.go b/builder/vmware/iso/artifact_test.go index 4394c2735..c18e60119 100644 --- a/builder/vmware/iso/artifact_test.go +++ b/builder/vmware/iso/artifact_test.go @@ -1,7 +1,7 @@ package iso import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/builder/vmware/iso/builder.go b/builder/vmware/iso/builder.go index 7d3b93a3b..1f78944b7 100755 --- a/builder/vmware/iso/builder.go +++ b/builder/vmware/iso/builder.go @@ -8,13 +8,13 @@ import ( "os" "time" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const BuilderIdESX = "mitchellh.vmware-esx" diff --git a/builder/vmware/iso/builder_test.go b/builder/vmware/iso/builder_test.go index 886d01dae..ab01a270c 100644 --- a/builder/vmware/iso/builder_test.go +++ b/builder/vmware/iso/builder_test.go @@ -7,7 +7,7 @@ import ( "reflect" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/builder/vmware/iso/driver.go b/builder/vmware/iso/driver.go index ba96afe07..6a1b89918 100644 --- a/builder/vmware/iso/driver.go +++ b/builder/vmware/iso/driver.go @@ -3,7 +3,7 @@ package iso import ( "fmt" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" ) // NewDriver returns a new driver implementation for this operating diff --git a/builder/vmware/iso/driver_esx5.go b/builder/vmware/iso/driver_esx5.go index 80dc1878d..cd0002abc 100644 --- a/builder/vmware/iso/driver_esx5.go +++ b/builder/vmware/iso/driver_esx5.go @@ -14,10 +14,10 @@ import ( "strings" "time" + commonssh "github.com/hashicorp/packer/common/ssh" + "github.com/hashicorp/packer/communicator/ssh" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - commonssh "github.com/mitchellh/packer/common/ssh" - "github.com/mitchellh/packer/communicator/ssh" - "github.com/mitchellh/packer/packer" gossh "golang.org/x/crypto/ssh" ) diff --git a/builder/vmware/iso/driver_esx5_test.go b/builder/vmware/iso/driver_esx5_test.go index 3b0953f74..6ce714ff1 100644 --- a/builder/vmware/iso/driver_esx5_test.go +++ b/builder/vmware/iso/driver_esx5_test.go @@ -5,8 +5,8 @@ import ( "net" "testing" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" ) func TestESX5Driver_implDriver(t *testing.T) { diff --git a/builder/vmware/iso/remote_driver.go b/builder/vmware/iso/remote_driver.go index 378c949d4..4c6dc18e4 100644 --- a/builder/vmware/iso/remote_driver.go +++ b/builder/vmware/iso/remote_driver.go @@ -1,7 +1,7 @@ package iso import ( - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" ) type RemoteDriver interface { diff --git a/builder/vmware/iso/remote_driver_mock.go b/builder/vmware/iso/remote_driver_mock.go index dcd1ba0aa..adf5fa713 100644 --- a/builder/vmware/iso/remote_driver_mock.go +++ b/builder/vmware/iso/remote_driver_mock.go @@ -1,7 +1,7 @@ package iso import ( - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" ) type RemoteDriverMock struct { diff --git a/builder/vmware/iso/remote_driver_mock_test.go b/builder/vmware/iso/remote_driver_mock_test.go index 86779a847..dd7a26e0a 100644 --- a/builder/vmware/iso/remote_driver_mock_test.go +++ b/builder/vmware/iso/remote_driver_mock_test.go @@ -3,7 +3,7 @@ package iso import ( "testing" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" ) func TestRemoteDriverMock_impl(t *testing.T) { diff --git a/builder/vmware/iso/step_create_disk.go b/builder/vmware/iso/step_create_disk.go index ded3a86da..463599780 100644 --- a/builder/vmware/iso/step_create_disk.go +++ b/builder/vmware/iso/step_create_disk.go @@ -2,9 +2,9 @@ package iso import ( "fmt" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/packer" "path/filepath" ) diff --git a/builder/vmware/iso/step_create_vmx.go b/builder/vmware/iso/step_create_vmx.go index 23281cd01..1f4ee812f 100755 --- a/builder/vmware/iso/step_create_vmx.go +++ b/builder/vmware/iso/step_create_vmx.go @@ -6,10 +6,10 @@ import ( "os" "path/filepath" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type vmxTemplateData struct { diff --git a/builder/vmware/iso/step_export.go b/builder/vmware/iso/step_export.go index 734158b52..3d055ddb4 100644 --- a/builder/vmware/iso/step_export.go +++ b/builder/vmware/iso/step_export.go @@ -10,8 +10,8 @@ import ( "runtime" "strings" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type StepExport struct { diff --git a/builder/vmware/iso/step_register.go b/builder/vmware/iso/step_register.go index 5a3c9bf6d..a90de5fa2 100644 --- a/builder/vmware/iso/step_register.go +++ b/builder/vmware/iso/step_register.go @@ -4,9 +4,9 @@ import ( "fmt" "time" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/packer" ) type StepRegister struct { diff --git a/builder/vmware/iso/step_remote_upload.go b/builder/vmware/iso/step_remote_upload.go index 1fc66a541..6ef27bce6 100644 --- a/builder/vmware/iso/step_remote_upload.go +++ b/builder/vmware/iso/step_remote_upload.go @@ -2,9 +2,9 @@ package iso import ( "fmt" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/packer" "log" ) diff --git a/builder/vmware/iso/step_test.go b/builder/vmware/iso/step_test.go index aad099af5..783d38796 100644 --- a/builder/vmware/iso/step_test.go +++ b/builder/vmware/iso/step_test.go @@ -2,9 +2,9 @@ package iso import ( "bytes" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/packer" "testing" ) diff --git a/builder/vmware/iso/step_upload_vmx.go b/builder/vmware/iso/step_upload_vmx.go index 96dde2cfc..39532674b 100644 --- a/builder/vmware/iso/step_upload_vmx.go +++ b/builder/vmware/iso/step_upload_vmx.go @@ -2,9 +2,9 @@ package iso import ( "fmt" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/packer" "path/filepath" ) diff --git a/builder/vmware/vmx/builder.go b/builder/vmware/vmx/builder.go index f417b2e1f..6576db462 100644 --- a/builder/vmware/vmx/builder.go +++ b/builder/vmware/vmx/builder.go @@ -6,11 +6,11 @@ import ( "log" "time" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/communicator" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/communicator" - "github.com/mitchellh/packer/packer" ) // Builder implements packer.Builder and builds the actual VMware diff --git a/builder/vmware/vmx/builder_test.go b/builder/vmware/vmx/builder_test.go index 22b639f2b..841d4f718 100644 --- a/builder/vmware/vmx/builder_test.go +++ b/builder/vmware/vmx/builder_test.go @@ -7,7 +7,7 @@ import ( "reflect" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestBuilderPrepare_FloppyFiles(t *testing.T) { diff --git a/builder/vmware/vmx/config.go b/builder/vmware/vmx/config.go index 52ba61582..93e8347c6 100644 --- a/builder/vmware/vmx/config.go +++ b/builder/vmware/vmx/config.go @@ -4,11 +4,11 @@ import ( "fmt" "os" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) // Config is the configuration structure for the builder. diff --git a/builder/vmware/vmx/step_clone_vmx.go b/builder/vmware/vmx/step_clone_vmx.go index a020e1627..eaa6607c5 100755 --- a/builder/vmware/vmx/step_clone_vmx.go +++ b/builder/vmware/vmx/step_clone_vmx.go @@ -5,9 +5,9 @@ import ( "log" "path/filepath" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/packer" ) // StepCloneVMX takes a VMX file and clones the VM into the output directory. diff --git a/builder/vmware/vmx/step_clone_vmx_test.go b/builder/vmware/vmx/step_clone_vmx_test.go index 8b8b5a056..3b4cea1d5 100644 --- a/builder/vmware/vmx/step_clone_vmx_test.go +++ b/builder/vmware/vmx/step_clone_vmx_test.go @@ -6,8 +6,8 @@ import ( "path/filepath" "testing" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" ) func TestStepCloneVMX_impl(t *testing.T) { diff --git a/builder/vmware/vmx/step_test.go b/builder/vmware/vmx/step_test.go index ad8075a61..60e2f890c 100644 --- a/builder/vmware/vmx/step_test.go +++ b/builder/vmware/vmx/step_test.go @@ -4,9 +4,9 @@ import ( "bytes" "testing" + vmwcommon "github.com/hashicorp/packer/builder/vmware/common" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - vmwcommon "github.com/mitchellh/packer/builder/vmware/common" - "github.com/mitchellh/packer/packer" ) func testState(t *testing.T) multistep.StateBag { diff --git a/checkpoint.go b/checkpoint.go index 3fbd37b3f..bbefeef5e 100644 --- a/checkpoint.go +++ b/checkpoint.go @@ -6,9 +6,9 @@ import ( "path/filepath" "github.com/hashicorp/go-checkpoint" - "github.com/mitchellh/packer/command" - "github.com/mitchellh/packer/packer" - packerVersion "github.com/mitchellh/packer/version" + "github.com/hashicorp/packer/command" + "github.com/hashicorp/packer/packer" + packerVersion "github.com/hashicorp/packer/version" ) func init() { diff --git a/command/build.go b/command/build.go index 9e79326a4..de9da51ee 100644 --- a/command/build.go +++ b/command/build.go @@ -10,9 +10,9 @@ import ( "strings" "sync" - "github.com/mitchellh/packer/helper/enumflag" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template" + "github.com/hashicorp/packer/helper/enumflag" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template" ) type BuildCommand struct { diff --git a/command/build_test.go b/command/build_test.go index aa35a385f..f5ec395f8 100644 --- a/command/build_test.go +++ b/command/build_test.go @@ -6,8 +6,8 @@ import ( "path/filepath" "testing" - "github.com/mitchellh/packer/builder/file" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/builder/file" + "github.com/hashicorp/packer/packer" ) func TestBuildOnlyFileCommaFlags(t *testing.T) { diff --git a/command/command_test.go b/command/command_test.go index 4ba4b8787..31f1e3d54 100644 --- a/command/command_test.go +++ b/command/command_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) const fixturesDir = "./test-fixtures" diff --git a/command/fix.go b/command/fix.go index 451742ebb..1a94f5786 100644 --- a/command/fix.go +++ b/command/fix.go @@ -8,8 +8,8 @@ import ( "os" "strings" - "github.com/mitchellh/packer/fix" - "github.com/mitchellh/packer/template" + "github.com/hashicorp/packer/fix" + "github.com/hashicorp/packer/template" ) type FixCommand struct { diff --git a/command/inspect.go b/command/inspect.go index 49302b023..71ddbba1d 100644 --- a/command/inspect.go +++ b/command/inspect.go @@ -5,7 +5,7 @@ import ( "sort" "strings" - "github.com/mitchellh/packer/template" + "github.com/hashicorp/packer/template" ) type InspectCommand struct { diff --git a/command/meta.go b/command/meta.go index d22efcaba..b8dfdfbf5 100644 --- a/command/meta.go +++ b/command/meta.go @@ -6,10 +6,10 @@ import ( "fmt" "io" - "github.com/mitchellh/packer/helper/flag-kv" - "github.com/mitchellh/packer/helper/flag-slice" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template" + "github.com/hashicorp/packer/helper/flag-kv" + "github.com/hashicorp/packer/helper/flag-slice" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template" ) // FlagSetFlags is an enum to define what flags are present in the diff --git a/command/plugin.go b/command/plugin.go index 8f09f0a74..fdeab3e45 100644 --- a/command/plugin.go +++ b/command/plugin.go @@ -10,62 +10,62 @@ import ( "regexp" "strings" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/packer/plugin" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/packer/plugin" - amazonchrootbuilder "github.com/mitchellh/packer/builder/amazon/chroot" - amazonebsbuilder "github.com/mitchellh/packer/builder/amazon/ebs" - amazonebssurrogatebuilder "github.com/mitchellh/packer/builder/amazon/ebssurrogate" - amazonebsvolumebuilder "github.com/mitchellh/packer/builder/amazon/ebsvolume" - amazoninstancebuilder "github.com/mitchellh/packer/builder/amazon/instance" - azurearmbuilder "github.com/mitchellh/packer/builder/azure/arm" - cloudstackbuilder "github.com/mitchellh/packer/builder/cloudstack" - digitaloceanbuilder "github.com/mitchellh/packer/builder/digitalocean" - dockerbuilder "github.com/mitchellh/packer/builder/docker" - filebuilder "github.com/mitchellh/packer/builder/file" - googlecomputebuilder "github.com/mitchellh/packer/builder/googlecompute" - hypervisobuilder "github.com/mitchellh/packer/builder/hyperv/iso" - nullbuilder "github.com/mitchellh/packer/builder/null" - oneandonebuilder "github.com/mitchellh/packer/builder/oneandone" - openstackbuilder "github.com/mitchellh/packer/builder/openstack" - parallelsisobuilder "github.com/mitchellh/packer/builder/parallels/iso" - parallelspvmbuilder "github.com/mitchellh/packer/builder/parallels/pvm" - profitbricksbuilder "github.com/mitchellh/packer/builder/profitbricks" - qemubuilder "github.com/mitchellh/packer/builder/qemu" - tritonbuilder "github.com/mitchellh/packer/builder/triton" - virtualboxisobuilder "github.com/mitchellh/packer/builder/virtualbox/iso" - virtualboxovfbuilder "github.com/mitchellh/packer/builder/virtualbox/ovf" - vmwareisobuilder "github.com/mitchellh/packer/builder/vmware/iso" - vmwarevmxbuilder "github.com/mitchellh/packer/builder/vmware/vmx" - amazonimportpostprocessor "github.com/mitchellh/packer/post-processor/amazon-import" - artificepostprocessor "github.com/mitchellh/packer/post-processor/artifice" - atlaspostprocessor "github.com/mitchellh/packer/post-processor/atlas" - checksumpostprocessor "github.com/mitchellh/packer/post-processor/checksum" - compresspostprocessor "github.com/mitchellh/packer/post-processor/compress" - dockerimportpostprocessor "github.com/mitchellh/packer/post-processor/docker-import" - dockerpushpostprocessor "github.com/mitchellh/packer/post-processor/docker-push" - dockersavepostprocessor "github.com/mitchellh/packer/post-processor/docker-save" - dockertagpostprocessor "github.com/mitchellh/packer/post-processor/docker-tag" - googlecomputeexportpostprocessor "github.com/mitchellh/packer/post-processor/googlecompute-export" - manifestpostprocessor "github.com/mitchellh/packer/post-processor/manifest" - shelllocalpostprocessor "github.com/mitchellh/packer/post-processor/shell-local" - vagrantpostprocessor "github.com/mitchellh/packer/post-processor/vagrant" - vagrantcloudpostprocessor "github.com/mitchellh/packer/post-processor/vagrant-cloud" - vspherepostprocessor "github.com/mitchellh/packer/post-processor/vsphere" - ansibleprovisioner "github.com/mitchellh/packer/provisioner/ansible" - ansiblelocalprovisioner "github.com/mitchellh/packer/provisioner/ansible-local" - chefclientprovisioner "github.com/mitchellh/packer/provisioner/chef-client" - chefsoloprovisioner "github.com/mitchellh/packer/provisioner/chef-solo" - convergeprovisioner "github.com/mitchellh/packer/provisioner/converge" - fileprovisioner "github.com/mitchellh/packer/provisioner/file" - powershellprovisioner "github.com/mitchellh/packer/provisioner/powershell" - puppetmasterlessprovisioner "github.com/mitchellh/packer/provisioner/puppet-masterless" - puppetserverprovisioner "github.com/mitchellh/packer/provisioner/puppet-server" - saltmasterlessprovisioner "github.com/mitchellh/packer/provisioner/salt-masterless" - shellprovisioner "github.com/mitchellh/packer/provisioner/shell" - shelllocalprovisioner "github.com/mitchellh/packer/provisioner/shell-local" - windowsrestartprovisioner "github.com/mitchellh/packer/provisioner/windows-restart" - windowsshellprovisioner "github.com/mitchellh/packer/provisioner/windows-shell" + amazonchrootbuilder "github.com/hashicorp/packer/builder/amazon/chroot" + amazonebsbuilder "github.com/hashicorp/packer/builder/amazon/ebs" + amazonebssurrogatebuilder "github.com/hashicorp/packer/builder/amazon/ebssurrogate" + amazonebsvolumebuilder "github.com/hashicorp/packer/builder/amazon/ebsvolume" + amazoninstancebuilder "github.com/hashicorp/packer/builder/amazon/instance" + azurearmbuilder "github.com/hashicorp/packer/builder/azure/arm" + cloudstackbuilder "github.com/hashicorp/packer/builder/cloudstack" + digitaloceanbuilder "github.com/hashicorp/packer/builder/digitalocean" + dockerbuilder "github.com/hashicorp/packer/builder/docker" + filebuilder "github.com/hashicorp/packer/builder/file" + googlecomputebuilder "github.com/hashicorp/packer/builder/googlecompute" + hypervisobuilder "github.com/hashicorp/packer/builder/hyperv/iso" + nullbuilder "github.com/hashicorp/packer/builder/null" + oneandonebuilder "github.com/hashicorp/packer/builder/oneandone" + openstackbuilder "github.com/hashicorp/packer/builder/openstack" + parallelsisobuilder "github.com/hashicorp/packer/builder/parallels/iso" + parallelspvmbuilder "github.com/hashicorp/packer/builder/parallels/pvm" + profitbricksbuilder "github.com/hashicorp/packer/builder/profitbricks" + qemubuilder "github.com/hashicorp/packer/builder/qemu" + tritonbuilder "github.com/hashicorp/packer/builder/triton" + virtualboxisobuilder "github.com/hashicorp/packer/builder/virtualbox/iso" + virtualboxovfbuilder "github.com/hashicorp/packer/builder/virtualbox/ovf" + vmwareisobuilder "github.com/hashicorp/packer/builder/vmware/iso" + vmwarevmxbuilder "github.com/hashicorp/packer/builder/vmware/vmx" + amazonimportpostprocessor "github.com/hashicorp/packer/post-processor/amazon-import" + artificepostprocessor "github.com/hashicorp/packer/post-processor/artifice" + atlaspostprocessor "github.com/hashicorp/packer/post-processor/atlas" + checksumpostprocessor "github.com/hashicorp/packer/post-processor/checksum" + compresspostprocessor "github.com/hashicorp/packer/post-processor/compress" + dockerimportpostprocessor "github.com/hashicorp/packer/post-processor/docker-import" + dockerpushpostprocessor "github.com/hashicorp/packer/post-processor/docker-push" + dockersavepostprocessor "github.com/hashicorp/packer/post-processor/docker-save" + dockertagpostprocessor "github.com/hashicorp/packer/post-processor/docker-tag" + googlecomputeexportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-export" + manifestpostprocessor "github.com/hashicorp/packer/post-processor/manifest" + shelllocalpostprocessor "github.com/hashicorp/packer/post-processor/shell-local" + vagrantpostprocessor "github.com/hashicorp/packer/post-processor/vagrant" + vagrantcloudpostprocessor "github.com/hashicorp/packer/post-processor/vagrant-cloud" + vspherepostprocessor "github.com/hashicorp/packer/post-processor/vsphere" + ansibleprovisioner "github.com/hashicorp/packer/provisioner/ansible" + ansiblelocalprovisioner "github.com/hashicorp/packer/provisioner/ansible-local" + chefclientprovisioner "github.com/hashicorp/packer/provisioner/chef-client" + chefsoloprovisioner "github.com/hashicorp/packer/provisioner/chef-solo" + convergeprovisioner "github.com/hashicorp/packer/provisioner/converge" + fileprovisioner "github.com/hashicorp/packer/provisioner/file" + powershellprovisioner "github.com/hashicorp/packer/provisioner/powershell" + puppetmasterlessprovisioner "github.com/hashicorp/packer/provisioner/puppet-masterless" + puppetserverprovisioner "github.com/hashicorp/packer/provisioner/puppet-server" + saltmasterlessprovisioner "github.com/hashicorp/packer/provisioner/salt-masterless" + shellprovisioner "github.com/hashicorp/packer/provisioner/shell" + shelllocalprovisioner "github.com/hashicorp/packer/provisioner/shell-local" + windowsrestartprovisioner "github.com/hashicorp/packer/provisioner/windows-restart" + windowsshellprovisioner "github.com/hashicorp/packer/provisioner/windows-shell" ) type PluginCommand struct { diff --git a/command/push.go b/command/push.go index 9394d4fe8..a0edd6b84 100644 --- a/command/push.go +++ b/command/push.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/atlas-go/archive" "github.com/hashicorp/atlas-go/v1" - "github.com/mitchellh/packer/helper/flag-kv" - "github.com/mitchellh/packer/template" + "github.com/hashicorp/packer/helper/flag-kv" + "github.com/hashicorp/packer/template" ) // archiveTemplateEntry is the name the template always takes within the slug. diff --git a/command/validate.go b/command/validate.go index c8f333fcf..a2fb47ff6 100644 --- a/command/validate.go +++ b/command/validate.go @@ -5,8 +5,8 @@ import ( "log" "strings" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template" ) type ValidateCommand struct { diff --git a/commands.go b/commands.go index 9b02b5941..17b6a7f36 100644 --- a/commands.go +++ b/commands.go @@ -1,9 +1,9 @@ package main import ( + "github.com/hashicorp/packer/command" + "github.com/hashicorp/packer/version" "github.com/mitchellh/cli" - "github.com/mitchellh/packer/command" - "github.com/mitchellh/packer/version" ) // Commands is the mapping of all the available Packer commands. diff --git a/common/floppy_config.go b/common/floppy_config.go index ecaa5eddb..b1338cbcb 100644 --- a/common/floppy_config.go +++ b/common/floppy_config.go @@ -6,7 +6,7 @@ import ( "path/filepath" "strings" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) type FloppyConfig struct { diff --git a/common/http_config.go b/common/http_config.go index 41381c2a0..bb9b46b26 100644 --- a/common/http_config.go +++ b/common/http_config.go @@ -3,7 +3,7 @@ package common import ( "errors" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // HTTPConfig contains configuration for the local HTTP Server diff --git a/common/iso_config.go b/common/iso_config.go index 254296e7a..07f005f75 100644 --- a/common/iso_config.go +++ b/common/iso_config.go @@ -11,7 +11,7 @@ import ( "runtime" "strings" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) // ISOConfig contains configuration for downloading ISO images. diff --git a/common/multistep_debug.go b/common/multistep_debug.go index 8de05c48d..b726ce2c3 100644 --- a/common/multistep_debug.go +++ b/common/multistep_debug.go @@ -2,8 +2,8 @@ package common import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" "time" ) diff --git a/common/multistep_runner.go b/common/multistep_runner.go index 512a3ecd4..6f7c0a7cb 100644 --- a/common/multistep_runner.go +++ b/common/multistep_runner.go @@ -8,8 +8,8 @@ import ( "strings" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) func newRunner(steps []multistep.Step, config PackerConfig, ui packer.Ui) (multistep.Runner, multistep.DebugPauseFn) { diff --git a/common/powershell/hyperv/hyperv.go b/common/powershell/hyperv/hyperv.go index a674857b0..125e56099 100644 --- a/common/powershell/hyperv/hyperv.go +++ b/common/powershell/hyperv/hyperv.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/mitchellh/packer/common/powershell" + "github.com/hashicorp/packer/common/powershell" ) func GetHostAdapterIpAddressForSwitch(switchName string) (string, error) { diff --git a/common/step_create_floppy.go b/common/step_create_floppy.go index d00bc4da8..5f05eea78 100644 --- a/common/step_create_floppy.go +++ b/common/step_create_floppy.go @@ -10,10 +10,10 @@ import ( "path/filepath" "strings" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/go-fs" "github.com/mitchellh/go-fs/fat" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepCreateFloppy will create a floppy disk with the given files. diff --git a/common/step_create_floppy_test.go b/common/step_create_floppy_test.go index cfdf3989e..f5cc16b64 100644 --- a/common/step_create_floppy_test.go +++ b/common/step_create_floppy_test.go @@ -3,8 +3,8 @@ package common import ( "bytes" "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "io/ioutil" "log" "os" diff --git a/common/step_download.go b/common/step_download.go index b8bd60b5e..f63070a04 100644 --- a/common/step_download.go +++ b/common/step_download.go @@ -7,8 +7,8 @@ import ( "log" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // StepDownload downloads a remote file using the download client within diff --git a/common/step_http_server.go b/common/step_http_server.go index e1664a01b..3752b51c6 100644 --- a/common/step_http_server.go +++ b/common/step_http_server.go @@ -10,8 +10,8 @@ import ( "os" "path/filepath" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) // This step creates and runs the HTTP server that is serving files from the diff --git a/common/step_provision.go b/common/step_provision.go index f40cfd896..14074d7a1 100644 --- a/common/step_provision.go +++ b/common/step_provision.go @@ -1,8 +1,8 @@ package common import ( + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "log" "time" ) diff --git a/communicator/none/communicator.go b/communicator/none/communicator.go index 267c8c6c6..4e08aba1b 100644 --- a/communicator/none/communicator.go +++ b/communicator/none/communicator.go @@ -2,7 +2,7 @@ package none import ( "errors" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io" "os" ) diff --git a/communicator/none/communicator_test.go b/communicator/none/communicator_test.go index 1153afb5c..081fbfe77 100644 --- a/communicator/none/communicator_test.go +++ b/communicator/none/communicator_test.go @@ -3,7 +3,7 @@ package none import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestCommIsCommunicator(t *testing.T) { diff --git a/communicator/ssh/communicator.go b/communicator/ssh/communicator.go index ab828d747..a6a7f9cf9 100644 --- a/communicator/ssh/communicator.go +++ b/communicator/ssh/communicator.go @@ -15,7 +15,7 @@ import ( "strings" "time" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "github.com/pkg/sftp" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/agent" diff --git a/communicator/ssh/communicator_test.go b/communicator/ssh/communicator_test.go index b0bc03508..fa43ed1ee 100644 --- a/communicator/ssh/communicator_test.go +++ b/communicator/ssh/communicator_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "golang.org/x/crypto/ssh" ) diff --git a/communicator/winrm/communicator.go b/communicator/winrm/communicator.go index d3c6ee46d..69f89194e 100644 --- a/communicator/winrm/communicator.go +++ b/communicator/winrm/communicator.go @@ -9,8 +9,8 @@ import ( "strings" "sync" + "github.com/hashicorp/packer/packer" "github.com/masterzen/winrm" - "github.com/mitchellh/packer/packer" "github.com/packer-community/winrmcp/winrmcp" ) diff --git a/communicator/winrm/communicator_test.go b/communicator/winrm/communicator_test.go index dde9dd381..5f61680f9 100644 --- a/communicator/winrm/communicator_test.go +++ b/communicator/winrm/communicator_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/dylanmei/winrmtest" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func newMockWinRMServer(t *testing.T) *winrmtest.Remote { diff --git a/config.go b/config.go index a62e28323..409b8f12d 100644 --- a/config.go +++ b/config.go @@ -11,10 +11,10 @@ import ( "runtime" "strings" + "github.com/hashicorp/packer/command" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/packer/plugin" "github.com/kardianos/osext" - "github.com/mitchellh/packer/command" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/packer/plugin" ) // PACKERSPACE is used to represent the spaces that separate args for a command diff --git a/contrib/azure-setup.sh b/contrib/azure-setup.sh index 2e5671bef..b5f6de220 100755 --- a/contrib/azure-setup.sh +++ b/contrib/azure-setup.sh @@ -12,234 +12,256 @@ azure_tenant_id= # Derived from the account after login location= azure_object_id= azureversion= +create_sleep=10 showhelp() { - echo "azure-setup" - echo "" - echo " azure-setup helps you generate packer credentials for Azure" - echo "" - echo " The script creates a resource group, storage account, application" - echo " (client), service principal, and permissions and displays a snippet" - echo " for use in your packer templates." - echo "" - echo " For simplicity we make a lot of assumptions and choose reasonable" - echo " defaults. If you want more control over what happens, please use" - echo " the azure-cli directly." - echo "" - echo " Note that you must already have an Azure account, username," - echo " password, and subscription. You can create those here:" - echo "" - echo " - https://account.windowsazure.com/" - echo "" - echo "REQUIREMENTS" - echo "" - echo " - azure-cli" - echo " - jq" - echo "" - echo " Use the requirements command (below) for more info." - echo "" - echo "USAGE" - echo "" - echo " ./azure-setup.sh requirements" - echo " ./azure-setup.sh setup" - echo "" + echo "azure-setup" + echo "" + echo " azure-setup helps you generate packer credentials for Azure" + echo "" + echo " The script creates a resource group, storage account, application" + echo " (client), service principal, and permissions and displays a snippet" + echo " for use in your packer templates." + echo "" + echo " For simplicity we make a lot of assumptions and choose reasonable" + echo " defaults. If you want more control over what happens, please use" + echo " the azure-cli directly." + echo "" + echo " Note that you must already have an Azure account, username," + echo " password, and subscription. You can create those here:" + echo "" + echo " - https://account.windowsazure.com/" + echo "" + echo "REQUIREMENTS" + echo "" + echo " - azure-cli" + echo " - jq" + echo "" + echo " Use the requirements command (below) for more info." + echo "" + echo "USAGE" + echo "" + echo " ./azure-setup.sh requirements" + echo " ./azure-setup.sh setup" + echo "" } requirements() { - found=0 + found=0 - azureversion=$(azure -v) - if [ $? -eq 0 ]; then - found=$((found + 1)) - echo "Found azure-cli version: $azureversion" - else - echo "azure-cli is missing. Please install azure-cli from" - echo "https://azure.microsoft.com/en-us/documentation/articles/xplat-cli-install/" - fi + azureversion=$(azure -v) + if [ $? -eq 0 ]; then + found=$((found + 1)) + echo "Found azure-cli version: $azureversion" + else + echo "azure-cli is missing. Please install azure-cli from" + echo "https://azure.microsoft.com/en-us/documentation/articles/xplat-cli-install/" + fi - jqversion=$(jq --version) - if [ $? -eq 0 ]; then - found=$((found + 1)) - echo "Found jq version: $jqversion" - else - echo "jq is missing. Please install jq from" - echo "https://stedolan.github.io/jq/" - fi + jqversion=$(jq --version) + if [ $? -eq 0 ]; then + found=$((found + 1)) + echo "Found jq version: $jqversion" + else + echo "jq is missing. Please install jq from" + echo "https://stedolan.github.io/jq/" + fi - if [ $found -lt 2 ]; then - exit 1 - fi + if [ $found -lt 2 ]; then + exit 1 + fi } askSubscription() { - azure account list - echo "" - echo "Please enter the Id of the account you wish to use. If you do not see" - echo "a valid account in the list press Ctrl+C to abort and create one." - echo "If you leave this blank we will use the Current account." - echo -n "> " - read azure_subscription_id - if [ "$azure_subscription_id" != "" ]; then - azure account set $azure_subscription_id - else - azure_subscription_id=$(azure account show --json | jq -r .[].id) - fi - azure_tenant_id=$(azure account show --json | jq -r .[].tenantId) - echo "Using subscription_id: $azure_subscription_id" - echo "Using tenant_id: $azure_tenant_id" + azure account list + echo "" + echo "Please enter the Id of the account you wish to use. If you do not see" + echo "a valid account in the list press Ctrl+C to abort and create one." + echo "If you leave this blank we will use the Current account." + echo -n "> " + read azure_subscription_id + if [ "$azure_subscription_id" != "" ]; then + azure account set $azure_subscription_id + else + azure_subscription_id=$(azure account show --json | jq -r .[].id) + fi + azure_tenant_id=$(azure account show --json | jq -r .[].tenantId) + echo "Using subscription_id: $azure_subscription_id" + echo "Using tenant_id: $azure_tenant_id" } askName() { - echo "" - echo "Choose a name for your resource group, storage account and client" - echo "client. This is arbitrary, but it must not already be in use by" - echo "any of those resources. ALPHANUMERIC ONLY. Ex: mypackerbuild" - echo -n "> " - read meta_name + echo "" + echo "Choose a name for your resource group, storage account and client" + echo "client. This is arbitrary, but it must not already be in use by" + echo "any of those resources. ALPHANUMERIC ONLY. Ex: mypackerbuild" + echo -n "> " + read meta_name } askSecret() { - echo "" - echo "Enter a secret for your application. We recommend generating one with" - echo "openssl rand -base64 24. If you leave this blank we will attempt to" - echo "generate one for you using openssl. THIS WILL BE SHOWN IN PLAINTEXT." - echo "Ex: mypackersecret8734" - echo -n "> " - read azure_client_secret - if [ "$azure_client_secret" = "" ]; then - azure_client_secret=$(openssl rand -base64 24) - if [ $? -ne 0 ]; then - echo "Error generating secret" - exit 1 - fi - echo "Generated client_secret: $azure_client_secret" - fi + echo "" + echo "Enter a secret for your application. We recommend generating one with" + echo "openssl rand -base64 24. If you leave this blank we will attempt to" + echo "generate one for you using openssl. THIS WILL BE SHOWN IN PLAINTEXT." + echo "Ex: mypackersecret8734" + echo -n "> " + read azure_client_secret + if [ "$azure_client_secret" = "" ]; then + azure_client_secret=$(openssl rand -base64 24) + if [ $? -ne 0 ]; then + echo "Error generating secret" + exit 1 + fi + echo "Generated client_secret: $azure_client_secret" + fi } askLocation() { - azure location list - echo "" - echo "Choose which region your resource group and storage account will be created." - echo -n "> " - read location + azure location list + echo "" + echo "Choose which region your resource group and storage account will be created." + echo -n "> " + read location } createResourceGroup() { - echo "==> Creating resource group" - azure group create -n $meta_name -l $location - if [ $? -eq 0 ]; then - azure_group_name=$meta_name - else - echo "Error creating resource group: $meta_name" - exit 1 - fi + echo "==> Creating resource group" + azure group create -n $meta_name -l $location + if [ $? -eq 0 ]; then + azure_group_name=$meta_name + else + echo "Error creating resource group: $meta_name" + return 1 + fi } createStorageAccount() { - echo "==> Creating storage account" - azure storage account create -g $meta_name -l $location --sku-name LRS --kind Storage $meta_name - if [ $? -eq 0 ]; then - azure_storage_name=$meta_name - else - echo "Error creating storage account: $meta_name" - exit 1 - fi + echo "==> Creating storage account" + azure storage account create -g $meta_name -l $location --sku-name LRS --kind Storage $meta_name + if [ $? -eq 0 ]; then + azure_storage_name=$meta_name + else + echo "Error creating storage account: $meta_name" + return 1 + fi } createApplication() { - echo "==> Creating application" - azure_client_id=$(azure ad app create -n $meta_name -i http://$meta_name --home-page http://$meta_name -p $azure_client_secret --json | jq -r .appId) - if [ $? -ne 0 ]; then - echo "Error creating application: $meta_name @ http://$meta_name" - exit 1 - fi + echo "==> Creating application" + azure_client_id=$(azure ad app create -n $meta_name -i http://$meta_name --home-page http://$meta_name -p $azure_client_secret --json | jq -r .appId) + if [ $? -ne 0 ]; then + echo "Error creating application: $meta_name @ http://$meta_name" + return 1 + fi } createServicePrincipal() { - echo "==> Creating service principal" - # Azure CLI 0.10.2 introduced a breaking change, where appId must be supplied with the -a switch - # prior version accepted appId as the only parameter without a switch - newer_syntax=false - IFS='.' read -ra azureversionsemver <<< "$azureversion" - if [ ${azureversionsemver[0]} -ge 0 ] && [ ${azureversionsemver[1]} -ge 10 ] && [ ${azureversionsemver[2]} -ge 2 ]; then - newer_syntax=true - fi + echo "==> Creating service principal" + # Azure CLI 0.10.2 introduced a breaking change, where appId must be supplied with the -a switch + # prior version accepted appId as the only parameter without a switch + newer_syntax=false + IFS='.' read -ra azureversionsemver <<< "$azureversion" + if [ ${azureversionsemver[0]} -ge 0 ] && [ ${azureversionsemver[1]} -ge 10 ] && [ ${azureversionsemver[2]} -ge 2 ]; then + newer_syntax=true + fi - if [ "${newer_syntax}" = true ]; then - azure_object_id=$(azure ad sp create -a $azure_client_id --json | jq -r .objectId) - else - azure_object_id=$(azure ad sp create $azure_client_id --json | jq -r .objectId) - fi + if [ "${newer_syntax}" = true ]; then + azure_object_id=$(azure ad sp create -a $azure_client_id --json | jq -r .objectId) + else + azure_object_id=$(azure ad sp create $azure_client_id --json | jq -r .objectId) + fi - if [ $? -ne 0 ]; then - echo "Error creating service principal: $azure_client_id" - exit 1 - fi + if [ $? -ne 0 ]; then + echo "Error creating service principal: $azure_client_id" + return 1 + fi } createPermissions() { - echo "==> Creating permissions" - azure role assignment create --objectId $azure_object_id -o "Owner" -c /subscriptions/$azure_subscription_id - # We want to use this more conservative scope but it does not work with the - # current implementation which uses temporary resource groups - # azure role assignment create --spn http://$meta_name -g $azure_group_name -o "API Management Service Contributor" - if [ $? -ne 0 ]; then - echo "Error creating permissions for: http://$meta_name" - exit 1 - fi + echo "==> Creating permissions" + azure role assignment create --objectId $azure_object_id -o "Owner" -c /subscriptions/$azure_subscription_id + # We want to use this more conservative scope but it does not work with the + # current implementation which uses temporary resource groups + # azure role assignment create --spn http://$meta_name -g $azure_group_name -o "API Management Service Contributor" + if [ $? -ne 0 ]; then + echo "Error creating permissions for: http://$meta_name" + return 1 + fi } showConfigs() { - echo "" - echo "Use the following configuration for your packer template:" - echo "" - echo "{" - echo " \"client_id\": \"$azure_client_id\"," - echo " \"client_secret\": \"$azure_client_secret\"," - echo " \"object_id\": \"$azure_object_id\"," - echo " \"subscription_id\": \"$azure_subscription_id\"," - echo " \"tenant_id\": \"$azure_tenant_id\"," - echo " \"resource_group_name\": \"$azure_group_name\"," - echo " \"storage_account\": \"$azure_storage_name\"," - echo "}" - echo "" + echo "" + echo "Use the following configuration for your packer template:" + echo "" + echo "{" + echo " \"client_id\": \"$azure_client_id\"," + echo " \"client_secret\": \"$azure_client_secret\"," + echo " \"object_id\": \"$azure_object_id\"," + echo " \"subscription_id\": \"$azure_subscription_id\"," + echo " \"tenant_id\": \"$azure_tenant_id\"," + echo " \"resource_group_name\": \"$azure_group_name\"," + echo " \"storage_account\": \"$azure_storage_name\"," + echo "}" + echo "" } +doSleep() { + local sleep_time=${PACKER_SLEEP_TIME-$create_sleep} + echo "" + echo "Sleeping for ${sleep_time} seconds to wait for resources to be " + echo "created. If you get an error about a resource not existing, you can " + echo "try increasing the amount of time we wait after creating resources " + echo "by setting PACKER_SLEEP_TIME to something higher than the default." + echo "" + sleep $sleep_time +} + +retryable() { + n=0 + until [ $n -ge $1 ] + do + $2 && return 0 + echo "$2 failed. Retrying..." + n=$[$n+1] + doSleep + done + echo "$2 failed after $1 tries. Exiting." + exit 1 +} + + setup() { - requirements + requirements - azure config mode arm - azure login + azure config mode arm + azure login - askSubscription - askName - askSecret - askLocation + askSubscription + askName + askSecret + askLocation - # Some of the resources take a while to converge in the API. To make the - # script more reliable we'll add a sleep after we create each resource. + # Some of the resources take a while to converge in the API. To make the + # script more reliable we'll add a sleep after we create each resource. - createResourceGroup - sleep 5 - createStorageAccount - sleep 5 - createApplication - sleep 5 - createServicePrincipal - sleep 5 - createPermissions + retryable 3 createResourceGroup + retryable 3 createStorageAccount + retryable 3 createApplication + retryable 3 createServicePrincipal + retryable 3 createPermissions - showConfigs + showConfigs } case "$1" in - requirements) - requirements - ;; - setup) - setup - ;; - *) - showhelp - ;; + requirements) + requirements + ;; + setup) + setup + ;; + *) + showhelp + ;; esac diff --git a/helper/builder/testing/testing.go b/helper/builder/testing/testing.go index 0bfb136ae..7e862af9d 100644 --- a/helper/builder/testing/testing.go +++ b/helper/builder/testing/testing.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template" ) // TestEnvVar must be set to a non-empty value for acceptance tests to run. diff --git a/helper/communicator/config.go b/helper/communicator/config.go index 5c55fee62..560b061b7 100644 --- a/helper/communicator/config.go +++ b/helper/communicator/config.go @@ -6,8 +6,8 @@ import ( "os" "time" + "github.com/hashicorp/packer/template/interpolate" "github.com/masterzen/winrm" - "github.com/mitchellh/packer/template/interpolate" ) // Config is the common configuration that communicators allow within diff --git a/helper/communicator/config_test.go b/helper/communicator/config_test.go index a6c7cfac2..a81dba53f 100644 --- a/helper/communicator/config_test.go +++ b/helper/communicator/config_test.go @@ -3,7 +3,7 @@ package communicator import ( "testing" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) func testConfig() *Config { diff --git a/helper/communicator/step_connect.go b/helper/communicator/step_connect.go index 4e3ddaf14..7d738e4cc 100644 --- a/helper/communicator/step_connect.go +++ b/helper/communicator/step_connect.go @@ -4,9 +4,9 @@ import ( "fmt" "log" + "github.com/hashicorp/packer/communicator/none" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/communicator/none" - "github.com/mitchellh/packer/packer" gossh "golang.org/x/crypto/ssh" ) diff --git a/helper/communicator/step_connect_ssh.go b/helper/communicator/step_connect_ssh.go index 71a6d1a39..f3f5c5bdb 100644 --- a/helper/communicator/step_connect_ssh.go +++ b/helper/communicator/step_connect_ssh.go @@ -8,10 +8,10 @@ import ( "strings" "time" + commonssh "github.com/hashicorp/packer/common/ssh" + "github.com/hashicorp/packer/communicator/ssh" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - commonssh "github.com/mitchellh/packer/common/ssh" - "github.com/mitchellh/packer/communicator/ssh" - "github.com/mitchellh/packer/packer" gossh "golang.org/x/crypto/ssh" ) diff --git a/helper/communicator/step_connect_test.go b/helper/communicator/step_connect_test.go index bf908f8fb..d83625dd2 100644 --- a/helper/communicator/step_connect_test.go +++ b/helper/communicator/step_connect_test.go @@ -4,8 +4,8 @@ import ( "bytes" "testing" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) func TestStepConnect_impl(t *testing.T) { diff --git a/helper/communicator/step_connect_winrm.go b/helper/communicator/step_connect_winrm.go index a2b53ea90..2318bc1c0 100644 --- a/helper/communicator/step_connect_winrm.go +++ b/helper/communicator/step_connect_winrm.go @@ -6,9 +6,9 @@ import ( "log" "time" + "github.com/hashicorp/packer/communicator/winrm" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/communicator/winrm" - "github.com/mitchellh/packer/packer" ) // StepConnectWinRM is a multistep Step implementation that waits for WinRM diff --git a/helper/config/decode.go b/helper/config/decode.go index 620198e35..8e573dd13 100644 --- a/helper/config/decode.go +++ b/helper/config/decode.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/hashicorp/go-multierror" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/mapstructure" - "github.com/mitchellh/packer/template/interpolate" ) // DecodeOpts are the options for decoding configuration. diff --git a/helper/config/decode_test.go b/helper/config/decode_test.go index f325ae4a5..a04329f27 100644 --- a/helper/config/decode_test.go +++ b/helper/config/decode_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template/interpolate" ) func TestDecode(t *testing.T) { diff --git a/main.go b/main.go index 06a4c7402..6bca18d2d 100644 --- a/main.go +++ b/main.go @@ -16,11 +16,11 @@ import ( "time" "github.com/hashicorp/go-uuid" + "github.com/hashicorp/packer/command" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/packer/plugin" + "github.com/hashicorp/packer/version" "github.com/mitchellh/cli" - "github.com/mitchellh/packer/command" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/packer/plugin" - "github.com/mitchellh/packer/version" "github.com/mitchellh/panicwrap" "github.com/mitchellh/prefixedio" ) diff --git a/main_test.go b/main_test.go index 0bc7ba96f..f4d44bbf1 100644 --- a/main_test.go +++ b/main_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" + "github.com/hashicorp/packer/command" "github.com/mitchellh/cli" - "github.com/mitchellh/packer/command" ) func TestExcludeHelpFunc(t *testing.T) { diff --git a/packer/core.go b/packer/core.go index 860e1808b..4371fbbc4 100644 --- a/packer/core.go +++ b/packer/core.go @@ -6,8 +6,8 @@ import ( "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-version" - "github.com/mitchellh/packer/template" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/template" + "github.com/hashicorp/packer/template/interpolate" ) // Core is the main executor of Packer. If Packer is being used as a diff --git a/packer/core_test.go b/packer/core_test.go index 07acea43c..6edf63c16 100644 --- a/packer/core_test.go +++ b/packer/core_test.go @@ -6,8 +6,8 @@ import ( "reflect" "testing" - configHelper "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/template" + configHelper "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/template" ) func TestCoreBuildNames(t *testing.T) { diff --git a/packer/plugin/builder.go b/packer/plugin/builder.go index a0a89d57b..9036cc1b1 100644 --- a/packer/plugin/builder.go +++ b/packer/plugin/builder.go @@ -1,7 +1,7 @@ package plugin import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "log" ) diff --git a/packer/plugin/client.go b/packer/plugin/client.go index e4eabfa3a..67f2ad23e 100644 --- a/packer/plugin/client.go +++ b/packer/plugin/client.go @@ -4,8 +4,8 @@ import ( "bufio" "errors" "fmt" - "github.com/mitchellh/packer/packer" - packrpc "github.com/mitchellh/packer/packer/rpc" + "github.com/hashicorp/packer/packer" + packrpc "github.com/hashicorp/packer/packer/rpc" "io" "io/ioutil" "log" diff --git a/packer/plugin/hook.go b/packer/plugin/hook.go index 5d4dbf06a..7d9f8f03f 100644 --- a/packer/plugin/hook.go +++ b/packer/plugin/hook.go @@ -1,7 +1,7 @@ package plugin import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "log" ) diff --git a/packer/plugin/plugin_test.go b/packer/plugin/plugin_test.go index 23f994ea0..d35e7bb7b 100644 --- a/packer/plugin/plugin_test.go +++ b/packer/plugin/plugin_test.go @@ -2,7 +2,7 @@ package plugin import ( "fmt" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "log" "os" "os/exec" diff --git a/packer/plugin/post_processor.go b/packer/plugin/post_processor.go index 483140564..bb801448a 100644 --- a/packer/plugin/post_processor.go +++ b/packer/plugin/post_processor.go @@ -1,7 +1,7 @@ package plugin import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "log" ) diff --git a/packer/plugin/post_processor_test.go b/packer/plugin/post_processor_test.go index df8a799f7..4c545142d 100644 --- a/packer/plugin/post_processor_test.go +++ b/packer/plugin/post_processor_test.go @@ -1,7 +1,7 @@ package plugin import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "os/exec" "testing" ) diff --git a/packer/plugin/provisioner.go b/packer/plugin/provisioner.go index 0feb9d727..d71854a58 100644 --- a/packer/plugin/provisioner.go +++ b/packer/plugin/provisioner.go @@ -1,7 +1,7 @@ package plugin import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "log" ) diff --git a/packer/plugin/server.go b/packer/plugin/server.go index 191b8ba31..667907a5f 100644 --- a/packer/plugin/server.go +++ b/packer/plugin/server.go @@ -10,7 +10,7 @@ package plugin import ( "errors" "fmt" - packrpc "github.com/mitchellh/packer/packer/rpc" + packrpc "github.com/hashicorp/packer/packer/rpc" "io/ioutil" "log" "math/rand" diff --git a/packer/rpc/artifact.go b/packer/rpc/artifact.go index 3532cfbad..4d01bbabd 100644 --- a/packer/rpc/artifact.go +++ b/packer/rpc/artifact.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "net/rpc" ) diff --git a/packer/rpc/artifact_test.go b/packer/rpc/artifact_test.go index 37f4cef9f..6959c3239 100644 --- a/packer/rpc/artifact_test.go +++ b/packer/rpc/artifact_test.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "reflect" "testing" ) diff --git a/packer/rpc/build.go b/packer/rpc/build.go index 7a99a54a4..8573b2e8c 100644 --- a/packer/rpc/build.go +++ b/packer/rpc/build.go @@ -3,7 +3,7 @@ package rpc import ( "net/rpc" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // An implementation of packer.Build where the build is actually executed diff --git a/packer/rpc/build_test.go b/packer/rpc/build_test.go index 57a4b8dc2..1dfb3d6f4 100644 --- a/packer/rpc/build_test.go +++ b/packer/rpc/build_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) var testBuildArtifact = &packer.MockArtifact{} diff --git a/packer/rpc/builder.go b/packer/rpc/builder.go index 0e2464bd7..ed847fa91 100644 --- a/packer/rpc/builder.go +++ b/packer/rpc/builder.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "log" "net/rpc" ) diff --git a/packer/rpc/builder_test.go b/packer/rpc/builder_test.go index 51dbf7044..255877352 100644 --- a/packer/rpc/builder_test.go +++ b/packer/rpc/builder_test.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "reflect" "testing" ) diff --git a/packer/rpc/cache.go b/packer/rpc/cache.go index a4539ae66..ce5a231bb 100644 --- a/packer/rpc/cache.go +++ b/packer/rpc/cache.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "log" "net/rpc" ) diff --git a/packer/rpc/cache_test.go b/packer/rpc/cache_test.go index 702ca98e4..1fa76f0e4 100644 --- a/packer/rpc/cache_test.go +++ b/packer/rpc/cache_test.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/packer/rpc/client.go b/packer/rpc/client.go index 85d1ff550..37571a450 100644 --- a/packer/rpc/client.go +++ b/packer/rpc/client.go @@ -5,7 +5,7 @@ import ( "log" "net/rpc" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "github.com/ugorji/go/codec" ) diff --git a/packer/rpc/communicator.go b/packer/rpc/communicator.go index f52bd30d4..e1aab41e0 100644 --- a/packer/rpc/communicator.go +++ b/packer/rpc/communicator.go @@ -7,7 +7,7 @@ import ( "net/rpc" "os" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // An implementation of packer.Communicator where the communicator is actually diff --git a/packer/rpc/communicator_test.go b/packer/rpc/communicator_test.go index 0e517aec9..1af9e53c8 100644 --- a/packer/rpc/communicator_test.go +++ b/packer/rpc/communicator_test.go @@ -2,7 +2,7 @@ package rpc import ( "bufio" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io" "reflect" "testing" diff --git a/packer/rpc/hook.go b/packer/rpc/hook.go index 4aa7d75bc..590b0899a 100644 --- a/packer/rpc/hook.go +++ b/packer/rpc/hook.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "log" "net/rpc" ) diff --git a/packer/rpc/hook_test.go b/packer/rpc/hook_test.go index b3f4a420c..8043e6ad9 100644 --- a/packer/rpc/hook_test.go +++ b/packer/rpc/hook_test.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "reflect" "sync" "testing" diff --git a/packer/rpc/post_processor.go b/packer/rpc/post_processor.go index 5831b125e..0107558de 100644 --- a/packer/rpc/post_processor.go +++ b/packer/rpc/post_processor.go @@ -3,7 +3,7 @@ package rpc import ( "net/rpc" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // An implementation of packer.PostProcessor where the PostProcessor is actually diff --git a/packer/rpc/post_processor_test.go b/packer/rpc/post_processor_test.go index d9ea9c86f..99258c50e 100644 --- a/packer/rpc/post_processor_test.go +++ b/packer/rpc/post_processor_test.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "reflect" "testing" ) diff --git a/packer/rpc/provisioner.go b/packer/rpc/provisioner.go index 08d31700a..80c57e264 100644 --- a/packer/rpc/provisioner.go +++ b/packer/rpc/provisioner.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "log" "net/rpc" ) diff --git a/packer/rpc/provisioner_test.go b/packer/rpc/provisioner_test.go index 421990ffd..448946682 100644 --- a/packer/rpc/provisioner_test.go +++ b/packer/rpc/provisioner_test.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "reflect" "testing" ) diff --git a/packer/rpc/server.go b/packer/rpc/server.go index ff1753269..8982ec0e7 100644 --- a/packer/rpc/server.go +++ b/packer/rpc/server.go @@ -5,7 +5,7 @@ import ( "log" "net/rpc" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "github.com/ugorji/go/codec" ) diff --git a/packer/rpc/ui.go b/packer/rpc/ui.go index da032160a..1b84e5cd1 100644 --- a/packer/rpc/ui.go +++ b/packer/rpc/ui.go @@ -1,7 +1,7 @@ package rpc import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "log" "net/rpc" ) diff --git a/panic.go b/panic.go index 4f5d6a10b..480d04324 100644 --- a/panic.go +++ b/panic.go @@ -19,7 +19,7 @@ A crash log has been placed at "crash.log" relative to your current working directory. It would be immensely helpful if you could please report the crash with Packer[1] so that we can fix this. -[1]: https://github.com/mitchellh/packer/issues +[1]: https://github.com/hashicorp/packer/issues !!!!!!!!!!!!!!!!!!!!!!!!!!! PACKER CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!! ` diff --git a/plugin/example/main.go b/plugin/example/main.go index 3d20ef765..7f4edf6c4 100644 --- a/plugin/example/main.go +++ b/plugin/example/main.go @@ -15,10 +15,10 @@ package main import ( - "github.com/mitchellh/packer/builder/amazon/chroot" - "github.com/mitchellh/packer/packer/plugin" - "github.com/mitchellh/packer/post-processor/docker-push" - "github.com/mitchellh/packer/provisioner/powershell" + "github.com/hashicorp/packer/builder/amazon/chroot" + "github.com/hashicorp/packer/packer/plugin" + "github.com/hashicorp/packer/post-processor/docker-push" + "github.com/hashicorp/packer/provisioner/powershell" ) func main() { diff --git a/post-processor/amazon-import/post-processor.go b/post-processor/amazon-import/post-processor.go index 236436e13..36a8f5844 100644 --- a/post-processor/amazon-import/post-processor.go +++ b/post-processor/amazon-import/post-processor.go @@ -11,11 +11,11 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3manager" - awscommon "github.com/mitchellh/packer/builder/amazon/common" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + awscommon "github.com/hashicorp/packer/builder/amazon/common" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) const BuilderId = "packer.post-processor.amazon-import" diff --git a/post-processor/artifice/post-processor.go b/post-processor/artifice/post-processor.go index ff33184de..030b52c07 100644 --- a/post-processor/artifice/post-processor.go +++ b/post-processor/artifice/post-processor.go @@ -4,10 +4,10 @@ import ( "fmt" "strings" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) // The artifact-override post-processor allows you to specify arbitrary files as diff --git a/post-processor/atlas/post-processor.go b/post-processor/atlas/post-processor.go index fb42f9443..587942631 100644 --- a/post-processor/atlas/post-processor.go +++ b/post-processor/atlas/post-processor.go @@ -8,11 +8,11 @@ import ( "github.com/hashicorp/atlas-go/archive" "github.com/hashicorp/atlas-go/v1" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/mapstructure" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const ( diff --git a/post-processor/atlas/post-processor_test.go b/post-processor/atlas/post-processor_test.go index add222bb6..fc1862aa7 100644 --- a/post-processor/atlas/post-processor_test.go +++ b/post-processor/atlas/post-processor_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestPostProcessorConfigure(t *testing.T) { diff --git a/post-processor/checksum/post-processor.go b/post-processor/checksum/post-processor.go index 82d8c39a0..8da32d5d9 100644 --- a/post-processor/checksum/post-processor.go +++ b/post-processor/checksum/post-processor.go @@ -11,10 +11,10 @@ import ( "os" "path/filepath" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/post-processor/checksum/post-processor_test.go b/post-processor/checksum/post-processor_test.go index 8b60df2b4..fb4d0faf1 100644 --- a/post-processor/checksum/post-processor_test.go +++ b/post-processor/checksum/post-processor_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/builder/file" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template" + "github.com/hashicorp/packer/builder/file" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template" ) const expectedFileContents = "Hello world!" diff --git a/post-processor/compress/artifact_test.go b/post-processor/compress/artifact_test.go index 108ed84e7..2abde78d7 100644 --- a/post-processor/compress/artifact_test.go +++ b/post-processor/compress/artifact_test.go @@ -1,7 +1,7 @@ package compress import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/post-processor/compress/post-processor.go b/post-processor/compress/post-processor.go index 2d99e0ea0..d1bf89f1a 100644 --- a/post-processor/compress/post-processor.go +++ b/post-processor/compress/post-processor.go @@ -12,11 +12,11 @@ import ( "runtime" "github.com/biogo/hts/bgzf" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/klauspost/pgzip" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" "github.com/pierrec/lz4" ) diff --git a/post-processor/compress/post-processor_test.go b/post-processor/compress/post-processor_test.go index ea1d973eb..685e738ed 100644 --- a/post-processor/compress/post-processor_test.go +++ b/post-processor/compress/post-processor_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/builder/file" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template" + "github.com/hashicorp/packer/builder/file" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template" ) func TestDetectFilename(t *testing.T) { diff --git a/post-processor/docker-import/post-processor.go b/post-processor/docker-import/post-processor.go index 38c73ab55..80b99c8b3 100644 --- a/post-processor/docker-import/post-processor.go +++ b/post-processor/docker-import/post-processor.go @@ -3,12 +3,12 @@ package dockerimport import ( "fmt" - "github.com/mitchellh/packer/builder/docker" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/post-processor/artifice" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/builder/docker" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/post-processor/artifice" + "github.com/hashicorp/packer/template/interpolate" ) const BuilderId = "packer.post-processor.docker-import" diff --git a/post-processor/docker-import/post-processor_test.go b/post-processor/docker-import/post-processor_test.go index 43ac0b4ef..4df15486e 100644 --- a/post-processor/docker-import/post-processor_test.go +++ b/post-processor/docker-import/post-processor_test.go @@ -2,7 +2,7 @@ package dockerimport import ( "bytes" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/post-processor/docker-push/post-processor.go b/post-processor/docker-push/post-processor.go index 17a0f617c..5d44cecf0 100644 --- a/post-processor/docker-push/post-processor.go +++ b/post-processor/docker-push/post-processor.go @@ -3,13 +3,13 @@ package dockerpush import ( "fmt" - "github.com/mitchellh/packer/builder/docker" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/post-processor/docker-import" - "github.com/mitchellh/packer/post-processor/docker-tag" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/builder/docker" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/post-processor/docker-import" + "github.com/hashicorp/packer/post-processor/docker-tag" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/post-processor/docker-push/post-processor_test.go b/post-processor/docker-push/post-processor_test.go index c78e2b136..a79b4dc21 100644 --- a/post-processor/docker-push/post-processor_test.go +++ b/post-processor/docker-push/post-processor_test.go @@ -2,9 +2,9 @@ package dockerpush import ( "bytes" - "github.com/mitchellh/packer/builder/docker" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/post-processor/docker-import" + "github.com/hashicorp/packer/builder/docker" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/post-processor/docker-import" "testing" ) diff --git a/post-processor/docker-save/post-processor.go b/post-processor/docker-save/post-processor.go index 2e3b36b4e..6cb348bf8 100644 --- a/post-processor/docker-save/post-processor.go +++ b/post-processor/docker-save/post-processor.go @@ -4,13 +4,13 @@ import ( "fmt" "os" - "github.com/mitchellh/packer/builder/docker" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/post-processor/docker-import" - "github.com/mitchellh/packer/post-processor/docker-tag" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/builder/docker" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/post-processor/docker-import" + "github.com/hashicorp/packer/post-processor/docker-tag" + "github.com/hashicorp/packer/template/interpolate" ) const BuilderId = "packer.post-processor.docker-save" diff --git a/post-processor/docker-save/post-processor_test.go b/post-processor/docker-save/post-processor_test.go index 2d29d58b9..45ef41986 100644 --- a/post-processor/docker-save/post-processor_test.go +++ b/post-processor/docker-save/post-processor_test.go @@ -2,7 +2,7 @@ package dockersave import ( "bytes" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/post-processor/docker-tag/post-processor.go b/post-processor/docker-tag/post-processor.go index 2f52e965d..e9311d12f 100644 --- a/post-processor/docker-tag/post-processor.go +++ b/post-processor/docker-tag/post-processor.go @@ -3,12 +3,12 @@ package dockertag import ( "fmt" - "github.com/mitchellh/packer/builder/docker" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/post-processor/docker-import" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/builder/docker" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/post-processor/docker-import" + "github.com/hashicorp/packer/template/interpolate" ) const BuilderId = "packer.post-processor.docker-tag" diff --git a/post-processor/docker-tag/post-processor_test.go b/post-processor/docker-tag/post-processor_test.go index 1c0221c1f..fef434ee9 100644 --- a/post-processor/docker-tag/post-processor_test.go +++ b/post-processor/docker-tag/post-processor_test.go @@ -4,9 +4,9 @@ import ( "bytes" "testing" - "github.com/mitchellh/packer/builder/docker" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/post-processor/docker-import" + "github.com/hashicorp/packer/builder/docker" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/post-processor/docker-import" ) func testConfig() map[string]interface{} { diff --git a/post-processor/googlecompute-export/post-processor.go b/post-processor/googlecompute-export/post-processor.go index ab198cea4..9fd39aa46 100644 --- a/post-processor/googlecompute-export/post-processor.go +++ b/post-processor/googlecompute-export/post-processor.go @@ -5,12 +5,12 @@ import ( "io/ioutil" "strings" + "github.com/hashicorp/packer/builder/googlecompute" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/builder/googlecompute" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) type Config struct { diff --git a/post-processor/manifest/post-processor.go b/post-processor/manifest/post-processor.go index 5a75bd34c..f5807dbb2 100644 --- a/post-processor/manifest/post-processor.go +++ b/post-processor/manifest/post-processor.go @@ -9,10 +9,10 @@ import ( "path/filepath" "time" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/post-processor/shell-local/communicator.go b/post-processor/shell-local/communicator.go index 9b937027a..b0bfb008f 100644 --- a/post-processor/shell-local/communicator.go +++ b/post-processor/shell-local/communicator.go @@ -7,7 +7,7 @@ import ( "os/exec" "syscall" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) type Communicator struct{} diff --git a/post-processor/shell-local/communicator_test.go b/post-processor/shell-local/communicator_test.go index 037629d1a..025deec54 100644 --- a/post-processor/shell-local/communicator_test.go +++ b/post-processor/shell-local/communicator_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestCommunicator_impl(t *testing.T) { diff --git a/post-processor/shell-local/post-processor.go b/post-processor/shell-local/post-processor.go index afe4eb486..c2bd2d5c0 100644 --- a/post-processor/shell-local/post-processor.go +++ b/post-processor/shell-local/post-processor.go @@ -10,10 +10,10 @@ import ( "sort" "strings" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/post-processor/shell-local/post-processor_test.go b/post-processor/shell-local/post-processor_test.go index c5681694a..094b84096 100644 --- a/post-processor/shell-local/post-processor_test.go +++ b/post-processor/shell-local/post-processor_test.go @@ -1,7 +1,7 @@ package shell_local import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io/ioutil" "os" "testing" diff --git a/post-processor/vagrant-cloud/artifact_test.go b/post-processor/vagrant-cloud/artifact_test.go index b95e04511..e22090612 100644 --- a/post-processor/vagrant-cloud/artifact_test.go +++ b/post-processor/vagrant-cloud/artifact_test.go @@ -1,7 +1,7 @@ package vagrantcloud import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/post-processor/vagrant-cloud/post-processor.go b/post-processor/vagrant-cloud/post-processor.go index 53d75dac1..ef1af114b 100644 --- a/post-processor/vagrant-cloud/post-processor.go +++ b/post-processor/vagrant-cloud/post-processor.go @@ -9,11 +9,11 @@ import ( "log" "strings" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) const VAGRANT_CLOUD_URL = "https://vagrantcloud.com/api/v1" diff --git a/post-processor/vagrant-cloud/post-processor_test.go b/post-processor/vagrant-cloud/post-processor_test.go index 985df88cc..53cc64e84 100644 --- a/post-processor/vagrant-cloud/post-processor_test.go +++ b/post-processor/vagrant-cloud/post-processor_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testGoodConfig() map[string]interface{} { diff --git a/post-processor/vagrant-cloud/step_create_provider.go b/post-processor/vagrant-cloud/step_create_provider.go index 6e19f3f3e..c3e3665c8 100644 --- a/post-processor/vagrant-cloud/step_create_provider.go +++ b/post-processor/vagrant-cloud/step_create_provider.go @@ -2,8 +2,8 @@ package vagrantcloud import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type Provider struct { diff --git a/post-processor/vagrant-cloud/step_create_version.go b/post-processor/vagrant-cloud/step_create_version.go index 58c3051a7..0a544ceba 100644 --- a/post-processor/vagrant-cloud/step_create_version.go +++ b/post-processor/vagrant-cloud/step_create_version.go @@ -2,8 +2,8 @@ package vagrantcloud import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type Version struct { diff --git a/post-processor/vagrant-cloud/step_prepare_upload.go b/post-processor/vagrant-cloud/step_prepare_upload.go index d28a9fd2b..62e270fd8 100644 --- a/post-processor/vagrant-cloud/step_prepare_upload.go +++ b/post-processor/vagrant-cloud/step_prepare_upload.go @@ -2,8 +2,8 @@ package vagrantcloud import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type Upload struct { diff --git a/post-processor/vagrant-cloud/step_release_version.go b/post-processor/vagrant-cloud/step_release_version.go index 6301d5f19..7b6b25e93 100644 --- a/post-processor/vagrant-cloud/step_release_version.go +++ b/post-processor/vagrant-cloud/step_release_version.go @@ -2,8 +2,8 @@ package vagrantcloud import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" "strings" ) diff --git a/post-processor/vagrant-cloud/step_upload.go b/post-processor/vagrant-cloud/step_upload.go index 0d53a99d6..cca7ef83f 100644 --- a/post-processor/vagrant-cloud/step_upload.go +++ b/post-processor/vagrant-cloud/step_upload.go @@ -4,8 +4,8 @@ import ( "fmt" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepUpload struct { diff --git a/post-processor/vagrant-cloud/step_verify_box.go b/post-processor/vagrant-cloud/step_verify_box.go index cc3f48b85..c3c7ef4a6 100644 --- a/post-processor/vagrant-cloud/step_verify_box.go +++ b/post-processor/vagrant-cloud/step_verify_box.go @@ -2,8 +2,8 @@ package vagrantcloud import ( "fmt" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type Box struct { diff --git a/post-processor/vagrant-cloud/step_verify_upload.go b/post-processor/vagrant-cloud/step_verify_upload.go index 4a90ffa2d..2aab64b08 100644 --- a/post-processor/vagrant-cloud/step_verify_upload.go +++ b/post-processor/vagrant-cloud/step_verify_upload.go @@ -5,8 +5,8 @@ import ( "log" "time" + "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" - "github.com/mitchellh/packer/packer" ) type stepVerifyUpload struct { diff --git a/post-processor/vagrant/artifact_test.go b/post-processor/vagrant/artifact_test.go index 6e16285a2..3676e1d98 100644 --- a/post-processor/vagrant/artifact_test.go +++ b/post-processor/vagrant/artifact_test.go @@ -1,7 +1,7 @@ package vagrant import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "testing" ) diff --git a/post-processor/vagrant/aws.go b/post-processor/vagrant/aws.go index da9088ffc..be23f038d 100644 --- a/post-processor/vagrant/aws.go +++ b/post-processor/vagrant/aws.go @@ -6,7 +6,7 @@ import ( "strings" "text/template" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) type AWSProvider struct{} diff --git a/post-processor/vagrant/aws_test.go b/post-processor/vagrant/aws_test.go index 02eb02365..d242985d1 100644 --- a/post-processor/vagrant/aws_test.go +++ b/post-processor/vagrant/aws_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestAWSProvider_impl(t *testing.T) { diff --git a/post-processor/vagrant/digitalocean.go b/post-processor/vagrant/digitalocean.go index f14284e37..2aaba9067 100644 --- a/post-processor/vagrant/digitalocean.go +++ b/post-processor/vagrant/digitalocean.go @@ -3,7 +3,7 @@ package vagrant import ( "bytes" "fmt" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "strings" "text/template" ) diff --git a/post-processor/vagrant/digitalocean_test.go b/post-processor/vagrant/digitalocean_test.go index 6256fc249..c666b06a3 100644 --- a/post-processor/vagrant/digitalocean_test.go +++ b/post-processor/vagrant/digitalocean_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestDigitalOceanProvider_impl(t *testing.T) { diff --git a/post-processor/vagrant/hyperv.go b/post-processor/vagrant/hyperv.go index 2f7dc1440..cf71820e9 100644 --- a/post-processor/vagrant/hyperv.go +++ b/post-processor/vagrant/hyperv.go @@ -2,7 +2,7 @@ package vagrant import ( "fmt" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "os" "path/filepath" "strings" diff --git a/post-processor/vagrant/libvirt.go b/post-processor/vagrant/libvirt.go index 1afdcac45..ece535bf0 100644 --- a/post-processor/vagrant/libvirt.go +++ b/post-processor/vagrant/libvirt.go @@ -2,7 +2,7 @@ package vagrant import ( "fmt" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "path/filepath" "strings" ) diff --git a/post-processor/vagrant/parallels.go b/post-processor/vagrant/parallels.go index 61e6ee5e6..41f9afa1a 100644 --- a/post-processor/vagrant/parallels.go +++ b/post-processor/vagrant/parallels.go @@ -5,7 +5,7 @@ import ( "path/filepath" "regexp" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // These are the extensions of files and directories that are unnecessary for the function diff --git a/post-processor/vagrant/post-processor.go b/post-processor/vagrant/post-processor.go index 472a182eb..aa65b2292 100644 --- a/post-processor/vagrant/post-processor.go +++ b/post-processor/vagrant/post-processor.go @@ -11,11 +11,11 @@ import ( "path/filepath" "text/template" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/mitchellh/mapstructure" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) var builtins = map[string]string{ diff --git a/post-processor/vagrant/post-processor_test.go b/post-processor/vagrant/post-processor_test.go index 1bcb50be3..8b8bfe10a 100644 --- a/post-processor/vagrant/post-processor_test.go +++ b/post-processor/vagrant/post-processor_test.go @@ -3,7 +3,7 @@ package vagrant import ( "bytes" "compress/flate" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io/ioutil" "os" "strings" diff --git a/post-processor/vagrant/provider.go b/post-processor/vagrant/provider.go index cda29fcb7..e9b76d0c7 100644 --- a/post-processor/vagrant/provider.go +++ b/post-processor/vagrant/provider.go @@ -1,7 +1,7 @@ package vagrant import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // Provider is the interface that each provider must implement in order diff --git a/post-processor/vagrant/util.go b/post-processor/vagrant/util.go index 6ae2c337f..bc154d640 100644 --- a/post-processor/vagrant/util.go +++ b/post-processor/vagrant/util.go @@ -11,8 +11,8 @@ import ( "path/filepath" "runtime" + "github.com/hashicorp/packer/packer" "github.com/klauspost/pgzip" - "github.com/mitchellh/packer/packer" ) var ( diff --git a/post-processor/vagrant/virtualbox.go b/post-processor/vagrant/virtualbox.go index ade31b2fb..29201a01a 100644 --- a/post-processor/vagrant/virtualbox.go +++ b/post-processor/vagrant/virtualbox.go @@ -4,7 +4,7 @@ import ( "archive/tar" "errors" "fmt" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io" "io/ioutil" "log" diff --git a/post-processor/vagrant/vmware.go b/post-processor/vagrant/vmware.go index 75427397e..3fe2aed4e 100644 --- a/post-processor/vagrant/vmware.go +++ b/post-processor/vagrant/vmware.go @@ -2,7 +2,7 @@ package vagrant import ( "fmt" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "path/filepath" ) diff --git a/post-processor/vsphere/post-processor.go b/post-processor/vsphere/post-processor.go index 55ceded4a..e97147334 100644 --- a/post-processor/vsphere/post-processor.go +++ b/post-processor/vsphere/post-processor.go @@ -8,10 +8,10 @@ import ( "os/exec" "strings" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) var builtins = map[string]string{ diff --git a/provisioner/ansible-local/provisioner.go b/provisioner/ansible-local/provisioner.go index 23562ec9a..88138e67f 100644 --- a/provisioner/ansible-local/provisioner.go +++ b/provisioner/ansible-local/provisioner.go @@ -7,11 +7,11 @@ import ( "path/filepath" "strings" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) const DefaultStagingDir = "/tmp/packer-provisioner-ansible-local" diff --git a/provisioner/ansible-local/provisioner_test.go b/provisioner/ansible-local/provisioner_test.go index 236c6252a..2195b7107 100644 --- a/provisioner/ansible-local/provisioner_test.go +++ b/provisioner/ansible-local/provisioner_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/provisioner/ansible/adapter.go b/provisioner/ansible/adapter.go index eb481abd6..c3dfd3495 100644 --- a/provisioner/ansible/adapter.go +++ b/provisioner/ansible/adapter.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/google/shlex" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "golang.org/x/crypto/ssh" ) diff --git a/provisioner/ansible/adapter_test.go b/provisioner/ansible/adapter_test.go index 41aab358c..2ab2d350b 100644 --- a/provisioner/ansible/adapter_test.go +++ b/provisioner/ansible/adapter_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "golang.org/x/crypto/ssh" ) diff --git a/provisioner/ansible/provisioner.go b/provisioner/ansible/provisioner.go index 0577c58f3..c6e055e01 100644 --- a/provisioner/ansible/provisioner.go +++ b/provisioner/ansible/provisioner.go @@ -24,10 +24,10 @@ import ( "golang.org/x/crypto/ssh" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/provisioner/ansible/provisioner_test.go b/provisioner/ansible/provisioner_test.go index 13042c5e1..bda07080b 100644 --- a/provisioner/ansible/provisioner_test.go +++ b/provisioner/ansible/provisioner_test.go @@ -11,7 +11,7 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) // Be sure to remove the Ansible stub file in each test with: diff --git a/provisioner/ansible/scp.go b/provisioner/ansible/scp.go index 6378bdc14..0d951c728 100644 --- a/provisioner/ansible/scp.go +++ b/provisioner/ansible/scp.go @@ -13,7 +13,7 @@ import ( "strings" "time" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) const ( diff --git a/provisioner/ansible/test-fixtures/long-debug-message.yml b/provisioner/ansible/test-fixtures/long-debug-message.yml index cdd72e8b3..e633061bd 100644 --- a/provisioner/ansible/test-fixtures/long-debug-message.yml +++ b/provisioner/ansible/test-fixtures/long-debug-message.yml @@ -3,6 +3,6 @@ connection: local tasks: - - name: Very long Ansible output (>65535 chars) (Issue https://github.com/mitchellh/packer/issues/3268) + - name: Very long Ansible output (>65535 chars) (Issue https://github.com/hashicorp/packer/issues/3268) debug: msg: "{{ lipsum(n=300, html=false) }}" diff --git a/provisioner/chef-client/provisioner.go b/provisioner/chef-client/provisioner.go index a0be8df9b..3853613fc 100644 --- a/provisioner/chef-client/provisioner.go +++ b/provisioner/chef-client/provisioner.go @@ -12,12 +12,12 @@ import ( "path/filepath" "strings" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/provisioner" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/provisioner" + "github.com/hashicorp/packer/template/interpolate" ) type guestOSTypeConfig struct { diff --git a/provisioner/chef-client/provisioner_test.go b/provisioner/chef-client/provisioner_test.go index e84c81c72..ac148721a 100644 --- a/provisioner/chef-client/provisioner_test.go +++ b/provisioner/chef-client/provisioner_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/provisioner/chef-solo/provisioner.go b/provisioner/chef-solo/provisioner.go index c4ca5fd61..981619a18 100644 --- a/provisioner/chef-solo/provisioner.go +++ b/provisioner/chef-solo/provisioner.go @@ -12,11 +12,11 @@ import ( "path/filepath" "strings" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/provisioner" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/provisioner" + "github.com/hashicorp/packer/template/interpolate" ) type guestOSTypeConfig struct { diff --git a/provisioner/chef-solo/provisioner_test.go b/provisioner/chef-solo/provisioner_test.go index 67fc1009a..15ae499c7 100644 --- a/provisioner/chef-solo/provisioner_test.go +++ b/provisioner/chef-solo/provisioner_test.go @@ -1,7 +1,7 @@ package chefsolo import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io/ioutil" "os" "testing" diff --git a/provisioner/converge/provisioner.go b/provisioner/converge/provisioner.go index dab861115..924cfa493 100644 --- a/provisioner/converge/provisioner.go +++ b/provisioner/converge/provisioner.go @@ -12,10 +12,10 @@ import ( "encoding/json" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) // Config for Converge provisioner diff --git a/provisioner/converge/provisioner_test.go b/provisioner/converge/provisioner_test.go index b4cd2d361..ee38905a5 100644 --- a/provisioner/converge/provisioner_test.go +++ b/provisioner/converge/provisioner_test.go @@ -3,7 +3,7 @@ package converge import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/provisioner/file/provisioner.go b/provisioner/file/provisioner.go index 433c9f23a..b3283b20c 100644 --- a/provisioner/file/provisioner.go +++ b/provisioner/file/provisioner.go @@ -7,10 +7,10 @@ import ( "path/filepath" "strings" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/provisioner/file/provisioner_test.go b/provisioner/file/provisioner_test.go index 2169c96a3..762eb83f8 100644 --- a/provisioner/file/provisioner_test.go +++ b/provisioner/file/provisioner_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/provisioner/powershell/provisioner.go b/provisioner/powershell/provisioner.go index 8448cf819..1443c56dc 100644 --- a/provisioner/powershell/provisioner.go +++ b/provisioner/powershell/provisioner.go @@ -14,11 +14,11 @@ import ( "strings" "time" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/common/uuid" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/common/uuid" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) const DefaultRemotePath = "c:/Windows/Temp/script.ps1" diff --git a/provisioner/powershell/provisioner_test.go b/provisioner/powershell/provisioner_test.go index 7291159fa..a0d6d80c0 100644 --- a/provisioner/powershell/provisioner_test.go +++ b/provisioner/powershell/provisioner_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/provisioner/puppet-masterless/provisioner.go b/provisioner/puppet-masterless/provisioner.go index ba4c73458..6f1b6eee4 100644 --- a/provisioner/puppet-masterless/provisioner.go +++ b/provisioner/puppet-masterless/provisioner.go @@ -9,10 +9,10 @@ import ( "path/filepath" "strings" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/provisioner/puppet-masterless/provisioner_test.go b/provisioner/puppet-masterless/provisioner_test.go index 581919bee..6c58f63d7 100644 --- a/provisioner/puppet-masterless/provisioner_test.go +++ b/provisioner/puppet-masterless/provisioner_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/provisioner/puppet-server/provisioner.go b/provisioner/puppet-server/provisioner.go index 9986d12d3..9e5e6a498 100644 --- a/provisioner/puppet-server/provisioner.go +++ b/provisioner/puppet-server/provisioner.go @@ -7,10 +7,10 @@ import ( "os" "strings" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/provisioner/puppet-server/provisioner_test.go b/provisioner/puppet-server/provisioner_test.go index 46702dfc3..a41a6bec5 100644 --- a/provisioner/puppet-server/provisioner_test.go +++ b/provisioner/puppet-server/provisioner_test.go @@ -1,7 +1,7 @@ package puppetserver import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io/ioutil" "os" "testing" diff --git a/provisioner/salt-masterless/provisioner.go b/provisioner/salt-masterless/provisioner.go index dc22fd4ca..41d1e261b 100644 --- a/provisioner/salt-masterless/provisioner.go +++ b/provisioner/salt-masterless/provisioner.go @@ -9,10 +9,10 @@ import ( "os" "path/filepath" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) const DefaultTempConfigDir = "/tmp/salt" diff --git a/provisioner/salt-masterless/provisioner_test.go b/provisioner/salt-masterless/provisioner_test.go index 09f97df26..2b7f3a026 100644 --- a/provisioner/salt-masterless/provisioner_test.go +++ b/provisioner/salt-masterless/provisioner_test.go @@ -1,7 +1,7 @@ package saltmasterless import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io/ioutil" "os" "strings" diff --git a/provisioner/shell-local/communicator.go b/provisioner/shell-local/communicator.go index 0470bb3a0..2afbe1028 100644 --- a/provisioner/shell-local/communicator.go +++ b/provisioner/shell-local/communicator.go @@ -7,8 +7,8 @@ import ( "os/exec" "syscall" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Communicator struct { diff --git a/provisioner/shell-local/communicator_test.go b/provisioner/shell-local/communicator_test.go index 90402324b..8ebd4fa60 100644 --- a/provisioner/shell-local/communicator_test.go +++ b/provisioner/shell-local/communicator_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestCommunicator_impl(t *testing.T) { diff --git a/provisioner/shell-local/provisioner.go b/provisioner/shell-local/provisioner.go index f3c451951..3f8222c19 100644 --- a/provisioner/shell-local/provisioner.go +++ b/provisioner/shell-local/provisioner.go @@ -5,10 +5,10 @@ import ( "fmt" "runtime" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/provisioner/shell-local/provisioner_test.go b/provisioner/shell-local/provisioner_test.go index ad8f3065d..9f4fb9d2a 100644 --- a/provisioner/shell-local/provisioner_test.go +++ b/provisioner/shell-local/provisioner_test.go @@ -3,7 +3,7 @@ package shell import ( "testing" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func TestProvisioner_impl(t *testing.T) { diff --git a/provisioner/shell/provisioner.go b/provisioner/shell/provisioner.go index 30468aee1..5e9c587a1 100644 --- a/provisioner/shell/provisioner.go +++ b/provisioner/shell/provisioner.go @@ -15,10 +15,10 @@ import ( "strings" "time" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) type Config struct { diff --git a/provisioner/shell/provisioner_test.go b/provisioner/shell/provisioner_test.go index c2bcb455d..ee0edf95b 100644 --- a/provisioner/shell/provisioner_test.go +++ b/provisioner/shell/provisioner_test.go @@ -1,7 +1,7 @@ package shell import ( - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io/ioutil" "os" "regexp" diff --git a/provisioner/windows-restart/provisioner.go b/provisioner/windows-restart/provisioner.go index ae58dd9d1..ed7dfee63 100644 --- a/provisioner/windows-restart/provisioner.go +++ b/provisioner/windows-restart/provisioner.go @@ -6,11 +6,11 @@ import ( "sync" "time" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" "github.com/masterzen/winrm" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" ) var DefaultRestartCommand = "shutdown /r /f /t 0 /c \"packer restart\"" diff --git a/provisioner/windows-restart/provisioner_test.go b/provisioner/windows-restart/provisioner_test.go index 6ba63f8b5..05b6b204a 100644 --- a/provisioner/windows-restart/provisioner_test.go +++ b/provisioner/windows-restart/provisioner_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" ) func testConfig() map[string]interface{} { diff --git a/provisioner/windows-shell/provisioner.go b/provisioner/windows-shell/provisioner.go index 6baebe70a..585fa437c 100644 --- a/provisioner/windows-shell/provisioner.go +++ b/provisioner/windows-shell/provisioner.go @@ -13,10 +13,10 @@ import ( "strings" "time" - "github.com/mitchellh/packer/common" - "github.com/mitchellh/packer/helper/config" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/template/interpolate" + "github.com/hashicorp/packer/common" + "github.com/hashicorp/packer/helper/config" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/template/interpolate" ) const DefaultRemotePath = "c:/Windows/Temp/script.bat" diff --git a/provisioner/windows-shell/provisioner_test.go b/provisioner/windows-shell/provisioner_test.go index a086fb739..62f78f20a 100644 --- a/provisioner/windows-shell/provisioner_test.go +++ b/provisioner/windows-shell/provisioner_test.go @@ -4,7 +4,7 @@ import ( "bytes" "errors" "fmt" - "github.com/mitchellh/packer/packer" + "github.com/hashicorp/packer/packer" "io/ioutil" "log" "os" diff --git a/scripts/build.ps1 b/scripts/build.ps1 index d82f1e679..5287704aa 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -70,7 +70,7 @@ echo "==> Building..." gox.exe ` -os="${XC_OS}" ` -arch="${XC_ARCH}" ` - -ldflags "-X github.com/mitchellh/packer/version.GitCommit=${GIT_COMMIT}${GIT_DIRTY}" ` + -ldflags "-X github.com/hashicorp/packer/version.GitCommit=${GIT_COMMIT}${GIT_DIRTY}" ` -output "pkg/{{.OS}}_{{.Arch}}/packer" ` . diff --git a/scripts/build.sh b/scripts/build.sh index 3c2c889e0..98c7449b1 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -37,7 +37,7 @@ set +e gox \ -os="${XC_OS}" \ -arch="${XC_ARCH}" \ - -ldflags "-X github.com/mitchellh/packer/version.GitCommit=${GIT_COMMIT}${GIT_DIRTY}" \ + -ldflags "-X github.com/hashicorp/packer/version.GitCommit=${GIT_COMMIT}${GIT_DIRTY}" \ -output "pkg/{{.OS}}_{{.Arch}}/packer" \ . set -e diff --git a/scripts/generate-plugins.go b/scripts/generate-plugins.go index 6d5cfcc28..80f561636 100644 --- a/scripts/generate-plugins.go +++ b/scripts/generate-plugins.go @@ -1,7 +1,7 @@ // Generate Plugins is a small program that updates the lists of plugins in // command/plugin.go so they will be compiled into the main packer binary. // -// See https://github.com/mitchellh/packer/pull/2608 for details. +// See https://github.com/hashicorp/packer/pull/2608 for details. package main import ( @@ -96,15 +96,15 @@ func makeImports(builders, provisioners, postProcessors []plugin) string { plugins := []string{} for _, builder := range builders { - plugins = append(plugins, fmt.Sprintf("\t%s \"github.com/mitchellh/packer/%s\"\n", builder.ImportName, filepath.ToSlash(builder.Path))) + plugins = append(plugins, fmt.Sprintf("\t%s \"github.com/hashicorp/packer/%s\"\n", builder.ImportName, filepath.ToSlash(builder.Path))) } for _, provisioner := range provisioners { - plugins = append(plugins, fmt.Sprintf("\t%s \"github.com/mitchellh/packer/%s\"\n", provisioner.ImportName, filepath.ToSlash(provisioner.Path))) + plugins = append(plugins, fmt.Sprintf("\t%s \"github.com/hashicorp/packer/%s\"\n", provisioner.ImportName, filepath.ToSlash(provisioner.Path))) } for _, postProcessor := range postProcessors { - plugins = append(plugins, fmt.Sprintf("\t%s \"github.com/mitchellh/packer/%s\"\n", postProcessor.ImportName, filepath.ToSlash(postProcessor.Path))) + plugins = append(plugins, fmt.Sprintf("\t%s \"github.com/hashicorp/packer/%s\"\n", postProcessor.ImportName, filepath.ToSlash(postProcessor.Path))) } // Make things pretty @@ -238,8 +238,8 @@ import ( "regexp" "strings" - "github.com/mitchellh/packer/packer" - "github.com/mitchellh/packer/packer/plugin" + "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/packer/plugin" IMPORTS ) diff --git a/scripts/prepare_changelog.sh b/scripts/prepare_changelog.sh index bc5a121b9..f44bd93bd 100755 --- a/scripts/prepare_changelog.sh +++ b/scripts/prepare_changelog.sh @@ -19,7 +19,7 @@ do fi done | while read line do - echo "https://github.com/mitchellh/packer/pull/${line}" + echo "https://github.com/hashicorp/packer/pull/${line}" #TODO get tags. ignore docs echo $line vared -ch ok diff --git a/template/interpolate/funcs.go b/template/interpolate/funcs.go index 1244a55fc..ee5e21ccc 100644 --- a/template/interpolate/funcs.go +++ b/template/interpolate/funcs.go @@ -10,7 +10,7 @@ import ( "text/template" "time" - "github.com/mitchellh/packer/common/uuid" + "github.com/hashicorp/packer/common/uuid" ) // InitTime is the UTC time when this package was initialized. It is diff --git a/vendor/github.com/digitalocean/godo/CHANGELOG.md b/vendor/github.com/digitalocean/godo/CHANGELOG.md new file mode 100644 index 000000000..71886a354 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/CHANGELOG.md @@ -0,0 +1,10 @@ +# Change Log + +## [v1.0.0] - 2017-03-10 + +### Added +- #130 Add Convert to ImageActionsService. - @xmudrii +- #126 Add CertificatesService for managing certificates with the DigitalOcean API. - @viola +- #125 Add LoadBalancersService for managing load balancers with the DigitalOcean API. - @viola +- #122 Add GetVolumeByName to StorageService. - @protochron +- #113 Add context.Context to all calls. - @aybabtme diff --git a/vendor/github.com/digitalocean/godo/README.md b/vendor/github.com/digitalocean/godo/README.md index 03d0c0768..4d5cdf83e 100644 --- a/vendor/github.com/digitalocean/godo/README.md +++ b/vendor/github.com/digitalocean/godo/README.md @@ -65,7 +65,9 @@ createRequest := &godo.DropletCreateRequest{ }, } -newDroplet, _, err := client.Droplets.Create(createRequest) +ctx := context.TODO() + +newDroplet, _, err := client.Droplets.Create(ctx, createRequest) if err != nil { fmt.Printf("Something bad happened: %s\n\n", err) @@ -78,14 +80,14 @@ if err != nil { If a list of items is paginated by the API, you must request pages individually. For example, to fetch all Droplets: ```go -func DropletList(client *godo.Client) ([]godo.Droplet, error) { +func DropletList(ctx context.Context, client *godo.Client) ([]godo.Droplet, error) { // create a list to hold our droplets list := []godo.Droplet{} // create options. initially, these will be blank opt := &godo.ListOptions{} for { - droplets, resp, err := client.Droplets.List(opt) + droplets, resp, err := client.Droplets.List(ctx, opt) if err != nil { return nil, err } diff --git a/vendor/github.com/digitalocean/godo/account.go b/vendor/github.com/digitalocean/godo/account.go index 3c2a1c3af..18eed9712 100644 --- a/vendor/github.com/digitalocean/godo/account.go +++ b/vendor/github.com/digitalocean/godo/account.go @@ -1,10 +1,12 @@ package godo +import "context" + // AccountService is an interface for interfacing with the Account // endpoints of the DigitalOcean API // See: https://developers.digitalocean.com/documentation/v2/#account type AccountService interface { - Get() (*Account, *Response, error) + Get(context.Context) (*Account, *Response, error) } // AccountServiceOp handles communication with the Account related methods of @@ -35,10 +37,11 @@ func (r Account) String() string { } // Get DigitalOcean account info -func (s *AccountServiceOp) Get() (*Account, *Response, error) { +func (s *AccountServiceOp) Get(ctx context.Context) (*Account, *Response, error) { + path := "v2/account" - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/digitalocean/godo/action.go b/vendor/github.com/digitalocean/godo/action.go index e19493b92..9baef2147 100644 --- a/vendor/github.com/digitalocean/godo/action.go +++ b/vendor/github.com/digitalocean/godo/action.go @@ -1,6 +1,9 @@ package godo -import "fmt" +import ( + "context" + "fmt" +) const ( actionsBasePath = "v2/actions" @@ -15,8 +18,8 @@ const ( // ActionsService handles communction with action related methods of the // DigitalOcean API: https://developers.digitalocean.com/documentation/v2#actions type ActionsService interface { - List(*ListOptions) ([]Action, *Response, error) - Get(int) (*Action, *Response, error) + List(context.Context, *ListOptions) ([]Action, *Response, error) + Get(context.Context, int) (*Action, *Response, error) } // ActionsServiceOp handles communition with the image action related methods of the @@ -33,7 +36,7 @@ type actionsRoot struct { } type actionRoot struct { - Event Action `json:"action"` + Event *Action `json:"action"` } // Action represents a DigitalOcean Action @@ -50,14 +53,14 @@ type Action struct { } // List all actions -func (s *ActionsServiceOp) List(opt *ListOptions) ([]Action, *Response, error) { +func (s *ActionsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Action, *Response, error) { path := actionsBasePath path, err := addOptions(path, opt) if err != nil { return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -75,13 +78,13 @@ func (s *ActionsServiceOp) List(opt *ListOptions) ([]Action, *Response, error) { } // Get an action by ID. -func (s *ActionsServiceOp) Get(id int) (*Action, *Response, error) { +func (s *ActionsServiceOp) Get(ctx context.Context, id int) (*Action, *Response, error) { if id < 1 { return nil, nil, NewArgError("id", "cannot be less than 1") } path := fmt.Sprintf("%s/%d", actionsBasePath, id) - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -92,7 +95,7 @@ func (s *ActionsServiceOp) Get(id int) (*Action, *Response, error) { return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } func (a Action) String() string { diff --git a/vendor/github.com/digitalocean/godo/certificates.go b/vendor/github.com/digitalocean/godo/certificates.go new file mode 100644 index 000000000..b48e80ec3 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/certificates.go @@ -0,0 +1,120 @@ +package godo + +import ( + "context" + "path" +) + +const certificatesBasePath = "/v2/certificates" + +// CertificatesService is an interface for managing certificates with the DigitalOcean API. +// See: https://developers.digitalocean.com/documentation/v2/#certificates +type CertificatesService interface { + Get(context.Context, string) (*Certificate, *Response, error) + List(context.Context, *ListOptions) ([]Certificate, *Response, error) + Create(context.Context, *CertificateRequest) (*Certificate, *Response, error) + Delete(context.Context, string) (*Response, error) +} + +// Certificate represents a DigitalOcean certificate configuration. +type Certificate struct { + ID string `json:"id,omitempty"` + Name string `json:"name,omitempty"` + NotAfter string `json:"not_after,omitempty"` + SHA1Fingerprint string `json:"sha1_fingerprint,omitempty"` + Created string `json:"created_at,omitempty"` +} + +// CertificateRequest represents configuration for a new certificate. +type CertificateRequest struct { + Name string `json:"name,omitempty"` + PrivateKey string `json:"private_key,omitempty"` + LeafCertificate string `json:"leaf_certificate,omitempty"` + CertificateChain string `json:"certificate_chain,omitempty"` +} + +type certificateRoot struct { + Certificate *Certificate `json:"certificate"` +} + +type certificatesRoot struct { + Certificates []Certificate `json:"certificates"` + Links *Links `json:"links"` +} + +// CertificatesServiceOp handles communication with certificates methods of the DigitalOcean API. +type CertificatesServiceOp struct { + client *Client +} + +var _ CertificatesService = &CertificatesServiceOp{} + +// Get an existing certificate by its identifier. +func (c *CertificatesServiceOp) Get(ctx context.Context, cID string) (*Certificate, *Response, error) { + urlStr := path.Join(certificatesBasePath, cID) + + req, err := c.client.NewRequest(ctx, "GET", urlStr, nil) + if err != nil { + return nil, nil, err + } + + root := new(certificateRoot) + resp, err := c.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Certificate, resp, nil +} + +// List all certificates. +func (c *CertificatesServiceOp) List(ctx context.Context, opt *ListOptions) ([]Certificate, *Response, error) { + urlStr, err := addOptions(certificatesBasePath, opt) + if err != nil { + return nil, nil, err + } + + req, err := c.client.NewRequest(ctx, "GET", urlStr, nil) + if err != nil { + return nil, nil, err + } + + root := new(certificatesRoot) + resp, err := c.client.Do(req, root) + if err != nil { + return nil, resp, err + } + if l := root.Links; l != nil { + resp.Links = l + } + + return root.Certificates, resp, nil +} + +// Create a new certificate with provided configuration. +func (c *CertificatesServiceOp) Create(ctx context.Context, cr *CertificateRequest) (*Certificate, *Response, error) { + req, err := c.client.NewRequest(ctx, "POST", certificatesBasePath, cr) + if err != nil { + return nil, nil, err + } + + root := new(certificateRoot) + resp, err := c.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Certificate, resp, nil +} + +// Delete a certificate by its identifier. +func (c *CertificatesServiceOp) Delete(ctx context.Context, cID string) (*Response, error) { + urlStr := path.Join(certificatesBasePath, cID) + + req, err := c.client.NewRequest(ctx, "DELETE", urlStr, nil) + if err != nil { + return nil, err + } + + return c.client.Do(req, nil) +} diff --git a/vendor/github.com/digitalocean/godo/domains.go b/vendor/github.com/digitalocean/godo/domains.go index 31de17868..fdc2a84c6 100644 --- a/vendor/github.com/digitalocean/godo/domains.go +++ b/vendor/github.com/digitalocean/godo/domains.go @@ -1,6 +1,9 @@ package godo -import "fmt" +import ( + "context" + "fmt" +) const domainsBasePath = "v2/domains" @@ -8,16 +11,16 @@ const domainsBasePath = "v2/domains" // See: https://developers.digitalocean.com/documentation/v2#domains and // https://developers.digitalocean.com/documentation/v2#domain-records type DomainsService interface { - List(*ListOptions) ([]Domain, *Response, error) - Get(string) (*Domain, *Response, error) - Create(*DomainCreateRequest) (*Domain, *Response, error) - Delete(string) (*Response, error) + List(context.Context, *ListOptions) ([]Domain, *Response, error) + Get(context.Context, string) (*Domain, *Response, error) + Create(context.Context, *DomainCreateRequest) (*Domain, *Response, error) + Delete(context.Context, string) (*Response, error) - Records(string, *ListOptions) ([]DomainRecord, *Response, error) - Record(string, int) (*DomainRecord, *Response, error) - DeleteRecord(string, int) (*Response, error) - EditRecord(string, int, *DomainRecordEditRequest) (*DomainRecord, *Response, error) - CreateRecord(string, *DomainRecordEditRequest) (*DomainRecord, *Response, error) + Records(context.Context, string, *ListOptions) ([]DomainRecord, *Response, error) + Record(context.Context, string, int) (*DomainRecord, *Response, error) + DeleteRecord(context.Context, string, int) (*Response, error) + EditRecord(context.Context, string, int, *DomainRecordEditRequest) (*DomainRecord, *Response, error) + CreateRecord(context.Context, string, *DomainRecordEditRequest) (*DomainRecord, *Response, error) } // DomainsServiceOp handles communication with the domain related methods of the @@ -88,14 +91,14 @@ func (d Domain) String() string { } // List all domains. -func (s DomainsServiceOp) List(opt *ListOptions) ([]Domain, *Response, error) { +func (s DomainsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Domain, *Response, error) { path := domainsBasePath path, err := addOptions(path, opt) if err != nil { return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -113,14 +116,14 @@ func (s DomainsServiceOp) List(opt *ListOptions) ([]Domain, *Response, error) { } // Get individual domain. It requires a non-empty domain name. -func (s *DomainsServiceOp) Get(name string) (*Domain, *Response, error) { +func (s *DomainsServiceOp) Get(ctx context.Context, name string) (*Domain, *Response, error) { if len(name) < 1 { return nil, nil, NewArgError("name", "cannot be an empty string") } path := fmt.Sprintf("%s/%s", domainsBasePath, name) - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -135,14 +138,14 @@ func (s *DomainsServiceOp) Get(name string) (*Domain, *Response, error) { } // Create a new domain -func (s *DomainsServiceOp) Create(createRequest *DomainCreateRequest) (*Domain, *Response, error) { +func (s *DomainsServiceOp) Create(ctx context.Context, createRequest *DomainCreateRequest) (*Domain, *Response, error) { if createRequest == nil { return nil, nil, NewArgError("createRequest", "cannot be nil") } path := domainsBasePath - req, err := s.client.NewRequest("POST", path, createRequest) + req, err := s.client.NewRequest(ctx, "POST", path, createRequest) if err != nil { return nil, nil, err } @@ -156,14 +159,14 @@ func (s *DomainsServiceOp) Create(createRequest *DomainCreateRequest) (*Domain, } // Delete domain -func (s *DomainsServiceOp) Delete(name string) (*Response, error) { +func (s *DomainsServiceOp) Delete(ctx context.Context, name string) (*Response, error) { if len(name) < 1 { return nil, NewArgError("name", "cannot be an empty string") } path := fmt.Sprintf("%s/%s", domainsBasePath, name) - req, err := s.client.NewRequest("DELETE", path, nil) + req, err := s.client.NewRequest(ctx, "DELETE", path, nil) if err != nil { return nil, err } @@ -184,7 +187,7 @@ func (d DomainRecordEditRequest) String() string { } // Records returns a slice of DomainRecords for a domain -func (s *DomainsServiceOp) Records(domain string, opt *ListOptions) ([]DomainRecord, *Response, error) { +func (s *DomainsServiceOp) Records(ctx context.Context, domain string, opt *ListOptions) ([]DomainRecord, *Response, error) { if len(domain) < 1 { return nil, nil, NewArgError("domain", "cannot be an empty string") } @@ -195,7 +198,7 @@ func (s *DomainsServiceOp) Records(domain string, opt *ListOptions) ([]DomainRec return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -213,7 +216,7 @@ func (s *DomainsServiceOp) Records(domain string, opt *ListOptions) ([]DomainRec } // Record returns the record id from a domain -func (s *DomainsServiceOp) Record(domain string, id int) (*DomainRecord, *Response, error) { +func (s *DomainsServiceOp) Record(ctx context.Context, domain string, id int) (*DomainRecord, *Response, error) { if len(domain) < 1 { return nil, nil, NewArgError("domain", "cannot be an empty string") } @@ -224,7 +227,7 @@ func (s *DomainsServiceOp) Record(domain string, id int) (*DomainRecord, *Respon path := fmt.Sprintf("%s/%s/records/%d", domainsBasePath, domain, id) - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -239,7 +242,7 @@ func (s *DomainsServiceOp) Record(domain string, id int) (*DomainRecord, *Respon } // DeleteRecord deletes a record from a domain identified by id -func (s *DomainsServiceOp) DeleteRecord(domain string, id int) (*Response, error) { +func (s *DomainsServiceOp) DeleteRecord(ctx context.Context, domain string, id int) (*Response, error) { if len(domain) < 1 { return nil, NewArgError("domain", "cannot be an empty string") } @@ -250,7 +253,7 @@ func (s *DomainsServiceOp) DeleteRecord(domain string, id int) (*Response, error path := fmt.Sprintf("%s/%s/records/%d", domainsBasePath, domain, id) - req, err := s.client.NewRequest("DELETE", path, nil) + req, err := s.client.NewRequest(ctx, "DELETE", path, nil) if err != nil { return nil, err } @@ -261,7 +264,7 @@ func (s *DomainsServiceOp) DeleteRecord(domain string, id int) (*Response, error } // EditRecord edits a record using a DomainRecordEditRequest -func (s *DomainsServiceOp) EditRecord( +func (s *DomainsServiceOp) EditRecord(ctx context.Context, domain string, id int, editRequest *DomainRecordEditRequest, @@ -280,7 +283,7 @@ func (s *DomainsServiceOp) EditRecord( path := fmt.Sprintf("%s/%s/records/%d", domainsBasePath, domain, id) - req, err := s.client.NewRequest("PUT", path, editRequest) + req, err := s.client.NewRequest(ctx, "PUT", path, editRequest) if err != nil { return nil, nil, err } @@ -295,7 +298,7 @@ func (s *DomainsServiceOp) EditRecord( } // CreateRecord creates a record using a DomainRecordEditRequest -func (s *DomainsServiceOp) CreateRecord( +func (s *DomainsServiceOp) CreateRecord(ctx context.Context, domain string, createRequest *DomainRecordEditRequest) (*DomainRecord, *Response, error) { if len(domain) < 1 { @@ -307,7 +310,7 @@ func (s *DomainsServiceOp) CreateRecord( } path := fmt.Sprintf("%s/%s/records", domainsBasePath, domain) - req, err := s.client.NewRequest("POST", path, createRequest) + req, err := s.client.NewRequest(ctx, "POST", path, createRequest) if err != nil { return nil, nil, err diff --git a/vendor/github.com/digitalocean/godo/droplet_actions.go b/vendor/github.com/digitalocean/godo/droplet_actions.go index 7012aee7f..cd8b94e2f 100644 --- a/vendor/github.com/digitalocean/godo/droplet_actions.go +++ b/vendor/github.com/digitalocean/godo/droplet_actions.go @@ -1,6 +1,7 @@ package godo import ( + "context" "fmt" "net/url" ) @@ -8,33 +9,42 @@ import ( // ActionRequest reprents DigitalOcean Action Request type ActionRequest map[string]interface{} -// DropletActionsService is an interface for interfacing with the droplet actions +// DropletActionsService is an interface for interfacing with the Droplet actions // endpoints of the DigitalOcean API // See: https://developers.digitalocean.com/documentation/v2#droplet-actions type DropletActionsService interface { - Shutdown(int) (*Action, *Response, error) - PowerOff(int) (*Action, *Response, error) - PowerOn(int) (*Action, *Response, error) - PowerCycle(int) (*Action, *Response, error) - Reboot(int) (*Action, *Response, error) - Restore(int, int) (*Action, *Response, error) - Resize(int, string, bool) (*Action, *Response, error) - Rename(int, string) (*Action, *Response, error) - Snapshot(int, string) (*Action, *Response, error) - EnableBackups(int) (*Action, *Response, error) - DisableBackups(int) (*Action, *Response, error) - PasswordReset(int) (*Action, *Response, error) - RebuildByImageID(int, int) (*Action, *Response, error) - RebuildByImageSlug(int, string) (*Action, *Response, error) - ChangeKernel(int, int) (*Action, *Response, error) - EnableIPv6(int) (*Action, *Response, error) - EnablePrivateNetworking(int) (*Action, *Response, error) - Upgrade(int) (*Action, *Response, error) - Get(int, int) (*Action, *Response, error) - GetByURI(string) (*Action, *Response, error) + Shutdown(context.Context, int) (*Action, *Response, error) + ShutdownByTag(context.Context, string) (*Action, *Response, error) + PowerOff(context.Context, int) (*Action, *Response, error) + PowerOffByTag(context.Context, string) (*Action, *Response, error) + PowerOn(context.Context, int) (*Action, *Response, error) + PowerOnByTag(context.Context, string) (*Action, *Response, error) + PowerCycle(context.Context, int) (*Action, *Response, error) + PowerCycleByTag(context.Context, string) (*Action, *Response, error) + Reboot(context.Context, int) (*Action, *Response, error) + Restore(context.Context, int, int) (*Action, *Response, error) + Resize(context.Context, int, string, bool) (*Action, *Response, error) + Rename(context.Context, int, string) (*Action, *Response, error) + Snapshot(context.Context, int, string) (*Action, *Response, error) + SnapshotByTag(context.Context, string, string) (*Action, *Response, error) + EnableBackups(context.Context, int) (*Action, *Response, error) + EnableBackupsByTag(context.Context, string) (*Action, *Response, error) + DisableBackups(context.Context, int) (*Action, *Response, error) + DisableBackupsByTag(context.Context, string) (*Action, *Response, error) + PasswordReset(context.Context, int) (*Action, *Response, error) + RebuildByImageID(context.Context, int, int) (*Action, *Response, error) + RebuildByImageSlug(context.Context, int, string) (*Action, *Response, error) + ChangeKernel(context.Context, int, int) (*Action, *Response, error) + EnableIPv6(context.Context, int) (*Action, *Response, error) + EnableIPv6ByTag(context.Context, string) (*Action, *Response, error) + EnablePrivateNetworking(context.Context, int) (*Action, *Response, error) + EnablePrivateNetworkingByTag(context.Context, string) (*Action, *Response, error) + Upgrade(context.Context, int) (*Action, *Response, error) + Get(context.Context, int, int) (*Action, *Response, error) + GetByURI(context.Context, string) (*Action, *Response, error) } -// DropletActionsServiceOp handles communication with the droplet action related +// DropletActionsServiceOp handles communication with the Droplet action related // methods of the DigitalOcean API. type DropletActionsServiceOp struct { client *Client @@ -43,131 +53,189 @@ type DropletActionsServiceOp struct { var _ DropletActionsService = &DropletActionsServiceOp{} // Shutdown a Droplet -func (s *DropletActionsServiceOp) Shutdown(id int) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) Shutdown(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "shutdown"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) +} + +// ShutdownByTag shuts down Droplets matched by a Tag. +func (s *DropletActionsServiceOp) ShutdownByTag(ctx context.Context, tag string) (*Action, *Response, error) { + request := &ActionRequest{"type": "shutdown"} + return s.doActionByTag(ctx, tag, request) } // PowerOff a Droplet -func (s *DropletActionsServiceOp) PowerOff(id int) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) PowerOff(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "power_off"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) +} + +// PowerOffByTag powers off Droplets matched by a Tag. +func (s *DropletActionsServiceOp) PowerOffByTag(ctx context.Context, tag string) (*Action, *Response, error) { + request := &ActionRequest{"type": "power_off"} + return s.doActionByTag(ctx, tag, request) } // PowerOn a Droplet -func (s *DropletActionsServiceOp) PowerOn(id int) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) PowerOn(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "power_on"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) +} + +// PowerOnByTag powers on Droplets matched by a Tag. +func (s *DropletActionsServiceOp) PowerOnByTag(ctx context.Context, tag string) (*Action, *Response, error) { + request := &ActionRequest{"type": "power_on"} + return s.doActionByTag(ctx, tag, request) } // PowerCycle a Droplet -func (s *DropletActionsServiceOp) PowerCycle(id int) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) PowerCycle(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "power_cycle"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) +} + +// PowerCycleByTag power cycles Droplets matched by a Tag. +func (s *DropletActionsServiceOp) PowerCycleByTag(ctx context.Context, tag string) (*Action, *Response, error) { + request := &ActionRequest{"type": "power_cycle"} + return s.doActionByTag(ctx, tag, request) } // Reboot a Droplet -func (s *DropletActionsServiceOp) Reboot(id int) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) Reboot(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "reboot"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) } // Restore an image to a Droplet -func (s *DropletActionsServiceOp) Restore(id, imageID int) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) Restore(ctx context.Context, id, imageID int) (*Action, *Response, error) { requestType := "restore" request := &ActionRequest{ "type": requestType, "image": float64(imageID), } - return s.doAction(id, request) + return s.doAction(ctx, id, request) } // Resize a Droplet -func (s *DropletActionsServiceOp) Resize(id int, sizeSlug string, resizeDisk bool) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) Resize(ctx context.Context, id int, sizeSlug string, resizeDisk bool) (*Action, *Response, error) { requestType := "resize" request := &ActionRequest{ "type": requestType, "size": sizeSlug, "disk": resizeDisk, } - return s.doAction(id, request) + return s.doAction(ctx, id, request) } // Rename a Droplet -func (s *DropletActionsServiceOp) Rename(id int, name string) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) Rename(ctx context.Context, id int, name string) (*Action, *Response, error) { requestType := "rename" request := &ActionRequest{ "type": requestType, "name": name, } - return s.doAction(id, request) + return s.doAction(ctx, id, request) } // Snapshot a Droplet. -func (s *DropletActionsServiceOp) Snapshot(id int, name string) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) Snapshot(ctx context.Context, id int, name string) (*Action, *Response, error) { requestType := "snapshot" request := &ActionRequest{ "type": requestType, "name": name, } - return s.doAction(id, request) + return s.doAction(ctx, id, request) } -// EnableBackups enables backups for a droplet. -func (s *DropletActionsServiceOp) EnableBackups(id int) (*Action, *Response, error) { +// SnapshotByTag snapshots Droplets matched by a Tag. +func (s *DropletActionsServiceOp) SnapshotByTag(ctx context.Context, tag string, name string) (*Action, *Response, error) { + requestType := "snapshot" + request := &ActionRequest{ + "type": requestType, + "name": name, + } + return s.doActionByTag(ctx, tag, request) +} + +// EnableBackups enables backups for a Droplet. +func (s *DropletActionsServiceOp) EnableBackups(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "enable_backups"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) } -// DisableBackups disables backups for a droplet. -func (s *DropletActionsServiceOp) DisableBackups(id int) (*Action, *Response, error) { +// EnableBackupsByTag enables backups for Droplets matched by a Tag. +func (s *DropletActionsServiceOp) EnableBackupsByTag(ctx context.Context, tag string) (*Action, *Response, error) { + request := &ActionRequest{"type": "enable_backups"} + return s.doActionByTag(ctx, tag, request) +} + +// DisableBackups disables backups for a Droplet. +func (s *DropletActionsServiceOp) DisableBackups(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "disable_backups"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) } -// PasswordReset resets the password for a droplet. -func (s *DropletActionsServiceOp) PasswordReset(id int) (*Action, *Response, error) { +// DisableBackupsByTag disables backups for Droplet matched by a Tag. +func (s *DropletActionsServiceOp) DisableBackupsByTag(ctx context.Context, tag string) (*Action, *Response, error) { + request := &ActionRequest{"type": "disable_backups"} + return s.doActionByTag(ctx, tag, request) +} + +// PasswordReset resets the password for a Droplet. +func (s *DropletActionsServiceOp) PasswordReset(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "password_reset"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) } -// RebuildByImageID rebuilds a droplet droplet from an image with a given id. -func (s *DropletActionsServiceOp) RebuildByImageID(id, imageID int) (*Action, *Response, error) { +// RebuildByImageID rebuilds a Droplet from an image with a given id. +func (s *DropletActionsServiceOp) RebuildByImageID(ctx context.Context, id, imageID int) (*Action, *Response, error) { request := &ActionRequest{"type": "rebuild", "image": imageID} - return s.doAction(id, request) + return s.doAction(ctx, id, request) } -// RebuildByImageSlug rebuilds a droplet from an image with a given slug. -func (s *DropletActionsServiceOp) RebuildByImageSlug(id int, slug string) (*Action, *Response, error) { +// RebuildByImageSlug rebuilds a Droplet from an Image matched by a given Slug. +func (s *DropletActionsServiceOp) RebuildByImageSlug(ctx context.Context, id int, slug string) (*Action, *Response, error) { request := &ActionRequest{"type": "rebuild", "image": slug} - return s.doAction(id, request) + return s.doAction(ctx, id, request) } -// ChangeKernel changes the kernel for a droplet. -func (s *DropletActionsServiceOp) ChangeKernel(id, kernelID int) (*Action, *Response, error) { +// ChangeKernel changes the kernel for a Droplet. +func (s *DropletActionsServiceOp) ChangeKernel(ctx context.Context, id, kernelID int) (*Action, *Response, error) { request := &ActionRequest{"type": "change_kernel", "kernel": kernelID} - return s.doAction(id, request) + return s.doAction(ctx, id, request) } -// EnableIPv6 enables IPv6 for a droplet. -func (s *DropletActionsServiceOp) EnableIPv6(id int) (*Action, *Response, error) { +// EnableIPv6 enables IPv6 for a Droplet. +func (s *DropletActionsServiceOp) EnableIPv6(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "enable_ipv6"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) } -// EnablePrivateNetworking enables private networking for a droplet. -func (s *DropletActionsServiceOp) EnablePrivateNetworking(id int) (*Action, *Response, error) { +// EnableIPv6ByTag enables IPv6 for Droplets matched by a Tag. +func (s *DropletActionsServiceOp) EnableIPv6ByTag(ctx context.Context, tag string) (*Action, *Response, error) { + request := &ActionRequest{"type": "enable_ipv6"} + return s.doActionByTag(ctx, tag, request) +} + +// EnablePrivateNetworking enables private networking for a Droplet. +func (s *DropletActionsServiceOp) EnablePrivateNetworking(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "enable_private_networking"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) } -// Upgrade a droplet. -func (s *DropletActionsServiceOp) Upgrade(id int) (*Action, *Response, error) { +// EnablePrivateNetworkingByTag enables private networking for Droplets matched by a Tag. +func (s *DropletActionsServiceOp) EnablePrivateNetworkingByTag(ctx context.Context, tag string) (*Action, *Response, error) { + request := &ActionRequest{"type": "enable_private_networking"} + return s.doActionByTag(ctx, tag, request) +} + +// Upgrade a Droplet. +func (s *DropletActionsServiceOp) Upgrade(ctx context.Context, id int) (*Action, *Response, error) { request := &ActionRequest{"type": "upgrade"} - return s.doAction(id, request) + return s.doAction(ctx, id, request) } -func (s *DropletActionsServiceOp) doAction(id int, request *ActionRequest) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) doAction(ctx context.Context, id int, request *ActionRequest) (*Action, *Response, error) { if id < 1 { return nil, nil, NewArgError("id", "cannot be less than 1") } @@ -178,7 +246,7 @@ func (s *DropletActionsServiceOp) doAction(id int, request *ActionRequest) (*Act path := dropletActionPath(id) - req, err := s.client.NewRequest("POST", path, request) + req, err := s.client.NewRequest(ctx, "POST", path, request) if err != nil { return nil, nil, err } @@ -189,11 +257,36 @@ func (s *DropletActionsServiceOp) doAction(id int, request *ActionRequest) (*Act return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } -// Get an action for a particular droplet by id. -func (s *DropletActionsServiceOp) Get(dropletID, actionID int) (*Action, *Response, error) { +func (s *DropletActionsServiceOp) doActionByTag(ctx context.Context, tag string, request *ActionRequest) (*Action, *Response, error) { + if tag == "" { + return nil, nil, NewArgError("tag", "cannot be empty") + } + + if request == nil { + return nil, nil, NewArgError("request", "request can't be nil") + } + + path := dropletActionPathByTag(tag) + + req, err := s.client.NewRequest(ctx, "POST", path, request) + if err != nil { + return nil, nil, err + } + + root := new(actionRoot) + resp, err := s.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Event, resp, err +} + +// Get an action for a particular Droplet by id. +func (s *DropletActionsServiceOp) Get(ctx context.Context, dropletID, actionID int) (*Action, *Response, error) { if dropletID < 1 { return nil, nil, NewArgError("dropletID", "cannot be less than 1") } @@ -203,22 +296,22 @@ func (s *DropletActionsServiceOp) Get(dropletID, actionID int) (*Action, *Respon } path := fmt.Sprintf("%s/%d", dropletActionPath(dropletID), actionID) - return s.get(path) + return s.get(ctx, path) } -// GetByURI gets an action for a particular droplet by id. -func (s *DropletActionsServiceOp) GetByURI(rawurl string) (*Action, *Response, error) { +// GetByURI gets an action for a particular Droplet by id. +func (s *DropletActionsServiceOp) GetByURI(ctx context.Context, rawurl string) (*Action, *Response, error) { u, err := url.Parse(rawurl) if err != nil { return nil, nil, err } - return s.get(u.Path) + return s.get(ctx, u.Path) } -func (s *DropletActionsServiceOp) get(path string) (*Action, *Response, error) { - req, err := s.client.NewRequest("GET", path, nil) +func (s *DropletActionsServiceOp) get(ctx context.Context, path string) (*Action, *Response, error) { + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -229,10 +322,14 @@ func (s *DropletActionsServiceOp) get(path string) (*Action, *Response, error) { return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } func dropletActionPath(dropletID int) string { return fmt.Sprintf("v2/droplets/%d/actions", dropletID) } + +func dropletActionPathByTag(tag string) string { + return fmt.Sprintf("v2/droplets/actions?tag_name=%s", tag) +} diff --git a/vendor/github.com/digitalocean/godo/droplets.go b/vendor/github.com/digitalocean/godo/droplets.go index 5ba7c27d4..b145d9805 100644 --- a/vendor/github.com/digitalocean/godo/droplets.go +++ b/vendor/github.com/digitalocean/godo/droplets.go @@ -1,6 +1,7 @@ package godo import ( + "context" "encoding/json" "errors" "fmt" @@ -10,23 +11,25 @@ const dropletBasePath = "v2/droplets" var errNoNetworks = errors.New("no networks have been defined") -// DropletsService is an interface for interfacing with the droplet +// DropletsService is an interface for interfacing with the Droplet // endpoints of the DigitalOcean API // See: https://developers.digitalocean.com/documentation/v2#droplets type DropletsService interface { - List(*ListOptions) ([]Droplet, *Response, error) - Get(int) (*Droplet, *Response, error) - Create(*DropletCreateRequest) (*Droplet, *Response, error) - CreateMultiple(*DropletMultiCreateRequest) ([]Droplet, *Response, error) - Delete(int) (*Response, error) - Kernels(int, *ListOptions) ([]Kernel, *Response, error) - Snapshots(int, *ListOptions) ([]Image, *Response, error) - Backups(int, *ListOptions) ([]Image, *Response, error) - Actions(int, *ListOptions) ([]Action, *Response, error) - Neighbors(int) ([]Droplet, *Response, error) + List(context.Context, *ListOptions) ([]Droplet, *Response, error) + ListByTag(context.Context, string, *ListOptions) ([]Droplet, *Response, error) + Get(context.Context, int) (*Droplet, *Response, error) + Create(context.Context, *DropletCreateRequest) (*Droplet, *Response, error) + CreateMultiple(context.Context, *DropletMultiCreateRequest) ([]Droplet, *Response, error) + Delete(context.Context, int) (*Response, error) + DeleteByTag(context.Context, string) (*Response, error) + Kernels(context.Context, int, *ListOptions) ([]Kernel, *Response, error) + Snapshots(context.Context, int, *ListOptions) ([]Image, *Response, error) + Backups(context.Context, int, *ListOptions) ([]Image, *Response, error) + Actions(context.Context, int, *ListOptions) ([]Action, *Response, error) + Neighbors(context.Context, int) ([]Droplet, *Response, error) } -// DropletsServiceOp handles communication with the droplet related methods of the +// DropletsServiceOp handles communication with the Droplet related methods of the // DigitalOcean API. type DropletsServiceOp struct { client *Client @@ -36,23 +39,26 @@ var _ DropletsService = &DropletsServiceOp{} // Droplet represents a DigitalOcean Droplet type Droplet struct { - ID int `json:"id,float64,omitempty"` - Name string `json:"name,omitempty"` - Memory int `json:"memory,omitempty"` - Vcpus int `json:"vcpus,omitempty"` - Disk int `json:"disk,omitempty"` - Region *Region `json:"region,omitempty"` - Image *Image `json:"image,omitempty"` - Size *Size `json:"size,omitempty"` - SizeSlug string `json:"size_slug,omitempty"` - BackupIDs []int `json:"backup_ids,omitempty"` - SnapshotIDs []int `json:"snapshot_ids,omitempty"` - Locked bool `json:"locked,bool,omitempty"` - Status string `json:"status,omitempty"` - Networks *Networks `json:"networks,omitempty"` - ActionIDs []int `json:"action_ids,omitempty"` - Created string `json:"created_at,omitempty"` - Kernel *Kernel `json:"kernel, omitempty"` + ID int `json:"id,float64,omitempty"` + Name string `json:"name,omitempty"` + Memory int `json:"memory,omitempty"` + Vcpus int `json:"vcpus,omitempty"` + Disk int `json:"disk,omitempty"` + Region *Region `json:"region,omitempty"` + Image *Image `json:"image,omitempty"` + Size *Size `json:"size,omitempty"` + SizeSlug string `json:"size_slug,omitempty"` + BackupIDs []int `json:"backup_ids,omitempty"` + NextBackupWindow *BackupWindow `json:"next_backup_window,omitempty"` + SnapshotIDs []int `json:"snapshot_ids,omitempty"` + Features []string `json:"features,omitempty"` + Locked bool `json:"locked,bool,omitempty"` + Status string `json:"status,omitempty"` + Networks *Networks `json:"networks,omitempty"` + Created string `json:"created_at,omitempty"` + Kernel *Kernel `json:"kernel,omitempty"` + Tags []string `json:"tags,omitempty"` + VolumeIDs []string `json:"volume_ids"` } // PublicIPv4 returns the public IPv4 address for the Droplet. @@ -85,15 +91,15 @@ func (d *Droplet) PrivateIPv4() (string, error) { return "", nil } -// PublicIPv6 returns the private IPv6 address for the Droplet. +// PublicIPv6 returns the public IPv6 address for the Droplet. func (d *Droplet) PublicIPv6() (string, error) { if d.Networks == nil { return "", errNoNetworks } - for _, v4 := range d.Networks.V6 { - if v4.Type == "public" { - return v4.IPAddress, nil + for _, v6 := range d.Networks.V6 { + if v6.Type == "public" { + return v6.IPAddress, nil } } @@ -107,6 +113,12 @@ type Kernel struct { Version string `json:"version,omitempty"` } +// BackupWindow object +type BackupWindow struct { + Start *Timestamp `json:"start,omitempty"` + End *Timestamp `json:"end,omitempty"` +} + // Convert Droplet to a string func (d Droplet) String() string { return Stringify(d) @@ -128,7 +140,7 @@ type kernelsRoot struct { Links *Links `json:"links"` } -type snapshotsRoot struct { +type dropletSnapshotsRoot struct { Snapshots []Image `json:"snapshots,omitempty"` Links *Links `json:"links"` } @@ -154,6 +166,27 @@ func (d DropletCreateImage) MarshalJSON() ([]byte, error) { return json.Marshal(d.ID) } +// DropletCreateVolume identifies a volume to attach for the create request. It +// prefers Name over ID, +type DropletCreateVolume struct { + ID string + Name string +} + +// MarshalJSON returns an object with either the name or id of the volume. It +// returns the id if the name is empty. +func (d DropletCreateVolume) MarshalJSON() ([]byte, error) { + if d.Name != "" { + return json.Marshal(struct { + Name string `json:"name"` + }{Name: d.Name}) + } + + return json.Marshal(struct { + ID string `json:"id"` + }{ID: d.ID}) +} + // DropletCreateSSHKey identifies a SSH Key for the create request. It prefers fingerprint over ID. type DropletCreateSSHKey struct { ID int @@ -170,7 +203,7 @@ func (d DropletCreateSSHKey) MarshalJSON() ([]byte, error) { return json.Marshal(d.ID) } -// DropletCreateRequest represents a request to create a droplet. +// DropletCreateRequest represents a request to create a Droplet. type DropletCreateRequest struct { Name string `json:"name"` Region string `json:"region"` @@ -180,10 +213,13 @@ type DropletCreateRequest struct { Backups bool `json:"backups"` IPv6 bool `json:"ipv6"` PrivateNetworking bool `json:"private_networking"` + Monitoring bool `json:"monitoring"` UserData string `json:"user_data,omitempty"` + Volumes []DropletCreateVolume `json:"volumes,omitempty"` + Tags []string `json:"tags"` } -// DropletMultiCreateRequest is a request to create multiple droplets. +// DropletMultiCreateRequest is a request to create multiple Droplets. type DropletMultiCreateRequest struct { Names []string `json:"names"` Region string `json:"region"` @@ -193,7 +229,9 @@ type DropletMultiCreateRequest struct { Backups bool `json:"backups"` IPv6 bool `json:"ipv6"` PrivateNetworking bool `json:"private_networking"` + Monitoring bool `json:"monitoring"` UserData string `json:"user_data,omitempty"` + Tags []string `json:"tags"` } func (d DropletCreateRequest) String() string { @@ -204,13 +242,13 @@ func (d DropletMultiCreateRequest) String() string { return Stringify(d) } -// Networks represents the droplet's networks +// Networks represents the Droplet's Networks. type Networks struct { V4 []NetworkV4 `json:"v4,omitempty"` V6 []NetworkV6 `json:"v6,omitempty"` } -// NetworkV4 represents a DigitalOcean IPv4 Network +// NetworkV4 represents a DigitalOcean IPv4 Network. type NetworkV4 struct { IPAddress string `json:"ip_address,omitempty"` Netmask string `json:"netmask,omitempty"` @@ -234,40 +272,56 @@ func (n NetworkV6) String() string { return Stringify(n) } -// List all droplets -func (s *DropletsServiceOp) List(opt *ListOptions) ([]Droplet, *Response, error) { +// Performs a list request given a path. +func (s *DropletsServiceOp) list(ctx context.Context, path string) ([]Droplet, *Response, error) { + req, err := s.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(dropletsRoot) + resp, err := s.client.Do(req, root) + if err != nil { + return nil, resp, err + } + if l := root.Links; l != nil { + resp.Links = l + } + + return root.Droplets, resp, err +} + +// List all Droplets. +func (s *DropletsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Droplet, *Response, error) { path := dropletBasePath path, err := addOptions(path, opt) if err != nil { return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + return s.list(ctx, path) +} + +// ListByTag lists all Droplets matched by a Tag. +func (s *DropletsServiceOp) ListByTag(ctx context.Context, tag string, opt *ListOptions) ([]Droplet, *Response, error) { + path := fmt.Sprintf("%s?tag_name=%s", dropletBasePath, tag) + path, err := addOptions(path, opt) if err != nil { return nil, nil, err } - root := new(dropletsRoot) - resp, err := s.client.Do(req, root) - if err != nil { - return nil, resp, err - } - if l := root.Links; l != nil { - resp.Links = l - } - - return root.Droplets, resp, err + return s.list(ctx, path) } -// Get individual droplet -func (s *DropletsServiceOp) Get(dropletID int) (*Droplet, *Response, error) { +// Get individual Droplet. +func (s *DropletsServiceOp) Get(ctx context.Context, dropletID int) (*Droplet, *Response, error) { if dropletID < 1 { return nil, nil, NewArgError("dropletID", "cannot be less than 1") } path := fmt.Sprintf("%s/%d", dropletBasePath, dropletID) - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -281,15 +335,15 @@ func (s *DropletsServiceOp) Get(dropletID int) (*Droplet, *Response, error) { return root.Droplet, resp, err } -// Create droplet -func (s *DropletsServiceOp) Create(createRequest *DropletCreateRequest) (*Droplet, *Response, error) { +// Create Droplet +func (s *DropletsServiceOp) Create(ctx context.Context, createRequest *DropletCreateRequest) (*Droplet, *Response, error) { if createRequest == nil { return nil, nil, NewArgError("createRequest", "cannot be nil") } path := dropletBasePath - req, err := s.client.NewRequest("POST", path, createRequest) + req, err := s.client.NewRequest(ctx, "POST", path, createRequest) if err != nil { return nil, nil, err } @@ -306,15 +360,15 @@ func (s *DropletsServiceOp) Create(createRequest *DropletCreateRequest) (*Drople return root.Droplet, resp, err } -// CreateMultiple creates multiple droplets. -func (s *DropletsServiceOp) CreateMultiple(createRequest *DropletMultiCreateRequest) ([]Droplet, *Response, error) { +// CreateMultiple creates multiple Droplets. +func (s *DropletsServiceOp) CreateMultiple(ctx context.Context, createRequest *DropletMultiCreateRequest) ([]Droplet, *Response, error) { if createRequest == nil { return nil, nil, NewArgError("createRequest", "cannot be nil") } path := dropletBasePath - req, err := s.client.NewRequest("POST", path, createRequest) + req, err := s.client.NewRequest(ctx, "POST", path, createRequest) if err != nil { return nil, nil, err } @@ -331,15 +385,9 @@ func (s *DropletsServiceOp) CreateMultiple(createRequest *DropletMultiCreateRequ return root.Droplets, resp, err } -// Delete droplet -func (s *DropletsServiceOp) Delete(dropletID int) (*Response, error) { - if dropletID < 1 { - return nil, NewArgError("dropletID", "cannot be less than 1") - } - - path := fmt.Sprintf("%s/%d", dropletBasePath, dropletID) - - req, err := s.client.NewRequest("DELETE", path, nil) +// Performs a delete request given a path +func (s *DropletsServiceOp) delete(ctx context.Context, path string) (*Response, error) { + req, err := s.client.NewRequest(ctx, "DELETE", path, nil) if err != nil { return nil, err } @@ -349,8 +397,30 @@ func (s *DropletsServiceOp) Delete(dropletID int) (*Response, error) { return resp, err } -// Kernels lists kernels available for a droplet. -func (s *DropletsServiceOp) Kernels(dropletID int, opt *ListOptions) ([]Kernel, *Response, error) { +// Delete Droplet. +func (s *DropletsServiceOp) Delete(ctx context.Context, dropletID int) (*Response, error) { + if dropletID < 1 { + return nil, NewArgError("dropletID", "cannot be less than 1") + } + + path := fmt.Sprintf("%s/%d", dropletBasePath, dropletID) + + return s.delete(ctx, path) +} + +// DeleteByTag deletes Droplets matched by a Tag. +func (s *DropletsServiceOp) DeleteByTag(ctx context.Context, tag string) (*Response, error) { + if tag == "" { + return nil, NewArgError("tag", "cannot be empty") + } + + path := fmt.Sprintf("%s?tag_name=%s", dropletBasePath, tag) + + return s.delete(ctx, path) +} + +// Kernels lists kernels available for a Droplet. +func (s *DropletsServiceOp) Kernels(ctx context.Context, dropletID int, opt *ListOptions) ([]Kernel, *Response, error) { if dropletID < 1 { return nil, nil, NewArgError("dropletID", "cannot be less than 1") } @@ -361,7 +431,7 @@ func (s *DropletsServiceOp) Kernels(dropletID int, opt *ListOptions) ([]Kernel, return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -375,8 +445,8 @@ func (s *DropletsServiceOp) Kernels(dropletID int, opt *ListOptions) ([]Kernel, return root.Kernels, resp, err } -// Actions lists the actions for a droplet. -func (s *DropletsServiceOp) Actions(dropletID int, opt *ListOptions) ([]Action, *Response, error) { +// Actions lists the actions for a Droplet. +func (s *DropletsServiceOp) Actions(ctx context.Context, dropletID int, opt *ListOptions) ([]Action, *Response, error) { if dropletID < 1 { return nil, nil, NewArgError("dropletID", "cannot be less than 1") } @@ -387,7 +457,7 @@ func (s *DropletsServiceOp) Actions(dropletID int, opt *ListOptions) ([]Action, return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -404,8 +474,8 @@ func (s *DropletsServiceOp) Actions(dropletID int, opt *ListOptions) ([]Action, return root.Actions, resp, err } -// Backups lists the backups for a droplet. -func (s *DropletsServiceOp) Backups(dropletID int, opt *ListOptions) ([]Image, *Response, error) { +// Backups lists the backups for a Droplet. +func (s *DropletsServiceOp) Backups(ctx context.Context, dropletID int, opt *ListOptions) ([]Image, *Response, error) { if dropletID < 1 { return nil, nil, NewArgError("dropletID", "cannot be less than 1") } @@ -416,7 +486,7 @@ func (s *DropletsServiceOp) Backups(dropletID int, opt *ListOptions) ([]Image, * return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -433,8 +503,8 @@ func (s *DropletsServiceOp) Backups(dropletID int, opt *ListOptions) ([]Image, * return root.Backups, resp, err } -// Snapshots lists the snapshots available for a droplet. -func (s *DropletsServiceOp) Snapshots(dropletID int, opt *ListOptions) ([]Image, *Response, error) { +// Snapshots lists the snapshots available for a Droplet. +func (s *DropletsServiceOp) Snapshots(ctx context.Context, dropletID int, opt *ListOptions) ([]Image, *Response, error) { if dropletID < 1 { return nil, nil, NewArgError("dropletID", "cannot be less than 1") } @@ -445,12 +515,12 @@ func (s *DropletsServiceOp) Snapshots(dropletID int, opt *ListOptions) ([]Image, return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } - root := new(snapshotsRoot) + root := new(dropletSnapshotsRoot) resp, err := s.client.Do(req, root) if err != nil { return nil, resp, err @@ -462,15 +532,15 @@ func (s *DropletsServiceOp) Snapshots(dropletID int, opt *ListOptions) ([]Image, return root.Snapshots, resp, err } -// Neighbors lists the neighbors for a droplet. -func (s *DropletsServiceOp) Neighbors(dropletID int) ([]Droplet, *Response, error) { +// Neighbors lists the neighbors for a Droplet. +func (s *DropletsServiceOp) Neighbors(ctx context.Context, dropletID int) ([]Droplet, *Response, error) { if dropletID < 1 { return nil, nil, NewArgError("dropletID", "cannot be less than 1") } path := fmt.Sprintf("%s/%d/neighbors", dropletBasePath, dropletID) - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -484,8 +554,8 @@ func (s *DropletsServiceOp) Neighbors(dropletID int) ([]Droplet, *Response, erro return root.Droplets, resp, err } -func (s *DropletsServiceOp) dropletActionStatus(uri string) (string, error) { - action, _, err := s.client.DropletActions.GetByURI(uri) +func (s *DropletsServiceOp) dropletActionStatus(ctx context.Context, uri string) (string, error) { + action, _, err := s.client.DropletActions.GetByURI(ctx, uri) if err != nil { return "", err diff --git a/vendor/github.com/digitalocean/godo/floating_ips.go b/vendor/github.com/digitalocean/godo/floating_ips.go index bad04b96c..13e983261 100644 --- a/vendor/github.com/digitalocean/godo/floating_ips.go +++ b/vendor/github.com/digitalocean/godo/floating_ips.go @@ -1,6 +1,9 @@ package godo -import "fmt" +import ( + "context" + "fmt" +) const floatingBasePath = "v2/floating_ips" @@ -8,10 +11,10 @@ const floatingBasePath = "v2/floating_ips" // endpoints of the Digital Ocean API. // See: https://developers.digitalocean.com/documentation/v2#floating-ips type FloatingIPsService interface { - List(*ListOptions) ([]FloatingIP, *Response, error) - Get(string) (*FloatingIP, *Response, error) - Create(*FloatingIPCreateRequest) (*FloatingIP, *Response, error) - Delete(string) (*Response, error) + List(context.Context, *ListOptions) ([]FloatingIP, *Response, error) + Get(context.Context, string) (*FloatingIP, *Response, error) + Create(context.Context, *FloatingIPCreateRequest) (*FloatingIP, *Response, error) + Delete(context.Context, string) (*Response, error) } // FloatingIPsServiceOp handles communication with the floating IPs related methods of the @@ -52,14 +55,14 @@ type FloatingIPCreateRequest struct { } // List all floating IPs. -func (f *FloatingIPsServiceOp) List(opt *ListOptions) ([]FloatingIP, *Response, error) { +func (f *FloatingIPsServiceOp) List(ctx context.Context, opt *ListOptions) ([]FloatingIP, *Response, error) { path := floatingBasePath path, err := addOptions(path, opt) if err != nil { return nil, nil, err } - req, err := f.client.NewRequest("GET", path, nil) + req, err := f.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -77,10 +80,10 @@ func (f *FloatingIPsServiceOp) List(opt *ListOptions) ([]FloatingIP, *Response, } // Get an individual floating IP. -func (f *FloatingIPsServiceOp) Get(ip string) (*FloatingIP, *Response, error) { +func (f *FloatingIPsServiceOp) Get(ctx context.Context, ip string) (*FloatingIP, *Response, error) { path := fmt.Sprintf("%s/%s", floatingBasePath, ip) - req, err := f.client.NewRequest("GET", path, nil) + req, err := f.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -96,10 +99,10 @@ func (f *FloatingIPsServiceOp) Get(ip string) (*FloatingIP, *Response, error) { // Create a floating IP. If the DropletID field of the request is not empty, // the floating IP will also be assigned to the droplet. -func (f *FloatingIPsServiceOp) Create(createRequest *FloatingIPCreateRequest) (*FloatingIP, *Response, error) { +func (f *FloatingIPsServiceOp) Create(ctx context.Context, createRequest *FloatingIPCreateRequest) (*FloatingIP, *Response, error) { path := floatingBasePath - req, err := f.client.NewRequest("POST", path, createRequest) + req, err := f.client.NewRequest(ctx, "POST", path, createRequest) if err != nil { return nil, nil, err } @@ -117,10 +120,10 @@ func (f *FloatingIPsServiceOp) Create(createRequest *FloatingIPCreateRequest) (* } // Delete a floating IP. -func (f *FloatingIPsServiceOp) Delete(ip string) (*Response, error) { +func (f *FloatingIPsServiceOp) Delete(ctx context.Context, ip string) (*Response, error) { path := fmt.Sprintf("%s/%s", floatingBasePath, ip) - req, err := f.client.NewRequest("DELETE", path, nil) + req, err := f.client.NewRequest(ctx, "DELETE", path, nil) if err != nil { return nil, err } diff --git a/vendor/github.com/digitalocean/godo/floating_ips_actions.go b/vendor/github.com/digitalocean/godo/floating_ips_actions.go index f435384eb..5afa051d7 100644 --- a/vendor/github.com/digitalocean/godo/floating_ips_actions.go +++ b/vendor/github.com/digitalocean/godo/floating_ips_actions.go @@ -1,15 +1,18 @@ package godo -import "fmt" +import ( + "context" + "fmt" +) // FloatingIPActionsService is an interface for interfacing with the // floating IPs actions endpoints of the Digital Ocean API. // See: https://developers.digitalocean.com/documentation/v2#floating-ips-action type FloatingIPActionsService interface { - Assign(ip string, dropletID int) (*Action, *Response, error) - Unassign(ip string) (*Action, *Response, error) - Get(ip string, actionID int) (*Action, *Response, error) - List(ip string, opt *ListOptions) ([]Action, *Response, error) + Assign(ctx context.Context, ip string, dropletID int) (*Action, *Response, error) + Unassign(ctx context.Context, ip string) (*Action, *Response, error) + Get(ctx context.Context, ip string, actionID int) (*Action, *Response, error) + List(ctx context.Context, ip string, opt *ListOptions) ([]Action, *Response, error) } // FloatingIPActionsServiceOp handles communication with the floating IPs @@ -19,41 +22,41 @@ type FloatingIPActionsServiceOp struct { } // Assign a floating IP to a droplet. -func (s *FloatingIPActionsServiceOp) Assign(ip string, dropletID int) (*Action, *Response, error) { +func (s *FloatingIPActionsServiceOp) Assign(ctx context.Context, ip string, dropletID int) (*Action, *Response, error) { request := &ActionRequest{ "type": "assign", "droplet_id": dropletID, } - return s.doAction(ip, request) + return s.doAction(ctx, ip, request) } // Unassign a floating IP from the droplet it is currently assigned to. -func (s *FloatingIPActionsServiceOp) Unassign(ip string) (*Action, *Response, error) { +func (s *FloatingIPActionsServiceOp) Unassign(ctx context.Context, ip string) (*Action, *Response, error) { request := &ActionRequest{"type": "unassign"} - return s.doAction(ip, request) + return s.doAction(ctx, ip, request) } // Get an action for a particular floating IP by id. -func (s *FloatingIPActionsServiceOp) Get(ip string, actionID int) (*Action, *Response, error) { +func (s *FloatingIPActionsServiceOp) Get(ctx context.Context, ip string, actionID int) (*Action, *Response, error) { path := fmt.Sprintf("%s/%d", floatingIPActionPath(ip), actionID) - return s.get(path) + return s.get(ctx, path) } // List the actions for a particular floating IP. -func (s *FloatingIPActionsServiceOp) List(ip string, opt *ListOptions) ([]Action, *Response, error) { +func (s *FloatingIPActionsServiceOp) List(ctx context.Context, ip string, opt *ListOptions) ([]Action, *Response, error) { path := floatingIPActionPath(ip) path, err := addOptions(path, opt) if err != nil { return nil, nil, err } - return s.list(path) + return s.list(ctx, path) } -func (s *FloatingIPActionsServiceOp) doAction(ip string, request *ActionRequest) (*Action, *Response, error) { +func (s *FloatingIPActionsServiceOp) doAction(ctx context.Context, ip string, request *ActionRequest) (*Action, *Response, error) { path := floatingIPActionPath(ip) - req, err := s.client.NewRequest("POST", path, request) + req, err := s.client.NewRequest(ctx, "POST", path, request) if err != nil { return nil, nil, err } @@ -64,11 +67,11 @@ func (s *FloatingIPActionsServiceOp) doAction(ip string, request *ActionRequest) return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } -func (s *FloatingIPActionsServiceOp) get(path string) (*Action, *Response, error) { - req, err := s.client.NewRequest("GET", path, nil) +func (s *FloatingIPActionsServiceOp) get(ctx context.Context, path string) (*Action, *Response, error) { + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -79,11 +82,11 @@ func (s *FloatingIPActionsServiceOp) get(path string) (*Action, *Response, error return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } -func (s *FloatingIPActionsServiceOp) list(path string) ([]Action, *Response, error) { - req, err := s.client.NewRequest("GET", path, nil) +func (s *FloatingIPActionsServiceOp) list(ctx context.Context, path string) ([]Action, *Response, error) { + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/digitalocean/godo/godo.go b/vendor/github.com/digitalocean/godo/godo.go index 47d61391f..0f9d7a91b 100644 --- a/vendor/github.com/digitalocean/godo/godo.go +++ b/vendor/github.com/digitalocean/godo/godo.go @@ -2,6 +2,7 @@ package godo import ( "bytes" + "context" "encoding/json" "fmt" "io" @@ -17,7 +18,7 @@ import ( ) const ( - libraryVersion = "0.1.0" + libraryVersion = "1.0.0" defaultBaseURL = "https://api.digitalocean.com/" userAgent = "godo/" + libraryVersion mediaType = "application/json" @@ -55,6 +56,12 @@ type Client struct { Sizes SizesService FloatingIPs FloatingIPsService FloatingIPActions FloatingIPActionsService + Snapshots SnapshotsService + Storage StorageService + StorageActions StorageActionsService + Tags TagsService + LoadBalancers LoadBalancersService + Certificates CertificatesService // Optional function called after every successful request made to the DO APIs onRequestCompleted RequestCompletionCallback @@ -93,7 +100,10 @@ type ErrorResponse struct { Response *http.Response // Error message - Message string + Message string `json:"message"` + + // RequestID returned from the API, useful to contact support. + RequestID string `json:"request_id"` } // Rate contains the rate limit for the current client. @@ -149,21 +159,63 @@ func NewClient(httpClient *http.Client) *Client { c.Domains = &DomainsServiceOp{client: c} c.Droplets = &DropletsServiceOp{client: c} c.DropletActions = &DropletActionsServiceOp{client: c} + c.FloatingIPs = &FloatingIPsServiceOp{client: c} + c.FloatingIPActions = &FloatingIPActionsServiceOp{client: c} c.Images = &ImagesServiceOp{client: c} c.ImageActions = &ImageActionsServiceOp{client: c} c.Keys = &KeysServiceOp{client: c} c.Regions = &RegionsServiceOp{client: c} + c.Snapshots = &SnapshotsServiceOp{client: c} c.Sizes = &SizesServiceOp{client: c} - c.FloatingIPs = &FloatingIPsServiceOp{client: c} - c.FloatingIPActions = &FloatingIPActionsServiceOp{client: c} + c.Storage = &StorageServiceOp{client: c} + c.StorageActions = &StorageActionsServiceOp{client: c} + c.Tags = &TagsServiceOp{client: c} + c.LoadBalancers = &LoadBalancersServiceOp{client: c} + c.Certificates = &CertificatesServiceOp{client: c} return c } +// ClientOpt are options for New. +type ClientOpt func(*Client) error + +// New returns a new DIgitalOcean API client instance. +func New(httpClient *http.Client, opts ...ClientOpt) (*Client, error) { + c := NewClient(httpClient) + for _, opt := range opts { + if err := opt(c); err != nil { + return nil, err + } + } + + return c, nil +} + +// SetBaseURL is a client option for setting the base URL. +func SetBaseURL(bu string) ClientOpt { + return func(c *Client) error { + u, err := url.Parse(bu) + if err != nil { + return err + } + + c.BaseURL = u + return nil + } +} + +// SetUserAgent is a client option for setting the user agent. +func SetUserAgent(ua string) ClientOpt { + return func(c *Client) error { + c.UserAgent = fmt.Sprintf("%s+%s", ua, c.UserAgent) + return nil + } +} + // NewRequest creates an API request. A relative URL can be provided in urlStr, which will be resolved to the // BaseURL of the Client. Relative URLS should always be specified without a preceding slash. If specified, the // value pointed to by body is JSON encoded and included in as the request body. -func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error) { +func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error) { rel, err := url.Parse(urlStr) if err != nil { return nil, err @@ -173,7 +225,7 @@ func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Requ buf := new(bytes.Buffer) if body != nil { - err := json.NewEncoder(buf).Encode(body) + err = json.NewEncoder(buf).Encode(body) if err != nil { return nil, err } @@ -184,9 +236,10 @@ func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Requ return nil, err } + req = req.WithContext(ctx) req.Header.Add("Content-Type", mediaType) req.Header.Add("Accept", mediaType) - req.Header.Add("User-Agent", userAgent) + req.Header.Add("User-Agent", c.UserAgent) return req, nil } @@ -265,12 +318,12 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) { if v != nil { if w, ok := v.(io.Writer); ok { - _, err := io.Copy(w, resp.Body) + _, err = io.Copy(w, resp.Body) if err != nil { return nil, err } } else { - err := json.NewDecoder(resp.Body).Decode(v) + err = json.NewDecoder(resp.Body).Decode(v) if err != nil { return nil, err } @@ -280,6 +333,10 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) { return response, err } func (r *ErrorResponse) Error() string { + if r.RequestID != "" { + return fmt.Sprintf("%v %v: %d (request %q) %v", + r.Response.Request.Method, r.Response.Request.URL, r.Response.StatusCode, r.RequestID, r.Message) + } return fmt.Sprintf("%v %v: %d %v", r.Response.Request.Method, r.Response.Request.URL, r.Response.StatusCode, r.Message) } diff --git a/vendor/github.com/digitalocean/godo/image_actions.go b/vendor/github.com/digitalocean/godo/image_actions.go index 2d0538567..c4201c0de 100644 --- a/vendor/github.com/digitalocean/godo/image_actions.go +++ b/vendor/github.com/digitalocean/godo/image_actions.go @@ -1,13 +1,17 @@ package godo -import "fmt" +import ( + "context" + "fmt" +) // ImageActionsService is an interface for interfacing with the image actions // endpoints of the DigitalOcean API // See: https://developers.digitalocean.com/documentation/v2#image-actions type ImageActionsService interface { - Get(int, int) (*Action, *Response, error) - Transfer(int, *ActionRequest) (*Action, *Response, error) + Get(context.Context, int, int) (*Action, *Response, error) + Transfer(context.Context, int, *ActionRequest) (*Action, *Response, error) + Convert(context.Context, int) (*Action, *Response, error) } // ImageActionsServiceOp handles communition with the image action related methods of the @@ -19,7 +23,7 @@ type ImageActionsServiceOp struct { var _ ImageActionsService = &ImageActionsServiceOp{} // Transfer an image -func (i *ImageActionsServiceOp) Transfer(imageID int, transferRequest *ActionRequest) (*Action, *Response, error) { +func (i *ImageActionsServiceOp) Transfer(ctx context.Context, imageID int, transferRequest *ActionRequest) (*Action, *Response, error) { if imageID < 1 { return nil, nil, NewArgError("imageID", "cannot be less than 1") } @@ -30,7 +34,7 @@ func (i *ImageActionsServiceOp) Transfer(imageID int, transferRequest *ActionReq path := fmt.Sprintf("v2/images/%d/actions", imageID) - req, err := i.client.NewRequest("POST", path, transferRequest) + req, err := i.client.NewRequest(ctx, "POST", path, transferRequest) if err != nil { return nil, nil, err } @@ -41,11 +45,37 @@ func (i *ImageActionsServiceOp) Transfer(imageID int, transferRequest *ActionReq return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err +} + +// Convert an image to a snapshot +func (i *ImageActionsServiceOp) Convert(ctx context.Context, imageID int) (*Action, *Response, error) { + if imageID < 1 { + return nil, nil, NewArgError("imageID", "cannont be less than 1") + } + + path := fmt.Sprintf("v2/images/%d/actions", imageID) + + convertRequest := &ActionRequest{ + "type": "convert", + } + + req, err := i.client.NewRequest(ctx, "POST", path, convertRequest) + if err != nil { + return nil, nil, err + } + + root := new(actionRoot) + resp, err := i.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Event, resp, err } // Get an action for a particular image by id. -func (i *ImageActionsServiceOp) Get(imageID, actionID int) (*Action, *Response, error) { +func (i *ImageActionsServiceOp) Get(ctx context.Context, imageID, actionID int) (*Action, *Response, error) { if imageID < 1 { return nil, nil, NewArgError("imageID", "cannot be less than 1") } @@ -56,7 +86,7 @@ func (i *ImageActionsServiceOp) Get(imageID, actionID int) (*Action, *Response, path := fmt.Sprintf("v2/images/%d/actions/%d", imageID, actionID) - req, err := i.client.NewRequest("GET", path, nil) + req, err := i.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -67,5 +97,5 @@ func (i *ImageActionsServiceOp) Get(imageID, actionID int) (*Action, *Response, return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } diff --git a/vendor/github.com/digitalocean/godo/images.go b/vendor/github.com/digitalocean/godo/images.go index 96894f886..c808af6ec 100644 --- a/vendor/github.com/digitalocean/godo/images.go +++ b/vendor/github.com/digitalocean/godo/images.go @@ -1,6 +1,9 @@ package godo -import "fmt" +import ( + "context" + "fmt" +) const imageBasePath = "v2/images" @@ -8,14 +11,14 @@ const imageBasePath = "v2/images" // endpoints of the DigitalOcean API // See: https://developers.digitalocean.com/documentation/v2#images type ImagesService interface { - List(*ListOptions) ([]Image, *Response, error) - ListDistribution(opt *ListOptions) ([]Image, *Response, error) - ListApplication(opt *ListOptions) ([]Image, *Response, error) - ListUser(opt *ListOptions) ([]Image, *Response, error) - GetByID(int) (*Image, *Response, error) - GetBySlug(string) (*Image, *Response, error) - Update(int, *ImageUpdateRequest) (*Image, *Response, error) - Delete(int) (*Response, error) + List(context.Context, *ListOptions) ([]Image, *Response, error) + ListDistribution(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) + ListApplication(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) + ListUser(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) + GetByID(context.Context, int) (*Image, *Response, error) + GetBySlug(context.Context, string) (*Image, *Response, error) + Update(context.Context, int, *ImageUpdateRequest) (*Image, *Response, error) + Delete(context.Context, int) (*Response, error) } // ImagesServiceOp handles communication with the image related methods of the @@ -45,7 +48,7 @@ type ImageUpdateRequest struct { } type imageRoot struct { - Image Image + Image *Image } type imagesRoot struct { @@ -63,48 +66,48 @@ func (i Image) String() string { } // List lists all the images available. -func (s *ImagesServiceOp) List(opt *ListOptions) ([]Image, *Response, error) { - return s.list(opt, nil) +func (s *ImagesServiceOp) List(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) { + return s.list(ctx, opt, nil) } // ListDistribution lists all the distribution images. -func (s *ImagesServiceOp) ListDistribution(opt *ListOptions) ([]Image, *Response, error) { +func (s *ImagesServiceOp) ListDistribution(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) { listOpt := listImageOptions{Type: "distribution"} - return s.list(opt, &listOpt) + return s.list(ctx, opt, &listOpt) } // ListApplication lists all the application images. -func (s *ImagesServiceOp) ListApplication(opt *ListOptions) ([]Image, *Response, error) { +func (s *ImagesServiceOp) ListApplication(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) { listOpt := listImageOptions{Type: "application"} - return s.list(opt, &listOpt) + return s.list(ctx, opt, &listOpt) } // ListUser lists all the user images. -func (s *ImagesServiceOp) ListUser(opt *ListOptions) ([]Image, *Response, error) { +func (s *ImagesServiceOp) ListUser(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) { listOpt := listImageOptions{Private: true} - return s.list(opt, &listOpt) + return s.list(ctx, opt, &listOpt) } // GetByID retrieves an image by id. -func (s *ImagesServiceOp) GetByID(imageID int) (*Image, *Response, error) { +func (s *ImagesServiceOp) GetByID(ctx context.Context, imageID int) (*Image, *Response, error) { if imageID < 1 { return nil, nil, NewArgError("imageID", "cannot be less than 1") } - return s.get(interface{}(imageID)) + return s.get(ctx, interface{}(imageID)) } // GetBySlug retrieves an image by slug. -func (s *ImagesServiceOp) GetBySlug(slug string) (*Image, *Response, error) { +func (s *ImagesServiceOp) GetBySlug(ctx context.Context, slug string) (*Image, *Response, error) { if len(slug) < 1 { return nil, nil, NewArgError("slug", "cannot be blank") } - return s.get(interface{}(slug)) + return s.get(ctx, interface{}(slug)) } // Update an image name. -func (s *ImagesServiceOp) Update(imageID int, updateRequest *ImageUpdateRequest) (*Image, *Response, error) { +func (s *ImagesServiceOp) Update(ctx context.Context, imageID int, updateRequest *ImageUpdateRequest) (*Image, *Response, error) { if imageID < 1 { return nil, nil, NewArgError("imageID", "cannot be less than 1") } @@ -114,7 +117,7 @@ func (s *ImagesServiceOp) Update(imageID int, updateRequest *ImageUpdateRequest) } path := fmt.Sprintf("%s/%d", imageBasePath, imageID) - req, err := s.client.NewRequest("PUT", path, updateRequest) + req, err := s.client.NewRequest(ctx, "PUT", path, updateRequest) if err != nil { return nil, nil, err } @@ -125,18 +128,18 @@ func (s *ImagesServiceOp) Update(imageID int, updateRequest *ImageUpdateRequest) return nil, resp, err } - return &root.Image, resp, err + return root.Image, resp, err } // Delete an image. -func (s *ImagesServiceOp) Delete(imageID int) (*Response, error) { +func (s *ImagesServiceOp) Delete(ctx context.Context, imageID int) (*Response, error) { if imageID < 1 { return nil, NewArgError("imageID", "cannot be less than 1") } path := fmt.Sprintf("%s/%d", imageBasePath, imageID) - req, err := s.client.NewRequest("DELETE", path, nil) + req, err := s.client.NewRequest(ctx, "DELETE", path, nil) if err != nil { return nil, err } @@ -147,10 +150,10 @@ func (s *ImagesServiceOp) Delete(imageID int) (*Response, error) { } // Helper method for getting an individual image -func (s *ImagesServiceOp) get(ID interface{}) (*Image, *Response, error) { +func (s *ImagesServiceOp) get(ctx context.Context, ID interface{}) (*Image, *Response, error) { path := fmt.Sprintf("%s/%v", imageBasePath, ID) - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -161,11 +164,11 @@ func (s *ImagesServiceOp) get(ID interface{}) (*Image, *Response, error) { return nil, resp, err } - return &root.Image, resp, err + return root.Image, resp, err } // Helper method for listing images -func (s *ImagesServiceOp) list(opt *ListOptions, listOpt *listImageOptions) ([]Image, *Response, error) { +func (s *ImagesServiceOp) list(ctx context.Context, opt *ListOptions, listOpt *listImageOptions) ([]Image, *Response, error) { path := imageBasePath path, err := addOptions(path, opt) if err != nil { @@ -176,7 +179,7 @@ func (s *ImagesServiceOp) list(opt *ListOptions, listOpt *listImageOptions) ([]I return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/digitalocean/godo/keys.go b/vendor/github.com/digitalocean/godo/keys.go index 8dc50f8a0..7b336c4ce 100644 --- a/vendor/github.com/digitalocean/godo/keys.go +++ b/vendor/github.com/digitalocean/godo/keys.go @@ -1,6 +1,9 @@ package godo -import "fmt" +import ( + "context" + "fmt" +) const keysBasePath = "v2/account/keys" @@ -8,14 +11,14 @@ const keysBasePath = "v2/account/keys" // endpoints of the DigitalOcean API // See: https://developers.digitalocean.com/documentation/v2#keys type KeysService interface { - List(*ListOptions) ([]Key, *Response, error) - GetByID(int) (*Key, *Response, error) - GetByFingerprint(string) (*Key, *Response, error) - Create(*KeyCreateRequest) (*Key, *Response, error) - UpdateByID(int, *KeyUpdateRequest) (*Key, *Response, error) - UpdateByFingerprint(string, *KeyUpdateRequest) (*Key, *Response, error) - DeleteByID(int) (*Response, error) - DeleteByFingerprint(string) (*Response, error) + List(context.Context, *ListOptions) ([]Key, *Response, error) + GetByID(context.Context, int) (*Key, *Response, error) + GetByFingerprint(context.Context, string) (*Key, *Response, error) + Create(context.Context, *KeyCreateRequest) (*Key, *Response, error) + UpdateByID(context.Context, int, *KeyUpdateRequest) (*Key, *Response, error) + UpdateByFingerprint(context.Context, string, *KeyUpdateRequest) (*Key, *Response, error) + DeleteByID(context.Context, int) (*Response, error) + DeleteByFingerprint(context.Context, string) (*Response, error) } // KeysServiceOp handles communication with key related method of the @@ -45,7 +48,7 @@ type keysRoot struct { } type keyRoot struct { - SSHKey Key `json:"ssh_key"` + SSHKey *Key `json:"ssh_key"` } func (s Key) String() string { @@ -59,14 +62,14 @@ type KeyCreateRequest struct { } // List all keys -func (s *KeysServiceOp) List(opt *ListOptions) ([]Key, *Response, error) { +func (s *KeysServiceOp) List(ctx context.Context, opt *ListOptions) ([]Key, *Response, error) { path := keysBasePath path, err := addOptions(path, opt) if err != nil { return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -84,8 +87,8 @@ func (s *KeysServiceOp) List(opt *ListOptions) ([]Key, *Response, error) { } // Performs a get given a path -func (s *KeysServiceOp) get(path string) (*Key, *Response, error) { - req, err := s.client.NewRequest("GET", path, nil) +func (s *KeysServiceOp) get(ctx context.Context, path string) (*Key, *Response, error) { + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } @@ -96,36 +99,36 @@ func (s *KeysServiceOp) get(path string) (*Key, *Response, error) { return nil, resp, err } - return &root.SSHKey, resp, err + return root.SSHKey, resp, err } // GetByID gets a Key by id -func (s *KeysServiceOp) GetByID(keyID int) (*Key, *Response, error) { +func (s *KeysServiceOp) GetByID(ctx context.Context, keyID int) (*Key, *Response, error) { if keyID < 1 { return nil, nil, NewArgError("keyID", "cannot be less than 1") } path := fmt.Sprintf("%s/%d", keysBasePath, keyID) - return s.get(path) + return s.get(ctx, path) } // GetByFingerprint gets a Key by by fingerprint -func (s *KeysServiceOp) GetByFingerprint(fingerprint string) (*Key, *Response, error) { +func (s *KeysServiceOp) GetByFingerprint(ctx context.Context, fingerprint string) (*Key, *Response, error) { if len(fingerprint) < 1 { return nil, nil, NewArgError("fingerprint", "cannot not be empty") } path := fmt.Sprintf("%s/%s", keysBasePath, fingerprint) - return s.get(path) + return s.get(ctx, path) } // Create a key using a KeyCreateRequest -func (s *KeysServiceOp) Create(createRequest *KeyCreateRequest) (*Key, *Response, error) { +func (s *KeysServiceOp) Create(ctx context.Context, createRequest *KeyCreateRequest) (*Key, *Response, error) { if createRequest == nil { return nil, nil, NewArgError("createRequest", "cannot be nil") } - req, err := s.client.NewRequest("POST", keysBasePath, createRequest) + req, err := s.client.NewRequest(ctx, "POST", keysBasePath, createRequest) if err != nil { return nil, nil, err } @@ -136,11 +139,11 @@ func (s *KeysServiceOp) Create(createRequest *KeyCreateRequest) (*Key, *Response return nil, resp, err } - return &root.SSHKey, resp, err + return root.SSHKey, resp, err } // UpdateByID updates a key name by ID. -func (s *KeysServiceOp) UpdateByID(keyID int, updateRequest *KeyUpdateRequest) (*Key, *Response, error) { +func (s *KeysServiceOp) UpdateByID(ctx context.Context, keyID int, updateRequest *KeyUpdateRequest) (*Key, *Response, error) { if keyID < 1 { return nil, nil, NewArgError("keyID", "cannot be less than 1") } @@ -150,7 +153,7 @@ func (s *KeysServiceOp) UpdateByID(keyID int, updateRequest *KeyUpdateRequest) ( } path := fmt.Sprintf("%s/%d", keysBasePath, keyID) - req, err := s.client.NewRequest("PUT", path, updateRequest) + req, err := s.client.NewRequest(ctx, "PUT", path, updateRequest) if err != nil { return nil, nil, err } @@ -161,11 +164,11 @@ func (s *KeysServiceOp) UpdateByID(keyID int, updateRequest *KeyUpdateRequest) ( return nil, resp, err } - return &root.SSHKey, resp, err + return root.SSHKey, resp, err } // UpdateByFingerprint updates a key name by fingerprint. -func (s *KeysServiceOp) UpdateByFingerprint(fingerprint string, updateRequest *KeyUpdateRequest) (*Key, *Response, error) { +func (s *KeysServiceOp) UpdateByFingerprint(ctx context.Context, fingerprint string, updateRequest *KeyUpdateRequest) (*Key, *Response, error) { if len(fingerprint) < 1 { return nil, nil, NewArgError("fingerprint", "cannot be empty") } @@ -175,7 +178,7 @@ func (s *KeysServiceOp) UpdateByFingerprint(fingerprint string, updateRequest *K } path := fmt.Sprintf("%s/%s", keysBasePath, fingerprint) - req, err := s.client.NewRequest("PUT", path, updateRequest) + req, err := s.client.NewRequest(ctx, "PUT", path, updateRequest) if err != nil { return nil, nil, err } @@ -186,12 +189,12 @@ func (s *KeysServiceOp) UpdateByFingerprint(fingerprint string, updateRequest *K return nil, resp, err } - return &root.SSHKey, resp, err + return root.SSHKey, resp, err } // Delete key using a path -func (s *KeysServiceOp) delete(path string) (*Response, error) { - req, err := s.client.NewRequest("DELETE", path, nil) +func (s *KeysServiceOp) delete(ctx context.Context, path string) (*Response, error) { + req, err := s.client.NewRequest(ctx, "DELETE", path, nil) if err != nil { return nil, err } @@ -202,21 +205,21 @@ func (s *KeysServiceOp) delete(path string) (*Response, error) { } // DeleteByID deletes a key by its id -func (s *KeysServiceOp) DeleteByID(keyID int) (*Response, error) { +func (s *KeysServiceOp) DeleteByID(ctx context.Context, keyID int) (*Response, error) { if keyID < 1 { return nil, NewArgError("keyID", "cannot be less than 1") } path := fmt.Sprintf("%s/%d", keysBasePath, keyID) - return s.delete(path) + return s.delete(ctx, path) } // DeleteByFingerprint deletes a key by its fingerprint -func (s *KeysServiceOp) DeleteByFingerprint(fingerprint string) (*Response, error) { +func (s *KeysServiceOp) DeleteByFingerprint(ctx context.Context, fingerprint string) (*Response, error) { if len(fingerprint) < 1 { return nil, NewArgError("fingerprint", "cannot be empty") } path := fmt.Sprintf("%s/%s", keysBasePath, fingerprint) - return s.delete(path) + return s.delete(ctx, path) } diff --git a/vendor/github.com/digitalocean/godo/links.go b/vendor/github.com/digitalocean/godo/links.go index 463510523..209844172 100644 --- a/vendor/github.com/digitalocean/godo/links.go +++ b/vendor/github.com/digitalocean/godo/links.go @@ -1,6 +1,7 @@ package godo import ( + "context" "net/url" "strconv" ) @@ -58,11 +59,7 @@ func (l *Links) IsLastPage() bool { } func (p *Pages) isLast() bool { - if p.Last == "" { - return true - } - - return false + return p.Last == "" } func pageForURL(urlText string) (int, error) { @@ -81,6 +78,6 @@ func pageForURL(urlText string) (int, error) { } // Get a link action by id. -func (la *LinkAction) Get(client *Client) (*Action, *Response, error) { - return client.Actions.Get(la.ID) +func (la *LinkAction) Get(ctx context.Context, client *Client) (*Action, *Response, error) { + return client.Actions.Get(ctx, la.ID) } diff --git a/vendor/github.com/digitalocean/godo/load_balancers.go b/vendor/github.com/digitalocean/godo/load_balancers.go new file mode 100644 index 000000000..48b9c2654 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/load_balancers.go @@ -0,0 +1,275 @@ +package godo + +import ( + "context" + "fmt" +) + +const loadBalancersBasePath = "/v2/load_balancers" +const forwardingRulesPath = "forwarding_rules" +const dropletsPath = "droplets" + +// LoadBalancersService is an interface for managing load balancers with the DigitalOcean API. +// See: https://developers.digitalocean.com/documentation/v2#load-balancers +type LoadBalancersService interface { + Get(context.Context, string) (*LoadBalancer, *Response, error) + List(context.Context, *ListOptions) ([]LoadBalancer, *Response, error) + Create(context.Context, *LoadBalancerRequest) (*LoadBalancer, *Response, error) + Update(ctx context.Context, lbID string, lbr *LoadBalancerRequest) (*LoadBalancer, *Response, error) + Delete(ctx context.Context, lbID string) (*Response, error) + AddDroplets(ctx context.Context, lbID string, dropletIDs ...int) (*Response, error) + RemoveDroplets(ctx context.Context, lbID string, dropletIDs ...int) (*Response, error) + AddForwardingRules(ctx context.Context, lbID string, rules ...ForwardingRule) (*Response, error) + RemoveForwardingRules(ctx context.Context, lbID string, rules ...ForwardingRule) (*Response, error) +} + +// LoadBalancer represents a DigitalOcean load balancer configuration. +type LoadBalancer struct { + ID string `json:"id,omitempty"` + Name string `json:"name,omitempty"` + IP string `json:"ip,omitempty"` + Algorithm string `json:"algorithm,omitempty"` + Status string `json:"status,omitempty"` + Created string `json:"created_at,omitempty"` + ForwardingRules []ForwardingRule `json:"forwarding_rules,omitempty"` + HealthCheck *HealthCheck `json:"health_check,omitempty"` + StickySessions *StickySessions `json:"sticky_sessions,omitempty"` + Region *Region `json:"region,omitempty"` + DropletIDs []int `json:"droplet_ids,omitempty"` + Tag string `json:"tag,omitempty"` + RedirectHttpToHttps bool `json:"redirect_http_to_https,omitempty"` +} + +// String creates a human-readable description of a LoadBalancer. +func (l LoadBalancer) String() string { + return Stringify(l) +} + +// ForwardingRule represents load balancer forwarding rules. +type ForwardingRule struct { + EntryProtocol string `json:"entry_protocol,omitempty"` + EntryPort int `json:"entry_port,omitempty"` + TargetProtocol string `json:"target_protocol,omitempty"` + TargetPort int `json:"target_port,omitempty"` + CertificateID string `json:"certificate_id,omitempty"` + TlsPassthrough bool `json:"tls_passthrough,omitempty"` +} + +// String creates a human-readable description of a ForwardingRule. +func (f ForwardingRule) String() string { + return Stringify(f) +} + +// HealthCheck represents optional load balancer health check rules. +type HealthCheck struct { + Protocol string `json:"protocol,omitempty"` + Port int `json:"port,omitempty"` + Path string `json:"path,omitempty"` + CheckIntervalSeconds int `json:"check_interval_seconds,omitempty"` + ResponseTimeoutSeconds int `json:"response_timeout_seconds,omitempty"` + HealthyThreshold int `json:"healthy_threshold,omitempty"` + UnhealthyThreshold int `json:"unhealthy_threshold,omitempty"` +} + +// String creates a human-readable description of a HealthCheck. +func (h HealthCheck) String() string { + return Stringify(h) +} + +// StickySessions represents optional load balancer session affinity rules. +type StickySessions struct { + Type string `json:"type,omitempty"` + CookieName string `json:"cookie_name,omitempty"` + CookieTtlSeconds int `json:"cookie_ttl_seconds,omitempty"` +} + +// String creates a human-readable description of a StickySessions instance. +func (s StickySessions) String() string { + return Stringify(s) +} + +// LoadBalancerRequest represents the configuration to be applied to an existing or a new load balancer. +type LoadBalancerRequest struct { + Name string `json:"name,omitempty"` + Algorithm string `json:"algorithm,omitempty"` + Region string `json:"region,omitempty"` + ForwardingRules []ForwardingRule `json:"forwarding_rules,omitempty"` + HealthCheck *HealthCheck `json:"health_check,omitempty"` + StickySessions *StickySessions `json:"sticky_sessions,omitempty"` + DropletIDs []int `json:"droplet_ids,omitempty"` + Tag string `json:"tag,omitempty"` + RedirectHttpToHttps bool `json:"redirect_http_to_https,omitempty"` +} + +// String creates a human-readable description of a LoadBalancerRequest. +func (l LoadBalancerRequest) String() string { + return Stringify(l) +} + +type forwardingRulesRequest struct { + Rules []ForwardingRule `json:"forwarding_rules,omitempty"` +} + +func (l forwardingRulesRequest) String() string { + return Stringify(l) +} + +type dropletIDsRequest struct { + IDs []int `json:"droplet_ids,omitempty"` +} + +func (l dropletIDsRequest) String() string { + return Stringify(l) +} + +type loadBalancersRoot struct { + LoadBalancers []LoadBalancer `json:"load_balancers"` + Links *Links `json:"links"` +} + +type loadBalancerRoot struct { + LoadBalancer *LoadBalancer `json:"load_balancer"` +} + +// LoadBalancersServiceOp handles communication with load balancer-related methods of the DigitalOcean API. +type LoadBalancersServiceOp struct { + client *Client +} + +var _ LoadBalancersService = &LoadBalancersServiceOp{} + +// Get an existing load balancer by its identifier. +func (l *LoadBalancersServiceOp) Get(ctx context.Context, lbID string) (*LoadBalancer, *Response, error) { + path := fmt.Sprintf("%s/%s", loadBalancersBasePath, lbID) + + req, err := l.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(loadBalancerRoot) + resp, err := l.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.LoadBalancer, resp, err +} + +// List load balancers, with optional pagination. +func (l *LoadBalancersServiceOp) List(ctx context.Context, opt *ListOptions) ([]LoadBalancer, *Response, error) { + path, err := addOptions(loadBalancersBasePath, opt) + if err != nil { + return nil, nil, err + } + + req, err := l.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(loadBalancersRoot) + resp, err := l.client.Do(req, root) + if err != nil { + return nil, resp, err + } + if l := root.Links; l != nil { + resp.Links = l + } + + return root.LoadBalancers, resp, err +} + +// Create a new load balancer with a given configuration. +func (l *LoadBalancersServiceOp) Create(ctx context.Context, lbr *LoadBalancerRequest) (*LoadBalancer, *Response, error) { + req, err := l.client.NewRequest(ctx, "POST", loadBalancersBasePath, lbr) + if err != nil { + return nil, nil, err + } + + root := new(loadBalancerRoot) + resp, err := l.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.LoadBalancer, resp, err +} + +// Update an existing load balancer with new configuration. +func (l *LoadBalancersServiceOp) Update(ctx context.Context, lbID string, lbr *LoadBalancerRequest) (*LoadBalancer, *Response, error) { + path := fmt.Sprintf("%s/%s", loadBalancersBasePath, lbID) + + req, err := l.client.NewRequest(ctx, "PUT", path, lbr) + if err != nil { + return nil, nil, err + } + + root := new(loadBalancerRoot) + resp, err := l.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.LoadBalancer, resp, err +} + +// Delete a load balancer by its identifier. +func (l *LoadBalancersServiceOp) Delete(ctx context.Context, ldID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", loadBalancersBasePath, ldID) + + req, err := l.client.NewRequest(ctx, "DELETE", path, nil) + if err != nil { + return nil, err + } + + return l.client.Do(req, nil) +} + +// AddDroplets adds droplets to a load balancer. +func (l *LoadBalancersServiceOp) AddDroplets(ctx context.Context, lbID string, dropletIDs ...int) (*Response, error) { + path := fmt.Sprintf("%s/%s/%s", loadBalancersBasePath, lbID, dropletsPath) + + req, err := l.client.NewRequest(ctx, "POST", path, &dropletIDsRequest{IDs: dropletIDs}) + if err != nil { + return nil, err + } + + return l.client.Do(req, nil) +} + +// RemoveDroplets removes droplets from a load balancer. +func (l *LoadBalancersServiceOp) RemoveDroplets(ctx context.Context, lbID string, dropletIDs ...int) (*Response, error) { + path := fmt.Sprintf("%s/%s/%s", loadBalancersBasePath, lbID, dropletsPath) + + req, err := l.client.NewRequest(ctx, "DELETE", path, &dropletIDsRequest{IDs: dropletIDs}) + if err != nil { + return nil, err + } + + return l.client.Do(req, nil) +} + +// AddForwardingRules adds forwarding rules to a load balancer. +func (l *LoadBalancersServiceOp) AddForwardingRules(ctx context.Context, lbID string, rules ...ForwardingRule) (*Response, error) { + path := fmt.Sprintf("%s/%s/%s", loadBalancersBasePath, lbID, forwardingRulesPath) + + req, err := l.client.NewRequest(ctx, "POST", path, &forwardingRulesRequest{Rules: rules}) + if err != nil { + return nil, err + } + + return l.client.Do(req, nil) +} + +// RemoveForwardingRules removes forwarding rules from a load balancer. +func (l *LoadBalancersServiceOp) RemoveForwardingRules(ctx context.Context, lbID string, rules ...ForwardingRule) (*Response, error) { + path := fmt.Sprintf("%s/%s/%s", loadBalancersBasePath, lbID, forwardingRulesPath) + + req, err := l.client.NewRequest(ctx, "DELETE", path, &forwardingRulesRequest{Rules: rules}) + if err != nil { + return nil, err + } + + return l.client.Do(req, nil) +} diff --git a/vendor/github.com/digitalocean/godo/regions.go b/vendor/github.com/digitalocean/godo/regions.go index e44e8bcd6..ccfe02926 100644 --- a/vendor/github.com/digitalocean/godo/regions.go +++ b/vendor/github.com/digitalocean/godo/regions.go @@ -1,10 +1,12 @@ package godo +import "context" + // RegionsService is an interface for interfacing with the regions // endpoints of the DigitalOcean API // See: https://developers.digitalocean.com/documentation/v2#regions type RegionsService interface { - List(*ListOptions) ([]Region, *Response, error) + List(context.Context, *ListOptions) ([]Region, *Response, error) } // RegionsServiceOp handles communication with the region related methods of the @@ -29,23 +31,19 @@ type regionsRoot struct { Links *Links `json:"links"` } -type regionRoot struct { - Region Region -} - func (r Region) String() string { return Stringify(r) } // List all regions -func (s *RegionsServiceOp) List(opt *ListOptions) ([]Region, *Response, error) { +func (s *RegionsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Region, *Response, error) { path := "v2/regions" path, err := addOptions(path, opt) if err != nil { return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/digitalocean/godo/sizes.go b/vendor/github.com/digitalocean/godo/sizes.go index 7f454e7eb..b69579278 100644 --- a/vendor/github.com/digitalocean/godo/sizes.go +++ b/vendor/github.com/digitalocean/godo/sizes.go @@ -1,10 +1,12 @@ package godo +import "context" + // SizesService is an interface for interfacing with the size // endpoints of the DigitalOcean API // See: https://developers.digitalocean.com/documentation/v2#sizes type SizesService interface { - List(*ListOptions) ([]Size, *Response, error) + List(context.Context, *ListOptions) ([]Size, *Response, error) } // SizesServiceOp handles communication with the size related methods of the @@ -38,14 +40,14 @@ type sizesRoot struct { } // List all images -func (s *SizesServiceOp) List(opt *ListOptions) ([]Size, *Response, error) { +func (s *SizesServiceOp) List(ctx context.Context, opt *ListOptions) ([]Size, *Response, error) { path := "v2/sizes" path, err := addOptions(path, opt) if err != nil { return nil, nil, err } - req, err := s.client.NewRequest("GET", path, nil) + req, err := s.client.NewRequest(ctx, "GET", path, nil) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/digitalocean/godo/snapshots.go b/vendor/github.com/digitalocean/godo/snapshots.go new file mode 100644 index 000000000..5a9e5c5d8 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/snapshots.go @@ -0,0 +1,139 @@ +package godo + +import ( + "context" + "fmt" +) + +const snapshotBasePath = "v2/snapshots" + +// SnapshotsService is an interface for interfacing with the snapshots +// endpoints of the DigitalOcean API +// See: https://developers.digitalocean.com/documentation/v2#snapshots +type SnapshotsService interface { + List(context.Context, *ListOptions) ([]Snapshot, *Response, error) + ListVolume(context.Context, *ListOptions) ([]Snapshot, *Response, error) + ListDroplet(context.Context, *ListOptions) ([]Snapshot, *Response, error) + Get(context.Context, string) (*Snapshot, *Response, error) + Delete(context.Context, string) (*Response, error) +} + +// SnapshotsServiceOp handles communication with the snapshot related methods of the +// DigitalOcean API. +type SnapshotsServiceOp struct { + client *Client +} + +var _ SnapshotsService = &SnapshotsServiceOp{} + +// Snapshot represents a DigitalOcean Snapshot +type Snapshot struct { + ID string `json:"id,omitempty"` + Name string `json:"name,omitempty"` + ResourceID string `json:"resource_id,omitempty"` + ResourceType string `json:"resource_type,omitempty"` + Regions []string `json:"regions,omitempty"` + MinDiskSize int `json:"min_disk_size,omitempty"` + SizeGigaBytes float64 `json:"size_gigabytes,omitempty"` + Created string `json:"created_at,omitempty"` +} + +type snapshotRoot struct { + Snapshot *Snapshot `json:"snapshot"` +} + +type snapshotsRoot struct { + Snapshots []Snapshot `json:"snapshots"` + Links *Links `json:"links,omitempty"` +} + +type listSnapshotOptions struct { + ResourceType string `url:"resource_type,omitempty"` +} + +func (s Snapshot) String() string { + return Stringify(s) +} + +// List lists all the snapshots available. +func (s *SnapshotsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Snapshot, *Response, error) { + return s.list(ctx, opt, nil) +} + +// ListDroplet lists all the Droplet snapshots. +func (s *SnapshotsServiceOp) ListDroplet(ctx context.Context, opt *ListOptions) ([]Snapshot, *Response, error) { + listOpt := listSnapshotOptions{ResourceType: "droplet"} + return s.list(ctx, opt, &listOpt) +} + +// ListVolume lists all the volume snapshots. +func (s *SnapshotsServiceOp) ListVolume(ctx context.Context, opt *ListOptions) ([]Snapshot, *Response, error) { + listOpt := listSnapshotOptions{ResourceType: "volume"} + return s.list(ctx, opt, &listOpt) +} + +// Get retrieves an snapshot by id. +func (s *SnapshotsServiceOp) Get(ctx context.Context, snapshotID string) (*Snapshot, *Response, error) { + return s.get(ctx, snapshotID) +} + +// Delete an snapshot. +func (s *SnapshotsServiceOp) Delete(ctx context.Context, snapshotID string) (*Response, error) { + path := fmt.Sprintf("%s/%s", snapshotBasePath, snapshotID) + + req, err := s.client.NewRequest(ctx, "DELETE", path, nil) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(req, nil) + + return resp, err +} + +// Helper method for getting an individual snapshot +func (s *SnapshotsServiceOp) get(ctx context.Context, ID string) (*Snapshot, *Response, error) { + path := fmt.Sprintf("%s/%s", snapshotBasePath, ID) + + req, err := s.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(snapshotRoot) + resp, err := s.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Snapshot, resp, err +} + +// Helper method for listing snapshots +func (s *SnapshotsServiceOp) list(ctx context.Context, opt *ListOptions, listOpt *listSnapshotOptions) ([]Snapshot, *Response, error) { + path := snapshotBasePath + path, err := addOptions(path, opt) + if err != nil { + return nil, nil, err + } + path, err = addOptions(path, listOpt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(snapshotsRoot) + resp, err := s.client.Do(req, root) + if err != nil { + return nil, resp, err + } + if l := root.Links; l != nil { + resp.Links = l + } + + return root.Snapshots, resp, err +} diff --git a/vendor/github.com/digitalocean/godo/storage.go b/vendor/github.com/digitalocean/godo/storage.go new file mode 100644 index 000000000..00d5157d6 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/storage.go @@ -0,0 +1,238 @@ +package godo + +import ( + "context" + "fmt" + "time" +) + +const ( + storageBasePath = "v2" + storageAllocPath = storageBasePath + "/volumes" + storageSnapPath = storageBasePath + "/snapshots" +) + +// StorageService is an interface for interfacing with the storage +// endpoints of the Digital Ocean API. +// See: https://developers.digitalocean.com/documentation/v2#storage +type StorageService interface { + ListVolumes(context.Context, *ListVolumeParams) ([]Volume, *Response, error) + GetVolume(context.Context, string) (*Volume, *Response, error) + CreateVolume(context.Context, *VolumeCreateRequest) (*Volume, *Response, error) + DeleteVolume(context.Context, string) (*Response, error) + ListSnapshots(ctx context.Context, volumeID string, opts *ListOptions) ([]Snapshot, *Response, error) + GetSnapshot(context.Context, string) (*Snapshot, *Response, error) + CreateSnapshot(context.Context, *SnapshotCreateRequest) (*Snapshot, *Response, error) + DeleteSnapshot(context.Context, string) (*Response, error) +} + +// StorageServiceOp handles communication with the storage volumes related methods of the +// DigitalOcean API. +type StorageServiceOp struct { + client *Client +} + +// ListVolumeParams stores the options you can set for a ListVolumeCall +type ListVolumeParams struct { + Region string `json:"region"` + Name string `json:"name"` + ListOptions *ListOptions `json:"list_options,omitempty"` +} + +var _ StorageService = &StorageServiceOp{} + +// Volume represents a Digital Ocean block store volume. +type Volume struct { + ID string `json:"id"` + Region *Region `json:"region"` + Name string `json:"name"` + SizeGigaBytes int64 `json:"size_gigabytes"` + Description string `json:"description"` + DropletIDs []int `json:"droplet_ids"` + CreatedAt time.Time `json:"created_at"` +} + +func (f Volume) String() string { + return Stringify(f) +} + +type storageVolumesRoot struct { + Volumes []Volume `json:"volumes"` + Links *Links `json:"links"` +} + +type storageVolumeRoot struct { + Volume *Volume `json:"volume"` + Links *Links `json:"links,omitempty"` +} + +// VolumeCreateRequest represents a request to create a block store +// volume. +type VolumeCreateRequest struct { + Region string `json:"region"` + Name string `json:"name"` + Description string `json:"description"` + SizeGigaBytes int64 `json:"size_gigabytes"` + SnapshotID string `json:"snapshot_id"` +} + +// ListVolumes lists all storage volumes. +func (svc *StorageServiceOp) ListVolumes(ctx context.Context, params *ListVolumeParams) ([]Volume, *Response, error) { + path := storageAllocPath + if params != nil { + if params.Region != "" && params.Name != "" { + path = fmt.Sprintf("%s?name=%s®ion=%s", path, params.Name, params.Region) + } + + if params.ListOptions != nil { + var err error + path, err = addOptions(path, params.ListOptions) + if err != nil { + return nil, nil, err + } + } + } + + req, err := svc.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(storageVolumesRoot) + resp, err := svc.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + if l := root.Links; l != nil { + resp.Links = l + } + + return root.Volumes, resp, nil +} + +// CreateVolume creates a storage volume. The name must be unique. +func (svc *StorageServiceOp) CreateVolume(ctx context.Context, createRequest *VolumeCreateRequest) (*Volume, *Response, error) { + path := storageAllocPath + + req, err := svc.client.NewRequest(ctx, "POST", path, createRequest) + if err != nil { + return nil, nil, err + } + + root := new(storageVolumeRoot) + resp, err := svc.client.Do(req, root) + if err != nil { + return nil, resp, err + } + return root.Volume, resp, nil +} + +// GetVolume retrieves an individual storage volume. +func (svc *StorageServiceOp) GetVolume(ctx context.Context, id string) (*Volume, *Response, error) { + path := fmt.Sprintf("%s/%s", storageAllocPath, id) + + req, err := svc.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(storageVolumeRoot) + resp, err := svc.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Volume, resp, nil +} + +// DeleteVolume deletes a storage volume. +func (svc *StorageServiceOp) DeleteVolume(ctx context.Context, id string) (*Response, error) { + path := fmt.Sprintf("%s/%s", storageAllocPath, id) + + req, err := svc.client.NewRequest(ctx, "DELETE", path, nil) + if err != nil { + return nil, err + } + return svc.client.Do(req, nil) +} + +// SnapshotCreateRequest represents a request to create a block store +// volume. +type SnapshotCreateRequest struct { + VolumeID string `json:"volume_id"` + Name string `json:"name"` + Description string `json:"description"` +} + +// ListSnapshots lists all snapshots related to a storage volume. +func (svc *StorageServiceOp) ListSnapshots(ctx context.Context, volumeID string, opt *ListOptions) ([]Snapshot, *Response, error) { + path := fmt.Sprintf("%s/%s/snapshots", storageAllocPath, volumeID) + path, err := addOptions(path, opt) + if err != nil { + return nil, nil, err + } + + req, err := svc.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(snapshotsRoot) + resp, err := svc.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + if l := root.Links; l != nil { + resp.Links = l + } + + return root.Snapshots, resp, nil +} + +// CreateSnapshot creates a snapshot of a storage volume. +func (svc *StorageServiceOp) CreateSnapshot(ctx context.Context, createRequest *SnapshotCreateRequest) (*Snapshot, *Response, error) { + path := fmt.Sprintf("%s/%s/snapshots", storageAllocPath, createRequest.VolumeID) + + req, err := svc.client.NewRequest(ctx, "POST", path, createRequest) + if err != nil { + return nil, nil, err + } + + root := new(snapshotRoot) + resp, err := svc.client.Do(req, root) + if err != nil { + return nil, resp, err + } + return root.Snapshot, resp, nil +} + +// GetSnapshot retrieves an individual snapshot. +func (svc *StorageServiceOp) GetSnapshot(ctx context.Context, id string) (*Snapshot, *Response, error) { + path := fmt.Sprintf("%s/%s", storageSnapPath, id) + + req, err := svc.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(snapshotRoot) + resp, err := svc.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Snapshot, resp, nil +} + +// DeleteSnapshot deletes a snapshot. +func (svc *StorageServiceOp) DeleteSnapshot(ctx context.Context, id string) (*Response, error) { + path := fmt.Sprintf("%s/%s", storageSnapPath, id) + + req, err := svc.client.NewRequest(ctx, "DELETE", path, nil) + if err != nil { + return nil, err + } + return svc.client.Do(req, nil) +} diff --git a/vendor/github.com/digitalocean/godo/storage_actions.go b/vendor/github.com/digitalocean/godo/storage_actions.go new file mode 100644 index 000000000..21f82659f --- /dev/null +++ b/vendor/github.com/digitalocean/godo/storage_actions.go @@ -0,0 +1,128 @@ +package godo + +import ( + "context" + "fmt" +) + +// StorageActionsService is an interface for interfacing with the +// storage actions endpoints of the Digital Ocean API. +// See: https://developers.digitalocean.com/documentation/v2#storage-actions +type StorageActionsService interface { + Attach(ctx context.Context, volumeID string, dropletID int) (*Action, *Response, error) + DetachByDropletID(ctx context.Context, volumeID string, dropletID int) (*Action, *Response, error) + Get(ctx context.Context, volumeID string, actionID int) (*Action, *Response, error) + List(ctx context.Context, volumeID string, opt *ListOptions) ([]Action, *Response, error) + Resize(ctx context.Context, volumeID string, sizeGigabytes int, regionSlug string) (*Action, *Response, error) +} + +// StorageActionsServiceOp handles communication with the storage volumes +// action related methods of the DigitalOcean API. +type StorageActionsServiceOp struct { + client *Client +} + +// StorageAttachment represents the attachement of a block storage +// volume to a specific Droplet under the device name. +type StorageAttachment struct { + DropletID int `json:"droplet_id"` +} + +// Attach a storage volume to a Droplet. +func (s *StorageActionsServiceOp) Attach(ctx context.Context, volumeID string, dropletID int) (*Action, *Response, error) { + request := &ActionRequest{ + "type": "attach", + "droplet_id": dropletID, + } + return s.doAction(ctx, volumeID, request) +} + +// DetachByDropletID a storage volume from a Droplet by Droplet ID. +func (s *StorageActionsServiceOp) DetachByDropletID(ctx context.Context, volumeID string, dropletID int) (*Action, *Response, error) { + request := &ActionRequest{ + "type": "detach", + "droplet_id": dropletID, + } + return s.doAction(ctx, volumeID, request) +} + +// Get an action for a particular storage volume by id. +func (s *StorageActionsServiceOp) Get(ctx context.Context, volumeID string, actionID int) (*Action, *Response, error) { + path := fmt.Sprintf("%s/%d", storageAllocationActionPath(volumeID), actionID) + return s.get(ctx, path) +} + +// List the actions for a particular storage volume. +func (s *StorageActionsServiceOp) List(ctx context.Context, volumeID string, opt *ListOptions) ([]Action, *Response, error) { + path := storageAllocationActionPath(volumeID) + path, err := addOptions(path, opt) + if err != nil { + return nil, nil, err + } + + return s.list(ctx, path) +} + +// Resize a storage volume. +func (s *StorageActionsServiceOp) Resize(ctx context.Context, volumeID string, sizeGigabytes int, regionSlug string) (*Action, *Response, error) { + request := &ActionRequest{ + "type": "resize", + "size_gigabytes": sizeGigabytes, + "region": regionSlug, + } + return s.doAction(ctx, volumeID, request) +} + +func (s *StorageActionsServiceOp) doAction(ctx context.Context, volumeID string, request *ActionRequest) (*Action, *Response, error) { + path := storageAllocationActionPath(volumeID) + + req, err := s.client.NewRequest(ctx, "POST", path, request) + if err != nil { + return nil, nil, err + } + + root := new(actionRoot) + resp, err := s.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Event, resp, err +} + +func (s *StorageActionsServiceOp) get(ctx context.Context, path string) (*Action, *Response, error) { + req, err := s.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(actionRoot) + resp, err := s.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Event, resp, err +} + +func (s *StorageActionsServiceOp) list(ctx context.Context, path string) ([]Action, *Response, error) { + req, err := s.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(actionsRoot) + resp, err := s.client.Do(req, root) + if err != nil { + return nil, resp, err + } + if l := root.Links; l != nil { + resp.Links = l + } + + return root.Actions, resp, err +} + +func storageAllocationActionPath(volumeID string) string { + return fmt.Sprintf("%s/%s/actions", storageAllocPath, volumeID) +} diff --git a/vendor/github.com/digitalocean/godo/strings.go b/vendor/github.com/digitalocean/godo/strings.go index bbdbc9241..4a8bfb636 100644 --- a/vendor/github.com/digitalocean/godo/strings.go +++ b/vendor/github.com/digitalocean/godo/strings.go @@ -3,6 +3,7 @@ package godo import ( "bytes" "fmt" + "io" "reflect" ) @@ -17,7 +18,7 @@ func Stringify(message interface{}) string { } // stringifyValue was graciously cargoculted from the goprotubuf library -func stringifyValue(w *bytes.Buffer, val reflect.Value) { +func stringifyValue(w io.Writer, val reflect.Value) { if val.Kind() == reflect.Ptr && val.IsNil() { _, _ = w.Write([]byte("")) return @@ -29,55 +30,63 @@ func stringifyValue(w *bytes.Buffer, val reflect.Value) { case reflect.String: fmt.Fprintf(w, `"%s"`, v) case reflect.Slice: - _, _ = w.Write([]byte{'['}) - for i := 0; i < v.Len(); i++ { - if i > 0 { - _, _ = w.Write([]byte{' '}) - } - - stringifyValue(w, v.Index(i)) - } - - _, _ = w.Write([]byte{']'}) + stringifySlice(w, v) return case reflect.Struct: - if v.Type().Name() != "" { - _, _ = w.Write([]byte(v.Type().String())) - } - - // special handling of Timestamp values - if v.Type() == timestampType { - fmt.Fprintf(w, "{%s}", v.Interface()) - return - } - - _, _ = w.Write([]byte{'{'}) - - var sep bool - for i := 0; i < v.NumField(); i++ { - fv := v.Field(i) - if fv.Kind() == reflect.Ptr && fv.IsNil() { - continue - } - if fv.Kind() == reflect.Slice && fv.IsNil() { - continue - } - - if sep { - _, _ = w.Write([]byte(", ")) - } else { - sep = true - } - - _, _ = w.Write([]byte(v.Type().Field(i).Name)) - _, _ = w.Write([]byte{':'}) - stringifyValue(w, fv) - } - - _, _ = w.Write([]byte{'}'}) + stringifyStruct(w, v) default: if v.CanInterface() { fmt.Fprint(w, v.Interface()) } } } + +func stringifySlice(w io.Writer, v reflect.Value) { + _, _ = w.Write([]byte{'['}) + for i := 0; i < v.Len(); i++ { + if i > 0 { + _, _ = w.Write([]byte{' '}) + } + + stringifyValue(w, v.Index(i)) + } + + _, _ = w.Write([]byte{']'}) +} + +func stringifyStruct(w io.Writer, v reflect.Value) { + if v.Type().Name() != "" { + _, _ = w.Write([]byte(v.Type().String())) + } + + // special handling of Timestamp values + if v.Type() == timestampType { + fmt.Fprintf(w, "{%s}", v.Interface()) + return + } + + _, _ = w.Write([]byte{'{'}) + + var sep bool + for i := 0; i < v.NumField(); i++ { + fv := v.Field(i) + if fv.Kind() == reflect.Ptr && fv.IsNil() { + continue + } + if fv.Kind() == reflect.Slice && fv.IsNil() { + continue + } + + if sep { + _, _ = w.Write([]byte(", ")) + } else { + sep = true + } + + _, _ = w.Write([]byte(v.Type().Field(i).Name)) + _, _ = w.Write([]byte{':'}) + stringifyValue(w, fv) + } + + _, _ = w.Write([]byte{'}'}) +} diff --git a/vendor/github.com/digitalocean/godo/tags.go b/vendor/github.com/digitalocean/godo/tags.go new file mode 100644 index 000000000..391864434 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/tags.go @@ -0,0 +1,207 @@ +package godo + +import ( + "context" + "fmt" +) + +const tagsBasePath = "v2/tags" + +// TagsService is an interface for interfacing with the tags +// endpoints of the DigitalOcean API +// See: https://developers.digitalocean.com/documentation/v2#tags +type TagsService interface { + List(context.Context, *ListOptions) ([]Tag, *Response, error) + Get(context.Context, string) (*Tag, *Response, error) + Create(context.Context, *TagCreateRequest) (*Tag, *Response, error) + Delete(context.Context, string) (*Response, error) + + TagResources(context.Context, string, *TagResourcesRequest) (*Response, error) + UntagResources(context.Context, string, *UntagResourcesRequest) (*Response, error) +} + +// TagsServiceOp handles communication with tag related method of the +// DigitalOcean API. +type TagsServiceOp struct { + client *Client +} + +var _ TagsService = &TagsServiceOp{} + +// ResourceType represents a class of resource, currently only droplet are supported +type ResourceType string + +const ( + //DropletResourceType holds the string representing our ResourceType of Droplet. + DropletResourceType ResourceType = "droplet" +) + +// Resource represent a single resource for associating/disassociating with tags +type Resource struct { + ID string `json:"resource_id,omit_empty"` + Type ResourceType `json:"resource_type,omit_empty"` +} + +// TaggedResources represent the set of resources a tag is attached to +type TaggedResources struct { + Droplets *TaggedDropletsResources `json:"droplets,omitempty"` +} + +// TaggedDropletsResources represent the droplet resources a tag is attached to +type TaggedDropletsResources struct { + Count int `json:"count,float64,omitempty"` + LastTagged *Droplet `json:"last_tagged,omitempty"` +} + +// Tag represent DigitalOcean tag +type Tag struct { + Name string `json:"name,omitempty"` + Resources *TaggedResources `json:"resources,omitempty"` +} + +//TagCreateRequest represents the JSON structure of a request of that type. +type TagCreateRequest struct { + Name string `json:"name"` +} + +// TagResourcesRequest represents the JSON structure of a request of that type. +type TagResourcesRequest struct { + Resources []Resource `json:"resources"` +} + +// UntagResourcesRequest represents the JSON structure of a request of that type. +type UntagResourcesRequest struct { + Resources []Resource `json:"resources"` +} + +type tagsRoot struct { + Tags []Tag `json:"tags"` + Links *Links `json:"links"` +} + +type tagRoot struct { + Tag *Tag `json:"tag"` +} + +// List all tags +func (s *TagsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Tag, *Response, error) { + path := tagsBasePath + path, err := addOptions(path, opt) + + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(tagsRoot) + resp, err := s.client.Do(req, root) + if err != nil { + return nil, resp, err + } + if l := root.Links; l != nil { + resp.Links = l + } + + return root.Tags, resp, err +} + +// Get a single tag +func (s *TagsServiceOp) Get(ctx context.Context, name string) (*Tag, *Response, error) { + path := fmt.Sprintf("%s/%s", tagsBasePath, name) + + req, err := s.client.NewRequest(ctx, "GET", path, nil) + if err != nil { + return nil, nil, err + } + + root := new(tagRoot) + resp, err := s.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Tag, resp, err +} + +// Create a new tag +func (s *TagsServiceOp) Create(ctx context.Context, createRequest *TagCreateRequest) (*Tag, *Response, error) { + if createRequest == nil { + return nil, nil, NewArgError("createRequest", "cannot be nil") + } + + req, err := s.client.NewRequest(ctx, "POST", tagsBasePath, createRequest) + if err != nil { + return nil, nil, err + } + + root := new(tagRoot) + resp, err := s.client.Do(req, root) + if err != nil { + return nil, resp, err + } + + return root.Tag, resp, err +} + +// Delete an existing tag +func (s *TagsServiceOp) Delete(ctx context.Context, name string) (*Response, error) { + if name == "" { + return nil, NewArgError("name", "cannot be empty") + } + + path := fmt.Sprintf("%s/%s", tagsBasePath, name) + req, err := s.client.NewRequest(ctx, "DELETE", path, nil) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(req, nil) + + return resp, err +} + +// TagResources associates resources with a given Tag. +func (s *TagsServiceOp) TagResources(ctx context.Context, name string, tagRequest *TagResourcesRequest) (*Response, error) { + if name == "" { + return nil, NewArgError("name", "cannot be empty") + } + + if tagRequest == nil { + return nil, NewArgError("tagRequest", "cannot be nil") + } + + path := fmt.Sprintf("%s/%s/resources", tagsBasePath, name) + req, err := s.client.NewRequest(ctx, "POST", path, tagRequest) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(req, nil) + + return resp, err +} + +// UntagResources dissociates resources with a given Tag. +func (s *TagsServiceOp) UntagResources(ctx context.Context, name string, untagRequest *UntagResourcesRequest) (*Response, error) { + if name == "" { + return nil, NewArgError("name", "cannot be empty") + } + + if untagRequest == nil { + return nil, NewArgError("tagRequest", "cannot be nil") + } + + path := fmt.Sprintf("%s/%s/resources", tagsBasePath, name) + req, err := s.client.NewRequest(ctx, "DELETE", path, untagRequest) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(req, nil) + + return resp, err +} diff --git a/vendor/github.com/mitchellh/cli/Makefile b/vendor/github.com/mitchellh/cli/Makefile new file mode 100644 index 000000000..4874b0082 --- /dev/null +++ b/vendor/github.com/mitchellh/cli/Makefile @@ -0,0 +1,20 @@ +TEST?=./... + +default: test + +# test runs the test suite and vets the code +test: + go list $(TEST) | xargs -n1 go test -timeout=60s -parallel=10 $(TESTARGS) + +# testrace runs the race checker +testrace: + go list $(TEST) | xargs -n1 go test -race $(TESTARGS) + +# updatedeps installs all the dependencies to run and build +updatedeps: + go list ./... \ + | xargs go list -f '{{ join .Deps "\n" }}{{ printf "\n" }}{{ join .TestImports "\n" }}' \ + | grep -v github.com/mitchellh/cli \ + | xargs go get -f -u -v + +.PHONY: test testrace updatedeps diff --git a/vendor/vendor.json b/vendor/vendor.json index 96dc50dd4..01a407f75 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -313,10 +313,11 @@ "revision": "d2709f9f1f31ebcda9651b03077758c1f3a0018c" }, { - "checksumSHA1": "tPavbOLszj9IKgu9ba2TIuRlWLc=", + "checksumSHA1": "W1LGm0UNirwMDVCMFv5vZrOpUJI=", "comment": "v0.9.0-24-g6ca5b77", "path": "github.com/digitalocean/godo", - "revision": "6ca5b770f203b82a0fca68d0941736458efa8a4f" + "revision": "4c04abe183f449bd9ede285f0e5c7ee575d0dbe4", + "revisionTime": "2017-04-07T15:15:42Z" }, { "checksumSHA1": "GCskdwYAPW2S34918Z5CgNMJ2Wc=", @@ -964,5 +965,5 @@ "revision": "860cbeca3ebcc600db0b213c0e83ad6ce91f5739" } ], - "rootPath": "github.com/mitchellh/packer" + "rootPath": "github.com/hashicorp/packer" } diff --git a/website/Makefile b/website/Makefile index 0e83eb946..d7620d1c2 100644 --- a/website/Makefile +++ b/website/Makefile @@ -1,14 +1,24 @@ VERSION?="0.3.22" +build: + @echo "==> Starting build in Docker..." + @docker run \ + --interactive \ + --rm \ + --tty \ + --volume "$(shell pwd):/website" \ + hashicorp/middleman-hashicorp:${VERSION} \ + bundle exec middleman build --verbose --clean + website: @echo "==> Starting website in Docker..." @docker run \ - --interactive \ - --rm \ + --interactive \ + --rm \ --tty \ --publish "4567:4567" \ --publish "35729:35729" \ --volume "$(shell pwd):/website" \ hashicorp/middleman-hashicorp:${VERSION} -.PHONY: website +.PHONY: build website diff --git a/website/config.rb b/website/config.rb index cefa4dbcb..a62d25d85 100644 --- a/website/config.rb +++ b/website/config.rb @@ -8,6 +8,15 @@ activate :hashicorp do |h| end helpers do + # Returns the FQDN of the image URL. + # + # @param [String] path + # + # @return [String] + def image_url(path) + File.join(base_url, image_path(path)) + end + # Get the title for the page. # # @param [Middleman::Page] page diff --git a/website/source/assets/files/press-kit.zip b/website/source/assets/files/press-kit.zip new file mode 100644 index 000000000..23bc7cca1 Binary files /dev/null and b/website/source/assets/files/press-kit.zip differ diff --git a/website/source/assets/images/logo-hashicorp.svg b/website/source/assets/images/logo-hashicorp.svg new file mode 100644 index 000000000..6ecaa8304 --- /dev/null +++ b/website/source/assets/images/logo-hashicorp.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/website/source/assets/images/og-image.png b/website/source/assets/images/og-image.png new file mode 100644 index 000000000..4dd21039b Binary files /dev/null and b/website/source/assets/images/og-image.png differ diff --git a/website/source/assets/images/screenshots/vmware_and_virtualbox.png b/website/source/assets/images/screenshots/vmware_and_virtualbox.png deleted file mode 100644 index 2e15ef9c6..000000000 Binary files a/website/source/assets/images/screenshots/vmware_and_virtualbox.png and /dev/null differ diff --git a/website/source/assets/stylesheets/_home.scss b/website/source/assets/stylesheets/_home.scss index f3734c2ad..dd5f5b5bf 100644 --- a/website/source/assets/stylesheets/_home.scss +++ b/website/source/assets/stylesheets/_home.scss @@ -1,8 +1,3 @@ -// TODO: remove -$hero-height: 350px; -$baseline: 20px; - - #page-home { // Override the main header #header { @@ -157,4 +152,46 @@ $baseline: 20px; } } } + + .terminal { + border: 1px solid $white; + background-color: $black; + box-sizing: border-box; + color: $white; + font-family: $font-family-monospace; + font-size: 14px; + line-height: 1.8; + margin: 20px auto; + padding: 10px 20px 20px 20px; + + .terminal-content { + margin-top: 15px; + overflow-x: scroll; + width: 100%; + white-space: nowrap; + + span { + display: block; + white-space: pre; + } + } + + span.circle { + &:before { + content: '\25CF'; + color: $white; + font-size: 20px; + line-height: 100%; + height: 100%; + } + } + + span.vbox { + color: rgb(91, 251, 90); + } + + span.vmware { + color: rgb(83, 255, 255); + } + } } diff --git a/website/source/assets/stylesheets/_inner.scss b/website/source/assets/stylesheets/_inner.scss index d20d71398..1fd41e3f3 100644 --- a/website/source/assets/stylesheets/_inner.scss +++ b/website/source/assets/stylesheets/_inner.scss @@ -12,10 +12,16 @@ margin-bottom: 0; } - pre { + pre, + code, + pre code, + tt { font-family: $font-family-monospace; - font-size: ($font-size - 3); - font-weight: normal; + font-size: $font-size - 2; + line-height: 1.6; + } + + pre { padding: 20px; margin: 0 0 $font-size; diff --git a/website/source/assets/stylesheets/_variables.scss b/website/source/assets/stylesheets/_variables.scss index 6fbd0d05e..c5a411572 100644 --- a/website/source/assets/stylesheets/_variables.scss +++ b/website/source/assets/stylesheets/_variables.scss @@ -4,17 +4,22 @@ $black: #000000; $gray: #555555; $gray-darker: #24292e; +$consul-pink: #D62783; +$consul-pink-dark: #961D59; $packer-blue: #1DAEFF; $packer-blue-dark: #1D94DD; +$terraform-purple: #5C4EE5; +$terraform-purple-dark: #4040B2; $vagrant-blue: #1563FF; $vagrant-blue-dark: #104EB2; $vault-black: #000000; $vault-blue: #00ABE0; +$vault-gray: #919FA8; // Typography -$font-family-klavika: 'klavika-web', 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; -$font-family-open-sans: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; -$font-family-monospace: 'Menlo', 'Monaco', 'Consolas', "Courier New", monospace; +$font-family-klavika: 'klavika-web', Helvetica, sans-serif; +$font-family-open-sans: 'Open Sans', sans-serif; +$font-family-monospace: 'Fira Mono', monospace; $font-size: 15px; $font-weight-reg: 400; $font-weight-bold: 600; diff --git a/website/source/assets/stylesheets/application.scss b/website/source/assets/stylesheets/application.scss index 791b81a0d..dac5547ca 100644 --- a/website/source/assets/stylesheets/application.scss +++ b/website/source/assets/stylesheets/application.scss @@ -1,7 +1,7 @@ @import 'bootstrap-sprockets'; @import 'bootstrap'; -@import url('//fonts.googleapis.com/css?family=Open+Sans:400,600'); +@import url('https://fonts.googleapis.com/css?family=Fira+Mono|Open+Sans:400,600'); // Core variables and mixins @import '_variables'; diff --git a/website/source/community.html.erb b/website/source/community.html.erb index e26b00be3..6fc8b332d 100644 --- a/website/source/community.html.erb +++ b/website/source/community.html.erb @@ -23,7 +23,7 @@ description: |-

Bug Tracker: - Issue tracker + Issue tracker on GitHub. Please only use this for reporting bugs. Do not ask for general help here. Use IRC or the mailing list for that.

diff --git a/website/source/docs/builders/amazon-ebssurrogate.html.md b/website/source/docs/builders/amazon-ebssurrogate.html.md index 230e28af2..ee5546845 100644 --- a/website/source/docs/builders/amazon-ebssurrogate.html.md +++ b/website/source/docs/builders/amazon-ebssurrogate.html.md @@ -324,33 +324,6 @@ builder. ## Basic Example -Here is a basic example. You will need to provide access keys, and may need to -change the AMI IDs according to what images exist at the time the template is run: - -```javascript -{ - "type": "amazon-ebs", - "access_key": "YOUR KEY HERE", - "secret_key": "YOUR SECRET KEY HERE", - "region": "us-east-1", - "source_ami": "ami-fce3c696", - "instance_type": "t2.micro", - "ssh_username": "ubuntu", - "ami_name": "packer-quick-start {{timestamp}}" -} -``` - --> **Note:** Packer can also read the access key and secret access key from -environmental variables. See the configuration reference in the section above -for more information on what environmental variables Packer will look for. - -Further information on locating AMI IDs and their relationship to instance types -and regions can be found in the AWS EC2 Documentation -[for Linux](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) -or [for Windows](http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/finding-an-ami.html). - -## Basic Example - ```javascript { "type" : "amazon-surrogate", diff --git a/website/source/docs/builders/azure-setup.html.md b/website/source/docs/builders/azure-setup.html.md index 882fd072d..0c0405844 100644 --- a/website/source/docs/builders/azure-setup.html.md +++ b/website/source/docs/builders/azure-setup.html.md @@ -61,7 +61,7 @@ $ npm install -g azure-cli --no-progress ## Guided Setup -The Packer project includes a [setup script](https://github.com/mitchellh/packer/blob/master/contrib/azure-setup.sh) that can help you setup your account. It uses an interactive bash script to log you into Azure, name your resources, and export your Packer configuration. +The Packer project includes a [setup script](https://github.com/hashicorp/packer/blob/master/contrib/azure-setup.sh) that can help you setup your account. It uses an interactive bash script to log you into Azure, name your resources, and export your Packer configuration. ## Manual Setup diff --git a/website/source/docs/builders/azure.html.md b/website/source/docs/builders/azure.html.md index d7f1ec0b4..5027ceb4c 100644 --- a/website/source/docs/builders/azure.html.md +++ b/website/source/docs/builders/azure.html.md @@ -151,7 +151,7 @@ Here is a basic example for Azure. Azure VMs should be deprovisioned at the end of every build. For Windows this means executing sysprep, and for Linux this means executing the waagent deprovision process. -Please refer to the Azure [examples](https://github.com/mitchellh/packer/tree/master/examples/azure) for complete examples showing the deprovision process. +Please refer to the Azure [examples](https://github.com/hashicorp/packer/tree/master/examples/azure) for complete examples showing the deprovision process. ### Windows @@ -286,5 +286,5 @@ minimal, so overall impact is small. > The KeyVault certificate is protected using the object_id of the SPN. This is why Windows builds require object_id, and an SPN. The KeyVault is deleted when the resource group is deleted. -See the [examples/azure](https://github.com/mitchellh/packer/tree/master/examples/azure) folder in the packer project +See the [examples/azure](https://github.com/hashicorp/packer/tree/master/examples/azure) folder in the packer project for more examples. diff --git a/website/source/docs/builders/digitalocean.html.md b/website/source/docs/builders/digitalocean.html.md index d704c3117..f84aeffe4 100644 --- a/website/source/docs/builders/digitalocean.html.md +++ b/website/source/docs/builders/digitalocean.html.md @@ -67,6 +67,9 @@ builder. - `private_networking` (boolean) - Set to `true` to enable private networking for the droplet being created. This defaults to `false`, or not enabled. +- `monitoring` (boolean) - Set to `true` to enable monitoring + for the droplet being created. This defaults to `false`, or not enabled. + - `snapshot_name` (string) - The name of the resulting snapshot that will appear in your account. This must be unique. To help make this unique, use a function like `timestamp` (see [configuration diff --git a/website/source/docs/builders/vmware-iso.html.md b/website/source/docs/builders/vmware-iso.html.md index b3b3bfa5d..377ab9018 100644 --- a/website/source/docs/builders/vmware-iso.html.md +++ b/website/source/docs/builders/vmware-iso.html.md @@ -401,7 +401,7 @@ Ubuntu 12.04 installer: The heart of a VMware machine is the "vmx" file. This contains all the virtual hardware metadata necessary for the VM to function. Packer by default uses a [safe, flexible VMX -file](https://github.com/mitchellh/packer/blob/20541a7eda085aa5cf35bfed5069592ca49d106e/builder/vmware/step_create_vmx.go#L84). +file](https://github.com/hashicorp/packer/blob/20541a7eda085aa5cf35bfed5069592ca49d106e/builder/vmware/step_create_vmx.go#L84). But for advanced users, this template can be customized. This allows Packer to build virtual machines of effectively any guest operating system type. diff --git a/website/source/docs/extending/custom-builders.html.md b/website/source/docs/extending/custom-builders.html.md index 484614550..6b5a7e708 100644 --- a/website/source/docs/extending/custom-builders.html.md +++ b/website/source/docs/extending/custom-builders.html.md @@ -123,7 +123,7 @@ the artifact results, so it is important it never changes. Other than the builder ID, the rest should be self-explanatory by reading the [packer.Artifact interface -documentation](https://github.com/mitchellh/packer/blob/master/packer/artifact.go). +documentation](https://github.com/hashicorp/packer/blob/master/packer/artifact.go). ## Provisioning @@ -166,5 +166,5 @@ The locking mechanisms of the cache allow one of the builders to download it only once, but allow both builders to share the downloaded file. The [documentation for -packer.Cache](https://github.com/mitchellh/packer/blob/master/packer/cache.go) +packer.Cache](https://github.com/hashicorp/packer/blob/master/packer/cache.go) is very detailed in how it works. diff --git a/website/source/docs/extending/custom-provisioners.html.md b/website/source/docs/extending/custom-provisioners.html.md index ffd3db38f..582a5704d 100644 --- a/website/source/docs/extending/custom-provisioners.html.md +++ b/website/source/docs/extending/custom-provisioners.html.md @@ -86,7 +86,7 @@ some sort) or it may be remote (in a cloud). The communicator interface abstracts this away so that communication is the same overall. The documentation around the [code -itself](https://github.com/mitchellh/packer/blob/master/packer/communicator.go) +itself](https://github.com/hashicorp/packer/blob/master/packer/communicator.go) is really great as an overview of how to use the interface. You should begin by reading this. Once you have read it, you can see some example usage below: diff --git a/website/source/docs/extending/plugins.html.md b/website/source/docs/extending/plugins.html.md index 894396ebf..97b8c4ebf 100644 --- a/website/source/docs/extending/plugins.html.md +++ b/website/source/docs/extending/plugins.html.md @@ -116,7 +116,7 @@ dependencies. - `github.com/mitchellh/packer` - Contains all the interfaces that you have to implement for any given plugin. -- `github.com/mitchellh/packer/packer/plugin` - Contains the code to serve +- `github.com/hashicorp/packer/packer/plugin` - Contains the code to serve the plugin. This handles all the inter-process communication stuff. There are two steps involved in creating a plugin: @@ -132,7 +132,7 @@ implements the `packer.Builder` interface: ```go import ( - "github.com/mitchellh/packer/packer/plugin" + "github.com/hashicorp/packer/packer/plugin" ) // Assume this implements packer.Builder diff --git a/website/source/docs/provisioners/ansible-local.html.md b/website/source/docs/provisioners/ansible-local.html.md index c79338624..2863f3baa 100644 --- a/website/source/docs/provisioners/ansible-local.html.md +++ b/website/source/docs/provisioners/ansible-local.html.md @@ -127,9 +127,12 @@ chi-appservers `staging_directory`/roles. By default, this is empty. - `staging_directory` (string) - The directory where all the configuration of - Ansible by Packer will be placed. By default this - is "/tmp/packer-provisioner-ansible-local". This directory doesn't need to - exist but must have proper permissions so that the SSH user that Packer uses - is able to create directories and write into this folder. If the permissions - are not correct, use a shell provisioner prior to this to configure - it properly. + Ansible by Packer will be placed. By default this is + `/tmp/packer-provisioner-ansible-local/`, where `` is replaced + with a unique ID so that this provisioner can be run more than once. If + you'd like to know the location of the staging directory in advance, you + should set this to a known location. This directory doesn't need to exist + but must have proper permissions so that the SSH user that Packer uses is + able to create directories and write into this folder. If the permissions + are not correct, use a shell provisioner prior to this to configure it + properly. diff --git a/website/source/docs/templates/user-variables.html.md b/website/source/docs/templates/user-variables.html.md index 0120a4cac..8ed42c921 100644 --- a/website/source/docs/templates/user-variables.html.md +++ b/website/source/docs/templates/user-variables.html.md @@ -60,8 +60,9 @@ validation will fail. Using the variables is extremely easy. Variables are used by calling the user function in the form of {{user \`variable\`}}. This function can be -used in *any value* within the template, in builders, provisioners, *anything*. -The user variable is available globally within the template. +used in *any value* within the template; in builders, provisioners, *anywhere +outside the `variables` section*. The user variable is available globally +within the rest of the template. ## Environment Variables diff --git a/website/source/downloads-community.html.md b/website/source/downloads-community.html.md index 4afef21d6..17d44525f 100644 --- a/website/source/downloads-community.html.md +++ b/website/source/downloads-community.html.md @@ -44,3 +44,38 @@ power of Packer templates. ## Other - [suitcase](https://github.com/tmclaugh/suitcase) - Packer based build system for CentOS OS images + +## Community Maintained Plugins + +The following plugins (i.e. Builders, Provisioners, and Post-Processors) are +maintained by HashiCorp. Any plugins not on this list are maintained by the +community, and not actively contributed to by HashiCorp, although they are +still distributed with Packer. + +### Builders + +- Amazon EC2 +- Azure +- Docker +- Google Cloud +- VMware +- VirtualBox + +### Provisioners + +- File +- PowerShell +- Shell +- Windows Restart +- Windows Shell + +### Post-Processors + +- Amazon Import +- Artifice +- Atlas +- Docker +- Local Shell +- Manifest +- Vagrant +- Vagrant Cloud diff --git a/website/source/downloads.html.erb b/website/source/downloads.html.erb index 83fd1d6ba..0b975246a 100644 --- a/website/source/downloads.html.erb +++ b/website/source/downloads.html.erb @@ -26,10 +26,10 @@ description: |- verify the checksums signature file which has been signed using HashiCorp's GPG key. - You can also download older versions of Packer from the releases service. + You can also download other versions of Packer from the releases service.

- Check out the v<%= latest_version %> CHANGELOG for information on the latest release. + Check out the v<%= latest_version %> CHANGELOG for information on the latest release.

diff --git a/website/source/index.html.erb b/website/source/index.html.erb index d5db63377..a204aac75 100644 --- a/website/source/index.html.erb +++ b/website/source/index.html.erb @@ -7,7 +7,8 @@ description: |-
-
+ +
<%= inline_svg "logo-text.svg", height: 120, class: "logo" %>

@@ -25,7 +26,34 @@ description: |-
- <%= image_tag 'screenshots/vmware_and_virtualbox.png', class: 'img-responsive' %> +
+ + + +
+ $ packer build template.json + ==> virtualbox: virtualbox output will be in this color. + ==> vmware: vmware output will be in this color. + + ==> vmware: Copying or downloading ISO. Progress will be reported periodically. + ==> vmware: Creating virtual machine disk + ==> vmware: Building and writing VMX file + ==> vmware: Starting HTTP server on port 8964 + ==> vmware: Starting virtual machine... + ==> virtualbox: Downloading VirtualBox guest additions. Progress will be shown periodically. + ==> virtualbox: Copying or downloading ISO. Progress will be reported periodically. + ==> virtualbox: Starting HTTP server on port 8081 + ==> virtualbox: Creating virtual machine... + ==> virtualbox: Creating hard drive... + ==> virtualbox: Creating forwarded port mapping for SSH (host port 3213) + ==> virtualbox: Executing custom VBoxManage commands... + virtualbox: Executing: modifyvm packer --memory 480 + virtualbox: Executing: modifyvm packer --cpus 1 + ==> virtualbox: Starting the virtual machine... + ==> vmware: Waiting 10s for boot... + ==> virtualbox: Waiting 10s for boot... +
+
Infrastructure as code diff --git a/website/source/intro/getting-started/install.html.md b/website/source/intro/getting-started/install.html.md index 3ccd45adb..a0efa616a 100644 --- a/website/source/intro/getting-started/install.html.md +++ b/website/source/intro/getting-started/install.html.md @@ -16,7 +16,7 @@ Packer must first be installed on the machine you want to run it on. To make installation easy, Packer is distributed as a [binary package](/downloads.html) for all supported platforms and architectures. This page will not cover how to compile Packer from source, as that is covered in the -[README](https://github.com/mitchellh/packer/blob/master/README.md) and is only +[README](https://github.com/hashicorp/packer/blob/master/README.md) and is only recommended for advanced users. ## Installing Packer diff --git a/website/source/layouts/_sidebar.erb b/website/source/layouts/_sidebar.erb index c5f72ea78..cc1073c85 100644 --- a/website/source/layouts/_sidebar.erb +++ b/website/source/layouts/_sidebar.erb @@ -10,6 +10,7 @@
  • Guides
  • Docs
  • Community
  • +
  • Press Kit
  • diff --git a/website/source/layouts/layout.erb b/website/source/layouts/layout.erb index e90572c85..f694ab007 100644 --- a/website/source/layouts/layout.erb +++ b/website/source/layouts/layout.erb @@ -14,6 +14,17 @@ + + + + + + + "/> + + + + <%= title_for(current_page) %> <%= stylesheet_link_tag "application" %> @@ -97,6 +108,7 @@
  • Docs
  • Community
  • Security
  • +
  • Press Kit