Paul Hinze
253c6658b3
Truncate error message to address RST_STREAM issues
...
This is the result of a whole journey of learning about GRPC errors! See
the hefty inline comment which has all the context for future
generations.
2022-04-25 12:26:49 -05:00
Paul Hinze
7f56168959
Work around a few global flag collisions for ssh command
...
* `vagrant ssh` has a --no-tty flag colliding with the one defined in
`bin/vagrant` - in fact none of the flags in `bin/vagrant` are
processed in `serve` mode, so remove the code that captures them from
the CommandInfo OptionParser dance
* `vagrant ssh` has a `--plain` flag colliding with the one defined in
`internal/cli/base.go` - this flag was inherited from Waypoint, so we
can just rename it to line up with the (inversely defined) `--color`
flag used in legacy vagrant
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
sophia
128599ab68
Get local box metadata in remote box
2022-04-25 12:26:47 -05:00
sophia
b6d42d0695
Clean up machine client
2022-04-25 12:26:46 -05:00
sophia
f55da8168a
Check if a box is in use using the machines endpoint
...
This returns a list of machine index entries that use the box. This
is what is expected from the Ruby side.
2022-04-25 12:26:46 -05:00
sophia
4dcd120448
Load machine from machine ref
2022-04-25 12:26:46 -05:00
sophia
8b5bc0cd1c
Set box metadata url
2022-04-25 12:26:45 -05:00
sophia
3516aa7131
Set defailt Vagrant log level
2022-04-25 12:26:44 -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
Paul Hinze
0fc068822a
Fix rsync ownership settings in synced folders
...
When the opts are being pass through the go side, we get back empty
string values instead of nil values, so the `||=` assignment was not
working to populate the default owner and group. This was causing the
rsync_post hook to fail on linux guests.
2022-04-25 12:26:43 -05:00
Chris Roberts
f457cbb72b
Use machine UI when processing actions
2022-04-25 12:26:43 -05:00
Chris Roberts
df0bbe343f
Support bold style and add #clear_line
2022-04-25 12:26:43 -05:00
Chris Roberts
71fb214d95
Add #input to terminal client and use event stream
2022-04-25 12:26:43 -05:00
Paul Hinze
06ad1b4565
Fixup tests for Ruby 3.0
...
This is a pass through test failures and deprecation warnings:
* Make all ambiguous `.with(..., key: val)` use explicit hashes to
prevent test failures for argument mismatch in Ruby 3.0
* Scope down all unbounded `raise_error` to address warnings (remove
one test that was revealed to be referencing a nonexistent variable
once the raise_error was scoped.)
* Update all `any_instance` usage to new syntax to address warnings
* Allow the service cache to be cleared and do so between some tests
* Fix a small bug in with_plugin's plugin not found code path (revealed
by a scoped and_raise)
2022-04-25 12:26:40 -05:00
Chris Roberts
20d717a521
Update provisioner service plugin setup and caching
2022-04-25 12:26:39 -05:00
Chris Roberts
74ff5da434
Trace item registration in the cache
2022-04-25 12:26:39 -05:00
Chris Roberts
39a85d1cf3
Support caching plugins within services
2022-04-25 12:26:39 -05:00
Chris Roberts
2b5bd64ec8
Remove local provider injection to machine
2022-04-25 12:26:39 -05:00
Chris Roberts
ab8dee7a72
Add some missing mappers for converting to proto
2022-04-25 12:26:39 -05:00
Chris Roberts
6dd5a3ae9b
Load plugins within #with_plugin helper
2022-04-25 12:26:39 -05:00
Chris Roberts
d070b2cc6f
Initialize cache in the proper location within Service class
2022-04-25 12:26:38 -05:00
Chris Roberts
b0b5d1191e
Update and document cacher
2022-04-25 12:26:38 -05:00
Chris Roberts
f88254eb23
Let #with_plugin load plugins by type
2022-04-25 12:26:38 -05:00
sophia
b7d12a0907
Get provider from remote machine
2022-04-25 12:26:38 -05:00
Chris Roberts
f183a8a810
Update provisioner service implementation
2022-04-25 12:26:38 -05:00
Chris Roberts
2f4670e48a
Define cache for services and provide it
2022-04-25 12:26:38 -05:00
Chris Roberts
8542650e38
If destination is any, only allow proto destinations
2022-04-25 12:26:38 -05:00
Chris Roberts
3e7f72b9b0
Extract direct arguments to use for spec
2022-04-25 12:26:37 -05:00
Chris Roberts
987998aa41
Grab cacher from local instance
2022-04-25 12:26:37 -05:00
Chris Roberts
b976be72bd
Simplify cacher
2022-04-25 12:26:37 -05:00
Chris Roberts
d82702064f
Only deactivate remote plugin manager if activated
2022-04-25 12:26:37 -05:00
Chris Roberts
83ca40e239
Refactor Ruby service implementations
...
Update the Ruby service implementations to use the funcspec util
module for generating spec content. A helper method is now used
for generating a parent class for services to subclass which
automatically includes all required modules for usage.
2022-04-25 12:26:37 -05:00
Paul Hinze
ff86d86ac8
Provisioner Plugins
2022-04-25 12:26:37 -05:00
Chris Roberts
2b38005dfb
Include namespace for wrapper type
2022-04-25 12:26:37 -05:00
Chris Roberts
4679d39039
Fix name and method call in folders mappers
2022-04-25 12:26:37 -05:00
sophia
94698704ab
Fix some small errors
2022-04-25 12:26:37 -05:00
Chris Roberts
c7fdd92eb5
Add folders type to mappers
2022-04-25 12:26:36 -05:00
Chris Roberts
14d2d66d29
Use folders and options types in client/services
2022-04-25 12:26:36 -05:00
Chris Roberts
c32ba38b70
Add mappers for Folders type
2022-04-25 12:26:36 -05:00
Chris Roberts
0cb053c20c
Add a Folders type
2022-04-25 12:26:36 -05:00
Chris Roberts
c00eb5a5a8
Store options value as hash
2022-04-25 12:26:36 -05:00
Chris Roberts
f507a3d7ff
Add todo note about deleted entries
2022-04-25 12:26:36 -05:00
Chris Roberts
b7f074e492
Remove debugging artifacts
2022-04-25 12:26:36 -05:00
Chris Roberts
ac8790b694
Remove deleteion of host and machine index entries
2022-04-25 12:26:36 -05:00
Chris Roberts
9a6f5fa316
Don't unany mapping if source value is proto
2022-04-25 12:26:35 -05:00
Chris Roberts
a5b3ca9f6d
Return remote plugin instances
2022-04-25 12:26:35 -05:00
Chris Roberts
095a0f8847
WIP checkpoint with callable remote provider action
2022-04-25 12:26:35 -05:00
Chris Roberts
d2f795e11b
Provide client to manager enable helper method
2022-04-25 12:26:35 -05:00
sophia
55fb52f174
Update the synced folder client to pass direct values
2022-04-25 12:26:34 -05:00
Paul Hinze
f314c090e2
Set local machine within provider service
...
See inline comment for more context
2022-04-25 12:26:34 -05:00
Paul Hinze
8730b9f100
Fix MachineState mapper so IsRunning actions work
...
The IsRunning action checks if `env[:machine].state.id == :running` but
this check was never passing as the protobuf-washed version of machine
state was yielding a machine state w/ a string value like `"running"`.
Easy fix in the mapper!
2022-04-25 12:26:34 -05:00
Paul Hinze
a5f0996f5f
Fix ssh_info protobuf empty value handling
...
In https://github.com/hashicorp/vagrant-plugin-sdk/pull/115 we make the
SSHInfo fields optional, which allows us to remove zero values and fix
default value population within Machine#ssh_info.
2022-04-25 12:26:34 -05:00
sophia
29eb55909c
Refactor guest detect client
2022-04-25 12:26:34 -05:00
sophia
b6de8c3a80
Add guest detect function to client
2022-04-25 12:26:34 -05:00
sophia
8911ebd2b7
Get hash of synced folders
2022-04-25 12:26:33 -05:00
sophia
87f8c9cc5e
Implement synced folder prepare endpoint
2022-04-25 12:26:33 -05:00
sophia
19f3d2f0b6
Refactor named plugin bits to apply to all components
2022-04-25 12:26:33 -05:00
sophia
6c28de9ea9
Refactor named plugin service/client endpoints
2022-04-25 12:26:33 -05:00
sophia
153d218d68
Set plugin name
2022-04-25 12:26:32 -05:00
sophia
e95d906f74
Get plugin name from client
2022-04-25 12:26:32 -05:00
Chris Roberts
e2b135eb80
Accept options for actions on provider service
2022-04-25 12:26:31 -05:00
Chris Roberts
38d7bcc51f
Use machine as default argument for synced folder caps
2022-04-25 12:26:31 -05:00
Chris Roberts
ea3932be22
Allow options hash for action on provider client
2022-04-25 12:26:31 -05:00
Chris Roberts
e7686882fa
Log error and stacktrace on mapping errors
2022-04-25 12:26:31 -05:00
Chris Roberts
c6f6bf0c47
Include source and destination in no path exception message
2022-04-25 12:26:31 -05:00
Chris Roberts
32ea6a4509
Add new options type with mappers
2022-04-25 12:26:31 -05:00
Chris Roberts
312080ba60
Only write graph when logging mapper output
2022-04-25 12:26:31 -05:00
Chris Roberts
710adc8f7b
Retain simple hash type for now
2022-04-25 12:26:31 -05:00
Chris Roberts
4c9f14572a
Update target to addr in plugin protos
2022-04-25 12:26:30 -05:00
Chris Roberts
9e58090d09
Update the provider client to use funcspec utility
2022-04-25 12:26:30 -05:00
Chris Roberts
9f5e7780aa
Modifications to provide expected behavior of communicator client
2022-04-25 12:26:30 -05:00
Chris Roberts
b0f59c40f6
Update the search to use a reversed graph
...
Reverse the graph before searching so we are only working with
a single possible destination. A DFS is used to initially prune
down the graph.
2022-04-25 12:26:30 -05:00
Chris Roberts
3865008b89
Update weights and remove vertices from destination output
2022-04-25 12:26:30 -05:00
Chris Roberts
a98d91e15f
Unpack named arguments and provide value to flag generation request
2022-04-25 12:26:30 -05:00
Chris Roberts
b26a1ac515
Log error when input type is missing
2022-04-25 12:26:30 -05:00
Chris Roberts
2f0fdfc153
Add unique vertex type for root
2022-04-25 12:26:30 -05:00
Chris Roberts
cd99ff6525
Add logging to funcspec helper and build named types correctly
2022-04-25 12:26:30 -05:00
Chris Roberts
5609a32af0
Fix input type for duration mapping
2022-04-25 12:26:30 -05:00
Chris Roberts
32c77ef96a
Remove need for environment when mapping machine
2022-04-25 12:26:29 -05:00
Chris Roberts
0a9c02f957
Return hash with indifferent access from mapper
2022-04-25 12:26:29 -05:00
Chris Roberts
afdaf046dc
Log errors from submapping on direct type
2022-04-25 12:26:29 -05:00
Chris Roberts
14895eded1
Grab value from cache when mapping
2022-04-25 12:26:29 -05:00
Chris Roberts
58568b06fa
Define expected type with name
2022-04-25 12:26:29 -05:00
Chris Roberts
c9d93f2f8a
Request machines instead of targets
2022-04-25 12:26:29 -05:00
Chris Roberts
025808ba27
Add types for communicator information
2022-04-25 12:26:29 -05:00
Chris Roberts
8d8e9ae8ea
Properly include Empty argument to calls
2022-04-25 12:26:29 -05:00
Chris Roberts
ad402fd6d0
Update component clients to use FuncSpec module
2022-04-25 12:26:29 -05:00
Chris Roberts
6e16a8835c
Update clients to subclass Client
2022-04-25 12:26:29 -05:00
Chris Roberts
c413335e14
Add mappers for new types
2022-04-25 12:26:29 -05:00
Chris Roberts
451f3041f9
Add support for named vertices to mappers graph
2022-04-25 12:26:28 -05:00
Chris Roberts
286886ae89
Add named vertex type
2022-04-25 12:26:28 -05:00
Chris Roberts
32251ecb64
Include named value to mapper graph
2022-04-25 12:26:28 -05:00
Chris Roberts
1f731bbf9f
Add more default type maps
2022-04-25 12:26:28 -05:00
Chris Roberts
7c69fde71c
Break out type finding from unany method
2022-04-25 12:26:28 -05:00
Chris Roberts
4cf1090725
Add new custom types for easier conversions
2022-04-25 12:26:28 -05:00
Chris Roberts
58dd2e491f
Update cacher implementation
2022-04-25 12:26:28 -05:00
Chris Roberts
e29011d0b3
Add FuncSpec module
...
This module provides helper methods for handling FuncSpecs
and generating FuncSpec::Args protos. At this stage it is
intended for use in client implementations
2022-04-25 12:26:28 -05:00
Chris Roberts
e533d9f0a8
Convert client to class and populate with modules
2022-04-25 12:26:28 -05:00
sophia
891eb27e9a
Rename plugin "target" to "addr"
2022-04-25 12:26:27 -05:00
sophia
93ec8c1571
Refactor with_plugins util
2022-04-25 12:26:24 -05:00
sophia
81a9d7b241
Pass machine to provider functions
2022-04-25 12:26:24 -05:00
sophia
fcf405bdf8
Run provider actions
2022-04-25 12:26:24 -05:00
sophia
274ed6c756
Add mapper for machine state
2022-04-25 12:26:24 -05:00
sophia
8355209654
Accept machine for provider state endpoint
2022-04-25 12:26:24 -05:00
sophia
1e428a0812
Add mappers for provider
2022-04-25 12:26:24 -05:00
sophia
f3a1a9caa6
Add dependency on common protos for error details
2022-04-25 12:26:24 -05:00
sophia
526b7f2318
Remote init from provider grpc api
2022-04-25 12:26:23 -05:00
sophia
c48e43a12a
Add provider ruby client
2022-04-25 12:26:23 -05:00
sophia
75e6081e6d
Fill in provider ruby service
2022-04-25 12:26:23 -05:00
Paul Hinze
a86965c340
ruby mappers: Unwrap wrapper types in Hashes and Arrays
...
Boolean types (and possibly a few others) are returned as wrapper
classes when coming out from proto mapping; these need to be unwrapped
otherwise the caller who is expecting a nice clean boolean value ends up
with an icky protobuf class.
This fixes the shell provisioner, which relies on a communicator
receiving a settings hash `{error_check: false}` for a command that
usually fails but it sent just in case before provisioning starts.
2022-04-25 12:26:23 -05:00
sophia
c01a38b6e1
Load target index targets
2022-04-25 12:26:22 -05:00
Chris Roberts
1a32e8c2f9
Fetch command banner and remove switch characters
2022-04-25 12:26:21 -05:00
Chris Roberts
5e6fe71a37
Use ruby command arguments type when executing command
2022-04-25 12:26:21 -05:00
Chris Roberts
7b82ba7ca0
Add ruby local command arguments type and mapper
2022-04-25 12:26:21 -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
Paul Hinze
737c1a5f8b
Use the simpler plugin interface for Push plugins
...
* Bumps the go.mod to the just-merged SDK version
* Returns empty results on success vs messing around with PushResponses
2022-04-25 12:26:21 -05:00
Paul Hinze
0fef7cc416
Port push plugins
...
This uses the new Push plugin support added to the plugin SDK in https://github.com/hashicorp/vagrant-plugin-sdk/pull/106 to make the following changes:
* The plugin manager on the Go side now registers push plugins
* The the _remote_ plugin manager on the Ruby side now calls over to
the go side to get push plugins
* All the wiring is hooked up such that when a push plugin is replaced
with its remote GRPC-client-wielding equivalent, the messages are
ferried around.
2022-04-25 12:26:21 -05:00
sophia
53f7b3f8eb
Update tests for GRPC errors
2022-04-25 12:26:20 -05:00
sophia
deb667ecd3
Use common rpc errdetails messages
2022-04-25 12:26:20 -05:00
sophia
df5f7d40e8
Rename exception logger to exception transformer
...
The exception logger no longer logs errors. Instead it transforms
the errors into a grpc friendly format. The exception that would
have been logged at this point gets logged when the task completes.
2022-04-25 12:26:20 -05:00
sophia
a62c3d69cf
Only wrap error in grpc error if not already
2022-04-25 12:26:20 -05:00
sophia
c4e97bb89b
Send localized message originating from plugin (if applicable)
2022-04-25 12:26:20 -05:00
sophia
d09c12dad3
Add status proto message to outgoing errors
2022-04-25 12:26:20 -05:00
sophia
c70da0f548
Raise Vagrant error
2022-04-25 12:26:20 -05:00
sophia
0dcefddae4
Only add exception logger to non-generic methods
2022-04-25 12:26:20 -05:00
sophia
441f82760b
Include exception logger and attach to all available methods
2022-04-25 12:26:19 -05:00
Chris Roberts
914530d26a
Use trace log level for noisy log messages
2022-04-25 12:26:19 -05:00
Chris Roberts
dc03dd9cad
Wrap remote manager setup/teardown within usage tracker
2022-04-25 12:26:19 -05:00
Chris Roberts
d5cf2b66ed
Define a manager tracker for enabling remote manager
2022-04-25 12:26:18 -05:00
Chris Roberts
1a80e6112b
Remove WithMapper module and add autoload for UsageTracker
2022-04-25 12:26:18 -05:00
Chris Roberts
1849e941f3
Add helper class for usage tracking
2022-04-25 12:26:18 -05:00
Chris Roberts
b08ca1e109
Convert to pathnames on upload and download
2022-04-25 12:26:18 -05:00
Chris Roberts
2bf39a7dcf
If graph is not acyclic, break cycles before finding path
2022-04-25 12:26:18 -05:00
Chris Roberts
2f7a9c5a79
Add support for detecting and breaking cycles in graph
2022-04-25 12:26:18 -05:00
Chris Roberts
3cdac85d91
Allow nil values for input types
2022-04-25 12:26:18 -05:00
Chris Roberts
1256abc7b2
Fix synced folder plugin initialization in mapper
2022-04-25 12:26:18 -05:00
Chris Roberts
2a7e43d269
Fix value usage in the boolean mapper
2022-04-25 12:26:18 -05:00
Chris Roberts
43e5550203
Store the destination type so we can see it in the logs
2022-04-25 12:26:18 -05:00
Chris Roberts
2ff7d6a5bd
Allow value to be mapped to be nil
2022-04-25 12:26:18 -05:00
Chris Roberts
033dfba056
Fix known arguments value usage and do not allow adding nil values
2022-04-25 12:26:17 -05:00
Chris Roberts
9ace68f424
Add known mapping for synced folders
2022-04-25 12:26:17 -05:00
Chris Roberts
53d15203f9
Remove any mapper setup in the initializer
2022-04-25 12:26:17 -05:00
Chris Roberts
1ffbe5c474
When inspecting the broker, don't show details
2022-04-25 12:26:17 -05:00
Paul Hinze
142b1af0cc
Fix local exec pushes in server mode
...
The local-exec push strategy was assuming it was running from a CLI and
so it wouldn't be a big deal for it to straight up `exec` and replace
its running with the user command. That command will just do its thing
and we want the exit code for the CLI command to match anyways, right?
Sure that works for a shell, but in a GRPC server setting it's decidedly
Not Cool to suddenly swap out the running process!
As you can imagine - the effect of doing this was all sorts of broken
pipes and unexpected EOFs and a very confused @phinze.
Luckily we had a subprocess strategy sitting right there for Windows
compat, so it was just a matter of switching to that in the server
context as well. Long and winding debugging process; simple fix;
just another classic!
2022-04-25 12:26:17 -05:00
Chris Roberts
aa934f4436
Implement known type mappers directly
2022-04-25 12:26:17 -05:00
Chris Roberts
047a7f08d8
Replace auto-generated mappers with direct implementation of subset
2022-04-25 12:26:17 -05:00
Chris Roberts
64ebe30618
Remove string conversion to pathname
2022-04-25 12:26:17 -05:00
Chris Roberts
998432faee
Include source type when failed to reach destination
2022-04-25 12:26:17 -05:00
Chris Roberts
1e3547fdaa
Update log output and return immediately if type
2022-04-25 12:26:17 -05:00
Chris Roberts
6bdc7baf39
Update name from Types to Type
2022-04-25 12:26:16 -05:00
Chris Roberts
739b490f09
Make type common type and add boolean type
2022-04-25 12:26:16 -05:00
Chris Roberts
1d0077b716
Fix indentation
2022-04-25 12:26:16 -05:00
Chris Roberts
8676b13363
Include broker when setting service info
2022-04-25 12:26:16 -05:00
Chris Roberts
c6feb89138
Remove mappers that output the same type as the input
2022-04-25 12:26:16 -05:00
Chris Roberts
e6a3e16b48
Remove from string mappers
2022-04-25 12:26:15 -05:00
Chris Roberts
19d695cc78
Attempt to decode via JSON before failing
2022-04-25 12:26:15 -05:00
Chris Roberts
105c877551
Add a seed_protos helper method and remove debug logging
2022-04-25 12:26:15 -05:00
Chris Roberts
5c8f14041c
Update services to provide broker and use proper plugin manager
2022-04-25 12:26:15 -05:00
Chris Roberts
0989edb794
Update with_info to require broker and load plugin manager when available
2022-04-25 12:26:15 -05:00
Chris Roberts
0bb424c2df
Remove with_info method which is isolated to the module
2022-04-25 12:26:15 -05:00
Chris Roberts
de18081a35
Add mappers for host and plugin manager clients
2022-04-25 12:26:15 -05:00
Chris Roberts
3f7b7ee65a
Add mappers for loading command client
2022-04-25 12:26:15 -05:00
Chris Roberts
23c99b5806
Implement command and plugin manager clients
2022-04-25 12:26:15 -05:00
sophia
d5007d4d85
Use remote plugin module when in server mode
2022-04-25 12:26:13 -05:00
sophia
a3c3bb9cf1
Add mappers for synced folder client -> vagrant synced folder
2022-04-25 12:26:13 -05:00
sophia
7a75ed6cbb
Get stdout and stderr from privledged execute
2022-04-25 12:26:13 -05:00
sophia
88e1e5c1a7
Map ouput of capabilities
2022-04-25 12:26:12 -05:00
sophia
8e85561f61
Get stdout and stderr from command
2022-04-25 12:26:12 -05:00
sophia
1aabc7c4b5
Add mapper for a Class to String
2022-04-25 12:26:12 -05:00
sophia
f33e949138
Get a machine as defult synced folder arg
2022-04-25 12:26:12 -05:00
sophia
8e0f42ec17
Add mapper for synced folder client to proto
2022-04-25 12:26:12 -05:00
sophia
a18fb54ca6
Include seeds and default args for synced folder plugins
2022-04-25 12:26:11 -05:00
sophia
04a6f762af
Make synced folder mapping work
2022-04-25 12:26:11 -05:00
sophia
3c20f826ea
Don't send nil machine id value
2022-04-25 12:26:11 -05:00
sophia
38dd5ef5f9
Use path proto to pass around paths
2022-04-25 12:26:11 -05:00
sophia
175f05657c
go generate
2022-04-25 12:26:10 -05:00
sophia
1ce82cf14c
Re-enable cap service return values
2022-04-25 12:26:10 -05:00
sophia
37cf32ef85
Communicator test and ready functions update
2022-04-25 12:26:10 -05:00
sophia
84af97f0a9
Add placeholder remote guest name
2022-04-25 12:26:10 -05:00
sophia
8a7ecc8411
Use mapped wait duration
2022-04-25 12:26:10 -05:00
sophia
5ba4cf0363
Get communicator from remote machine
2022-04-25 12:26:10 -05:00
sophia
10f176950d
Cleanup mapper usage
2022-04-25 12:26:10 -05:00
sophia
f35b429335
Use Args.Hash for communincator execute function
2022-04-25 12:26:10 -05:00
sophia
6eaf399501
Add mapper Symbol -> String
2022-04-25 12:26:10 -05:00
sophia
a4694bcf91
Extract to/from arg from upload/download request
2022-04-25 12:26:10 -05:00
sophia
773276ba37
Ensure opts get passed to privledge execute
2022-04-25 12:26:09 -05:00
sophia
b29b37af0d
Add mappers for time duration proto
2022-04-25 12:26:09 -05:00
sophia
73b6c7c6d6
Use Hash Arg to pass around communincator args
2022-04-25 12:26:09 -05:00
sophia
ba1dd33fff
Include seeds in ruby communicator
2022-04-25 12:26:09 -05:00
sophia
b9e7d2197e
Clean up from rebase
2022-04-25 12:26:09 -05:00
sophia
bb084e42e4
Apply changes to download funciton
2022-04-25 12:26:09 -05:00
sophia
d57203f005
Get ruby communincator upload working
2022-04-25 12:26:09 -05:00
sophia
85f7aa1586
Make go communincator plugin work
2022-04-25 12:26:09 -05:00
sophia
49ad851606
Use named paths proto message for uploading/downloading
2022-04-25 12:26:09 -05:00
sophia
80457cd869
Run communincator execute
2022-04-25 12:26:08 -05:00
sophia
8513a14f9e
Use RemotePath proto message to upload/download files
2022-04-25 12:26:08 -05:00
sophia
04253a0aeb
Use named to, from arguments for uploading files with communincator
2022-04-25 12:26:08 -05:00
sophia
8a2375faf2
Add mapper for communincator path proto
2022-04-25 12:26:08 -05:00
sophia
da9ec1a96e
Make remote command execution work
2022-04-25 12:26:08 -05:00
sophia
93a5d6033b
Accept a struct as command options
2022-04-25 12:26:08 -05:00
sophia
45e15101df
Add mapper for Struct -> Hash
2022-04-25 12:26:08 -05:00
sophia
ce6b2c8338
Add mapper for communicator command
2022-04-25 12:26:08 -05:00
sophia
4bc2a51748
Pass communincator command
2022-04-25 12:26:08 -05:00
sophia
2e693b60fe
Load remote communincator
2022-04-25 12:26:07 -05:00
sophia
1272c087b9
Setup communincator client
2022-04-25 12:26:07 -05:00
sophia
6903f9bf09
Setup communincator service
2022-04-25 12:26:07 -05:00
sophia
1c03b3b7f2
Return plugins of map hashed by plugin name
2022-04-25 12:26:07 -05:00
Chris Roberts
fbde80af43
Add default mapping for named capabilities
2022-04-25 12:26:05 -05:00
Chris Roberts
ee95d6b01b
Add typed and named seed values
2022-04-25 12:26:05 -05:00
Chris Roberts
167b8bf70d
Use seed util module for clients/services
2022-04-25 12:26:05 -05:00
Chris Roberts
262a4fa099
Add HasSeeds util module for client/service
2022-04-25 12:26:05 -05:00
sophia
841573194e
Add mappers for synced folders and basis
2022-04-25 12:26:05 -05:00
sophia
fb5c2dd339
Add basis client module
2022-04-25 12:26:04 -05:00
sophia
c71f27b17e
Return synced folder + synced folder options from machine
2022-04-25 12:26:04 -05:00
sophia
45cfcc4c34
Return empty response if capability returns an empty response
2022-04-25 12:26:04 -05:00
sophia
46aa1b3e4e
Add synced folder service to list of services
2022-04-25 12:26:04 -05:00
sophia
847d87a017
Get synced folder from machine
2022-04-25 12:26:04 -05:00
sophia
b9a8ff1089
Fill in synced folder service
2022-04-25 12:26:04 -05:00
sophia
cb28412a91
Fill in synced folder client
2022-04-25 12:26:03 -05:00
sophia
168c307aef
Start filling in synced folder service impl
2022-04-25 12:26:03 -05:00
sophia
f70b7268f2
Start adding synced folder client
2022-04-25 12:26:03 -05:00
Chris Roberts
319d86e555
Check graph for cycles before sorting. Fix expansion.
2022-04-25 12:26:03 -05:00
Chris Roberts
4f4a2ae916
Use clone before reversing
2022-04-25 12:26:03 -05:00
Chris Roberts
022f17e711
Use final vertex type for destination in mapper
2022-04-25 12:26:02 -05:00
Chris Roberts
7d548517c9
Add final vertex type to define destination
2022-04-25 12:26:02 -05:00
Chris Roberts
e60e43553e
Do not allow output vertices to be unique
2022-04-25 12:26:02 -05:00
Chris Roberts
f07ef26a64
Machine proto arg is within target
2022-04-25 12:26:02 -05:00
Chris Roberts
da8572cb45
Fix broker argument for statebag proto
2022-04-25 12:26:02 -05:00
Chris Roberts
c7d13e62c7
Ensure output of mapper to unpack funcspec is a proto
2022-04-25 12:26:02 -05:00
Chris Roberts
6a1c5f1c7f
Add default map list for blind mappings. Unpack funcspec before map.
2022-04-25 12:26:02 -05:00
Chris Roberts
ed7f1fcd1e
Start adding Hash like methods to state bag
2022-04-25 12:26:02 -05:00
Chris Roberts
3cc92280f8
Update mappers to include maps from funcspec value to proto
2022-04-25 12:26:02 -05:00
sophia
2513d21054
Return 0 when no boxes are installed
...
Previously the cli returned 1 for `vagrant box list` if there
are no installed boxes. This is somewhat misleading since the
command completes without an error, it should return 0
2022-04-25 12:26:02 -05:00
Chris Roberts
675bea93cc
Persist cache for thread
2022-04-25 12:26:01 -05:00
Chris Roberts
796d2f2578
Simplify direct mappers
2022-04-25 12:26:01 -05:00
Chris Roberts
100ad1330d
Remove automatic caching and add short circuits
2022-04-25 12:26:01 -05:00
Chris Roberts
c75c20692c
Cache environment and allow mapping without UI
2022-04-25 12:26:01 -05:00
Chris Roberts
ce3f18ada1
Add machine to_proto mapper and update from target
2022-04-25 12:26:01 -05:00
Chris Roberts
b7c04b4ecc
Add project caching in mapper
2022-04-25 12:26:01 -05:00
Chris Roberts
c3fb475abe
Remove target from String mapper
2022-04-25 12:26:00 -05:00
Chris Roberts
d95147bd6f
Re-enable terminal extraction from project
2022-04-25 12:26:00 -05:00
Chris Roberts
3aa4e1bab4
Add mapping for pathnames
2022-04-25 12:26:00 -05:00
Chris Roberts
a0797da229
Argument is only invalid if nil and expected type is not NilClass
2022-04-25 12:26:00 -05:00
Chris Roberts
4b14221be4
Full extract all nested values when mapping
2022-04-25 12:26:00 -05:00
Chris Roberts
74d6dafccf
Use custom Array and Hash mapping
2022-04-25 12:26:00 -05:00
Chris Roberts
0e8ded18aa
Add significant weight to non-direct type matches
2022-04-25 12:26:00 -05:00
Chris Roberts
4e60160797
Update module loading in clients
2022-04-25 12:26:00 -05:00
Chris Roberts
b327dbe7d8
Add resource_id method to project client
2022-04-25 12:26:00 -05:00
Chris Roberts
b8ed8a495f
Map directly to Any value
2022-04-25 12:26:00 -05:00
Chris Roberts
b195772160
Update capability platform service and host/guest usages
...
Update default arguments to be a map instead of an array so
expected result values can be provided. Add new method for
handling arguments so custom adjustments can be applied before
calling the capability. Add custom argument adjustments to
guest service to provide machine if one is not given.
2022-04-25 12:25:59 -05:00
Chris Roberts
faac057cca
Build arguments for command via mapper directly
2022-04-25 12:25:59 -05:00
Chris Roberts
f903b0ee31
Provide an alias to the args for consistency
2022-04-25 12:25:59 -05:00
Chris Roberts
63e253b506
Update cacher to use monitor mixin
2022-04-25 12:25:59 -05:00
Chris Roberts
4a97d86b78
Initial updates for direct to any mapping
2022-04-25 12:25:59 -05:00
Chris Roberts
7f937ea544
Add autoload for types
2022-04-25 12:25:58 -05:00
Chris Roberts
1d16a57d64
Include mapper within host client
2022-04-25 12:25:58 -05:00
Chris Roberts
6135b412d3
Increase edge weight when types do not match
2022-04-25 12:25:58 -05:00
Chris Roberts
909bd68126
Adjust edge weights and connect subtypes
2022-04-25 12:25:58 -05:00
Chris Roberts
1d4c57222f
Validate path starts with source and ends with destination
2022-04-25 12:25:58 -05:00
Chris Roberts
870c5f6808
Updates to existing mappers
2022-04-25 12:25:58 -05:00
Chris Roberts
33bb2ff608
Generate any mappers for any known proto types
2022-04-25 12:25:58 -05:00
Chris Roberts
af13724f56
Adjust wrapper type generated mappers
2022-04-25 12:25:58 -05:00
Chris Roberts
68ed3ba1d9
Add any unpacking. Filter blind maps.
2022-04-25 12:25:58 -05:00
Chris Roberts
2712046a9d
Add mapper for direct type to proto
2022-04-25 12:25:58 -05:00
Chris Roberts
917ac04ef1
Add expected types for funcspec maps
2022-04-25 12:25:58 -05:00
Chris Roberts
8310e1bf95
Loaders for types
2022-04-25 12:25:57 -05:00
Chris Roberts
757b97b882
Create a types namespace and add direct type
2022-04-25 12:25:57 -05:00
Chris Roberts
22e34e87e9
Include a #to_proto method for all clients
2022-04-25 12:25:57 -05:00
sophia
7aaeaf2e46
Update protos
2022-04-25 12:25:57 -05:00
sophia
cb458e707a
Ensure path is a string
2022-04-25 12:25:57 -05:00
sophia
d95b563e86
Ensure 0 is returned for successful command
2022-04-25 12:25:57 -05:00
sophia
cec195cecb
Remove boxes from db when deleting
2022-04-25 12:25:56 -05:00
sophia
c5de0d88f7
Add box from ruby
2022-04-25 12:25:56 -05:00
sophia
c50ca3a991
Assume no box found if find returns an error
2022-04-25 12:25:56 -05:00
sophia
69b15f7140
Return list of box info when requesting all boxes
2022-04-25 12:25:56 -05:00
sophia
f71aa68a69
Get box collection from vagrant-go
2022-04-25 12:25:56 -05:00
sophia
fd0df0865c
Add box collection client
2022-04-25 12:25:56 -05:00
sophia
80f3549716
Initialize remote box with client
2022-04-25 12:25:54 -05:00
sophia
085e30053e
Load box from machine
2022-04-25 12:25:53 -05:00
sophia
99694b210b
Add mappers for box proto to client
2022-04-25 12:25:53 -05:00
sophia
235cafddcc
Add box client
2022-04-25 12:25:53 -05:00
Chris Roberts
3f4e446798
Support mapping to unknown destination type
2022-04-25 12:25:50 -05:00
Chris Roberts
5c6587f688
Allow matching mapper input directly on type
2022-04-25 12:25:50 -05:00
Chris Roberts
d1974d9a00
Remove implementations no longer required
2022-04-25 12:25:50 -05:00
Chris Roberts
481d7185a7
Use graph functions for searching and expanding path
2022-04-25 12:25:50 -05:00
Chris Roberts
a6367553c8
When building graph, set weight on vertices
2022-04-25 12:25:50 -05:00
Chris Roberts
482bf15d57
Rebuild graph on top of RGL
2022-04-25 12:25:50 -05:00
Chris Roberts
0a20c9d665
Update weighted vertex to be a decorator
2022-04-25 12:25:50 -05:00
Chris Roberts
2bdfd8b810
Update output format for vertex string methods
2022-04-25 12:25:50 -05:00
sophia
7e0fcc0a24
Define synced folder service endpoints
2022-04-25 12:25:49 -05:00
sophia
08d4438ae1
Start Synced folder service
2022-04-25 12:25:49 -05:00
sophia
c6070c69db
Rename cap command 'target' to 'target-guest'
...
the target name is already used by the go cli
2022-04-25 12:24:49 -05:00
sophia
4251b2ff7c
Get first level parent from ruby plugins
2022-04-25 12:24:48 -05:00
sophia
cda3ba7b29
Make myplugin have parents darwin and bsd
2022-04-25 12:24:48 -05:00
sophia
bff3af4a00
Make myplugin a parent of bsd plugin
2022-04-25 12:24:48 -05:00
sophia
a3d4c170f0
Fix guest plugin issues
2022-04-25 12:24:47 -05:00
Chris Roberts
7cc07642a5
Use project for host capabilities
2022-04-25 12:24:47 -05:00
Chris Roberts
2d7ce1b9d8
Remove dummy capability from host plugin
2022-04-25 12:24:47 -05:00
Chris Roberts
e6952621d3
Provide bind address in output and log active port
2022-04-25 12:24:47 -05:00