433 Commits

Author SHA1 Message Date
Chris Roberts
4215232317
Include documentation on seedPlugin function 2022-04-25 12:26:58 -05:00
Chris Roberts
7e68e25994
Seed target and machine into plugins directly 2022-04-25 12:26:58 -05:00
Chris Roberts
373fc9c7b4
Helper for adding individual seed to plugin 2022-04-25 12:26:58 -05:00
sophia
016a9a0efc
Remove box metadata ToMap functions
Box metadata is no longer passed around as a map. Instead it is
it's own service.
2022-04-25 12:26:57 -05:00
sophia
cddcfef0a1
Update Box#UpdateInfo to use box metadata client 2022-04-25 12:26:57 -05:00
sophia
e27e6c7871
Map box metadata 2022-04-25 12:26:57 -05:00
sophia
38c5dcb53c
Implement update info box endpoint 2022-04-25 12:26:57 -05:00
Chris Roberts
341dabcebd
Log seeding as trace level messages 2022-04-25 12:26:54 -05:00
Paul Hinze
ae58d787a0
Fix leaking basis log lines 2022-04-25 12:26:54 -05:00
sophia
cfe4e71a42
Seed target ui 2022-04-25 12:26:54 -05:00
sophia
a7d258abb3
Seed target after creation 2022-04-25 12:26:53 -05:00
sophia
6313596d62
Remove manual seeding of (guest and synced folder) plugins 2022-04-25 12:26:53 -05:00
sophia
c464569794
Remove extra logging 2022-04-25 12:26:53 -05:00
sophia
66524426d0
Update ruby remote box metadata for proto changes 2022-04-25 12:26:53 -05:00
sophia
01b4bbc42d
Specify multiple filters when querying for box metadata version 2022-04-25 12:26:53 -05:00
sophia
d1ea9b5ec7
Remove unused code 2022-04-25 12:26:52 -05:00
sophia
29c6d43cb8
Add LoadMetadata function to BoxMetadata 2022-04-25 12:26:52 -05:00
sophia
3dff26d683
Add version information to box provider metadata 2022-04-25 12:26:52 -05:00
sophia
794eefe191
Rename box metadata Name to BoxName 2022-04-25 12:26:52 -05:00
sophia
9f524bf1b0
Implement box metadata methods 2022-04-25 12:26:52 -05:00
sophia
4b8d4fbe86
Box metadata to implement vagrant-plugin-sdk box metadata interface 2022-04-25 12:26:52 -05:00
sophia
8b586fceb3
Make box metadata implement vagrant-plugin-sdk box metadata 2022-04-25 12:26:51 -05:00
sophia
921e7edb48
Reduce scope of plugins that can be returned from the core plugin manager 2022-04-25 12:26:50 -05:00
sophia
77a06e83d0
Close core plugins 2022-04-25 12:26:50 -05:00
sophia
68ffb3a8cf
Inject core plugin manager into context when running plugins 2022-04-25 12:26:50 -05:00
sophia
c2c784a295
Seed basis with core plugin manager 2022-04-25 12:26:49 -05:00
sophia
863c6a2704
Get BoxMetadata Plugin from the core plugin manager 2022-04-25 12:26:49 -05:00
sophia
211da5be23
Remove box count check when trying to recover boxes
The get box + stat operations are not that slow. No need to also
go through listing out all the boxes in the vagrant box dir.
2022-04-25 12:26:49 -05:00
sophia
c23e617fce
Check for metadata.json 2022-04-25 12:26:49 -05:00
sophia
0d38ccf20c
Create boxes dir if it does not exist 2022-04-25 12:26:49 -05:00
sophia
b3f8c5a99d
Add test for removing boxes that are no longer available 2022-04-25 12:26:48 -05:00
sophia
385bcbf81b
Remove box from db if it is no longer available on disk 2022-04-25 12:26:48 -05:00
sophia
82fa38f5e0
Check for consistency between db/boxes dir when creating box collection 2022-04-25 12:26:48 -05:00
sophia
aa9a03b9de
Ensure consistency between box db and dir 2022-04-25 12:26:48 -05:00
sophia
d3f22f3a68
Don't count machines that have not been created when looking for boxes in use 2022-04-25 12:26:48 -05:00
sophia
6e420689cb
Update Target State for updated states 2022-04-25 12:26:48 -05:00
Paul Hinze
8f9952089a
Fix commands that run without a project
Some commands like `vagrant init` and `vagrant box` should be able to
run successfully without a full Project available in VAGRANT_CWD (in
other words, they don't require that a valid Vagrantfile be available.)

Thus far we've been assuming that a Project is available when
dispatching commands, which mean that commands of this nature weren't
working.

Here we make the Basis available to serve as an alternative client to
Vagrant::Environment::Remote such that it can be instantiated and passed
through to commands. This required some changes to Environment::Remote
to make its interactions with the client more defensive, but we manage
to avoid needing to make any changes to the normal legacy codepaths.
2022-04-25 12:26:47 -05:00
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
e9e24986bd
Add ability to get metadata associated with a box 2022-04-25 12:26:47 -05:00
sophia
2b4c99aaa0
Don't add destroyed machines to list of active machines when searching for box usage 2022-04-25 12:26:46 -05:00
sophia
c13dcc938c
Only include machines that have been created 2022-04-25 12:26:46 -05:00
sophia
62e049e201
Implement box machines 2022-04-25 12:26:46 -05:00
sophia
ba0bb1d9c6
Add machine tests for boxes 2022-04-25 12:26:45 -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
517c33aacf
Ensure json data is recieved from vagrant cloud 2022-04-25 12:26:45 -05:00
sophia
c60836fc12
Get box provider from target 2022-04-25 12:26:45 -05:00
sophia
e27fb8aa07
Ensure json metadata is retrieved for box 2022-04-25 12:26:45 -05:00
sophia
4a9948c245
Add nested metadata data to box tests 2022-04-25 12:26:44 -05:00
sophia
2d477ed675
Use struct for box metadata 2022-04-25 12:26:44 -05:00
Paul Hinze
4b0acfb513
Fix unit tests
The type needs a string pointer now. We may end up wanting a string
pointer making convenience method in the SDK at some point, but for now
I punted on that question and just made one for the test.
2022-04-25 12:26:44 -05:00