52 Commits

Author SHA1 Message Date
Paul Hinze
61fbd0f622
Move Basis, Project, and Target seeding earlier
Having these objects populate their seeds during `Run` was too late for
those values to show up in command plugins, which would be seeded with
empty args instead.

h/t @chrisroberts for the debugging help and fix suggestion!
2022-04-25 12:26:47 -05:00
sophia
8547cb696d
Test project 2022-04-25 12:26:42 -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
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
36dbd73945
Add endpoint for accessing basis/project/target config 2022-04-25 12:26:06 -05:00
sophia
0153f75b09
Remove unused core components 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
de996a6047
Move box loading to machine 2022-04-25 12:26:01 -05:00
sophia
d49944a25d
Only init targets when running a job scoped at the project or target 2022-04-25 12:26:01 -05:00
Chris Roberts
a2147ed27f
Update basis ResourceId to match interface 2022-04-25 12:25:59 -05:00
sophia
d786649e03
Add box if not found in box collection 2022-04-25 12:25:55 -05:00
sophia
2dfb9b933e
Get boxes from project 2022-04-25 12:25:55 -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
Chris Roberts
7595f1533f
Enable plugin mappers 2022-04-25 12:25:50 -05:00
Chris Roberts
7cc07642a5
Use project for host capabilities 2022-04-25 12:24:47 -05:00
sophia
b30bbcb13a
Don't check for 'found' in basis/project/target query results 2022-04-25 12:24:39 -05:00
sophia
591dcced22
Remotve machine names function from project 2022-04-25 12:24:37 -05:00
sophia
5ca687cad4
Implement project home path, cwd and default private key 2022-04-25 12:24:36 -05:00
Chris Roberts
8b8f5adf67
Defer the unlock when loading target 2022-04-25 12:24:31 -05:00
Chris Roberts
c562132e11
Update save behavior of project and get target index from basis 2022-04-25 12:24:31 -05:00
Chris Roberts
9319409d45
Load all targets defined within project 2022-04-25 12:24:29 -05:00
Chris Roberts
b9478e7eee
Load target when not already loaded 2022-04-25 12:24:29 -05:00
sophia
806f6e7399
Set a target dir when loading from a project 2022-04-25 12:24:29 -05:00
sophia
10a1f1011b
Get datadir for machine and project 2022-04-25 12:24:29 -05:00
sophia
3e74501d26
Get full path to Vagrantfile without Vagrantfile name 2022-04-25 12:24:28 -05:00
sophia
6cde007530
Get Vagrantfile path from project 2022-04-25 12:24:28 -05:00
sophia
6eea1b0afd
Add endpoint for getting all machines from the index 2022-04-25 12:24:27 -05:00
sophia
b22c128671
Get a target from target index 2022-04-25 12:24:26 -05:00
sophia
551aa2970f
Rename machine index to target index 2022-04-25 12:24:25 -05:00
sophia
16f3ba3574
Setup machine index class 2022-04-25 12:24:25 -05:00
Chris Roberts
d16eee410f
Add target initialization when loading project 2022-04-25 12:24:24 -05:00
Chris Roberts
e10cd26407
Use plugin manager for plugins. Remove component specialization. 2022-04-25 12:24:22 -05:00
sophia
5fc4cdcc98
Setup project for testing 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
Chris Roberts
716bcc694a
Update core to use shared dynamic functions 2022-04-25 12:24:10 -05:00
Chris Roberts
05d5634c83
Host component related work 2022-04-25 12:24:10 -05:00
sophia
e4c0f09925
HasCapability working 2022-04-25 12:24:10 -05:00
sophia
3c52682226
Host mapper to connect to already running host process 2022-04-25 12:24:09 -05:00
sophia
88bcb0378e
Save point - broken 2022-04-25 12:24:09 -05:00
Chris Roberts
af409b3f4d
Clean up types to match interface 2022-04-25 12:24:09 -05:00
Chris Roberts
c2d19f7a95
Move functions from machine to target. Clean arguments for dynamic call 2022-04-25 12:24:08 -05:00
Chris Roberts
3cfa9e3b00
Pass scopes to components directly, allow them to be mapped automatically 2022-04-25 12:24:07 -05:00
Chris Roberts
c1da0ab1b4
Target updates, labels removal, and broker addition for creating core plugins 2022-04-25 12:24:06 -05:00
Chris Roberts
17829ff355
Start core updates to make them usable by plugins 2022-04-25 12:24:06 -05:00
sophia
9b3d07382a
Enable multi ui to check for interactive uis 2022-04-25 12:24:04 -05:00
sophia
aff6edc31b
Add plugin command that uses interactive input 2022-04-25 12:24:04 -05:00
sophia
4dce4d148d
Specify which command to get command info from 2022-04-25 12:24:02 -05:00
sophia
3107da72af
Execute subcommands 2022-04-25 12:24:02 -05:00
sophia
66300d9d32
Execute subcommands 2022-04-25 12:24:01 -05:00