Module: VagrantPlugins::HyperV::Action
- Defined in:
- lib/vagrant-multiprovider-snap/providers/hyperv/action.rb,
lib/vagrant-multiprovider-snap/providers/hyperv/action/has_snapshot.rb,
lib/vagrant-multiprovider-snap/providers/hyperv/action/snapshot_take.rb,
lib/vagrant-multiprovider-snap/providers/hyperv/action/snapshot_delete.rb,
lib/vagrant-multiprovider-snap/providers/hyperv/action/snapshot_rollback.rb,
lib/vagrant-multiprovider-snap/providers/hyperv/action/message_snapshot_not_created.rb,
lib/vagrant-multiprovider-snap/providers/hyperv/action/message_snapshot_not_deleted.rb
Defined Under Namespace
Classes: HasSnapshot, MessageSnapshotNotCreated, MessageSnapshotNotDeleted, SnapshotDelete, SnapshotRollback, SnapshotTake
Class Method Summary
collapse
Class Method Details
.action_snapshot_delete ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/vagrant-multiprovider-snap/providers/hyperv/action.rb', line 30
def self.action_snapshot_delete
Vagrant::Action::Builder.new.tap do |b|
b.use HandleBox
b.use Call, IsState, :not_created do |env, b1|
if env[:result]
b1.use Message, I18n.t("vagrant_hyperv.message_not_created")
next
end
b1.use Call, HasSnapshot do |env1, b2|
if env1[:result]
b2.use Call, SnapshotDelete do |env2,b3|
if env2[:result]
b3.use MessageSnapshotNotDeleted
end
end
else
b2.use MessageSnapshotNotCreated
end
end
end
end
end
|
.action_snapshot_rollback ⇒ Object
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# File 'lib/vagrant-multiprovider-snap/providers/hyperv/action.rb', line 56
def self.action_snapshot_rollback
Vagrant::Action::Builder.new.tap do |b|
b.use HandleBox
b.use Call, IsState, :not_created do |env, b1|
if env[:result]
b1.use Message, I18n.t("vagrant_hyperv.message_not_created")
next
end
b1.use SnapshotRollback
b1.use WaitForIPAddress
b1.use WaitForCommunicator, [:running]
end
end
end
|
.action_snapshot_take ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/vagrant-multiprovider-snap/providers/hyperv/action.rb', line 16
def self.action_snapshot_take
Vagrant::Action::Builder.new.tap do |b|
b.use HandleBox
b.use Call, IsState, :not_created do |env, b1|
if env[:result]
b1.use Message, I18n.t("vagrant_hyperv.message_not_created")
next
end
b1.use SnapshotTake
end
end
end
|