knife-vcenter 2.0.3 → 2.0.6

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: 75675e9853a832ee53cb558bf4271ce7ccfecb8125a2139df8a6d8c6f8f3d9da
4
- data.tar.gz: 8fe144b8a77c4371a1bcc5319e7f7604968bbf7372340d598354b2855c7bc724
3
+ metadata.gz: '07168708394600e752a639a78660b85f704f7d410b778d12f3746cbea2f1cdec'
4
+ data.tar.gz: f78378267d355e59bcc7c5469fd35144026ceb1182e048375ab6de31eda02cab
5
5
  SHA512:
6
- metadata.gz: 517772b42e56bc2fd01a98b0575d96310f8d23ad3755311bb08ff027ca2a0dc4b6ba0e71c814c231afff2c4d150f3980aafcd9c58c52cd52b765e08895321c8d
7
- data.tar.gz: dcefbc820fc16f8e99ede9a40b98c3cfe22b44481d445c05449035ff03af640f44cd39bbddc70352eec9446d88ac00f8c47cbdb3ed8c89c40f07b6fffc7fb0f7
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 { |pool| pool.name }.to_s
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 { |pool| pool.name }.to_s
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
- long: "--vcenter-username USERNAME",
31
- description: "Username to use to connect to the VCenter API"
30
+ long: "--vcenter-username USERNAME",
31
+ description: "Username to use to connect to the VCenter API"
32
32
 
33
33
  option :vcenter_password,
34
- long: "--vcenter-password PASSWORD",
35
- description: "Password associated with the specified user"
34
+ long: "--vcenter-password PASSWORD",
35
+ description: "Password associated with the specified user"
36
36
 
37
37
  option :vcenter_host,
38
- long: "--vcenter-host HOST",
39
- description: "Host to target for operations"
38
+ long: "--vcenter-host HOST",
39
+ description: "Host to target for operations"
40
40
 
41
41
  option :vcenter_disable_ssl_verify,
42
- long: "--vcenter-disable-ssl-verify",
43
- description: "Skip any SSL verification for the API",
44
- boolean: true,
45
- default: false
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
- long: "--vcenter-logs",
49
- description: "Whether or not to display logs from VCenter SDK. Default: false",
50
- boolean: true,
51
- default: false
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"
@@ -40,7 +40,7 @@ class Chef
40
40
  def before_exec_command
41
41
  @columns_with_info = [
42
42
  { label: "ID", key: "datacenter" },
43
- { label: "Name", key: "name" }
43
+ { label: "Name", key: "name" },
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
- long: "--template NAME",
43
- description: "Name of VM or template to use to clone machine from"
42
+ long: "--template NAME",
43
+ description: "Name of VM or template to use to clone machine from"
44
44
 
45
45
  option :targethost,
46
- long: "--targethost HOST",
47
- description: "Host that the machine should be created on"
46
+ long: "--targethost HOST",
47
+ description: "Host that the machine should be created on"
48
48
 
49
49
  option :datacenter,
50
- long: "--datacenter NAME",
51
- description: "The datacenter for vSphere"
50
+ long: "--datacenter NAME",
51
+ description: "The datacenter for vSphere"
52
52
 
53
53
  option :disable_power_on,
54
- long: "--disable-power-on",
55
- boolean: true,
56
- default: false
54
+ long: "--disable-power-on",
55
+ boolean: true,
56
+ default: false
57
57
 
58
58
  option :folder,
59
- long: "--folder NAME",
60
- description: "Folder to deploy the new machine into"
59
+ long: "--folder NAME",
60
+ description: "Folder to deploy the new machine into"
61
61
 
62
62
  option :pool,
63
- long: "--pool NAME",
64
- description: "Name of resource pool to use when creating the machine"
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
- long: "--node-ssl-verify-mode [peer|none]",
68
- description: "Whether or not to verify the SSL cert for all HTTPS requests."
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
- long: "--targethost HOST",
42
- description: "vCenter host on which the new VM should be created"
41
+ long: "--targethost HOST",
42
+ description: "vCenter host on which the new VM should be created"
43
43
 
44
44
  option :folder,
45
- long: "--folder FOLDER",
46
- description: "Folder in which the machine will reside"
45
+ long: "--folder FOLDER",
46
+ description: "Folder in which the machine will reside"
47
47
 
48
48
  option :datastore,
49
- long: "--datastore DATASTORE",
50
- description: "Datastore to be used for the disks etc"
49
+ long: "--datastore DATASTORE",
50
+ description: "Datastore to be used for the disks etc"
51
51
 
52
52
  option :resource_pool,
53
- long: "--resource_pool RESOURCEPOOOL",
54
- description: "Resource Pool to create the machine"
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"
@@ -20,5 +20,5 @@
20
20
  # Provisions machines in vCenter
21
21
  module KnifeVcenter
22
22
  # The version of this amazing Gem, you should <3 it.
23
- VERSION = "2.0.3"
23
+ VERSION = "2.0.6"
24
24
  end
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.3
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-03-13 00:00:00.000000000 Z
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
- rubyforge_project:
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.