26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/chef/knife/cloud/server/create_options.rb', line 26
def self.included(includer)
includer.class_eval do
include ServerOptions
include BootstrapOptions
option :image,
short: "-I IMAGE",
long: "--image IMAGE",
description: "A regexp matching an image name or an image ID for the server"
option :image_os_type,
short: "-T IMAGE_OS_TYPE",
long: "--image-os-type IMAGE_OS_TYPE",
description: "The image os type. options [windows/linux]. Only required when cloud does not provide a way to identify image os"
option :flavor,
short: "-f FLAVOR_ID",
long: "--flavor FLAVOR_ID",
description: "The flavor name or ID of server"
deprecated_option :bootstrap_protocol,
replacement: :connection_protocol,
long: "--bootstrap-protocol PROTOCOL"
option :server_create_timeout,
long: "--server-create-timeout timeout",
description: "How long to wait until the server is ready; default is 600 seconds",
default: 600
option :delete_server_on_failure,
long: "--delete-server-on-failure",
boolean: true,
default: false,
description: "Destroy corresponding server in case of failure"
option :chef_node_name_prefix,
long: "--chef-node-name-prefix PREFIX_FOR_NODE_NAME",
description: "The prefix for chef node name",
default: includer.snake_case_name.split("_").first
end
end
|