knife-google 4.2.4 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/knife/cloud/google_service_helpers.rb +8 -8
- data/lib/chef/knife/google_disk_create.rb +11 -8
- data/lib/chef/knife/google_disk_delete.rb +6 -3
- data/lib/chef/knife/google_disk_list.rb +6 -3
- data/lib/chef/knife/google_image_list.rb +6 -3
- data/lib/chef/knife/google_project_quotas.rb +6 -3
- data/lib/chef/knife/google_region_list.rb +6 -3
- data/lib/chef/knife/google_region_quotas.rb +6 -3
- data/lib/chef/knife/google_server_create.rb +42 -42
- data/lib/chef/knife/google_server_delete.rb +6 -3
- data/lib/chef/knife/google_server_list.rb +6 -3
- data/lib/chef/knife/google_server_show.rb +6 -3
- data/lib/chef/knife/google_zone_list.rb +6 -3
- data/lib/knife-google/version.rb +1 -1
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f785368485019cc9613cf4774937dfe265b5fdd85866ca8b1078d94112c00336
|
4
|
+
data.tar.gz: 75c550efa4e8537d34588fa1c0649cef1e2c676e61db23f79a4cbbfe56547936
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57aed39bc980cb8567d3a2b204b342f2a8b38d5708b0dcaf8fb3ec61d53cd4ffd89b95d791752e326536676eb22659f6863a001dd274930f32c41ff7b128778c
|
7
|
+
data.tar.gz: 30b5ad21c6c0e79bab1c3d9b30e5fd5812d06e6fffddf94ca1274b5cdc4c055a16ad3a063db7ca3bc32eb0d37bf1a76ee61344b3be05ac60c446c766c230c2fa
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
3
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
4
|
-
# Copyright:: Copyright (c)
|
4
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
5
5
|
# License:: Apache License, Version 2.0
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -23,19 +23,19 @@ class Chef::Knife::Cloud
|
|
23
23
|
|
24
24
|
def create_service_instance
|
25
25
|
Chef::Knife::Cloud::GoogleService.new(
|
26
|
-
project:
|
27
|
-
zone:
|
28
|
-
wait_time:
|
29
|
-
refresh_rate:
|
30
|
-
max_pages:
|
31
|
-
max_page_size:
|
26
|
+
project: config[:gce_project],
|
27
|
+
zone: config[:gce_zone],
|
28
|
+
wait_time: config[:request_timeout],
|
29
|
+
refresh_rate: config[:request_refresh_rate],
|
30
|
+
max_pages: config[:gce_max_pages],
|
31
|
+
max_page_size: config[:gce_max_page_size]
|
32
32
|
)
|
33
33
|
end
|
34
34
|
|
35
35
|
def check_for_missing_config_values!(*keys)
|
36
36
|
keys_to_check = REQUIRED_KEYS + keys
|
37
37
|
|
38
|
-
missing = keys_to_check.select { |x|
|
38
|
+
missing = keys_to_check.select { |x| config[x].nil? }
|
39
39
|
|
40
40
|
unless missing.empty?
|
41
41
|
message = "The following required parameters are missing: #{missing.join(", ")}"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# Author:: Paul Rossman (<paulrossman@google.com>)
|
4
4
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
5
|
-
# Copyright:: Copyright
|
5
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
6
6
|
# License:: Apache License, Version 2.0
|
7
7
|
#
|
8
8
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -19,17 +19,20 @@
|
|
19
19
|
|
20
20
|
require "chef/knife"
|
21
21
|
require "chef/knife/cloud/command"
|
22
|
-
require_relative "cloud/google_service"
|
23
|
-
require_relative "cloud/google_service_helpers"
|
24
22
|
require_relative "cloud/google_service_options"
|
25
23
|
|
26
24
|
class Chef::Knife::Cloud
|
27
25
|
class GoogleDiskCreate < Command
|
28
|
-
include GoogleServiceHelpers
|
29
26
|
include GoogleServiceOptions
|
30
27
|
|
31
28
|
banner "knife google disk create NAME --gce-disk-size N (options)"
|
32
29
|
|
30
|
+
deps do
|
31
|
+
require_relative "cloud/google_service"
|
32
|
+
require_relative "cloud/google_service_helpers"
|
33
|
+
include GoogleServiceHelpers
|
34
|
+
end
|
35
|
+
|
33
36
|
option :disk_size,
|
34
37
|
long: "--gce-disk-size SIZE",
|
35
38
|
description: "Size of the persistent disk between 10 and 10000 GB, specified in GB; default is '10' GB",
|
@@ -49,16 +52,16 @@ class Chef::Knife::Cloud
|
|
49
52
|
def validate_params!
|
50
53
|
check_for_missing_config_values!(:gce_zone, :disk_size, :disk_type)
|
51
54
|
raise "Please specify a disk name." unless @name_args.first
|
52
|
-
raise "Disk size must be between 10 and 10,000" unless valid_disk_size?(
|
55
|
+
raise "Disk size must be between 10 and 10,000" unless valid_disk_size?(config[:disk_size])
|
53
56
|
|
54
57
|
super
|
55
58
|
end
|
56
59
|
|
57
60
|
def execute_command
|
58
61
|
name = @name_args.first
|
59
|
-
size =
|
60
|
-
type =
|
61
|
-
src =
|
62
|
+
size = config[:disk_size]
|
63
|
+
type = config[:disk_type]
|
64
|
+
src = config[:disk_source]
|
62
65
|
|
63
66
|
service.create_disk(name, size, type, src)
|
64
67
|
end
|
@@ -19,17 +19,20 @@
|
|
19
19
|
|
20
20
|
require "chef/knife"
|
21
21
|
require "chef/knife/cloud/command"
|
22
|
-
require_relative "cloud/google_service"
|
23
|
-
require_relative "cloud/google_service_helpers"
|
24
22
|
require_relative "cloud/google_service_options"
|
25
23
|
|
26
24
|
class Chef::Knife::Cloud
|
27
25
|
class GoogleDiskDelete < Command
|
28
|
-
include GoogleServiceHelpers
|
29
26
|
include GoogleServiceOptions
|
30
27
|
|
31
28
|
banner "knife google disk delete NAME [NAME] (options)"
|
32
29
|
|
30
|
+
deps do
|
31
|
+
require_relative "cloud/google_service"
|
32
|
+
require_relative "cloud/google_service_helpers"
|
33
|
+
include GoogleServiceHelpers
|
34
|
+
end
|
35
|
+
|
33
36
|
def validate_params!
|
34
37
|
check_for_missing_config_values!(:gce_zone)
|
35
38
|
raise "You must specify at least one disk to delete." if @name_args.empty?
|
@@ -19,17 +19,20 @@
|
|
19
19
|
|
20
20
|
require "chef/knife"
|
21
21
|
require "chef/knife/cloud/list_resource_command"
|
22
|
-
require_relative "cloud/google_service"
|
23
|
-
require_relative "cloud/google_service_helpers"
|
24
22
|
require_relative "cloud/google_service_options"
|
25
23
|
|
26
24
|
class Chef::Knife::Cloud
|
27
25
|
class GoogleDiskList < ResourceListCommand
|
28
|
-
include GoogleServiceHelpers
|
29
26
|
include GoogleServiceOptions
|
30
27
|
|
31
28
|
banner "knife google disk list"
|
32
29
|
|
30
|
+
deps do
|
31
|
+
require_relative "cloud/google_service"
|
32
|
+
require_relative "cloud/google_service_helpers"
|
33
|
+
include GoogleServiceHelpers
|
34
|
+
end
|
35
|
+
|
33
36
|
def validate_params!
|
34
37
|
check_for_missing_config_values!(:gce_zone)
|
35
38
|
super
|
@@ -18,17 +18,20 @@
|
|
18
18
|
|
19
19
|
require "chef/knife"
|
20
20
|
require "chef/knife/cloud/list_resource_command"
|
21
|
-
require_relative "cloud/google_service"
|
22
|
-
require_relative "cloud/google_service_helpers"
|
23
21
|
require_relative "cloud/google_service_options"
|
24
22
|
|
25
23
|
class Chef::Knife::Cloud
|
26
24
|
class GoogleImageList < ResourceListCommand
|
27
|
-
include GoogleServiceHelpers
|
28
25
|
include GoogleServiceOptions
|
29
26
|
|
30
27
|
banner "knife google image list"
|
31
28
|
|
29
|
+
deps do
|
30
|
+
require_relative "cloud/google_service"
|
31
|
+
require_relative "cloud/google_service_helpers"
|
32
|
+
include GoogleServiceHelpers
|
33
|
+
end
|
34
|
+
|
32
35
|
def validate_params!
|
33
36
|
check_for_missing_config_values!
|
34
37
|
super
|
@@ -19,17 +19,20 @@
|
|
19
19
|
|
20
20
|
require "chef/knife"
|
21
21
|
require "chef/knife/cloud/list_resource_command"
|
22
|
-
require_relative "cloud/google_service"
|
23
|
-
require_relative "cloud/google_service_helpers"
|
24
22
|
require_relative "cloud/google_service_options"
|
25
23
|
|
26
24
|
class Chef::Knife::Cloud
|
27
25
|
class GoogleProjectQuotas < ResourceListCommand
|
28
|
-
include GoogleServiceHelpers
|
29
26
|
include GoogleServiceOptions
|
30
27
|
|
31
28
|
banner "knife google project quotas"
|
32
29
|
|
30
|
+
deps do
|
31
|
+
require_relative "cloud/google_service"
|
32
|
+
require_relative "cloud/google_service_helpers"
|
33
|
+
include GoogleServiceHelpers
|
34
|
+
end
|
35
|
+
|
33
36
|
def validate_params!
|
34
37
|
check_for_missing_config_values!
|
35
38
|
super
|
@@ -19,17 +19,20 @@
|
|
19
19
|
|
20
20
|
require "chef/knife"
|
21
21
|
require "chef/knife/cloud/list_resource_command"
|
22
|
-
require_relative "cloud/google_service"
|
23
|
-
require_relative "cloud/google_service_helpers"
|
24
22
|
require_relative "cloud/google_service_options"
|
25
23
|
|
26
24
|
class Chef::Knife::Cloud
|
27
25
|
class GoogleRegionList < ResourceListCommand
|
28
|
-
include GoogleServiceHelpers
|
29
26
|
include GoogleServiceOptions
|
30
27
|
|
31
28
|
banner "knife google region list"
|
32
29
|
|
30
|
+
deps do
|
31
|
+
require_relative "cloud/google_service"
|
32
|
+
require_relative "cloud/google_service_helpers"
|
33
|
+
include GoogleServiceHelpers
|
34
|
+
end
|
35
|
+
|
33
36
|
def validate_params!
|
34
37
|
check_for_missing_config_values!
|
35
38
|
super
|
@@ -19,17 +19,20 @@
|
|
19
19
|
|
20
20
|
require "chef/knife"
|
21
21
|
require "chef/knife/cloud/list_resource_command"
|
22
|
-
require_relative "cloud/google_service"
|
23
|
-
require_relative "cloud/google_service_helpers"
|
24
22
|
require_relative "cloud/google_service_options"
|
25
23
|
|
26
24
|
class Chef::Knife::Cloud
|
27
25
|
class GoogleRegionQuotas < Command
|
28
|
-
include GoogleServiceHelpers
|
29
26
|
include GoogleServiceOptions
|
30
27
|
|
31
28
|
banner "knife google region quotas"
|
32
29
|
|
30
|
+
deps do
|
31
|
+
require_relative "cloud/google_service"
|
32
|
+
require_relative "cloud/google_service_helpers"
|
33
|
+
include GoogleServiceHelpers
|
34
|
+
end
|
35
|
+
|
33
36
|
def validate_params!
|
34
37
|
check_for_missing_config_values!
|
35
38
|
super
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# Author:: Paul Rossman (<paulrossman@google.com>)
|
4
4
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
5
|
-
# Copyright:: Copyright
|
5
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
6
6
|
# License:: Apache License, Version 2.0
|
7
7
|
#
|
8
8
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -20,18 +20,22 @@
|
|
20
20
|
require "chef/knife"
|
21
21
|
require "chef/knife/cloud/server/create_command"
|
22
22
|
require "chef/knife/cloud/server/create_options"
|
23
|
-
require_relative "cloud/google_service"
|
24
|
-
require_relative "cloud/google_service_helpers"
|
25
23
|
require_relative "cloud/google_service_options"
|
26
24
|
|
27
25
|
class Chef::Knife::Cloud
|
28
26
|
class GoogleServerCreate < ServerCreateCommand
|
29
27
|
include GoogleServiceOptions
|
30
|
-
include GoogleServiceHelpers
|
31
28
|
include ServerCreateOptions
|
32
29
|
|
33
30
|
banner "knife google server create NAME -m MACHINE_TYPE -I IMAGE (options)"
|
34
31
|
|
32
|
+
deps do
|
33
|
+
require "gcewinpass"
|
34
|
+
require_relative "cloud/google_service"
|
35
|
+
require_relative "cloud/google_service_helpers"
|
36
|
+
include GoogleServiceHelpers
|
37
|
+
end
|
38
|
+
|
35
39
|
option :machine_type,
|
36
40
|
short: "-m MACHINE_TYPE",
|
37
41
|
long: "--gce-machine-type MACHINE_TYPE",
|
@@ -163,37 +167,33 @@ class Chef::Knife::Cloud
|
|
163
167
|
description: "Specifies the number of local SSDs to be created per node. Each local SSD is 375 GB in size, but you can attach up to eight local SSD devices for 3 TB of total local SSD storage space per instance.",
|
164
168
|
default: "1"
|
165
169
|
|
166
|
-
deps do
|
167
|
-
require "gcewinpass"
|
168
|
-
end
|
169
|
-
|
170
170
|
def before_exec_command
|
171
171
|
super
|
172
172
|
|
173
173
|
@create_options = {
|
174
174
|
name: instance_name,
|
175
|
-
image:
|
176
|
-
image_project:
|
177
|
-
network:
|
178
|
-
subnet:
|
179
|
-
public_ip:
|
175
|
+
image: config[:image],
|
176
|
+
image_project: config[:image_project],
|
177
|
+
network: config[:network],
|
178
|
+
subnet: config[:subnet],
|
179
|
+
public_ip: config[:public_ip],
|
180
180
|
auto_migrate: auto_migrate?,
|
181
181
|
auto_restart: auto_restart?,
|
182
182
|
preemptible: preemptible?,
|
183
|
-
boot_disk_autodelete:
|
184
|
-
boot_disk_name:
|
183
|
+
boot_disk_autodelete: config[:boot_disk_autodelete],
|
184
|
+
boot_disk_name: config[:boot_disk_name],
|
185
185
|
boot_disk_size: boot_disk_size,
|
186
|
-
boot_disk_ssd:
|
187
|
-
additional_disks:
|
188
|
-
local_ssd:
|
189
|
-
interface:
|
186
|
+
boot_disk_ssd: config[:boot_disk_ssd],
|
187
|
+
additional_disks: config[:additional_disks],
|
188
|
+
local_ssd: config[:local_ssd],
|
189
|
+
interface: config[:interface],
|
190
190
|
number_of_local_ssd: number_of_local_ssd,
|
191
|
-
can_ip_forward:
|
192
|
-
machine_type:
|
193
|
-
service_account_scopes:
|
194
|
-
service_account_name:
|
191
|
+
can_ip_forward: config[:can_ip_forward],
|
192
|
+
machine_type: config[:machine_type],
|
193
|
+
service_account_scopes: config[:service_account_scopes],
|
194
|
+
service_account_name: config[:service_account_name],
|
195
195
|
metadata: metadata,
|
196
|
-
tags:
|
196
|
+
tags: config[:tags],
|
197
197
|
}
|
198
198
|
end
|
199
199
|
|
@@ -208,16 +208,16 @@ class Chef::Knife::Cloud
|
|
208
208
|
raise "You must supply an instance name." if @name_args.first.nil?
|
209
209
|
raise "Boot disk size must be between 10 and 10,000" unless valid_disk_size?(boot_disk_size)
|
210
210
|
|
211
|
-
if
|
211
|
+
if config[:connection_protocol] == "winrm" && config[:gce_email].nil?
|
212
212
|
raise "Please provide your Google Cloud console email address via --gce-email. " \
|
213
213
|
"It is required when resetting passwords on Windows hosts."
|
214
214
|
end
|
215
215
|
|
216
|
-
raise "Please provide connection port via --connection-port." unless
|
217
|
-
raise "Please provide image os type via --image-os-type." unless
|
216
|
+
raise "Please provide connection port via --connection-port." unless config[:connection_port]
|
217
|
+
raise "Please provide image os type via --image-os-type." unless config[:image_os_type]
|
218
218
|
|
219
|
-
ui.warn("Auto-migrate disabled for preemptible instance") if preemptible? &&
|
220
|
-
ui.warn("Auto-restart disabled for preemptible instance") if preemptible? &&
|
219
|
+
ui.warn("Auto-migrate disabled for preemptible instance") if preemptible? && config[:auto_migrate]
|
220
|
+
ui.warn("Auto-restart disabled for preemptible instance") if preemptible? && config[:auto_restart]
|
221
221
|
|
222
222
|
super
|
223
223
|
end
|
@@ -225,10 +225,10 @@ class Chef::Knife::Cloud
|
|
225
225
|
def before_bootstrap
|
226
226
|
super
|
227
227
|
|
228
|
-
config[:chef_node_name] =
|
228
|
+
config[:chef_node_name] = config[:chef_node_name] ? config[:chef_node_name] : instance_name
|
229
229
|
config[:bootstrap_ip_address] = ip_address_for_bootstrap
|
230
230
|
|
231
|
-
if
|
231
|
+
if config[:image_os_type] == "windows"
|
232
232
|
ui.msg("Resetting the Windows login password so the bootstrap can continue...")
|
233
233
|
config[:connection_password] = reset_windows_password
|
234
234
|
end
|
@@ -245,31 +245,31 @@ class Chef::Knife::Cloud
|
|
245
245
|
end
|
246
246
|
|
247
247
|
def project
|
248
|
-
|
248
|
+
config[:gce_project]
|
249
249
|
end
|
250
250
|
|
251
251
|
def zone
|
252
|
-
|
252
|
+
config[:gce_zone]
|
253
253
|
end
|
254
254
|
|
255
255
|
def email
|
256
|
-
|
256
|
+
config[:gce_email]
|
257
257
|
end
|
258
258
|
|
259
259
|
def preemptible?
|
260
|
-
|
260
|
+
config[:preemptible]
|
261
261
|
end
|
262
262
|
|
263
263
|
def auto_migrate?
|
264
|
-
preemptible? ? false :
|
264
|
+
preemptible? ? false : config[:auto_migrate]
|
265
265
|
end
|
266
266
|
|
267
267
|
def auto_restart?
|
268
|
-
preemptible? ? false :
|
268
|
+
preemptible? ? false : config[:auto_restart]
|
269
269
|
end
|
270
270
|
|
271
271
|
def ip_address_for_bootstrap
|
272
|
-
ip =
|
272
|
+
ip = config[:use_private_ip] ? private_ip_for(server) : public_ip_for(server)
|
273
273
|
|
274
274
|
raise "Unable to determine instance IP address for bootstrapping" if ip == "unknown"
|
275
275
|
|
@@ -281,18 +281,18 @@ class Chef::Knife::Cloud
|
|
281
281
|
end
|
282
282
|
|
283
283
|
def metadata
|
284
|
-
|
284
|
+
config[:metadata].each_with_object({}) do |item, memo|
|
285
285
|
key, value = item.split("=")
|
286
286
|
memo[key] = value
|
287
287
|
end
|
288
288
|
end
|
289
289
|
|
290
290
|
def boot_disk_size
|
291
|
-
|
291
|
+
config[:boot_disk_size].to_i
|
292
292
|
end
|
293
293
|
|
294
294
|
def number_of_local_ssd
|
295
|
-
|
295
|
+
config[:number_of_local_ssd].to_i
|
296
296
|
end
|
297
297
|
|
298
298
|
def reset_windows_password
|
@@ -301,7 +301,7 @@ class Chef::Knife::Cloud
|
|
301
301
|
zone: zone,
|
302
302
|
instance_name: instance_name,
|
303
303
|
email: email,
|
304
|
-
username:
|
304
|
+
username: config[:connection_user],
|
305
305
|
debug: gcewinpass_debug_mode
|
306
306
|
).new_password
|
307
307
|
end
|
@@ -20,8 +20,6 @@
|
|
20
20
|
require "chef/knife"
|
21
21
|
require "chef/knife/cloud/server/delete_options"
|
22
22
|
require "chef/knife/cloud/server/delete_command"
|
23
|
-
require_relative "cloud/google_service"
|
24
|
-
require_relative "cloud/google_service_helpers"
|
25
23
|
require_relative "cloud/google_service_options"
|
26
24
|
|
27
25
|
class Chef
|
@@ -29,11 +27,16 @@ class Chef
|
|
29
27
|
class Cloud
|
30
28
|
class GoogleServerDelete < ServerDeleteCommand
|
31
29
|
include ServerDeleteOptions
|
32
|
-
include GoogleServiceHelpers
|
33
30
|
include GoogleServiceOptions
|
34
31
|
|
35
32
|
banner "knife google server delete INSTANCE_NAME [INSTANCE_NAME] (options)"
|
36
33
|
|
34
|
+
deps do
|
35
|
+
require_relative "cloud/google_service"
|
36
|
+
require_relative "cloud/google_service_helpers"
|
37
|
+
include GoogleServiceHelpers
|
38
|
+
end
|
39
|
+
|
37
40
|
def validate_params!
|
38
41
|
check_for_missing_config_values!
|
39
42
|
super
|
@@ -20,15 +20,18 @@
|
|
20
20
|
require "chef/knife"
|
21
21
|
require "chef/knife/cloud/server/list_command"
|
22
22
|
require "chef/knife/cloud/server/list_options"
|
23
|
-
require_relative "cloud/google_service"
|
24
|
-
require_relative "cloud/google_service_helpers"
|
25
23
|
require_relative "cloud/google_service_options"
|
26
24
|
|
27
25
|
class Chef::Knife::Cloud
|
28
26
|
class GoogleServerList < ServerListCommand
|
29
|
-
include GoogleServiceHelpers
|
30
27
|
include GoogleServiceOptions
|
31
28
|
|
29
|
+
deps do
|
30
|
+
require_relative "cloud/google_service"
|
31
|
+
require_relative "cloud/google_service_helpers"
|
32
|
+
include GoogleServiceHelpers
|
33
|
+
end
|
34
|
+
|
32
35
|
banner "knife google server list"
|
33
36
|
|
34
37
|
def validate_params!
|
@@ -19,8 +19,6 @@
|
|
19
19
|
require "chef/knife"
|
20
20
|
require "chef/knife/cloud/server/show_options"
|
21
21
|
require "chef/knife/cloud/server/show_command"
|
22
|
-
require_relative "cloud/google_service"
|
23
|
-
require_relative "cloud/google_service_helpers"
|
24
22
|
require_relative "cloud/google_service_options"
|
25
23
|
|
26
24
|
class Chef
|
@@ -28,11 +26,16 @@ class Chef
|
|
28
26
|
class Cloud
|
29
27
|
class GoogleServerShow < ServerShowCommand
|
30
28
|
include ServerShowOptions
|
31
|
-
include GoogleServiceHelpers
|
32
29
|
include GoogleServiceOptions
|
33
30
|
|
34
31
|
banner "knife google server show INSTANCE_NAME (options)"
|
35
32
|
|
33
|
+
deps do
|
34
|
+
require_relative "cloud/google_service"
|
35
|
+
require_relative "cloud/google_service_helpers"
|
36
|
+
include GoogleServiceHelpers
|
37
|
+
end
|
38
|
+
|
36
39
|
def validate_params!
|
37
40
|
check_for_missing_config_values!(:gce_zone)
|
38
41
|
raise "You must supply an instance name to display" if @name_args.empty?
|
@@ -19,17 +19,20 @@
|
|
19
19
|
|
20
20
|
require "chef/knife"
|
21
21
|
require "chef/knife/cloud/list_resource_command"
|
22
|
-
require_relative "cloud/google_service"
|
23
|
-
require_relative "cloud/google_service_helpers"
|
24
22
|
require_relative "cloud/google_service_options"
|
25
23
|
|
26
24
|
class Chef::Knife::Cloud
|
27
25
|
class GoogleZoneList < ResourceListCommand
|
28
|
-
include GoogleServiceHelpers
|
29
26
|
include GoogleServiceOptions
|
30
27
|
|
31
28
|
banner "knife google zone list"
|
32
29
|
|
30
|
+
deps do
|
31
|
+
require_relative "cloud/google_service"
|
32
|
+
require_relative "cloud/google_service_helpers"
|
33
|
+
include GoogleServiceHelpers
|
34
|
+
end
|
35
|
+
|
33
36
|
def validate_params!
|
34
37
|
check_for_missing_config_values!
|
35
38
|
super
|
data/lib/knife-google/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-google
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chiraq Jog
|
@@ -13,22 +13,36 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date:
|
16
|
+
date: 2020-06-05 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
|
+
- !ruby/object:Gem::Dependency
|
19
|
+
name: chef
|
20
|
+
requirement: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: '15.11'
|
25
|
+
type: :runtime
|
26
|
+
prerelease: false
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '15.11'
|
18
32
|
- !ruby/object:Gem::Dependency
|
19
33
|
name: knife-cloud
|
20
34
|
requirement: !ruby/object:Gem::Requirement
|
21
35
|
requirements:
|
22
36
|
- - ">="
|
23
37
|
- !ruby/object:Gem::Version
|
24
|
-
version:
|
38
|
+
version: 4.0.0
|
25
39
|
type: :runtime
|
26
40
|
prerelease: false
|
27
41
|
version_requirements: !ruby/object:Gem::Requirement
|
28
42
|
requirements:
|
29
43
|
- - ">="
|
30
44
|
- !ruby/object:Gem::Version
|
31
|
-
version:
|
45
|
+
version: 4.0.0
|
32
46
|
- !ruby/object:Gem::Dependency
|
33
47
|
name: google-api-client
|
34
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,7 +52,7 @@ dependencies:
|
|
38
52
|
version: 0.23.9
|
39
53
|
- - "<"
|
40
54
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.
|
55
|
+
version: 0.39.0
|
42
56
|
type: :runtime
|
43
57
|
prerelease: false
|
44
58
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -48,7 +62,7 @@ dependencies:
|
|
48
62
|
version: 0.23.9
|
49
63
|
- - "<"
|
50
64
|
- !ruby/object:Gem::Version
|
51
|
-
version: 0.
|
65
|
+
version: 0.39.0
|
52
66
|
- !ruby/object:Gem::Dependency
|
53
67
|
name: gcewinpass
|
54
68
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '2.
|
117
|
+
version: '2.6'
|
104
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
119
|
requirements:
|
106
120
|
- - ">="
|