49 Commits

Author SHA1 Message Date
Chris Roberts
7e68e25994
Seed target and machine into plugins directly 2022-04-25 12:26:58 -05:00
sophia
6313596d62
Remove manual seeding of (guest and synced folder) plugins 2022-04-25 12:26:53 -05:00
sophia
ac18a1c001
Don't add a box to the db when querying the machine for it's box
If the box does not exist in the db, then a box will be returned
with the name and provider information. All other box information
at that point is unknown.
2022-04-25 12:26:45 -05:00
sophia
c60836fc12
Get box provider from target 2022-04-25 12:26:45 -05:00
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
7f0adfce78
Add tests for synced folders 2022-04-25 12:26:42 -05:00
sophia
727bf91b18
Raise error if no guest plugins found 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
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
Chris Roberts
acb32d33f7
Get parent count directly from plugin 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
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
1fe695bdf3
Use Vagrantfile info to configure target box 2022-04-25 12:26:06 -05:00
Chris Roberts
6b37b7ba55
Add seed functions and seed before running 2022-04-25 12:26:05 -05:00
sophia
8f8b5d2078
Return synced folders plugin along with synced folder info 2022-04-25 12:26:04 -05:00
sophia
847d87a017
Get synced folder from machine 2022-04-25 12:26:04 -05:00
sophia
de996a6047
Move box loading to machine 2022-04-25 12:26:01 -05:00
Chris Roberts
081fcad389
Update guest detection and parent loading in machine 2022-04-25 12:25:59 -05:00
sophia
2b93a26b50
Inject a box into the machine
This should be updated once the box collection and provider are
implemented in order to select the right box from the box
collection.
2022-04-25 12:25:54 -05:00
sophia
4335d9e7dd
Store box as part of machine object 2022-04-25 12:25:54 -05:00
sophia
f3b6f615ab
Get box from machine 2022-04-25 12:25:53 -05:00
sophia
62d7324bfc
go generate 2022-04-25 12:25:52 -05:00
sophia
f1f1b8c79d
Update parents -> parent 2022-04-25 12:24:48 -05:00
Chris Roberts
66d2a70291
Seed host and guest plugins 2022-04-25 12:24:45 -05:00
sophia
6b007f27bb
Detect guest for machine 2022-04-25 12:24:35 -05:00
sophia
a968b23636
Return a box from a machine 2022-04-25 12:24:13 -05:00
sophia
70a9f2b0d5
Specify machine when specializing a target 2022-04-25 12:24:13 -05:00
sophia
1a9f082194
Save a machine as a record inside a target 2022-04-25 12:24:13 -05:00
sophia
95c3e508c9
Return int32 for uid 2022-04-25 12:24:13 -05:00
sophia
0aa15c0759
Rename IndexUUID to GetUUID for consistency 2022-04-25 12:24:13 -05:00
Chris Roberts
29c3cf439b
Support passing exit code back to origin 2022-04-25 12:24:11 -05:00
sophia
5ecb1cdc26
Get/set machine id 2022-04-25 12:24:09 -05:00
Chris Roberts
5daf2f4260
Add core machine implementation 2022-04-25 12:24:08 -05:00
Chris Roberts
37c2e3fd51
Rename machine to target 2022-04-25 12:24:05 -05:00
sophia
3107da72af
Execute subcommands 2022-04-25 12:24:02 -05:00
sophia
c3ee750db1
Add gogo 2022-04-25 12:23:57 -05:00