vagrant-parallels 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3e2eafea3e2e0ae509943e4ebb2cb4a130b3d56
4
- data.tar.gz: 9b0786ae6319a6de87a44177dc6d71a38092a2bb
3
+ metadata.gz: b271fd1ed2f08b026d9317bf6ee17c9496d5b922
4
+ data.tar.gz: aa561b076317de9620478d4b30c0cac2177a4b8b
5
5
  SHA512:
6
- metadata.gz: c99c4916c89822602b2436c56be351cd4ac2d796f89fefee4d0a08caeb7eac55a30a18504a2c4f7b3f670d9d26e06a537c37e06798f279026aff921885ff0eb4
7
- data.tar.gz: 87a0f541244f1cf52d8d74e52c86ee7c7b5dab6653a9d2c8c2a967e0319c2fa753cb3057fb01e8b6d2c951e656685af85f1c94d65de032fcf0c90b85d5e75681
6
+ metadata.gz: a8d65174aca4de8bd57ea2d4c8c51f5e72bd5203430cc178c7caa4ce2aa4f71ce59cb5bc06398de08e50451eb4e1b6805f8c313cbd8bc29085eacb979f8d50ba
7
+ data.tar.gz: b15155423725c42436433722ec1cf5dd79252dcdace3b5912cb2ce7b8c5c4f0f10b6c0685e398299c7969dc3ca248d7d14074d3f56dd632ed95f33cd2d400301
@@ -26,28 +26,6 @@ module VagrantPlugins
26
26
  end
27
27
  end
28
28
 
29
- def create_host_only_network(options)
30
- # Create the interface
31
- execute_prlsrvctl('net', 'add', options[:network_id], '--type', 'host-only')
32
-
33
- # Configure it
34
- args = ["--ip", "#{options[:adapter_ip]}/#{options[:netmask]}"]
35
- if options[:dhcp]
36
- args.concat(["--dhcp-ip", options[:dhcp][:ip],
37
- "--ip-scope-start", options[:dhcp][:lower],
38
- "--ip-scope-end", options[:dhcp][:upper]])
39
- end
40
-
41
- execute_prlsrvctl('net', 'set', options[:network_id], *args)
42
-
43
- # Return the details
44
- {
45
- name: options[:network_id],
46
- ip: options[:adapter_ip],
47
- netmask: options[:netmask],
48
- dhcp: options[:dhcp]
49
- }
50
- end
51
29
 
52
30
  def delete_unused_host_only_networks
53
31
  networks = read_virtual_networks
@@ -147,37 +125,6 @@ module VagrantPlugins
147
125
  end
148
126
  end
149
127
 
150
- def read_host_only_interfaces
151
- net_list = read_virtual_networks
152
- net_list.keep_if { |net| net['Type'] == "host-only" }
153
-
154
- hostonly_ifaces = []
155
- net_list.each do |iface|
156
- info = {}
157
- net_info = json { execute_prlsrvctl('net', 'info', iface['Network ID'], '--json') }
158
- info[:name] = net_info['Network ID']
159
- info[:bound_to] = net_info['Bound To']
160
- info[:ip] = net_info['Parallels adapter']['IP address']
161
- info[:netmask] = net_info['Parallels adapter']['Subnet mask']
162
- # Such interfaces are always in 'Up'
163
- info[:status] = "Up"
164
-
165
- # There may be a fake DHCPv4 parameters
166
- # We can trust them only if adapter IP and DHCP IP are in the same subnet
167
- dhcp_ip = net_info['DHCPv4 server']['Server address']
168
- if network_address(info[:ip], info[:netmask]) ==
169
- network_address(dhcp_ip, info[:netmask])
170
- info[:dhcp] = {
171
- ip: dhcp_ip,
172
- lower: net_info['DHCPv4 server']['IP scope start address'],
173
- upper: net_info['DHCPv4 server']['IP scope end address']
174
- }
175
- end
176
- hostonly_ifaces << info
177
- end
178
- hostonly_ifaces
179
- end
180
-
181
128
  def read_network_interfaces
182
129
  nics = {}
183
130
 
@@ -247,20 +194,6 @@ module VagrantPlugins
247
194
  execute_prlctl('set', @uuid, '--longer-battery-life', state)
248
195
  end
249
196
 
250
- def ssh_ip
251
- '127.0.0.1'
252
- end
253
-
254
- def ssh_port(expected_port)
255
- @logger.debug("Searching for SSH port: #{expected_port.inspect}")
256
-
257
- # Look for the forwarded port only by comparing the guest port
258
- read_forwarded_ports.each do |r|
259
- return r[:hostport] if r[:guestport] == expected_port
260
- end
261
-
262
- nil
263
- end
264
197
  end
265
198
  end
266
199
  end
@@ -54,13 +54,9 @@ module VagrantPlugins
54
54
 
55
55
  execute_prlsrvctl('net', 'set', options[:network_id], *args)
56
56
 
57
- # Determine interface to which it has been bound
58
- net_info = json { execute_prlsrvctl('net', 'info', options[:network_id], '--json') }
59
- iface_name = net_info['Bound To']
60
-
61
57
  # Return the details
62
58
  {
63
- name: iface_name,
59
+ name: options[:network_id],
64
60
  ip: options[:adapter_ip],
65
61
  netmask: options[:netmask],
66
62
  dhcp: options[:dhcp]
@@ -126,11 +122,16 @@ module VagrantPlugins
126
122
  end
127
123
 
128
124
  if adapter[:type] == :hostonly
129
- # Oddly enough, but there is a 'bridge' anyway.
125
+ # Determine interface to which it has been bound
126
+ net_info = json do
127
+ execute_prlsrvctl('net', 'info', adapter[:hostonly], '--json')
128
+ end
129
+
130
+ # Oddly enough, but there is a 'bridge' type anyway.
130
131
  # The only difference is the destination interface:
131
132
  # - in host-only (private) network it will be bridged to the 'vnicX' device
132
133
  # - in real bridge (public) network it will be bridged to the assigned device
133
- args.concat(["--type", "bridged", "--iface", adapter[:hostonly]])
134
+ args.concat(["--type", "bridged", "--iface", net_info['Bound To']])
134
135
  elsif adapter[:type] == :bridged
135
136
  args.concat(["--type", "bridged", "--iface", adapter[:bridge]])
136
137
  elsif adapter[:type] == :shared
@@ -275,7 +276,6 @@ module VagrantPlugins
275
276
  net_list.each do |iface|
276
277
  info = {}
277
278
  net_info = json { execute_prlsrvctl('net', 'info', iface['Network ID'], '--json') }
278
- # Really we need to work with bounded virtual interface
279
279
  info[:name] = net_info['Network ID']
280
280
  info[:bound_to] = net_info['Bound To']
281
281
  info[:ip] = net_info['Parallels adapter']['IP address']
@@ -22,6 +22,12 @@ module VagrantPlugins
22
22
  # If the forwarded port was marked as disabled, ignore.
23
23
  next if options[:disabled]
24
24
 
25
+ # Temporary disable automatically pre-configured forwarded ports
26
+ # for SSH, since it is working not so well [GH-146]
27
+ # TODO: Roll it back when forwarded ports will be completely
28
+ # fixed in Parallels Desktop 10
29
+ next if id == 'ssh'
30
+
25
31
  mappings[host_port.to_s + protocol.to_s] =
26
32
  Model::ForwardedPort.new(id, host_port, guest_port, options)
27
33
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Parallels
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  end
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.0
4
+ version: 1.3.1
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: 2014-10-10 00:00:00.000000000 Z
12
+ date: 2014-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler