vagrant-vsphere 1.3.0 → 1.4.0
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/.rubocop_todo.yml +8 -8
- data/CHANGELOG.md +7 -0
- data/README.md +20 -3
- data/lib/vSphere/action/clone.rb +10 -0
- data/lib/vSphere/config.rb +1 -0
- data/lib/vSphere/version.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4307c8c51431eff788268fadd75b40aa9ef11999
|
4
|
+
data.tar.gz: cef638026da154cdf1ef3f309bbd6c4d86c8a18a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaab5d5374e8b531a597814518bc1af885f460a81261e4c58a3ee164a532c876614013ce59fddcdaa86a66c1b97f22178b7bdc1c04fc3f48e273ad8de8dccdf1
|
7
|
+
data.tar.gz: e33528a10e88ff7daa3d1261c0e03884d515bbbbc58526697170ef03adc99ae121a919ab077f95bc01beae1b62418d4bc49855aa7e4dbce191140e3bc2e26352
|
data/.bumpversion.cfg
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2015-07-
|
2
|
+
# on 2015-07-21 12:35:10 -0600 using RuboCop version 0.32.1.
|
3
3
|
# The point is for the user to remove these configuration records
|
4
4
|
# one by one as the offenses are removed from the code base.
|
5
5
|
# Note that changes in the inspected code, or installation of new
|
@@ -11,18 +11,18 @@ Lint/NonLocalExitFromIterator:
|
|
11
11
|
|
12
12
|
# Offense count: 11
|
13
13
|
Metrics/AbcSize:
|
14
|
-
Max:
|
14
|
+
Max: 117
|
15
15
|
|
16
16
|
# Offense count: 1
|
17
17
|
# Configuration parameters: CountComments.
|
18
18
|
Metrics/ClassLength:
|
19
|
-
Max:
|
19
|
+
Max: 166
|
20
20
|
|
21
21
|
# Offense count: 3
|
22
22
|
Metrics/CyclomaticComplexity:
|
23
|
-
Max:
|
23
|
+
Max: 18
|
24
24
|
|
25
|
-
# Offense count:
|
25
|
+
# Offense count: 106
|
26
26
|
# Configuration parameters: AllowURI, URISchemes.
|
27
27
|
Metrics/LineLength:
|
28
28
|
Max: 177
|
@@ -30,7 +30,7 @@ Metrics/LineLength:
|
|
30
30
|
# Offense count: 12
|
31
31
|
# Configuration parameters: CountComments.
|
32
32
|
Metrics/MethodLength:
|
33
|
-
Max:
|
33
|
+
Max: 57
|
34
34
|
|
35
35
|
# Offense count: 1
|
36
36
|
# Configuration parameters: CountComments.
|
@@ -39,7 +39,7 @@ Metrics/ModuleLength:
|
|
39
39
|
|
40
40
|
# Offense count: 3
|
41
41
|
Metrics/PerceivedComplexity:
|
42
|
-
Max:
|
42
|
+
Max: 19
|
43
43
|
|
44
44
|
# Offense count: 25
|
45
45
|
Style/Documentation:
|
@@ -56,7 +56,7 @@ Style/EmptyLiteral:
|
|
56
56
|
Style/FirstParameterIndentation:
|
57
57
|
Enabled: false
|
58
58
|
|
59
|
-
# Offense count:
|
59
|
+
# Offense count: 5
|
60
60
|
# Cop supports --auto-correct.
|
61
61
|
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
|
62
62
|
Style/HashSyntax:
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [1.4.0 (2015-07-29)](https://github.com/nsidc/vagrant-vsphere/releases/tag/v1.4.0)
|
2
|
+
|
3
|
+
- Add ability to configure the address type (originally submitted in
|
4
|
+
[mreuvers:master](https://github.com/nsidc/vagrant-vsphere/pull/121), but
|
5
|
+
merged
|
6
|
+
[nsidc:address-type](https://github.com/nsidc/vagrant-vsphere/pull/142))
|
7
|
+
|
1
8
|
## [1.3.0 (2015-07-21)](https://github.com/nsidc/vagrant-vsphere/releases/tag/v1.3.0)
|
2
9
|
|
3
10
|
- Add ability to configure CPU and memory reservations
|
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.
|
22
|
+
**version: 1.4.0**
|
23
23
|
|
24
|
-
vagrant-vsphere (**version: 1.
|
24
|
+
vagrant-vsphere (**version: 1.4.0**) is available from
|
25
25
|
[RubyGems.org](https://rubygems.org/gems/vagrant-vsphere)
|
26
26
|
|
27
27
|
## Installation
|
@@ -133,6 +133,8 @@ This provider has the following settings, all are required unless noted:
|
|
133
133
|
* `mac` - _Optional_ Used to set the mac address of the new VM
|
134
134
|
* `cpu_reservation` - _Optional_ Configure the CPU time (in MHz) to reserve for this VM
|
135
135
|
* `mem_reservation` - _Optional_ Configure the memory (in MB) to reserve for this VM
|
136
|
+
* `addressType` - _Optional_ Configure the address type of the
|
137
|
+
[vSphere Virtual Ethernet Card](https://www.vmware.com/support/developer/vc-sdk/visdk2xpubs/ReferenceGuide/vim.vm.device.VirtualEthernetCard.html)
|
136
138
|
|
137
139
|
### Cloning from a VM rather than a template
|
138
140
|
|
@@ -194,9 +196,24 @@ executions.
|
|
194
196
|
This is useful if running Vagrant from multiple directories or if multiple
|
195
197
|
machines are defined in the Vagrantfile.
|
196
198
|
|
199
|
+
### Setting addresType for network adapter
|
200
|
+
|
201
|
+
This sets the addressType of the network adapter, for example 'Manual' to
|
202
|
+
be able to set a manual mac address.
|
203
|
+
This value may depend on the version of vSphere you use. It may be necessary
|
204
|
+
to set this in combination with the mac field, in order to set a manual
|
205
|
+
mac address. For valid values for this field see VirtualEthernetCard api
|
206
|
+
documentation of vSphere.
|
207
|
+
|
208
|
+
```ruby
|
209
|
+
vsphere.addressType = 'Manual'
|
210
|
+
```
|
211
|
+
|
197
212
|
### Setting the MAC address
|
198
213
|
|
199
|
-
To set a static MAC address, add a `vsphere.mac` to your `Vagrantfile
|
214
|
+
To set a static MAC address, add a `vsphere.mac` to your `Vagrantfile`.
|
215
|
+
In some cases you must also set `vsphere.addressType` (see above)
|
216
|
+
to make this work:
|
200
217
|
|
201
218
|
```ruby
|
202
219
|
vsphere.mac = '00:50:56:XX:YY:ZZ'
|
data/lib/vSphere/action/clone.rb
CHANGED
@@ -36,6 +36,7 @@ module VagrantPlugins
|
|
36
36
|
customization_info = get_customization_spec_info_by_name connection, machine
|
37
37
|
|
38
38
|
spec[:customization] = get_customization_spec(machine, customization_info) unless customization_info.nil?
|
39
|
+
add_custom_address_type(template, spec, config.addressType) unless config.addressType.nil?
|
39
40
|
add_custom_mac(template, spec, config.mac) unless config.mac.nil?
|
40
41
|
add_custom_vlan(template, dc, spec, config.vlan) unless config.vlan.nil?
|
41
42
|
add_custom_memory(spec, config.memory_mb) unless config.memory_mb.nil?
|
@@ -189,6 +190,15 @@ module VagrantPlugins
|
|
189
190
|
spec[:config][:deviceChange].uniq!
|
190
191
|
end
|
191
192
|
|
193
|
+
def add_custom_address_type(template, spec, addressType)
|
194
|
+
spec[:config][:deviceChange] = []
|
195
|
+
config = template.config
|
196
|
+
card = config.hardware.device.grep(RbVmomi::VIM::VirtualEthernetCard).first || fail(Errors::VSphereError, :missing_network_card)
|
197
|
+
card.addressType = addressType
|
198
|
+
card_spec = { :deviceChange => [{ :operation => :edit, :device => card }] }
|
199
|
+
template.ReconfigVM_Task(:spec => card_spec).wait_for_completion
|
200
|
+
end
|
201
|
+
|
192
202
|
def add_custom_mac(template, spec, mac)
|
193
203
|
modify_network_card(template, spec) do |card|
|
194
204
|
card.macAddress = mac
|
data/lib/vSphere/config.rb
CHANGED
data/lib/vSphere/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
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.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Grauch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
197
|
version: '0'
|
198
198
|
requirements: []
|
199
199
|
rubyforge_project:
|
200
|
-
rubygems_version: 2.4.
|
200
|
+
rubygems_version: 2.4.8
|
201
201
|
signing_key:
|
202
202
|
specification_version: 4
|
203
203
|
summary: VMWare vSphere provider
|