worker_ruby 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/README.md +118 -0
- data/VERSION +1 -0
- data/VERSION.txt +1 -0
- data/docs/Complete.md +10 -0
- data/docs/CoreApi.md +200 -0
- data/docs/Error.md +8 -0
- data/docs/ErrorBody.md +9 -0
- data/docs/Group.md +12 -0
- data/docs/GroupWrapper.md +8 -0
- data/docs/GroupsApi.md +197 -0
- data/docs/GroupsWrapper.md +8 -0
- data/docs/IdStatus.md +9 -0
- data/docs/Image.md +10 -0
- data/docs/ImageWrapper.md +8 -0
- data/docs/ImagesApi.md +98 -0
- data/docs/ImagesWrapper.md +8 -0
- data/docs/Job.md +25 -0
- data/docs/JobWrapper.md +8 -0
- data/docs/JobsApi.md +684 -0
- data/docs/JobsWrapper.md +10 -0
- data/docs/Log.md +8 -0
- data/docs/NewJob.md +14 -0
- data/docs/NewJobWithImage.md +15 -0
- data/docs/NewJobsWrapper.md +8 -0
- data/docs/NewTask.md +14 -0
- data/docs/NewTasksWrapper.md +8 -0
- data/docs/Reason.md +7 -0
- data/docs/RunnerApi.md +170 -0
- data/docs/Start.md +8 -0
- data/docs/Task.md +25 -0
- data/docs/TaskWrapper.md +8 -0
- data/docs/TasksApi.md +684 -0
- data/docs/TasksWrapper.md +10 -0
- data/git_push.sh +67 -0
- data/iron_ruby.gemspec +55 -0
- data/iron_titan.gemspec +32 -0
- data/lib/iron_ruby.rb +66 -0
- data/lib/iron_ruby/api/groups_api.rb +262 -0
- data/lib/iron_ruby/api/runner_api.rb +229 -0
- data/lib/iron_ruby/api/tasks_api.rb +842 -0
- data/lib/iron_ruby/api_client.rb +378 -0
- data/lib/iron_ruby/api_error.rb +47 -0
- data/lib/iron_ruby/configuration.rb +207 -0
- data/lib/iron_ruby/models/complete.rb +220 -0
- data/lib/iron_ruby/models/error.rb +199 -0
- data/lib/iron_ruby/models/error_body.rb +208 -0
- data/lib/iron_ruby/models/group.rb +242 -0
- data/lib/iron_ruby/models/group_wrapper.rb +200 -0
- data/lib/iron_ruby/models/groups_wrapper.rb +202 -0
- data/lib/iron_ruby/models/id_status.rb +243 -0
- data/lib/iron_ruby/models/new_task.rb +270 -0
- data/lib/iron_ruby/models/new_tasks_wrapper.rb +202 -0
- data/lib/iron_ruby/models/start.rb +200 -0
- data/lib/iron_ruby/models/task.rb +427 -0
- data/lib/iron_ruby/models/task_wrapper.rb +200 -0
- data/lib/iron_ruby/models/tasks_wrapper.rb +221 -0
- data/lib/iron_ruby/version.rb +26 -0
- data/lib/iron_titan.rb +66 -0
- data/lib/iron_titan/api/core_api.rb +260 -0
- data/lib/iron_titan/api/groups_api.rb +262 -0
- data/lib/iron_titan/api/images_api.rb +138 -0
- data/lib/iron_titan/api/jobs_api.rb +842 -0
- data/lib/iron_titan/api/runner_api.rb +229 -0
- data/lib/iron_titan/api_client.rb +372 -0
- data/lib/iron_titan/api_error.rb +47 -0
- data/lib/iron_titan/configuration.rb +186 -0
- data/lib/iron_titan/models/complete.rb +220 -0
- data/lib/iron_titan/models/error.rb +199 -0
- data/lib/iron_titan/models/error_body.rb +208 -0
- data/lib/iron_titan/models/group.rb +242 -0
- data/lib/iron_titan/models/group_wrapper.rb +200 -0
- data/lib/iron_titan/models/groups_wrapper.rb +202 -0
- data/lib/iron_titan/models/id_status.rb +243 -0
- data/lib/iron_titan/models/image.rb +184 -0
- data/lib/iron_titan/models/image_wrapper.rb +161 -0
- data/lib/iron_titan/models/images_wrapper.rb +163 -0
- data/lib/iron_titan/models/job.rb +427 -0
- data/lib/iron_titan/models/job_array.rb +160 -0
- data/lib/iron_titan/models/job_wrapper.rb +200 -0
- data/lib/iron_titan/models/jobs_wrapper.rb +221 -0
- data/lib/iron_titan/models/log.rb +161 -0
- data/lib/iron_titan/models/new_job.rb +270 -0
- data/lib/iron_titan/models/new_job_array.rb +160 -0
- data/lib/iron_titan/models/new_job_with_image.rb +249 -0
- data/lib/iron_titan/models/new_jobs_wrapper.rb +202 -0
- data/lib/iron_titan/models/reason.rb +164 -0
- data/lib/iron_titan/models/start.rb +200 -0
- data/lib/iron_titan/version.rb +26 -0
- data/lib/worker_ruby.rb +66 -0
- data/lib/worker_ruby/api/groups_api.rb +262 -0
- data/lib/worker_ruby/api/runner_api.rb +229 -0
- data/lib/worker_ruby/api/tasks_api.rb +842 -0
- data/lib/worker_ruby/api_client.rb +378 -0
- data/lib/worker_ruby/api_error.rb +47 -0
- data/lib/worker_ruby/configuration.rb +207 -0
- data/lib/worker_ruby/models/complete.rb +220 -0
- data/lib/worker_ruby/models/error.rb +199 -0
- data/lib/worker_ruby/models/error_body.rb +208 -0
- data/lib/worker_ruby/models/group.rb +242 -0
- data/lib/worker_ruby/models/group_wrapper.rb +200 -0
- data/lib/worker_ruby/models/groups_wrapper.rb +202 -0
- data/lib/worker_ruby/models/id_status.rb +243 -0
- data/lib/worker_ruby/models/new_task.rb +270 -0
- data/lib/worker_ruby/models/new_tasks_wrapper.rb +202 -0
- data/lib/worker_ruby/models/start.rb +200 -0
- data/lib/worker_ruby/models/task.rb +427 -0
- data/lib/worker_ruby/models/task_wrapper.rb +200 -0
- data/lib/worker_ruby/models/tasks_wrapper.rb +221 -0
- data/lib/worker_ruby/version.rb +26 -0
- data/spec/api/CoreApi_spec.rb +99 -0
- data/spec/api/JobsApi_spec.rb +131 -0
- data/spec/api/core_api_spec.rb +99 -0
- data/spec/api/groups_api_spec.rb +94 -0
- data/spec/api/images_api_spec.rb +66 -0
- data/spec/api/jobs_api_spec.rb +220 -0
- data/spec/api/runner_api_spec.rb +88 -0
- data/spec/api/tasks_api_spec.rb +220 -0
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +53 -0
- data/spec/models/ErrorBody_spec.rb +56 -0
- data/spec/models/JobArray_spec.rb +46 -0
- data/spec/models/JobWrapper_spec.rb +46 -0
- data/spec/models/NewJobArray_spec.rb +46 -0
- data/spec/models/NewJob_spec.rb +96 -0
- data/spec/models/complete_spec.rb +65 -0
- data/spec/models/error_body_spec.rb +59 -0
- data/spec/models/error_spec.rb +53 -0
- data/spec/models/group_spec.rb +77 -0
- data/spec/models/group_wrapper_spec.rb +53 -0
- data/spec/models/groups_wrapper_spec.rb +53 -0
- data/spec/models/id_status_spec.rb +63 -0
- data/spec/models/image_spec.rb +66 -0
- data/spec/models/image_wrapper_spec.rb +46 -0
- data/spec/models/images_wrapper_spec.rb +46 -0
- data/spec/models/job_array_spec.rb +46 -0
- data/spec/models/job_spec.rb +161 -0
- data/spec/models/job_wrapper_spec.rb +53 -0
- data/spec/models/jobs_wrapper_spec.rb +65 -0
- data/spec/models/log_spec.rb +46 -0
- data/spec/models/new_job_array_spec.rb +46 -0
- data/spec/models/new_job_spec.rb +89 -0
- data/spec/models/new_job_with_image_spec.rb +116 -0
- data/spec/models/new_jobs_wrapper_spec.rb +53 -0
- data/spec/models/new_task_spec.rb +89 -0
- data/spec/models/new_tasks_wrapper_spec.rb +53 -0
- data/spec/models/reason_spec.rb +36 -0
- data/spec/models/start_spec.rb +53 -0
- data/spec/models/task_spec.rb +163 -0
- data/spec/models/task_wrapper_spec.rb +53 -0
- data/spec/models/tasks_wrapper_spec.rb +65 -0
- data/spec/spec_helper.rb +122 -0
- data/worker_ruby-0.5.5.gem +0 -0
- data/worker_ruby.gemspec +55 -0
- metadata +420 -0
@@ -0,0 +1,260 @@
|
|
1
|
+
=begin
|
2
|
+
Titan API
|
3
|
+
|
4
|
+
The ultimate, language agnostic, container based job processing framework.
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.2.17
|
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 CoreApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Delete the job.
|
24
|
+
# 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.
|
25
|
+
# @param id Job id
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [nil]
|
28
|
+
def job_id_delete(id, opts = {})
|
29
|
+
job_id_delete_with_http_info(id, opts)
|
30
|
+
return nil
|
31
|
+
end
|
32
|
+
|
33
|
+
# Delete the job.
|
34
|
+
# 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.
|
35
|
+
# @param id Job id
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
38
|
+
def job_id_delete_with_http_info(id, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: CoreApi#job_id_delete ..."
|
41
|
+
end
|
42
|
+
|
43
|
+
# verify the required parameter 'id' is set
|
44
|
+
fail "Missing the required parameter 'id' when calling job_id_delete" if id.nil?
|
45
|
+
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/job/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
_header_accept = ['application/json']
|
57
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
58
|
+
|
59
|
+
# HTTP header 'Content-Type'
|
60
|
+
_header_content_type = ['application/json']
|
61
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
62
|
+
|
63
|
+
# form parameters
|
64
|
+
form_params = {}
|
65
|
+
|
66
|
+
# http body (model)
|
67
|
+
post_body = nil
|
68
|
+
|
69
|
+
auth_names = []
|
70
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names)
|
76
|
+
if @api_client.config.debugging
|
77
|
+
@api_client.config.logger.debug "API called: CoreApi#job_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
78
|
+
end
|
79
|
+
return data, status_code, headers
|
80
|
+
end
|
81
|
+
|
82
|
+
# Gets job by id
|
83
|
+
# Gets a job by id.
|
84
|
+
# @param id Job id
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @return [JobWrapper]
|
87
|
+
def job_id_get(id, opts = {})
|
88
|
+
data, status_code, headers = job_id_get_with_http_info(id, opts)
|
89
|
+
return data
|
90
|
+
end
|
91
|
+
|
92
|
+
# Gets job by id
|
93
|
+
# Gets a job by id.
|
94
|
+
# @param id Job id
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [Array<(JobWrapper, Fixnum, Hash)>] JobWrapper data, response status code and response headers
|
97
|
+
def job_id_get_with_http_info(id, opts = {})
|
98
|
+
if @api_client.config.debugging
|
99
|
+
@api_client.config.logger.debug "Calling API: CoreApi#job_id_get ..."
|
100
|
+
end
|
101
|
+
|
102
|
+
# verify the required parameter 'id' is set
|
103
|
+
fail "Missing the required parameter 'id' when calling job_id_get" if id.nil?
|
104
|
+
|
105
|
+
# resource path
|
106
|
+
local_var_path = "/job/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = {}
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = {}
|
113
|
+
|
114
|
+
# HTTP header 'Accept' (if needed)
|
115
|
+
_header_accept = ['application/json']
|
116
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
117
|
+
|
118
|
+
# HTTP header 'Content-Type'
|
119
|
+
_header_content_type = ['application/json']
|
120
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
121
|
+
|
122
|
+
# form parameters
|
123
|
+
form_params = {}
|
124
|
+
|
125
|
+
# http body (model)
|
126
|
+
post_body = nil
|
127
|
+
|
128
|
+
auth_names = []
|
129
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
130
|
+
:header_params => header_params,
|
131
|
+
:query_params => query_params,
|
132
|
+
:form_params => form_params,
|
133
|
+
:body => post_body,
|
134
|
+
:auth_names => auth_names,
|
135
|
+
:return_type => 'JobWrapper')
|
136
|
+
if @api_client.config.debugging
|
137
|
+
@api_client.config.logger.debug "API called: CoreApi#job_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
138
|
+
end
|
139
|
+
return data, status_code, headers
|
140
|
+
end
|
141
|
+
|
142
|
+
# Get next job.
|
143
|
+
# 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.
|
144
|
+
# @param [Hash] opts the optional parameters
|
145
|
+
# @option opts [Integer] :n Number of jobs to return. (default to 1)
|
146
|
+
# @return [JobsWrapper]
|
147
|
+
def jobs_consume_get(opts = {})
|
148
|
+
data, status_code, headers = jobs_consume_get_with_http_info(opts)
|
149
|
+
return data
|
150
|
+
end
|
151
|
+
|
152
|
+
# Get next job.
|
153
|
+
# 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.
|
154
|
+
# @param [Hash] opts the optional parameters
|
155
|
+
# @option opts [Integer] :n Number of jobs to return.
|
156
|
+
# @return [Array<(JobsWrapper, Fixnum, Hash)>] JobsWrapper data, response status code and response headers
|
157
|
+
def jobs_consume_get_with_http_info(opts = {})
|
158
|
+
if @api_client.config.debugging
|
159
|
+
@api_client.config.logger.debug "Calling API: CoreApi#jobs_consume_get ..."
|
160
|
+
end
|
161
|
+
|
162
|
+
# resource path
|
163
|
+
local_var_path = "/jobs/consume".sub('{format}','json')
|
164
|
+
|
165
|
+
# query parameters
|
166
|
+
query_params = {}
|
167
|
+
query_params[:'n'] = opts[:'n'] if opts[:'n']
|
168
|
+
|
169
|
+
# header parameters
|
170
|
+
header_params = {}
|
171
|
+
|
172
|
+
# HTTP header 'Accept' (if needed)
|
173
|
+
_header_accept = ['application/json']
|
174
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
175
|
+
|
176
|
+
# HTTP header 'Content-Type'
|
177
|
+
_header_content_type = ['application/json']
|
178
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
179
|
+
|
180
|
+
# form parameters
|
181
|
+
form_params = {}
|
182
|
+
|
183
|
+
# http body (model)
|
184
|
+
post_body = nil
|
185
|
+
|
186
|
+
auth_names = []
|
187
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
188
|
+
:header_params => header_params,
|
189
|
+
:query_params => query_params,
|
190
|
+
:form_params => form_params,
|
191
|
+
:body => post_body,
|
192
|
+
:auth_names => auth_names,
|
193
|
+
:return_type => 'JobsWrapper')
|
194
|
+
if @api_client.config.debugging
|
195
|
+
@api_client.config.logger.debug "API called: CoreApi#jobs_consume_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
196
|
+
end
|
197
|
+
return data, status_code, headers
|
198
|
+
end
|
199
|
+
|
200
|
+
# Enqueue Job
|
201
|
+
# Enqueues job(s). If any of the jobs is invalid, none of the jobs are enqueued.
|
202
|
+
# @param body Array of jobs to post.
|
203
|
+
# @param [Hash] opts the optional parameters
|
204
|
+
# @return [JobsWrapper]
|
205
|
+
def jobs_post(body, opts = {})
|
206
|
+
data, status_code, headers = jobs_post_with_http_info(body, opts)
|
207
|
+
return data
|
208
|
+
end
|
209
|
+
|
210
|
+
# Enqueue Job
|
211
|
+
# Enqueues job(s). If any of the jobs is invalid, none of the jobs are enqueued.
|
212
|
+
# @param body Array of jobs to post.
|
213
|
+
# @param [Hash] opts the optional parameters
|
214
|
+
# @return [Array<(JobsWrapper, Fixnum, Hash)>] JobsWrapper data, response status code and response headers
|
215
|
+
def jobs_post_with_http_info(body, opts = {})
|
216
|
+
if @api_client.config.debugging
|
217
|
+
@api_client.config.logger.debug "Calling API: CoreApi#jobs_post ..."
|
218
|
+
end
|
219
|
+
|
220
|
+
# verify the required parameter 'body' is set
|
221
|
+
fail "Missing the required parameter 'body' when calling jobs_post" if body.nil?
|
222
|
+
|
223
|
+
# resource path
|
224
|
+
local_var_path = "/jobs".sub('{format}','json')
|
225
|
+
|
226
|
+
# query parameters
|
227
|
+
query_params = {}
|
228
|
+
|
229
|
+
# header parameters
|
230
|
+
header_params = {}
|
231
|
+
|
232
|
+
# HTTP header 'Accept' (if needed)
|
233
|
+
_header_accept = ['application/json']
|
234
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
235
|
+
|
236
|
+
# HTTP header 'Content-Type'
|
237
|
+
_header_content_type = ['application/json']
|
238
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
239
|
+
|
240
|
+
# form parameters
|
241
|
+
form_params = {}
|
242
|
+
|
243
|
+
# http body (model)
|
244
|
+
post_body = @api_client.object_to_http_body(body)
|
245
|
+
|
246
|
+
auth_names = []
|
247
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
248
|
+
:header_params => header_params,
|
249
|
+
:query_params => query_params,
|
250
|
+
:form_params => form_params,
|
251
|
+
:body => post_body,
|
252
|
+
:auth_names => auth_names,
|
253
|
+
:return_type => 'JobsWrapper')
|
254
|
+
if @api_client.config.debugging
|
255
|
+
@api_client.config.logger.debug "API called: CoreApi#jobs_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
256
|
+
end
|
257
|
+
return data, status_code, headers
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
@@ -0,0 +1,262 @@
|
|
1
|
+
=begin
|
2
|
+
Titan API
|
3
|
+
|
4
|
+
The ultimate, language agnostic, container based job processing framework.
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.4.9
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require "uri"
|
25
|
+
|
26
|
+
module IronTitan
|
27
|
+
class GroupsApi
|
28
|
+
attr_accessor :api_client
|
29
|
+
|
30
|
+
def initialize(api_client = ApiClient.default)
|
31
|
+
@api_client = api_client
|
32
|
+
end
|
33
|
+
|
34
|
+
# Get all group names.
|
35
|
+
# Get a list of all the groups in the system.
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [GroupsWrapper]
|
38
|
+
def groups_get(opts = {})
|
39
|
+
data, _status_code, _headers = groups_get_with_http_info(opts)
|
40
|
+
return data
|
41
|
+
end
|
42
|
+
|
43
|
+
# Get all group names.
|
44
|
+
# Get a list of all the groups in the system.
|
45
|
+
# @param [Hash] opts the optional parameters
|
46
|
+
# @return [Array<(GroupsWrapper, Fixnum, Hash)>] GroupsWrapper data, response status code and response headers
|
47
|
+
def groups_get_with_http_info(opts = {})
|
48
|
+
if @api_client.config.debugging
|
49
|
+
@api_client.config.logger.debug "Calling API: GroupsApi.groups_get ..."
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = "/groups".sub('{format}','json')
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = {}
|
59
|
+
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
local_header_accept = ['application/json']
|
62
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
63
|
+
|
64
|
+
# HTTP header 'Content-Type'
|
65
|
+
local_header_content_type = ['application/json']
|
66
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
67
|
+
|
68
|
+
# form parameters
|
69
|
+
form_params = {}
|
70
|
+
|
71
|
+
# http body (model)
|
72
|
+
post_body = nil
|
73
|
+
auth_names = []
|
74
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => 'GroupsWrapper')
|
81
|
+
if @api_client.config.debugging
|
82
|
+
@api_client.config.logger.debug "API called: GroupsApi#groups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
83
|
+
end
|
84
|
+
return data, status_code, headers
|
85
|
+
end
|
86
|
+
|
87
|
+
# Get information for a group.
|
88
|
+
# This gives more details about a job group, such as statistics.
|
89
|
+
# @param name name of the group.
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @return [GroupWrapper]
|
92
|
+
def groups_name_get(name, opts = {})
|
93
|
+
data, _status_code, _headers = groups_name_get_with_http_info(name, opts)
|
94
|
+
return data
|
95
|
+
end
|
96
|
+
|
97
|
+
# Get information for a group.
|
98
|
+
# This gives more details about a job group, such as statistics.
|
99
|
+
# @param name name of the group.
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
|
102
|
+
def groups_name_get_with_http_info(name, opts = {})
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug "Calling API: GroupsApi.groups_name_get ..."
|
105
|
+
end
|
106
|
+
# verify the required parameter 'name' is set
|
107
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling GroupsApi.groups_name_get" if name.nil?
|
108
|
+
# resource path
|
109
|
+
local_var_path = "/groups/{name}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
|
110
|
+
|
111
|
+
# query parameters
|
112
|
+
query_params = {}
|
113
|
+
|
114
|
+
# header parameters
|
115
|
+
header_params = {}
|
116
|
+
|
117
|
+
# HTTP header 'Accept' (if needed)
|
118
|
+
local_header_accept = ['application/json']
|
119
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
120
|
+
|
121
|
+
# HTTP header 'Content-Type'
|
122
|
+
local_header_content_type = ['application/json']
|
123
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
124
|
+
|
125
|
+
# form parameters
|
126
|
+
form_params = {}
|
127
|
+
|
128
|
+
# http body (model)
|
129
|
+
post_body = nil
|
130
|
+
auth_names = []
|
131
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
132
|
+
:header_params => header_params,
|
133
|
+
:query_params => query_params,
|
134
|
+
:form_params => form_params,
|
135
|
+
:body => post_body,
|
136
|
+
:auth_names => auth_names,
|
137
|
+
:return_type => 'GroupWrapper')
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug "API called: GroupsApi#groups_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
140
|
+
end
|
141
|
+
return data, status_code, headers
|
142
|
+
end
|
143
|
+
|
144
|
+
# Create/update a job group.
|
145
|
+
# You can set group level settings here.
|
146
|
+
# @param name name of the group.
|
147
|
+
# @param body Group to post.
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @return [GroupWrapper]
|
150
|
+
def groups_name_put(name, body, opts = {})
|
151
|
+
data, _status_code, _headers = groups_name_put_with_http_info(name, body, opts)
|
152
|
+
return data
|
153
|
+
end
|
154
|
+
|
155
|
+
# Create/update a job group.
|
156
|
+
# You can set group level settings here.
|
157
|
+
# @param name name of the group.
|
158
|
+
# @param body Group to post.
|
159
|
+
# @param [Hash] opts the optional parameters
|
160
|
+
# @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
|
161
|
+
def groups_name_put_with_http_info(name, body, opts = {})
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "Calling API: GroupsApi.groups_name_put ..."
|
164
|
+
end
|
165
|
+
# verify the required parameter 'name' is set
|
166
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling GroupsApi.groups_name_put" if name.nil?
|
167
|
+
# verify the required parameter 'body' is set
|
168
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.groups_name_put" if body.nil?
|
169
|
+
# resource path
|
170
|
+
local_var_path = "/groups/{name}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
|
171
|
+
|
172
|
+
# query parameters
|
173
|
+
query_params = {}
|
174
|
+
|
175
|
+
# header parameters
|
176
|
+
header_params = {}
|
177
|
+
|
178
|
+
# HTTP header 'Accept' (if needed)
|
179
|
+
local_header_accept = ['application/json']
|
180
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
181
|
+
|
182
|
+
# HTTP header 'Content-Type'
|
183
|
+
local_header_content_type = ['application/json']
|
184
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
185
|
+
|
186
|
+
# form parameters
|
187
|
+
form_params = {}
|
188
|
+
|
189
|
+
# http body (model)
|
190
|
+
post_body = @api_client.object_to_http_body(body)
|
191
|
+
auth_names = []
|
192
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => 'GroupWrapper')
|
199
|
+
if @api_client.config.debugging
|
200
|
+
@api_client.config.logger.debug "API called: GroupsApi#groups_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
201
|
+
end
|
202
|
+
return data, status_code, headers
|
203
|
+
end
|
204
|
+
|
205
|
+
# Post new group
|
206
|
+
# Insert a new job group
|
207
|
+
# @param body Group to post.
|
208
|
+
# @param [Hash] opts the optional parameters
|
209
|
+
# @return [GroupWrapper]
|
210
|
+
def groups_post(body, opts = {})
|
211
|
+
data, _status_code, _headers = groups_post_with_http_info(body, opts)
|
212
|
+
return data
|
213
|
+
end
|
214
|
+
|
215
|
+
# Post new group
|
216
|
+
# Insert a new job group
|
217
|
+
# @param body Group to post.
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
|
220
|
+
def groups_post_with_http_info(body, opts = {})
|
221
|
+
if @api_client.config.debugging
|
222
|
+
@api_client.config.logger.debug "Calling API: GroupsApi.groups_post ..."
|
223
|
+
end
|
224
|
+
# verify the required parameter 'body' is set
|
225
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.groups_post" if body.nil?
|
226
|
+
# resource path
|
227
|
+
local_var_path = "/groups".sub('{format}','json')
|
228
|
+
|
229
|
+
# query parameters
|
230
|
+
query_params = {}
|
231
|
+
|
232
|
+
# header parameters
|
233
|
+
header_params = {}
|
234
|
+
|
235
|
+
# HTTP header 'Accept' (if needed)
|
236
|
+
local_header_accept = ['application/json']
|
237
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
238
|
+
|
239
|
+
# HTTP header 'Content-Type'
|
240
|
+
local_header_content_type = ['application/json']
|
241
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
242
|
+
|
243
|
+
# form parameters
|
244
|
+
form_params = {}
|
245
|
+
|
246
|
+
# http body (model)
|
247
|
+
post_body = @api_client.object_to_http_body(body)
|
248
|
+
auth_names = []
|
249
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
250
|
+
:header_params => header_params,
|
251
|
+
:query_params => query_params,
|
252
|
+
:form_params => form_params,
|
253
|
+
:body => post_body,
|
254
|
+
:auth_names => auth_names,
|
255
|
+
:return_type => 'GroupWrapper')
|
256
|
+
if @api_client.config.debugging
|
257
|
+
@api_client.config.logger.debug "API called: GroupsApi#groups_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
258
|
+
end
|
259
|
+
return data, status_code, headers
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|