lib/vagrant-sakura/action.rb in vagrant-sakura-0.0.9 vs lib/vagrant-sakura/action.rb in vagrant-sakura-0.1.0
- old
+ new
@@ -33,10 +33,31 @@
end
end
end
end
+ def self.action_reinstall
+ Vagrant::Action::Builder.new.tap do |b|
+ b.use ConfigValidate
+ b.use ConnectSakura
+ b.use CompleteArchiveId
+ b.use Call, ReadState do |env, b2|
+ case env[:machine_state_id]
+ when :up
+ b2.use Halt
+ b2.use Reinstall
+ b2.use Provision
+ when :down, :cleaning
+ b2.use Reinstall
+ b2.use Provision
+ when :not_created
+ b2.use MessageNotCreated
+ end
+ end
+ end
+ end
+
def self.action_list_id
Vagrant::Action::Builder.new.tap do |b|
b.use ConfigValidate
b.use ConnectSakura
b.use ListId
@@ -132,10 +153,11 @@
def self.action_up
Vagrant::Action::Builder.new.tap do |b|
b.use HandleBox
b.use ConfigValidate
b.use ConnectSakura
+ b.use CompleteArchiveId
b.use Call, ReadState do |env, b2|
case env[:machine_state_id]
when :up
b2.use MessageAlreadyCreated
when :down, :cleaning
@@ -148,10 +170,11 @@
end
end
end
action_root = Pathname.new(File.expand_path("../action", __FILE__))
+ autoload :CompleteArchiveId, action_root.join("complete_archive_id")
autoload :ConnectSakura, action_root.join("connect_sakura")
autoload :DeleteServer, action_root.join("delete_server")
autoload :IsCreated, action_root.join("is_created")
autoload :Halt, action_root.join("halt")
autoload :ListId, action_root.join("list_id")
@@ -160,9 +183,10 @@
autoload :MessageNotCreated, action_root.join("message_not_created")
autoload :MessageWillNotDestroy, action_root.join("message_will_not_destroy")
autoload :PowerOn, action_root.join("power_on")
autoload :ReadSSHInfo, action_root.join("read_ssh_info")
autoload :ReadState, action_root.join("read_state")
+ autoload :Reinstall, action_root.join("reinstall")
autoload :Reset, action_root.join("reset")
autoload :RunInstance, action_root.join("run_instance")
autoload :SyncFolders, action_root.join("sync_folders")
end
end