Map ouput of capabilities
This commit is contained in:
parent
8e85561f61
commit
88e1e5c1a7
@ -60,7 +60,12 @@ module VagrantPlugins
|
||||
args: arg_protos,
|
||||
)
|
||||
)
|
||||
client.capability(req)
|
||||
result = client.capability(req)
|
||||
if result.result.nil?
|
||||
return nil
|
||||
end
|
||||
unmapped = mapper.map(result.result)
|
||||
unmapped
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -108,10 +108,9 @@ module VagrantPlugins
|
||||
)
|
||||
end
|
||||
|
||||
val = Google::Protobuf::Value.new
|
||||
val.from_ruby(result)
|
||||
val = mapper.map(result, to: Google::Protobuf::Any)
|
||||
SDK::Platform::Capability::Resp.new(
|
||||
result: Google::Protobuf::Any.pack(val)
|
||||
result: val
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@ -212,8 +212,6 @@ module VagrantPlugins
|
||||
exit_code = communicator.execute(cmd.command, opts) {
|
||||
|type, data| output[type] << data if output[type]
|
||||
}
|
||||
logger.debug("command exit code: #{exit_code}")
|
||||
logger.debug("command output: #{output}")
|
||||
|
||||
SDK::Communicator::ExecuteResp.new(
|
||||
exit_code: exit_code,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user