mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Load target index targets
This commit is contained in:
parent
2469016be1
commit
c01a38b6e1
2 changed files with 3 additions and 16 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue