37 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Paul Hinze
7c56c74bb6
Support and honor the "primary" option for Command plugins 2022-07-27 11:36:04 -05:00
Chris Roberts
54502d5d66
Merge pull request #324 from hashicorp/fix-packaged-hang
Fix hanging commands when using packaged installation
2022-07-26 09:12:50 -07:00
Chris Roberts
b917dc466a Implement stop on the ruby internal service 2022-07-25 14:30:45 -07:00
Paul Hinze
fc76f71ffc
Fix vbox multimachine by setting provider parallel default correctly
Turns out I misinterpreted the behavior of a ruby method with a default
being passed nil so I assumed :parallel was effectively defaulting to
true when it is the opposite.
2022-07-25 15:52:11 -05:00
sophia
5bc7218a70 Load global ruby plugins 2022-07-13 14:08:46 -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
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
Chris Roberts
6aa50189a2 Return empty results when no content to parse 2022-07-01 08:57:28 -07:00
Chris Roberts
067e6aeed1 Add get commands implementation to client and server 2022-06-29 16:13:36 -07:00
Chris Roberts
17fc49cf41 Add provider parsing to internal endpoint 2022-06-20 13:05:26 -07:00
Chris Roberts
8061a95a81 Update internal service plugins and vagrantfile loading 2022-06-15 10:55:00 -07:00
Paul Hinze
71cc8ee7bb
Fix some bugs in provider options handling
- Defaultable needs to default to true when it's not specified
- We need to allow a non-defaultable provider to be selected if it shows
  up in the config
2022-06-08 17:25:16 -05:00
Paul Hinze
8b08b3117c
Use plugin options for Synced Folder priorities
Now that plugin options are available, we can use them to interpret
synced folder priorities and remove the shim we had in place.
2022-06-06 17:39:09 -05:00
Paul Hinze
8dbe72a5a0
Use Component Options to implement ProviderOptions
* Populates ComponentOptions into plugin structs
* Maps options for legacy Provider Plugins into PluginOptions
* Demos use of PluginOptions in a stub provider
* Honors plugin priority and defaultable settings
2022-06-03 16:37:05 -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
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
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
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
441f82760b
Include exception logger and attach to all available methods 2022-04-25 12:26:19 -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
fd18051b0d
Update module usage within service implementations 2022-04-25 12:24:42 -05:00
Chris Roberts
798e33f6bb
Update synced folder constant name 2022-04-25 12:24:21 -05:00
sophia
a128d98dea
Move to_proto to config classes 2022-04-25 12:24:21 -05:00
sophia
0e40c2eb97
to_proto save point 2022-04-25 12:24:20 -05:00
sophia
ada96f13a3
Upload targets found in Vagrantfile 2022-04-25 12:24:20 -05:00
sophia
85271c616e
Collect config defined by community plugins 2022-04-25 12:24:20 -05:00
sophia
7f9702a095
Successfully parse vagrantfile 2022-04-25 12:24:19 -05:00
sophia
4460faa862
Kind of manually parse vagrantfile for provisioners 2022-04-25 12:24:17 -05:00
sophia
c4f0420d72
Parse Vagrantfile to proto 2022-04-25 12:24:17 -05:00
sophia
21dec58ba6
Update vagrantfile parsing for vagrantfile proto changes 2022-04-25 12:24:17 -05:00
sophia
053be35242
Parse Vagrantfiles 2022-04-25 12:24:16 -05:00
Chris Roberts
d6e732cde3
Provide broker when loading terminal UI 2022-04-25 12:24:07 -05:00
Chris Roberts
742f94c9e0
Add modules to services and update exception logger usage 2022-04-25 12:24:04 -05:00
Chris Roberts
93f3c70dd0
Update load path modifications and requires for new proto path 2022-04-25 12:23:56 -05:00
sophia
f68d470dc9
Fixes from rebase 2022-04-25 12:23:53 -05:00
Chris Roberts
addf420ca2
Add some helper methods and some adjustments to serve setup 2022-04-25 12:23:52 -05:00