Get project ref

This commit is contained in:
sophia 2021-08-03 13:19:54 -05:00 committed by Paul Hinze
parent 1ea5b2ba91
commit 6dae3576a3
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
3 changed files with 10 additions and 14 deletions

View File

@ -695,11 +695,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end
add_message "hashicorp.vagrant.sdk.TargetIndex" do
end
add_message "hashicorp.vagrant.sdk.TargetIndex.GetRequest" do
optional :uuid, :string, 1
end
add_message "hashicorp.vagrant.sdk.TargetIndex.IncludesRequest" do
optional :uuid, :string, 1
add_message "hashicorp.vagrant.sdk.TargetIndex.GetResponse" do
optional :target, :message, 1, "hashicorp.vagrant.sdk.Ref.Target"
end
add_message "hashicorp.vagrant.sdk.TargetIndex.IncludesResponse" do
optional :exists, :bool, 1
@ -871,8 +868,7 @@ module Hashicorp
Vagrantfile::SyncedFolder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.SyncedFolder").msgclass
Vagrantfile::Vagrantfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.Vagrantfile").msgclass
TargetIndex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.TargetIndex").msgclass
TargetIndex::GetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.TargetIndex.GetRequest").msgclass
TargetIndex::IncludesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.TargetIndex.IncludesRequest").msgclass
TargetIndex::GetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.TargetIndex.GetResponse").msgclass
TargetIndex::IncludesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.TargetIndex.IncludesResponse").msgclass
end
end

View File

@ -416,6 +416,7 @@ module Hashicorp
rpc :Target, ::Hashicorp::Vagrant::Sdk::Project::TargetRequest, ::Hashicorp::Vagrant::Sdk::Args::Target
rpc :TargetNames, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::Project::TargetNamesResponse
rpc :TargetIds, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::Project::TargetIdsResponse
rpc :Ref, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::Ref::Project
end
Stub = Service.rpc_stub_class
@ -453,11 +454,10 @@ module Hashicorp
self.unmarshal_class_method = :decode
self.service_name = 'hashicorp.vagrant.sdk.TargetIndexService'
rpc :Delete, ::Hashicorp::Vagrant::Sdk::Args::Target, ::Google::Protobuf::Empty
rpc :Get, ::Hashicorp::Vagrant::Sdk::TargetIndex::GetRequest, ::Hashicorp::Vagrant::Sdk::Args::Target
rpc :Includes, ::Hashicorp::Vagrant::Sdk::TargetIndex::IncludesRequest, ::Hashicorp::Vagrant::Sdk::TargetIndex::IncludesResponse
rpc :Set, ::Hashicorp::Vagrant::Sdk::Args::Target, ::Hashicorp::Vagrant::Sdk::Args::Target
rpc :Recover, ::Hashicorp::Vagrant::Sdk::Args::Target, ::Hashicorp::Vagrant::Sdk::Args::Target
rpc :Delete, ::Hashicorp::Vagrant::Sdk::Ref::Target, ::Google::Protobuf::Empty
rpc :Get, ::Hashicorp::Vagrant::Sdk::Ref::Target, ::Hashicorp::Vagrant::Sdk::TargetIndex::GetResponse
rpc :Includes, ::Hashicorp::Vagrant::Sdk::Ref::Target, ::Hashicorp::Vagrant::Sdk::TargetIndex::IncludesResponse
rpc :Set, ::Hashicorp::Vagrant::Sdk::Args::Target, ::Hashicorp::Vagrant::Sdk::Ref::Target
end
Stub = Service.rpc_stub_class

View File

@ -4,7 +4,6 @@ module VagrantPlugins
class Project
attr_reader :client
attr_reader :resource_id
def initialize(conn, broker=nil)
@logger = Log4r::Logger.new("vagrant::command::serve::client::project")
@ -19,7 +18,8 @@ module VagrantPlugins
end
def ref
SDK::Ref::Project.new(resource_id: resource_id)
req = Google::Protobuf::Empty.new
@client.ref(req)
end
# Returns a machine client for the given name