5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
# File 'lib/knife-clc/server_launch/config_options.rb', line 5
def self.attach(command_class)
command_class.class_eval do
option :clc_name,
:long => '--name NAME',
:description => 'Name of the server to create',
:on => :head
option :clc_description,
:long => '--description DESCRIPTION',
:description => 'User-defined description of this server',
:on => :head
option :clc_group,
:long => '--group ID',
:description => 'ID of the parent group',
:on => :head
option :clc_source_server,
:long => '--source-server ID',
:description => 'ID of the server to use a source. May be the ID of a template, or when cloning, an existing server ID',
:on => :head
option :clc_managed,
:long => '--managed',
:boolean => true,
:description => 'Whether to create the server as managed or not',
:on => :head
option :clc_managed_backup,
:long => '--managed-backup',
:boolean => true,
:description => 'Whether to add managed backup to the server',
:on => :head
option :clc_primary_dns,
:long => '--primary-dns ADDRESS',
:description => 'Primary DNS to set on the server',
:on => :head
option :clc_secondary_dns,
:long => '--secondary-dns ADDRESS',
:description => 'Secondary DNS to set on the server',
:on => :head
option :clc_network,
:long => '--network ID',
:description => 'ID of the network to which to deploy the server',
:on => :head
option :clc_ip,
:long => '--ip ADDRESS',
:description => 'IP address to assign to the server',
:on => :head
option :clc_server_password,
:long => '--server-password PASSWORD',
:description => 'Password of administrator or root user on server',
:on => :head
option :clc_source_server_password,
:long => '--source-server-password PASSWORD',
:description => 'Password of the source server, used only when creating a clone from an existing server',
:on => :head
option :clc_cpu,
:long => '--cpu COUNT',
:description => 'Number of processors to configure the server with',
:on => :head
option :clc_cpu_autoscale_policy,
:long => '--cpu-autoscale-policy ID',
:description => 'ID of the vertical CPU Autoscale policy to associate the server with',
:on => :head
option :clc_memory,
:long => '--memory COUNT',
:description => 'Number of GB of memory to configure the server with',
:on => :head
option :clc_type,
:long => '--type TYPE',
:description => 'Whether to create a standard or hyperscale server',
:on => :head
option :clc_storage_type,
:long => '--storage-type TYPE',
:description => 'For standard servers, whether to use standard or premium storage',
:on => :head
option :clc_anti_affinity_policy,
:long => '--anti-affinity-policy ID',
:description => 'ID of the Anti-Affinity policy to associate the server with',
:on => :head
option :clc_custom_fields,
:long => '--custom-field KEY=VALUE',
:description => 'Custom field key-value pair',
:on => :head,
:proc => ->(param) do
Chef::Config[:knife][:clc_custom_fields] ||= []
Chef::Config[:knife][:clc_custom_fields] << param
end
option :clc_disks,
:long => '--disk PATH,SIZE,TYPE',
:description => 'Configuration for an additional server disk',
:on => :head,
:proc => ->(param) do
Chef::Config[:knife][:clc_disks] ||= []
Chef::Config[:knife][:clc_disks] << param
end
option :clc_ttl,
:long => '--ttl DATETIME',
:description => 'Date/time that the server should be deleted',
:on => :head
option :clc_packages,
:long => '--package ID,KEY_1=VALUE[,KEY_2=VALUE]',
:description => 'Package to run on the server after it has been built',
:on => :head,
:proc => ->(param) do
Chef::Config[:knife][:clc_packages] ||= []
Chef::Config[:knife][:clc_packages] << param
end
option :clc_configuration,
:long => '--configuration ID',
:description => 'Specifies the identifier for the specific configuration type of bare metal server to deploy',
:on => :head
option :clc_os_type,
:long => '--os-type TYPE',
:description => 'Specifies the OS to provision with the bare metal server',
:on => :head
end
end
|