vagrant-vsphere 1.11.0 → 1.11.1
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/.bumpversion.cfg +1 -1
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/lib/vSphere/action/get_ssh_info.rb +5 -2
- data/lib/vSphere/version.rb +1 -1
- data/spec/get_ssh_info_spec.rb +56 -21
- data/vSphere.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d18d24bc77ed74d9653df37d88dd8f86f5b7330d
|
4
|
+
data.tar.gz: 21c8bd222a808a4cfa0885a5a319be806d4612e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f754461b77ae977825e5333be117af21babb85872472330e39d9b8049077dce0a22efbd1e0cced27a00e22f7a56baa9cf497a799641a3c5eb66638b06998ed0
|
7
|
+
data.tar.gz: 8d3481366b6e28f2678310ce9a20d6d70a33c40bfe6b74023ec1764c14eb7f8c41b872958aafec2a7a918cd608b48ec89b1afdf6f1502db7f44a0c20d335580f
|
data/.bumpversion.cfg
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## [1.11.1 (2017-02-27)](https://github.com/nsidc/vagrant-vsphere/releases/tag/v1.11.1)
|
2
|
+
- Fix 'real_nic_ip' filter logic bug
|
3
|
+
([vagrant-vsphere:fix_ssh_ip_selection](https://github.com/nsidc/vagrant-vsphere/pull/229))
|
4
|
+
|
1
5
|
## [1.11.0 (2016-11-23)](https://github.com/nsidc/vagrant-vsphere/releases/tag/v1.11.0)
|
2
6
|
|
3
7
|
- Wait for Windows sysprep when cloning a Windows box
|
data/README.md
CHANGED
@@ -19,9 +19,9 @@ This provider is built on top of the
|
|
19
19
|
* libxml2, libxml2-dev, libxslt, libxslt-dev
|
20
20
|
|
21
21
|
## Current Version
|
22
|
-
**version: 1.11.
|
22
|
+
**version: 1.11.1**
|
23
23
|
|
24
|
-
vagrant-vsphere (**version: 1.11.
|
24
|
+
vagrant-vsphere (**version: 1.11.1**) is available from
|
25
25
|
[RubyGems.org](https://rubygems.org/gems/vagrant-vsphere)
|
26
26
|
|
27
27
|
## Installation
|
@@ -20,9 +20,12 @@ module VagrantPlugins
|
|
20
20
|
|
21
21
|
def filter_guest_nic(vm, machine)
|
22
22
|
return vm.guest.ipAddress unless machine.provider_config.real_nic_ip
|
23
|
-
|
23
|
+
|
24
|
+
interfaces = vm.guest.net.select { |g| g.deviceConfigId > 0 }
|
25
|
+
ip_addresses = interfaces.map { |i| i.ipConfig.ipAddress.select { |a| a.state == 'preferred' } }.flatten
|
26
|
+
|
24
27
|
fail Errors::VSphereError.new, :'multiple_interface_with_real_nic_ip_set' if ip_addresses.size > 1
|
25
|
-
ip_addresses.first
|
28
|
+
ip_addresses.first.ipAddress
|
26
29
|
end
|
27
30
|
|
28
31
|
def get_ssh_info(connection, machine)
|
data/lib/vSphere/version.rb
CHANGED
data/spec/get_ssh_info_spec.rb
CHANGED
@@ -28,27 +28,50 @@ describe VagrantPlugins::VSphere::Action::GetSshInfo do
|
|
28
28
|
expect(@env[:machine_ssh_info][:host]).to be IP_ADDRESS
|
29
29
|
end
|
30
30
|
|
31
|
-
context 'when acting on a VM with
|
31
|
+
context 'when acting on a VM with a single network adapter' do
|
32
32
|
before do
|
33
33
|
allow(@vm.guest).to receive(:ipAddress) { '127.0.0.2' }
|
34
|
+
@env[:machine].stub(:id).and_return(EXISTING_UUID)
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'should return the correct ip address' do
|
38
|
+
call
|
39
|
+
expect(@env[:machine_ssh_info][:host]).to eq '127.0.0.2'
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context 'when acting on a VM with multiple network adapters' do
|
44
|
+
before do
|
45
|
+
@env[:machine].stub(:id).and_return(EXISTING_UUID)
|
34
46
|
allow(@vm.guest).to receive(:net) {
|
35
|
-
[
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
47
|
+
[double('GuestNicInfo',
|
48
|
+
ipAddress: ['bad address', '127.0.0.1'],
|
49
|
+
deviceConfigId: 4000,
|
50
|
+
ipConfig: double('NetIpConfigInfo',
|
51
|
+
ipAddress: [double('NetIpConfigInfoIpAddress',
|
52
|
+
ipAddress: 'bad address', state: 'unknown'),
|
53
|
+
double('NetIpConfigInfoIpAddress',
|
54
|
+
ipAddress: '127.0.0.1', state: 'preferred')]
|
55
|
+
)
|
56
|
+
),
|
57
|
+
double('GuestNicInfo',
|
58
|
+
ipAddress: ['bad address', '255.255.255.255'],
|
59
|
+
deviceConfigId: -1,
|
60
|
+
ipConfig: double('NetIpConfigInfo',
|
61
|
+
ipAddress: [double('NetIpConfigInfoIpAddress',
|
62
|
+
ipAddress: 'bad address', state: 'unknown'),
|
63
|
+
double('NetIpConfigInfoIpAddress',
|
64
|
+
ipAddress: '255.255.255.255', state: 'preferred')]
|
65
|
+
)
|
66
|
+
)
|
44
67
|
]
|
45
68
|
}
|
46
|
-
@env[:machine].stub(:id).and_return(EXISTING_UUID)
|
47
69
|
end
|
70
|
+
|
48
71
|
context 'when the real_nic_ip option is false' do
|
49
72
|
it 'sets the ssh info the original adapter' do
|
50
73
|
call
|
51
|
-
expect(@env[:machine_ssh_info][:host]).to eq
|
74
|
+
expect(@env[:machine_ssh_info][:host]).to eq IP_ADDRESS
|
52
75
|
end
|
53
76
|
end
|
54
77
|
|
@@ -59,17 +82,29 @@ describe VagrantPlugins::VSphere::Action::GetSshInfo do
|
|
59
82
|
context 'when there are mutiple valid adapters' do
|
60
83
|
before do
|
61
84
|
allow(@vm.guest).to receive(:net) {
|
62
|
-
[
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
85
|
+
[double('GuestNicInfo',
|
86
|
+
ipAddress: ['bad address', '127.0.0.1'],
|
87
|
+
deviceConfigId: 4000,
|
88
|
+
ipConfig: double('NetIpConfigInfo',
|
89
|
+
ipAddress: [double('NetIpConfigInfoIpAddress',
|
90
|
+
ipAddress: 'bad address', state: 'unknown'),
|
91
|
+
double('NetIpConfigInfoIpAddress',
|
92
|
+
ipAddress: '127.0.0.2', state: 'preferred')]
|
93
|
+
)
|
94
|
+
),
|
95
|
+
double('GuestNicInfo',
|
96
|
+
ipAddress: ['bad address', '255.255.255.255'],
|
97
|
+
deviceConfigId: 2000,
|
98
|
+
ipConfig: double('NetIpConfigInfo',
|
99
|
+
ipAddress: [double('NetIpConfigInfoIpAddress',
|
100
|
+
ipAddress: 'bad address', state: 'unknown'),
|
101
|
+
double('NetIpConfigInfoIpAddress',
|
102
|
+
ipAddress: '255.255.255.255', state: 'preferred')]
|
103
|
+
)
|
104
|
+
)
|
71
105
|
]
|
72
106
|
}
|
107
|
+
|
73
108
|
end
|
74
109
|
it 'should raise an error' do
|
75
110
|
expect { call }.to raise_error(VagrantPlugins::VSphere::Errors::VSphereError)
|
data/vSphere.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency 'rbvmomi', '>=1.8.2', '<2.0.0'
|
19
19
|
s.add_dependency 'i18n', '>= 0.6.4', '< 0.8.0'
|
20
20
|
|
21
|
-
s.add_development_dependency 'rake'
|
21
|
+
s.add_development_dependency 'rake', '11.1.2' # pinned to accommodate rubocop 0.32.1
|
22
22
|
s.add_development_dependency 'rspec-core'
|
23
23
|
s.add_development_dependency 'rspec-expectations'
|
24
24
|
s.add_development_dependency 'rspec-mocks'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-vsphere
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Grauch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -68,16 +68,16 @@ dependencies:
|
|
68
68
|
name: rake
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- -
|
71
|
+
- - '='
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
73
|
+
version: 11.1.2
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - '='
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
80
|
+
version: 11.1.2
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rspec-core
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
version: '0'
|
215
215
|
requirements: []
|
216
216
|
rubyforge_project:
|
217
|
-
rubygems_version: 2.4.
|
217
|
+
rubygems_version: 2.4.5.1
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
220
|
summary: VMWare vSphere provider
|