Fill in some missing target client functions

This commit is contained in:
sophia 2022-04-13 09:54:14 -05:00
parent 6d1359b1f0
commit 31393eb3a9

View File

@ -35,6 +35,11 @@ module VagrantPlugins
true
end
# @return [Vagrant::Environment]
def environment
mapper.map(project, to: Vagrant::Environment)
end
# @return [String] Unique identifier of machine
def get_uuid
client.get_uuid(Empty.new).uuid
@ -57,7 +62,6 @@ module VagrantPlugins
end
# @return [Provider] provider for target
# TODO: This needs to be loaded proeprly
def provider
client.provider(Empty.new)
end
@ -104,6 +108,15 @@ module VagrantPlugins
client.state(Empty.new).state
end
# @return [Terminal]
def ui
t = Terminal.load(
client.ui(Google::Protobuf::Empty.new),
broker: @broker,
)
mapper.map(t, to: Vagrant::UI::Remote)
end
# @return [Time] time target was last updated
def updated_at
Time.parse(client.updated_at(Empty.new).updated_at)