Chris Roberts
fda4aef9c7
Make server instance accessible, return integer value
2022-07-25 14:29:38 -07:00
Sophia Castellarin
fe4956ac83
Merge pull request #314 from hashicorp/ruby-load-global-plugins
...
Load global ruby plugins
2022-07-25 09:40:00 -05:00
Paul Hinze
9ab94f9971
Fix crashes on Vagrantfiles with provisioners
...
I forgot to handle nil in the new PluginOptions stuff, and options are
nil for Provisioner plugins.
2022-07-20 17:36:05 -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
sophia
5bc7218a70
Load global ruby plugins
2022-07-13 14:08:46 -05: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
d5ec939022
Request target in spec and allow conversion to machine
2022-07-08 16:38:03 -07:00
Chris Roberts
19b4adb3b8
Implement get_value rpc in vagrantfile client
2022-07-08 16:38:02 -07:00
Paul Hinze
ee8883153c
Make Docker provider work again post config refactor
...
- Allow machine.box to be empty without sadness (depends on
https://github.com/hashicorp/vagrant-plugin-sdk/pull/182 )
- Get synced folder type from plugin name instead of defaulting to
:virtualbox
2022-07-08 11:36:27 -05:00
Sophia Castellarin
66a22e5254
Merge pull request #303 from hashicorp/synced_folder_has_override_opts
...
Synced folder has override opts
2022-07-07 16:28:14 -05:00
Chris Roberts
f5d778d51a
Revert "Merge pull request #300 from hashicorp/optimize-ruby-command-list"
...
This reverts commit 1c26a4abb0c9e095b3f6ec9944c4b15f6f1cd064, reversing
changes made to 186824a568583d8f6f2a50501d940ed71608fa0b.
The changes broke plugin loading when using subcommands so these
changes will be reverted until the underlying issue can be
investigated and resolved.
2022-07-07 14:03:56 -07:00
Paul Hinze
59a8e9bb0f
Merge pull request #306 from hashicorp/fix-capability-boolean-handling
...
Fix Type::Booleans leaking through capabilities
2022-07-07 14:21:05 -05:00
sophia
b17c36c7c7
Fix typo
2022-07-07 12:30:24 -05:00
Sophia Castellarin
0b53e06687
Merge pull request #297 from hashicorp/port-command-fix
...
Use remote provider
2022-07-07 12:21:48 -05:00
sophia
f1af42a7fc
Don't use hash with indifferent access when converting hash
...
The HashWithIndifferentAccess will change all keys to strings when
merged with another regular hash. This causes errors in cases where
hashes are merged, for example in the action builder. Symbol/String
type data is kept over the wire, so there is no need to make the
mapped hash a HashWithIndifferentAccess.
2022-07-07 11:50:03 -05:00
sophia
73801703e7
Pass machine to provider capabilities
2022-07-07 11:49:57 -05:00
Paul Hinze
75d900c93b
Fix Type::Booleans leaking through capabilities
...
We had some cases where calling a capability that returned a boolean was
not getting correctly unpacked, so instead of `true` or `false` the
capability was putting out
`VagrantPlugins::CommandServe::Type::Boolean`.
This may have been happening in _all_ cases where a boolean was returned
from a capability and we just didn't notice it yet because the return
value was always truthy.
These tweaks should help ensure that Ruby types make it out where they
are supposed to be in Args::Direct usage.
2022-07-07 11:29:50 -05:00
Chris Roberts
1c26a4abb0
Merge pull request #300 from hashicorp/optimize-ruby-command-list
...
Optimize command list generation
2022-07-07 09:29:15 -07:00
Sophia Castellarin
186824a568
Merge pull request #302 from hashicorp/private-network
...
Rely on string/symbol maps for hash mapping
2022-07-06 13:20:41 -05:00
sophia
eeba305399
Rely on string/symbol maps for hash mapping
...
Relying on HashWithIndifferentAccess in Hash mappers results in
errors when hashes get merged in Ruby. When merges between regular
hashes and HashWithIndifferentAccess happens, then all the keys
from HashWithIndifferentAccess are transformed to strings.
2022-07-01 12:47:12 -05:00
Paul Hinze
fb2a102c71
Fix init and other commands that run without a project
...
The Basis needs to be able to respond to Vagrantfile() and
DefaultProvider() to make it through Vagrant::Environment
initialization.
Depends on https://github.com/hashicorp/vagrant-plugin-sdk/pull/178
2022-07-01 11:56:08 -05:00
Chris Roberts
6aa50189a2
Return empty results when no content to parse
2022-07-01 08:57:28 -07:00
sophia
20ec85b021
Use remote provider
2022-06-30 16:57:41 -05:00
Chris Roberts
067e6aeed1
Add get commands implementation to client and server
2022-06-29 16:13:36 -07:00
Chris Roberts
ffa10b4d85
Return integer value from serve command
2022-06-29 16:11:53 -07:00
sophia
adadf26c9c
Check if communicator is available before detecting guests
2022-06-29 17:23:43 -05:00
sophia
f4d3f38921
Fix type in communicator#ready funcspec
2022-06-29 17:23:42 -05:00
Sophia Castellarin
a08204d4ba
Merge pull request #299 from hashicorp/fix-ruby-tests
...
Fix ruby tests
2022-06-29 17:23:23 -05:00
sophia
67a5c43873
Add Machine state direct converter
2022-06-29 16:03:22 -05:00
Paul Hinze
986e3fb258
Merge pull request #292 from hashicorp/box-collection-nit
...
Scope down rescue on BoxCollection.find
2022-06-28 15:23:33 -05:00
Chris Roberts
a2e0c5619e
Use __finalized variable to determine finalization
2022-06-27 11:26:08 -07:00
Chris Roberts
0aad3390c9
Add funcspec mappers for finalize and merge wrappers
2022-06-24 18:29:53 -07:00
Chris Roberts
05baac1514
Update ruby config service to use wrapper protos
2022-06-24 18:27:38 -07:00
Chris Roberts
0d562673f9
Just print class information in error content
2022-06-24 18:27:00 -07:00
Paul Hinze
47962dff37
Scope down rescue on BoxCollection.find
...
After https://github.com/hashicorp/vagrant-plugin-sdk/pull/175 is merged
it will properly return a NotFound so we can rescue that specifically
and let any unexpected errors propagate.
2022-06-24 16:30:51 -05:00
Chris Roberts
778d009bfb
Mark configs with unique id. Use id for provisioner caching.
2022-06-22 12:33:07 -07:00
Chris Roberts
2ce2494f79
Don't use actual values in logger output
2022-06-21 14:41:28 -07:00
Chris Roberts
a9b62812ac
Add box metadata conversion
2022-06-21 14:41:17 -07:00
Chris Roberts
83467013e9
Handle Set and Logger types
2022-06-20 16:56:30 -07:00
Chris Roberts
2890fb57c5
Finalize the entire Vagrantfile so all config is properly available
2022-06-20 16:04:01 -07:00
Chris Roberts
872812eaa4
Fix up some direct conversions to prevent wrong cache returns
2022-06-20 13:08:01 -07:00
Chris Roberts
b8fbe1ace5
Remove some extraneous logging
2022-06-20 13:07:31 -07:00
Chris Roberts
17fc49cf41
Add provider parsing to internal endpoint
2022-06-20 13:05:26 -07:00
Chris Roberts
43979be447
Fix logger usage in plugin manager
2022-06-15 11:14:07 -07:00
Chris Roberts
dc91194f9d
Load direct conversions after setup
2022-06-15 11:14:07 -07:00
Chris Roberts
ede3b03f8c
Update logger and call internal finalize on configs
2022-06-15 11:14:07 -07:00
Chris Roberts
55512ca0ef
Provide easy access to global cache in clients
2022-06-15 11:02:29 -07:00