Add placeholder remote guest name

This commit is contained in:
sophia 2021-12-10 11:33:40 -06:00 committed by Paul Hinze
parent 8a7ecc8411
commit 84af97f0a9
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
3 changed files with 15 additions and 8 deletions

View File

@ -60,8 +60,15 @@ module Vagrant
# #
# @return [Symbol] # @return [Symbol]
def name def name
# TODO: this can probably be deleted # TODO: Get name from plugin
client.parents[0] "placeholder"
end
# Returns the parent of the guest.
#
# @return [String]
def parent
client.parent
end end
def to_proto def to_proto

View File

@ -178,7 +178,9 @@ module VagrantPlugins
protected protected
def generate_execution_request(machine, cmd, opts={}) def generate_execution_request(machine, cmd, opts={})
opts = {} if opts.nil?
opts_proto = mapper.map(opts, to: SDK::Args::Hash) opts_proto = mapper.map(opts, to: SDK::Args::Hash)
opts_any = Google::Protobuf::Any.pack(opts_proto)
SDK::FuncSpec::Args.new( SDK::FuncSpec::Args.new(
args: [ args: [
@ -193,7 +195,7 @@ module VagrantPlugins
), ),
SDK::FuncSpec::Value.new( SDK::FuncSpec::Value.new(
type: "hashicorp.vagrant.sdk.Args.Hash", type: "hashicorp.vagrant.sdk.Args.Hash",
value: Google::Protobuf::Any.pack(opts_proto), value: opts_any,
), ),
] ]
) )

View File

@ -11,14 +11,12 @@ module VagrantPlugins
include Util::HasSeeds::Client include Util::HasSeeds::Client
# @return [<String>] parents # @return [<String>] parents
def parents def parent
logger.debug("getting parents")
req = SDK::FuncSpec::Args.new( req = SDK::FuncSpec::Args.new(
args: [] args: []
) )
res = client.parents(req) res = client.parent(req)
logger.debug("got parents #{res}") res.parent
res.parents
end end
end end
end end