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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e49d547203d8ee98f795bfe1be9e273bc7c61c2d
4
- data.tar.gz: 3e289e73eac5c025b66b6f048381aa46cc8ec019
3
+ metadata.gz: c01f25efa00ea98bcb452252a6b12b97b1b0995f
4
+ data.tar.gz: 884af0b718650b7e200da266d733d14da07481dd
5
5
  SHA512:
6
- metadata.gz: 3d89a596244ca10223e04c6e9dd3f9625a74900610c8edebddcf4395ea20d294f9dbb780681740434e9232483cc55adce974dad2a2a35a0e06d607a6a78796d2
7
- data.tar.gz: 140c1fa914ad99c287070cdbf5cc79c6912956a31b9dc1c099eb96ccb244f6ffe6346627a53e781b8554b6f5d263a30ffedb2c056d104eacbdebb9c894570291
6
+ metadata.gz: 323c6212de083fabb6201868fa1a5aaa244a8cc3cd8b9ee4eb80ff6350e4ee857019b44a0a7b82c59e5932d9572b2d4fd24e4426c43d71be17673edeb86d72b9
7
+ data.tar.gz: f4c4eb69428cc68ea185704f2c4d8684541457061f8328ccc675f8ddeb424d115e733c01337eef87d5a86833ab51bd0d0d334e10731d644a0204df144ab01478
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 1.2.0
2
+ current_version = 1.3.0
3
3
  tag = true
4
4
  commit = true
5
5
 
data/.rubocop_todo.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2015-07-09 10:56:49 -0600 using RuboCop version 0.32.1.
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: 105
14
+ Max: 113
15
15
 
16
16
  # Offense count: 1
17
17
  # Configuration parameters: CountComments.
18
18
  Metrics/ClassLength:
19
- Max: 149
19
+ Max: 157
20
20
 
21
21
  # Offense count: 3
22
22
  Metrics/CyclomaticComplexity:
23
- Max: 15
23
+ Max: 17
24
24
 
25
- # Offense count: 99
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: 54
33
+ Max: 56
34
34
 
35
35
  # Offense count: 1
36
36
  # Configuration parameters: CountComments.
37
37
  Metrics/ModuleLength:
38
- Max: 157
38
+ Max: 161
39
39
 
40
40
  # Offense count: 3
41
41
  Metrics/PerceivedComplexity:
42
- Max: 16
42
+ Max: 18
43
43
 
44
- # Offense count: 24
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 '< 1.7.0'
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.2.0**
22
+ **version: 1.3.0**
23
23
 
24
- vagrant-vsphere (**version: 1.2.0**) is available from
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
 
@@ -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
@@ -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
@@ -23,6 +23,8 @@ module VagrantPlugins
23
23
  attr_accessor :mac
24
24
  attr_accessor :memory_mb
25
25
  attr_accessor :cpu_count
26
+ attr_accessor :cpu_reservation
27
+ attr_accessor :mem_reservation
26
28
 
27
29
  def validate(machine)
28
30
  errors = _detected_errors
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module VSphere
3
- VERSION = '1.2.0'
3
+ VERSION = '1.3.0'
4
4
  end
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -55,7 +55,9 @@ RSpec.configure do |config|
55
55
  vlan: nil,
56
56
  memory_mb: nil,
57
57
  cpu_count: nil,
58
- mac: nil)
58
+ mac: nil,
59
+ cpu_reservation: nil,
60
+ mem_reservation: nil)
59
61
  vm_config = double(
60
62
  vm: double('config_vm',
61
63
  box: nil,
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.2.0
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-09 00:00:00.000000000 Z
11
+ date: 2015-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri