Setup a batch action for bringin up a machine

This commit is contained in:
sophia 2021-01-19 17:30:17 -06:00 committed by Paul Hinze
parent d7f92f9d87
commit a268afb945
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -2,6 +2,7 @@
require 'vagrant/proto/gen/plugin/plugin_pb'
require 'vagrant/proto/gen/plugin/plugin_services_pb'
require 'vagrant/machine'
require 'vagrant/batch_action'
require 'logger'
module VagrantPlugins
@ -37,6 +38,12 @@ module VagrantPlugins
def action_up(req, _unused_call)
LOG.debug("Coming up")
machine = machine_arg_to_machine(req)
ba = Vagrant::BatchAction.new
LOG.debug("registering action")
ba.action(machine, :up)
LOG.debug("running action")
ba.run
LOG.debug("up?!")
Hashicorp::Vagrant::Sdk::Provider::ActionResp.new(success: true)
end