Load target index targets

This commit is contained in:
sophia 2022-01-19 14:06:15 -06:00 committed by Paul Hinze
parent 2469016be1
commit c01a38b6e1
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
2 changed files with 3 additions and 16 deletions

View File

@ -32,20 +32,7 @@ module VagrantPlugins
# @param [Symbol] cap_name Name of the capability
def capability(cap_name, *args)
logger.debug("executing capability #{cap_name}")
arg_protos = seeds.typed.map do |any|
SDK::FuncSpec::Value.new(
name: "",
type: any.type_name,
value: any,
)
end
arg_protos += seeds.named.map do |name, any|
SDK::FuncSpec::Value.new(
name: name,
type: any.type_name,
value: any,
)
end
arg_protos = seed_protos
d = Type::Direct.new(arguments: args)
da = mapper.map(d, to: Google::Protobuf::Any)
arg_protos << SDK::FuncSpec::Value.new(

View File

@ -28,7 +28,7 @@ module VagrantPlugins
id: ident
)
)
machine = Target.load(resp.target, broker: broker).to_machine
machine = Target.load(resp, broker: broker).to_machine
Vagrant::MachineIndex::Entry.load(machine)
rescue GRPC::NotFound
nil
@ -59,7 +59,7 @@ module VagrantPlugins
id: ident
)
)
machine = Target.load(resp.target, broker: broker).to_machine
machine = Target.load(resp, broker: broker).to_machine
machine.set_name(entry.name)
machine.set_state(entry.full_state)
Vagrant::MachineIndex::Entry.load(machine)