vmonkey 0.17.0 → 0.18.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: 112f6086077d4bab95eb0ca3f823d502465e808f
4
- data.tar.gz: f1c8409ce5f6720d0b22a51b275d5a027d149e12
3
+ metadata.gz: 544d79414efddc64a4491048b9f81f54426589ba
4
+ data.tar.gz: 331014025327add61f5c7403f3dae5544ba5e168
5
5
  SHA512:
6
- metadata.gz: 7306019aa6d390fd96421585707fa1ac695bdf17e49e2c89adb4e4a48fbf4204aaa5e66d31b6c1ab0899c08b515df010f0d662c0f15e6bc0eb64dc4172550a0c
7
- data.tar.gz: b71c94cc9bd0f2beef36d44a0d0113ffbd153164dab63f06a1df5dcdb7932815c9f687ca7ba7846a71a5ee8beeff73825f20c5de979940f942510309c5e39b14
6
+ metadata.gz: f565182599580cac487e1942dc84ed8db08b0dc969e05a18d5eab61d4ed10fddb333cac015b84a5b62e55222951d77dd356e94927c0347bd41411daa7722ff84
7
+ data.tar.gz: d6722d7dc27931945896067eaef4f84c259afaaa3b63e21e177bfbca52cf7100b74a363c26a4fb126e5dd10545faa2e9e7e84d75d1e10007a5aed62adb1cd8c3
@@ -1,3 +1,3 @@
1
1
  module Vmonkey
2
- VERSION = '0.17.0'
2
+ VERSION = '0.18.0'
3
3
  end
@@ -264,7 +264,8 @@ class RbVmomi::VIM::VirtualMachine
264
264
  template: false
265
265
  )
266
266
 
267
- clone_spec.config = RbVmomi::VIM.VirtualMachineConfigSpec(deviceChange: Array.new)
267
+ device_change = opts[:deviceChange] || Array.new
268
+ clone_spec.config = RbVmomi::VIM.VirtualMachineConfigSpec(deviceChange: device_change)
268
269
 
269
270
  clone_spec.customization = monkey.customization_spec(opts[:customization_spec])
270
271
  clone_spec.config.annotation = opts[:config][:annotation]
@@ -52,6 +52,40 @@ describe RbVmomi::VIM::VirtualMachine do
52
52
  it { expect(subject[:spec].config.annotation).to eq 'an annotation' }
53
53
  it { expect(subject[:spec].config.numCPUs).to eq 3 }
54
54
  it { expect(subject[:spec].config.memoryMB).to eq 1024 }
55
+ it { expect(subject[:spec].config.deviceChange.length).to be 0}
56
+ end
57
+
58
+ context 'with deviceChange' do
59
+ subject do
60
+ @params ||=
61
+ @template._clone_params(
62
+ @vm_path.basename,
63
+ @monkey.get(@vm_path.parent),
64
+ customization_spec: VM_SPEC_OPTS[:customization_spec],
65
+ config: {
66
+ annotation: 'an annotation',
67
+ num_cpus: 3,
68
+ memory_mb: 1024
69
+ },
70
+ deviceChange: [
71
+ {
72
+ :operation => :add,
73
+ :device => RbVmomi::VIM.VirtualE1000(
74
+ :key => 0,
75
+ :deviceInfo => {
76
+ :label => 'VM network',
77
+ :summary => 'VM network'
78
+ },
79
+ :backing => RbVmomi::VIM.VirtualEthernetCardNetworkBackingInfo(
80
+ :deviceName => 'VM network'
81
+ ),
82
+ :addressType => 'automatic'
83
+ )
84
+ }
85
+ ])
86
+ end
87
+
88
+ it { expect(subject[:spec].config.deviceChange[0][:operation]).to be :add}
55
89
  end
56
90
  end
57
91
 
data/vmonkey.gemspec CHANGED
@@ -23,6 +23,6 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.6'
25
25
  spec.add_development_dependency 'rake'
26
- spec.add_development_dependency 'rspec', '~> 2.14'
26
+ spec.add_development_dependency 'rspec'
27
27
  spec.add_development_dependency 'rspec-its'
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmonkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Dupras
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-01-26 00:00:00.000000000 Z
13
+ date: 2015-02-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
@@ -72,16 +72,16 @@ dependencies:
72
72
  name: rspec
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - "~>"
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
- version: '2.14'
77
+ version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - "~>"
82
+ - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: '2.14'
84
+ version: '0'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: rspec-its
87
87
  requirement: !ruby/object:Gem::Requirement