vagrant-parallels 1.3.5 → 1.3.6
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/driver/pd_10.rb +41 -2
- data/lib/vagrant-parallels/version.rb +1 -1
- 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: 150b4748c54d9fd85cddbb8b3821e65b1b0ea050
|
4
|
+
data.tar.gz: a25cdb0366e623fbaf794d45e90b91261be7ef7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cd23c3f489895417619f46a2e485f0d76695ea07be9ac15e74cf994ca1a09b58d47c75f573b01652d76747b07b6d388238be85d7e7628aacb05ab1d0de1b244
|
7
|
+
data.tar.gz: 3a888ef92c82ec23efea76df59ede060ca34f0ff168a95c9a82e979be65dad72964233fa102cd93c0bb849d6b6767771a29e8b4e3bb7aade8eb26dff9f132fbc
|
@@ -125,6 +125,41 @@ module VagrantPlugins
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
|
+
def read_host_only_interfaces
|
129
|
+
net_list = read_virtual_networks
|
130
|
+
net_list.keep_if { |net| net['Type'] == "host-only" }
|
131
|
+
|
132
|
+
hostonly_ifaces = []
|
133
|
+
net_list.each do |iface|
|
134
|
+
info = {}
|
135
|
+
net_info = json { execute_prlsrvctl('net', 'info', iface['Network ID'], '--json') }
|
136
|
+
adapter = net_info['Parallels adapter']
|
137
|
+
|
138
|
+
info[:name] = net_info['Network ID']
|
139
|
+
info[:bound_to] = net_info['Bound To']
|
140
|
+
# In PD >= 10.1.2 there are new field names for an IP/Subnet
|
141
|
+
info[:ip] = adapter['IP address'] || adapter['IPv4 address']
|
142
|
+
info[:netmask] = adapter['Subnet mask'] || adapter['IPv4 subnet mask']
|
143
|
+
|
144
|
+
# Such interfaces are always in 'Up'
|
145
|
+
info[:status] = "Up"
|
146
|
+
|
147
|
+
# There may be a fake DHCPv4 parameters
|
148
|
+
# We can trust them only if adapter IP and DHCP IP are in the same subnet
|
149
|
+
dhcp_ip = net_info['DHCPv4 server']['Server address']
|
150
|
+
if network_address(info[:ip], info[:netmask]) ==
|
151
|
+
network_address(dhcp_ip, info[:netmask])
|
152
|
+
info[:dhcp] = {
|
153
|
+
ip: dhcp_ip,
|
154
|
+
lower: net_info['DHCPv4 server']['IP scope start address'],
|
155
|
+
upper: net_info['DHCPv4 server']['IP scope end address']
|
156
|
+
}
|
157
|
+
end
|
158
|
+
hostonly_ifaces << info
|
159
|
+
end
|
160
|
+
hostonly_ifaces
|
161
|
+
end
|
162
|
+
|
128
163
|
def read_network_interfaces
|
129
164
|
nics = {}
|
130
165
|
|
@@ -153,10 +188,14 @@ module VagrantPlugins
|
|
153
188
|
net_info = json do
|
154
189
|
execute_prlsrvctl('net', 'info', read_shared_network_id, '--json')
|
155
190
|
end
|
191
|
+
|
192
|
+
adapter = net_info['Parallels adapter']
|
193
|
+
|
194
|
+
# In PD >= 10.1.2 there are new field names for an IP/Subnet
|
156
195
|
info = {
|
157
196
|
name: net_info['Bound To'],
|
158
|
-
ip:
|
159
|
-
netmask:
|
197
|
+
ip: adapter['IP address'] || adapter['IPv4 address'],
|
198
|
+
netmask: adapter['Subnet mask'] || adapter['IPv4 subnet mask'],
|
160
199
|
status: 'Up',
|
161
200
|
nat: []
|
162
201
|
}
|
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.6
|
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-12-
|
12
|
+
date: 2014-12-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|