knife-vsphere 1.2.25 → 1.2.26
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/chef/knife/vsphere_vm_clone.rb +16 -0
- data/lib/chef/knife/vsphere_vm_find.rb +9 -3
- data/lib/knife-vsphere/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 060509d9604ac932b4808fc732e6fba41602b1c6
|
|
4
|
+
data.tar.gz: 44f9be0f47b5a38e67916cb1b0dcb87fb94c67e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
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.
|
|
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-
|
|
11
|
+
date: 2017-04-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: filesize
|