knife-vcenter 2.0.3 → 2.0.6
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/cloud/vcenter_service.rb +3 -2
- data/lib/chef/knife/cloud/vcenter_service_options.rb +14 -14
- data/lib/chef/knife/vcenter_cluster_list.rb +1 -1
- data/lib/chef/knife/vcenter_datacenter_list.rb +1 -1
- data/lib/chef/knife/vcenter_host_list.rb +1 -1
- data/lib/chef/knife/vcenter_vm_clone.rb +15 -15
- data/lib/chef/knife/vcenter_vm_create.rb +8 -8
- data/lib/chef/knife/vcenter_vm_list.rb +1 -1
- data/lib/knife-vcenter/version.rb +1 -1
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '07168708394600e752a639a78660b85f704f7d410b778d12f3746cbea2f1cdec'
|
4
|
+
data.tar.gz: f78378267d355e59bcc7c5469fd35144026ceb1182e048375ab6de31eda02cab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dad2db59929167e9d426caddf974a34e67e69d1b799344b275d0ead30acc41f9cf0b8b5cdb100d6eec8fcaf54d60f9a244be7af25fc8da55266530f8a83eb7f7
|
7
|
+
data.tar.gz: d83b1ea55afa8fbd45e845f276afa4907871653ab308d641d2196d016ccf27d09e4e8e3232155eaa511667d2e2d2722db45e5e3d88e0b802d0ee96214bf1468a
|
@@ -208,6 +208,7 @@ class Chef
|
|
208
208
|
ds = ds_api.list({ filter_names: name }).value
|
209
209
|
|
210
210
|
raise format("Unable to find data store: %s", name) if ds.empty?
|
211
|
+
|
211
212
|
ds.first.datastore
|
212
213
|
end
|
213
214
|
|
@@ -220,14 +221,14 @@ class Chef
|
|
220
221
|
if name.nil?
|
221
222
|
# Remove default pool for first pass (<= 1.2.1 behaviour to pick first user-defined pool found)
|
222
223
|
resource_pools = rp_api.list.value.delete_if { |pool| pool.name == "Resources" }
|
223
|
-
puts "Search of all resource pools found: " + resource_pools.map
|
224
|
+
puts "Search of all resource pools found: " + resource_pools.map(&:name).to_s
|
224
225
|
|
225
226
|
# Revert to default pool, if no user-defined pool found (> 1.2.1 behaviour)
|
226
227
|
# (This one might not be found under some circumstances by the statement above)
|
227
228
|
return get_resource_pool("Resources") if resource_pools.empty?
|
228
229
|
else
|
229
230
|
resource_pools = rp_api.list({ filter_names: name }).value
|
230
|
-
puts "Search for resource pools found: " + resource_pools.map
|
231
|
+
puts "Search for resource pools found: " + resource_pools.map(&:name).to_s
|
231
232
|
end
|
232
233
|
|
233
234
|
raise format("Unable to find Resource Pool: %s", name) if resource_pools.empty?
|
@@ -27,28 +27,28 @@ class Chef
|
|
27
27
|
def self.included(includer)
|
28
28
|
includer.class_eval do
|
29
29
|
option :vcenter_username,
|
30
|
-
|
31
|
-
|
30
|
+
long: "--vcenter-username USERNAME",
|
31
|
+
description: "Username to use to connect to the VCenter API"
|
32
32
|
|
33
33
|
option :vcenter_password,
|
34
|
-
|
35
|
-
|
34
|
+
long: "--vcenter-password PASSWORD",
|
35
|
+
description: "Password associated with the specified user"
|
36
36
|
|
37
37
|
option :vcenter_host,
|
38
|
-
|
39
|
-
|
38
|
+
long: "--vcenter-host HOST",
|
39
|
+
description: "Host to target for operations"
|
40
40
|
|
41
41
|
option :vcenter_disable_ssl_verify,
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
long: "--vcenter-disable-ssl-verify",
|
43
|
+
description: "Skip any SSL verification for the API",
|
44
|
+
boolean: true,
|
45
|
+
default: false
|
46
46
|
|
47
47
|
option :vcenter_logs,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
long: "--vcenter-logs",
|
49
|
+
description: "Whether or not to display logs from VCenter SDK. Default: false",
|
50
|
+
boolean: true,
|
51
|
+
default: false
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -40,7 +40,7 @@ class Chef
|
|
40
40
|
{ label: "ID", key: "cluster" },
|
41
41
|
{ label: "Name", key: "name" },
|
42
42
|
{ label: "DRS?", key: "drs_enabled", value_callback: method(:format_boolean) },
|
43
|
-
{ label: "HA?", key: "ha_enabled", value_callback: method(:format_boolean) }
|
43
|
+
{ label: "HA?", key: "ha_enabled", value_callback: method(:format_boolean) },
|
44
44
|
]
|
45
45
|
|
46
46
|
@sort_by_field = "name"
|
@@ -42,7 +42,7 @@ class Chef
|
|
42
42
|
{ label: "ID", key: "host" },
|
43
43
|
{ label: "Name", key: "name" },
|
44
44
|
{ label: "Power State", key: "power_state", value_callback: method(:format_power_status) },
|
45
|
-
{ label: "Connection State", key: "connection_state" }
|
45
|
+
{ label: "Connection State", key: "connection_state" },
|
46
46
|
]
|
47
47
|
|
48
48
|
@sort_by_field = "name"
|
@@ -39,33 +39,33 @@ class Chef
|
|
39
39
|
banner "knife vcenter vm clone NAME (options)"
|
40
40
|
|
41
41
|
option :template,
|
42
|
-
|
43
|
-
|
42
|
+
long: "--template NAME",
|
43
|
+
description: "Name of VM or template to use to clone machine from"
|
44
44
|
|
45
45
|
option :targethost,
|
46
|
-
|
47
|
-
|
46
|
+
long: "--targethost HOST",
|
47
|
+
description: "Host that the machine should be created on"
|
48
48
|
|
49
49
|
option :datacenter,
|
50
|
-
|
51
|
-
|
50
|
+
long: "--datacenter NAME",
|
51
|
+
description: "The datacenter for vSphere"
|
52
52
|
|
53
53
|
option :disable_power_on,
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
long: "--disable-power-on",
|
55
|
+
boolean: true,
|
56
|
+
default: false
|
57
57
|
|
58
58
|
option :folder,
|
59
|
-
|
60
|
-
|
59
|
+
long: "--folder NAME",
|
60
|
+
description: "Folder to deploy the new machine into"
|
61
61
|
|
62
62
|
option :pool,
|
63
|
-
|
64
|
-
|
63
|
+
long: "--pool NAME",
|
64
|
+
description: "Name of resource pool to use when creating the machine"
|
65
65
|
|
66
66
|
option :node_ssl_verify_mode,
|
67
|
-
|
68
|
-
|
67
|
+
long: "--node-ssl-verify-mode [peer|none]",
|
68
|
+
description: "Whether or not to verify the SSL cert for all HTTPS requests."
|
69
69
|
|
70
70
|
# Validates the parameters and maksessure you have a template, name, or datacenter
|
71
71
|
#
|
@@ -38,20 +38,20 @@ class Chef
|
|
38
38
|
banner "knife vcenter vm create NAME"
|
39
39
|
|
40
40
|
option :targethost,
|
41
|
-
|
42
|
-
|
41
|
+
long: "--targethost HOST",
|
42
|
+
description: "vCenter host on which the new VM should be created"
|
43
43
|
|
44
44
|
option :folder,
|
45
|
-
|
46
|
-
|
45
|
+
long: "--folder FOLDER",
|
46
|
+
description: "Folder in which the machine will reside"
|
47
47
|
|
48
48
|
option :datastore,
|
49
|
-
|
50
|
-
|
49
|
+
long: "--datastore DATASTORE",
|
50
|
+
description: "Datastore to be used for the disks etc"
|
51
51
|
|
52
52
|
option :resource_pool,
|
53
|
-
|
54
|
-
|
53
|
+
long: "--resource_pool RESOURCEPOOOL",
|
54
|
+
description: "Resource Pool to create the machine"
|
55
55
|
|
56
56
|
# Validates the parameters, you need that unique name person!
|
57
57
|
#
|
@@ -44,7 +44,7 @@ class Chef
|
|
44
44
|
{ label: "Name", key: "name" },
|
45
45
|
{ label: "Power State", key: "power_state", value_callback: method(:format_power_status) },
|
46
46
|
{ label: "CPU Count", key: "cpu_count" },
|
47
|
-
{ label: "RAM Size (MB)", key: "memory_size_MiB", value_callback: method(:format_memory_value) }
|
47
|
+
{ label: "RAM Size (MB)", key: "memory_size_MiB", value_callback: method(:format_memory_value) },
|
48
48
|
]
|
49
49
|
|
50
50
|
@sort_by_field = "name"
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-vcenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Partner Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: knife-cloud
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rb-readline
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,8 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
212
|
- !ruby/object:Gem::Version
|
207
213
|
version: '0'
|
208
214
|
requirements: []
|
209
|
-
|
210
|
-
rubygems_version: 2.7.6
|
215
|
+
rubygems_version: 3.0.3
|
211
216
|
signing_key:
|
212
217
|
specification_version: 4
|
213
218
|
summary: Knife plugin to VMware vCenter.
|