iron_titan 0.3.1 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -7
  3. data/lib/iron_titan/api/groups_api.rb +61 -1
  4. data/lib/iron_titan/api/jobs_api.rb +54 -50
  5. data/lib/iron_titan/api/runner_api.rb +233 -0
  6. data/lib/iron_titan/api_client.rb +1 -1
  7. data/lib/iron_titan/api_error.rb +1 -1
  8. data/lib/iron_titan/models/complete.rb +184 -0
  9. data/lib/iron_titan/models/error.rb +1 -1
  10. data/lib/iron_titan/models/error_body.rb +1 -1
  11. data/lib/iron_titan/models/group.rb +1 -1
  12. data/lib/iron_titan/models/group_wrapper.rb +1 -1
  13. data/lib/iron_titan/models/groups_wrapper.rb +1 -1
  14. data/lib/iron_titan/models/id_status.rb +1 -1
  15. data/lib/iron_titan/models/job.rb +31 -12
  16. data/lib/iron_titan/models/job_wrapper.rb +1 -1
  17. data/lib/iron_titan/models/jobs_wrapper.rb +1 -1
  18. data/lib/iron_titan/models/new_job.rb +2 -4
  19. data/lib/iron_titan/models/new_jobs_wrapper.rb +1 -1
  20. data/lib/iron_titan/models/reason.rb +30 -18
  21. data/lib/iron_titan/models/start.rb +162 -0
  22. data/lib/iron_titan/version.rb +2 -2
  23. data/lib/iron_titan.rb +4 -2
  24. data/spec/api/groups_api_spec.rb +17 -1
  25. data/spec/api/jobs_api_spec.rb +14 -13
  26. data/spec/api/runner_api_spec.rb +89 -0
  27. data/spec/models/complete_spec.rb +66 -0
  28. data/spec/models/error_body_spec.rb +1 -1
  29. data/spec/models/{Error_spec.rb → error_spec.rb} +1 -1
  30. data/spec/models/group_spec.rb +1 -1
  31. data/spec/models/group_wrapper_spec.rb +1 -1
  32. data/spec/models/groups_wrapper_spec.rb +1 -1
  33. data/spec/models/id_status_spec.rb +1 -1
  34. data/spec/models/{Job_spec.rb → job_spec.rb} +12 -2
  35. data/spec/models/job_wrapper_spec.rb +1 -1
  36. data/spec/models/jobs_wrapper_spec.rb +1 -1
  37. data/spec/models/new_job_spec.rb +1 -1
  38. data/spec/models/new_jobs_wrapper_spec.rb +1 -1
  39. data/spec/models/reason_spec.rb +1 -1
  40. data/spec/models/start_spec.rb +46 -0
  41. metadata +15 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37b5e69a4316e0efc101a450c307e918b0bc7041
4
- data.tar.gz: 4e638ccf5e149139fb5318a77400d680d61243a3
3
+ metadata.gz: c580a0e734b4ce546775451aaa76458f4de4d959
4
+ data.tar.gz: 919bc08175ebc863a7133592871f0449029d0f44
5
5
  SHA512:
6
- metadata.gz: e71e6d0eab1656a8db9f1925b9aa0289f272b9f20cbdefa0c4f024feb20c72373eba390ddbcceaeb8f938973bc0380697ee06320387223df28f07e1d2086a8eb
7
- data.tar.gz: 574fd4ee626bcd18ba4a01f9c2896e64bf3c732120c40b676b8b97fac0d43ed9f165bd676bf81fafad019d365c82c9f7c2ecc509c3f4fdd67edff362fb617a98
6
+ metadata.gz: 42ced80684affb1b5acf27264ffe0357ac687b094bcba8ffb14d65e5d16a7dc97687b9cabca70ca1dd42a79d2c23deee22ac094bbf8a168ec8642299ed8a7139
7
+ data.tar.gz: 7604be253f5871678351f6235f64b4db537284a3283fff9ab14b8c704b87cc6efc9212ce3a0cf9c82713796a45e9667343e772c7f6ddd4c2d95dc0dbdc6b0bc0
data/README.md CHANGED
@@ -6,9 +6,9 @@ The ultimate, language agnostic, container based job processing framework.
6
6
 
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
- - API version: 0.3.2
10
- - Package version: 0.3.1
11
- - Build date: 2016-04-06T10:53:48.508Z
9
+ - API version: 0.3.7
10
+ - Package version: 0.3.7
11
+ - Build date: 2016-04-25T19:37:52.226Z
12
12
  - Build package: class io.swagger.codegen.languages.RubyClientCodegen
13
13
 
14
14
  ## Installation
@@ -24,14 +24,14 @@ gem build iron_titan.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./iron_titan-0.3.1.gem
27
+ gem install ./iron_titan-0.3.7.gem
28
28
  ```
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'iron_titan', '~> 0.3.1'
34
+ gem 'iron_titan', '~> 0.3.7'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
74
74
  ------------ | ------------- | ------------- | -------------
75
75
  *IronTitan::GroupsApi* | [**groups_get**](docs/GroupsApi.md#groups_get) | **GET** /groups | Get all group names.
76
76
  *IronTitan::GroupsApi* | [**groups_name_get**](docs/GroupsApi.md#groups_name_get) | **GET** /groups/{name} | Get information for a group.
77
+ *IronTitan::GroupsApi* | [**groups_post**](docs/GroupsApi.md#groups_post) | **POST** /groups | Post new group
77
78
  *IronTitan::JobsApi* | [**groups_group_name_jobs_get**](docs/JobsApi.md#groups_group_name_jobs_get) | **GET** /groups/{group_name}/jobs | Get job list by group name.
78
79
  *IronTitan::JobsApi* | [**groups_group_name_jobs_id_cancel_post**](docs/JobsApi.md#groups_group_name_jobs_id_cancel_post) | **POST** /groups/{group_name}/jobs/{id}/cancel | Cancel a job.
79
80
  *IronTitan::JobsApi* | [**groups_group_name_jobs_id_delete**](docs/JobsApi.md#groups_group_name_jobs_id_delete) | **DELETE** /groups/{group_name}/jobs/{id} | Delete the job.
@@ -81,16 +82,20 @@ Class | Method | HTTP request | Description
81
82
  *IronTitan::JobsApi* | [**groups_group_name_jobs_id_get**](docs/JobsApi.md#groups_group_name_jobs_id_get) | **GET** /groups/{group_name}/jobs/{id} | Gets job by id
82
83
  *IronTitan::JobsApi* | [**groups_group_name_jobs_id_log_get**](docs/JobsApi.md#groups_group_name_jobs_id_log_get) | **GET** /groups/{group_name}/jobs/{id}/log | Get the log of a completed job.
83
84
  *IronTitan::JobsApi* | [**groups_group_name_jobs_id_log_post**](docs/JobsApi.md#groups_group_name_jobs_id_log_post) | **POST** /groups/{group_name}/jobs/{id}/log | Send in a log for storage.
84
- *IronTitan::JobsApi* | [**groups_group_name_jobs_id_patch**](docs/JobsApi.md#groups_group_name_jobs_id_patch) | **PATCH** /groups/{group_name}/jobs/{id} | Update a job
85
85
  *IronTitan::JobsApi* | [**groups_group_name_jobs_id_retry_post**](docs/JobsApi.md#groups_group_name_jobs_id_retry_post) | **POST** /groups/{group_name}/jobs/{id}/retry | Retry a job.
86
+ *IronTitan::JobsApi* | [**groups_group_name_jobs_id_start_post**](docs/JobsApi.md#groups_group_name_jobs_id_start_post) | **POST** /groups/{group_name}/jobs/{id}/start | Mark job as started, ie: status = 'running'
86
87
  *IronTitan::JobsApi* | [**groups_group_name_jobs_id_success_post**](docs/JobsApi.md#groups_group_name_jobs_id_success_post) | **POST** /groups/{group_name}/jobs/{id}/success | Mark job as succeeded.
87
88
  *IronTitan::JobsApi* | [**groups_group_name_jobs_id_touch_post**](docs/JobsApi.md#groups_group_name_jobs_id_touch_post) | **POST** /groups/{group_name}/jobs/{id}/touch | Extend job timeout.
88
89
  *IronTitan::JobsApi* | [**groups_group_name_jobs_post**](docs/JobsApi.md#groups_group_name_jobs_post) | **POST** /groups/{group_name}/jobs | Enqueue Job
89
90
  *IronTitan::JobsApi* | [**jobs_get**](docs/JobsApi.md#jobs_get) | **GET** /jobs | Get next job.
91
+ *IronTitan::RunnerApi* | [**groups_group_name_jobs_id_error_post**](docs/RunnerApi.md#groups_group_name_jobs_id_error_post) | **POST** /groups/{group_name}/jobs/{id}/error | Mark job as failed.
92
+ *IronTitan::RunnerApi* | [**groups_group_name_jobs_id_start_post**](docs/RunnerApi.md#groups_group_name_jobs_id_start_post) | **POST** /groups/{group_name}/jobs/{id}/start | Mark job as started, ie: status = 'running'
93
+ *IronTitan::RunnerApi* | [**groups_group_name_jobs_id_success_post**](docs/RunnerApi.md#groups_group_name_jobs_id_success_post) | **POST** /groups/{group_name}/jobs/{id}/success | Mark job as succeeded.
90
94
 
91
95
 
92
96
  ## Documentation for Models
93
97
 
98
+ - [IronTitan::Complete](docs/Complete.md)
94
99
  - [IronTitan::Error](docs/Error.md)
95
100
  - [IronTitan::ErrorBody](docs/ErrorBody.md)
96
101
  - [IronTitan::Group](docs/Group.md)
@@ -102,7 +107,7 @@ Class | Method | HTTP request | Description
102
107
  - [IronTitan::JobsWrapper](docs/JobsWrapper.md)
103
108
  - [IronTitan::NewJob](docs/NewJob.md)
104
109
  - [IronTitan::NewJobsWrapper](docs/NewJobsWrapper.md)
105
- - [IronTitan::Reason](docs/Reason.md)
110
+ - [IronTitan::Start](docs/Start.md)
106
111
 
107
112
 
108
113
  ## Documentation for Authorization
@@ -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.3.2
6
+ OpenAPI spec version: 0.3.7
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -134,5 +134,65 @@ module IronTitan
134
134
  end
135
135
  return data, status_code, headers
136
136
  end
137
+
138
+ # Post new group
139
+ # Insert a new job group
140
+ # @param body Group to post.
141
+ # @param [Hash] opts the optional parameters
142
+ # @return [GroupWrapper]
143
+ def groups_post(body, opts = {})
144
+ data, status_code, headers = groups_post_with_http_info(body, opts)
145
+ return data
146
+ end
147
+
148
+ # Post new group
149
+ # Insert a new job group
150
+ # @param body Group to post.
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
153
+ def groups_post_with_http_info(body, opts = {})
154
+ if @api_client.config.debugging
155
+ @api_client.config.logger.debug "Calling API: GroupsApi#groups_post ..."
156
+ end
157
+
158
+ # verify the required parameter 'body' is set
159
+ fail "Missing the required parameter 'body' when calling groups_post" if body.nil?
160
+
161
+ # resource path
162
+ local_var_path = "/groups".sub('{format}','json')
163
+
164
+ # query parameters
165
+ query_params = {}
166
+
167
+ # header parameters
168
+ header_params = {}
169
+
170
+ # HTTP header 'Accept' (if needed)
171
+ _header_accept = ['application/json']
172
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
173
+
174
+ # HTTP header 'Content-Type'
175
+ _header_content_type = ['application/json']
176
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
177
+
178
+ # form parameters
179
+ form_params = {}
180
+
181
+ # http body (model)
182
+ post_body = @api_client.object_to_http_body(body)
183
+
184
+ auth_names = []
185
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
186
+ :header_params => header_params,
187
+ :query_params => query_params,
188
+ :form_params => form_params,
189
+ :body => post_body,
190
+ :auth_names => auth_names,
191
+ :return_type => 'GroupWrapper')
192
+ if @api_client.config.debugging
193
+ @api_client.config.logger.debug "API called: GroupsApi#groups_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
194
+ end
195
+ return data, status_code, headers
196
+ end
137
197
  end
138
198
  end
@@ -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.3.2
6
+ OpenAPI spec version: 0.3.7
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -87,7 +87,7 @@ module IronTitan
87
87
  end
88
88
 
89
89
  # Cancel a job.
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`.
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`. The job's completed_at field is set to the current time on the jobserver.
91
91
  # @param group_name Name of group for this set of jobs.
92
92
  # @param id Job id
93
93
  # @param [Hash] opts the optional parameters
@@ -98,7 +98,7 @@ module IronTitan
98
98
  end
99
99
 
100
100
  # Cancel a job.
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`.
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`. The job&#39;s completed_at field is set to the current time on the jobserver.
102
102
  # @param group_name Name of group for this set of jobs.
103
103
  # @param id Job id
104
104
  # @param [Hash] opts the optional parameters
@@ -216,25 +216,25 @@ module IronTitan
216
216
  end
217
217
 
218
218
  # Mark job as failed.
219
- # Job is marked as failed if it was in a valid state. Job's `completed_at` time is initialized.
219
+ # Job is marked as failed if it was in a valid state. Job's `finished_at` time is initialized.
220
220
  # @param group_name Name of group for this set of jobs.
221
221
  # @param id Job id
222
- # @param reason Reason for job failure.
222
+ # @param body
223
223
  # @param [Hash] opts the optional parameters
224
224
  # @return [JobWrapper]
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)
225
+ def groups_group_name_jobs_id_error_post(group_name, id, body, opts = {})
226
+ data, status_code, headers = groups_group_name_jobs_id_error_post_with_http_info(group_name, id, body, opts)
227
227
  return data
228
228
  end
229
229
 
230
230
  # Mark job as failed.
231
- # Job is marked as failed if it was in a valid state. Job&#39;s `completed_at` time is initialized.
231
+ # Job is marked as failed if it was in a valid state. Job&#39;s `finished_at` time is initialized.
232
232
  # @param group_name Name of group for this set of jobs.
233
233
  # @param id Job id
234
- # @param reason Reason for job failure.
234
+ # @param body
235
235
  # @param [Hash] opts the optional parameters
236
236
  # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
237
- def groups_group_name_jobs_id_error_post_with_http_info(group_name, id, reason, opts = {})
237
+ def groups_group_name_jobs_id_error_post_with_http_info(group_name, id, body, opts = {})
238
238
  if @api_client.config.debugging
239
239
  @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_error_post ..."
240
240
  end
@@ -245,8 +245,8 @@ module IronTitan
245
245
  # verify the required parameter 'id' is set
246
246
  fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_error_post" if id.nil?
247
247
 
248
- # verify the required parameter 'reason' is set
249
- fail "Missing the required parameter 'reason' when calling groups_group_name_jobs_id_error_post" if reason.nil?
248
+ # verify the required parameter 'body' is set
249
+ fail "Missing the required parameter 'body' when calling groups_group_name_jobs_id_error_post" if body.nil?
250
250
 
251
251
  # resource path
252
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)
@@ -267,10 +267,9 @@ module IronTitan
267
267
 
268
268
  # form parameters
269
269
  form_params = {}
270
- form_params["reason"] = reason
271
270
 
272
271
  # http body (model)
273
- post_body = nil
272
+ post_body = @api_client.object_to_http_body(body)
274
273
 
275
274
  auth_names = []
276
275
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
@@ -487,41 +486,36 @@ module IronTitan
487
486
  return data, status_code, headers
488
487
  end
489
488
 
490
- # Update a job
491
- # Used to update status on job transitions. Eg: from 'running' to 'success'.
489
+ # Retry a job.
490
+ # \"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
491
  # @param group_name Name of group for this set of jobs.
493
492
  # @param id Job id
494
- # @param body Job data to post
495
493
  # @param [Hash] opts the optional parameters
496
494
  # @return [JobWrapper]
497
- def groups_group_name_jobs_id_patch(group_name, id, body, opts = {})
498
- data, status_code, headers = groups_group_name_jobs_id_patch_with_http_info(group_name, id, body, opts)
495
+ def groups_group_name_jobs_id_retry_post(group_name, id, opts = {})
496
+ data, status_code, headers = groups_group_name_jobs_id_retry_post_with_http_info(group_name, id, opts)
499
497
  return data
500
498
  end
501
499
 
502
- # Update a job
503
- # Used to update status on job transitions. Eg: from &#39;running&#39; to &#39;success&#39;.
500
+ # Retry a job.
501
+ # \&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
504
502
  # @param group_name Name of group for this set of jobs.
505
503
  # @param id Job id
506
- # @param body Job data to post
507
504
  # @param [Hash] opts the optional parameters
508
505
  # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
509
- def groups_group_name_jobs_id_patch_with_http_info(group_name, id, body, opts = {})
506
+ def groups_group_name_jobs_id_retry_post_with_http_info(group_name, id, opts = {})
510
507
  if @api_client.config.debugging
511
- @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_patch ..."
508
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_retry_post ..."
512
509
  end
513
510
 
514
511
  # verify the required parameter 'group_name' is set
515
- fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_patch" if group_name.nil?
512
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_retry_post" if group_name.nil?
516
513
 
517
514
  # verify the required parameter 'id' is set
518
- fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_patch" if id.nil?
519
-
520
- # verify the required parameter 'body' is set
521
- fail "Missing the required parameter 'body' when calling groups_group_name_jobs_id_patch" if body.nil?
515
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_retry_post" if id.nil?
522
516
 
523
517
  # resource path
524
- local_var_path = "/groups/{group_name}/jobs/{id}".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
518
+ local_var_path = "/groups/{group_name}/jobs/{id}/retry".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
525
519
 
526
520
  # query parameters
527
521
  query_params = {}
@@ -541,10 +535,10 @@ module IronTitan
541
535
  form_params = {}
542
536
 
543
537
  # http body (model)
544
- post_body = @api_client.object_to_http_body(body)
538
+ post_body = nil
545
539
 
546
540
  auth_names = []
547
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
541
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
548
542
  :header_params => header_params,
549
543
  :query_params => query_params,
550
544
  :form_params => form_params,
@@ -552,41 +546,46 @@ module IronTitan
552
546
  :auth_names => auth_names,
553
547
  :return_type => 'JobWrapper')
554
548
  if @api_client.config.debugging
555
- @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
549
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_retry_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
556
550
  end
557
551
  return data, status_code, headers
558
552
  end
559
553
 
560
- # Retry a job.
561
- # \"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
554
+ # Mark job as started, ie: status = 'running'
555
+ # Job status is changed to 'running' if it was in a valid state before. Job's `started_at` time is initialized.
562
556
  # @param group_name Name of group for this set of jobs.
563
557
  # @param id Job id
558
+ # @param body
564
559
  # @param [Hash] opts the optional parameters
565
560
  # @return [JobWrapper]
566
- def groups_group_name_jobs_id_retry_post(group_name, id, opts = {})
567
- data, status_code, headers = groups_group_name_jobs_id_retry_post_with_http_info(group_name, id, opts)
561
+ def groups_group_name_jobs_id_start_post(group_name, id, body, opts = {})
562
+ data, status_code, headers = groups_group_name_jobs_id_start_post_with_http_info(group_name, id, body, opts)
568
563
  return data
569
564
  end
570
565
 
571
- # Retry a job.
572
- # \&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
566
+ # Mark job as started, ie: status = &#39;running&#39;
567
+ # Job status is changed to &#39;running&#39; if it was in a valid state before. Job&#39;s `started_at` time is initialized.
573
568
  # @param group_name Name of group for this set of jobs.
574
569
  # @param id Job id
570
+ # @param body
575
571
  # @param [Hash] opts the optional parameters
576
572
  # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
577
- def groups_group_name_jobs_id_retry_post_with_http_info(group_name, id, opts = {})
573
+ def groups_group_name_jobs_id_start_post_with_http_info(group_name, id, body, opts = {})
578
574
  if @api_client.config.debugging
579
- @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_retry_post ..."
575
+ @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_start_post ..."
580
576
  end
581
577
 
582
578
  # verify the required parameter 'group_name' is set
583
- fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_retry_post" if group_name.nil?
579
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_start_post" if group_name.nil?
584
580
 
585
581
  # verify the required parameter 'id' is set
586
- fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_retry_post" if id.nil?
582
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_start_post" if id.nil?
583
+
584
+ # verify the required parameter 'body' is set
585
+ fail "Missing the required parameter 'body' when calling groups_group_name_jobs_id_start_post" if body.nil?
587
586
 
588
587
  # resource path
589
- local_var_path = "/groups/{group_name}/jobs/{id}/retry".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
588
+ local_var_path = "/groups/{group_name}/jobs/{id}/start".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
590
589
 
591
590
  # query parameters
592
591
  query_params = {}
@@ -606,7 +605,7 @@ module IronTitan
606
605
  form_params = {}
607
606
 
608
607
  # http body (model)
609
- post_body = nil
608
+ post_body = @api_client.object_to_http_body(body)
610
609
 
611
610
  auth_names = []
612
611
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
@@ -617,7 +616,7 @@ module IronTitan
617
616
  :auth_names => auth_names,
618
617
  :return_type => 'JobWrapper')
619
618
  if @api_client.config.debugging
620
- @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_retry_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
619
+ @api_client.config.logger.debug "API called: JobsApi#groups_group_name_jobs_id_start_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
621
620
  end
622
621
  return data, status_code, headers
623
622
  end
@@ -626,10 +625,11 @@ module IronTitan
626
625
  # Job status is changed to succeeded if it was in a valid state before. Job's `completed_at` time is initialized.
627
626
  # @param group_name Name of group for this set of jobs.
628
627
  # @param id Job id
628
+ # @param body
629
629
  # @param [Hash] opts the optional parameters
630
630
  # @return [JobWrapper]
631
- def groups_group_name_jobs_id_success_post(group_name, id, opts = {})
632
- data, status_code, headers = groups_group_name_jobs_id_success_post_with_http_info(group_name, id, opts)
631
+ def groups_group_name_jobs_id_success_post(group_name, id, body, opts = {})
632
+ data, status_code, headers = groups_group_name_jobs_id_success_post_with_http_info(group_name, id, body, opts)
633
633
  return data
634
634
  end
635
635
 
@@ -637,9 +637,10 @@ module IronTitan
637
637
  # Job status is changed to succeeded if it was in a valid state before. Job&#39;s `completed_at` time is initialized.
638
638
  # @param group_name Name of group for this set of jobs.
639
639
  # @param id Job id
640
+ # @param body
640
641
  # @param [Hash] opts the optional parameters
641
642
  # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
642
- def groups_group_name_jobs_id_success_post_with_http_info(group_name, id, opts = {})
643
+ def groups_group_name_jobs_id_success_post_with_http_info(group_name, id, body, opts = {})
643
644
  if @api_client.config.debugging
644
645
  @api_client.config.logger.debug "Calling API: JobsApi#groups_group_name_jobs_id_success_post ..."
645
646
  end
@@ -650,6 +651,9 @@ module IronTitan
650
651
  # verify the required parameter 'id' is set
651
652
  fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_success_post" if id.nil?
652
653
 
654
+ # verify the required parameter 'body' is set
655
+ fail "Missing the required parameter 'body' when calling groups_group_name_jobs_id_success_post" if body.nil?
656
+
653
657
  # resource path
654
658
  local_var_path = "/groups/{group_name}/jobs/{id}/success".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
655
659
 
@@ -671,7 +675,7 @@ module IronTitan
671
675
  form_params = {}
672
676
 
673
677
  # http body (model)
674
- post_body = nil
678
+ post_body = @api_client.object_to_http_body(body)
675
679
 
676
680
  auth_names = []
677
681
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
@@ -0,0 +1,233 @@
1
+ =begin
2
+ Titan API
3
+
4
+ The ultimate, language agnostic, container based job processing framework.
5
+
6
+ OpenAPI spec version: 0.3.7
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module IronTitan
16
+ class RunnerApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Mark job as failed.
24
+ # Job is marked as failed if it was in a valid state. Job's `finished_at` time is initialized.
25
+ # @param group_name Name of group for this set of jobs.
26
+ # @param id Job id
27
+ # @param body
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [JobWrapper]
30
+ def groups_group_name_jobs_id_error_post(group_name, id, body, opts = {})
31
+ data, status_code, headers = groups_group_name_jobs_id_error_post_with_http_info(group_name, id, body, opts)
32
+ return data
33
+ end
34
+
35
+ # Mark job as failed.
36
+ # Job is marked as failed if it was in a valid state. Job&#39;s `finished_at` time is initialized.
37
+ # @param group_name Name of group for this set of jobs.
38
+ # @param id Job id
39
+ # @param body
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
42
+ def groups_group_name_jobs_id_error_post_with_http_info(group_name, id, body, opts = {})
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug "Calling API: RunnerApi#groups_group_name_jobs_id_error_post ..."
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_id_error_post" if group_name.nil?
49
+
50
+ # verify the required parameter 'id' is set
51
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_error_post" if id.nil?
52
+
53
+ # verify the required parameter 'body' is set
54
+ fail "Missing the required parameter 'body' when calling groups_group_name_jobs_id_error_post" if body.nil?
55
+
56
+ # resource path
57
+ local_var_path = "/groups/{group_name}/jobs/{id}/error".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
58
+
59
+ # query parameters
60
+ query_params = {}
61
+
62
+ # header parameters
63
+ header_params = {}
64
+
65
+ # HTTP header 'Accept' (if needed)
66
+ _header_accept = ['application/json']
67
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
68
+
69
+ # HTTP header 'Content-Type'
70
+ _header_content_type = ['application/json']
71
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
72
+
73
+ # form parameters
74
+ form_params = {}
75
+
76
+ # http body (model)
77
+ post_body = @api_client.object_to_http_body(body)
78
+
79
+ auth_names = []
80
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => 'JobWrapper')
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: RunnerApi#groups_group_name_jobs_id_error_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
93
+ # Mark job as started, ie: status = 'running'
94
+ # Job status is changed to 'running' if it was in a valid state before. Job's `started_at` time is initialized.
95
+ # @param group_name Name of group for this set of jobs.
96
+ # @param id Job id
97
+ # @param body
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [JobWrapper]
100
+ def groups_group_name_jobs_id_start_post(group_name, id, body, opts = {})
101
+ data, status_code, headers = groups_group_name_jobs_id_start_post_with_http_info(group_name, id, body, opts)
102
+ return data
103
+ end
104
+
105
+ # Mark job as started, ie: status = &#39;running&#39;
106
+ # Job status is changed to &#39;running&#39; if it was in a valid state before. Job&#39;s `started_at` time is initialized.
107
+ # @param group_name Name of group for this set of jobs.
108
+ # @param id Job id
109
+ # @param body
110
+ # @param [Hash] opts the optional parameters
111
+ # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
112
+ def groups_group_name_jobs_id_start_post_with_http_info(group_name, id, body, opts = {})
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug "Calling API: RunnerApi#groups_group_name_jobs_id_start_post ..."
115
+ end
116
+
117
+ # verify the required parameter 'group_name' is set
118
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_start_post" if group_name.nil?
119
+
120
+ # verify the required parameter 'id' is set
121
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_start_post" if id.nil?
122
+
123
+ # verify the required parameter 'body' is set
124
+ fail "Missing the required parameter 'body' when calling groups_group_name_jobs_id_start_post" if body.nil?
125
+
126
+ # resource path
127
+ local_var_path = "/groups/{group_name}/jobs/{id}/start".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
128
+
129
+ # query parameters
130
+ query_params = {}
131
+
132
+ # header parameters
133
+ header_params = {}
134
+
135
+ # HTTP header 'Accept' (if needed)
136
+ _header_accept = ['application/json']
137
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
138
+
139
+ # HTTP header 'Content-Type'
140
+ _header_content_type = ['application/json']
141
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
142
+
143
+ # form parameters
144
+ form_params = {}
145
+
146
+ # http body (model)
147
+ post_body = @api_client.object_to_http_body(body)
148
+
149
+ auth_names = []
150
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
151
+ :header_params => header_params,
152
+ :query_params => query_params,
153
+ :form_params => form_params,
154
+ :body => post_body,
155
+ :auth_names => auth_names,
156
+ :return_type => 'JobWrapper')
157
+ if @api_client.config.debugging
158
+ @api_client.config.logger.debug "API called: RunnerApi#groups_group_name_jobs_id_start_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
159
+ end
160
+ return data, status_code, headers
161
+ end
162
+
163
+ # Mark job as succeeded.
164
+ # Job status is changed to succeeded if it was in a valid state before. Job's `completed_at` time is initialized.
165
+ # @param group_name Name of group for this set of jobs.
166
+ # @param id Job id
167
+ # @param body
168
+ # @param [Hash] opts the optional parameters
169
+ # @return [JobWrapper]
170
+ def groups_group_name_jobs_id_success_post(group_name, id, body, opts = {})
171
+ data, status_code, headers = groups_group_name_jobs_id_success_post_with_http_info(group_name, id, body, opts)
172
+ return data
173
+ end
174
+
175
+ # Mark job as succeeded.
176
+ # Job status is changed to succeeded if it was in a valid state before. Job&#39;s `completed_at` time is initialized.
177
+ # @param group_name Name of group for this set of jobs.
178
+ # @param id Job id
179
+ # @param body
180
+ # @param [Hash] opts the optional parameters
181
+ # @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
182
+ def groups_group_name_jobs_id_success_post_with_http_info(group_name, id, body, opts = {})
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug "Calling API: RunnerApi#groups_group_name_jobs_id_success_post ..."
185
+ end
186
+
187
+ # verify the required parameter 'group_name' is set
188
+ fail "Missing the required parameter 'group_name' when calling groups_group_name_jobs_id_success_post" if group_name.nil?
189
+
190
+ # verify the required parameter 'id' is set
191
+ fail "Missing the required parameter 'id' when calling groups_group_name_jobs_id_success_post" if id.nil?
192
+
193
+ # verify the required parameter 'body' is set
194
+ fail "Missing the required parameter 'body' when calling groups_group_name_jobs_id_success_post" if body.nil?
195
+
196
+ # resource path
197
+ local_var_path = "/groups/{group_name}/jobs/{id}/success".sub('{format}','json').sub('{' + 'group_name' + '}', group_name.to_s).sub('{' + 'id' + '}', id.to_s)
198
+
199
+ # query parameters
200
+ query_params = {}
201
+
202
+ # header parameters
203
+ header_params = {}
204
+
205
+ # HTTP header 'Accept' (if needed)
206
+ _header_accept = ['application/json']
207
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
208
+
209
+ # HTTP header 'Content-Type'
210
+ _header_content_type = ['application/json']
211
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
212
+
213
+ # form parameters
214
+ form_params = {}
215
+
216
+ # http body (model)
217
+ post_body = @api_client.object_to_http_body(body)
218
+
219
+ auth_names = []
220
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
221
+ :header_params => header_params,
222
+ :query_params => query_params,
223
+ :form_params => form_params,
224
+ :body => post_body,
225
+ :auth_names => auth_names,
226
+ :return_type => 'JobWrapper')
227
+ if @api_client.config.debugging
228
+ @api_client.config.logger.debug "API called: RunnerApi#groups_group_name_jobs_id_success_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
229
+ end
230
+ return data, status_code, headers
231
+ end
232
+ end
233
+ end