vmpooler 0.16.3 → 0.17.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
  SHA256:
3
- metadata.gz: 30fe7f5b64e7bd0311ba0bd442b59537b0f84e5917f3bab7e4bd59194666fd27
4
- data.tar.gz: e62ca6fd7e50e224eb22da2ffbc16dc245ba68c2f4bf3253fc0efd876a19d8da
3
+ metadata.gz: 0c5757a10068283879b2db59f56ac980d4b5f23b171baf35d555f032432ac81a
4
+ data.tar.gz: 31cd71e044d92d9e64096b7baa589061f3c0e3561b8c390ca6263856430bc516
5
5
  SHA512:
6
- metadata.gz: 5d4396514a7ac21d826ca604654ebe52996f44193ef0fa59832668b0dd0721b13ec671ccd63ecd50359cbb8e958ce87da2f9b9c2f86efbb68d057bb19ff85a98
7
- data.tar.gz: fe85f3d77e106c8dcc1802d8cbe6d59482fc4b486b9477a1ad175328093a5ec410b54c6621fc7fc287b5894f3ea7fe88e24d1c4c8332576198a9494ce8695a49
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 = RbVmomi::VIM.VirtualMachineConfigSpec(
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vmpooler
4
- VERSION = '0.16.3'
4
+ VERSION = '0.17.0'
5
5
  end
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.16.3
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-14 00:00:00.000000000 Z
11
+ date: 2020-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby