Return list of installed plugins
This commit is contained in:
parent
c02baa9219
commit
cd04e4385f
2
Gemfile
2
Gemfile
@ -7,5 +7,3 @@ if File.exist?(File.expand_path("../../vagrant-spec", __FILE__))
|
||||
else
|
||||
gem 'vagrant-spec', git: "https://github.com/hashicorp/vagrant-spec.git", branch: :main
|
||||
end
|
||||
|
||||
gem "pry-byebug"
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
require "vagrant/plugin/manager"
|
||||
|
||||
require_relative 'proto/gen/ruby-server_pb'
|
||||
require_relative 'proto/gen/ruby-server_services_pb'
|
||||
|
||||
@ -6,8 +8,8 @@ module VagrantPlugins
|
||||
module Serve
|
||||
class PluginService < Hashicorp::Vagrant::RubyVagrant::Service
|
||||
def get_plugins(req, _unused_call)
|
||||
|
||||
plugins = [Hashicorp::Vagrant::Plugin.new(name: "test")]
|
||||
ruby_plugins = Vagrant::Plugin::Manager.instance.installed_plugins
|
||||
ruby_plugins.map { |k, v| Hashicorp::Vagrant::Plugin.new(name: k) }
|
||||
Hashicorp::Vagrant::GetPluginsResponse.new(
|
||||
plugins: plugins
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user