knife-vsphere 1.2.25 → 1.2.26

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: 1c7890777dfc302edf4752175fba9188c8b71b8a
4
- data.tar.gz: 04f9c9a57bc4bdb19c7475f312764a1f39e03733
3
+ metadata.gz: 060509d9604ac932b4808fc732e6fba41602b1c6
4
+ data.tar.gz: 44f9be0f47b5a38e67916cb1b0dcb87fb94c67e5
5
5
  SHA512:
6
- metadata.gz: 8c5ae461b014eed7ba88ff2614e3b09251f4b4655fa1ed63f3aa03dd9c783317b0af59957e87ed62b989f1d69df72c997cfc0135df112a0b1fe166db5bebf013
7
- data.tar.gz: 85a25e046311e8608966dc5d6b2a958f171639267e63df2ffb623f81500665a7074ef2c076b1a524959c89144b39151be90155fb7c8ec437b9c71f1d9066f8d4
6
+ metadata.gz: a1d09af5a783b1b6a06f0bbfef2078187a9785a3397fca2cf6578d5d9d330ec397335716361db47c8502185eeaed146598a51533407ec939ba39c7152670934b
7
+ data.tar.gz: 37f379b2b0a787489e83785b4d761844d523fecd713e1112e69901b21e56fef0854ced1a53b686875c9aeea5b60fffeeae31c904b32febcda41f807dad2da8f3
@@ -127,10 +127,18 @@ class Chef::Knife::VsphereVmClone < Chef::Knife::BaseVsphereCommand
127
127
  long: '--ccpu CUST_CPU_COUNT',
128
128
  description: 'Number of CPUs'
129
129
 
130
+ option :customization_corespersocket,
131
+ long: '--ccorespersocket CUST_CPU_CORES_PER_SOCKET',
132
+ description: 'Number of CPU Cores per Socket'
133
+
130
134
  option :customization_memory,
131
135
  long: '--cram CUST_MEMORY_GB',
132
136
  description: 'Gigabytes of RAM'
133
137
 
138
+ option :customization_memory_reservation,
139
+ long: '--cram_reservation CUST_MEMORY_RESERVATION_GB',
140
+ description: 'Gigabytes of RAM'
141
+
134
142
  option :power,
135
143
  long: '--start',
136
144
  description: 'Indicates whether to start the VM after a successful clone',
@@ -574,10 +582,18 @@ class Chef::Knife::VsphereVmClone < Chef::Knife::BaseVsphereCommand
574
582
  clone_spec.config.numCPUs = get_config(:customization_cpucount)
575
583
  end
576
584
 
585
+ if get_config(:customization_corespersocket)
586
+ clone_spec.config.numCoresPerSocket = get_config(:customization_corespersocket)
587
+ end
588
+
577
589
  if get_config(:customization_memory)
578
590
  clone_spec.config.memoryMB = Integer(get_config(:customization_memory)) * 1024
579
591
  end
580
592
 
593
+ if get_config(:customization_memory_reservation)
594
+ clone_spec.config.memoryAllocation = RbVmomi::VIM.ResourceAllocationInfo reservation: Integer(Float(get_config(:customization_memory_reservation)) * 1024)
595
+ end
596
+
581
597
  mac_list = if get_config(:customization_macs) == AUTO_MAC
582
598
  [AUTO_MAC] * get_config(:customization_ips).split(',').length
583
599
  else
@@ -19,6 +19,10 @@ class Chef::Knife::VsphereVmFind < Chef::Knife::BaseVsphereCommand
19
19
  short: '-h',
20
20
  description: 'Target pool'
21
21
 
22
+ option :poolpath,
23
+ long: '--pool-path',
24
+ description: 'Pool is full-path'
25
+
22
26
  option :esx_disk,
23
27
  long: '--esx-disk',
24
28
  description: 'Show esx disks'
@@ -121,9 +125,11 @@ class Chef::Knife::VsphereVmFind < Chef::Knife::BaseVsphereCommand
121
125
  vim_connection
122
126
  dc = datacenter
123
127
  folder = dc.hostFolder
124
-
125
- pool = traverse_folders_for_pool_clustercompute(folder, poolname) || abort("Pool #{poolname} not found")
126
-
128
+ pool = if get_config(:poolpath)
129
+ find_pool(poolname) || abort("Pool #{poolname} not found")
130
+ else
131
+ traverse_folders_for_pool_clustercompute(folder, poolname) || abort("Pool #{poolname} not found")
132
+ end
127
133
  vm = if pool.class == RbVmomi::VIM::ResourcePool
128
134
  pool.vm
129
135
  else
@@ -1,3 +1,3 @@
1
1
  module KnifeVsphere
2
- VERSION = '1.2.25'
2
+ VERSION = '1.2.26'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-vsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.25
4
+ version: 1.2.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezra Pagel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-07 00:00:00.000000000 Z
11
+ date: 2017-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: filesize