diff --git a/lib/vagrant/machine_index/remote.rb b/lib/vagrant/machine_index/remote.rb index df9db5081..5480c2c87 100644 --- a/lib/vagrant/machine_index/remote.rb +++ b/lib/vagrant/machine_index/remote.rb @@ -67,7 +67,8 @@ module Vagrant # @param [Entry] entry # @return [Entry] def set(entry) - entry.remote_machine.save + entry.remote_machine.client.save + entry end def recover(entry) @@ -76,13 +77,6 @@ module Vagrant protected - # Converts a machine index entry to a machine - # - # @param [Vagrant::MachineIndex::Entry] - # @return [Hashicorp::Vagrant::Sdk::Args::Target] - def entry_to_machine(entry) - end - # Converts a machine to a machine index entry # # @param [Hashicorp::Vagrant::Sdk::Args::Target] diff --git a/plugins/commands/serve/client/machine.rb b/plugins/commands/serve/client/machine.rb index 36286b726..7c24fea52 100644 --- a/plugins/commands/serve/client/machine.rb +++ b/plugins/commands/serve/client/machine.rb @@ -24,6 +24,11 @@ module VagrantPlugins SDK::Ref::Machine.new(resource_id: resource_id) end + def save + req = Google::Protobuf::Empty.new + @client.save(req) + end + # @return [String] machine name def get_name req = Google::Protobuf::Empty.new