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]
def name
# TODO: this can probably be deleted
client.parents[0]
# TODO: Get name from plugin
"placeholder"
end
# Returns the parent of the guest.
#
# @return [String]
def parent
client.parent
end
def to_proto

View File

@ -178,7 +178,9 @@ module VagrantPlugins
protected
def generate_execution_request(machine, cmd, opts={})
opts = {} if opts.nil?
opts_proto = mapper.map(opts, to: SDK::Args::Hash)
opts_any = Google::Protobuf::Any.pack(opts_proto)
SDK::FuncSpec::Args.new(
args: [
@ -193,7 +195,7 @@ module VagrantPlugins
),
SDK::FuncSpec::Value.new(
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
# @return [<String>] parents
def parents
logger.debug("getting parents")
def parent
req = SDK::FuncSpec::Args.new(
args: []
)
res = client.parents(req)
logger.debug("got parents #{res}")
res.parents
res = client.parent(req)
res.parent
end
end
end