vmpooler 0.16.3 → 0.17.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/lib/vmpooler/providers/vsphere.rb +30 -11
- data/lib/vmpooler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c5757a10068283879b2db59f56ac980d4b5f23b171baf35d555f032432ac81a
|
|
4
|
+
data.tar.gz: 31cd71e044d92d9e64096b7baa589061f3c0e3561b8c390ca6263856430bc516
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: adb0aa6d88d35add538e12ee15636afa1eaea94018d4b5a2086c38b3f2b104311420e1cbed0118312cec369f007ef5917d99bec51b836afa789d2e98fbd237bc
|
|
7
|
+
data.tar.gz: 971ab95fccf7b541381b9060f2d4eea27bc17c74f4f2880f24ac7a7d26f85658cdf96e435aec64c6427446edaf172cdf6de9bff719b4816ac3e81cd87fd261c2
|
|
@@ -306,19 +306,26 @@ module Vmpooler
|
|
|
306
306
|
|
|
307
307
|
template_vm_object = find_template_vm(pool, connection)
|
|
308
308
|
|
|
309
|
+
extra_config = [
|
|
310
|
+
{ key: 'guestinfo.hostname', value: new_vmname }
|
|
311
|
+
]
|
|
312
|
+
|
|
313
|
+
if pool.key?('snapshot_mainMem_ioBlockPages')
|
|
314
|
+
ioblockpages = pool['snapshot_mainMem_ioBlockPages']
|
|
315
|
+
extra_config.push(
|
|
316
|
+
{ key: 'mainMem.ioBlockPages', value: ioblockpages }
|
|
317
|
+
)
|
|
318
|
+
end
|
|
319
|
+
if pool.key?('snapshot_mainMem_iowait')
|
|
320
|
+
iowait = pool['snapshot_mainMem_iowait']
|
|
321
|
+
extra_config.push(
|
|
322
|
+
{ key: 'mainMem.iowait', value: iowait }
|
|
323
|
+
)
|
|
324
|
+
end
|
|
325
|
+
|
|
309
326
|
# Annotate with creation time, origin template, etc.
|
|
310
327
|
# Add extraconfig options that can be queried by vmtools
|
|
311
|
-
config_spec =
|
|
312
|
-
annotation: JSON.pretty_generate(
|
|
313
|
-
name: new_vmname,
|
|
314
|
-
created_by: provider_config['username'],
|
|
315
|
-
base_template: template_path,
|
|
316
|
-
creation_timestamp: Time.now.utc
|
|
317
|
-
),
|
|
318
|
-
extraConfig: [
|
|
319
|
-
{ key: 'guestinfo.hostname', value: new_vmname }
|
|
320
|
-
]
|
|
321
|
-
)
|
|
328
|
+
config_spec = create_config_spec(new_vmname, template_path, extra_config)
|
|
322
329
|
|
|
323
330
|
# Check if alternate network configuration is specified and add configuration
|
|
324
331
|
if pool.key?('network')
|
|
@@ -358,6 +365,18 @@ module Vmpooler
|
|
|
358
365
|
vm_hash
|
|
359
366
|
end
|
|
360
367
|
|
|
368
|
+
def create_config_spec(vm_name, template_name, extra_config)
|
|
369
|
+
RbVmomi::VIM.VirtualMachineConfigSpec(
|
|
370
|
+
annotation: JSON.pretty_generate(
|
|
371
|
+
name: vm_name,
|
|
372
|
+
created_by: provider_config['username'],
|
|
373
|
+
base_template: template_name,
|
|
374
|
+
creation_timestamp: Time.now.utc
|
|
375
|
+
),
|
|
376
|
+
extraConfig: extra_config
|
|
377
|
+
)
|
|
378
|
+
end
|
|
379
|
+
|
|
361
380
|
def create_relocate_spec(target_datastore, target_datacenter_name, pool_name, connection)
|
|
362
381
|
pool = pool_config(pool_name)
|
|
363
382
|
target_cluster_name = get_target_cluster_from_config(pool_name)
|
data/lib/vmpooler/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vmpooler
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.17.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Puppet
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-10-
|
|
11
|
+
date: 2020-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|