15970 Commits

Author SHA1 Message Date
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
ae49b1f13f
Merge pull request #316 from hashicorp/fix-vbox-acctests
Fix virtualbox lifecycle acctests
2022-07-14 13:10:37 -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
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
Chris Roberts
2c35229013 Perform target lookup to validate exist and name 2022-07-08 16:38:02 -07:00
Chris Roberts
9fe9492875 Only store configuration if vagrantfile defined 2022-07-08 16:38:02 -07:00
Chris Roberts
bdf1cfe6bf Set test target state to created 2022-07-08 16:38:02 -07:00
Chris Roberts
762fac3ae6 Init project config and only save if vagrantfile defined 2022-07-08 16:38:02 -07:00
Chris Roberts
0a4b9c9019 Always save the target when saving machine 2022-07-08 16:38:02 -07:00
Chris Roberts
5619341880 Use factory values only if provided options left unset 2022-07-08 16:38:02 -07:00
Chris Roberts
a3b32bdf60 Default configuration data, only store if vagrantfile defined 2022-07-08 16:38:02 -07:00
Chris Roberts
0f7c4f25c1 Load target in index via factory. Filter targets. 2022-07-08 16:38:02 -07:00
Chris Roberts
4dd69a07a3 Generated proto updates for vagrantfile 2022-07-08 16:38:02 -07:00
Chris Roberts
3c88c9ca7d Support individual value fetching from vagrantfile 2022-07-08 16:38:02 -07:00
Chris Roberts
19b4adb3b8 Implement get_value rpc in vagrantfile client 2022-07-08 16:38:02 -07:00
Chris Roberts
e959369a0b Use factory for scope loading in runner 2022-07-08 16:38:02 -07:00
Chris Roberts
5df92814c7 Update function call name fo init operation 2022-07-08 16:38:02 -07:00
Chris Roberts
51d8c84740 Refactor how scopes are created and initialized 2022-07-08 16:38:02 -07:00
Chris Roberts
b82d55cc37 Update vagrantfile to load machines via factory 2022-07-08 16:38:02 -07:00
Chris Roberts
81754f4f9a Add logging when using cache version and closing instance 2022-07-08 16:38:02 -07:00
Chris Roberts
50dd39c5f4 Update factory to build scope types 2022-07-08 16:38:02 -07:00
Paul Hinze
27d08534cf
Merge pull request #309 from hashicorp/fix-docker-by-supporting-machine-with-no-box
Make Docker provider work again post config refactor
2022-07-08 15:07:00 -05:00
Sophia Castellarin
45882c7847
Merge pull request #310 from hashicorp/active-machines
Environment#active_machines should return a list of  tuple
2022-07-08 13:36:58 -05:00
Paul Hinze
23db31bde3
bump sdk 2022-07-08 13:14:05 -05:00
sophia
a6caa47f8e Environment#active_machines should return a list of tuple
The tuple should be compsed of the machine name (as a string)
and provider name (as a symbol)
2022-07-08 11:41:18 -05:00