linodeapi 0.0.4 → 0.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
  SHA1:
3
- metadata.gz: e8b25f842f10287a91b8b38ada4a32da1708f404
4
- data.tar.gz: 33ee921d35f237ac931884139fc146796cc9fad2
3
+ metadata.gz: 3743f1068dcf7d2ba08ccb6805c0e81db45752d7
4
+ data.tar.gz: 526ea7504cba17317665fb25b7b790b106fe563d
5
5
  SHA512:
6
- metadata.gz: 3f0442ecfcd1876a668f5cd464b5ce7504e5b2b0278fca37e9bcda37c192a3cc33414a4f7a5882505b6cd9b25477d75b9b4f5b8a056022f8185af31040da21fe
7
- data.tar.gz: d57802da5c0e9216d436fa02338dd1018ebbb0f15750b95eef9d3ac3dee4ba1a85ab4deae0e835dd639411cee3071232737855817a47472e553fad9c4ced96f5
6
+ metadata.gz: 09e5658dd7562dce3d1c537c6364931d7a1cbf26a0e031cd7b534ba1b0f365fd14cf5f87ecbcab85322f70b1cc8e11be2dfc690d79281e05c6a43f103eeef837
7
+ data.tar.gz: 0da058706319205603453ae3644eda5ec3eaf0e83d1aba1ae553577ef00c72c9c3db60733883e8d0327521a10f716f0855d96cce6dc1004bf47d2d09f69c410f
data/.travis.yml CHANGED
@@ -1,15 +1,15 @@
1
1
  language: ruby
2
2
  cache: bundler
3
+ sudo: false
3
4
  rvm:
4
- - 2.1.2
5
- - 2.1.1
6
- - 2.1.0
7
- - 2.0.0
8
- - 1.9.3
5
+ - 2.2.0
6
+ - 2.1.5
7
+ - 2.0.0-p598
8
+ - 1.9.3-p551
9
9
  notifications:
10
10
  email: false
11
11
  irc:
12
- channels:
13
- - secure: PjzUG5NnDOWPrSxvWLqGb2Zn0kOG71fNutAKLhfMzsLsVLE7ofrk1hqtBovQNw4pq8cQSQmJPoyQ52PHytI3sr9UA3kOvKm1mpVUR6WuM3FQxxGSFoIdSrG8VxeMtmK1sWCmRZGLe7UPf2B0HhvoYmtWuPad5ko5QQHYpJKTHxo=
14
12
  template:
15
13
  - "%{repository}/%{branch}/%{build_number}: %{message} -- %{build_url}"
14
+ channels:
15
+ - irc.oftc.net#akerl
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ RSpec::Core::RakeTask.new(:spec)
7
7
 
8
8
  desc 'Run Rubocop on the gem'
9
9
  RuboCop::RakeTask.new(:rubocop) do |task|
10
- task.patterns = ['lib/**/*.rb', 'spec/**/*.rb']
10
+ task.patterns = ['lib/**/*.rb', 'spec/**/*.rb', 'dev/*.rb']
11
11
  task.fail_on_error = true
12
12
  end
13
13
 
data/dev/update_spec.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require 'httparty'
4
4
  require 'pp'
5
5
  require 'erb'
6
+ require 'active_support/ordered_hash'
6
7
 
7
8
  SPEC_PATH = 'lib/linodeapi/spec.rb'
8
9
 
@@ -15,37 +16,41 @@ module LinodeAPI
15
16
  <%= clean %>
16
17
  end
17
18
  '
19
+ # rubocop:enable all
18
20
 
19
21
  raw = HTTParty.get('https://api.linode.com/?api_action=api.spec').body
20
22
  raw = JSON.parse(raw)['DATA']['METHODS']
21
23
 
22
- spec = raw.reduce(Hash.new) do |acc, (method, info)|
24
+ spec = ActiveSupport::OrderedHash.new
25
+
26
+ raw.sort_by(&:first).each_with_object(spec) do |(method, info), acc|
23
27
  groups = method.split('.').map(&:to_sym)
24
28
  name = groups.pop
25
29
 
26
- params = info['PARAMETERS'].map do |k, v|
30
+ params = info['PARAMETERS'].sort_by(&:first).map do |k, v|
31
+ # rubocop:disable Style/MultilineOperationIndentation
27
32
  [
28
33
  k.downcase.to_sym,
29
- {
34
+ ActiveSupport::OrderedHash[
30
35
  desc: v['DESCRIPTION'],
31
36
  type: v['TYPE'].to_sym,
32
- required: v['REQUIRED'],
33
- }
37
+ required: v['REQUIRED']
38
+ ]
34
39
  ]
40
+ # rubocop:enable Style/MultilineOperationIndentation
35
41
  end
36
42
 
37
43
  local = groups.reduce(acc) do |layout, new|
38
44
  layout[new] ||= { type: :group, subs: {} }
39
45
  layout[new][:subs]
40
46
  end
47
+
41
48
  local[name] = {
42
49
  type: :call,
43
50
  desc: info['DESCRIPTION'],
44
51
  throws: info['THROWS'].split(','),
45
- params: Hash[params],
52
+ params: ActiveSupport::OrderedHash[params]
46
53
  }
47
-
48
- acc
49
54
  end
50
55
 
51
56
  clean = ''
data/lib/linodeapi/raw.rb CHANGED
@@ -45,18 +45,20 @@ module LinodeAPI
45
45
  end
46
46
 
47
47
  def make_group(method)
48
- options = {
48
+ group = Raw.new(
49
49
  spec: @spec[:subs][method],
50
50
  apikey: @apikey,
51
51
  username: @username,
52
52
  names: @names + [method]
53
- }
54
- instance_eval "def #{method}() @#{method} end"
55
- instance_variable_set "@#{method}".to_sym, Raw.new(options)
53
+ )
54
+ name = "@#{method}".to_sym
55
+ instance_variable_set name, group
56
+ define_singleton_method(method) { instance_variable_get(name) }
57
+ group
56
58
  end
57
59
 
58
60
  def make_call(method, *args)
59
- instance_eval "def #{method}(*args) call(:#{method}, *args) end"
61
+ define_singleton_method(method) { |*a| call(method, *a) }
60
62
  send(method, *args)
61
63
  end
62
64
 
@@ -96,6 +98,6 @@ module LinodeAPI
96
98
  VALIDATION_METHODS = {
97
99
  boolean: proc { |e| e == true },
98
100
  numeric: proc { |e| Integer(e) },
99
- string: proc { |e| e.to_s }
101
+ string: proc(&:to_s)
100
102
  }
101
103
  end
@@ -6,281 +6,551 @@ module LinodeAPI
6
6
  SPEC =
7
7
  {:type=>"group",
8
8
  :subs=>
9
- {:linode=>
9
+ {:account=>
10
10
  {:type=>:group,
11
11
  :subs=>
12
- {:list=>
12
+ {:estimateinvoice=>
13
13
  {:type=>:call,
14
14
  :desc=>
15
- "Returns a list of all Linodes user has access or delete to, including some properties",
16
- :throws=>[],
15
+ "Estimates the invoice for adding a new Linode or NodeBalancer as well as resizing a Linode. This returns two fields: PRICE which is the estimated cost of the invoice, and INVOICE_TO which is the date invoice would be though with timezone set to America/New_York",
16
+ :throws=>["VALIDATION"],
17
17
  :params=>
18
18
  {:linodeid=>
19
- {:desc=>"Limits the list to the specified LinodeID",
19
+ {:desc=>
20
+ "This is the LinodeID you want to resize and is required for mode 'linode_resize'.",
21
+ :type=>:numeric,
22
+ :required=>false},
23
+ :paymentterm=>
24
+ {:desc=>
25
+ "Subscription term in months. One of: 1, 12, or 24. This is required for modes 'linode_new' and 'nodebalancer_new'.",
26
+ :type=>:numeric,
27
+ :required=>false},
28
+ :planid=>
29
+ {:desc=>
30
+ "The desired PlanID available from avail.LinodePlans(). This is required for modes 'linode_new' and 'linode_resize'.",
31
+ :type=>:numeric,
32
+ :required=>false},
33
+ :mode=>
34
+ {:desc=>
35
+ "This is one of the following options: 'linode_new', 'linode_resize', or 'nodebalancer_new'.",
36
+ :type=>:string,
37
+ :required=>true}}},
38
+ :info=>
39
+ {:type=>:call,
40
+ :desc=>
41
+ "Shows information about your account such as the date your account was opened as well as your network utilization for the current month in gigabytes.",
42
+ :throws=>[],
43
+ :params=>{}},
44
+ :paybalance=>
45
+ {:type=>:call,
46
+ :desc=>"Pays current balance on file, returning it in the response.",
47
+ :throws=>
48
+ ["CCEXPIRED",
49
+ "CCFAILED",
50
+ "NOACCESS",
51
+ "PAYMENTLIMITER",
52
+ "VALIDATION"],
53
+ :params=>{}},
54
+ :updatecard=>
55
+ {:type=>:call,
56
+ :desc=>"",
57
+ :throws=>[],
58
+ :params=>
59
+ {:ccexpmonth=>{:desc=>"", :type=>:numeric, :required=>true},
60
+ :ccexpyear=>{:desc=>"", :type=>:numeric, :required=>true},
61
+ :ccnumber=>{:desc=>"", :type=>:numeric, :required=>true}}}}},
62
+ :api=>
63
+ {:type=>:group,
64
+ :subs=>
65
+ {:spec=>
66
+ {:type=>:call,
67
+ :desc=>
68
+ "Returns a data structure of the entire Linode API specification. This method does not require authorization.<br><br>For example: <a target=\"_blank\" href=\"https://api.linode.com/?api_action=api.spec\">https://api.linode.com/?api_action=api.spec</a>",
69
+ :throws=>[],
70
+ :params=>{}}}},
71
+ :avail=>
72
+ {:type=>:group,
73
+ :subs=>
74
+ {:datacenters=>
75
+ {:type=>:call,
76
+ :desc=>"Returns a list of Linode data center facilities.",
77
+ :throws=>[],
78
+ :params=>{}},
79
+ :distributions=>
80
+ {:type=>:call,
81
+ :desc=>"Returns a list of available Linux Distributions.",
82
+ :throws=>[],
83
+ :params=>
84
+ {:distributionid=>
85
+ {:desc=>"Limits the results to the specified DistributionID",
20
86
  :type=>:numeric,
21
87
  :required=>false}}},
22
- :disk=>
88
+ :kernels=>
89
+ {:type=>:call,
90
+ :desc=>"List available kernels.",
91
+ :throws=>[],
92
+ :params=>
93
+ {:kernelid=>{:desc=>"", :type=>:numeric, :required=>false},
94
+ :isxen=>
95
+ {:desc=>"Limits the results to show only Xen kernels",
96
+ :type=>:boolean,
97
+ :required=>false}}},
98
+ :linodeplans=>
99
+ {:type=>:call,
100
+ :desc=>
101
+ "Returns a structure of Linode PlanIDs containing the Plan label and the availability in each Datacenter.",
102
+ :throws=>[],
103
+ :params=>
104
+ {:planid=>
105
+ {:desc=>"Limits the list to the specified PlanID",
106
+ :type=>:numeric,
107
+ :required=>false}}},
108
+ :nodebalancers=>
109
+ {:type=>:call,
110
+ :desc=>"Returns NodeBalancer pricing information.",
111
+ :throws=>[],
112
+ :params=>{}},
113
+ :stackscripts=>
114
+ {:type=>:call,
115
+ :desc=>"Returns a list of available public StackScripts.",
116
+ :throws=>[],
117
+ :params=>
118
+ {:distributionid=>
119
+ {:desc=>
120
+ "Limit the results to StackScripts that can be applied to this DistributionID",
121
+ :type=>:numeric,
122
+ :required=>false},
123
+ :distributionvendor=>
124
+ {:desc=>"Debian, Ubuntu, Fedora, etc.",
125
+ :type=>:string,
126
+ :required=>false},
127
+ :keywords=>
128
+ {:desc=>"Search terms", :type=>:string, :required=>false}}}}},
129
+ :domain=>
130
+ {:type=>:group,
131
+ :subs=>
132
+ {:create=>
133
+ {:type=>:call,
134
+ :desc=>"Create a domain record.",
135
+ :throws=>["NOACCESS", "VALIDATION"],
136
+ :params=>
137
+ {:description=>
138
+ {:desc=>"Currently undisplayed.",
139
+ :type=>:string,
140
+ :required=>false},
141
+ :domain=>
142
+ {:desc=>"The zone's name", :type=>:string, :required=>true},
143
+ :expire_sec=>{:desc=>"", :type=>:numeric, :required=>false},
144
+ :refresh_sec=>{:desc=>"", :type=>:numeric, :required=>false},
145
+ :retry_sec=>{:desc=>"", :type=>:numeric, :required=>false},
146
+ :soa_email=>
147
+ {:desc=>"Required when type=master",
148
+ :type=>:string,
149
+ :required=>false},
150
+ :ttl_sec=>{:desc=>"", :type=>:numeric, :required=>false},
151
+ :type=>{:desc=>"master or slave", :type=>:string, :required=>true},
152
+ :axfr_ips=>
153
+ {:desc=>
154
+ "IP addresses allowed to AXFR the entire zone, semicolon separated",
155
+ :type=>:string,
156
+ :required=>false},
157
+ :lpm_displaygroup=>
158
+ {:desc=>
159
+ "Display group in the Domain list inside the Linode DNS Manager",
160
+ :type=>:string,
161
+ :required=>false},
162
+ :master_ips=>
163
+ {:desc=>
164
+ "When type=slave, the zone's master DNS servers list, semicolon separated ",
165
+ :type=>:string,
166
+ :required=>false},
167
+ :status=>
168
+ {:desc=>"0, 1, or 2 (disabled, active, edit mode)",
169
+ :type=>:numeric,
170
+ :required=>false}}},
171
+ :delete=>
172
+ {:type=>:call,
173
+ :desc=>"",
174
+ :throws=>["NOTFOUND"],
175
+ :params=>{:domainid=>{:desc=>"", :type=>:numeric, :required=>true}}},
176
+ :list=>
177
+ {:type=>:call,
178
+ :desc=>"Lists domains you have access to.",
179
+ :throws=>[],
180
+ :params=>
181
+ {:domainid=>
182
+ {:desc=>"Limits the list to the specified DomainID",
183
+ :type=>:numeric,
184
+ :required=>false}}},
185
+ :resource=>
23
186
  {:type=>:group,
24
187
  :subs=>
25
- {:delete=>
26
- {:type=>:call,
27
- :desc=>"",
28
- :throws=>["NOTFOUND", "VALIDATION"],
29
- :params=>
30
- {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
31
- :diskid=>{:desc=>"", :type=>:numeric, :required=>true}}},
32
- :update=>
33
- {:type=>:call,
34
- :desc=>"",
35
- :throws=>["NOTFOUND", "VALIDATION"],
36
- :params=>
37
- {:label=>
38
- {:desc=>"The display label for this Disk",
39
- :type=>:string,
40
- :required=>false},
41
- :isreadonly=>
42
- {:desc=>"Enable forced read-only for this Disk",
43
- :type=>:boolean,
44
- :required=>false},
45
- :linodeid=>{:desc=>"", :type=>:numeric, :required=>false},
46
- :diskid=>{:desc=>"", :type=>:numeric, :required=>true}}},
47
- :imagize=>
188
+ {:create=>
48
189
  {:type=>:call,
49
- :desc=>"Creates a gold-master image for future deployments",
50
- :throws=>[],
190
+ :desc=>"Create a domain record.",
191
+ :throws=>["NOACCESS", "VALIDATION"],
51
192
  :params=>
52
- {:label=>
193
+ {:domainid=>{:desc=>"", :type=>:numeric, :required=>true},
194
+ :name=>
53
195
  {:desc=>
54
- "Sets the name of the image shown in the base image list, defaults to the source image label",
55
- :type=>:string,
56
- :required=>false},
57
- :description=>
58
- {:desc=>"An optional description of the created image",
196
+ "The hostname or FQDN. When Type=MX the subdomain to delegate to the Target MX server.",
59
197
  :type=>:string,
60
198
  :required=>false},
61
- :linodeid=>
62
- {:desc=>"Specifies the source Linode to create the image from",
63
- :type=>:numeric,
64
- :required=>true},
65
- :diskid=>
66
- {:desc=>"Specifies the source Disk to create the image from",
199
+ :port=>{:desc=>"", :type=>:numeric, :required=>false},
200
+ :priority=>
201
+ {:desc=>"Priority for MX and SRV records, 0-255",
67
202
  :type=>:numeric,
68
- :required=>true}}},
69
- :createfromimage=>
70
- {:type=>:call,
71
- :desc=>"Creates a new disk from a previously imagized disk.",
72
- :throws=>[],
73
- :params=>
74
- {:rootsshkey=>
203
+ :required=>false},
204
+ :protocol=>
75
205
  {:desc=>
76
- "Optionally sets this string into /root/.ssh/authorized_keys upon image deployment",
206
+ "The protocol to append to an SRV record. Ignored on other record types.",
77
207
  :type=>:string,
78
208
  :required=>false},
79
- :size=>
80
- {:desc=>
81
- "The size of the disk image to creates. Defaults to the minimum size required for the requested image",
209
+ :ttl_sec=>
210
+ {:desc=>"TTL. Leave as 0 to accept our default.",
82
211
  :type=>:numeric,
83
212
  :required=>false},
84
- :linodeid=>
85
- {:desc=>"Specifies the Linode to deploy on to",
86
- :type=>:numeric,
87
- :required=>true},
88
- :rootpass=>
213
+ :target=>
89
214
  {:desc=>
90
- "Optionally sets the root password at deployment time. If a password is not provided the existing root password of the frozen image will not be modified",
215
+ "When Type=MX the hostname. When Type=CNAME the target of the alias. When Type=TXT the value of the record. \n\t\tWhen Type=A or AAAA the token of '[remote_addr]' will be substituted with the IP address of the request.",
91
216
  :type=>:string,
92
217
  :required=>false},
93
- :imageid=>
94
- {:desc=>"The ID of the frozen image to deploy from",
95
- :type=>:numeric,
96
- :required=>true}}},
97
- :create=>
98
- {:type=>:call,
99
- :desc=>"",
100
- :throws=>["NOTFOUND", "VALIDATION"],
101
- :params=>
102
- {:isreadonly=>
103
- {:desc=>"Enable forced read-only for this Disk",
104
- :type=>:boolean,
105
- :required=>false},
106
- :rootpass=>{:desc=>"", :type=>:string, :required=>false},
107
- :label=>
108
- {:desc=>"The display label for this Disk",
109
- :type=>:string,
110
- :required=>true},
111
- :rootsshkey=>{:desc=>"", :type=>:string, :required=>false},
112
- :fromdistributionid=>
113
- {:desc=>"", :type=>:numeric, :required=>false},
114
- :size=>
115
- {:desc=>"The size in MB of this Disk.",
116
- :type=>:numeric,
117
- :required=>true},
118
- :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
119
218
  :type=>
120
- {:desc=>
121
- "The formatted type of this disk. Valid types are: ext3, ext4, swap, raw",
219
+ {:desc=>"One of: NS, MX, A, AAAA, CNAME, TXT, or SRV",
122
220
  :type=>:string,
123
- :required=>true}}},
124
- :createfromstackscript=>
221
+ :required=>true},
222
+ :weight=>{:desc=>"", :type=>:numeric, :required=>false}}},
223
+ :delete=>
125
224
  {:type=>:call,
126
225
  :desc=>"",
127
- :throws=>["NOTFOUND", "VALIDATION"],
226
+ :throws=>["NOTFOUND"],
128
227
  :params=>
129
- {:stackscriptudfresponses=>
130
- {:desc=>
131
- "JSON encoded name/value pairs, answering this StackScript's User Defined Fields",
132
- :type=>:string,
133
- :required=>true},
134
- :distributionid=>
135
- {:desc=>
136
- "Which Distribution to apply this StackScript to. Must be one from the script's DistributionIDList",
137
- :type=>:numeric,
138
- :required=>true},
139
- :rootpass=>
140
- {:desc=>"The root user's password",
141
- :type=>:string,
142
- :required=>true},
143
- :rootsshkey=>
144
- {:desc=>
145
- "Optionally sets this string into /root/.ssh/authorized_keys upon distribution configuration.",
146
- :type=>:string,
147
- :required=>false},
148
- :label=>
149
- {:desc=>"The label of this new disk image",
150
- :type=>:string,
151
- :required=>true},
152
- :size=>
153
- {:desc=>"Size of this disk image in MB",
154
- :type=>:numeric,
155
- :required=>true},
156
- :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
157
- :stackscriptid=>
158
- {:desc=>"The StackScript to create this image from",
159
- :type=>:numeric,
160
- :required=>true}}},
228
+ {:domainid=>{:desc=>"", :type=>:numeric, :required=>true},
229
+ :resourceid=>{:desc=>"", :type=>:numeric, :required=>true}}},
161
230
  :list=>
162
231
  {:type=>:call,
163
232
  :desc=>"",
164
233
  :throws=>[],
165
234
  :params=>
166
- {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
167
- :diskid=>{:desc=>"", :type=>:numeric, :required=>false}}},
168
- :createfromdistribution=>
235
+ {:domainid=>{:desc=>"", :type=>:numeric, :required=>true},
236
+ :resourceid=>{:desc=>"", :type=>:numeric, :required=>false}}},
237
+ :update=>
169
238
  {:type=>:call,
170
- :desc=>"",
239
+ :desc=>"Update a domain record.",
171
240
  :throws=>["NOTFOUND", "VALIDATION"],
172
241
  :params=>
173
- {:label=>
174
- {:desc=>"The label of this new disk image",
175
- :type=>:string,
176
- :required=>true},
177
- :rootsshkey=>
242
+ {:domainid=>{:desc=>"", :type=>:numeric, :required=>false},
243
+ :name=>
178
244
  {:desc=>
179
- "Optionally sets this string into /root/.ssh/authorized_keys upon distribution configuration.",
245
+ "The hostname or FQDN. When Type=MX the subdomain to delegate to the Target MX server.",
180
246
  :type=>:string,
181
247
  :required=>false},
182
- :size=>
183
- {:desc=>"Size of this disk image in MB",
248
+ :port=>{:desc=>"", :type=>:numeric, :required=>false},
249
+ :priority=>
250
+ {:desc=>"Priority for MX and SRV records, 0-255",
184
251
  :type=>:numeric,
185
- :required=>true},
186
- :distributionid=>
252
+ :required=>false},
253
+ :protocol=>
187
254
  {:desc=>
188
- "The DistributionID to create this disk from. Found in avail.distributions()",
255
+ "The protocol to append to an SRV record. Ignored on other record types.",
256
+ :type=>:string,
257
+ :required=>false},
258
+ :resourceid=>{:desc=>"", :type=>:numeric, :required=>true},
259
+ :ttl_sec=>
260
+ {:desc=>"TTL. Leave as 0 to accept our default.",
189
261
  :type=>:numeric,
190
- :required=>true},
191
- :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
192
- :rootpass=>
193
- {:desc=>"The root user's password",
262
+ :required=>false},
263
+ :target=>
264
+ {:desc=>
265
+ "When Type=MX the hostname. When Type=CNAME the target of the alias. When Type=TXT the value of the record. \n\t\tWhen Type=A or AAAA the token of '[remote_addr]' will be substituted with the IP address of the request.",
194
266
  :type=>:string,
195
- :required=>true}}},
196
- :duplicate=>
197
- {:type=>:call,
198
- :desc=>"Performs a bit-for-bit copy of a disk image.",
199
- :throws=>["NOTFOUND", "VALIDATION"],
200
- :params=>
201
- {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
202
- :diskid=>{:desc=>"", :type=>:numeric, :required=>true}}},
203
- :resize=>
267
+ :required=>false},
268
+ :weight=>{:desc=>"", :type=>:numeric, :required=>false}}}}},
269
+ :update=>
270
+ {:type=>:call,
271
+ :desc=>"Update a domain record.",
272
+ :throws=>["NOTFOUND", "VALIDATION"],
273
+ :params=>
274
+ {:description=>
275
+ {:desc=>"Currently undisplayed.",
276
+ :type=>:string,
277
+ :required=>false},
278
+ :domain=>
279
+ {:desc=>"The zone's name", :type=>:string, :required=>false},
280
+ :domainid=>{:desc=>"", :type=>:numeric, :required=>true},
281
+ :expire_sec=>{:desc=>"", :type=>:numeric, :required=>false},
282
+ :refresh_sec=>{:desc=>"", :type=>:numeric, :required=>false},
283
+ :retry_sec=>{:desc=>"", :type=>:numeric, :required=>false},
284
+ :soa_email=>
285
+ {:desc=>"Required when type=master",
286
+ :type=>:string,
287
+ :required=>false},
288
+ :ttl_sec=>{:desc=>"", :type=>:numeric, :required=>false},
289
+ :type=>{:desc=>"master or slave", :type=>:string, :required=>false},
290
+ :axfr_ips=>
291
+ {:desc=>
292
+ "IP addresses allowed to AXFR the entire zone, semicolon separated",
293
+ :type=>:string,
294
+ :required=>false},
295
+ :lpm_displaygroup=>
296
+ {:desc=>
297
+ "Display group in the Domain list inside the Linode DNS Manager",
298
+ :type=>:string,
299
+ :required=>false},
300
+ :master_ips=>
301
+ {:desc=>
302
+ "When type=slave, the zone's master DNS servers list, semicolon separated ",
303
+ :type=>:string,
304
+ :required=>false},
305
+ :status=>
306
+ {:desc=>"0, 1, or 2 (disabled, active, edit mode)",
307
+ :type=>:numeric,
308
+ :required=>false}}}}},
309
+ :image=>
310
+ {:type=>:group,
311
+ :subs=>
312
+ {:delete=>
313
+ {:type=>:call,
314
+ :desc=>"Deletes a gold-master image",
315
+ :throws=>["NOTFOUND"],
316
+ :params=>
317
+ {:imageid=>
318
+ {:desc=>"The ID of the gold-master image to delete",
319
+ :type=>:numeric,
320
+ :required=>true}}},
321
+ :list=>
322
+ {:type=>:call,
323
+ :desc=>"Lists available gold-master images",
324
+ :throws=>["NOTFOUND"],
325
+ :params=>
326
+ {:imageid=>
327
+ {:desc=>"Request information for a specific gold-master image",
328
+ :type=>:numeric,
329
+ :required=>false},
330
+ :pending=>
331
+ {:desc=>"Show images currently being created.",
332
+ :type=>:numeric,
333
+ :required=>false}}},
334
+ :update=>
335
+ {:type=>:call,
336
+ :desc=>"Update an Image record.",
337
+ :throws=>["NOTFOUND", "VALIDATION"],
338
+ :params=>
339
+ {:imageid=>
340
+ {:desc=>"The ID of the Image to modify.",
341
+ :type=>:numeric,
342
+ :required=>true},
343
+ :description=>
344
+ {:desc=>"An optional description of the Image.",
345
+ :type=>:string,
346
+ :required=>false},
347
+ :label=>
348
+ {:desc=>"The label of the Image.",
349
+ :type=>:string,
350
+ :required=>false}}}}},
351
+ :linode=>
352
+ {:type=>:group,
353
+ :subs=>
354
+ {:boot=>
355
+ {:type=>:call,
356
+ :desc=>
357
+ "Issues a boot job for the provided ConfigID. If no ConfigID is provided boots the last used configuration profile, or the first configuration profile if this Linode has never been booted.",
358
+ :throws=>["NOTFOUND"],
359
+ :params=>
360
+ {:configid=>
361
+ {:desc=>
362
+ "The ConfigID to boot, available from linode.config.list().",
363
+ :type=>:numeric,
364
+ :required=>false},
365
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
366
+ :clone=>
367
+ {:type=>:call,
368
+ :desc=>
369
+ "Creates a new Linode, assigns you full privileges, and then clones the specified LinodeID to the new Linode. There is a limit of 5 active clone operations per source Linode. It is recommended that the source Linode be powered down during the clone.",
370
+ :throws=>
371
+ ["NOACCESS",
372
+ "NOTFOUND",
373
+ "CCFAILED",
374
+ "VALIDATION",
375
+ "LINODELIMITER",
376
+ "ACCOUNTLIMIT"],
377
+ :params=>
378
+ {:datacenterid=>
379
+ {:desc=>
380
+ "The DatacenterID from avail.datacenters() where you wish to place this new Linode",
381
+ :type=>:numeric,
382
+ :required=>true},
383
+ :linodeid=>
384
+ {:desc=>"The LinodeID that you want cloned",
385
+ :type=>:numeric,
386
+ :required=>true},
387
+ :paymentterm=>
388
+ {:desc=>
389
+ "Subscription term in months for prepaid customers. One of: 1, 12, or 24",
390
+ :type=>:numeric,
391
+ :required=>false},
392
+ :planid=>
393
+ {:desc=>"The desired PlanID available from avail.LinodePlans()",
394
+ :type=>:numeric,
395
+ :required=>true}}},
396
+ :config=>
397
+ {:type=>:group,
398
+ :subs=>
399
+ {:create=>
204
400
  {:type=>:call,
205
- :desc=>"",
401
+ :desc=>"Creates a Linode Configuration Profile.",
206
402
  :throws=>["NOTFOUND", "VALIDATION"],
207
403
  :params=>
208
- {:size=>
209
- {:desc=>"The requested new size of this Disk in MB",
404
+ {:comments=>
405
+ {:desc=>"Comments you wish to save along with this profile",
406
+ :type=>:string,
407
+ :required=>false},
408
+ :disklist=>
409
+ {:desc=>
410
+ "A comma delimited list of DiskIDs; position reflects device node. The 9th element for specifying the initrd.",
411
+ :type=>:string,
412
+ :required=>false},
413
+ :kernelid=>
414
+ {:desc=>
415
+ "The KernelID for this profile. Found in avail.kernels()",
210
416
  :type=>:numeric,
211
417
  :required=>true},
418
+ :label=>
419
+ {:desc=>"The Label for this profile",
420
+ :type=>:string,
421
+ :required=>true},
212
422
  :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
213
- :diskid=>{:desc=>"", :type=>:numeric, :required=>true}}}}},
214
- :webconsoletoken=>
215
- {:type=>:call,
216
- :desc=>
217
- "Generates a console token starting a web console LISH session for the requesting IP",
218
- :throws=>["NOTFOUND", "VALIDATION"],
219
- :params=>{:linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
220
- :ip=>
221
- {:type=>:group,
222
- :subs=>
223
- {:addpublic=>
224
- {:type=>:call,
225
- :desc=>
226
- "Assigns a Public IP to a Linode. Returns the IPAddressID and IPAddress that was added.",
227
- :throws=>["NOTFOUND", "VALIDATION"],
228
- :params=>
229
- {:linodeid=>
423
+ :ramlimit=>
424
+ {:desc=>"RAMLimit in MB. 0 for max.",
425
+ :type=>:numeric,
426
+ :required=>false},
427
+ :rootdevicecustom=>
428
+ {:desc=>"A custom root device setting.",
429
+ :type=>:string,
430
+ :required=>false},
431
+ :rootdevicenum=>
230
432
  {:desc=>
231
- "The LinodeID of the Linode that will be assigned an additional public IP address",
433
+ "Which device number (1-8) that contains the root partition. 0 to utilize RootDeviceCustom.",
232
434
  :type=>:numeric,
233
- :required=>true}}},
234
- :setrdns=>
435
+ :required=>false},
436
+ :rootdevicero=>
437
+ {:desc=>
438
+ "Enables the 'ro' kernel flag. Modern distros want this. ",
439
+ :type=>:boolean,
440
+ :required=>false},
441
+ :runlevel=>
442
+ {:desc=>"One of 'default', 'single', 'binbash' ",
443
+ :type=>:string,
444
+ :required=>false},
445
+ :devtmpfs_automount=>
446
+ {:desc=>
447
+ "Controls if pv_ops kernels should automount devtmpfs at boot. ",
448
+ :type=>:boolean,
449
+ :required=>false},
450
+ :helper_depmod=>
451
+ {:desc=>
452
+ "Creates an empty modprobe file for the kernel you're booting. ",
453
+ :type=>:boolean,
454
+ :required=>false},
455
+ :helper_disableupdatedb=>
456
+ {:desc=>"Enable the disableUpdateDB filesystem helper",
457
+ :type=>:boolean,
458
+ :required=>false},
459
+ :helper_network=>
460
+ {:desc=>
461
+ "Automatically creates network configuration files for your distro and places them into your filesystem.",
462
+ :type=>:boolean,
463
+ :required=>false},
464
+ :helper_xen=>
465
+ {:desc=>
466
+ "Enable the Xen filesystem helper. Corrects fstab and inittab/upstart entries depending on the kernel you're booting. You want this.",
467
+ :type=>:boolean,
468
+ :required=>false}}},
469
+ :delete=>
235
470
  {:type=>:call,
236
- :desc=>
237
- "Sets the rDNS name of a Public IP. Returns the IPAddressID and IPAddress that were updated.",
471
+ :desc=>"Deletes a Linode Configuration Profile.",
238
472
  :throws=>["NOTFOUND", "VALIDATION"],
239
473
  :params=>
240
- {:hostname=>
241
- {:desc=>"The hostname to set the reverse DNS to",
242
- :type=>:string,
243
- :required=>true},
244
- :ipaddressid=>
245
- {:desc=>"The IPAddressID of the address to update",
246
- :type=>:numeric,
247
- :required=>true}}},
474
+ {:configid=>{:desc=>"", :type=>:numeric, :required=>true},
475
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
248
476
  :list=>
249
477
  {:type=>:call,
250
- :desc=>"Lists a Linode's IP addresses.",
478
+ :desc=>"Lists a Linode's Configuration Profiles.",
251
479
  :throws=>["NOTFOUND"],
252
480
  :params=>
253
- {:ipaddressid=>
254
- {:desc=>"If specified, limits the result to this IPAddressID",
255
- :type=>:numeric,
256
- :required=>false},
481
+ {:configid=>{:desc=>"", :type=>:numeric, :required=>false},
257
482
  :linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
258
- :swap=>
483
+ :update=>
259
484
  {:type=>:call,
260
- :desc=>
261
- "Exchanges Public IP addresses between two Linodes within a Datacenter. The destination of the IP Address can be designated by either the toLinodeID or withIPAddressID parameter. Returns the resulting relationship of the Linode and IP Address parameters. When performing a one directional swap, the source is represented by the first of the two resultant array members.",
485
+ :desc=>"Updates a Linode Configuration Profile.",
262
486
  :throws=>["NOTFOUND", "VALIDATION"],
263
487
  :params=>
264
- {:tolinodeid=>
488
+ {:comments=>
489
+ {:desc=>"Comments you wish to save along with this profile",
490
+ :type=>:string,
491
+ :required=>false},
492
+ :configid=>{:desc=>"", :type=>:numeric, :required=>true},
493
+ :disklist=>
265
494
  {:desc=>
266
- "The LinodeID of the Linode where IPAddressID will be transfered",
495
+ "A comma delimited list of DiskIDs; position reflects device node. The 9th element for specifying the initrd.",
496
+ :type=>:string,
497
+ :required=>false},
498
+ :kernelid=>
499
+ {:desc=>
500
+ "The KernelID for this profile. Found in avail.kernels()",
267
501
  :type=>:numeric,
268
502
  :required=>false},
269
- :ipaddressid=>
270
- {:desc=>"The IPAddressID of an IP Address to transfer or swap",
503
+ :label=>
504
+ {:desc=>"The Label for this profile",
505
+ :type=>:string,
506
+ :required=>false},
507
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>false},
508
+ :ramlimit=>
509
+ {:desc=>"RAMLimit in MB. 0 for max.",
271
510
  :type=>:numeric,
272
- :required=>true},
273
- :withipaddressid=>
274
- {:desc=>"The IP Address ID to swap",
511
+ :required=>false},
512
+ :rootdevicecustom=>
513
+ {:desc=>"A custom root device setting.",
514
+ :type=>:string,
515
+ :required=>false},
516
+ :rootdevicenum=>
517
+ {:desc=>
518
+ "Which device number (1-8) that contains the root partition. 0 to utilize RootDeviceCustom.",
275
519
  :type=>:numeric,
276
- :required=>false}}},
277
- :addprivate=>
278
- {:type=>:call,
279
- :desc=>
280
- "Assigns a Private IP to a Linode. Returns the IPAddressID that was added.",
281
- :throws=>["NOTFOUND"],
282
- :params=>
283
- {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}}}},
520
+ :required=>false},
521
+ :rootdevicero=>
522
+ {:desc=>
523
+ "Enables the 'ro' kernel flag. Modern distros want this. ",
524
+ :type=>:boolean,
525
+ :required=>false},
526
+ :runlevel=>
527
+ {:desc=>"One of 'default', 'single', 'binbash' ",
528
+ :type=>:string,
529
+ :required=>false},
530
+ :devtmpfs_automount=>
531
+ {:desc=>
532
+ "Controls if pv_ops kernels should automount devtmpfs at boot. ",
533
+ :type=>:boolean,
534
+ :required=>false},
535
+ :helper_depmod=>
536
+ {:desc=>
537
+ "Creates an empty modprobe file for the kernel you're booting. ",
538
+ :type=>:boolean,
539
+ :required=>false},
540
+ :helper_disableupdatedb=>
541
+ {:desc=>"Enable the disableUpdateDB filesystem helper",
542
+ :type=>:boolean,
543
+ :required=>false},
544
+ :helper_network=>
545
+ {:desc=>
546
+ "Automatically creates network configuration files for your distro and places them into your filesystem.",
547
+ :type=>:boolean,
548
+ :required=>false},
549
+ :helper_xen=>
550
+ {:desc=>
551
+ "Enable the Xen filesystem helper. Corrects fstab and inittab/upstart entries depending on the kernel you're booting. You want this.",
552
+ :type=>:boolean,
553
+ :required=>false}}}}},
284
554
  :create=>
285
555
  {:type=>:call,
286
556
  :desc=>
@@ -292,105 +562,18 @@ module LinodeAPI
292
562
  "LINODELIMITER",
293
563
  "ACCOUNTLIMIT"],
294
564
  :params=>
295
- {:planid=>
296
- {:desc=>"The desired PlanID available from avail.LinodePlans()",
297
- :type=>:numeric,
298
- :required=>true},
299
- :datacenterid=>
565
+ {:datacenterid=>
300
566
  {:desc=>
301
567
  "The DatacenterID from avail.datacenters() where you wish to place this new Linode",
302
568
  :type=>:numeric,
303
569
  :required=>true},
304
570
  :paymentterm=>
305
- {:desc=>
306
- "Subscription term in months for prepaid customers. One of: 1, 12, or 24",
307
- :type=>:numeric,
308
- :required=>false}}},
309
- :update=>
310
- {:type=>:call,
311
- :desc=>"Updates a Linode's properties.",
312
- :throws=>["NOTFOUND", "VALIDATION"],
313
- :params=>
314
- {:alert_cpu_enabled=>
315
- {:desc=>"Enable the cpu usage email alert",
316
- :type=>:boolean,
317
- :required=>false},
318
- :ms_ssh_user=>{:desc=>"", :type=>:string, :required=>false},
319
- :alert_bwin_enabled=>
320
- {:desc=>"Enable the incoming bandwidth email alert",
321
- :type=>:boolean,
322
- :required=>false},
323
- :alert_cpu_threshold=>
324
- {:desc=>"CPU Alert threshold, percentage 0-800",
325
- :type=>:numeric,
326
- :required=>false},
327
- :alert_bwquota_enabled=>
328
- {:desc=>"Enable the bw quote email alert",
329
- :type=>:boolean,
330
- :required=>false},
331
- :alert_diskio_threshold=>
332
- {:desc=>"IO ops/sec", :type=>:numeric, :required=>false},
333
- :label=>
334
- {:desc=>"This Linode's label", :type=>:string, :required=>false},
335
- :backupwindow=>{:desc=>"", :type=>:numeric, :required=>false},
336
- :backupweeklyday=>{:desc=>"", :type=>:numeric, :required=>false},
337
- :watchdog=>
338
- {:desc=>"Enable the Lassie shutdown watchdog",
339
- :type=>:boolean,
340
- :required=>false},
341
- :alert_diskio_enabled=>
342
- {:desc=>"Enable the disk IO email alert",
343
- :type=>:boolean,
344
- :required=>false},
345
- :lpm_displaygroup=>
346
- {:desc=>
347
- "Display group in the Linode list inside the Linode Manager",
348
- :type=>:string,
349
- :required=>false},
350
- :ms_ssh_port=>{:desc=>"", :type=>:numeric, :required=>false},
351
- :ms_ssh_disabled=>{:desc=>"", :type=>:boolean, :required=>false},
352
- :alert_bwquota_threshold=>
353
- {:desc=>"Percentage of monthly bw quota",
354
- :type=>:numeric,
355
- :required=>false},
356
- :ms_ssh_ip=>{:desc=>"", :type=>:string, :required=>false},
357
- :alert_bwin_threshold=>
358
- {:desc=>"Mb/sec", :type=>:numeric, :required=>false},
359
- :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
360
- :alert_bwout_threshold=>
361
- {:desc=>"Mb/sec", :type=>:numeric, :required=>false},
362
- :alert_bwout_enabled=>
363
- {:desc=>"Enable the outgoing bandwidth email alert",
364
- :type=>:boolean,
365
- :required=>false}}},
366
- :clone=>
367
- {:type=>:call,
368
- :desc=>
369
- "Creates a new Linode, assigns you full privileges, and then clones the specified LinodeID to the new Linode. There is a limit of 5 active clone operations per source Linode. It is recommended that the source Linode be powered down during the clone.",
370
- :throws=>
371
- ["NOACCESS",
372
- "NOTFOUND",
373
- "CCFAILED",
374
- "VALIDATION",
375
- "LINODELIMITER",
376
- "ACCOUNTLIMIT"],
377
- :params=>
378
- {:paymentterm=>
379
571
  {:desc=>
380
572
  "Subscription term in months for prepaid customers. One of: 1, 12, or 24",
381
573
  :type=>:numeric,
382
574
  :required=>false},
383
- :datacenterid=>
384
- {:desc=>
385
- "The DatacenterID from avail.datacenters() where you wish to place this new Linode",
386
- :type=>:numeric,
387
- :required=>true},
388
575
  :planid=>
389
576
  {:desc=>"The desired PlanID available from avail.LinodePlans()",
390
- :type=>:numeric,
391
- :required=>true},
392
- :linodeid=>
393
- {:desc=>"The LinodeID that you want cloned",
394
577
  :type=>:numeric,
395
578
  :required=>true}}},
396
579
  :delete=>
@@ -408,172 +591,270 @@ module LinodeAPI
408
591
  "Skips the safety checks and will always delete the Linode",
409
592
  :type=>:boolean,
410
593
  :required=>false}}},
411
- :reboot=>
412
- {:type=>:call,
413
- :desc=>"Issues a shutdown, and then boot job for a given LinodeID.",
414
- :throws=>["NOTFOUND"],
415
- :params=>
416
- {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
417
- :configid=>{:desc=>"", :type=>:numeric, :required=>false}}},
418
- :config=>
594
+ :disk=>
419
595
  {:type=>:group,
420
- :subs=>
421
- {:list=>
422
- {:type=>:call,
423
- :desc=>"Lists a Linode's Configuration Profiles.",
424
- :throws=>["NOTFOUND"],
425
- :params=>
426
- {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
427
- :configid=>{:desc=>"", :type=>:numeric, :required=>false}}},
428
- :delete=>
596
+ :subs=>
597
+ {:create=>
429
598
  {:type=>:call,
430
- :desc=>"Deletes a Linode Configuration Profile.",
599
+ :desc=>"",
431
600
  :throws=>["NOTFOUND", "VALIDATION"],
432
601
  :params=>
433
- {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
434
- :configid=>{:desc=>"", :type=>:numeric, :required=>true}}},
435
- :update=>
602
+ {:fromdistributionid=>
603
+ {:desc=>"", :type=>:numeric, :required=>false},
604
+ :label=>
605
+ {:desc=>"The display label for this Disk",
606
+ :type=>:string,
607
+ :required=>true},
608
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
609
+ :size=>
610
+ {:desc=>"The size in MB of this Disk.",
611
+ :type=>:numeric,
612
+ :required=>true},
613
+ :type=>
614
+ {:desc=>
615
+ "The formatted type of this disk. Valid types are: ext3, ext4, swap, raw",
616
+ :type=>:string,
617
+ :required=>true},
618
+ :isreadonly=>
619
+ {:desc=>"Enable forced read-only for this Disk",
620
+ :type=>:boolean,
621
+ :required=>false},
622
+ :rootpass=>{:desc=>"", :type=>:string, :required=>false},
623
+ :rootsshkey=>{:desc=>"", :type=>:string, :required=>false}}},
624
+ :createfromdistribution=>
436
625
  {:type=>:call,
437
- :desc=>"Updates a Linode Configuration Profile.",
626
+ :desc=>"",
438
627
  :throws=>["NOTFOUND", "VALIDATION"],
439
628
  :params=>
440
- {:rootdevicecustom=>
441
- {:desc=>"A custom root device setting.",
629
+ {:distributionid=>
630
+ {:desc=>
631
+ "The DistributionID to create this disk from. Found in avail.distributions()",
632
+ :type=>:numeric,
633
+ :required=>true},
634
+ :label=>
635
+ {:desc=>"The label of this new disk image",
442
636
  :type=>:string,
443
- :required=>false},
444
- :comments=>
445
- {:desc=>"Comments you wish to save along with this profile",
637
+ :required=>true},
638
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
639
+ :size=>
640
+ {:desc=>"Size of this disk image in MB",
641
+ :type=>:numeric,
642
+ :required=>true},
643
+ :rootpass=>
644
+ {:desc=>"The root user's password",
446
645
  :type=>:string,
447
- :required=>false},
448
- :devtmpfs_automount=>
646
+ :required=>true},
647
+ :rootsshkey=>
449
648
  {:desc=>
450
- "Controls if pv_ops kernels should automount devtmpfs at boot. ",
451
- :type=>:boolean,
452
- :required=>false},
649
+ "Optionally sets this string into /root/.ssh/authorized_keys upon distribution configuration.",
650
+ :type=>:string,
651
+ :required=>false}}},
652
+ :createfromimage=>
653
+ {:type=>:call,
654
+ :desc=>"Creates a new disk from a previously imagized disk.",
655
+ :throws=>[],
656
+ :params=>
657
+ {:imageid=>
658
+ {:desc=>"The ID of the frozen image to deploy from",
659
+ :type=>:numeric,
660
+ :required=>true},
453
661
  :label=>
454
- {:desc=>"The Label for this profile",
662
+ {:desc=>"The label of this new disk image",
455
663
  :type=>:string,
456
664
  :required=>false},
457
- :helper_disableupdatedb=>
458
- {:desc=>"Enable the disableUpdateDB filesystem helper",
459
- :type=>:boolean,
460
- :required=>false},
461
- :configid=>{:desc=>"", :type=>:numeric, :required=>true},
462
- :disklist=>
665
+ :linodeid=>
666
+ {:desc=>"Specifies the Linode to deploy on to",
667
+ :type=>:numeric,
668
+ :required=>true},
669
+ :rootpass=>
463
670
  {:desc=>
464
- "A comma delimited list of DiskIDs; position reflects device node. The 9th element for specifying the initrd.",
465
- :type=>:string,
466
- :required=>false},
467
- :runlevel=>
468
- {:desc=>"One of 'default', 'single', 'binbash' ",
671
+ "Optionally sets the root password at deployment time. If a password is not provided the existing root password of the frozen image will not be modified",
469
672
  :type=>:string,
470
673
  :required=>false},
471
- :rootdevicero=>
674
+ :rootsshkey=>
472
675
  {:desc=>
473
- "Enables the 'ro' kernel flag. Modern distros want this. ",
474
- :type=>:boolean,
676
+ "Optionally sets this string into /root/.ssh/authorized_keys upon image deployment",
677
+ :type=>:string,
475
678
  :required=>false},
476
- :rootdevicenum=>
679
+ :size=>
477
680
  {:desc=>
478
- "Which device number (1-8) that contains the root partition. 0 to utilize RootDeviceCustom.",
681
+ "The size of the disk image to creates. Defaults to the minimum size required for the requested image",
479
682
  :type=>:numeric,
480
- :required=>false},
481
- :helper_xen=>
683
+ :required=>false}}},
684
+ :createfromstackscript=>
685
+ {:type=>:call,
686
+ :desc=>"",
687
+ :throws=>["NOTFOUND", "VALIDATION"],
688
+ :params=>
689
+ {:distributionid=>
482
690
  {:desc=>
483
- "Enable the Xen filesystem helper. Corrects fstab and inittab/upstart entries depending on the kernel you're booting. You want this.",
484
- :type=>:boolean,
485
- :required=>false},
486
- :ramlimit=>
487
- {:desc=>"RAMLimit in MB. 0 for max.",
691
+ "Which Distribution to apply this StackScript to. Must be one from the script's DistributionIDList",
488
692
  :type=>:numeric,
489
- :required=>false},
490
- :linodeid=>{:desc=>"", :type=>:numeric, :required=>false},
491
- :kernelid=>
492
- {:desc=>
493
- "The KernelID for this profile. Found in avail.kernels()",
693
+ :required=>true},
694
+ :label=>
695
+ {:desc=>"The label of this new disk image",
696
+ :type=>:string,
697
+ :required=>true},
698
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
699
+ :size=>
700
+ {:desc=>"Size of this disk image in MB",
494
701
  :type=>:numeric,
495
- :required=>false},
496
- :helper_depmod=>
702
+ :required=>true},
703
+ :stackscriptid=>
704
+ {:desc=>"The StackScript to create this image from",
705
+ :type=>:numeric,
706
+ :required=>true},
707
+ :stackscriptudfresponses=>
497
708
  {:desc=>
498
- "Creates an empty modprobe file for the kernel you're booting. ",
499
- :type=>:boolean,
709
+ "JSON encoded name/value pairs, answering this StackScript's User Defined Fields",
710
+ :type=>:string,
711
+ :required=>true},
712
+ :rootpass=>
713
+ {:desc=>"The root user's password",
714
+ :type=>:string,
715
+ :required=>true},
716
+ :rootsshkey=>
717
+ {:desc=>
718
+ "Optionally sets this string into /root/.ssh/authorized_keys upon distribution configuration.",
719
+ :type=>:string,
500
720
  :required=>false}}},
501
- :create=>
721
+ :delete=>
502
722
  {:type=>:call,
503
- :desc=>"Creates a Linode Configuration Profile.",
723
+ :desc=>"",
504
724
  :throws=>["NOTFOUND", "VALIDATION"],
505
725
  :params=>
506
- {:rootdevicecustom=>
507
- {:desc=>"A custom root device setting.",
508
- :type=>:string,
509
- :required=>false},
510
- :comments=>
511
- {:desc=>"Comments you wish to save along with this profile",
726
+ {:diskid=>{:desc=>"", :type=>:numeric, :required=>true},
727
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
728
+ :duplicate=>
729
+ {:type=>:call,
730
+ :desc=>"Performs a bit-for-bit copy of a disk image.",
731
+ :throws=>["NOTFOUND", "VALIDATION"],
732
+ :params=>
733
+ {:diskid=>{:desc=>"", :type=>:numeric, :required=>true},
734
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
735
+ :imagize=>
736
+ {:type=>:call,
737
+ :desc=>"Creates a gold-master image for future deployments",
738
+ :throws=>[],
739
+ :params=>
740
+ {:description=>
741
+ {:desc=>"An optional description of the created image",
512
742
  :type=>:string,
513
743
  :required=>false},
514
- :devtmpfs_automount=>
515
- {:desc=>
516
- "Controls if pv_ops kernels should automount devtmpfs at boot. ",
517
- :type=>:boolean,
518
- :required=>false},
519
- :label=>
520
- {:desc=>"The Label for this profile",
521
- :type=>:string,
744
+ :diskid=>
745
+ {:desc=>"Specifies the source Disk to create the image from",
746
+ :type=>:numeric,
522
747
  :required=>true},
523
- :helper_disableupdatedb=>
524
- {:desc=>"Enable the disableUpdateDB filesystem helper",
525
- :type=>:boolean,
526
- :required=>false},
527
- :disklist=>
748
+ :label=>
528
749
  {:desc=>
529
- "A comma delimited list of DiskIDs; position reflects device node. The 9th element for specifying the initrd.",
750
+ "Sets the name of the image shown in the base image list, defaults to the source image label",
530
751
  :type=>:string,
531
752
  :required=>false},
532
- :runlevel=>
533
- {:desc=>"One of 'default', 'single', 'binbash' ",
753
+ :linodeid=>
754
+ {:desc=>"Specifies the source Linode to create the image from",
755
+ :type=>:numeric,
756
+ :required=>true}}},
757
+ :list=>
758
+ {:type=>:call,
759
+ :desc=>"",
760
+ :throws=>[],
761
+ :params=>
762
+ {:diskid=>{:desc=>"", :type=>:numeric, :required=>false},
763
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
764
+ :resize=>
765
+ {:type=>:call,
766
+ :desc=>"",
767
+ :throws=>["NOTFOUND", "VALIDATION"],
768
+ :params=>
769
+ {:diskid=>{:desc=>"", :type=>:numeric, :required=>true},
770
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
771
+ :size=>
772
+ {:desc=>"The requested new size of this Disk in MB",
773
+ :type=>:numeric,
774
+ :required=>true}}},
775
+ :update=>
776
+ {:type=>:call,
777
+ :desc=>"",
778
+ :throws=>["NOTFOUND", "VALIDATION"],
779
+ :params=>
780
+ {:diskid=>{:desc=>"", :type=>:numeric, :required=>true},
781
+ :label=>
782
+ {:desc=>"The display label for this Disk",
534
783
  :type=>:string,
535
784
  :required=>false},
536
- :rootdevicero=>
537
- {:desc=>
538
- "Enables the 'ro' kernel flag. Modern distros want this. ",
785
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>false},
786
+ :isreadonly=>
787
+ {:desc=>"Enable forced read-only for this Disk",
539
788
  :type=>:boolean,
540
- :required=>false},
541
- :rootdevicenum=>
789
+ :required=>false}}}}},
790
+ :ip=>
791
+ {:type=>:group,
792
+ :subs=>
793
+ {:addprivate=>
794
+ {:type=>:call,
795
+ :desc=>
796
+ "Assigns a Private IP to a Linode. Returns the IPAddressID that was added.",
797
+ :throws=>["NOTFOUND"],
798
+ :params=>
799
+ {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
800
+ :addpublic=>
801
+ {:type=>:call,
802
+ :desc=>
803
+ "Assigns a Public IP to a Linode. Returns the IPAddressID and IPAddress that was added.",
804
+ :throws=>["NOTFOUND", "VALIDATION"],
805
+ :params=>
806
+ {:linodeid=>
542
807
  {:desc=>
543
- "Which device number (1-8) that contains the root partition. 0 to utilize RootDeviceCustom.",
808
+ "The LinodeID of the Linode that will be assigned an additional public IP address",
809
+ :type=>:numeric,
810
+ :required=>true}}},
811
+ :list=>
812
+ {:type=>:call,
813
+ :desc=>
814
+ "Returns the IP addresses of all Linodes you have access to.",
815
+ :throws=>["NOTFOUND"],
816
+ :params=>
817
+ {:ipaddressid=>
818
+ {:desc=>"If specified, limits the result to this IPAddressID",
819
+ :type=>:numeric,
820
+ :required=>false},
821
+ :linodeid=>
822
+ {:desc=>"If specified, limits the result to this LinodeID",
823
+ :type=>:numeric,
824
+ :required=>false}}},
825
+ :setrdns=>
826
+ {:type=>:call,
827
+ :desc=>
828
+ "Sets the rDNS name of a Public IP. Returns the IPAddressID and IPAddress that were updated.",
829
+ :throws=>["NOTFOUND", "VALIDATION"],
830
+ :params=>
831
+ {:hostname=>
832
+ {:desc=>"The hostname to set the reverse DNS to",
833
+ :type=>:string,
834
+ :required=>true},
835
+ :ipaddressid=>
836
+ {:desc=>"The IPAddressID of the address to update",
544
837
  :type=>:numeric,
545
- :required=>false},
546
- :helper_xen=>
547
- {:desc=>
548
- "Enable the Xen filesystem helper. Corrects fstab and inittab/upstart entries depending on the kernel you're booting. You want this.",
549
- :type=>:boolean,
550
- :required=>false},
551
- :ramlimit=>
552
- {:desc=>"RAMLimit in MB. 0 for max.",
838
+ :required=>true}}},
839
+ :swap=>
840
+ {:type=>:call,
841
+ :desc=>
842
+ "Exchanges Public IP addresses between two Linodes within a Datacenter. The destination of the IP Address can be designated by either the toLinodeID or withIPAddressID parameter. Returns the resulting relationship of the Linode and IP Address parameters. When performing a one directional swap, the source is represented by the first of the two resultant array members.",
843
+ :throws=>["NOTFOUND", "VALIDATION"],
844
+ :params=>
845
+ {:ipaddressid=>
846
+ {:desc=>"The IPAddressID of an IP Address to transfer or swap",
553
847
  :type=>:numeric,
554
- :required=>false},
555
- :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
556
- :helper_depmod=>
848
+ :required=>true},
849
+ :tolinodeid=>
557
850
  {:desc=>
558
- "Creates an empty modprobe file for the kernel you're booting. ",
559
- :type=>:boolean,
851
+ "The LinodeID of the Linode where IPAddressID will be transfered",
852
+ :type=>:numeric,
560
853
  :required=>false},
561
- :kernelid=>
562
- {:desc=>
563
- "The KernelID for this profile. Found in avail.kernels()",
854
+ :withipaddressid=>
855
+ {:desc=>"The IP Address ID to swap",
564
856
  :type=>:numeric,
565
- :required=>true}}}}},
566
- :resize=>
567
- {:type=>:call,
568
- :desc=>
569
- "Resizes a Linode from one plan to another. Immediately shuts the Linode down, charges/credits the account, and issue a migration to another host server.",
570
- :throws=>["NOTFOUND", "CCFAILED", "VALIDATION"],
571
- :params=>
572
- {:planid=>
573
- {:desc=>"The desired PlanID available from avail.LinodePlans()",
574
- :type=>:numeric,
575
- :required=>true},
576
- :linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
857
+ :required=>false}}}}},
577
858
  :job=>
578
859
  {:type=>:group,
579
860
  :subs=>
@@ -589,16 +870,14 @@ module LinodeAPI
589
870
  :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
590
871
  :pendingonly=>
591
872
  {:desc=>"", :type=>:boolean, :required=>false}}}}},
592
- :boot=>
873
+ :list=>
593
874
  {:type=>:call,
594
875
  :desc=>
595
- "Issues a boot job for the provided ConfigID. If no ConfigID is provided boots the last used configuration profile, or the first configuration profile if this Linode has never been booted.",
596
- :throws=>["NOTFOUND"],
876
+ "Returns a list of all Linodes user has access or delete to, including some properties",
877
+ :throws=>[],
597
878
  :params=>
598
- {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
599
- :configid=>
600
- {:desc=>
601
- "The ConfigID to boot, available from linode.config.list().",
879
+ {:linodeid=>
880
+ {:desc=>"Limits the list to the specified LinodeID",
602
881
  :type=>:numeric,
603
882
  :required=>false}}},
604
883
  :mutate=>
@@ -606,126 +885,97 @@ module LinodeAPI
606
885
  :desc=>"Upgrades a Linode to its next generation.",
607
886
  :throws=>["NOTFOUND", "VALIDATION"],
608
887
  :params=>{:linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
888
+ :reboot=>
889
+ {:type=>:call,
890
+ :desc=>"Issues a shutdown, and then boot job for a given LinodeID.",
891
+ :throws=>["NOTFOUND"],
892
+ :params=>
893
+ {:configid=>{:desc=>"", :type=>:numeric, :required=>false},
894
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
895
+ :resize=>
896
+ {:type=>:call,
897
+ :desc=>
898
+ "Resizes a Linode from one plan to another. Immediately shuts the Linode down, charges/credits the account, and issue a migration to another host server.",
899
+ :throws=>["NOTFOUND", "CCFAILED", "VALIDATION"],
900
+ :params=>
901
+ {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
902
+ :planid=>
903
+ {:desc=>"The desired PlanID available from avail.LinodePlans()",
904
+ :type=>:numeric,
905
+ :required=>true}}},
609
906
  :shutdown=>
610
907
  {:type=>:call,
611
908
  :desc=>"Issues a shutdown job for a given LinodeID.",
612
909
  :throws=>["NOTFOUND"],
613
- :params=>
614
- {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}}}},
615
- :nodebalancer=>
616
- {:type=>:group,
617
- :subs=>
618
- {:node=>
619
- {:type=>:group,
620
- :subs=>
621
- {:update=>
622
- {:type=>:call,
623
- :desc=>"Updates a Node's properties",
624
- :throws=>["NOTFOUND", "VALIDATION"],
625
- :params=>
626
- {:label=>
627
- {:desc=>"This backend Node's label",
628
- :type=>:string,
629
- :required=>false},
630
- :nodeid=>{:desc=>"", :type=>:numeric, :required=>true},
631
- :mode=>
632
- {:desc=>
633
- "The connections mode for this node. One of 'accept', 'reject', or 'drain'",
634
- :type=>:string,
635
- :required=>false},
636
- :weight=>
637
- {:desc=>
638
- "Load balancing weight, 1-255. Higher means more connections.",
639
- :type=>:numeric,
640
- :required=>false},
641
- :address=>
642
- {:desc=>
643
- "The address:port combination used to communicate with this Node",
644
- :type=>:string,
645
- :required=>false}}},
646
- :list=>
647
- {:type=>:call,
648
- :desc=>
649
- "Returns a list of Nodes associated with a NodeBalancer Config",
650
- :throws=>[],
651
- :params=>
652
- {:nodeid=>
653
- {:desc=>"Limits the list to the specified NodeID",
654
- :type=>:numeric,
655
- :required=>false},
656
- :configid=>{:desc=>"", :type=>:numeric, :required=>true}}},
657
- :create=>
658
- {:type=>:call,
659
- :desc=>"",
660
- :throws=>["NOTFOUND", "VALIDATION"],
661
- :params=>
662
- {:label=>
663
- {:desc=>"This backend Node's label",
664
- :type=>:string,
665
- :required=>true},
666
- :configid=>
667
- {:desc=>"The parent ConfigID to attach this Node to",
668
- :type=>:numeric,
669
- :required=>true},
670
- :mode=>
671
- {:desc=>
672
- "The connections mode for this node. One of 'accept', 'reject', or 'drain'",
673
- :type=>:string,
674
- :required=>false},
675
- :weight=>
676
- {:desc=>
677
- "Load balancing weight, 1-255. Higher means more connections.",
678
- :type=>:numeric,
679
- :required=>false},
680
- :address=>
681
- {:desc=>
682
- "The address:port combination used to communicate with this Node",
683
- :type=>:string,
684
- :required=>true}}},
685
- :delete=>
686
- {:type=>:call,
687
- :desc=>"Deletes a Node from a NodeBalancer Config",
688
- :throws=>["NOTFOUND"],
689
- :params=>
690
- {:nodeid=>
691
- {:desc=>"The NodeID to delete",
692
- :type=>:numeric,
693
- :required=>true}}}}},
694
- :create=>
910
+ :params=>{:linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}},
911
+ :update=>
695
912
  {:type=>:call,
696
- :desc=>"",
697
- :throws=>["NOACCESS", "CCFAILED", "VALIDATION"],
913
+ :desc=>"Updates a Linode's properties.",
914
+ :throws=>["NOTFOUND", "VALIDATION"],
698
915
  :params=>
699
- {:label=>
700
- {:desc=>"This NodeBalancer's label",
701
- :type=>:string,
916
+ {:alert_bwin_enabled=>
917
+ {:desc=>"Enable the incoming bandwidth email alert",
918
+ :type=>:boolean,
702
919
  :required=>false},
703
- :clientconnthrottle=>
704
- {:desc=>
705
- "To help mitigate abuse, throttle connections per second, per client IP. 0 to disable. Max of 20.",
920
+ :alert_bwin_threshold=>
921
+ {:desc=>"Mb/sec", :type=>:numeric, :required=>false},
922
+ :alert_bwout_enabled=>
923
+ {:desc=>"Enable the outgoing bandwidth email alert",
924
+ :type=>:boolean,
925
+ :required=>false},
926
+ :alert_bwout_threshold=>
927
+ {:desc=>"Mb/sec", :type=>:numeric, :required=>false},
928
+ :alert_bwquota_enabled=>
929
+ {:desc=>"Enable the bw quote email alert",
930
+ :type=>:boolean,
931
+ :required=>false},
932
+ :alert_bwquota_threshold=>
933
+ {:desc=>"Percentage of monthly bw quota",
706
934
  :type=>:numeric,
707
935
  :required=>false},
708
- :paymentterm=>
709
- {:desc=>
710
- "Subscription term in months for prepaid customers. One of: 1, 12, or 24",
936
+ :alert_cpu_enabled=>
937
+ {:desc=>"Enable the cpu usage email alert",
938
+ :type=>:boolean,
939
+ :required=>false},
940
+ :alert_cpu_threshold=>
941
+ {:desc=>"CPU Alert threshold, percentage 0-800",
711
942
  :type=>:numeric,
712
943
  :required=>false},
713
- :datacenterid=>
944
+ :alert_diskio_enabled=>
945
+ {:desc=>"Enable the disk IO email alert",
946
+ :type=>:boolean,
947
+ :required=>false},
948
+ :alert_diskio_threshold=>
949
+ {:desc=>"IO ops/sec", :type=>:numeric, :required=>false},
950
+ :label=>
951
+ {:desc=>"This Linode's label", :type=>:string, :required=>false},
952
+ :linodeid=>{:desc=>"", :type=>:numeric, :required=>true},
953
+ :backupweeklyday=>{:desc=>"", :type=>:numeric, :required=>false},
954
+ :backupwindow=>{:desc=>"", :type=>:numeric, :required=>false},
955
+ :lpm_displaygroup=>
714
956
  {:desc=>
715
- "The DatacenterID from avail.datacenters() where you wish to place this new NodeBalancer",
716
- :type=>:numeric,
717
- :required=>true}}},
718
- :delete=>
957
+ "Display group in the Linode list inside the Linode Manager",
958
+ :type=>:string,
959
+ :required=>false},
960
+ :ms_ssh_disabled=>{:desc=>"", :type=>:boolean, :required=>false},
961
+ :ms_ssh_ip=>{:desc=>"", :type=>:string, :required=>false},
962
+ :ms_ssh_port=>{:desc=>"", :type=>:numeric, :required=>false},
963
+ :ms_ssh_user=>{:desc=>"", :type=>:string, :required=>false},
964
+ :watchdog=>
965
+ {:desc=>"Enable the Lassie shutdown watchdog",
966
+ :type=>:boolean,
967
+ :required=>false}}},
968
+ :webconsoletoken=>
719
969
  {:type=>:call,
720
970
  :desc=>
721
- "Immediately removes a NodeBalancer from your account and issues a pro-rated credit back to your account, if applicable.",
722
- :throws=>["NOTFOUND"],
971
+ "Generates a console token starting a web console LISH session for the requesting IP",
972
+ :throws=>["NOTFOUND", "VALIDATION"],
723
973
  :params=>
724
- {:nodebalancerid=>
725
- {:desc=>"The NodeBalancerID to delete",
726
- :type=>:numeric,
727
- :required=>true}}},
728
- :config=>
974
+ {:linodeid=>{:desc=>"", :type=>:numeric, :required=>true}}}}},
975
+ :nodebalancer=>
976
+ {:type=>:group,
977
+ :subs=>
978
+ {:config=>
729
979
  {:type=>:group,
730
980
  :subs=>
731
981
  {:create=>
@@ -733,25 +983,7 @@ module LinodeAPI
733
983
  :desc=>"",
734
984
  :throws=>["NOTFOUND", "VALIDATION"],
735
985
  :params=>
736
- {:stickiness=>
737
- {:desc=>
738
- "Session persistence. One of 'none', 'table', 'http_cookie'",
739
- :type=>:string,
740
- :required=>false},
741
- :check_path=>
742
- {:desc=>"When check=http, the path to request",
743
- :type=>:string,
744
- :required=>false},
745
- :check_body=>
746
- {:desc=>
747
- "When check=http_body, a regex against the expected result body",
748
- :type=>:string,
749
- :required=>false},
750
- :check_interval=>
751
- {:desc=>"Seconds between health check probes. 2-3600",
752
- :type=>:numeric,
753
- :required=>false},
754
- :algorithm=>
986
+ {:algorithm=>
755
987
  {:desc=>
756
988
  "Balancing algorithm. One of 'roundrobin', 'leastconn', 'source'",
757
989
  :type=>:string,
@@ -760,27 +992,40 @@ module LinodeAPI
760
992
  {:desc=>"The parent NodeBalancer's ID",
761
993
  :type=>:numeric,
762
994
  :required=>true},
763
- :check_attempts=>
764
- {:desc=>
765
- "Number of failed probes before taking a node out of rotation. 1-30",
766
- :type=>:string,
767
- :required=>false},
768
995
  :port=>
769
996
  {:desc=>"Port to bind to on the public interfaces. 1-65534",
770
997
  :type=>:numeric,
771
998
  :required=>false},
999
+ :protocol=>
1000
+ {:desc=>"Either 'tcp', 'http', or 'https'",
1001
+ :type=>:string,
1002
+ :required=>false},
1003
+ :stickiness=>
1004
+ {:desc=>
1005
+ "Session persistence. One of 'none', 'table', 'http_cookie'",
1006
+ :type=>:string,
1007
+ :required=>false},
772
1008
  :check=>
773
1009
  {:desc=>
774
1010
  "Perform active health checks on the backend nodes. One of 'connection', 'http', 'http_body'",
775
1011
  :type=>:string,
776
1012
  :required=>false},
777
- :ssl_key=>
1013
+ :check_attempts=>
1014
+ {:desc=>
1015
+ "Number of failed probes before taking a node out of rotation. 1-30",
1016
+ :type=>:string,
1017
+ :required=>false},
1018
+ :check_body=>
778
1019
  {:desc=>
779
- "Unpassphrased private key for the SSL certificate when protocol is 'https'",
1020
+ "When check=http_body, a regex against the expected result body",
780
1021
  :type=>:string,
781
1022
  :required=>false},
782
- :protocol=>
783
- {:desc=>"Either 'tcp', 'http', or 'https'",
1023
+ :check_interval=>
1024
+ {:desc=>"Seconds between health check probes. 2-3600",
1025
+ :type=>:numeric,
1026
+ :required=>false},
1027
+ :check_path=>
1028
+ {:desc=>"When check=http, the path to request",
784
1029
  :type=>:string,
785
1030
  :required=>false},
786
1031
  :check_timeout=>
@@ -792,34 +1037,62 @@ module LinodeAPI
792
1037
  {:desc=>
793
1038
  "SSL certificate served by the NodeBalancer when the protocol is 'https'",
794
1039
  :type=>:string,
1040
+ :required=>false},
1041
+ :ssl_key=>
1042
+ {:desc=>
1043
+ "Unpassphrased private key for the SSL certificate when protocol is 'https'",
1044
+ :type=>:string,
795
1045
  :required=>false}}},
1046
+ :delete=>
1047
+ {:type=>:call,
1048
+ :desc=>"Deletes a NodeBalancer's Config",
1049
+ :throws=>["NOTFOUND"],
1050
+ :params=>
1051
+ {:configid=>
1052
+ {:desc=>"The ConfigID to delete",
1053
+ :type=>:numeric,
1054
+ :required=>true},
1055
+ :nodebalancerid=>
1056
+ {:desc=>"", :type=>:numeric, :required=>true}}},
1057
+ :list=>
1058
+ {:type=>:call,
1059
+ :desc=>
1060
+ "Returns a list of NodeBalancers this user has access or delete to, including their properties",
1061
+ :throws=>[],
1062
+ :params=>
1063
+ {:configid=>
1064
+ {:desc=>"Limits the list to the specified ConfigID",
1065
+ :type=>:numeric,
1066
+ :required=>false},
1067
+ :nodebalancerid=>
1068
+ {:desc=>"", :type=>:numeric, :required=>true}}},
796
1069
  :update=>
797
1070
  {:type=>:call,
798
1071
  :desc=>"Updates a Config's properties",
799
1072
  :throws=>["NOTFOUND", "VALIDATION"],
800
1073
  :params=>
801
- {:stickiness=>
1074
+ {:algorithm=>
802
1075
  {:desc=>
803
- "Session persistence. One of 'none', 'table', 'http_cookie'",
1076
+ "Balancing algorithm. One of 'roundrobin', 'leastconn', 'source'",
804
1077
  :type=>:string,
805
1078
  :required=>false},
806
- :check_path=>
807
- {:desc=>"When check=http, the path to request",
1079
+ :configid=>{:desc=>"", :type=>:numeric, :required=>true},
1080
+ :port=>
1081
+ {:desc=>"Port to bind to on the public interfaces. 1-65534",
1082
+ :type=>:numeric,
1083
+ :required=>false},
1084
+ :protocol=>
1085
+ {:desc=>"Either 'tcp', 'http', or 'https'",
808
1086
  :type=>:string,
809
1087
  :required=>false},
810
- :check_body=>
1088
+ :stickiness=>
811
1089
  {:desc=>
812
- "When check=http_body, a regex against the expected result body",
1090
+ "Session persistence. One of 'none', 'table', 'http_cookie'",
813
1091
  :type=>:string,
814
1092
  :required=>false},
815
- :check_interval=>
816
- {:desc=>"Seconds between health check probes. 2-3600",
817
- :type=>:numeric,
818
- :required=>false},
819
- :configid=>{:desc=>"", :type=>:numeric, :required=>true},
820
- :algorithm=>
1093
+ :check=>
821
1094
  {:desc=>
822
- "Balancing algorithm. One of 'roundrobin', 'leastconn', 'source'",
1095
+ "Perform active health checks on the backend nodes. One of 'connection', 'http', 'http_body'",
823
1096
  :type=>:string,
824
1097
  :required=>false},
825
1098
  :check_attempts=>
@@ -827,22 +1100,17 @@ module LinodeAPI
827
1100
  "Number of failed probes before taking a node out of rotation. 1-30",
828
1101
  :type=>:string,
829
1102
  :required=>false},
830
- :port=>
831
- {:desc=>"Port to bind to on the public interfaces. 1-65534",
832
- :type=>:numeric,
833
- :required=>false},
834
- :check=>
1103
+ :check_body=>
835
1104
  {:desc=>
836
- "Perform active health checks on the backend nodes. One of 'connection', 'http', 'http_body'",
1105
+ "When check=http_body, a regex against the expected result body",
837
1106
  :type=>:string,
838
1107
  :required=>false},
839
- :ssl_key=>
840
- {:desc=>
841
- "Unpassphrased private key for the SSL certificate when protocol is 'https'",
842
- :type=>:string,
1108
+ :check_interval=>
1109
+ {:desc=>"Seconds between health check probes. 2-3600",
1110
+ :type=>:numeric,
843
1111
  :required=>false},
844
- :protocol=>
845
- {:desc=>"Either 'tcp', 'http', or 'https'",
1112
+ :check_path=>
1113
+ {:desc=>"When check=http, the path to request",
846
1114
  :type=>:string,
847
1115
  :required=>false},
848
1116
  :check_timeout=>
@@ -854,43 +1122,46 @@ module LinodeAPI
854
1122
  {:desc=>
855
1123
  "SSL certificate served by the NodeBalancer when the protocol is 'https'",
856
1124
  :type=>:string,
857
- :required=>false}}},
858
- :delete=>
859
- {:type=>:call,
860
- :desc=>"Deletes a NodeBalancer's Config",
861
- :throws=>["NOTFOUND"],
862
- :params=>
863
- {:nodebalancerid=>{:desc=>"", :type=>:numeric, :required=>true},
864
- :configid=>
865
- {:desc=>"The ConfigID to delete",
866
- :type=>:numeric,
867
- :required=>true}}},
868
- :list=>
869
- {:type=>:call,
870
- :desc=>
871
- "Returns a list of NodeBalancers this user has access or delete to, including their properties",
872
- :throws=>[],
873
- :params=>
874
- {:nodebalancerid=>{:desc=>"", :type=>:numeric, :required=>true},
875
- :configid=>
876
- {:desc=>"Limits the list to the specified ConfigID",
877
- :type=>:numeric,
1125
+ :required=>false},
1126
+ :ssl_key=>
1127
+ {:desc=>
1128
+ "Unpassphrased private key for the SSL certificate when protocol is 'https'",
1129
+ :type=>:string,
878
1130
  :required=>false}}}}},
879
- :update=>
1131
+ :create=>
880
1132
  {:type=>:call,
881
- :desc=>"Updates a NodeBalancer's properties",
882
- :throws=>["NOTFOUND", "VALIDATION"],
1133
+ :desc=>"",
1134
+ :throws=>["NOACCESS", "CCFAILED", "VALIDATION"],
883
1135
  :params=>
884
- {:label=>
1136
+ {:clientconnthrottle=>
1137
+ {:desc=>
1138
+ "To help mitigate abuse, throttle connections per second, per client IP. 0 to disable. Max of 20.",
1139
+ :type=>:numeric,
1140
+ :required=>false},
1141
+ :datacenterid=>
1142
+ {:desc=>
1143
+ "The DatacenterID from avail.datacenters() where you wish to place this new NodeBalancer",
1144
+ :type=>:numeric,
1145
+ :required=>true},
1146
+ :label=>
885
1147
  {:desc=>"This NodeBalancer's label",
886
1148
  :type=>:string,
887
1149
  :required=>false},
888
- :clientconnthrottle=>
1150
+ :paymentterm=>
889
1151
  {:desc=>
890
- "To help mitigate abuse, throttle connections per second, per client IP. 0 to disable. Max of 20.",
1152
+ "Subscription term in months for prepaid customers. One of: 1, 12, or 24",
891
1153
  :type=>:numeric,
892
- :required=>false},
893
- :nodebalancerid=>{:desc=>"", :type=>:numeric, :required=>true}}},
1154
+ :required=>false}}},
1155
+ :delete=>
1156
+ {:type=>:call,
1157
+ :desc=>
1158
+ "Immediately removes a NodeBalancer from your account and issues a pro-rated credit back to your account, if applicable.",
1159
+ :throws=>["NOTFOUND"],
1160
+ :params=>
1161
+ {:nodebalancerid=>
1162
+ {:desc=>"The NodeBalancerID to delete",
1163
+ :type=>:numeric,
1164
+ :required=>true}}},
894
1165
  :list=>
895
1166
  {:type=>:call,
896
1167
  :desc=>
@@ -900,299 +1171,98 @@ module LinodeAPI
900
1171
  {:nodebalancerid=>
901
1172
  {:desc=>"Limits the list to the specified NodeBalancerID",
902
1173
  :type=>:numeric,
903
- :required=>false}}}}},
904
- :domain=>
905
- {:type=>:group,
906
- :subs=>
907
- {:update=>
908
- {:type=>:call,
909
- :desc=>"Update a domain record.",
910
- :throws=>["NOTFOUND", "VALIDATION"],
911
- :params=>
912
- {:domainid=>{:desc=>"", :type=>:numeric, :required=>true},
913
- :description=>
914
- {:desc=>"Currently undisplayed.",
915
- :type=>:string,
916
- :required=>false},
917
- :retry_sec=>{:desc=>"", :type=>:numeric, :required=>false},
918
- :expire_sec=>{:desc=>"", :type=>:numeric, :required=>false},
919
- :status=>
920
- {:desc=>"0, 1, or 2 (disabled, active, edit mode)",
921
- :type=>:numeric,
922
- :required=>false},
923
- :refresh_sec=>{:desc=>"", :type=>:numeric, :required=>false},
924
- :lpm_displaygroup=>
925
- {:desc=>
926
- "Display group in the Domain list inside the Linode DNS Manager",
927
- :type=>:string,
928
- :required=>false},
929
- :master_ips=>
930
- {:desc=>
931
- "When type=slave, the zone's master DNS servers list, semicolon separated ",
932
- :type=>:string,
933
- :required=>false},
934
- :soa_email=>
935
- {:desc=>"Required when type=master",
936
- :type=>:string,
937
- :required=>false},
938
- :ttl_sec=>{:desc=>"", :type=>:numeric, :required=>false},
939
- :domain=>
940
- {:desc=>"The zone's name", :type=>:string, :required=>false},
941
- :type=>{:desc=>"master or slave", :type=>:string, :required=>false},
942
- :axfr_ips=>
943
- {:desc=>
944
- "IP addresses allowed to AXFR the entire zone, semicolon separated",
945
- :type=>:string,
946
- :required=>false}}},
947
- :create=>
948
- {:type=>:call,
949
- :desc=>"Create a domain record.",
950
- :throws=>["NOACCESS", "VALIDATION"],
951
- :params=>
952
- {:soa_email=>
953
- {:desc=>"Required when type=master",
954
- :type=>:string,
955
- :required=>false},
956
- :description=>
957
- {:desc=>"Currently undisplayed.",
958
- :type=>:string,
959
- :required=>false},
960
- :ttl_sec=>{:desc=>"", :type=>:numeric, :required=>false},
961
- :retry_sec=>{:desc=>"", :type=>:numeric, :required=>false},
962
- :expire_sec=>{:desc=>"", :type=>:numeric, :required=>false},
963
- :domain=>
964
- {:desc=>"The zone's name", :type=>:string, :required=>true},
965
- :status=>
966
- {:desc=>"0, 1, or 2 (disabled, active, edit mode)",
967
- :type=>:numeric,
968
- :required=>false},
969
- :type=>{:desc=>"master or slave", :type=>:string, :required=>true},
970
- :refresh_sec=>{:desc=>"", :type=>:numeric, :required=>false},
971
- :lpm_displaygroup=>
972
- {:desc=>
973
- "Display group in the Domain list inside the Linode DNS Manager",
974
- :type=>:string,
975
- :required=>false},
976
- :master_ips=>
977
- {:desc=>
978
- "When type=slave, the zone's master DNS servers list, semicolon separated ",
979
- :type=>:string,
980
- :required=>false},
981
- :axfr_ips=>
982
- {:desc=>
983
- "IP addresses allowed to AXFR the entire zone, semicolon separated",
984
- :type=>:string,
985
1174
  :required=>false}}},
986
- :resource=>
1175
+ :node=>
987
1176
  {:type=>:group,
988
1177
  :subs=>
989
- {:delete=>
990
- {:type=>:call,
991
- :desc=>"",
992
- :throws=>["NOTFOUND"],
993
- :params=>
994
- {:domainid=>{:desc=>"", :type=>:numeric, :required=>true},
995
- :resourceid=>{:desc=>"", :type=>:numeric, :required=>true}}},
996
- :list=>
1178
+ {:create=>
997
1179
  {:type=>:call,
998
1180
  :desc=>"",
999
- :throws=>[],
1000
- :params=>
1001
- {:domainid=>{:desc=>"", :type=>:numeric, :required=>true},
1002
- :resourceid=>{:desc=>"", :type=>:numeric, :required=>false}}},
1003
- :create=>
1004
- {:type=>:call,
1005
- :desc=>"Create a domain record.",
1006
- :throws=>["NOACCESS", "VALIDATION"],
1181
+ :throws=>["NOTFOUND", "VALIDATION"],
1007
1182
  :params=>
1008
- {:domainid=>{:desc=>"", :type=>:numeric, :required=>true},
1009
- :port=>{:desc=>"", :type=>:numeric, :required=>false},
1010
- :name=>
1011
- {:desc=>
1012
- "The hostname or FQDN. When Type=MX the subdomain to delegate to the Target MX server.",
1013
- :type=>:string,
1014
- :required=>false},
1015
- :weight=>{:desc=>"", :type=>:numeric, :required=>false},
1016
- :target=>
1183
+ {:address=>
1017
1184
  {:desc=>
1018
- "When Type=MX the hostname. When Type=CNAME the target of the alias. When Type=TXT the value of the record. \n\t\tWhen Type=A or AAAA the token of '[remote_addr]' will be substituted with the IP address of the request.",
1185
+ "The address:port combination used to communicate with this Node",
1019
1186
  :type=>:string,
1020
- :required=>false},
1021
- :priority=>
1022
- {:desc=>"Priority for MX and SRV records, 0-255",
1023
- :type=>:numeric,
1024
- :required=>false},
1025
- :ttl_sec=>
1026
- {:desc=>"TTL. Leave as 0 to accept our default.",
1187
+ :required=>true},
1188
+ :configid=>
1189
+ {:desc=>"The parent ConfigID to attach this Node to",
1027
1190
  :type=>:numeric,
1028
- :required=>false},
1029
- :protocol=>
1191
+ :required=>true},
1192
+ :label=>
1193
+ {:desc=>"This backend Node's label",
1194
+ :type=>:string,
1195
+ :required=>true},
1196
+ :mode=>
1030
1197
  {:desc=>
1031
- "The protocol to append to an SRV record. Ignored on other record types.",
1198
+ "The connections mode for this node. One of 'accept', 'reject', or 'drain'",
1032
1199
  :type=>:string,
1033
1200
  :required=>false},
1034
- :type=>
1035
- {:desc=>"One of: NS, MX, A, AAAA, CNAME, TXT, or SRV",
1036
- :type=>:string,
1201
+ :weight=>
1202
+ {:desc=>
1203
+ "Load balancing weight, 1-255. Higher means more connections.",
1204
+ :type=>:numeric,
1205
+ :required=>false}}},
1206
+ :delete=>
1207
+ {:type=>:call,
1208
+ :desc=>"Deletes a Node from a NodeBalancer Config",
1209
+ :throws=>["NOTFOUND"],
1210
+ :params=>
1211
+ {:nodeid=>
1212
+ {:desc=>"The NodeID to delete",
1213
+ :type=>:numeric,
1037
1214
  :required=>true}}},
1215
+ :list=>
1216
+ {:type=>:call,
1217
+ :desc=>
1218
+ "Returns a list of Nodes associated with a NodeBalancer Config",
1219
+ :throws=>[],
1220
+ :params=>
1221
+ {:configid=>{:desc=>"", :type=>:numeric, :required=>true},
1222
+ :nodeid=>
1223
+ {:desc=>"Limits the list to the specified NodeID",
1224
+ :type=>:numeric,
1225
+ :required=>false}}},
1038
1226
  :update=>
1039
1227
  {:type=>:call,
1040
- :desc=>"Update a domain record.",
1228
+ :desc=>"Updates a Node's properties",
1041
1229
  :throws=>["NOTFOUND", "VALIDATION"],
1042
1230
  :params=>
1043
- {:domainid=>{:desc=>"", :type=>:numeric, :required=>false},
1044
- :port=>{:desc=>"", :type=>:numeric, :required=>false},
1045
- :resourceid=>{:desc=>"", :type=>:numeric, :required=>true},
1046
- :name=>
1231
+ {:address=>
1047
1232
  {:desc=>
1048
- "The hostname or FQDN. When Type=MX the subdomain to delegate to the Target MX server.",
1233
+ "The address:port combination used to communicate with this Node",
1049
1234
  :type=>:string,
1050
1235
  :required=>false},
1051
- :weight=>{:desc=>"", :type=>:numeric, :required=>false},
1052
- :target=>
1053
- {:desc=>
1054
- "When Type=MX the hostname. When Type=CNAME the target of the alias. When Type=TXT the value of the record. \n\t\tWhen Type=A or AAAA the token of '[remote_addr]' will be substituted with the IP address of the request.",
1236
+ :label=>
1237
+ {:desc=>"This backend Node's label",
1055
1238
  :type=>:string,
1056
1239
  :required=>false},
1057
- :priority=>
1058
- {:desc=>"Priority for MX and SRV records, 0-255",
1059
- :type=>:numeric,
1060
- :required=>false},
1061
- :ttl_sec=>
1062
- {:desc=>"TTL. Leave as 0 to accept our default.",
1063
- :type=>:numeric,
1064
- :required=>false},
1065
- :protocol=>
1240
+ :mode=>
1066
1241
  {:desc=>
1067
- "The protocol to append to an SRV record. Ignored on other record types.",
1242
+ "The connections mode for this node. One of 'accept', 'reject', or 'drain'",
1068
1243
  :type=>:string,
1244
+ :required=>false},
1245
+ :nodeid=>{:desc=>"", :type=>:numeric, :required=>true},
1246
+ :weight=>
1247
+ {:desc=>
1248
+ "Load balancing weight, 1-255. Higher means more connections.",
1249
+ :type=>:numeric,
1069
1250
  :required=>false}}}}},
1070
- :list=>
1071
- {:type=>:call,
1072
- :desc=>"Lists domains you have access to.",
1073
- :throws=>[],
1074
- :params=>
1075
- {:domainid=>
1076
- {:desc=>"Limits the list to the specified DomainID",
1077
- :type=>:numeric,
1078
- :required=>false}}},
1079
- :delete=>
1080
- {:type=>:call,
1081
- :desc=>"",
1082
- :throws=>["NOTFOUND"],
1083
- :params=>
1084
- {:domainid=>{:desc=>"", :type=>:numeric, :required=>true}}}}},
1085
- :avail=>
1086
- {:type=>:group,
1087
- :subs=>
1088
- {:datacenters=>
1089
- {:type=>:call,
1090
- :desc=>"Returns a list of Linode data center facilities.",
1091
- :throws=>[],
1092
- :params=>{}},
1093
- :linodeplans=>
1094
- {:type=>:call,
1095
- :desc=>
1096
- "Returns a structure of Linode PlanIDs containing the Plan label and the availability in each Datacenter. Please note, this method is deprecated and will be removed in the future.",
1097
- :throws=>[],
1098
- :params=>
1099
- {:planid=>
1100
- {:desc=>"Limits the list to the specified PlanID",
1101
- :type=>:numeric,
1102
- :required=>false}}},
1103
- :stackscripts=>
1104
- {:type=>:call,
1105
- :desc=>"Returns a list of available public StackScripts.",
1106
- :throws=>[],
1107
- :params=>
1108
- {:distributionid=>
1109
- {:desc=>
1110
- "Limit the results to StackScripts that can be applied to this DistributionID",
1111
- :type=>:numeric,
1112
- :required=>false},
1113
- :keywords=>
1114
- {:desc=>"Search terms", :type=>:string, :required=>false},
1115
- :distributionvendor=>
1116
- {:desc=>"Debian, Ubuntu, Fedora, etc.",
1117
- :type=>:string,
1118
- :required=>false}}},
1119
- :nodebalancers=>
1120
- {:type=>:call,
1121
- :desc=>"Returns NodeBalancer pricing information.",
1122
- :throws=>[],
1123
- :params=>{}},
1124
- :distributions=>
1125
- {:type=>:call,
1126
- :desc=>"Returns a list of available Linux Distributions.",
1127
- :throws=>[],
1128
- :params=>
1129
- {:distributionid=>
1130
- {:desc=>"Limits the results to the specified DistributionID",
1131
- :type=>:numeric,
1132
- :required=>false}}},
1133
- :kernels=>
1134
- {:type=>:call,
1135
- :desc=>"List available kernels.",
1136
- :throws=>[],
1137
- :params=>
1138
- {:isxen=>
1139
- {:desc=>"Limits the results to show only Xen kernels",
1140
- :type=>:boolean,
1141
- :required=>false},
1142
- :kernelid=>{:desc=>"", :type=>:numeric, :required=>false}}}}},
1143
- :account=>
1144
- {:type=>:group,
1145
- :subs=>
1146
- {:estimateinvoice=>
1251
+ :update=>
1147
1252
  {:type=>:call,
1148
- :desc=>
1149
- "Estimates the invoice for adding a new Linode or NodeBalancer as well as resizing a Linode. This returns two fields: PRICE which is the estimated cost of the invoice, and INVOICE_TO which is the date invoice would be though with timezone set to America/New_York",
1150
- :throws=>["VALIDATION"],
1253
+ :desc=>"Updates a NodeBalancer's properties",
1254
+ :throws=>["NOTFOUND", "VALIDATION"],
1151
1255
  :params=>
1152
- {:paymentterm=>
1256
+ {:clientconnthrottle=>
1153
1257
  {:desc=>
1154
- "Subscription term in months. One of: 1, 12, or 24. This is required for modes 'linode_new' and 'nodebalancer_new'.",
1258
+ "To help mitigate abuse, throttle connections per second, per client IP. 0 to disable. Max of 20.",
1155
1259
  :type=>:numeric,
1156
1260
  :required=>false},
1157
- :mode=>
1158
- {:desc=>
1159
- "This is one of the following options: 'linode_new', 'linode_resize', or 'nodebalancer_new'.",
1261
+ :label=>
1262
+ {:desc=>"This NodeBalancer's label",
1160
1263
  :type=>:string,
1161
- :required=>true},
1162
- :planid=>
1163
- {:desc=>
1164
- "The desired PlanID available from avail.LinodePlans(). This is required for modes 'linode_new' and 'linode_resize'.",
1165
- :type=>:numeric,
1166
1264
  :required=>false},
1167
- :linodeid=>
1168
- {:desc=>
1169
- "This is the LinodeID you want to resize and is required for mode 'linode_resize'.",
1170
- :type=>:numeric,
1171
- :required=>false}}},
1172
- :updatecard=>
1173
- {:type=>:call,
1174
- :desc=>"",
1175
- :throws=>[],
1176
- :params=>
1177
- {:ccexpmonth=>{:desc=>"", :type=>:numeric, :required=>true},
1178
- :ccexpyear=>{:desc=>"", :type=>:numeric, :required=>true},
1179
- :ccnumber=>{:desc=>"", :type=>:numeric, :required=>true}}},
1180
- :info=>
1181
- {:type=>:call,
1182
- :desc=>
1183
- "Shows information about your account such as the date your account was opened as well as your network utilization for the current month in gigabytes.",
1184
- :throws=>[],
1185
- :params=>{}},
1186
- :paybalance=>
1187
- {:type=>:call,
1188
- :desc=>"Pays current balance on file, returning it in the response.",
1189
- :throws=>
1190
- ["CCEXPIRED",
1191
- "CCFAILED",
1192
- "NOACCESS",
1193
- "PAYMENTLIMITER",
1194
- "VALIDATION"],
1195
- :params=>{}}}},
1265
+ :nodebalancerid=>{:desc=>"", :type=>:numeric, :required=>true}}}}},
1196
1266
  :stackscript=>
1197
1267
  {:type=>:group,
1198
1268
  :subs=>
@@ -1201,97 +1271,71 @@ module LinodeAPI
1201
1271
  :desc=>"Create a StackScript.",
1202
1272
  :throws=>["NOACCESS", "VALIDATION"],
1203
1273
  :params=>
1204
- {:label=>
1274
+ {:description=>{:desc=>"", :type=>:string, :required=>false},
1275
+ :distributionidlist=>
1276
+ {:desc=>
1277
+ "Comma delimited list of DistributionIDs that this script works on ",
1278
+ :type=>:string,
1279
+ :required=>true},
1280
+ :label=>
1205
1281
  {:desc=>"The Label for this StackScript",
1206
1282
  :type=>:string,
1207
1283
  :required=>true},
1208
- :rev_note=>{:desc=>"", :type=>:string, :required=>false},
1209
- :script=>
1210
- {:desc=>"The actual script", :type=>:string, :required=>true},
1211
1284
  :ispublic=>
1212
1285
  {:desc=>
1213
1286
  "Whether this StackScript is published in the Library, for everyone to use",
1214
1287
  :type=>:boolean,
1215
1288
  :required=>false},
1216
- :description=>{:desc=>"", :type=>:string, :required=>false},
1217
- :distributionidlist=>
1218
- {:desc=>
1219
- "Comma delimited list of DistributionIDs that this script works on ",
1220
- :type=>:string,
1221
- :required=>true}}},
1289
+ :rev_note=>{:desc=>"", :type=>:string, :required=>false},
1290
+ :script=>
1291
+ {:desc=>"The actual script", :type=>:string, :required=>true}}},
1222
1292
  :delete=>
1223
1293
  {:type=>:call,
1224
1294
  :desc=>"",
1225
1295
  :throws=>["NOTFOUND"],
1226
1296
  :params=>
1227
1297
  {:stackscriptid=>{:desc=>"", :type=>:numeric, :required=>true}}},
1298
+ :list=>
1299
+ {:type=>:call,
1300
+ :desc=>"Lists StackScripts you have access to.",
1301
+ :throws=>[],
1302
+ :params=>
1303
+ {:stackscriptid=>
1304
+ {:desc=>"Limits the list to the specified StackScriptID",
1305
+ :type=>:numeric,
1306
+ :required=>false}}},
1228
1307
  :update=>
1229
1308
  {:type=>:call,
1230
1309
  :desc=>"Update a StackScript.",
1231
1310
  :throws=>["NOTFOUND", "VALIDATION"],
1232
1311
  :params=>
1233
- {:rev_note=>{:desc=>"", :type=>:string, :required=>false},
1234
- :script=>
1235
- {:desc=>"The actual script", :type=>:string, :required=>false},
1312
+ {:description=>{:desc=>"", :type=>:string, :required=>false},
1236
1313
  :distributionidlist=>
1237
1314
  {:desc=>
1238
1315
  "Comma delimited list of DistributionIDs that this script works on ",
1239
1316
  :type=>:string,
1240
1317
  :required=>false},
1241
- :description=>{:desc=>"", :type=>:string, :required=>false},
1242
1318
  :label=>
1243
1319
  {:desc=>"The Label for this StackScript",
1244
1320
  :type=>:string,
1245
1321
  :required=>false},
1322
+ :stackscriptid=>{:desc=>"", :type=>:numeric, :required=>true},
1246
1323
  :ispublic=>
1247
1324
  {:desc=>
1248
1325
  "Whether this StackScript is published in the Library, for everyone to use",
1249
1326
  :type=>:boolean,
1250
1327
  :required=>false},
1251
- :stackscriptid=>{:desc=>"", :type=>:numeric, :required=>true}}},
1252
- :list=>
1253
- {:type=>:call,
1254
- :desc=>"Lists StackScripts you have access to.",
1255
- :throws=>[],
1256
- :params=>
1257
- {:stackscriptid=>
1258
- {:desc=>"Limits the list to the specified StackScriptID",
1259
- :type=>:numeric,
1260
- :required=>false}}}}},
1261
- :api=>
1328
+ :rev_note=>{:desc=>"", :type=>:string, :required=>false},
1329
+ :script=>
1330
+ {:desc=>"The actual script", :type=>:string, :required=>false}}}}},
1331
+ :test=>
1262
1332
  {:type=>:group,
1263
1333
  :subs=>
1264
- {:spec=>
1334
+ {:echo=>
1265
1335
  {:type=>:call,
1266
- :desc=>
1267
- "Returns a data structure of the entire Linode API specification. This method does not require authorization.<br><br>For example: <a target=\"_blank\" href=\"https://api.linode.com/?api_action=api.spec\">https://api.linode.com/?api_action=api.spec</a>",
1336
+ :desc=>"Echos back parameters that were passed in.",
1268
1337
  :throws=>[],
1269
1338
  :params=>{}}}},
1270
- :image=>
1271
- {:type=>:group,
1272
- :subs=>
1273
- {:delete=>
1274
- {:type=>:call,
1275
- :desc=>"Deletes a gold-master image",
1276
- :throws=>["NOTFOUND"],
1277
- :params=>
1278
- {:imageid=>
1279
- {:desc=>"The ID of the gold-master image to delete",
1280
- :type=>:numeric,
1281
- :required=>true}}},
1282
- :list=>
1283
- {:type=>:call,
1284
- :desc=>"Lists available gold-master images",
1285
- :throws=>["NOTFOUND"],
1286
- :params=>
1287
- {:pending=>
1288
- {:desc=>"Show images currently being created.",
1289
- :type=>:numeric,
1290
- :required=>false},
1291
- :imageid=>
1292
- {:desc=>"Request information for a specific gold-master image",
1293
- :type=>:numeric,
1294
- :required=>false}}}}},
1295
1339
  :user=>
1296
1340
  {:type=>:group,
1297
1341
  :subs=>
@@ -1301,28 +1345,20 @@ module LinodeAPI
1301
1345
  "Authenticates a Linode Manager user against their username, password, and two-factor token (when enabled), and then returns a new API key, which can be used until it expires. The number of active keys is limited to 20.",
1302
1346
  :throws=>["AUTHFAIL", " NEEDTOKEN", " PASSWORDEXPIRED", " KEYLIMIT"],
1303
1347
  :params=>
1304
- {:label=>
1305
- {:desc=>"An optional label for this key.",
1306
- :type=>:string,
1307
- :required=>false},
1308
- :expires=>
1348
+ {:expires=>
1309
1349
  {:desc=>
1310
1350
  "Number of hours the key will remain valid, between 0 and 8760. 0 means no expiration. Defaults to 168.",
1311
1351
  :type=>:numeric,
1312
1352
  :required=>false},
1313
- :username=>{:desc=>"", :type=>:string, :required=>true},
1353
+ :label=>
1354
+ {:desc=>"An optional label for this key.",
1355
+ :type=>:string,
1356
+ :required=>false},
1314
1357
  :password=>{:desc=>"", :type=>:string, :required=>true},
1315
1358
  :token=>
1316
1359
  {:desc=>"Required when two-factor authentication is enabled.",
1317
1360
  :type=>:string,
1318
- :required=>false}}}}},
1319
- :test=>
1320
- {:type=>:group,
1321
- :subs=>
1322
- {:echo=>
1323
- {:type=>:call,
1324
- :desc=>"Echos back parameters that were passed in.",
1325
- :throws=>[],
1326
- :params=>{}}}}}}
1361
+ :required=>false},
1362
+ :username=>{:desc=>"", :type=>:string, :required=>true}}}}}}}
1327
1363
 
1328
1364
  end