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
Chris Roberts
c6c7455c8e
Clean up and add some logging output
2022-04-25 12:24:47 -05:00
Chris Roberts
6be33f1f84
Add seed methods to capability client and adjust capability request
2022-04-25 12:24:46 -05:00
Chris Roberts
049c777f69
Use logger utility
2022-04-25 12:24:46 -05:00
Chris Roberts
defd8c9073
Add todo note on capability service seed methods
2022-04-25 12:24:46 -05:00
Chris Roberts
8cd6b5a05b
Initialize logger in method and remove initialize override
2022-04-25 12:24:46 -05:00
Chris Roberts
ec669645ad
Use reader to access logger
2022-04-25 12:24:46 -05:00
Chris Roberts
b7b7fdb9c6
Disable target option on cap command
2022-04-25 12:24:46 -05:00
Chris Roberts
5052e1b9bf
Convert proto list to array using #to_a
2022-04-25 12:24:45 -05:00
Chris Roberts
678ffa60dc
Add state bag argument to dummy capability
2022-04-25 12:24:45 -05:00
Chris Roberts
fa27dc5c4f
Add some logging output from service setup
2022-04-25 12:24:45 -05:00
Chris Roberts
2b146d4179
Host service always wants statebag
2022-04-25 12:24:45 -05:00
Chris Roberts
d25f61e3ef
Force name to string type before downcasing
2022-04-25 12:24:45 -05:00
Chris Roberts
f99911b3ec
Add seed(s) endpoints to capability services
2022-04-25 12:24:45 -05:00
Chris Roberts
4331b09421
Include default args in spec and add readers
2022-04-25 12:24:45 -05:00
Chris Roberts
ca1c1f2042
Add #ui to project client
2022-04-25 12:24:44 -05:00
Chris Roberts
2d2a503f95
Decode value when loading proto
2022-04-25 12:24:44 -05:00
Chris Roberts
48c0c96798
Update namespace for machine
2022-04-25 12:24:44 -05:00
Chris Roberts
d88a1e1346
Load all mappers and support extra args for funcspec processing
2022-04-25 12:24:44 -05:00
Chris Roberts
e94de03560
Include mapper and broker for handling funcspec args
2022-04-25 12:24:44 -05:00
Chris Roberts
4167bf890a
Update dummy capability for testing
2022-04-25 12:24:44 -05:00
Chris Roberts
d37f2ff6fe
Split out mappers implementation to namespaced file
2022-04-25 12:24:44 -05:00
Chris Roberts
d81d505e8a
Add internal tools utilzing graph
2022-04-25 12:24:44 -05:00
Chris Roberts
0a26c040f7
Add a graph implementation and typed vertices
2022-04-25 12:24:44 -05:00
Chris Roberts
87848eec67
Define internal module and add loaders
2022-04-25 12:24:44 -05:00
Chris Roberts
6d682ab7eb
Add simple stack implementation
2022-04-25 12:24:44 -05:00
Chris Roberts
66f8643ae3
Add more mappers
2022-04-25 12:24:43 -05:00
Chris Roberts
c4da3b0cbd
Rename capabilities mapper and convert to symbol
2022-04-25 12:24:43 -05:00
Chris Roberts
eb5969dac0
Add new mappers
2022-04-25 12:24:43 -05:00
Chris Roberts
908135c21e
Fix method name for accessing capability name on message
2022-04-25 12:24:43 -05:00
Chris Roberts
4e35028e3f
Some small mapper adjustments and loaders
2022-04-25 12:24:43 -05:00
Chris Roberts
75b9950ae4
Update capability to request and handle direct args
2022-04-25 12:24:43 -05:00
Chris Roberts
ab6f18093b
Add dummy capability to void host plugin for testing
2022-04-25 12:24:43 -05:00
Chris Roberts
f06b1a0990
Allow capability platform service module to setup all other required modules
2022-04-25 12:24:43 -05:00
Chris Roberts
2a4eba8435
Be more prescriptive on super usage to make Ruby 2.6 happy
2022-04-25 12:24:43 -05:00
Chris Roberts
35277eff21
Remove machine autoload from client top level
2022-04-25 12:24:43 -05:00
Chris Roberts
9909701544
Update references to machine to nest under target
2022-04-25 12:24:42 -05:00
Chris Roberts
3941438ab3
Make machine path represent namespacing
2022-04-25 12:24:42 -05:00
Chris Roberts
c53c84182a
Nest machine within target namespace to match scopes
2022-04-25 12:24:42 -05:00
Chris Roberts
f24b211746
Provide override to lookup TerminalUI for our Terminal client
2022-04-25 12:24:42 -05:00
Chris Roberts
71ce491197
Allow name lookup overrides for proto integration
2022-04-25 12:24:42 -05:00
Chris Roberts
4420feb9cf
Disable cacher usage until mapper is updated
2022-04-25 12:24:42 -05:00
Chris Roberts
84d2dc1c60
Always extend connector when prepending the client setup module
2022-04-25 12:24:42 -05:00
Chris Roberts
2cd54c6079
Update client implementation module usage
2022-04-25 12:24:42 -05:00
Chris Roberts
fd18051b0d
Update module usage within service implementations
2022-04-25 12:24:42 -05:00
Chris Roberts
0401f9cad4
Check super method to be called and force no arguments if none expected
...
This fixes an issue with Ruby 2.6 where `super` usage when no
arguments are passed results in an argument error
2022-04-25 12:24:42 -05:00
Chris Roberts
e89d344770
Extract utility modules into isolated files and add more utils
2022-04-25 12:24:41 -05:00
sophia
58ffe630a2
Pass statebag to host detect function
2022-04-25 12:24:41 -05:00
sophia
ca824644a5
Add tests for host service
2022-04-25 12:24:41 -05:00
sophia
dbb9188f87
Use mappers to get NamedCapability argument
2022-04-25 12:24:41 -05:00
sophia
177b06eb22
Add TODOs for extracting capability args
2022-04-25 12:24:41 -05:00
sophia
14d17dfd9d
Return capability execution result
2022-04-25 12:24:41 -05:00
sophia
a23da9bc64
Log ruby detect endpoint
2022-04-25 12:24:41 -05:00
sophia
5892c47ead
Extract common capability platform service for host and guest plugins
2022-04-25 12:24:41 -05:00
sophia
881502654b
Create statebag ruby client
2022-04-25 12:24:40 -05:00
sophia
a2ade36a74
Setup host client so that a golang based host may be used
2022-04-25 12:24:39 -05:00
sophia
0016baef36
Use mappers to extract string funcspec arguments
2022-04-25 12:24:39 -05:00
sophia
434e613856
Test has capability
2022-04-25 12:24:39 -05:00
sophia
04222f0eb6
Define initialize function to be compatible with ruby 2.6
2022-04-25 12:24:39 -05:00
sophia
7477455380
Get parents from guest plugin
2022-04-25 12:24:39 -05:00
sophia
29f14c98b7
Get parents chain from guest plugin
2022-04-25 12:24:38 -05:00
sophia
da64ea69d1
Execute capabilities
2022-04-25 12:24:38 -05:00
sophia
f74037e71d
Try accepting many arguments as protobuf any messages
2022-04-25 12:24:38 -05:00
sophia
dc5b13f930
Save point: get guest capablity function parameters
2022-04-25 12:24:38 -05:00
sophia
19dafb3d85
Add service to check guest for capabilities
2022-04-25 12:24:38 -05:00
Chris Roberts
dc32d6e9a0
Clean up constant aliases and set at top level for everyone
2022-04-25 12:24:38 -05:00
Chris Roberts
ce29c48931
Use mapper when loading funcspec arguments in services
2022-04-25 12:24:38 -05:00
Chris Roberts
fc88c8d580
Add basic mappers for client types
2022-04-25 12:24:38 -05:00
Chris Roberts
c0304101f4
Add a helper utility for setting up the mapper
2022-04-25 12:24:38 -05:00
Chris Roberts
65f733a288
Add a basic mappers implementation
2022-04-25 12:24:37 -05:00
sophia
42796be551
Get machine from project for guest service
2022-04-25 12:24:37 -05:00
sophia
8efc8542b7
Rename guest client 'capability method to match the client interface
2022-04-25 12:24:37 -05:00
sophia
5d46b93a99
Each component client stores their proto
2022-04-25 12:24:37 -05:00
sophia
83a080521e
Add to_proto to machine in order to pass machine protos around to other plugins
2022-04-25 12:24:37 -05:00
sophia
827b50db77
Get client from machine go impl
2022-04-25 12:24:36 -05:00
sophia
3067fe7dba
Add remote guest
2022-04-25 12:24:36 -05:00
sophia
34e7105193
Add guest client
2022-04-25 12:24:36 -05:00
sophia
d196b8635c
Detect Ruby guest plugin
2022-04-25 12:24:36 -05:00
sophia
a1fca2fde8
Add guest server for using Ruby based guest plugins
2022-04-25 12:24:36 -05:00
sophia
ca3d76ca7d
Use project client to populate environment options
2022-04-25 12:24:36 -05:00
sophia
685d555999
Flush out project client
2022-04-25 12:24:36 -05:00
Chris Roberts
82549f5579
Use updated Remote UI class name
2022-04-25 12:24:35 -05:00
Chris Roberts
04c1897869
Update terminal client to add message style
2022-04-25 12:24:34 -05:00
Chris Roberts
3583259fc9
Organizing clients and matching up with core interfaces
2022-04-25 12:24:34 -05:00
Chris Roberts
71d5195fb3
Get provider name from target client
2022-04-25 12:24:33 -05:00
Chris Roberts
61bb2328f3
Remove param documentation from method
2022-04-25 12:24:32 -05:00
Chris Roberts
59116a6773
Fix constant name for identifier
2022-04-25 12:24:32 -05:00
Chris Roberts
073acefea9
Update proto loads and method names
2022-04-25 12:24:32 -05:00
Chris Roberts
1f67fdfb11
Move methods and rename to match interface
2022-04-25 12:24:32 -05:00
Chris Roberts
d2ed78861e
Fix namespace for entry
2022-04-25 12:24:32 -05:00
Chris Roberts
341619fbfd
Use connector module for client loading
2022-04-25 12:24:30 -05:00
Chris Roberts
d458a177f3
Add target client and subclass machine from target
2022-04-25 12:24:30 -05:00
Chris Roberts
d48ec9ace2
Update index autoload entry and target autoload
2022-04-25 12:24:30 -05:00
Chris Roberts
4143abd82d
Remove settings no longer used
2022-04-25 12:24:30 -05:00
Chris Roberts
363a1f30c1
Add module for connection helper
2022-04-25 12:24:30 -05:00
Chris Roberts
a180e8441c
Rename to target index and update
2022-04-25 12:24:30 -05:00
sophia
10a1f1011b
Get datadir for machine and project
2022-04-25 12:24:29 -05:00
sophia
68aa184bee
Get local data path from project
2022-04-25 12:24:28 -05:00
sophia
f722b15661
Remove references to SDK from remote machine index
2022-04-25 12:24:28 -05:00
sophia
f761af3c55
Move client creation into client module
2022-04-25 12:24:28 -05:00
sophia
c71eb9ea0e
UQuery machine index by uuid
2022-04-25 12:24:28 -05:00