Paul Hinze
7c1d2e5368
Use optional fields on Synced Folder instead of empty string checks
...
Addresses concerns raised in discussion here
https://github.com/hashicorp/vagrant-ruby/pull/219#discussion_r816966056
and makes it so we don't have to change any plugin code to make things
work.
Depends on https://github.com/hashicorp/vagrant-plugin-sdk/pull/133
2022-04-25 12:26:44 -05:00
sophia
e6c50e3d7e
Add target index tests
2022-04-25 12:26:42 -05:00
sophia
dffa7547e8
Simplify target index to keep track of basis opposed to loading one in from the factory
2022-04-25 12:26:42 -05:00
sophia
8547cb696d
Test project
2022-04-25 12:26:42 -05:00
sophia
9179dd1abc
Use ptypes to generate testing target
2022-04-25 12:26:42 -05:00
sophia
26621c7e0b
Add tests for state bag
2022-04-25 12:26:42 -05:00
sophia
0731b5486a
Add tests for basis
2022-04-25 12:26:42 -05:00
sophia
7f0adfce78
Add tests for synced folders
2022-04-25 12:26:42 -05:00
sophia
13283a0a71
Add tests for setting machine state
2022-04-25 12:26:41 -05:00
sophia
6abbb5e8eb
Check for plugin name correctness
2022-04-25 12:26:41 -05:00
sophia
b33f1a9e01
Test guest plugin with parent
2022-04-25 12:26:41 -05:00
sophia
df0fb642b0
Add ability to get plugin with a particular instance
2022-04-25 12:26:41 -05:00
sophia
06cfbb79bf
Add more tests for guest detection
2022-04-25 12:26:41 -05:00
sophia
16e415f929
AUse test table to test for multiple configs
2022-04-25 12:26:41 -05:00
sophia
4068760588
Make test for getting guest from machine work
2022-04-25 12:26:41 -05:00
sophia
8f95994a88
Create test dummy plugins
2022-04-25 12:26:41 -05:00
sophia
1117e06e38
Add testing plugin and plugin manager
2022-04-25 12:26:40 -05:00
sophia
83921cf3f9
Add minimal project for tests
2022-04-25 12:26:40 -05:00
sophia
fb642616a8
Add minimal Machine/Target setup
2022-04-25 12:26:40 -05:00
sophia
147d4f3964
Seperate out testing target/project/basis
2022-04-25 12:26:40 -05:00
sophia
dea5156882
Test options for machine
2022-04-25 12:26:40 -05:00
sophia
727bf91b18
Raise error if no guest plugins found
2022-04-25 12:26:40 -05:00
sophia
1cfbea7437
Testing guest detection
2022-04-25 12:26:40 -05:00
sophia
70d0d4dfb8
Allow tests to set target config for test target
2022-04-25 12:26:40 -05:00
Chris Roberts
64751ae8b9
Update machine ID storage to prevent lost ID
2022-04-25 12:26:39 -05:00
sophia
2519b9b6ac
Clear target record when destroying machine
2022-04-25 12:26:38 -05:00
Chris Roberts
b10ff0d51d
Sort guest plugins before running detection
...
When detecting the machine guest, first sort the guest plugins
by the number of ancestors. This allows for returning on the
first match instead of requiring running the detection process
on every registered guest plugin.
2022-04-25 12:26:36 -05:00
sophia
6daa8d52a2
Remove code for avoiding duped synced folders in config
2022-04-25 12:26:34 -05:00
sophia
19f3d2f0b6
Refactor named plugin bits to apply to all components
2022-04-25 12:26:33 -05:00
sophia
153d218d68
Set plugin name
2022-04-25 12:26:32 -05:00
Chris Roberts
14fa44a449
Update to use command info from sdk
2022-04-25 12:26:32 -05:00
Chris Roberts
bf393065fa
Update guest and synced folder plugin loading to seed machine
2022-04-25 12:26:31 -05:00
sophia
896cdea21f
Delete machine from db
2022-04-25 12:26:23 -05:00
sophia
3dbd9286be
Merge targets with upserting
2022-04-25 12:26:23 -05:00
sophia
12de22a7db
Get machine state
2022-04-25 12:26:23 -05:00
sophia
8a39ee6960
Set target state in addition to machine state
2022-04-25 12:26:22 -05:00
sophia
5ed50277bd
Find target in index by uuid or name
2022-04-25 12:26:22 -05:00
Chris Roberts
3933632216
Update flag mappers to use generic component flag struct
2022-04-25 12:26:21 -05:00
Paul Hinze
92c345b42d
Allow go push plugins to use config from Vagrantfile
...
* Populate push configs when parsing the vagrantfile
* Allow untyped configs to be shipped over GRPC
* In our demo plugin, walk the vagrantfile and snag the config
Example Vagrantfile that works with the demo plugin:
```ruby
Vagrant.configure("2") do |config|
config.push.define "myplugin" do |push|
push.coolkey = "coolvalue"
push.alist = ["so", "many", "items"]
push.ahash = { "hashkey" => "hashvalue" }
end
end
```
2022-04-25 12:26:21 -05:00
sophia
aeda0ec039
Pass error status with job completion results
2022-04-25 12:26:20 -05:00
Chris Roberts
acb32d33f7
Get parent count directly from plugin
2022-04-25 12:26:14 -05:00
Chris Roberts
1155e7be21
Configure plugins and use plugin local functions
2022-04-25 12:26:14 -05:00
sophia
9ea254735a
Set target uuid opposed to resource id
...
The uuid is the public identifier vs the resource id which should
be for internal operations.
The target uuid should correspond to the machine id (given by
the provider)
2022-04-25 12:26:13 -05:00
sophia
63a4b76c21
Add tests for setting machine id
2022-04-25 12:26:13 -05:00
sophia
294293097c
Set empty machine id when destroying
2022-04-25 12:26:13 -05:00
Paul Hinze
2460961749
Switch to centralized VagrantCWD implementation
...
Now depends on https://github.com/hashicorp/vagrant-plugin-sdk/pull/104
2022-04-25 12:26:12 -05:00
sophia
ea680d78f7
Seed synced folder plugins with machine
2022-04-25 12:26:12 -05:00
sophia
a86bf277aa
Use guest specified in vagrantfile if available
2022-04-25 12:26:11 -05:00
sophia
31e57414b4
Destroy machine + remove data dir when machine id is set to empty value
2022-04-25 12:26:11 -05:00
sophia
ba1dd33fff
Include seeds in ruby communicator
2022-04-25 12:26:09 -05:00