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 +4 -4
- data/lib/vmonkey/version.rb +1 -1
- data/lib/vmonkey/vim/VirtualMachine.rb +2 -1
- data/spec/virtualmachine_spec.rb +34 -0
- data/vmonkey.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 544d79414efddc64a4491048b9f81f54426589ba
|
4
|
+
data.tar.gz: 331014025327add61f5c7403f3dae5544ba5e168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f565182599580cac487e1942dc84ed8db08b0dc969e05a18d5eab61d4ed10fddb333cac015b84a5b62e55222951d77dd356e94927c0347bd41411daa7722ff84
|
7
|
+
data.tar.gz: d6722d7dc27931945896067eaef4f84c259afaaa3b63e21e177bfbca52cf7100b74a363c26a4fb126e5dd10545faa2e9e7e84d75d1e10007a5aed62adb1cd8c3
|
data/lib/vmonkey/version.rb
CHANGED
@@ -264,7 +264,8 @@ class RbVmomi::VIM::VirtualMachine
|
|
264
264
|
template: false
|
265
265
|
)
|
266
266
|
|
267
|
-
|
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]
|
data/spec/virtualmachine_spec.rb
CHANGED
@@ -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'
|
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.
|
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-
|
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: '
|
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: '
|
84
|
+
version: '0'
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: rspec-its
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|