vagrant-parallels 1.0.9.rc1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vagrant-parallels/action.rb +121 -122
- data/lib/vagrant-parallels/action/customize.rb +2 -3
- data/lib/vagrant-parallels/action/handle_guest_tools.rb +51 -0
- data/lib/vagrant-parallels/action/import.rb +1 -1
- data/lib/vagrant-parallels/action/is_driver_version.rb +28 -0
- data/lib/vagrant-parallels/action/set_power_consumption.rb +2 -6
- data/lib/vagrant-parallels/config.rb +6 -0
- data/lib/vagrant-parallels/driver/base.rb +42 -57
- data/lib/vagrant-parallels/driver/meta.rb +4 -5
- data/lib/vagrant-parallels/driver/pd_8.rb +80 -50
- data/lib/vagrant-parallels/driver/pd_9.rb +7 -7
- data/lib/vagrant-parallels/errors.rb +8 -4
- data/lib/vagrant-parallels/guest_cap/linux/install_parallels_tools.rb +53 -0
- data/lib/vagrant-parallels/plugin.rb +7 -2
- data/lib/vagrant-parallels/version.rb +1 -1
- data/locales/en.yml +34 -29
- data/test/unit/driver/pd_8_test.rb +3 -0
- data/test/unit/driver/pd_9_test.rb +3 -0
- data/test/unit/support/shared/pd_driver_examples.rb +33 -9
- metadata +5 -14
- data/lib/vagrant-parallels/action/check_accessible.rb +0 -23
- data/lib/vagrant-parallels/action/check_created.rb +0 -21
- data/lib/vagrant-parallels/action/check_guest_tools.rb +0 -37
- data/lib/vagrant-parallels/action/check_parallels.rb +0 -22
- data/lib/vagrant-parallels/action/check_running.rb +0 -21
- data/lib/vagrant-parallels/action/created.rb +0 -20
- data/lib/vagrant-parallels/action/is_running.rb +0 -20
- data/lib/vagrant-parallels/action/is_suspended.rb +0 -21
- data/lib/vagrant-parallels/action/message_already_running.rb +0 -16
- data/lib/vagrant-parallels/action/message_not_created.rb +0 -16
- data/lib/vagrant-parallels/action/message_not_running.rb +0 -16
- data/lib/vagrant-parallels/action/message_will_not_destroy.rb +0 -17
@@ -1,37 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module Parallels
|
3
|
-
module Action
|
4
|
-
class CheckGuestTools
|
5
|
-
def initialize(app, env)
|
6
|
-
@app = app
|
7
|
-
@logger = Log4r::Logger.new("vagrant::plugins::parallels::check_guest_tools")
|
8
|
-
end
|
9
|
-
|
10
|
-
def call(env)
|
11
|
-
if !env[:machine].provider_config.check_guest_tools
|
12
|
-
@logger.info("Not checking guest tools because configuration")
|
13
|
-
return @app.call(env)
|
14
|
-
end
|
15
|
-
|
16
|
-
env[:ui].output(I18n.t("vagrant_parallels.parallels.checking_guest_tools"))
|
17
|
-
|
18
|
-
tools_version = env[:machine].provider.driver.read_guest_tools_version
|
19
|
-
if !tools_version
|
20
|
-
env[:ui].warn I18n.t("vagrant_parallels.actions.vm.check_guest_tools.not_detected")
|
21
|
-
else
|
22
|
-
pd_version = env[:machine].provider.driver.version
|
23
|
-
if Gem::Version.new(pd_version) != Gem::Version.new(tools_version)
|
24
|
-
env[:ui].warn(I18n.t("vagrant_parallels.actions.vm.check_guest_tools.version_mismatch",
|
25
|
-
:tools_version => tools_version,
|
26
|
-
:parallels_version => pd_version))
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
# Continue
|
31
|
-
@app.call(env)
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module Parallels
|
3
|
-
module Action
|
4
|
-
# Checks that Parallels is installed and ready to be used.
|
5
|
-
class CheckParallels
|
6
|
-
def initialize(app, env)
|
7
|
-
@app = app
|
8
|
-
end
|
9
|
-
|
10
|
-
def call(env)
|
11
|
-
# This verifies that Parallels is installed and the driver is
|
12
|
-
# ready to function. If not, then an exception will be raised
|
13
|
-
# which will break us out of execution of the middleware sequence.
|
14
|
-
env[:machine].provider.driver.verify!
|
15
|
-
|
16
|
-
# Carry on.
|
17
|
-
@app.call(env)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module Parallels
|
3
|
-
module Action
|
4
|
-
# This middleware checks that the VM is running, and raises an exception
|
5
|
-
# if it is not, notifying the user that the VM must be running.
|
6
|
-
class CheckRunning
|
7
|
-
def initialize(app, env)
|
8
|
-
@app = app
|
9
|
-
end
|
10
|
-
|
11
|
-
def call(env)
|
12
|
-
if env[:machine].state.id != :running
|
13
|
-
raise Vagrant::Errors::VMNotRunningError
|
14
|
-
end
|
15
|
-
|
16
|
-
@app.call(env)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module Parallels
|
3
|
-
module Action
|
4
|
-
class Created
|
5
|
-
def initialize(app, env)
|
6
|
-
@app = app
|
7
|
-
end
|
8
|
-
|
9
|
-
def call(env)
|
10
|
-
# Set the result to be true if the machine is created.
|
11
|
-
env[:result] = (env[:machine].state.id != :not_created)
|
12
|
-
|
13
|
-
# Call the next if we have one (but we shouldn't, since this
|
14
|
-
# middleware is built to run with the Call-type middlewares)
|
15
|
-
@app.call(env)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module Parallels
|
3
|
-
module Action
|
4
|
-
class IsRunning
|
5
|
-
def initialize(app, env)
|
6
|
-
@app = app
|
7
|
-
end
|
8
|
-
|
9
|
-
def call(env)
|
10
|
-
# Set the result to be true if the machine is running.
|
11
|
-
env[:result] = env[:machine].state.id == :running
|
12
|
-
|
13
|
-
# Call the next if we have one (but we shouldn't, since this
|
14
|
-
# middleware is built to run with the Call-type middlewares)
|
15
|
-
@app.call(env)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module Parallels
|
3
|
-
module Action
|
4
|
-
class IsSuspended
|
5
|
-
def initialize(app, env)
|
6
|
-
@app = app
|
7
|
-
end
|
8
|
-
|
9
|
-
def call(env)
|
10
|
-
|
11
|
-
# Set the result to be true if the machine is suspended.
|
12
|
-
env[:result] = env[:machine].state.id == :suspended
|
13
|
-
|
14
|
-
# Call the next if we have one (but we shouldn't, since this
|
15
|
-
# middleware is built to run with the Call-type middlewares)
|
16
|
-
@app.call(env)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module Parallels
|
3
|
-
module Action
|
4
|
-
class MessageAlreadyRunning
|
5
|
-
def initialize(app, env)
|
6
|
-
@app = app
|
7
|
-
end
|
8
|
-
|
9
|
-
def call(env)
|
10
|
-
env[:ui].info I18n.t("vagrant_parallels.commands.common.vm_already_running")
|
11
|
-
@app.call(env)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module Parallels
|
3
|
-
module Action
|
4
|
-
class MessageNotCreated
|
5
|
-
def initialize(app, env)
|
6
|
-
@app = app
|
7
|
-
end
|
8
|
-
|
9
|
-
def call(env)
|
10
|
-
env[:ui].info I18n.t("vagrant.commands.common.vm_not_created")
|
11
|
-
@app.call(env)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module Parallels
|
3
|
-
module Action
|
4
|
-
class MessageNotRunning
|
5
|
-
def initialize(app, env)
|
6
|
-
@app = app
|
7
|
-
end
|
8
|
-
|
9
|
-
def call(env)
|
10
|
-
env[:ui].info I18n.t("vagrant.commands.common.vm_not_running")
|
11
|
-
@app.call(env)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module Parallels
|
3
|
-
module Action
|
4
|
-
class MessageWillNotDestroy
|
5
|
-
def initialize(app, env)
|
6
|
-
@app = app
|
7
|
-
end
|
8
|
-
|
9
|
-
def call(env)
|
10
|
-
env[:ui].info I18n.t("vagrant.commands.destroy.will_not_destroy",
|
11
|
-
:name => env[:machine].name)
|
12
|
-
@app.call(env)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|