vagrant-parallels 1.3.12 → 1.3.13
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/Vagrantfile +17 -12
- data/lib/vagrant-parallels/cap/nic_mac_addresses.rb +1 -1
- data/lib/vagrant-parallels/driver/base.rb +3 -3
- data/lib/vagrant-parallels/driver/pd_8.rb +13 -6
- data/lib/vagrant-parallels/errors.rb +4 -0
- data/lib/vagrant-parallels/version.rb +1 -1
- data/locales/en.yml +4 -0
- data/test/unit/support/shared/parallels_context.rb +1 -1
- data/test/unit/support/shared/pd_driver_examples.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 727a5615d19f3fff40b44693a73f342cc06b9001
|
4
|
+
data.tar.gz: b1e332a7d7e33212ab4d2a667793164d072e2808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4370287033f4ac59521630571d7b9bdc968aee1131f671a0cb38dabe1225cd02228ee93b41447706c77cd43797a07b1b4d901579cda297895c93da69fb8e0118
|
7
|
+
data.tar.gz: 7abeeba088fc9797c2ad6aae3d7ab3587c553fd70cb9bffcbc4fcb4fb7a423fc313bd886650be633b22d680097b6150af23b80b979c43894d8ee17806109d763
|
data/Vagrantfile
CHANGED
@@ -8,7 +8,7 @@ Vagrant.configure('2') do |config|
|
|
8
8
|
|
9
9
|
u.vm.provider 'parallels' do |prl|
|
10
10
|
prl.regen_box_uuid = false
|
11
|
-
prl.linked_clone = true
|
11
|
+
#prl.linked_clone = true
|
12
12
|
# prl.customize("pre-boot" , ["set", :id, "--device-add", "serial", "--output", "/path/to/serial_out.txt"])
|
13
13
|
end
|
14
14
|
|
@@ -41,17 +41,22 @@ Vagrant.configure('2') do |config|
|
|
41
41
|
v.regen_box_uuid = false
|
42
42
|
end
|
43
43
|
|
44
|
-
c.vm.provider "parallels" do |v|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
50
|
-
|
51
|
-
c.vm.provider "parallels" do |v|
|
52
|
-
|
53
|
-
|
54
|
-
end
|
44
|
+
# c.vm.provider "parallels" do |v|
|
45
|
+
# v.customize ["set", :id, "--smart-mount", "off"]
|
46
|
+
# v.customize ["set", :id, "--shared-profile", "off"]
|
47
|
+
# v.customize ["set", :id, "--shared-cloud", "off"]
|
48
|
+
#
|
49
|
+
# end
|
50
|
+
#
|
51
|
+
# c.vm.provider "parallels" do |v|
|
52
|
+
# v.customize("post-import", ["set", :id, "--device-add", "serial", "--output", "/Users/legal/serial_out.txt"])
|
53
|
+
# v.customize ["set", :id, "--device-set", "serial0", "--output", "/Users/legal/serial_out.txt"]
|
54
|
+
# end
|
55
|
+
|
56
|
+
c.vm.provider :parallels do |prl, config_override|
|
57
|
+
config_override.vm.network :public_network, adapter: 0
|
58
|
+
prl.network_adapter(1, :shared)
|
59
|
+
end
|
55
60
|
|
56
61
|
# c.vm.network 'private_network', ip: '192.168.60.4'
|
57
62
|
# c.vm.network 'private_network', ip: '10.2.0.220', netmask: '255.255.0.0'
|
@@ -9,7 +9,7 @@ module VagrantPlugins
|
|
9
9
|
nic_macs = machine.provider.driver.read_mac_addresses
|
10
10
|
|
11
11
|
# Make numeration starting from 1, as it is expected in Vagrant.
|
12
|
-
Hash[nic_macs.map{ |
|
12
|
+
Hash[nic_macs.map.with_index{ |mac, index| [index+1, mac] }]
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -148,15 +148,15 @@ module VagrantPlugins
|
|
148
148
|
def read_host_only_interfaces
|
149
149
|
end
|
150
150
|
|
151
|
-
# Returns the MAC address of the first network interface.
|
151
|
+
# Returns the MAC address of the first Shared network interface.
|
152
152
|
#
|
153
153
|
# @return [String]
|
154
154
|
def read_mac_address
|
155
155
|
end
|
156
156
|
|
157
|
-
# Returns the network interface card MAC addresses
|
157
|
+
# Returns the array of network interface card MAC addresses
|
158
158
|
#
|
159
|
-
# @return [
|
159
|
+
# @return [Array<String>]
|
160
160
|
def read_mac_addresses
|
161
161
|
end
|
162
162
|
|
@@ -302,13 +302,20 @@ module VagrantPlugins
|
|
302
302
|
end
|
303
303
|
|
304
304
|
def read_mac_address
|
305
|
-
|
306
|
-
|
305
|
+
hw_info = read_settings.fetch('Hardware', {})
|
306
|
+
shared_ifaces = hw_info.select do |name, params|
|
307
|
+
name.start_with?('net') && params['type'] == 'shared'
|
308
|
+
end
|
309
|
+
|
310
|
+
if shared_ifaces.empty?
|
311
|
+
raise Errors::SharedAdapterNotFound
|
312
|
+
end
|
313
|
+
|
314
|
+
shared_ifaces.values.first.fetch('mac', nil)
|
307
315
|
end
|
308
316
|
|
309
317
|
def read_mac_addresses
|
310
|
-
|
311
|
-
Hash[macs.map.with_index{ |mac, ind| [ind, mac.gsub(':', '')] }]
|
318
|
+
read_vm_option('mac').strip.gsub(':', '').split(' ')
|
312
319
|
end
|
313
320
|
|
314
321
|
def read_network_interfaces
|
@@ -465,7 +472,7 @@ module VagrantPlugins
|
|
465
472
|
# If we reach this point, it means that we consistently got the
|
466
473
|
# failure, do a standard execute now. This will raise an
|
467
474
|
# exception if it fails again.
|
468
|
-
|
475
|
+
execute(*args)
|
469
476
|
end
|
470
477
|
|
471
478
|
def registered?(uuid)
|
@@ -534,7 +541,7 @@ module VagrantPlugins
|
|
534
541
|
# If we reach this point, it means that we consistently got the
|
535
542
|
# failure, do a standard execute now. This will raise an
|
536
543
|
# exception if it fails again.
|
537
|
-
|
544
|
+
execute(*args)
|
538
545
|
end
|
539
546
|
|
540
547
|
def unshare_folders(names)
|
@@ -55,6 +55,10 @@ module VagrantPlugins
|
|
55
55
|
error_key(:parallels_vm_option_not_found)
|
56
56
|
end
|
57
57
|
|
58
|
+
class SharedAdapterNotFound < VagrantParallelsError
|
59
|
+
error_key(:shared_adapter_not_found)
|
60
|
+
end
|
61
|
+
|
58
62
|
class VMImportFailure < VagrantParallelsError
|
59
63
|
error_key(:vm_import_failure)
|
60
64
|
end
|
data/locales/en.yml
CHANGED
@@ -75,6 +75,10 @@ en:
|
|
75
75
|
Could not find a required option of Parallels Desktop virtual machine:
|
76
76
|
%{vm_option}
|
77
77
|
This is an internal error that should be reported as a bug.
|
78
|
+
shared_adapter_not_found: |-
|
79
|
+
Shared network adapter was not found in your virtual machine configuration.
|
80
|
+
It is required to communicate with VM and forward ports. Please check
|
81
|
+
network configuration in your Vagrantfile.
|
78
82
|
vm_import_failure: |-
|
79
83
|
The VM import failed! Please verify that the box you're using is not
|
80
84
|
corrupted and try again.
|
@@ -223,7 +223,7 @@ shared_context 'parallels' do
|
|
223
223
|
subprocess.stub(:execute).
|
224
224
|
with('prlctl', 'list', kind_of(String), '--no-header', '-o', 'mac',
|
225
225
|
kind_of(Hash)) do
|
226
|
-
subprocess_result(stdout: "
|
226
|
+
subprocess_result(stdout: "00:1C:42:B4:B0:74 00:1C:42:B4:B0:90\n")
|
227
227
|
end
|
228
228
|
|
229
229
|
end
|
@@ -186,9 +186,9 @@ shared_examples "parallels desktop driver" do |options|
|
|
186
186
|
|
187
187
|
describe "read_mac_addresses" do
|
188
188
|
it "returns MAC addresses of all network interface cards" do
|
189
|
-
subject.read_mac_addresses.should be_kind_of(
|
190
|
-
subject.read_mac_addresses.should include(
|
191
|
-
subject.read_mac_addresses
|
189
|
+
subject.read_mac_addresses.should be_kind_of(Array)
|
190
|
+
subject.read_mac_addresses.should include('001C42B4B074')
|
191
|
+
subject.read_mac_addresses.should include('001C42B4B090')
|
192
192
|
end
|
193
193
|
end
|
194
194
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-parallels
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Zholobov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-05
|
12
|
+
date: 2015-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|