vagrant-vsphere 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/.rubocop_todo.yml +9 -9
- data/.travis.yml +5 -1
- data/CHANGELOG.md +6 -0
- data/README.md +4 -2
- data/lib/vSphere/action.rb +5 -0
- data/lib/vSphere/action/clone.rb +10 -0
- data/lib/vSphere/config.rb +2 -0
- data/lib/vSphere/version.rb +1 -1
- data/spec/spec_helper.rb +3 -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: c01f25efa00ea98bcb452252a6b12b97b1b0995f
|
4
|
+
data.tar.gz: 884af0b718650b7e200da266d733d14da07481dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 323c6212de083fabb6201868fa1a5aaa244a8cc3cd8b9ee4eb80ff6350e4ee857019b44a0a7b82c59e5932d9572b2d4fd24e4426c43d71be17673edeb86d72b9
|
7
|
+
data.tar.gz: f4c4eb69428cc68ea185704f2c4d8684541457061f8328ccc675f8ddeb424d115e733c01337eef87d5a86833ab51bd0d0d334e10731d644a0204df144ab01478
|
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-15 14:24:31 -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: 113
|
15
15
|
|
16
16
|
# Offense count: 1
|
17
17
|
# Configuration parameters: CountComments.
|
18
18
|
Metrics/ClassLength:
|
19
|
-
Max:
|
19
|
+
Max: 157
|
20
20
|
|
21
21
|
# Offense count: 3
|
22
22
|
Metrics/CyclomaticComplexity:
|
23
|
-
Max:
|
23
|
+
Max: 17
|
24
24
|
|
25
|
-
# Offense count:
|
25
|
+
# Offense count: 103
|
26
26
|
# Configuration parameters: AllowURI, URISchemes.
|
27
27
|
Metrics/LineLength:
|
28
28
|
Max: 177
|
@@ -30,18 +30,18 @@ Metrics/LineLength:
|
|
30
30
|
# Offense count: 12
|
31
31
|
# Configuration parameters: CountComments.
|
32
32
|
Metrics/MethodLength:
|
33
|
-
Max:
|
33
|
+
Max: 56
|
34
34
|
|
35
35
|
# Offense count: 1
|
36
36
|
# Configuration parameters: CountComments.
|
37
37
|
Metrics/ModuleLength:
|
38
|
-
Max:
|
38
|
+
Max: 161
|
39
39
|
|
40
40
|
# Offense count: 3
|
41
41
|
Metrics/PerceivedComplexity:
|
42
|
-
Max:
|
42
|
+
Max: 18
|
43
43
|
|
44
|
-
# Offense count:
|
44
|
+
# Offense count: 25
|
45
45
|
Style/Documentation:
|
46
46
|
Enabled: false
|
47
47
|
|
data/.travis.yml
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
language: ruby
|
2
|
+
cache: bundler
|
2
3
|
rvm:
|
3
4
|
- 2.0.0
|
5
|
+
|
4
6
|
before_install:
|
5
7
|
- rvm @global do gem uninstall bundler --all --executables
|
6
8
|
- gem uninstall bundler --all --executables
|
7
|
-
- gem install bundler --version '
|
9
|
+
- gem install bundler --version '1.6.9'
|
10
|
+
|
11
|
+
sudo: false
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [1.3.0 (2015-07-21)](https://github.com/nsidc/vagrant-vsphere/releases/tag/v1.3.0)
|
2
|
+
|
3
|
+
- Add ability to configure CPU and memory reservations
|
4
|
+
([edmcman:resource_limit](https://github.com/nsidc/vagrant-vsphere/pull/137))
|
5
|
+
- Bypass "graceful" shut down attempts with `vagrant destroy --force`
|
6
|
+
|
1
7
|
## [1.2.0 (2015-07-09)](https://github.com/nsidc/vagrant-vsphere/releases/tag/v1.2.0)
|
2
8
|
|
3
9
|
- Add `public_address` provider capability
|
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.3.0**
|
23
23
|
|
24
|
-
vagrant-vsphere (**version: 1.
|
24
|
+
vagrant-vsphere (**version: 1.3.0**) is available from
|
25
25
|
[RubyGems.org](https://rubygems.org/gems/vagrant-vsphere)
|
26
26
|
|
27
27
|
## Installation
|
@@ -131,6 +131,8 @@ This provider has the following settings, all are required unless noted:
|
|
131
131
|
* `memory_mb` - _Optional_ Configure the amount of memory (in MB) for the new VM
|
132
132
|
* `cpu_count` - _Optional_ Configure the number of CPUs for the new VM
|
133
133
|
* `mac` - _Optional_ Used to set the mac address of the new VM
|
134
|
+
* `cpu_reservation` - _Optional_ Configure the CPU time (in MHz) to reserve for this VM
|
135
|
+
* `mem_reservation` - _Optional_ Configure the memory (in MB) to reserve for this VM
|
134
136
|
|
135
137
|
### Cloning from a VM rather than a template
|
136
138
|
|
data/lib/vSphere/action.rb
CHANGED
@@ -14,6 +14,11 @@ module VagrantPlugins
|
|
14
14
|
|
15
15
|
b.use Call, IsRunning do |env, b2|
|
16
16
|
if env[:result]
|
17
|
+
if env[:force_confirm_destroy]
|
18
|
+
b2.use PowerOff
|
19
|
+
next
|
20
|
+
end
|
21
|
+
|
17
22
|
b2.use Call, GracefulHalt, :poweroff, :running do |env2, b3|
|
18
23
|
b3.use PowerOff unless env2[:result]
|
19
24
|
end
|
data/lib/vSphere/action/clone.rb
CHANGED
@@ -40,6 +40,8 @@ module VagrantPlugins
|
|
40
40
|
add_custom_vlan(template, dc, spec, config.vlan) unless config.vlan.nil?
|
41
41
|
add_custom_memory(spec, config.memory_mb) unless config.memory_mb.nil?
|
42
42
|
add_custom_cpu(spec, config.cpu_count) unless config.cpu_count.nil?
|
43
|
+
add_custom_cpu_reservation(spec, config.cpu_reservation) unless config.cpu_reservation.nil?
|
44
|
+
add_custom_mem_reservation(spec, config.mem_reservation) unless config.mem_reservation.nil?
|
43
45
|
|
44
46
|
if !config.clone_from_vm && ds.is_a?(RbVmomi::VIM::StoragePod)
|
45
47
|
|
@@ -214,6 +216,14 @@ module VagrantPlugins
|
|
214
216
|
def add_custom_cpu(spec, cpu_count)
|
215
217
|
spec[:config][:numCPUs] = Integer(cpu_count)
|
216
218
|
end
|
219
|
+
|
220
|
+
def add_custom_cpu_reservation(spec, cpu_reservation)
|
221
|
+
spec[:config][:cpuAllocation] = RbVmomi::VIM.ResourceAllocationInfo(reservation: cpu_reservation)
|
222
|
+
end
|
223
|
+
|
224
|
+
def add_custom_mem_reservation(spec, mem_reservation)
|
225
|
+
spec[:config][:memoryAllocation] = RbVmomi::VIM.ResourceAllocationInfo(reservation: mem_reservation)
|
226
|
+
end
|
217
227
|
end
|
218
228
|
end
|
219
229
|
end
|
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.3.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-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|