lib/vagrant-skytap/action.rb in vagrant-skytap-0.2.2 vs lib/vagrant-skytap/action.rb in vagrant-skytap-0.2.3

- old
+ new

@@ -206,30 +206,18 @@ def self.action_create Vagrant::Action::Builder.new.tap do |b| b.use HandleBox b.use action_fetch_environment - b.use Call, ExistenceCheck do |env, b1| - case result = env[:result] - when :missing_environment - b1.use CreateEnvironment - b1.use MessageEnvironmentUrl - when :no_vms, :missing_vm - b1.use AddVmToEnvironment - else - next - end - b1.use StoreExtraData - b1.use SetUpVm - end + b.use ComposeEnvironment end end def self.action_update_hardware Vagrant::Action::Builder.new.tap do |b| - b.use InitializeAPIClient - b.use FetchEnvironment + b.use StoreExtraData + b.use SetUpVm b.use Call, IsStopped do |env, b1| if env[:result] b1.use UpdateHardware b1.use SetHostname end @@ -237,12 +225,10 @@ end end def self.action_run_vm Vagrant::Action::Builder.new.tap do |b| - b.use InitializeAPIClient - b.use FetchEnvironment # The "up" command stores the pre-run states to # avoid a race condition when running multiple # VMs in parallel -- we need to know which VMs # are actually being powered on and need to @@ -312,9 +298,10 @@ # The autoload farm action_root = Pathname.new(File.expand_path("../action", __FILE__)) autoload :StoreExtraData, action_root.join("store_extra_data") autoload :AddVmToEnvironment, action_root.join("add_vm_to_environment") autoload :ClearForwardedPorts, action_root.join("clear_forwarded_ports") + autoload :ComposeEnvironment, action_root.join("compose_environment") autoload :CreateEnvironment, action_root.join("create_environment") autoload :DeleteEnvironment, action_root.join("delete_environment") autoload :DeleteVm, action_root.join("delete_vm") autoload :ExistenceCheck, action_root.join("existence_check") autoload :FetchEnvironment, action_root.join("fetch_environment")