pulpcore_client 3.0.0rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +79 -0
- data/README.md +151 -0
- data/Rakefile +10 -0
- data/docs/Artifact.md +37 -0
- data/docs/ArtifactsApi.md +253 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/InlineResponse200.md +23 -0
- data/docs/InlineResponse2001.md +23 -0
- data/docs/InlineResponse2002.md +23 -0
- data/docs/InlineResponse2003.md +23 -0
- data/docs/InlineResponse2004.md +23 -0
- data/docs/InlineResponse2005.md +23 -0
- data/docs/OrphansApi.md +58 -0
- data/docs/ProgressReport.md +27 -0
- data/docs/RepositoriesApi.md +584 -0
- data/docs/Repository.md +27 -0
- data/docs/RepositoryVersion.md +25 -0
- data/docs/RepositoryVersionCreate.md +21 -0
- data/docs/StatusApi.md +57 -0
- data/docs/Task.md +41 -0
- data/docs/TasksApi.md +263 -0
- data/docs/Upload.md +25 -0
- data/docs/UploadsApi.md +395 -0
- data/docs/Worker.md +27 -0
- data/docs/WorkersApi.md +136 -0
- data/git_push.sh +55 -0
- data/lib/pulpcore_client/api/artifacts_api.rb +306 -0
- data/lib/pulpcore_client/api/orphans_api.rb +78 -0
- data/lib/pulpcore_client/api/repositories_api.rb +710 -0
- data/lib/pulpcore_client/api/status_api.rb +76 -0
- data/lib/pulpcore_client/api/tasks_api.rb +330 -0
- data/lib/pulpcore_client/api/uploads_api.rb +493 -0
- data/lib/pulpcore_client/api/workers_api.rb +172 -0
- data/lib/pulpcore_client/api_client.rb +387 -0
- data/lib/pulpcore_client/api_error.rb +57 -0
- data/lib/pulpcore_client/configuration.rb +251 -0
- data/lib/pulpcore_client/models/artifact.rb +296 -0
- data/lib/pulpcore_client/models/async_operation_response.rb +202 -0
- data/lib/pulpcore_client/models/inline_response200.rb +235 -0
- data/lib/pulpcore_client/models/inline_response2001.rb +235 -0
- data/lib/pulpcore_client/models/inline_response2002.rb +235 -0
- data/lib/pulpcore_client/models/inline_response2003.rb +235 -0
- data/lib/pulpcore_client/models/inline_response2004.rb +235 -0
- data/lib/pulpcore_client/models/inline_response2005.rb +235 -0
- data/lib/pulpcore_client/models/progress_report.rb +277 -0
- data/lib/pulpcore_client/models/repository.rb +268 -0
- data/lib/pulpcore_client/models/repository_version.rb +235 -0
- data/lib/pulpcore_client/models/repository_version_create.rb +231 -0
- data/lib/pulpcore_client/models/task.rb +360 -0
- data/lib/pulpcore_client/models/upload.rb +257 -0
- data/lib/pulpcore_client/models/worker.rb +261 -0
- data/lib/pulpcore_client/version.rb +15 -0
- data/lib/pulpcore_client.rb +61 -0
- data/pulpcore_client.gemspec +45 -0
- data/spec/api/artifacts_api_spec.rb +96 -0
- data/spec/api/orphans_api_spec.rb +46 -0
- data/spec/api/repositories_api_spec.rb +171 -0
- data/spec/api/status_api_spec.rb +46 -0
- data/spec/api/tasks_api_spec.rb +102 -0
- data/spec/api/uploads_api_spec.rb +123 -0
- data/spec/api/workers_api_spec.rb +68 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/artifact_spec.rb +101 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/inline_response2001_spec.rb +59 -0
- data/spec/models/inline_response2002_spec.rb +59 -0
- data/spec/models/inline_response2003_spec.rb +59 -0
- data/spec/models/inline_response2004_spec.rb +59 -0
- data/spec/models/inline_response2005_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/progress_report_spec.rb +71 -0
- data/spec/models/repository_spec.rb +71 -0
- data/spec/models/repository_version_create_spec.rb +53 -0
- data/spec/models/repository_version_spec.rb +65 -0
- data/spec/models/task_spec.rb +113 -0
- data/spec/models/upload_spec.rb +65 -0
- data/spec/models/worker_spec.rb +71 -0
- data/spec/spec_helper.rb +111 -0
- metadata +329 -0
@@ -0,0 +1,76 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module PulpcoreClient
|
16
|
+
class StatusApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Inspect status of Pulp
|
23
|
+
# Returns app information including the version of pulpcore and loaded pulp plugins, known workers, database connection status, and messaging connection status
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [nil]
|
26
|
+
def status_list(opts = {})
|
27
|
+
status_list_with_http_info(opts)
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
|
31
|
+
# Inspect status of Pulp
|
32
|
+
# Returns app information including the version of pulpcore and loaded pulp plugins, known workers, database connection status, and messaging connection status
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
35
|
+
def status_list_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: StatusApi.status_list ...'
|
38
|
+
end
|
39
|
+
# resource path
|
40
|
+
local_var_path = '/pulp/api/v3/status/'
|
41
|
+
|
42
|
+
# query parameters
|
43
|
+
query_params = opts[:query_params] || {}
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
|
48
|
+
# form parameters
|
49
|
+
form_params = opts[:form_params] || {}
|
50
|
+
|
51
|
+
# http body (model)
|
52
|
+
post_body = opts[:body]
|
53
|
+
|
54
|
+
# return_type
|
55
|
+
return_type = opts[:return_type]
|
56
|
+
|
57
|
+
# auth_names
|
58
|
+
auth_names = opts[:auth_names] || ['Basic']
|
59
|
+
|
60
|
+
new_options = opts.merge(
|
61
|
+
:header_params => header_params,
|
62
|
+
:query_params => query_params,
|
63
|
+
:form_params => form_params,
|
64
|
+
:body => post_body,
|
65
|
+
:auth_names => auth_names,
|
66
|
+
:return_type => return_type
|
67
|
+
)
|
68
|
+
|
69
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
70
|
+
if @api_client.config.debugging
|
71
|
+
@api_client.config.logger.debug "API called: StatusApi#status_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
72
|
+
end
|
73
|
+
return data, status_code, headers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,330 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module PulpcoreClient
|
16
|
+
class TasksApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Cancel a task
|
23
|
+
# This operation cancels a task.
|
24
|
+
# @param task_href [String] URI of Task. e.g.: /pulp/api/v3/tasks/1/
|
25
|
+
# @param data [Task]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [Task]
|
28
|
+
def tasks_cancel(task_href, data, opts = {})
|
29
|
+
data, _status_code, _headers = tasks_cancel_with_http_info(task_href, data, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Cancel a task
|
34
|
+
# This operation cancels a task.
|
35
|
+
# @param task_href [String] URI of Task. e.g.: /pulp/api/v3/tasks/1/
|
36
|
+
# @param data [Task]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
39
|
+
def tasks_cancel_with_http_info(task_href, data, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.tasks_cancel ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'task_href' is set
|
44
|
+
if @api_client.config.client_side_validation && task_href.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'task_href' when calling TasksApi.tasks_cancel"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'data' is set
|
48
|
+
if @api_client.config.client_side_validation && data.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling TasksApi.tasks_cancel"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '{task_href}cancel/'.sub('{' + 'task_href' + '}', task_href.to_s)
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = opts[:header_params] || {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
# HTTP header 'Content-Type'
|
62
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:return_type] || 'Task'
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:auth_names] || ['Basic']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
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 => return_type
|
83
|
+
)
|
84
|
+
|
85
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: TasksApi#tasks_cancel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Delete a task
|
93
|
+
# @param task_href [String] URI of Task. e.g.: /pulp/api/v3/tasks/1/
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @return [nil]
|
96
|
+
def tasks_delete(task_href, opts = {})
|
97
|
+
tasks_delete_with_http_info(task_href, opts)
|
98
|
+
nil
|
99
|
+
end
|
100
|
+
|
101
|
+
# Delete a task
|
102
|
+
# @param task_href [String] URI of Task. e.g.: /pulp/api/v3/tasks/1/
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
105
|
+
def tasks_delete_with_http_info(task_href, opts = {})
|
106
|
+
if @api_client.config.debugging
|
107
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.tasks_delete ...'
|
108
|
+
end
|
109
|
+
# verify the required parameter 'task_href' is set
|
110
|
+
if @api_client.config.client_side_validation && task_href.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'task_href' when calling TasksApi.tasks_delete"
|
112
|
+
end
|
113
|
+
# resource path
|
114
|
+
local_var_path = '{task_href}'.sub('{' + 'task_href' + '}', task_href.to_s)
|
115
|
+
|
116
|
+
# query parameters
|
117
|
+
query_params = opts[:query_params] || {}
|
118
|
+
|
119
|
+
# header parameters
|
120
|
+
header_params = opts[:header_params] || {}
|
121
|
+
|
122
|
+
# form parameters
|
123
|
+
form_params = opts[:form_params] || {}
|
124
|
+
|
125
|
+
# http body (model)
|
126
|
+
post_body = opts[:body]
|
127
|
+
|
128
|
+
# return_type
|
129
|
+
return_type = opts[:return_type]
|
130
|
+
|
131
|
+
# auth_names
|
132
|
+
auth_names = opts[:auth_names] || ['Basic']
|
133
|
+
|
134
|
+
new_options = opts.merge(
|
135
|
+
:header_params => header_params,
|
136
|
+
:query_params => query_params,
|
137
|
+
:form_params => form_params,
|
138
|
+
:body => post_body,
|
139
|
+
:auth_names => auth_names,
|
140
|
+
:return_type => return_type
|
141
|
+
)
|
142
|
+
|
143
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
144
|
+
if @api_client.config.debugging
|
145
|
+
@api_client.config.logger.debug "API called: TasksApi#tasks_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
146
|
+
end
|
147
|
+
return data, status_code, headers
|
148
|
+
end
|
149
|
+
|
150
|
+
# List tasks
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
153
|
+
# @option opts [String] :state
|
154
|
+
# @option opts [String] :state__in Filter results where state is in a comma-separated list of values
|
155
|
+
# @option opts [String] :worker Foreign Key referenced by HREF
|
156
|
+
# @option opts [String] :worker__in Filter results where worker is in a comma-separated list of values
|
157
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
158
|
+
# @option opts [String] :started_at__lt Filter results where started_at is less than value
|
159
|
+
# @option opts [String] :started_at__lte Filter results where started_at is less than or equal to value
|
160
|
+
# @option opts [String] :started_at__gt Filter results where started_at is greater than value
|
161
|
+
# @option opts [String] :started_at__gte Filter results where started_at is greater than or equal to value
|
162
|
+
# @option opts [String] :started_at__range Filter results where started_at is between two comma separated values
|
163
|
+
# @option opts [String] :finished_at__lt Filter results where finished_at is less than value
|
164
|
+
# @option opts [String] :finished_at__lte Filter results where finished_at is less than or equal to value
|
165
|
+
# @option opts [String] :finished_at__gt Filter results where finished_at is greater than value
|
166
|
+
# @option opts [String] :finished_at__gte Filter results where finished_at is greater than or equal to value
|
167
|
+
# @option opts [String] :finished_at__range Filter results where finished_at is between two comma separated values
|
168
|
+
# @option opts [String] :parent Foreign Key referenced by HREF
|
169
|
+
# @option opts [String] :name
|
170
|
+
# @option opts [String] :started_at ISO 8601 formatted dates are supported
|
171
|
+
# @option opts [String] :finished_at ISO 8601 formatted dates are supported
|
172
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
173
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
174
|
+
# @return [InlineResponse2003]
|
175
|
+
def tasks_list(opts = {})
|
176
|
+
data, _status_code, _headers = tasks_list_with_http_info(opts)
|
177
|
+
data
|
178
|
+
end
|
179
|
+
|
180
|
+
# List tasks
|
181
|
+
# @param [Hash] opts the optional parameters
|
182
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
183
|
+
# @option opts [String] :state
|
184
|
+
# @option opts [String] :state__in Filter results where state is in a comma-separated list of values
|
185
|
+
# @option opts [String] :worker Foreign Key referenced by HREF
|
186
|
+
# @option opts [String] :worker__in Filter results where worker is in a comma-separated list of values
|
187
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
188
|
+
# @option opts [String] :started_at__lt Filter results where started_at is less than value
|
189
|
+
# @option opts [String] :started_at__lte Filter results where started_at is less than or equal to value
|
190
|
+
# @option opts [String] :started_at__gt Filter results where started_at is greater than value
|
191
|
+
# @option opts [String] :started_at__gte Filter results where started_at is greater than or equal to value
|
192
|
+
# @option opts [String] :started_at__range Filter results where started_at is between two comma separated values
|
193
|
+
# @option opts [String] :finished_at__lt Filter results where finished_at is less than value
|
194
|
+
# @option opts [String] :finished_at__lte Filter results where finished_at is less than or equal to value
|
195
|
+
# @option opts [String] :finished_at__gt Filter results where finished_at is greater than value
|
196
|
+
# @option opts [String] :finished_at__gte Filter results where finished_at is greater than or equal to value
|
197
|
+
# @option opts [String] :finished_at__range Filter results where finished_at is between two comma separated values
|
198
|
+
# @option opts [String] :parent Foreign Key referenced by HREF
|
199
|
+
# @option opts [String] :name
|
200
|
+
# @option opts [String] :started_at ISO 8601 formatted dates are supported
|
201
|
+
# @option opts [String] :finished_at ISO 8601 formatted dates are supported
|
202
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
203
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
204
|
+
# @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
|
205
|
+
def tasks_list_with_http_info(opts = {})
|
206
|
+
if @api_client.config.debugging
|
207
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.tasks_list ...'
|
208
|
+
end
|
209
|
+
# resource path
|
210
|
+
local_var_path = '/pulp/api/v3/tasks/'
|
211
|
+
|
212
|
+
# query parameters
|
213
|
+
query_params = opts[:query_params] || {}
|
214
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
215
|
+
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
|
216
|
+
query_params[:'state__in'] = opts[:'state__in'] if !opts[:'state__in'].nil?
|
217
|
+
query_params[:'worker'] = opts[:'worker'] if !opts[:'worker'].nil?
|
218
|
+
query_params[:'worker__in'] = opts[:'worker__in'] if !opts[:'worker__in'].nil?
|
219
|
+
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
220
|
+
query_params[:'started_at__lt'] = opts[:'started_at__lt'] if !opts[:'started_at__lt'].nil?
|
221
|
+
query_params[:'started_at__lte'] = opts[:'started_at__lte'] if !opts[:'started_at__lte'].nil?
|
222
|
+
query_params[:'started_at__gt'] = opts[:'started_at__gt'] if !opts[:'started_at__gt'].nil?
|
223
|
+
query_params[:'started_at__gte'] = opts[:'started_at__gte'] if !opts[:'started_at__gte'].nil?
|
224
|
+
query_params[:'started_at__range'] = opts[:'started_at__range'] if !opts[:'started_at__range'].nil?
|
225
|
+
query_params[:'finished_at__lt'] = opts[:'finished_at__lt'] if !opts[:'finished_at__lt'].nil?
|
226
|
+
query_params[:'finished_at__lte'] = opts[:'finished_at__lte'] if !opts[:'finished_at__lte'].nil?
|
227
|
+
query_params[:'finished_at__gt'] = opts[:'finished_at__gt'] if !opts[:'finished_at__gt'].nil?
|
228
|
+
query_params[:'finished_at__gte'] = opts[:'finished_at__gte'] if !opts[:'finished_at__gte'].nil?
|
229
|
+
query_params[:'finished_at__range'] = opts[:'finished_at__range'] if !opts[:'finished_at__range'].nil?
|
230
|
+
query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
|
231
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
232
|
+
query_params[:'started_at'] = opts[:'started_at'] if !opts[:'started_at'].nil?
|
233
|
+
query_params[:'finished_at'] = opts[:'finished_at'] if !opts[:'finished_at'].nil?
|
234
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
235
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
236
|
+
|
237
|
+
# header parameters
|
238
|
+
header_params = opts[:header_params] || {}
|
239
|
+
# HTTP header 'Accept' (if needed)
|
240
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
241
|
+
|
242
|
+
# form parameters
|
243
|
+
form_params = opts[:form_params] || {}
|
244
|
+
|
245
|
+
# http body (model)
|
246
|
+
post_body = opts[:body]
|
247
|
+
|
248
|
+
# return_type
|
249
|
+
return_type = opts[:return_type] || 'InlineResponse2003'
|
250
|
+
|
251
|
+
# auth_names
|
252
|
+
auth_names = opts[:auth_names] || ['Basic']
|
253
|
+
|
254
|
+
new_options = opts.merge(
|
255
|
+
:header_params => header_params,
|
256
|
+
:query_params => query_params,
|
257
|
+
:form_params => form_params,
|
258
|
+
:body => post_body,
|
259
|
+
:auth_names => auth_names,
|
260
|
+
:return_type => return_type
|
261
|
+
)
|
262
|
+
|
263
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
264
|
+
if @api_client.config.debugging
|
265
|
+
@api_client.config.logger.debug "API called: TasksApi#tasks_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
266
|
+
end
|
267
|
+
return data, status_code, headers
|
268
|
+
end
|
269
|
+
|
270
|
+
# Inspect a task
|
271
|
+
# @param task_href [String] URI of Task. e.g.: /pulp/api/v3/tasks/1/
|
272
|
+
# @param [Hash] opts the optional parameters
|
273
|
+
# @return [Task]
|
274
|
+
def tasks_read(task_href, opts = {})
|
275
|
+
data, _status_code, _headers = tasks_read_with_http_info(task_href, opts)
|
276
|
+
data
|
277
|
+
end
|
278
|
+
|
279
|
+
# Inspect a task
|
280
|
+
# @param task_href [String] URI of Task. e.g.: /pulp/api/v3/tasks/1/
|
281
|
+
# @param [Hash] opts the optional parameters
|
282
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
283
|
+
def tasks_read_with_http_info(task_href, opts = {})
|
284
|
+
if @api_client.config.debugging
|
285
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.tasks_read ...'
|
286
|
+
end
|
287
|
+
# verify the required parameter 'task_href' is set
|
288
|
+
if @api_client.config.client_side_validation && task_href.nil?
|
289
|
+
fail ArgumentError, "Missing the required parameter 'task_href' when calling TasksApi.tasks_read"
|
290
|
+
end
|
291
|
+
# resource path
|
292
|
+
local_var_path = '{task_href}'.sub('{' + 'task_href' + '}', task_href.to_s)
|
293
|
+
|
294
|
+
# query parameters
|
295
|
+
query_params = opts[:query_params] || {}
|
296
|
+
|
297
|
+
# header parameters
|
298
|
+
header_params = opts[:header_params] || {}
|
299
|
+
# HTTP header 'Accept' (if needed)
|
300
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
301
|
+
|
302
|
+
# form parameters
|
303
|
+
form_params = opts[:form_params] || {}
|
304
|
+
|
305
|
+
# http body (model)
|
306
|
+
post_body = opts[:body]
|
307
|
+
|
308
|
+
# return_type
|
309
|
+
return_type = opts[:return_type] || 'Task'
|
310
|
+
|
311
|
+
# auth_names
|
312
|
+
auth_names = opts[:auth_names] || ['Basic']
|
313
|
+
|
314
|
+
new_options = opts.merge(
|
315
|
+
:header_params => header_params,
|
316
|
+
:query_params => query_params,
|
317
|
+
:form_params => form_params,
|
318
|
+
:body => post_body,
|
319
|
+
:auth_names => auth_names,
|
320
|
+
:return_type => return_type
|
321
|
+
)
|
322
|
+
|
323
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
324
|
+
if @api_client.config.debugging
|
325
|
+
@api_client.config.logger.debug "API called: TasksApi#tasks_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
326
|
+
end
|
327
|
+
return data, status_code, headers
|
328
|
+
end
|
329
|
+
end
|
330
|
+
end
|