Module: VagrantPlugins::VagrantHyperV::Action
- Includes:
- Vagrant::Action::Builtin
- Defined in:
- lib/vagrant-windows-hyperv/action.rb,
lib/vagrant-windows-hyperv/action/rdp.rb,
lib/vagrant-windows-hyperv/action/export.rb,
lib/vagrant-windows-hyperv/action/package.rb,
lib/vagrant-windows-hyperv/action/setup_package_files.rb
Defined Under Namespace
Classes: Export, Package, Rdp, SetupPackageFiles
Class Method Summary
collapse
Class Method Details
.action_package ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/vagrant-windows-hyperv/action.rb', line 15
def self.action_package
Vagrant::Action::Builder.new.tap do |b|
b.use Call, IsState, :not_created do |env1, b2|
if env1[:result]
b2.use Message, I18n.t("vagrant_hyperv.message_not_created")
next
end
b2.use SetupPackageFiles
b2.use Call, GracefulHalt, :off, :running do |env2, b3|
if !env2[:result]
b3.use StopInstance
end
end
b2.use Export
b2.use Package
end
end
end
|
.action_rdp ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/vagrant-windows-hyperv/action.rb', line 34
def self.action_rdp
Vagrant::Action::Builder.new.tap do |b|
b.use ConfigValidate
b.use Call, IsState, :not_created do |env, b2|
if env[:result]
b2.use Message, I18n.t("vagrant_hyperv.message_not_created")
next
end
b2.use Call, IsState, :running do |env1, b3|
if !env1[:result]
b3.use Message, I18n.t("vagrant_win_hyperv.message_rdp_not_ready")
next
end
b3.use Rdp
end
end
end
end
|