5396 Commits

Author SHA1 Message Date
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 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
6d4abe2b08 Remove old proto constants 2022-06-27 11:26:22 -07: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
8a41ef3396 Remove previous proto generation helpers 2022-06-21 16:51:08 -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
Chris Roberts
44afa299f0 Perform direct type conversions 2022-06-15 11:02:24 -07:00
Chris Roberts
c24960731f Add vagrantfile client 2022-06-15 10:56:19 -07:00
Chris Roberts
8fcabc2c1d Set global broker and cache values 2022-06-15 10:56:19 -07:00
Chris Roberts
70d725f8a0 Add support for origin value restrictions and custom weighting 2022-06-15 10:56:19 -07:00
Chris Roberts
53aae744a4 Allow callables to modify vertex weight 2022-06-15 10:56:19 -07:00
Chris Roberts
439546d58c Update input vertex to allow origin only setting 2022-06-15 10:56:19 -07:00
Chris Roberts
40cd6e8616 Allow marking inputs as only accepting origin value 2022-06-15 10:56:13 -07:00
Chris Roberts
9da90f0b21 Return false if RHS does not implement hash_code 2022-06-15 10:55:00 -07:00
Chris Roberts
45b9c48f03 Add Class to known types mapper. Indifferent access for hashes. 2022-06-15 10:55:00 -07:00
Chris Roberts
df3cc08b1f Add mappers for config data and procs 2022-06-15 10:55:00 -07:00
Chris Roberts
0a80ce1ea6 Remove config mappers from provisioner 2022-06-15 10:55:00 -07:00
Chris Roberts
a826287f34 Add mappers for the vagrantfile 2022-06-15 10:55:00 -07:00
Chris Roberts
2d5cb6b0fa Force the string proto value to be a string 2022-06-15 10:55:00 -07:00