From 177eb828af1f2ba2e8dc026d879056df197a87e7 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 21 Dec 2011 15:24:43 -0800 Subject: [PATCH] Remove customize action, this will need rethinking --- lib/vagrant/action/builtin.rb | 3 --- lib/vagrant/action/vm/customize.rb | 26 --------------------- lib/vagrant/action/vm/modify.rb | 37 ------------------------------ 3 files changed, 66 deletions(-) delete mode 100644 lib/vagrant/action/vm/customize.rb delete mode 100644 lib/vagrant/action/vm/modify.rb diff --git a/lib/vagrant/action/builtin.rb b/lib/vagrant/action/builtin.rb index 1d1570d07..a45274c88 100644 --- a/lib/vagrant/action/builtin.rb +++ b/lib/vagrant/action/builtin.rb @@ -29,9 +29,6 @@ module Vagrant use VM::ShareFolders use VM::HostName use VM::Network -# TODO: Bring back some sort of "customize" feature. -# use VM::Customize -# use VM::Modify use VM::Boot end end diff --git a/lib/vagrant/action/vm/customize.rb b/lib/vagrant/action/vm/customize.rb deleted file mode 100644 index a0a57a3f3..000000000 --- a/lib/vagrant/action/vm/customize.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Vagrant - module Action - module VM - class Customize - def initialize(app, env) - @app = app - end - - def call(env) - if !env[:vm].config.vm.proc_stack.empty? - # Create the proc which runs all of our procs - proc = lambda do |vm| - env[:ui].info I18n.t("vagrant.actions.vm.customize.running") - env[:vm].config.vm.run_procs!(vm) - end - - # Add it to modify sequence - env["vm.modify"].call(proc) - end - - @app.call(env) - end - end - end - end -end diff --git a/lib/vagrant/action/vm/modify.rb b/lib/vagrant/action/vm/modify.rb deleted file mode 100644 index e0a10cad6..000000000 --- a/lib/vagrant/action/vm/modify.rb +++ /dev/null @@ -1,37 +0,0 @@ -module Vagrant - module Action - module VM - # This class allows other actions on the virtual machine object - # to be consolidated under a single write lock. This vastly speeds - # up modification of virtual machines. This should be used whereever - # possible when dealing with virtual machine modifications. - class Modify - include Util::StackedProcRunner - - def initialize(app, env) - @app = app - - # Initialize the proc_stack, which should already be empty - # but just making sure here. - proc_stack.clear - - # Create the lambda in the environment which is to be called - # to add new procs to the modification sequence. - env["vm.modify"] = lambda do |*procs| - procs.each { |p| push_proc(&p) } - end - end - - def call(env) - # Run the procs we have saved up, save the machine, and reload - # to verify we get the new settings - run_procs!(env[:vm].vm) - env[:vm].vm.save - env[:vm].reload! - - @app.call(env) - end - end - end - end -end