vagrant-parallels 1.4.2 → 1.4.3
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/README.md +7 -8
- data/Rakefile +2 -2
- data/lib/vagrant-parallels.rb +7 -44
- data/lib/vagrant-parallels/action.rb +45 -45
- data/lib/vagrant-parallels/action/boot.rb +1 -2
- data/lib/vagrant-parallels/action/clear_network_interfaces.rb +1 -1
- data/lib/vagrant-parallels/action/customize.rb +1 -1
- data/lib/vagrant-parallels/action/destroy.rb +1 -1
- data/lib/vagrant-parallels/action/destroy_unused_network_interfaces.rb +2 -2
- data/lib/vagrant-parallels/action/forced_halt.rb +1 -1
- data/lib/vagrant-parallels/action/forward_ports.rb +2 -2
- data/lib/vagrant-parallels/action/handle_guest_tools.rb +9 -10
- data/lib/vagrant-parallels/action/import.rb +36 -24
- data/lib/vagrant-parallels/action/network.rb +37 -37
- data/lib/vagrant-parallels/action/package.rb +3 -3
- data/lib/vagrant-parallels/action/package_config_files.rb +3 -2
- data/lib/vagrant-parallels/action/prepare_nfs_settings.rb +2 -2
- data/lib/vagrant-parallels/action/resume.rb +1 -1
- data/lib/vagrant-parallels/action/sane_defaults.rb +0 -1
- data/lib/vagrant-parallels/action/set_name.rb +7 -7
- data/lib/vagrant-parallels/action/setup_package_files.rb +6 -6
- data/lib/vagrant-parallels/action/suspend.rb +1 -1
- data/lib/vagrant-parallels/config.rb +9 -11
- data/lib/vagrant-parallels/driver/meta.rb +1 -1
- data/lib/vagrant-parallels/driver/pd_10.rb +1 -1
- data/lib/vagrant-parallels/driver/pd_11.rb +1 -1
- data/lib/vagrant-parallels/driver/pd_8.rb +19 -19
- data/lib/vagrant-parallels/driver/pd_9.rb +1 -1
- data/lib/vagrant-parallels/errors.rb +2 -2
- data/lib/vagrant-parallels/guest_cap/linux/install_parallels_tools.rb +5 -5
- data/lib/vagrant-parallels/guest_cap/linux/mount_parallels_shared_folder.rb +3 -3
- data/lib/vagrant-parallels/model/forwarded_port.rb +1 -1
- data/lib/vagrant-parallels/plugin.rb +65 -30
- data/lib/vagrant-parallels/provider.rb +8 -8
- data/lib/vagrant-parallels/synced_folder.rb +6 -6
- data/lib/vagrant-parallels/util/compile_forwarded_ports.rb +1 -1
- data/lib/vagrant-parallels/version.rb +1 -1
- data/tasks/acceptance.rake +4 -4
- data/tasks/test.rake +1 -1
- data/test/acceptance/base.rb +2 -2
- data/test/acceptance/provider/linked_clone_spec.rb +2 -2
- data/test/acceptance/shared/context_parallels.rb +1 -1
- data/test/acceptance/skeletons/linked_clone/Vagrantfile +3 -3
- data/test/unit/base.rb +6 -6
- data/test/unit/config_test.rb +22 -22
- data/test/unit/driver/pd_10_test.rb +7 -7
- data/test/unit/driver/pd_8_test.rb +4 -4
- data/test/unit/driver/pd_9_test.rb +6 -6
- data/test/unit/support/shared/pd_driver_examples.rb +97 -97
- data/test/unit/synced_folder_test.rb +11 -11
- data/vagrant-parallels.gemspec +17 -19
- metadata +2 -32
- data/config/i18n-tasks.yml.erb +0 -18
- data/test/unit/locales/locales_test.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47a0c9bab9f20db1b5f572e99fb5781577958b65
|
4
|
+
data.tar.gz: 1ac985219b5ce4429d1b94751c1d521d0836d8b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b96578a97fc88c7152ed77a52773f8244487e2a5544aaf10d36e5a4eb8ba4a27c73165667688260e7a8b9814f491ce5805e4ccf71feff41dea1607b45e384a5
|
7
|
+
data.tar.gz: 71e2fc360d0925e131ac7377b57f2793e65e295eac419c67c705b45c0498ea719c66f0698e11bd39b19235a76cea9589f61cb14734179fa2ce1a1fb4425e7474
|
data/README.md
CHANGED
@@ -7,23 +7,22 @@ This is a plugin for [Vagrant](http://www.vagrantup.com),
|
|
7
7
|
allowing to power [Parallels Desktop for Mac](http://www.parallels.com/products/desktop/)
|
8
8
|
based virtual machines.
|
9
9
|
|
10
|
-
If you're just getting started with Vagrant, it is highly recommended that you
|
11
|
-
read the official [Vagrant documentation](http://docs.vagrantup.com/v2/) first.
|
12
|
-
|
13
10
|
### Requirements
|
14
11
|
- [Vagrant v1.5](http://www.vagrantup.com) or higher
|
15
12
|
- [Parallels Desktop 8 for Mac](http://www.parallels.com/products/desktop/) or higher
|
16
13
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
not be used with Vagrant.
|
14
|
+
*Note:* In [**Parallels Desktop 11 for Mac**](http://www.parallels.com/products/desktop/),
|
15
|
+
only **Pro** and **Business** editions are compatible with this Vagrant provider.
|
16
|
+
Standard edition doesn't have a command line functionality and can not be used
|
17
|
+
with Vagrant.
|
22
18
|
|
23
19
|
## Features
|
24
20
|
The Parallels provider supports all basic Vagrant features, including shared folders,
|
25
21
|
private and public networks, forwarded ports and so on.
|
26
22
|
|
23
|
+
If you're just getting started with Vagrant, it is highly recommended that you
|
24
|
+
read the official [Vagrant documentation](http://docs.vagrantup.com/v2/) first.
|
25
|
+
|
27
26
|
## Installation
|
28
27
|
First, make sure that you have [Parallels Desktop for Mac](http://www.parallels.com/products/desktop/)
|
29
28
|
and [Vagrant](http://www.vagrantup.com/downloads) properly installed.
|
data/Rakefile
CHANGED
@@ -13,9 +13,9 @@ $stderr.sync = true
|
|
13
13
|
# allows us to nicely separate rake tasks into individual files
|
14
14
|
# based on their role, which makes development and debugging easier
|
15
15
|
# than one monolithic file.
|
16
|
-
task_dir = File.expand_path(
|
16
|
+
task_dir = File.expand_path('../tasks', __FILE__)
|
17
17
|
Dir["#{task_dir}/**/*.rake"].each do |task_file|
|
18
18
|
load task_file
|
19
19
|
end
|
20
20
|
|
21
|
-
task :default =>
|
21
|
+
task :default => 'test:unit'
|
data/lib/vagrant-parallels.rb
CHANGED
@@ -1,56 +1,19 @@
|
|
1
|
-
require
|
1
|
+
require 'pathname'
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'vagrant-parallels/plugin'
|
4
|
+
require 'vagrant-parallels/version'
|
5
5
|
|
6
6
|
module VagrantPlugins
|
7
7
|
module Parallels
|
8
|
-
lib_path = Pathname.new(File.expand_path(
|
9
|
-
autoload :Action, lib_path.join(
|
10
|
-
autoload :Errors, lib_path.join(
|
8
|
+
lib_path = Pathname.new(File.expand_path('../vagrant-parallels', __FILE__))
|
9
|
+
autoload :Action, lib_path.join('action')
|
10
|
+
autoload :Errors, lib_path.join('errors')
|
11
11
|
|
12
12
|
# This returns the path to the source of this plugin.
|
13
13
|
#
|
14
14
|
# @return [Pathname]
|
15
15
|
def self.source_root
|
16
|
-
@source_root ||= Pathname.new(File.expand_path(
|
16
|
+
@source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
|
17
17
|
end
|
18
|
-
|
19
|
-
# This initializes the internationalization strings.
|
20
|
-
def self.setup_i18n
|
21
|
-
I18n.load_path << File.expand_path("locales/en.yml", Parallels.source_root)
|
22
|
-
I18n.reload!
|
23
|
-
end
|
24
|
-
|
25
|
-
# This sets up our log level to be whatever VAGRANT_LOG is.
|
26
|
-
def self.setup_logging
|
27
|
-
require "log4r"
|
28
|
-
|
29
|
-
level = nil
|
30
|
-
begin
|
31
|
-
level = Log4r.const_get(ENV["VAGRANT_LOG"].upcase)
|
32
|
-
rescue NameError
|
33
|
-
# This means that the logging constant wasn't found,
|
34
|
-
# which is fine. We just keep `level` as `nil`. But
|
35
|
-
# we tell the user.
|
36
|
-
level = nil
|
37
|
-
end
|
38
|
-
|
39
|
-
# Some constants, such as "true" resolve to booleans, so the
|
40
|
-
# above error checking doesn't catch it. This will check to make
|
41
|
-
# sure that the log level is an integer, as Log4r requires.
|
42
|
-
level = nil if !level.is_a?(Integer)
|
43
|
-
|
44
|
-
# Set the logging level on all "vagrant" namespaced
|
45
|
-
# logs as long as we have a valid level.
|
46
|
-
if level
|
47
|
-
logger = Log4r::Logger.new("vagrant_parallels")
|
48
|
-
logger.outputters = Log4r::Outputter.stderr
|
49
|
-
logger.level = level
|
50
|
-
logger = nil
|
51
|
-
end
|
52
|
-
end
|
53
|
-
Parallels.setup_logging
|
54
|
-
Parallels.setup_i18n
|
55
18
|
end
|
56
19
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'vagrant/action/builder'
|
2
2
|
|
3
3
|
module VagrantPlugins
|
4
4
|
module Parallels
|
@@ -25,11 +25,11 @@ module VagrantPlugins
|
|
25
25
|
b.use ForwardPorts
|
26
26
|
b.use SetHostname
|
27
27
|
b.use SaneDefaults
|
28
|
-
b.use Customize,
|
28
|
+
b.use Customize, 'pre-boot'
|
29
29
|
b.use Boot
|
30
|
-
b.use Customize,
|
30
|
+
b.use Customize, 'post-boot'
|
31
31
|
b.use WaitForCommunicator, [:starting, :running]
|
32
|
-
b.use Customize,
|
32
|
+
b.use Customize, 'post-comm'
|
33
33
|
b.use HandleGuestTools
|
34
34
|
end
|
35
35
|
end
|
@@ -41,13 +41,13 @@ module VagrantPlugins
|
|
41
41
|
b.use ConfigValidate
|
42
42
|
b.use Call, IsState, :not_created do |env1, b1|
|
43
43
|
if env1[:result]
|
44
|
-
b1.use Message, I18n.t(
|
44
|
+
b1.use Message, I18n.t('vagrant.commands.common.vm_not_created')
|
45
45
|
next
|
46
46
|
end
|
47
47
|
|
48
48
|
b1.use Call, DestroyConfirm do |env2, b2|
|
49
49
|
if !env2[:result]
|
50
|
-
b2.use Message, I18n.t(
|
50
|
+
b2.use Message, I18n.t('vagrant.commands.destroy.will_not_destroy',
|
51
51
|
:name => env2[:machine].name)
|
52
52
|
next
|
53
53
|
end
|
@@ -71,7 +71,7 @@ module VagrantPlugins
|
|
71
71
|
b.use ConfigValidate
|
72
72
|
b.use Call, IsState, :not_created do |env1, b1|
|
73
73
|
if env1[:result]
|
74
|
-
b1.use Message, I18n.t(
|
74
|
+
b1.use Message, I18n.t('vagrant.commands.common.vm_not_created')
|
75
75
|
next
|
76
76
|
end
|
77
77
|
|
@@ -98,7 +98,7 @@ module VagrantPlugins
|
|
98
98
|
b.use ConfigValidate
|
99
99
|
b.use Call, IsState, :not_created do |env1, b1|
|
100
100
|
if env1[:result]
|
101
|
-
b1.use Message, I18n.t(
|
101
|
+
b1.use Message, I18n.t('vagrant.commands.common.vm_not_created')
|
102
102
|
next
|
103
103
|
end
|
104
104
|
|
@@ -119,13 +119,13 @@ module VagrantPlugins
|
|
119
119
|
b.use ConfigValidate
|
120
120
|
b.use Call, IsState, :not_created do |env1, b1|
|
121
121
|
if env1[:result]
|
122
|
-
b1.use Message, I18n.t(
|
122
|
+
b1.use Message, I18n.t('vagrant.commands.common.vm_not_created')
|
123
123
|
next
|
124
124
|
end
|
125
125
|
|
126
126
|
b1.use Call, IsState, :running do |env2, b2|
|
127
127
|
if !env2[:result]
|
128
|
-
b2.use Message, I18n.t(
|
128
|
+
b2.use Message, I18n.t('vagrant.commands.common.vm_not_running')
|
129
129
|
next
|
130
130
|
end
|
131
131
|
|
@@ -143,7 +143,7 @@ module VagrantPlugins
|
|
143
143
|
b.use ConfigValidate
|
144
144
|
b.use Call, IsState, :not_created do |env1, b1|
|
145
145
|
if env1[:result]
|
146
|
-
b1.use Message, I18n.t(
|
146
|
+
b1.use Message, I18n.t('vagrant.commands.common.vm_not_created')
|
147
147
|
next
|
148
148
|
end
|
149
149
|
|
@@ -160,7 +160,7 @@ module VagrantPlugins
|
|
160
160
|
b.use ConfigValidate
|
161
161
|
b.use Call, IsState, :not_created do |env1, b1|
|
162
162
|
if env1[:result]
|
163
|
-
b1.use Message, I18n.t(
|
163
|
+
b1.use Message, I18n.t('vagrant.commands.common.vm_not_created')
|
164
164
|
next
|
165
165
|
end
|
166
166
|
|
@@ -179,7 +179,7 @@ module VagrantPlugins
|
|
179
179
|
b.use ConfigValidate
|
180
180
|
b.use Call, IsState, :not_created do |env1, b1|
|
181
181
|
if env1[:result]
|
182
|
-
b1.use Message, I18n.t(
|
182
|
+
b1.use Message, I18n.t('vagrant.commands.common.vm_not_created')
|
183
183
|
next
|
184
184
|
end
|
185
185
|
|
@@ -200,7 +200,7 @@ module VagrantPlugins
|
|
200
200
|
b.use ConfigValidate
|
201
201
|
b.use Call, IsState, :not_created do |env1, b1|
|
202
202
|
if env1[:result]
|
203
|
-
b1.use Message, I18n.t(
|
203
|
+
b1.use Message, I18n.t('vagrant.commands.common.vm_not_created')
|
204
204
|
next
|
205
205
|
end
|
206
206
|
|
@@ -223,7 +223,7 @@ module VagrantPlugins
|
|
223
223
|
b.use Call, IsState, :running do |env1, b1|
|
224
224
|
# If the VM is running, then our work here is done, exit
|
225
225
|
if env1[:result]
|
226
|
-
b1.use Message, I18n.t(
|
226
|
+
b1.use Message, I18n.t('vagrant_parallels.commands.common.vm_already_running')
|
227
227
|
next
|
228
228
|
end
|
229
229
|
|
@@ -249,7 +249,7 @@ module VagrantPlugins
|
|
249
249
|
b.use ConfigValidate
|
250
250
|
b.use Call, IsState, :not_created do |env1, b1|
|
251
251
|
if env1[:result]
|
252
|
-
b1.use Message, I18n.t(
|
252
|
+
b1.use Message, I18n.t('vagrant.commands.common.vm_not_created')
|
253
253
|
next
|
254
254
|
end
|
255
255
|
|
@@ -276,7 +276,7 @@ module VagrantPlugins
|
|
276
276
|
b.use Call, IsState, :not_created do |env1, b1|
|
277
277
|
# If the VM is NOT created yet, then do the setup steps
|
278
278
|
if env1[:result]
|
279
|
-
b1.use Customize,
|
279
|
+
b1.use Customize, 'pre-import'
|
280
280
|
b1.use Import
|
281
281
|
b1.use Customize, 'post-import'
|
282
282
|
end
|
@@ -295,11 +295,11 @@ module VagrantPlugins
|
|
295
295
|
end
|
296
296
|
end
|
297
297
|
|
298
|
-
b.use Customize,
|
298
|
+
b.use Customize, 'pre-boot'
|
299
299
|
b.use Boot
|
300
|
-
b.use Customize,
|
300
|
+
b.use Customize, 'post-boot'
|
301
301
|
b.use WaitForCommunicator, [:starting, :running]
|
302
|
-
b.use Customize,
|
302
|
+
b.use Customize, 'post-comm'
|
303
303
|
end
|
304
304
|
end
|
305
305
|
|
@@ -311,13 +311,13 @@ module VagrantPlugins
|
|
311
311
|
b.use ConfigValidate
|
312
312
|
b.use Call, IsState, :not_created do |env1, b1|
|
313
313
|
if env1[:result]
|
314
|
-
b1.use Message, I18n.t(
|
314
|
+
b1.use Message, I18n.t('vagrant.commands.common.vm_not_created')
|
315
315
|
next
|
316
316
|
end
|
317
317
|
|
318
318
|
b1.use Call, IsState, :running do |env2, b2|
|
319
319
|
if !env2[:result]
|
320
|
-
b2.use Message, I18n.t(
|
320
|
+
b2.use Message, I18n.t('vagrant.commands.common.vm_not_running')
|
321
321
|
next
|
322
322
|
end
|
323
323
|
b2.use PrepareNFSValidIds
|
@@ -329,29 +329,29 @@ module VagrantPlugins
|
|
329
329
|
end
|
330
330
|
|
331
331
|
|
332
|
-
autoload :Boot, File.expand_path(
|
333
|
-
autoload :HandleGuestTools, File.expand_path(
|
334
|
-
autoload :HandleForwardedPortCollisions, File.expand_path(
|
335
|
-
autoload :ClearNetworkInterfaces, File.expand_path(
|
336
|
-
autoload :ClearForwardedPorts, File.expand_path(
|
337
|
-
autoload :Customize, File.expand_path(
|
338
|
-
autoload :Destroy, File.expand_path(
|
339
|
-
autoload :DestroyUnusedNetworkInterfaces, File.expand_path(
|
340
|
-
autoload :Export, File.expand_path(
|
341
|
-
autoload :ForcedHalt, File.expand_path(
|
342
|
-
autoload :ForwardPorts, File.expand_path(
|
343
|
-
autoload :Import, File.expand_path(
|
344
|
-
autoload :Network, File.expand_path(
|
345
|
-
autoload :Package, File.expand_path(
|
346
|
-
autoload :PackageConfigFiles, File.expand_path(
|
347
|
-
autoload :PrepareForwardedPortCollisionParams, File.expand_path(
|
348
|
-
autoload :PrepareNFSSettings, File.expand_path(
|
349
|
-
autoload :PrepareNFSValidIds, File.expand_path(
|
350
|
-
autoload :Resume, File.expand_path(
|
351
|
-
autoload :SaneDefaults, File.expand_path(
|
352
|
-
autoload :SetupPackageFiles, File.expand_path(
|
353
|
-
autoload :SetName, File.expand_path(
|
354
|
-
autoload :Suspend, File.expand_path(
|
332
|
+
autoload :Boot, File.expand_path('../action/boot', __FILE__)
|
333
|
+
autoload :HandleGuestTools, File.expand_path('../action/handle_guest_tools', __FILE__)
|
334
|
+
autoload :HandleForwardedPortCollisions, File.expand_path('../action/handle_forwarded_port_collisions.rb', __FILE__)
|
335
|
+
autoload :ClearNetworkInterfaces, File.expand_path('../action/clear_network_interfaces', __FILE__)
|
336
|
+
autoload :ClearForwardedPorts, File.expand_path('../action/clear_forwarded_ports', __FILE__)
|
337
|
+
autoload :Customize, File.expand_path('../action/customize', __FILE__)
|
338
|
+
autoload :Destroy, File.expand_path('../action/destroy', __FILE__)
|
339
|
+
autoload :DestroyUnusedNetworkInterfaces, File.expand_path('../action/destroy_unused_network_interfaces', __FILE__)
|
340
|
+
autoload :Export, File.expand_path('../action/export', __FILE__)
|
341
|
+
autoload :ForcedHalt, File.expand_path('../action/forced_halt', __FILE__)
|
342
|
+
autoload :ForwardPorts, File.expand_path('../action/forward_ports', __FILE__)
|
343
|
+
autoload :Import, File.expand_path('../action/import', __FILE__)
|
344
|
+
autoload :Network, File.expand_path('../action/network', __FILE__)
|
345
|
+
autoload :Package, File.expand_path('../action/package', __FILE__)
|
346
|
+
autoload :PackageConfigFiles, File.expand_path('../action/package_config_files', __FILE__)
|
347
|
+
autoload :PrepareForwardedPortCollisionParams, File.expand_path('../action/prepare_forwarded_port_collision_params', __FILE__)
|
348
|
+
autoload :PrepareNFSSettings, File.expand_path('../action/prepare_nfs_settings', __FILE__)
|
349
|
+
autoload :PrepareNFSValidIds, File.expand_path('../action/prepare_nfs_valid_ids', __FILE__)
|
350
|
+
autoload :Resume, File.expand_path('../action/resume', __FILE__)
|
351
|
+
autoload :SaneDefaults, File.expand_path('../action/sane_defaults',__FILE__)
|
352
|
+
autoload :SetupPackageFiles, File.expand_path('../action/setup_package_files', __FILE__)
|
353
|
+
autoload :SetName, File.expand_path('../action/set_name', __FILE__)
|
354
|
+
autoload :Suspend, File.expand_path('../action/suspend', __FILE__)
|
355
355
|
end
|
356
356
|
end
|
357
357
|
end
|
@@ -9,12 +9,11 @@ module VagrantPlugins
|
|
9
9
|
def call(env)
|
10
10
|
@env = env
|
11
11
|
|
12
|
-
env[:ui].info I18n.t(
|
12
|
+
env[:ui].info I18n.t('vagrant.actions.vm.boot.booting')
|
13
13
|
env[:machine].provider.driver.start
|
14
14
|
|
15
15
|
@app.call(env)
|
16
16
|
end
|
17
|
-
|
18
17
|
end
|
19
18
|
end
|
20
19
|
end
|
@@ -8,7 +8,7 @@ module VagrantPlugins
|
|
8
8
|
|
9
9
|
def call(env)
|
10
10
|
# Delete all disabled network adapters
|
11
|
-
env[:ui].info I18n.t(
|
11
|
+
env[:ui].info I18n.t('vagrant.actions.vm.clear_network_interfaces.deleting')
|
12
12
|
env[:machine].provider.driver.delete_disabled_adapters
|
13
13
|
|
14
14
|
@app.call(env)
|
@@ -16,7 +16,7 @@ module VagrantPlugins
|
|
16
16
|
end
|
17
17
|
|
18
18
|
if !customizations.empty?
|
19
|
-
env[:ui].info I18n.t(
|
19
|
+
env[:ui].info I18n.t('vagrant.actions.vm.customize.running', event: @event)
|
20
20
|
|
21
21
|
# Execute each customization command.
|
22
22
|
customizations.each do |command|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'log4r'
|
2
2
|
|
3
3
|
module VagrantPlugins
|
4
4
|
module Parallels
|
@@ -10,7 +10,7 @@ module VagrantPlugins
|
|
10
10
|
|
11
11
|
def call(env)
|
12
12
|
if env[:machine].provider_config.destroy_unused_network_interfaces
|
13
|
-
env[:ui].info I18n.t(
|
13
|
+
env[:ui].info I18n.t('vagrant.actions.vm.destroy_network.destroying')
|
14
14
|
env[:machine].provider.driver.delete_unused_host_only_networks
|
15
15
|
end
|
16
16
|
|
@@ -9,7 +9,7 @@ module VagrantPlugins
|
|
9
9
|
def call(env)
|
10
10
|
current_state = env[:machine].state.id
|
11
11
|
if current_state == :running
|
12
|
-
env[:ui].info I18n.t(
|
12
|
+
env[:ui].info I18n.t('vagrant.actions.vm.halt.force')
|
13
13
|
env[:machine].provider.driver.halt(:force)
|
14
14
|
end
|
15
15
|
@app.call(env)
|
@@ -2,7 +2,7 @@ module VagrantPlugins
|
|
2
2
|
module Parallels
|
3
3
|
module Action
|
4
4
|
class ForwardPorts
|
5
|
-
include Util::CompileForwardedPorts
|
5
|
+
include VagrantPlugins::Parallels::Util::CompileForwardedPorts
|
6
6
|
|
7
7
|
def initialize(app, env)
|
8
8
|
@app = app
|
@@ -40,7 +40,7 @@ module VagrantPlugins
|
|
40
40
|
# because the VM is using Shared networking. Host-only and
|
41
41
|
# bridged networking don't require port-forwarding and establishing
|
42
42
|
# forwarded ports on these attachment types has uncertain behaviour.
|
43
|
-
@env[:ui].detail(I18n.t(
|
43
|
+
@env[:ui].detail(I18n.t('vagrant_parallels.actions.vm.forward_ports.forwarding_entry',
|
44
44
|
message_attributes))
|
45
45
|
|
46
46
|
# Add the options to the ports array to send to the driver later
|
@@ -11,39 +11,39 @@ module VagrantPlugins
|
|
11
11
|
@machine = env[:machine]
|
12
12
|
|
13
13
|
if !@machine.provider_config.check_guest_tools
|
14
|
-
@logger.info(
|
14
|
+
@logger.info('Not checking Parallels Tools because of configuration')
|
15
15
|
return @app.call(env)
|
16
16
|
end
|
17
17
|
|
18
|
-
env[:ui].output(I18n.t(
|
18
|
+
env[:ui].output(I18n.t('vagrant_parallels.actions.vm.handle_guest_tools.checking'))
|
19
19
|
|
20
20
|
tools_state = parallels_tools_state
|
21
21
|
|
22
22
|
if tools_state == :installed
|
23
|
-
@logger.info(
|
23
|
+
@logger.info('The proper version of Parallels Tools is already installed')
|
24
24
|
return @app.call(env)
|
25
25
|
elsif tools_state == :outdated
|
26
|
-
env[:ui].warn(I18n.t(
|
26
|
+
env[:ui].warn(I18n.t('vagrant_parallels.actions.vm.handle_guest_tools.outdated'))
|
27
27
|
else
|
28
|
-
env[:ui].warn(I18n.t(
|
28
|
+
env[:ui].warn(I18n.t('vagrant_parallels.actions.vm.handle_guest_tools.not_detected'))
|
29
29
|
end
|
30
30
|
|
31
31
|
if !@machine.provider_config.update_guest_tools
|
32
|
-
@logger.info(
|
32
|
+
@logger.info('Not updating Parallels Tools because of configuration')
|
33
33
|
return @app.call(env)
|
34
34
|
end
|
35
35
|
|
36
36
|
# Update/Install Parallels Tools
|
37
37
|
if @machine.guest.capability?(:install_parallels_tools)
|
38
|
-
env[:ui].output(I18n.t(
|
38
|
+
env[:ui].output(I18n.t('vagrant_parallels.actions.vm.handle_guest_tools.installing'))
|
39
39
|
@machine.guest.capability(:install_parallels_tools)
|
40
40
|
|
41
41
|
# The VM should be rebooted to enable kernel modules
|
42
42
|
# bundled with Parallels Tools.
|
43
|
-
env[:ui].output(I18n.t(
|
43
|
+
env[:ui].output(I18n.t('vagrant_parallels.actions.vm.handle_guest_tools.rebooting'))
|
44
44
|
@machine.action(:simple_reboot)
|
45
45
|
else
|
46
|
-
env[:ui].warn(I18n.t(
|
46
|
+
env[:ui].warn(I18n.t('vagrant_parallels.actions.vm.handle_guest_tools.cant_install'))
|
47
47
|
end
|
48
48
|
|
49
49
|
# Continue
|
@@ -67,7 +67,6 @@ module VagrantPlugins
|
|
67
67
|
|
68
68
|
@machine.provider.driver.read_guest_tools_state
|
69
69
|
end
|
70
|
-
|
71
70
|
end
|
72
71
|
end
|
73
72
|
end
|