From a268afb945d6ad6d005004ad5b1a1fc2a7cdcada Mon Sep 17 00:00:00 2001 From: sophia Date: Tue, 19 Jan 2021 17:30:17 -0600 Subject: [PATCH] Setup a batch action for bringin up a machine --- plugins/commands/serve/service/provider_service.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/commands/serve/service/provider_service.rb b/plugins/commands/serve/service/provider_service.rb index fc42f42b5..be42e2f72 100644 --- a/plugins/commands/serve/service/provider_service.rb +++ b/plugins/commands/serve/service/provider_service.rb @@ -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