iron_titan 0.2.17 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.2.17
6
+ OpenAPI spec version: 0.3.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -20,36 +20,102 @@ module IronTitan
20
20
  @api_client = api_client
21
21
  end
22
22
 
23
+ # Get job list by group name.
24
+ # This will list jobs for a particular group.
25
+ # @param group_name Name of group for this set of jobs.
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [DateTime] :created_after Will return jobs created after this time. In RFC3339 format.
28
+ # @option opts [Integer] :n Number of jobs to return.
29
+ # @return [JobsWrapper]
30
+ def groups_group_name_jobs_get(group_name, opts = {})
31
+ data, status_code, headers = groups_group_name_jobs_get_with_http_info(group_name, opts)
32
+ return data
33
+ end
34
+
35
+ # Get job list by group name.
36
+ # This will list jobs for a particular group.
37
+ # @param group_name Name of group for this set of jobs.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [DateTime] :created_after Will return jobs created after this time. In RFC3339 format.
40
+ # @option opts [Integer] :n Number of jobs to return.
41
+ # @return [Array<(JobsWrapper, Fixnum, Hash)>] JobsWrapper data, response status code and response headers
42
+ def groups_group_name_jobs_get_with_http_info(group_name, opts = {})
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_get ..."
45
+ end
46
+
47
+ # verify the required parameter 'group_name' is set
48
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_get" if group_name.nil?
49
+
50
+ # resource path
51
+ local_var_path = "/groups/{group_name}/jobs".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s)
52
+
53
+ # query parameters
54
+ query_params = {}
55
+ query_params[:'created_after'] = opts[:'created_after'] if opts[:'created_after']
56
+ query_params[:'n'] = opts[:'n'] if opts[:'n']
57
+
58
+ # header parameters
59
+ header_params = {}
60
+
61
+ # HTTP header 'Accept' (if needed)
62
+ _header_accept = ['application/json']
63
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
64
+
65
+ # HTTP header 'Content-Type'
66
+ _header_content_type = ['application/json']
67
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
68
+
69
+ # form parameters
70
+ form_params = {}
71
+
72
+ # http body (model)
73
+ post_body = nil
74
+
75
+ auth_names = []
76
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => 'JobsWrapper')
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
23
89
  # Cancel a job.
24
90
  # Cancels a job in delayed, queued or running status. The worker may continue to run a running job. reason is set to `client_request`.
91
+ # @param group_name Name of group for this set of jobs.
25
92
  # @param id Job id
26
- # @param details Human-readable detailed message explaining cancellation reason.
27
93
  # @param [Hash] opts the optional parameters
28
94
  # @return [JobWrapper]
29
- def job_id_cancel_post(id, details, opts = {})
30
- data, status_code, headers = job_id_cancel_post_with_http_info(id, details, opts)
95
+ def groups_group_name_jobs_id_cancel_post(group_name, id, opts = {})
96
+ data, status_code, headers = groups_group_name_jobs_id_cancel_post_with_http_info(group_name, id, opts)
31
97
  return data
32
98
  end
33
99
 
34
100
  # Cancel a job.
35
101
  # Cancels a job in delayed, queued or running status. The worker may continue to run a running job. reason is set to `client_request`.
102
+ # @param group_name Name of group for this set of jobs.
36
103
  # @param id Job id
37
- # @param details Human-readable detailed message explaining cancellation reason.
38
104
  # @param [Hash] opts the optional parameters
39
105
  # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
40
- def job_id_cancel_post_with_http_info(id, details, opts = {})
106
+ def groups_group_name_jobs_id_cancel_post_with_http_info(group_name, id, opts = {})
41
107
  if @api_client.config.debugging
42
- @api_client.config.logger.debug "Calling API: JobsApi#job_id_cancel_post ..."
108
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_cancel_post ..."
43
109
  end
44
110
 
45
- # verify the required parameter 'id' is set
46
- fail "Missing the required parameter 'id' when calling job_id_cancel_post" if id.nil?
111
+ # verify the required parameter 'group_name' is set
112
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_cancel_post" if group_name.nil?
47
113
 
48
- # verify the required parameter 'details' is set
49
- fail "Missing the required parameter 'details' when calling job_id_cancel_post" if details.nil?
114
+ # verify the required parameter 'id' is set
115
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_cancel_post" if id.nil?
50
116
 
51
117
  # resource path
52
- local_var_path = "/job/{id}/cancel".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
118
+ local_var_path = "/groups/{group_name}/jobs/{id}/cancel".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
53
119
 
54
120
  # query parameters
55
121
  query_params = {}
@@ -69,7 +135,7 @@ module IronTitan
69
135
  form_params = {}
70
136
 
71
137
  # http body (model)
72
- post_body = @api_client.object_to_http_body(details)
138
+ post_body = nil
73
139
 
74
140
  auth_names = []
75
141
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
@@ -80,36 +146,41 @@ module IronTitan
80
146
  :auth_names => auth_names,
81
147
  :return_type => 'JobWrapper')
82
148
  if @api_client.config.debugging
83
- @api_client.config.logger.debug "API called: JobsApi#job_id_cancel_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_cancel_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
150
  end
85
151
  return data, status_code, headers
86
152
  end
87
153
 
88
154
  # Delete the job.
89
- # Delete only succeeds if job status is one of `succeeded\n| failed | cancelled`. Cancel a job if it is another state and needs to\nbe deleted. All information about the job, including the log, is\nirretrievably lost when this is invoked.
155
+ # Delete only succeeds if job status is one of `succeeded\n| failed | cancelled`. Cancel a job if it is another state and needs to\nbe deleted. All information about the job, including the log, is\nirretrievably lost when this is invoked.\n
156
+ # @param group_name Name of group for this set of jobs.
90
157
  # @param id Job id
91
158
  # @param [Hash] opts the optional parameters
92
159
  # @return [nil]
93
- def job_id_delete(id, opts = {})
94
- job_id_delete_with_http_info(id, opts)
160
+ def groups_group_name_jobs_id_delete(group_name, id, opts = {})
161
+ groups_group_name_jobs_id_delete_with_http_info(group_name, id, opts)
95
162
  return nil
96
163
  end
97
164
 
98
165
  # Delete the job.
99
- # Delete only succeeds if job status is one of `succeeded\n| failed | cancelled`. Cancel a job if it is another state and needs to\nbe deleted. All information about the job, including the log, is\nirretrievably lost when this is invoked.
166
+ # Delete only succeeds if job status is one of `succeeded\n| failed | cancelled`. Cancel a job if it is another state and needs to\nbe deleted. All information about the job, including the log, is\nirretrievably lost when this is invoked.\n
167
+ # @param group_name Name of group for this set of jobs.
100
168
  # @param id Job id
101
169
  # @param [Hash] opts the optional parameters
102
170
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
103
- def job_id_delete_with_http_info(id, opts = {})
171
+ def groups_group_name_jobs_id_delete_with_http_info(group_name, id, opts = {})
104
172
  if @api_client.config.debugging
105
- @api_client.config.logger.debug "Calling API: JobsApi#job_id_delete ..."
173
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_delete ..."
106
174
  end
107
175
 
176
+ # verify the required parameter 'group_name' is set
177
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_delete" if group_name.nil?
178
+
108
179
  # verify the required parameter 'id' is set
109
- fail "Missing the required parameter 'id' when calling job_id_delete" if id.nil?
180
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_delete" if id.nil?
110
181
 
111
182
  # resource path
112
- local_var_path = "/job/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
183
+ local_var_path = "/groups/{group_name}/jobs/{id}".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
113
184
 
114
185
  # query parameters
115
186
  query_params = {}
@@ -139,51 +210,46 @@ module IronTitan
139
210
  :body => post_body,
140
211
  :auth_names => auth_names)
141
212
  if @api_client.config.debugging
142
- @api_client.config.logger.debug "API called: JobsApi#job_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
213
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
214
  end
144
215
  return data, status_code, headers
145
216
  end
146
217
 
147
218
  # Mark job as failed.
148
219
  # Job is marked as failed if it was in a valid state. Job's `completed_at` time is initialized.
220
+ # @param group_name Name of group for this set of jobs.
149
221
  # @param id Job id
150
222
  # @param reason Reason for job failure.
151
- # @param details Details of job failure.
152
- # @param log Output log for the job. Content-Type must be \&quot;text/plain; charset=utf-8\&quot;.
153
223
  # @param [Hash] opts the optional parameters
154
224
  # @return [JobWrapper]
155
- def job_id_fail_post(id, reason, details, log, opts = {})
156
- data, status_code, headers = job_id_fail_post_with_http_info(id, reason, details, log, opts)
225
+ def groups_group_name_jobs_id_error_post(group_name, id, reason, opts = {})
226
+ data, status_code, headers = groups_group_name_jobs_id_error_post_with_http_info(group_name, id, reason, opts)
157
227
  return data
158
228
  end
159
229
 
160
230
  # Mark job as failed.
161
231
  # Job is marked as failed if it was in a valid state. Job&#39;s `completed_at` time is initialized.
232
+ # @param group_name Name of group for this set of jobs.
162
233
  # @param id Job id
163
234
  # @param reason Reason for job failure.
164
- # @param details Details of job failure.
165
- # @param log Output log for the job. Content-Type must be \&quot;text/plain; charset=utf-8\&quot;.
166
235
  # @param [Hash] opts the optional parameters
167
236
  # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
168
- def job_id_fail_post_with_http_info(id, reason, details, log, opts = {})
237
+ def groups_group_name_jobs_id_error_post_with_http_info(group_name, id, reason, opts = {})
169
238
  if @api_client.config.debugging
170
- @api_client.config.logger.debug "Calling API: JobsApi#job_id_fail_post ..."
239
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_error_post ..."
171
240
  end
172
241
 
242
+ # verify the required parameter 'group_name' is set
243
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_error_post" if group_name.nil?
244
+
173
245
  # verify the required parameter 'id' is set
174
- fail "Missing the required parameter 'id' when calling job_id_fail_post" if id.nil?
246
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_error_post" if id.nil?
175
247
 
176
248
  # verify the required parameter 'reason' is set
177
- fail "Missing the required parameter 'reason' when calling job_id_fail_post" if reason.nil?
178
-
179
- # verify the required parameter 'details' is set
180
- fail "Missing the required parameter 'details' when calling job_id_fail_post" if details.nil?
181
-
182
- # verify the required parameter 'log' is set
183
- fail "Missing the required parameter 'log' when calling job_id_fail_post" if log.nil?
249
+ fail "Missing the required parameter 'reason' when calling groups_group_name_jobs_id_error_post" if reason.nil?
184
250
 
185
251
  # resource path
186
- local_var_path = "/job/{id}/fail".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
252
+ local_var_path = "/groups/{group_name}/jobs/{id}/error".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
187
253
 
188
254
  # query parameters
189
255
  query_params = {}
@@ -196,14 +262,12 @@ module IronTitan
196
262
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
197
263
 
198
264
  # HTTP header 'Content-Type'
199
- _header_content_type = ['multipart/form-data']
265
+ _header_content_type = ['application/json']
200
266
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
201
267
 
202
268
  # form parameters
203
269
  form_params = {}
204
270
  form_params["reason"] = reason
205
- form_params["details"] = details
206
- form_params["log"] = log
207
271
 
208
272
  # http body (model)
209
273
  post_body = nil
@@ -217,36 +281,41 @@ module IronTitan
217
281
  :auth_names => auth_names,
218
282
  :return_type => 'JobWrapper')
219
283
  if @api_client.config.debugging
220
- @api_client.config.logger.debug "API called: JobsApi#job_id_fail_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
284
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_error_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
285
  end
222
286
  return data, status_code, headers
223
287
  end
224
288
 
225
289
  # Gets job by id
226
290
  # Gets a job by id.
291
+ # @param group_name Name of group for this set of jobs.
227
292
  # @param id Job id
228
293
  # @param [Hash] opts the optional parameters
229
294
  # @return [JobWrapper]
230
- def job_id_get(id, opts = {})
231
- data, status_code, headers = job_id_get_with_http_info(id, opts)
295
+ def groups_group_name_jobs_id_get(group_name, id, opts = {})
296
+ data, status_code, headers = groups_group_name_jobs_id_get_with_http_info(group_name, id, opts)
232
297
  return data
233
298
  end
234
299
 
235
300
  # Gets job by id
236
301
  # Gets a job by id.
302
+ # @param group_name Name of group for this set of jobs.
237
303
  # @param id Job id
238
304
  # @param [Hash] opts the optional parameters
239
305
  # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
240
- def job_id_get_with_http_info(id, opts = {})
306
+ def groups_group_name_jobs_id_get_with_http_info(group_name, id, opts = {})
241
307
  if @api_client.config.debugging
242
- @api_client.config.logger.debug "Calling API: JobsApi#job_id_get ..."
308
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_get ..."
243
309
  end
244
310
 
311
+ # verify the required parameter 'group_name' is set
312
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_get" if group_name.nil?
313
+
245
314
  # verify the required parameter 'id' is set
246
- fail "Missing the required parameter 'id' when calling job_id_get" if id.nil?
315
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_get" if id.nil?
247
316
 
248
317
  # resource path
249
- local_var_path = "/job/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
318
+ local_var_path = "/groups/{group_name}/jobs/{id}".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
250
319
 
251
320
  # query parameters
252
321
  query_params = {}
@@ -277,36 +346,41 @@ module IronTitan
277
346
  :auth_names => auth_names,
278
347
  :return_type => 'JobWrapper')
279
348
  if @api_client.config.debugging
280
- @api_client.config.logger.debug "API called: JobsApi#job_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
349
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
281
350
  end
282
351
  return data, status_code, headers
283
352
  end
284
353
 
285
354
  # Get the log of a completed job.
286
355
  # Retrieves the log from log storage.
356
+ # @param group_name Name of group for this set of jobs.
287
357
  # @param id Job id
288
358
  # @param [Hash] opts the optional parameters
289
359
  # @return [String]
290
- def job_id_log_get(id, opts = {})
291
- data, status_code, headers = job_id_log_get_with_http_info(id, opts)
360
+ def groups_group_name_jobs_id_log_get(group_name, id, opts = {})
361
+ data, status_code, headers = groups_group_name_jobs_id_log_get_with_http_info(group_name, id, opts)
292
362
  return data
293
363
  end
294
364
 
295
365
  # Get the log of a completed job.
296
366
  # Retrieves the log from log storage.
367
+ # @param group_name Name of group for this set of jobs.
297
368
  # @param id Job id
298
369
  # @param [Hash] opts the optional parameters
299
370
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
300
- def job_id_log_get_with_http_info(id, opts = {})
371
+ def groups_group_name_jobs_id_log_get_with_http_info(group_name, id, opts = {})
301
372
  if @api_client.config.debugging
302
- @api_client.config.logger.debug "Calling API: JobsApi#job_id_log_get ..."
373
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_log_get ..."
303
374
  end
304
375
 
376
+ # verify the required parameter 'group_name' is set
377
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_log_get" if group_name.nil?
378
+
305
379
  # verify the required parameter 'id' is set
306
- fail "Missing the required parameter 'id' when calling job_id_log_get" if id.nil?
380
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_log_get" if id.nil?
307
381
 
308
382
  # resource path
309
- local_var_path = "/job/{id}/log".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
383
+ local_var_path = "/groups/{group_name}/jobs/{id}/log".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
310
384
 
311
385
  # query parameters
312
386
  query_params = {}
@@ -337,41 +411,46 @@ module IronTitan
337
411
  :auth_names => auth_names,
338
412
  :return_type => 'String')
339
413
  if @api_client.config.debugging
340
- @api_client.config.logger.debug "API called: JobsApi#job_id_log_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
414
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_log_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
341
415
  end
342
416
  return data, status_code, headers
343
417
  end
344
418
 
345
- # Update a job
346
- # Typically used to update status on error/completion. TODO: only allow 'status' field.
419
+ # Send in a log for storage.
420
+ # Logs are sent after a job completes since they may be very large and the runner can process the next job.
421
+ # @param group_name Name of group for this set of jobs.
347
422
  # @param id Job id
348
- # @param body Job data to post
423
+ # @param log Output log for the job. Content-Type must be \&quot;text/plain; charset=utf-8\&quot;.
349
424
  # @param [Hash] opts the optional parameters
350
425
  # @return [JobWrapper]
351
- def job_id_patch(id, body, opts = {})
352
- data, status_code, headers = job_id_patch_with_http_info(id, body, opts)
426
+ def groups_group_name_jobs_id_log_post(group_name, id, log, opts = {})
427
+ data, status_code, headers = groups_group_name_jobs_id_log_post_with_http_info(group_name, id, log, opts)
353
428
  return data
354
429
  end
355
430
 
356
- # Update a job
357
- # Typically used to update status on error/completion. TODO: only allow &#39;status&#39; field.
431
+ # Send in a log for storage.
432
+ # Logs are sent after a job completes since they may be very large and the runner can process the next job.
433
+ # @param group_name Name of group for this set of jobs.
358
434
  # @param id Job id
359
- # @param body Job data to post
435
+ # @param log Output log for the job. Content-Type must be \&quot;text/plain; charset=utf-8\&quot;.
360
436
  # @param [Hash] opts the optional parameters
361
437
  # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
362
- def job_id_patch_with_http_info(id, body, opts = {})
438
+ def groups_group_name_jobs_id_log_post_with_http_info(group_name, id, log, opts = {})
363
439
  if @api_client.config.debugging
364
- @api_client.config.logger.debug "Calling API: JobsApi#job_id_patch ..."
440
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_log_post ..."
365
441
  end
366
442
 
443
+ # verify the required parameter 'group_name' is set
444
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_log_post" if group_name.nil?
445
+
367
446
  # verify the required parameter 'id' is set
368
- fail "Missing the required parameter 'id' when calling job_id_patch" if id.nil?
447
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_log_post" if id.nil?
369
448
 
370
- # verify the required parameter 'body' is set
371
- fail "Missing the required parameter 'body' when calling job_id_patch" if body.nil?
449
+ # verify the required parameter 'log' is set
450
+ fail "Missing the required parameter 'log' when calling groups_group_name_jobs_id_log_post" if log.nil?
372
451
 
373
452
  # resource path
374
- local_var_path = "/job/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
453
+ local_var_path = "/groups/{group_name}/jobs/{id}/log".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
375
454
 
376
455
  # query parameters
377
456
  query_params = {}
@@ -384,17 +463,18 @@ module IronTitan
384
463
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
385
464
 
386
465
  # HTTP header 'Content-Type'
387
- _header_content_type = ['application/json']
466
+ _header_content_type = ['multipart/form-data']
388
467
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
389
468
 
390
469
  # form parameters
391
470
  form_params = {}
471
+ form_params["log"] = log
392
472
 
393
473
  # http body (model)
394
- post_body = @api_client.object_to_http_body(body)
474
+ post_body = nil
395
475
 
396
476
  auth_names = []
397
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
477
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
398
478
  :header_params => header_params,
399
479
  :query_params => query_params,
400
480
  :form_params => form_params,
@@ -402,36 +482,41 @@ module IronTitan
402
482
  :auth_names => auth_names,
403
483
  :return_type => 'JobWrapper')
404
484
  if @api_client.config.debugging
405
- @api_client.config.logger.debug "API called: JobsApi#job_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
485
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_log_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
406
486
  end
407
487
  return data, status_code, headers
408
488
  end
409
489
 
410
490
  # Retry a job.
411
- # The /retry endpoint can be used to force a retry of jobs with status succeeded or cancelled. It can also be used to retry jobs that in the failed state, but whose max_retries field is 0. The retried job will continue to have max_retries = 0.
491
+ # \"The /retry endpoint can be used to force a retry of jobs\nwith status succeeded or cancelled. It can also be used to retry jobs\nthat in the failed state, but whose max_retries field is 0. The retried\njob will continue to have max_retries = 0.\"\n
492
+ # @param group_name Name of group for this set of jobs.
412
493
  # @param id Job id
413
494
  # @param [Hash] opts the optional parameters
414
495
  # @return [JobWrapper]
415
- def job_id_retry_post(id, opts = {})
416
- data, status_code, headers = job_id_retry_post_with_http_info(id, opts)
496
+ def groups_group_name_jobs_id_retry_post(group_name, id, opts = {})
497
+ data, status_code, headers = groups_group_name_jobs_id_retry_post_with_http_info(group_name, id, opts)
417
498
  return data
418
499
  end
419
500
 
420
501
  # Retry a job.
421
- # The /retry endpoint can be used to force a retry of jobs with status succeeded or cancelled. It can also be used to retry jobs that in the failed state, but whose max_retries field is 0. The retried job will continue to have max_retries = 0.
502
+ # \&quot;The /retry endpoint can be used to force a retry of jobs\nwith status succeeded or cancelled. It can also be used to retry jobs\nthat in the failed state, but whose max_retries field is 0. The retried\njob will continue to have max_retries = 0.\&quot;\n
503
+ # @param group_name Name of group for this set of jobs.
422
504
  # @param id Job id
423
505
  # @param [Hash] opts the optional parameters
424
506
  # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
425
- def job_id_retry_post_with_http_info(id, opts = {})
507
+ def groups_group_name_jobs_id_retry_post_with_http_info(group_name, id, opts = {})
426
508
  if @api_client.config.debugging
427
- @api_client.config.logger.debug "Calling API: JobsApi#job_id_retry_post ..."
509
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_retry_post ..."
428
510
  end
429
511
 
512
+ # verify the required parameter 'group_name' is set
513
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_retry_post" if group_name.nil?
514
+
430
515
  # verify the required parameter 'id' is set
431
- fail "Missing the required parameter 'id' when calling job_id_retry_post" if id.nil?
516
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_retry_post" if id.nil?
432
517
 
433
518
  # resource path
434
- local_var_path = "/job/{id}/retry".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
519
+ local_var_path = "/groups/{group_name}/jobs/{id}/retry".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
435
520
 
436
521
  # query parameters
437
522
  query_params = {}
@@ -462,41 +547,41 @@ module IronTitan
462
547
  :auth_names => auth_names,
463
548
  :return_type => 'JobWrapper')
464
549
  if @api_client.config.debugging
465
- @api_client.config.logger.debug "API called: JobsApi#job_id_retry_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
550
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_retry_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
466
551
  end
467
552
  return data, status_code, headers
468
553
  end
469
554
 
470
555
  # Mark job as succeeded.
471
556
  # Job status is changed to succeeded if it was in a valid state before. Job's `completed_at` time is initialized.
557
+ # @param group_name Name of group for this set of jobs.
472
558
  # @param id Job id
473
- # @param log Output log for the job. Content-Type must be \&quot;text/plain; charset=utf-8\&quot;.
474
559
  # @param [Hash] opts the optional parameters
475
560
  # @return [JobWrapper]
476
- def job_id_success_post(id, log, opts = {})
477
- data, status_code, headers = job_id_success_post_with_http_info(id, log, opts)
561
+ def groups_group_name_jobs_id_success_post(group_name, id, opts = {})
562
+ data, status_code, headers = groups_group_name_jobs_id_success_post_with_http_info(group_name, id, opts)
478
563
  return data
479
564
  end
480
565
 
481
566
  # Mark job as succeeded.
482
567
  # Job status is changed to succeeded if it was in a valid state before. Job&#39;s `completed_at` time is initialized.
568
+ # @param group_name Name of group for this set of jobs.
483
569
  # @param id Job id
484
- # @param log Output log for the job. Content-Type must be \&quot;text/plain; charset=utf-8\&quot;.
485
570
  # @param [Hash] opts the optional parameters
486
571
  # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
487
- def job_id_success_post_with_http_info(id, log, opts = {})
572
+ def groups_group_name_jobs_id_success_post_with_http_info(group_name, id, opts = {})
488
573
  if @api_client.config.debugging
489
- @api_client.config.logger.debug "Calling API: JobsApi#job_id_success_post ..."
574
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_success_post ..."
490
575
  end
491
576
 
492
- # verify the required parameter 'id' is set
493
- fail "Missing the required parameter 'id' when calling job_id_success_post" if id.nil?
577
+ # verify the required parameter 'group_name' is set
578
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_success_post" if group_name.nil?
494
579
 
495
- # verify the required parameter 'log' is set
496
- fail "Missing the required parameter 'log' when calling job_id_success_post" if log.nil?
580
+ # verify the required parameter 'id' is set
581
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_success_post" if id.nil?
497
582
 
498
583
  # resource path
499
- local_var_path = "/job/{id}/success".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
584
+ local_var_path = "/groups/{group_name}/jobs/{id}/success".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
500
585
 
501
586
  # query parameters
502
587
  query_params = {}
@@ -509,12 +594,11 @@ module IronTitan
509
594
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
510
595
 
511
596
  # HTTP header 'Content-Type'
512
- _header_content_type = ['multipart/form-data']
597
+ _header_content_type = ['application/json']
513
598
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
514
599
 
515
600
  # form parameters
516
601
  form_params = {}
517
- form_params["log"] = log
518
602
 
519
603
  # http body (model)
520
604
  post_body = nil
@@ -528,36 +612,41 @@ module IronTitan
528
612
  :auth_names => auth_names,
529
613
  :return_type => 'JobWrapper')
530
614
  if @api_client.config.debugging
531
- @api_client.config.logger.debug "API called: JobsApi#job_id_success_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
615
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_success_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
532
616
  end
533
617
  return data, status_code, headers
534
618
  end
535
619
 
536
620
  # Extend job timeout.
537
- # Consumers can sometimes take a while to run the task after accepting it. An example is when the runner does not have the docker image locally, it can spend a significant time downloading the image.\nIf the timeout is small, the job may never get to run, or run but not be accepted by Titan. Consumers can touch the job before it times out. Titan will reset the timeout, giving the consumer another timeout seconds to run the job.\nTouch is only valid while the job is in a running state. If touch fails, the runner may stop running the job.
621
+ # Consumers can sometimes take a while to run the task after accepting it. An example is when the runner does not have the docker image locally, it can spend a significant time downloading the image.\nIf the timeout is small, the job may never get to run, or run but not be accepted by Titan. Consumers can touch the job before it times out. Titan will reset the timeout, giving the consumer another timeout seconds to run the job.\nTouch is only valid while the job is in a running state. If touch fails, the runner may stop running the job.\n
622
+ # @param group_name Name of group for this set of jobs.
538
623
  # @param id Job id
539
624
  # @param [Hash] opts the optional parameters
540
625
  # @return [nil]
541
- def job_id_touch_post(id, opts = {})
542
- job_id_touch_post_with_http_info(id, opts)
626
+ def groups_group_name_jobs_id_touch_post(group_name, id, opts = {})
627
+ groups_group_name_jobs_id_touch_post_with_http_info(group_name, id, opts)
543
628
  return nil
544
629
  end
545
630
 
546
631
  # Extend job timeout.
547
- # Consumers can sometimes take a while to run the task after accepting it. An example is when the runner does not have the docker image locally, it can spend a significant time downloading the image.\nIf the timeout is small, the job may never get to run, or run but not be accepted by Titan. Consumers can touch the job before it times out. Titan will reset the timeout, giving the consumer another timeout seconds to run the job.\nTouch is only valid while the job is in a running state. If touch fails, the runner may stop running the job.
632
+ # Consumers can sometimes take a while to run the task after accepting it. An example is when the runner does not have the docker image locally, it can spend a significant time downloading the image.\nIf the timeout is small, the job may never get to run, or run but not be accepted by Titan. Consumers can touch the job before it times out. Titan will reset the timeout, giving the consumer another timeout seconds to run the job.\nTouch is only valid while the job is in a running state. If touch fails, the runner may stop running the job.\n
633
+ # @param group_name Name of group for this set of jobs.
548
634
  # @param id Job id
549
635
  # @param [Hash] opts the optional parameters
550
636
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
551
- def job_id_touch_post_with_http_info(id, opts = {})
637
+ def groups_group_name_jobs_id_touch_post_with_http_info(group_name, id, opts = {})
552
638
  if @api_client.config.debugging
553
- @api_client.config.logger.debug "Calling API: JobsApi#job_id_touch_post ..."
639
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_touch_post ..."
554
640
  end
555
641
 
642
+ # verify the required parameter 'group_name' is set
643
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_touch_post" if group_name.nil?
644
+
556
645
  # verify the required parameter 'id' is set
557
- fail "Missing the required parameter 'id' when calling job_id_touch_post" if id.nil?
646
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_touch_post" if id.nil?
558
647
 
559
648
  # resource path
560
- local_var_path = "/job/{id}/touch".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
649
+ local_var_path = "/groups/{group_name}/jobs/{id}/touch".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
561
650
 
562
651
  # query parameters
563
652
  query_params = {}
@@ -587,37 +676,44 @@ module IronTitan
587
676
  :body => post_body,
588
677
  :auth_names => auth_names)
589
678
  if @api_client.config.debugging
590
- @api_client.config.logger.debug "API called: JobsApi#job_id_touch_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
679
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_touch_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
591
680
  end
592
681
  return data, status_code, headers
593
682
  end
594
683
 
595
- # Get next job.
596
- # Gets the next job in the queue, ready for processing. Titan may return <=n jobs. Consumers should start processing jobs in order. Each returned job is set to `status` \"running\" and `started_at` is set to the current time. No other consumer can retrieve this job.
684
+ # Enqueue Job
685
+ # Enqueues job(s). If any of the jobs is invalid, none of the jobs are enqueued.\n
686
+ # @param group_name name of the group.
687
+ # @param body Array of jobs to post.
597
688
  # @param [Hash] opts the optional parameters
598
- # @option opts [Integer] :n Number of jobs to return. (default to 1)
599
689
  # @return [JobsWrapper]
600
- def jobs_consume_get(opts = {})
601
- data, status_code, headers = jobs_consume_get_with_http_info(opts)
690
+ def groups_group_name_jobs_post(group_name, body, opts = {})
691
+ data, status_code, headers = groups_group_name_jobs_post_with_http_info(group_name, body, opts)
602
692
  return data
603
693
  end
604
694
 
605
- # Get next job.
606
- # Gets the next job in the queue, ready for processing. Titan may return &lt;=n jobs. Consumers should start processing jobs in order. Each returned job is set to `status` \&quot;running\&quot; and `started_at` is set to the current time. No other consumer can retrieve this job.
695
+ # Enqueue Job
696
+ # Enqueues job(s). If any of the jobs is invalid, none of the jobs are enqueued.\n
697
+ # @param group_name name of the group.
698
+ # @param body Array of jobs to post.
607
699
  # @param [Hash] opts the optional parameters
608
- # @option opts [Integer] :n Number of jobs to return.
609
700
  # @return [Array<(JobsWrapper, Fixnum, Hash)>] JobsWrapper data, response status code and response headers
610
- def jobs_consume_get_with_http_info(opts = {})
701
+ def groups_group_name_jobs_post_with_http_info(group_name, body, opts = {})
611
702
  if @api_client.config.debugging
612
- @api_client.config.logger.debug "Calling API: JobsApi#jobs_consume_get ..."
703
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_post ..."
613
704
  end
614
705
 
706
+ # verify the required parameter 'group_name' is set
707
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_post" if group_name.nil?
708
+
709
+ # verify the required parameter 'body' is set
710
+ fail "Missing the required parameter 'body' when calling groups_group_name_jobs_post" if body.nil?
711
+
615
712
  # resource path
616
- local_var_path = "/jobs/consume".sub('{format}','json')
713
+ local_var_path = "/groups/{group_name}/jobs".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s)
617
714
 
618
715
  # query parameters
619
716
  query_params = {}
620
- query_params[:'n'] = opts[:'n'] if opts[:'n']
621
717
 
622
718
  # header parameters
623
719
  header_params = {}
@@ -634,10 +730,10 @@ module IronTitan
634
730
  form_params = {}
635
731
 
636
732
  # http body (model)
637
- post_body = nil
733
+ post_body = @api_client.object_to_http_body(body)
638
734
 
639
735
  auth_names = []
640
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
736
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
641
737
  :header_params => header_params,
642
738
  :query_params => query_params,
643
739
  :form_params => form_params,
@@ -645,25 +741,25 @@ module IronTitan
645
741
  :auth_names => auth_names,
646
742
  :return_type => 'JobsWrapper')
647
743
  if @api_client.config.debugging
648
- @api_client.config.logger.debug "API called: JobsApi#jobs_consume_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
744
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
649
745
  end
650
746
  return data, status_code, headers
651
747
  end
652
748
 
653
- # Peek at list of jobs.
654
- # Get a list of active jobs. This endpoint can be used to observe the state of jobs in Titan. To run a job, use /jobs/consume. TODO: Needs pagination support.
749
+ # Get next job.
750
+ # Gets the next job in the queue, ready for processing. Titan may return <=n jobs. Consumers should start processing jobs in order. Each returned job is set to `status` \"running\" and `started_at` is set to the current time. No other consumer can retrieve this job.
655
751
  # @param [Hash] opts the optional parameters
656
- # @option opts [Integer] :n Number of jobs to return. Titan may return &lt;=n jobs. Titan does not make any guarantees about job ordering, but jobs will not be repeated. To make sure you get unique jobs, use the cursor effectively. TODO: We don&#39;t actually support pagination. (default to 10)
752
+ # @option opts [Integer] :n Number of jobs to return. (default to 1)
657
753
  # @return [JobsWrapper]
658
754
  def jobs_get(opts = {})
659
755
  data, status_code, headers = jobs_get_with_http_info(opts)
660
756
  return data
661
757
  end
662
758
 
663
- # Peek at list of jobs.
664
- # Get a list of active jobs. This endpoint can be used to observe the state of jobs in Titan. To run a job, use /jobs/consume. TODO: Needs pagination support.
759
+ # Get next job.
760
+ # Gets the next job in the queue, ready for processing. Titan may return &lt;=n jobs. Consumers should start processing jobs in order. Each returned job is set to `status` \&quot;running\&quot; and `started_at` is set to the current time. No other consumer can retrieve this job.
665
761
  # @param [Hash] opts the optional parameters
666
- # @option opts [Integer] :n Number of jobs to return. Titan may return &lt;=n jobs. Titan does not make any guarantees about job ordering, but jobs will not be repeated. To make sure you get unique jobs, use the cursor effectively. TODO: We don&#39;t actually support pagination.
762
+ # @option opts [Integer] :n Number of jobs to return.
667
763
  # @return [Array<(JobsWrapper, Fixnum, Hash)>] JobsWrapper data, response status code and response headers
668
764
  def jobs_get_with_http_info(opts = {})
669
765
  if @api_client.config.debugging
@@ -707,65 +803,5 @@ module IronTitan
707
803
  end
708
804
  return data, status_code, headers
709
805
  end
710
-
711
- # Enqueue Job
712
- # Enqueues job(s). If any of the jobs is invalid, none of the jobs are enqueued.
713
- # @param body Array of jobs to post.
714
- # @param [Hash] opts the optional parameters
715
- # @return [JobsWrapper]
716
- def jobs_post(body, opts = {})
717
- data, status_code, headers = jobs_post_with_http_info(body, opts)
718
- return data
719
- end
720
-
721
- # Enqueue Job
722
- # Enqueues job(s). If any of the jobs is invalid, none of the jobs are enqueued.
723
- # @param body Array of jobs to post.
724
- # @param [Hash] opts the optional parameters
725
- # @return [Array<(JobsWrapper, Fixnum, Hash)>] JobsWrapper data, response status code and response headers
726
- def jobs_post_with_http_info(body, opts = {})
727
- if @api_client.config.debugging
728
- @api_client.config.logger.debug "Calling API: JobsApi#jobs_post ..."
729
- end
730
-
731
- # verify the required parameter 'body' is set
732
- fail "Missing the required parameter 'body' when calling jobs_post" if body.nil?
733
-
734
- # resource path
735
- local_var_path = "/jobs".sub('{format}','json')
736
-
737
- # query parameters
738
- query_params = {}
739
-
740
- # header parameters
741
- header_params = {}
742
-
743
- # HTTP header 'Accept' (if needed)
744
- _header_accept = ['application/json']
745
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
746
-
747
- # HTTP header 'Content-Type'
748
- _header_content_type = ['application/json']
749
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
750
-
751
- # form parameters
752
- form_params = {}
753
-
754
- # http body (model)
755
- post_body = @api_client.object_to_http_body(body)
756
-
757
- auth_names = []
758
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
759
- :header_params => header_params,
760
- :query_params => query_params,
761
- :form_params => form_params,
762
- :body => post_body,
763
- :auth_names => auth_names,
764
- :return_type => 'JobsWrapper')
765
- if @api_client.config.debugging
766
- @api_client.config.logger.debug "API called: JobsApi#jobs_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
767
- end
768
- return data, status_code, headers
769
- end
770
806
  end
771
807
  end