15991 Commits

Author SHA1 Message Date
Chris Roberts
fda4aef9c7 Make server instance accessible, return integer value 2022-07-25 14:29:38 -07:00
Chris Roberts
d5e41e328e Check base command close for error and modify exitcode 2022-07-25 14:28:53 -07:00
Sophia Castellarin
c999147497
Merge pull request #321 from hashicorp/check-v1-box
Automatically update v1 boxes
2022-07-25 15:11:32 -05:00
sophia
2fc44897fd Bump sdk 2022-07-25 13:07:41 -05:00
sophia
5df47c8856 Check for existence of metatdata.json to determine if a box is v1 2022-07-25 13:05:48 -05:00
sophia
7678c28f65 Add warning about v1 boxes 2022-07-25 12:29:59 -05:00
sophia
0af2ff5709 Automatically update v1 boxes 2022-07-25 12:29:32 -05:00
Sophia Castellarin
fe4956ac83
Merge pull request #314 from hashicorp/ruby-load-global-plugins
Load global ruby plugins
2022-07-25 09:40:00 -05:00
Sophia Castellarin
8fedb6752e
Merge pull request #320 from hashicorp/add-some-dev-setup-docs
Add some info on developing with go
2022-07-20 15:59:37 -07:00
sophia
2d1b6aa629 Add some info on developing with go 2022-07-20 15:38:14 -07:00
Paul Hinze
092bf6ebc5
Merge pull request #319 from hashicorp/fix-provisioners
Fix crashes on Vagrantfiles with provisioners
2022-07-20 15:38:01 -07:00
Paul Hinze
9ab94f9971
Fix crashes on Vagrantfiles with provisioners
I forgot to handle nil in the new PluginOptions stuff, and options are
nil for Provisioner plugins.
2022-07-20 17:36:05 -05:00
Sophia Castellarin
7ccfff3ec2
Merge pull request #318 from hashicorp/provider-opts
Fix provider options typo
2022-07-18 12:38:18 -05:00
sophia
4f0082adfa Fix provider options typo 2022-07-18 10:03:01 -07:00
Sophia Castellarin
59a0a2a3a0
Merge pull request #313 from hashicorp/go-plugins-doc
Add docs for writing go based plugins
2022-07-18 11:07:13 -05:00
Paul Hinze
313905dde5
Merge pull request #317 from hashicorp/fix-help-subcommand
Band-aid to prevent help subcommand from erroring
2022-07-15 16:42:13 -05:00
Paul Hinze
1d2e487924
Merge pull request #312 from hashicorp/ruby-plugin-options
Bring plugin options back to Ruby for providers and synced folders
2022-07-15 16:41:59 -05:00
Paul Hinze
9d406a7361
bump sdk 2022-07-15 12:15:23 -05:00
Paul Hinze
a916cddf68
Re-enable pending test since box_optional works again 2022-07-15 12:14:47 -05:00
Paul Hinze
957d0d3779
Bring plugin options back to Ruby for providers and synced folders
This removes the need for the validation workaround for Docker, because
box_updated is once again available in that context.

We don't technically need the SyncedFolder priorities back on the Ruby
side, but wiring them through for symmetry.

Depends on https://github.com/hashicorp/vagrant-plugin-sdk/pull/183
2022-07-15 12:14:47 -05:00
Paul Hinze
f3dbc24a22
Band-aid to prevent help subcommand from erroring
The code running in the help subcommand relies on Command plugins being
returned from the manager with their options hash. Stubbing in a blank
hash prevents the command from crashing

What we really need is for CommandOptions to be modeled and passed
through from Go to Ruby so :primary subcommands can be displayed, but
that can be a follow-on task from this quick fix.
2022-07-15 11:25:50 -05:00
Paul Hinze
ae49b1f13f
Merge pull request #316 from hashicorp/fix-vbox-acctests
Fix virtualbox lifecycle acctests
2022-07-14 13:10:37 -05:00
sophia
b470522767 Add docs for writing go based plugins 2022-07-14 11:10:00 -05:00
Paul Hinze
da77316f9a
Fix virtualbox lifecycle acctests
Two fixes:

 1. Allow us to make it through Vagrant::Environment initialization when
    there's no project yet, fixing box add and init commands.
 2. Don't prune UNKNOWN targets from state... as VBox looks like it
    leaves things in that state when it runs suspend.
2022-07-13 18:36:11 -05:00
Paul Hinze
1235930d6f
Merge pull request #315 from hashicorp/fix-go-losing-track-of-docker-machines
Fix Docker machines being lost in go side
2022-07-13 14:49:29 -05:00
sophia
43bf758864 Bump sdk 2022-07-13 14:28:54 -05:00
sophia
5bc7218a70 Load global ruby plugins 2022-07-13 14:08:46 -05:00
Paul Hinze
8d46b09a11
Fix Docker machines being lost in go side
By pruning machines that are in "unknown" status after each operation,
the Go code path exposed the fact that the Docker provider was not
updating the machine index during an "up" - leaving the state as
"unknown".

This is basically a bug within the Docker provider, so I think it's okay
to update the plugin code to correct this rather than working around the
issue in Go.

All we need to do is call `machine.state` instead of reaching through to
`machine.provider.state` while waiting for the container to be started.
That causes the extra logic for updating the machine index in
`machine.state` to fire.
2022-07-13 14:04:32 -05:00
Sophia Castellarin
a517aaab51
Merge pull request #311 from hashicorp/vagrant-go-docs
Add docs for Vagrant-go
2022-07-13 13:39:47 -05:00
sophia
802c016fee Add docs for Vagrant-go 2022-07-13 13:39:20 -05:00
Chris Roberts
ad0a164871
Merge pull request #307 from hashicorp/global-status-fixes
Fix global status and more
2022-07-11 16:35:38 -07:00
Chris Roberts
bbc2265793 Update SDK 2022-07-11 16:34:22 -07:00
Chris Roberts
a7d3652920 Generated proto update 2022-07-11 15:10:03 -07:00
Chris Roberts
da9892a62f Use #to_proto on class match, otherwise convert 2022-07-11 15:09:46 -07:00
Chris Roberts
2572d4f62b Include class where error originated 2022-07-11 15:09:21 -07:00
Chris Roberts
e082fd6359 Machine mapper no longer needs to load through environment 2022-07-11 15:09:08 -07:00
Chris Roberts
67895c927e Allow a machine client to load its target 2022-07-11 15:08:53 -07:00
Chris Roberts
58fce40886 Add AsTarget() to machine and include nicer output 2022-07-11 15:08:08 -07:00
Chris Roberts
d5ec939022 Request target in spec and allow conversion to machine 2022-07-08 16:38:03 -07:00
Chris Roberts
d2ad38a607 Do not load provider during initialization 2022-07-08 16:38:03 -07:00
Chris Roberts
766b951040 Ensure config is set on basis/project during init 2022-07-08 16:38:03 -07:00
Chris Roberts
df42e88aab Attach project logger to target on scrub 2022-07-08 16:38:03 -07:00
Chris Roberts
23983d30d4 Reload project after target created in tests 2022-07-08 16:38:03 -07:00
Chris Roberts
410650117d Setup our logger so we get output on failures 2022-07-08 16:38:03 -07:00
Chris Roberts
6d0b5363c1 Update target init/scrub behavior on projects 2022-07-08 16:38:03 -07:00
Chris Roberts
7c28aa3ce8 Add Exists() helper to target 2022-07-08 16:38:02 -07:00
Chris Roberts
e78d0b6681 Close project in test to force full target removal 2022-07-08 16:38:02 -07:00
Chris Roberts
08bcc8e9c7 When unsetting machine ID, just set state to not created 2022-07-08 16:38:02 -07:00
Chris Roberts
df0a4342a6 When project is provided set ref into data 2022-07-08 16:38:02 -07:00
Chris Roberts
2c756b3c07 Update testing helpers to use factory 2022-07-08 16:38:02 -07:00