Commit Graph

94 Commits

Author SHA1 Message Date
Matthew Hooker 11de2b9759
remove unnecessary log line. 2018-04-19 16:13:24 -07:00
Matthew Hooker c6299972b9
s/boot_command/bootcommand/ 2018-04-19 14:26:31 -07:00
Matthew Hooker e662927623
Implement boot config struct for parallels 2018-04-19 14:26:30 -07:00
Matthew Hooker 94129b7fe3
we're using PC-XT (set1) not PC-AT 2018-04-19 14:26:30 -07:00
Matthew Hooker a46a7afa20
Remove old tests. 2018-04-19 14:26:29 -07:00
Matthew Hooker 59376294ef
Maximize scancode throughput.
Let's cache the scancodes and flush them at the end. Also make sure to
send only as many as the driver can send correctly. It's important here
to chunk the scancodes correctly, so that we don't accidentally split them
over successive calls to the driver
2018-04-19 14:26:29 -07:00
Matthew Hooker 9b7704c714
Implement new parser for Parallels boot command 2018-04-19 14:26:29 -07:00
Josh Soref dc942a0d8a spelling: first 2018-03-13 07:50:00 +00:00
Josh Soref 935c8e9a28 spelling: configuration 2018-03-13 08:19:16 +00:00
Josh Soref 47a4bbd9f5 spelling: compaction 2018-03-13 07:22:09 +00:00
Matthew Hooker 8cd403425e
test fixes WIP 2018-01-24 17:09:17 -08:00
Matthew Hooker 7a189a83a1
fix imports
`find . -type f -name '*.go' -not -path "./vendor/*" -exec goimports -w {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker a831d522be
change run signatures
Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.

`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker 366dc3da0a
move multistep imports to helper.
gomvpkg -from "github.com/mitchellh/multistep" -to "github.com/hashicorp/packer/helper/multistep"
2018-01-24 17:09:15 -08:00
Jake Champlin 2d3ee06ecd Remove LGPL dependencies
This changeset performs the following:

- Updates `masterzen/winrm` vendor to include change from (https://github.com/masterzen/winrm/pull/73).
- Removes `masterzen/xmlpath` dependency, as it is licensed under the LGPL license.
- Updates `dylanmei/winrmtest` vendor to include change from (https://github.com/dylanmei/winrmtest/pull/4).
- Updates `packer-community/winrmcp` vendor to include the removal of the `masterzen/winrm/winrm` sub-class as a result of the `winrm` CLI tool being removed from the `masterzen/winrm` repository.
- Updates nested dependencies as a result of the above vendor changes.
- Refactors `parallels/driver_9` to use `goxpath` instead of `xmlpath`, as `xmlpath` is licensed under LGPL.
- Adds a basic unit test for the refactor work in `parallels/driver_9` to confirm functionality.

This should completely remove any LGPL licensed dependencies inside of the Packer project.

```
$ make test
/home/jake/src/go/src/github.com/hashicorp/packer/scripts/gofmtcheck.sh $(find . -not -path "./vendor/*" -name "*.go")
==> Checking that code complies with gofmt requirements...
Check passed.
ok      github.com/hashicorp/packer     0.044s
ok      github.com/hashicorp/packer/builder/alicloud/ecs        0.055s
ok      github.com/hashicorp/packer/builder/amazon/chroot       0.040s
ok      github.com/hashicorp/packer/builder/amazon/common       0.021s
ok      github.com/hashicorp/packer/builder/amazon/ebs  0.016s
ok      github.com/hashicorp/packer/builder/amazon/ebssurrogate 0.015s
ok      github.com/hashicorp/packer/builder/amazon/ebsvolume    0.014s
ok      github.com/hashicorp/packer/builder/amazon/instance     0.058s
ok      github.com/hashicorp/packer/builder/azure/arm   2.833s
ok      github.com/hashicorp/packer/builder/azure/common        0.018s
?       github.com/hashicorp/packer/builder/azure/common/constants      [no test files]
?       github.com/hashicorp/packer/builder/azure/common/lin    [no test files]
?       github.com/hashicorp/packer/builder/azure/common/logutil        [no test files]
ok      github.com/hashicorp/packer/builder/azure/common/template       0.038s
ok      github.com/hashicorp/packer/builder/azure/pkcs12        0.120s
ok      github.com/hashicorp/packer/builder/azure/pkcs12/rc2    0.020s
ok      github.com/hashicorp/packer/builder/cloudstack  0.038s
ok      github.com/hashicorp/packer/builder/digitalocean        0.015s
ok      github.com/hashicorp/packer/builder/docker      0.028s
ok      github.com/hashicorp/packer/builder/file        0.029s
ok      github.com/hashicorp/packer/builder/googlecompute       3.162s
ok      github.com/hashicorp/packer/builder/hyperv/common       0.006s
ok      github.com/hashicorp/packer/builder/hyperv/iso  0.042s
ok      github.com/hashicorp/packer/builder/null        0.018s
ok      github.com/hashicorp/packer/builder/oneandone   0.022s
ok      github.com/hashicorp/packer/builder/openstack   0.052s
ok      github.com/hashicorp/packer/builder/parallels/common    2.549s
ok      github.com/hashicorp/packer/builder/parallels/iso       0.050s
ok      github.com/hashicorp/packer/builder/parallels/pvm       0.033s
ok      github.com/hashicorp/packer/builder/profitbricks        0.023s
ok      github.com/hashicorp/packer/builder/qemu        0.039s
ok      github.com/hashicorp/packer/builder/triton      0.018s
ok      github.com/hashicorp/packer/builder/virtualbox/common   5.533s
ok      github.com/hashicorp/packer/builder/virtualbox/iso      0.044s
ok      github.com/hashicorp/packer/builder/virtualbox/ovf      0.012s
ok      github.com/hashicorp/packer/builder/vmware/common       5.325s
ok      github.com/hashicorp/packer/builder/vmware/iso  0.076s
ok      github.com/hashicorp/packer/builder/vmware/vmx  0.010s
ok      github.com/hashicorp/packer/command     0.062s
ok      github.com/hashicorp/packer/common      0.053s
ok      github.com/hashicorp/packer/common/json 0.003s [no tests to run]
ok      github.com/hashicorp/packer/common/powershell   0.015s
?       github.com/hashicorp/packer/common/powershell/hyperv    [no test files]
?       github.com/hashicorp/packer/common/ssh  [no test files]
ok      github.com/hashicorp/packer/common/uuid 0.010s
ok      github.com/hashicorp/packer/communicator/none   0.008s
ok      github.com/hashicorp/packer/communicator/ssh    0.068s
ok      github.com/hashicorp/packer/communicator/winrm  0.046s
ok      github.com/hashicorp/packer/fix 0.005s
ok      github.com/hashicorp/packer/helper/builder/testing      0.007s
ok      github.com/hashicorp/packer/helper/communicator 0.013s
ok      github.com/hashicorp/packer/helper/config       0.004s
?       github.com/hashicorp/packer/helper/enumflag     [no test files]
ok      github.com/hashicorp/packer/helper/flag-kv      0.009s
ok      github.com/hashicorp/packer/helper/flag-slice   0.006s
ok      github.com/hashicorp/packer/packer      0.219s
ok      github.com/hashicorp/packer/packer/plugin       0.233s
ok      github.com/hashicorp/packer/packer/rpc  0.141s
ok      github.com/hashicorp/packer/plugin/example      0.008s [no tests to run]
?       github.com/hashicorp/packer/post-processor/alicloud-import      [no test files]
?       github.com/hashicorp/packer/post-processor/amazon-import        [no test files]
ok      github.com/hashicorp/packer/post-processor/artifice     0.003s [no tests to run]
ok      github.com/hashicorp/packer/post-processor/atlas        0.018s
ok      github.com/hashicorp/packer/post-processor/checksum     0.015s
ok      github.com/hashicorp/packer/post-processor/compress     0.047s
ok      github.com/hashicorp/packer/post-processor/docker-import        0.012s
ok      github.com/hashicorp/packer/post-processor/docker-push  0.012s
ok      github.com/hashicorp/packer/post-processor/docker-save  0.008s
ok      github.com/hashicorp/packer/post-processor/docker-tag   0.008s
ok      github.com/hashicorp/packer/post-processor/googlecompute-export 0.015s [no tests to run]
?       github.com/hashicorp/packer/post-processor/manifest     [no test files]
ok      github.com/hashicorp/packer/post-processor/shell-local  0.028s
ok      github.com/hashicorp/packer/post-processor/vagrant      0.030s
ok      github.com/hashicorp/packer/post-processor/vagrant-cloud        0.028s
ok      github.com/hashicorp/packer/post-processor/vsphere      0.014s
ok      github.com/hashicorp/packer/provisioner 0.011s
ok      github.com/hashicorp/packer/provisioner/ansible 0.140s
ok      github.com/hashicorp/packer/provisioner/ansible-local   0.056s
ok      github.com/hashicorp/packer/provisioner/chef-client     0.050s
ok      github.com/hashicorp/packer/provisioner/chef-solo       0.061s
ok      github.com/hashicorp/packer/provisioner/converge        0.018s
ok      github.com/hashicorp/packer/provisioner/file    0.015s
ok      github.com/hashicorp/packer/provisioner/powershell      0.168s
ok      github.com/hashicorp/packer/provisioner/puppet-masterless       0.008s
ok      github.com/hashicorp/packer/provisioner/puppet-server   0.031s
ok      github.com/hashicorp/packer/provisioner/salt-masterless 0.010s
ok      github.com/hashicorp/packer/provisioner/shell   0.010s
ok      github.com/hashicorp/packer/provisioner/shell-local     0.037s
ok      github.com/hashicorp/packer/provisioner/windows-restart 0.180s
ok      github.com/hashicorp/packer/provisioner/windows-shell   0.159s
?       github.com/hashicorp/packer/scripts     [no test files]
ok      github.com/hashicorp/packer/template    0.008s
ok      github.com/hashicorp/packer/template/interpolate        0.004s
?       github.com/hashicorp/packer/version     [no test files]
```
2017-08-30 12:10:12 -07:00
Andy Goldstein c6dba6c051 Parallels: skip missing paths when looking for unnecessary files 2017-06-23 14:29:07 -04:00
Matthew Hooker ee5d13611f
update ssh client usage for new crypto/ssh version 2017-05-18 12:01:44 -07:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker 230079f73a
spell fixes 2017-03-28 20:36:19 -07:00
Matthew Hooker 22d1322bd9
always check for an error first when walking a path 2017-01-26 16:32:21 -08:00
Matthew Hooker f1175c1921
parallels/vmware: don't wait for shutdown command.
Resolves #4134

replaces/ closes #4379

Leaving Hyper-V builder alone for now until we can get a case that reproduces.
2017-01-20 01:44:18 -08:00
Matthew Hooker d2e59e4e92
set PACKER_HTTP_ADDR env var when available.
If using a builder that has an http server set up for file transfer,
expose the connection info to the shell provisioner through the environment
variable PACKER_HTTP_ADDR.

Closes #2869
2017-01-16 23:19:52 -08:00
Mikhail Zholobov aa623e22a3
golint: Add comments for exported methods 2016-12-17 00:37:04 +02:00
Mikhail Zholobov 73d87b07de
golint: Fix lint offences 2016-12-17 00:37:03 +02:00
Mikhail Zholobov 00a90e622b
Remove unused constant "KeyLeftShift" 2016-12-17 00:37:03 +02:00
Mikhail Zholobov 1ca841b499
Fix shadowed declarations
Performed by "go vet" tool
2016-12-17 00:37:03 +02:00
Mikhail Zholobov dde445bd0d
Fix style: Organize imports in groups
Performed by "goimports" tool
Style conventions: https://github.com/golang/go/wiki/CodeReviewComments#imports
2016-12-17 00:37:03 +02:00
Mikhail Zholobov 319b85cb7a
Fix style: Use a consistent case for initialisms
https://github.com/golang/go/wiki/CodeReviewComments#initialisms
2016-12-17 00:36:56 +02:00
Rickard von Essen 96e9a8e6e9 Removed default value for ssh_username 2016-11-17 22:30:34 +01:00
Matthew Hooker d920b3fbf4 run gofmt 2016-11-01 14:08:04 -07:00
Rickard von Essen 06e3539ffa Merge pull request #3767 from taliesins/ExtendScanCodes
Add support for ctrl, shift and alt keys and using them as key modifier.
2016-09-20 21:36:46 +02:00
Taliesin Sisson a87ad05866 Add support for ctrl, shift and alt keys.
Add support for using ctrl, shift and alt as key modifiers. So you can now achieve ctrl+c by using "<leftCtrlOn>c<leftCtrlOff>".

Updated documentation for new key stroke tokens.
2016-07-31 19:05:10 +01:00
Ricard Clau acededfc6e tests actually test the floppies 2016-07-27 21:59:21 +01:00
Rickard von Essen fb00d07d20 Support future versions of Parallels by using the latest driver
If the Parallels Desktop for Mac version is higher than the latest
Packer driver use the latest available driver. Before this Packer needed
to be updated with every new version of PD even if there was no change
to the driver.
2016-07-02 22:18:54 +02:00
Sean Chittenden ef42021f8f Fix unit tests, broken in #3549. (#3548) 2016-05-17 15:42:15 -07:00
Sean Chittenden d0fd698fb5
Pause between boot_commands when debugging a Parallels build
When debugging a build (or maintaining an existing packer file), teach `packer build -debug` how to step through individual `boot_command`s in order to triage the packer template.
2016-05-17 17:10:10 -04:00
Rickard von Essen 46f74d8347 Parallels: Support relative paths in output_directory
Fixes #3238
2016-02-21 16:52:51 +01:00
James Bishopp bd8fb014c4 Removed ssh_key_path
- removed backwards compatibility code
- ensured key usage came from SSHPrivateKey configuration
- changed tests to use private_key
2016-02-12 17:24:42 -08:00
Rickard von Essen 4015c1789b Fixes #2836 - Use "/Applications/Parallels Desktop.app" as fallback app path. 2015-10-16 19:57:39 +02:00
Chris Bednarski f01956405b Merge pull request #2654 from mitchellh/b-xmlpath
Update dependency to an SSL-enabled path; this was migrated from launchpad to github
2015-10-12 16:39:35 -07:00
Rickard von Essen 3f14b9d984 Merge pull request #2731 from legal90/prl-compact-disk
Parallels: Add "CompactDisk" build step
2015-09-16 14:03:31 +02:00
Mikhail Zholobov abfe706fc6 builder/parallels: Add "StepCompactDisk" 2015-09-11 11:38:20 +03:00
Mikhail Zholobov f7b26e44fe builder/parallels: Add "CompactDisk" driver function
This function compacts the specified virtual disk image.
2015-09-11 11:37:52 +03:00
Mikhail Zholobov 4ebee7bf3f builder/parallels: Add "DiskPath" driver function
This function determines path to the first virtual disk image of the specified virtual machine.
2015-09-05 13:08:24 +03:00
Rickard von Essen 83980d2326 Enable headless mode by default on Parallels Desktop 11 2015-08-24 15:09:29 +02:00
Rickard von Essen 7d3afc882a Add check for Parallels Desktop edition in PD 11.
Starting since Parallels Desktop 11, the command line functionality is
available only in Pro and Business editions.
2015-08-22 13:15:59 +02:00
Chris Bednarski 0a79546cf9 Update dependency to an SSL-enabled path; this was migrated from launchpad to github 2015-08-21 17:17:56 -07:00
Rickard von Essen 5a6bcdeb78 Fix interpolation of {{.Flavor}} in parallels_tools_guest_path.
Fixes [GH-2543]
2015-08-12 01:34:08 +02:00
Mitchell Hashimoto 1aa1399e85 builder/parallels: fix compilation issuse 2015-06-22 12:46:13 -07:00
Mitchell Hashimoto 13c2c4660d Merge branch 'issue_2080' of https://github.com/rickard-von-essen/packer into rickard-von-essen-issue_2080 2015-06-22 12:39:30 -07:00