Update protos

This commit is contained in:
sophia 2021-04-26 12:33:38 -05:00 committed by Paul Hinze
parent 2f0dcda7e8
commit de649b2154
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
3 changed files with 13 additions and 18 deletions

View File

@ -333,21 +333,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
repeated :flags, :message, 4, "hashicorp.vagrant.sdk.Command.Flag"
repeated :subcommands, :message, 5, "hashicorp.vagrant.sdk.Command.CommandInfo"
end
add_message "hashicorp.vagrant.sdk.Command.CommandInfoReq" do
repeated :command_string, :string, 1
end
add_message "hashicorp.vagrant.sdk.Command.CommandInfoResp" do
optional :command_info, :message, 1, "hashicorp.vagrant.sdk.Command.CommandInfo"
end
add_message "hashicorp.vagrant.sdk.Command.ExecuteReq" do
optional :args, :message, 1, "hashicorp.vagrant.sdk.FuncSpec.Args"
repeated :command_string, :string, 2
end
add_message "hashicorp.vagrant.sdk.Command.ExecuteResp" do
optional :exit_code, :int64, 1
end
add_message "hashicorp.vagrant.sdk.Command.SpecReq" do
repeated :command_string, :string, 1
add_message "hashicorp.vagrant.sdk.Command.ExecuteReq" do
optional :spec, :message, 1, "hashicorp.vagrant.sdk.FuncSpec.Args"
repeated :command_args, :string, 2
end
add_message "hashicorp.vagrant.sdk.Command.ExecuteSpecReq" do
repeated :command_args, :string, 1
end
add_message "hashicorp.vagrant.sdk.Command.Arguments" do
repeated :flags, :message, 1, "hashicorp.vagrant.sdk.Command.Arguments.Flag"
@ -619,11 +616,10 @@ module Hashicorp
Command::Flag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.Flag").msgclass
Command::Flag::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.Flag.Type").enummodule
Command::CommandInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.CommandInfo").msgclass
Command::CommandInfoReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.CommandInfoReq").msgclass
Command::CommandInfoResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.CommandInfoResp").msgclass
Command::ExecuteReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.ExecuteReq").msgclass
Command::ExecuteResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.ExecuteResp").msgclass
Command::SpecReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.SpecReq").msgclass
Command::ExecuteReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.ExecuteReq").msgclass
Command::ExecuteSpecReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.ExecuteSpecReq").msgclass
Command::Arguments = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.Arguments").msgclass
Command::Arguments::Flag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.Arguments.Flag").msgclass
Command::Arguments::Flag::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Command.Arguments.Flag.Type").enummodule

View File

@ -141,10 +141,10 @@ module Hashicorp
rpc :ConfigStruct, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::Config::StructResp
rpc :Configure, ::Hashicorp::Vagrant::Sdk::Config::ConfigureRequest, ::Google::Protobuf::Empty
rpc :Documentation, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::Config::Documentation
rpc :ExecuteSpec, ::Hashicorp::Vagrant::Sdk::Command::SpecReq, ::Hashicorp::Vagrant::Sdk::FuncSpec
rpc :ExecuteSpec, ::Hashicorp::Vagrant::Sdk::Command::ExecuteSpecReq, ::Hashicorp::Vagrant::Sdk::FuncSpec
rpc :Execute, ::Hashicorp::Vagrant::Sdk::Command::ExecuteReq, ::Hashicorp::Vagrant::Sdk::Command::ExecuteResp
rpc :CommandInfoSpec, ::Hashicorp::Vagrant::Sdk::Command::SpecReq, ::Hashicorp::Vagrant::Sdk::FuncSpec
rpc :CommandInfo, ::Hashicorp::Vagrant::Sdk::Command::CommandInfoReq, ::Hashicorp::Vagrant::Sdk::Command::CommandInfoResp
rpc :CommandInfoSpec, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::FuncSpec
rpc :CommandInfo, ::Hashicorp::Vagrant::Sdk::FuncSpec::Args, ::Hashicorp::Vagrant::Sdk::Command::CommandInfoResp
end
Stub = Service.rpc_stub_class

View File

@ -18,8 +18,7 @@ module VagrantPlugins
def command_info(req, ctx)
ServiceInfo.with_info(ctx) do |info|
subcommand = req.command_string.to_a[1..]
command_info = collect_command_info(info.plugin_name, subcommand)
command_info = collect_command_info(info.plugin_name, [])
LOGGER.info("command info, #{command_info}")
SDK::Command::CommandInfoResp.new(
command_info: command_info,
@ -251,7 +250,7 @@ module VagrantPlugins
raise "Failed to locate command plugin for: #{plugin_name}"
end
cmd_klass = plugin.call
cmd_args = req.command_string.to_a[1..] + arguments.args.to_a
cmd_args = req.command_args.to_a[1..] + arguments.args.to_a
cmd = cmd_klass.new(cmd_args, env)
result = cmd.execute