Module: VagrantPlugins::ProviderVirtualBox::Action
- Defined in:
- lib/vagrant-multiprovider-snap/providers/virtualbox/action.rb,
lib/vagrant-multiprovider-snap/providers/virtualbox/action/has_snapshot.rb,
lib/vagrant-multiprovider-snap/providers/virtualbox/action/snapshot_take.rb,
lib/vagrant-multiprovider-snap/providers/virtualbox/action/snapshot_delete.rb,
lib/vagrant-multiprovider-snap/providers/virtualbox/action/snapshot_rollback.rb,
lib/vagrant-multiprovider-snap/providers/virtualbox/action/message_snapshot_not_created.rb,
lib/vagrant-multiprovider-snap/providers/virtualbox/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
|
# File 'lib/vagrant-multiprovider-snap/providers/virtualbox/action.rb', line 30
def self.action_snapshot_delete
Vagrant::Action::Builder.new.tap do |b|
b.use CheckVirtualbox
b.use Call, Created do |env, b2|
if env[:result]
b2.use Call, HasSnapshot do |env2, b3|
if env2[:result]
b3.use CheckAccessible
b3.use Call, SnapshotDelete do |env3,b4|
unless env3[:result]
b4.use MessageSnapshotNotDeleted
end
end
else
b3.use MessageSnapshotNotCreated
end
end
else
b2.use MessageNotCreated
end
end
end
end
|
.action_snapshot_rollback ⇒ Object
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# File 'lib/vagrant-multiprovider-snap/providers/virtualbox/action.rb', line 54
def self.action_snapshot_rollback
Vagrant::Action::Builder.new.tap do |b|
b.use CheckVirtualbox
b.use Call, Created do |env, b2|
if env[:result]
b2.use Call, HasSnapshot do |env2, b3|
if env2[:result]
b3.use CheckAccessible
b3.use SnapshotRollback
b3.use WaitForCommunicator, [:restoring, :running]
else
b3.use MessageSnapshotNotCreated
end
end
else
b2.use MessageNotCreated
end
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/virtualbox/action.rb', line 16
def self.action_snapshot_take
Vagrant::Action::Builder.new.tap do |b|
b.use CheckVirtualbox
b.use Call, Created do |env, b2|
if env[:result]
b2.use CheckAccessible
b2.use SnapshotTake
else
b2.use MessageNotCreated
end
end
end
end
|