pulpcore_client 3.0.0rc2 → 3.0.0rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +43 -37
- data/docs/ArtifactsApi.md +20 -20
- data/docs/ContentAppStatus.md +19 -0
- data/docs/DatabaseConnection.md +17 -0
- data/docs/OrphansApi.md +5 -5
- data/docs/ProgressReport.md +1 -3
- data/docs/RedisConnection.md +17 -0
- data/docs/RepositoriesApi.md +30 -278
- data/docs/RepositoriesVersionsApi.md +256 -0
- data/docs/RepositoryVersionCreate.md +2 -2
- data/docs/Status.md +27 -0
- data/docs/StatusApi.md +8 -7
- data/docs/TaskCancel.md +17 -0
- data/docs/TasksApi.md +71 -71
- data/docs/Upload.md +6 -8
- data/docs/UploadCommit.md +17 -0
- data/docs/UploadsApi.md +66 -106
- data/docs/Version.md +19 -0
- data/docs/WorkersApi.md +10 -10
- data/lib/pulpcore_client/api/artifacts_api.rb +47 -23
- data/lib/pulpcore_client/api/orphans_api.rb +6 -6
- data/lib/pulpcore_client/api/repositories_api.rb +38 -338
- data/lib/pulpcore_client/api/repositories_versions_api.rb +322 -0
- data/lib/pulpcore_client/api/status_api.rb +12 -10
- data/lib/pulpcore_client/api/tasks_api.rb +88 -88
- data/lib/pulpcore_client/api/uploads_api.rb +105 -154
- data/lib/pulpcore_client/api/workers_api.rb +12 -12
- data/lib/pulpcore_client/api_client.rb +1 -1
- data/lib/pulpcore_client/api_error.rb +1 -1
- data/lib/pulpcore_client/configuration.rb +1 -1
- data/lib/pulpcore_client/models/artifact.rb +91 -1
- data/lib/pulpcore_client/models/async_operation_response.rb +1 -1
- data/lib/pulpcore_client/models/content_app_status.rb +223 -0
- data/lib/pulpcore_client/models/database_connection.rb +203 -0
- data/lib/pulpcore_client/models/inline_response200.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2001.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2002.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2003.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2004.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2005.rb +1 -1
- data/lib/pulpcore_client/models/progress_report.rb +20 -15
- data/lib/pulpcore_client/models/redis_connection.rb +203 -0
- data/lib/pulpcore_client/models/repository.rb +16 -1
- data/lib/pulpcore_client/models/repository_version.rb +1 -1
- data/lib/pulpcore_client/models/repository_version_create.rb +3 -13
- data/lib/pulpcore_client/models/status.rb +283 -0
- data/lib/pulpcore_client/models/task.rb +1 -1
- data/lib/pulpcore_client/models/task_cancel.rb +221 -0
- data/lib/pulpcore_client/models/upload.rb +26 -52
- data/lib/pulpcore_client/models/upload_commit.rb +221 -0
- data/lib/pulpcore_client/models/version.rb +256 -0
- data/lib/pulpcore_client/models/worker.rb +2 -1
- data/lib/pulpcore_client/version.rb +2 -2
- data/lib/pulpcore_client.rb +9 -1
- data/pulpcore_client.gemspec +1 -1
- data/spec/api/artifacts_api_spec.rb +9 -9
- data/spec/api/orphans_api_spec.rb +3 -3
- data/spec/api/repositories_api_spec.rb +13 -76
- data/spec/api/repositories_versions_api_spec.rb +98 -0
- data/spec/api/status_api_spec.rb +4 -4
- data/spec/api/tasks_api_spec.rb +20 -20
- data/spec/api/uploads_api_spec.rb +32 -37
- data/spec/api/workers_api_spec.rb +5 -5
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/artifact_spec.rb +1 -1
- data/spec/models/async_operation_response_spec.rb +1 -1
- data/spec/models/content_app_status_spec.rb +47 -0
- data/spec/models/database_connection_spec.rb +41 -0
- data/spec/models/inline_response2001_spec.rb +1 -1
- data/spec/models/inline_response2002_spec.rb +1 -1
- data/spec/models/inline_response2003_spec.rb +1 -1
- data/spec/models/inline_response2004_spec.rb +1 -1
- data/spec/models/inline_response2005_spec.rb +1 -1
- data/spec/models/inline_response200_spec.rb +1 -1
- data/spec/models/progress_report_spec.rb +1 -7
- data/spec/models/redis_connection_spec.rb +41 -0
- data/spec/models/repository_spec.rb +1 -1
- data/spec/models/repository_version_create_spec.rb +1 -1
- data/spec/models/repository_version_spec.rb +1 -1
- data/spec/models/status_spec.rb +71 -0
- data/spec/models/task_cancel_spec.rb +41 -0
- data/spec/models/task_spec.rb +1 -1
- data/spec/models/upload_commit_spec.rb +41 -0
- data/spec/models/upload_spec.rb +4 -10
- data/spec/models/version_spec.rb +47 -0
- data/spec/models/worker_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +34 -2
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.0.
|
9
|
+
OpenAPI Generator version: 4.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -19,31 +19,37 @@ module PulpcoreClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
#
|
23
|
-
#
|
24
|
-
# @param
|
22
|
+
# Finish an Upload
|
23
|
+
# Commit the upload and mark it as completed.
|
24
|
+
# @param upload_href [String] URI of Upload. e.g.: /pulp/api/v3/uploads/1/
|
25
|
+
# @param data [UploadCommit]
|
25
26
|
# @param [Hash] opts the optional parameters
|
26
27
|
# @return [Upload]
|
27
|
-
def
|
28
|
-
data, _status_code, _headers =
|
28
|
+
def commit(upload_href, data, opts = {})
|
29
|
+
data, _status_code, _headers = commit_with_http_info(upload_href, data, opts)
|
29
30
|
data
|
30
31
|
end
|
31
32
|
|
32
|
-
#
|
33
|
-
#
|
34
|
-
# @param
|
33
|
+
# Finish an Upload
|
34
|
+
# Commit the upload and mark it as completed.
|
35
|
+
# @param upload_href [String] URI of Upload. e.g.: /pulp/api/v3/uploads/1/
|
36
|
+
# @param data [UploadCommit]
|
35
37
|
# @param [Hash] opts the optional parameters
|
36
38
|
# @return [Array<(Upload, Integer, Hash)>] Upload data, response status code and response headers
|
37
|
-
def
|
39
|
+
def commit_with_http_info(upload_href, data, opts = {})
|
38
40
|
if @api_client.config.debugging
|
39
|
-
@api_client.config.logger.debug 'Calling API: UploadsApi.
|
41
|
+
@api_client.config.logger.debug 'Calling API: UploadsApi.commit ...'
|
40
42
|
end
|
41
|
-
# verify the required parameter '
|
42
|
-
if @api_client.config.client_side_validation &&
|
43
|
-
fail ArgumentError, "Missing the required parameter '
|
43
|
+
# verify the required parameter 'upload_href' is set
|
44
|
+
if @api_client.config.client_side_validation && upload_href.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'upload_href' when calling UploadsApi.commit"
|
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 UploadsApi.commit"
|
44
50
|
end
|
45
51
|
# resource path
|
46
|
-
local_var_path = '/
|
52
|
+
local_var_path = '{upload_href}commit/'.sub('{' + 'upload_href' + '}', upload_href.to_s)
|
47
53
|
|
48
54
|
# query parameters
|
49
55
|
query_params = opts[:query_params] || {}
|
@@ -53,14 +59,13 @@ module PulpcoreClient
|
|
53
59
|
# HTTP header 'Accept' (if needed)
|
54
60
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
61
|
# HTTP header 'Content-Type'
|
56
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['
|
62
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
57
63
|
|
58
64
|
# form parameters
|
59
65
|
form_params = opts[:form_params] || {}
|
60
|
-
form_params['file'] = file
|
61
66
|
|
62
67
|
# http body (model)
|
63
|
-
post_body = opts[:body]
|
68
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
64
69
|
|
65
70
|
# return_type
|
66
71
|
return_type = opts[:return_type] || 'Upload'
|
@@ -79,44 +84,34 @@ module PulpcoreClient
|
|
79
84
|
|
80
85
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
81
86
|
if @api_client.config.debugging
|
82
|
-
@api_client.config.logger.debug "API called: UploadsApi#
|
87
|
+
@api_client.config.logger.debug "API called: UploadsApi#commit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
83
88
|
end
|
84
89
|
return data, status_code, headers
|
85
90
|
end
|
86
91
|
|
87
|
-
# Create an
|
88
|
-
#
|
89
|
-
# @param
|
90
|
-
# @param md5 [String] The expected MD5 checksum of the file.
|
92
|
+
# Create an upload
|
93
|
+
# View for chunked uploads.
|
94
|
+
# @param data [Upload]
|
91
95
|
# @param [Hash] opts the optional parameters
|
92
96
|
# @return [Upload]
|
93
|
-
def
|
94
|
-
data, _status_code, _headers =
|
97
|
+
def create(data, opts = {})
|
98
|
+
data, _status_code, _headers = create_with_http_info(data, opts)
|
95
99
|
data
|
96
100
|
end
|
97
101
|
|
98
|
-
# Create an
|
99
|
-
#
|
100
|
-
# @param
|
101
|
-
# @param md5 [String] The expected MD5 checksum of the file.
|
102
|
+
# Create an upload
|
103
|
+
# View for chunked uploads.
|
104
|
+
# @param data [Upload]
|
102
105
|
# @param [Hash] opts the optional parameters
|
103
106
|
# @return [Array<(Upload, Integer, Hash)>] Upload data, response status code and response headers
|
104
|
-
def
|
107
|
+
def create_with_http_info(data, opts = {})
|
105
108
|
if @api_client.config.debugging
|
106
|
-
@api_client.config.logger.debug 'Calling API: UploadsApi.
|
109
|
+
@api_client.config.logger.debug 'Calling API: UploadsApi.create ...'
|
107
110
|
end
|
108
|
-
# verify the required parameter '
|
109
|
-
if @api_client.config.client_side_validation &&
|
110
|
-
fail ArgumentError, "Missing the required parameter '
|
111
|
+
# verify the required parameter 'data' is set
|
112
|
+
if @api_client.config.client_side_validation && data.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling UploadsApi.create"
|
111
114
|
end
|
112
|
-
# verify the required parameter 'md5' is set
|
113
|
-
if @api_client.config.client_side_validation && md5.nil?
|
114
|
-
fail ArgumentError, "Missing the required parameter 'md5' when calling UploadsApi.uploads_create_and_check"
|
115
|
-
end
|
116
|
-
if @api_client.config.client_side_validation && md5.to_s.length < 1
|
117
|
-
fail ArgumentError, 'invalid value for "md5" when calling UploadsApi.uploads_create_and_check, the character length must be great than or equal to 1.'
|
118
|
-
end
|
119
|
-
|
120
115
|
# resource path
|
121
116
|
local_var_path = '/pulp/api/v3/uploads/'
|
122
117
|
|
@@ -128,15 +123,13 @@ module PulpcoreClient
|
|
128
123
|
# HTTP header 'Accept' (if needed)
|
129
124
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
130
125
|
# HTTP header 'Content-Type'
|
131
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['
|
126
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
132
127
|
|
133
128
|
# form parameters
|
134
129
|
form_params = opts[:form_params] || {}
|
135
|
-
form_params['file'] = file
|
136
|
-
form_params['md5'] = md5
|
137
130
|
|
138
131
|
# http body (model)
|
139
|
-
post_body = opts[:body]
|
132
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
140
133
|
|
141
134
|
# return_type
|
142
135
|
return_type = opts[:return_type] || 'Upload'
|
@@ -155,7 +148,7 @@ module PulpcoreClient
|
|
155
148
|
|
156
149
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
157
150
|
if @api_client.config.debugging
|
158
|
-
@api_client.config.logger.debug "API called: UploadsApi#
|
151
|
+
@api_client.config.logger.debug "API called: UploadsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
159
152
|
end
|
160
153
|
return data, status_code, headers
|
161
154
|
end
|
@@ -165,8 +158,8 @@ module PulpcoreClient
|
|
165
158
|
# @param upload_href [String] URI of Upload. e.g.: /pulp/api/v3/uploads/1/
|
166
159
|
# @param [Hash] opts the optional parameters
|
167
160
|
# @return [nil]
|
168
|
-
def
|
169
|
-
|
161
|
+
def delete(upload_href, opts = {})
|
162
|
+
delete_with_http_info(upload_href, opts)
|
170
163
|
nil
|
171
164
|
end
|
172
165
|
|
@@ -175,13 +168,13 @@ module PulpcoreClient
|
|
175
168
|
# @param upload_href [String] URI of Upload. e.g.: /pulp/api/v3/uploads/1/
|
176
169
|
# @param [Hash] opts the optional parameters
|
177
170
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
178
|
-
def
|
171
|
+
def delete_with_http_info(upload_href, opts = {})
|
179
172
|
if @api_client.config.debugging
|
180
|
-
@api_client.config.logger.debug 'Calling API: UploadsApi.
|
173
|
+
@api_client.config.logger.debug 'Calling API: UploadsApi.delete ...'
|
181
174
|
end
|
182
175
|
# verify the required parameter 'upload_href' is set
|
183
176
|
if @api_client.config.client_side_validation && upload_href.nil?
|
184
|
-
fail ArgumentError, "Missing the required parameter 'upload_href' when calling UploadsApi.
|
177
|
+
fail ArgumentError, "Missing the required parameter 'upload_href' when calling UploadsApi.delete"
|
185
178
|
end
|
186
179
|
# resource path
|
187
180
|
local_var_path = '{upload_href}'.sub('{' + 'upload_href' + '}', upload_href.to_s)
|
@@ -215,112 +208,58 @@ module PulpcoreClient
|
|
215
208
|
|
216
209
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
217
210
|
if @api_client.config.debugging
|
218
|
-
@api_client.config.logger.debug "API called: UploadsApi#
|
219
|
-
end
|
220
|
-
return data, status_code, headers
|
221
|
-
end
|
222
|
-
|
223
|
-
# Finish an Upload
|
224
|
-
# Mark the Upload as \"complete\". The md5 checksum is used to validate the integrity of the upload.
|
225
|
-
# @param upload_href [String] URI of Upload. e.g.: /pulp/api/v3/uploads/1/
|
226
|
-
# @param md5 [String] The expected MD5 checksum of the file.
|
227
|
-
# @param [Hash] opts the optional parameters
|
228
|
-
# @return [Upload]
|
229
|
-
def uploads_finish(upload_href, md5, opts = {})
|
230
|
-
data, _status_code, _headers = uploads_finish_with_http_info(upload_href, md5, opts)
|
231
|
-
data
|
232
|
-
end
|
233
|
-
|
234
|
-
# Finish an Upload
|
235
|
-
# Mark the Upload as \"complete\". The md5 checksum is used to validate the integrity of the upload.
|
236
|
-
# @param upload_href [String] URI of Upload. e.g.: /pulp/api/v3/uploads/1/
|
237
|
-
# @param md5 [String] The expected MD5 checksum of the file.
|
238
|
-
# @param [Hash] opts the optional parameters
|
239
|
-
# @return [Array<(Upload, Integer, Hash)>] Upload data, response status code and response headers
|
240
|
-
def uploads_finish_with_http_info(upload_href, md5, opts = {})
|
241
|
-
if @api_client.config.debugging
|
242
|
-
@api_client.config.logger.debug 'Calling API: UploadsApi.uploads_finish ...'
|
243
|
-
end
|
244
|
-
# verify the required parameter 'upload_href' is set
|
245
|
-
if @api_client.config.client_side_validation && upload_href.nil?
|
246
|
-
fail ArgumentError, "Missing the required parameter 'upload_href' when calling UploadsApi.uploads_finish"
|
247
|
-
end
|
248
|
-
# verify the required parameter 'md5' is set
|
249
|
-
if @api_client.config.client_side_validation && md5.nil?
|
250
|
-
fail ArgumentError, "Missing the required parameter 'md5' when calling UploadsApi.uploads_finish"
|
251
|
-
end
|
252
|
-
if @api_client.config.client_side_validation && md5.to_s.length < 1
|
253
|
-
fail ArgumentError, 'invalid value for "md5" when calling UploadsApi.uploads_finish, the character length must be great than or equal to 1.'
|
254
|
-
end
|
255
|
-
|
256
|
-
# resource path
|
257
|
-
local_var_path = '{upload_href}'.sub('{' + 'upload_href' + '}', upload_href.to_s)
|
258
|
-
|
259
|
-
# query parameters
|
260
|
-
query_params = opts[:query_params] || {}
|
261
|
-
|
262
|
-
# header parameters
|
263
|
-
header_params = opts[:header_params] || {}
|
264
|
-
# HTTP header 'Accept' (if needed)
|
265
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
266
|
-
# HTTP header 'Content-Type'
|
267
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
268
|
-
|
269
|
-
# form parameters
|
270
|
-
form_params = opts[:form_params] || {}
|
271
|
-
form_params['md5'] = md5
|
272
|
-
|
273
|
-
# http body (model)
|
274
|
-
post_body = opts[:body]
|
275
|
-
|
276
|
-
# return_type
|
277
|
-
return_type = opts[:return_type] || 'Upload'
|
278
|
-
|
279
|
-
# auth_names
|
280
|
-
auth_names = opts[:auth_names] || ['Basic']
|
281
|
-
|
282
|
-
new_options = opts.merge(
|
283
|
-
:header_params => header_params,
|
284
|
-
:query_params => query_params,
|
285
|
-
:form_params => form_params,
|
286
|
-
:body => post_body,
|
287
|
-
:auth_names => auth_names,
|
288
|
-
:return_type => return_type
|
289
|
-
)
|
290
|
-
|
291
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
292
|
-
if @api_client.config.debugging
|
293
|
-
@api_client.config.logger.debug "API called: UploadsApi#uploads_finish\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
211
|
+
@api_client.config.logger.debug "API called: UploadsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
294
212
|
end
|
295
213
|
return data, status_code, headers
|
296
214
|
end
|
297
215
|
|
298
216
|
# List uploads
|
299
|
-
#
|
217
|
+
# View for chunked uploads.
|
300
218
|
# @param [Hash] opts the optional parameters
|
219
|
+
# @option opts [String] :completed__lt Filter results where completed is less than value
|
220
|
+
# @option opts [String] :completed__lte Filter results where completed is less than or equal to value
|
221
|
+
# @option opts [String] :completed__gt Filter results where completed is greater than value
|
222
|
+
# @option opts [String] :completed__gte Filter results where completed is greater than or equal to value
|
223
|
+
# @option opts [String] :completed__range Filter results where completed is between two comma separated values
|
224
|
+
# @option opts [String] :completed__isnull Filter results where completed has a null value
|
225
|
+
# @option opts [String] :completed ISO 8601 formatted dates are supported
|
301
226
|
# @option opts [Integer] :page A page number within the paginated result set.
|
302
227
|
# @option opts [Integer] :page_size Number of results to return per page.
|
303
228
|
# @return [InlineResponse2004]
|
304
|
-
def
|
305
|
-
data, _status_code, _headers =
|
229
|
+
def list(opts = {})
|
230
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
306
231
|
data
|
307
232
|
end
|
308
233
|
|
309
234
|
# List uploads
|
310
|
-
#
|
235
|
+
# View for chunked uploads.
|
311
236
|
# @param [Hash] opts the optional parameters
|
237
|
+
# @option opts [String] :completed__lt Filter results where completed is less than value
|
238
|
+
# @option opts [String] :completed__lte Filter results where completed is less than or equal to value
|
239
|
+
# @option opts [String] :completed__gt Filter results where completed is greater than value
|
240
|
+
# @option opts [String] :completed__gte Filter results where completed is greater than or equal to value
|
241
|
+
# @option opts [String] :completed__range Filter results where completed is between two comma separated values
|
242
|
+
# @option opts [String] :completed__isnull Filter results where completed has a null value
|
243
|
+
# @option opts [String] :completed ISO 8601 formatted dates are supported
|
312
244
|
# @option opts [Integer] :page A page number within the paginated result set.
|
313
245
|
# @option opts [Integer] :page_size Number of results to return per page.
|
314
246
|
# @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
|
315
|
-
def
|
247
|
+
def list_with_http_info(opts = {})
|
316
248
|
if @api_client.config.debugging
|
317
|
-
@api_client.config.logger.debug 'Calling API: UploadsApi.
|
249
|
+
@api_client.config.logger.debug 'Calling API: UploadsApi.list ...'
|
318
250
|
end
|
319
251
|
# resource path
|
320
252
|
local_var_path = '/pulp/api/v3/uploads/'
|
321
253
|
|
322
254
|
# query parameters
|
323
255
|
query_params = opts[:query_params] || {}
|
256
|
+
query_params[:'completed__lt'] = opts[:'completed__lt'] if !opts[:'completed__lt'].nil?
|
257
|
+
query_params[:'completed__lte'] = opts[:'completed__lte'] if !opts[:'completed__lte'].nil?
|
258
|
+
query_params[:'completed__gt'] = opts[:'completed__gt'] if !opts[:'completed__gt'].nil?
|
259
|
+
query_params[:'completed__gte'] = opts[:'completed__gte'] if !opts[:'completed__gte'].nil?
|
260
|
+
query_params[:'completed__range'] = opts[:'completed__range'] if !opts[:'completed__range'].nil?
|
261
|
+
query_params[:'completed__isnull'] = opts[:'completed__isnull'] if !opts[:'completed__isnull'].nil?
|
262
|
+
query_params[:'completed'] = opts[:'completed'] if !opts[:'completed'].nil?
|
324
263
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
325
264
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
326
265
|
|
@@ -352,7 +291,7 @@ module PulpcoreClient
|
|
352
291
|
|
353
292
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
354
293
|
if @api_client.config.debugging
|
355
|
-
@api_client.config.logger.debug "API called: UploadsApi#
|
294
|
+
@api_client.config.logger.debug "API called: UploadsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
356
295
|
end
|
357
296
|
return data, status_code, headers
|
358
297
|
end
|
@@ -362,8 +301,8 @@ module PulpcoreClient
|
|
362
301
|
# @param upload_href [String] URI of Upload. e.g.: /pulp/api/v3/uploads/1/
|
363
302
|
# @param [Hash] opts the optional parameters
|
364
303
|
# @return [Upload]
|
365
|
-
def
|
366
|
-
data, _status_code, _headers =
|
304
|
+
def read(upload_href, opts = {})
|
305
|
+
data, _status_code, _headers = read_with_http_info(upload_href, opts)
|
367
306
|
data
|
368
307
|
end
|
369
308
|
|
@@ -372,13 +311,13 @@ module PulpcoreClient
|
|
372
311
|
# @param upload_href [String] URI of Upload. e.g.: /pulp/api/v3/uploads/1/
|
373
312
|
# @param [Hash] opts the optional parameters
|
374
313
|
# @return [Array<(Upload, Integer, Hash)>] Upload data, response status code and response headers
|
375
|
-
def
|
314
|
+
def read_with_http_info(upload_href, opts = {})
|
376
315
|
if @api_client.config.debugging
|
377
|
-
@api_client.config.logger.debug 'Calling API: UploadsApi.
|
316
|
+
@api_client.config.logger.debug 'Calling API: UploadsApi.read ...'
|
378
317
|
end
|
379
318
|
# verify the required parameter 'upload_href' is set
|
380
319
|
if @api_client.config.client_side_validation && upload_href.nil?
|
381
|
-
fail ArgumentError, "Missing the required parameter 'upload_href' when calling UploadsApi.
|
320
|
+
fail ArgumentError, "Missing the required parameter 'upload_href' when calling UploadsApi.read"
|
382
321
|
end
|
383
322
|
# resource path
|
384
323
|
local_var_path = '{upload_href}'.sub('{' + 'upload_href' + '}', upload_href.to_s)
|
@@ -414,39 +353,50 @@ module PulpcoreClient
|
|
414
353
|
|
415
354
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
416
355
|
if @api_client.config.debugging
|
417
|
-
@api_client.config.logger.debug "API called: UploadsApi#
|
356
|
+
@api_client.config.logger.debug "API called: UploadsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
418
357
|
end
|
419
358
|
return data, status_code, headers
|
420
359
|
end
|
421
360
|
|
422
|
-
#
|
423
|
-
#
|
361
|
+
# Upload a file chunk
|
362
|
+
# Upload a chunk for an upload.
|
424
363
|
# @param upload_href [String] URI of Upload. e.g.: /pulp/api/v3/uploads/1/
|
425
|
-
# @param
|
364
|
+
# @param content_range [String] The Content-Range header specifies the location of the file chunk within the file.
|
365
|
+
# @param file [File] A chunk of the uploaded file.
|
426
366
|
# @param [Hash] opts the optional parameters
|
427
367
|
# @return [Upload]
|
428
|
-
def
|
429
|
-
data, _status_code, _headers =
|
368
|
+
def update(upload_href, content_range, file, opts = {})
|
369
|
+
data, _status_code, _headers = update_with_http_info(upload_href, content_range, file, opts)
|
430
370
|
data
|
431
371
|
end
|
432
372
|
|
433
|
-
#
|
434
|
-
#
|
373
|
+
# Upload a file chunk
|
374
|
+
# Upload a chunk for an upload.
|
435
375
|
# @param upload_href [String] URI of Upload. e.g.: /pulp/api/v3/uploads/1/
|
436
|
-
# @param
|
376
|
+
# @param content_range [String] The Content-Range header specifies the location of the file chunk within the file.
|
377
|
+
# @param file [File] A chunk of the uploaded file.
|
437
378
|
# @param [Hash] opts the optional parameters
|
438
379
|
# @return [Array<(Upload, Integer, Hash)>] Upload data, response status code and response headers
|
439
|
-
def
|
380
|
+
def update_with_http_info(upload_href, content_range, file, opts = {})
|
440
381
|
if @api_client.config.debugging
|
441
|
-
@api_client.config.logger.debug 'Calling API: UploadsApi.
|
382
|
+
@api_client.config.logger.debug 'Calling API: UploadsApi.update ...'
|
442
383
|
end
|
443
384
|
# verify the required parameter 'upload_href' is set
|
444
385
|
if @api_client.config.client_side_validation && upload_href.nil?
|
445
|
-
fail ArgumentError, "Missing the required parameter 'upload_href' when calling UploadsApi.
|
386
|
+
fail ArgumentError, "Missing the required parameter 'upload_href' when calling UploadsApi.update"
|
387
|
+
end
|
388
|
+
# verify the required parameter 'content_range' is set
|
389
|
+
if @api_client.config.client_side_validation && content_range.nil?
|
390
|
+
fail ArgumentError, "Missing the required parameter 'content_range' when calling UploadsApi.update"
|
446
391
|
end
|
392
|
+
pattern = Regexp.new(/^bytes (\d+)-(\d+)\/(\d+|[*])$/)
|
393
|
+
if @api_client.config.client_side_validation && content_range !~ pattern
|
394
|
+
fail ArgumentError, "invalid value for 'content_range' when calling UploadsApi.update, must conform to the pattern #{pattern}."
|
395
|
+
end
|
396
|
+
|
447
397
|
# verify the required parameter 'file' is set
|
448
398
|
if @api_client.config.client_side_validation && file.nil?
|
449
|
-
fail ArgumentError, "Missing the required parameter 'file' when calling UploadsApi.
|
399
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling UploadsApi.update"
|
450
400
|
end
|
451
401
|
# resource path
|
452
402
|
local_var_path = '{upload_href}'.sub('{' + 'upload_href' + '}', upload_href.to_s)
|
@@ -460,6 +410,7 @@ module PulpcoreClient
|
|
460
410
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
461
411
|
# HTTP header 'Content-Type'
|
462
412
|
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
413
|
+
header_params[:'Content-Range'] = content_range
|
463
414
|
|
464
415
|
# form parameters
|
465
416
|
form_params = opts[:form_params] || {}
|
@@ -485,7 +436,7 @@ module PulpcoreClient
|
|
485
436
|
|
486
437
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
487
438
|
if @api_client.config.debugging
|
488
|
-
@api_client.config.logger.debug "API called: UploadsApi#
|
439
|
+
@api_client.config.logger.debug "API called: UploadsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
489
440
|
end
|
490
441
|
return data, status_code, headers
|
491
442
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.0.
|
9
|
+
OpenAPI Generator version: 4.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -34,8 +34,8 @@ module PulpcoreClient
|
|
34
34
|
# @option opts [Integer] :page A page number within the paginated result set.
|
35
35
|
# @option opts [Integer] :page_size Number of results to return per page.
|
36
36
|
# @return [InlineResponse2005]
|
37
|
-
def
|
38
|
-
data, _status_code, _headers =
|
37
|
+
def list(opts = {})
|
38
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
39
39
|
data
|
40
40
|
end
|
41
41
|
|
@@ -54,9 +54,9 @@ module PulpcoreClient
|
|
54
54
|
# @option opts [Integer] :page A page number within the paginated result set.
|
55
55
|
# @option opts [Integer] :page_size Number of results to return per page.
|
56
56
|
# @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
|
57
|
-
def
|
57
|
+
def list_with_http_info(opts = {})
|
58
58
|
if @api_client.config.debugging
|
59
|
-
@api_client.config.logger.debug 'Calling API: WorkersApi.
|
59
|
+
@api_client.config.logger.debug 'Calling API: WorkersApi.list ...'
|
60
60
|
end
|
61
61
|
# resource path
|
62
62
|
local_var_path = '/pulp/api/v3/workers/'
|
@@ -104,7 +104,7 @@ module PulpcoreClient
|
|
104
104
|
|
105
105
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
106
106
|
if @api_client.config.debugging
|
107
|
-
@api_client.config.logger.debug "API called: WorkersApi#
|
107
|
+
@api_client.config.logger.debug "API called: WorkersApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
108
108
|
end
|
109
109
|
return data, status_code, headers
|
110
110
|
end
|
@@ -113,8 +113,8 @@ module PulpcoreClient
|
|
113
113
|
# @param worker_href [String] URI of Worker. e.g.: /pulp/api/v3/workers/1/
|
114
114
|
# @param [Hash] opts the optional parameters
|
115
115
|
# @return [Worker]
|
116
|
-
def
|
117
|
-
data, _status_code, _headers =
|
116
|
+
def read(worker_href, opts = {})
|
117
|
+
data, _status_code, _headers = read_with_http_info(worker_href, opts)
|
118
118
|
data
|
119
119
|
end
|
120
120
|
|
@@ -122,13 +122,13 @@ module PulpcoreClient
|
|
122
122
|
# @param worker_href [String] URI of Worker. e.g.: /pulp/api/v3/workers/1/
|
123
123
|
# @param [Hash] opts the optional parameters
|
124
124
|
# @return [Array<(Worker, Integer, Hash)>] Worker data, response status code and response headers
|
125
|
-
def
|
125
|
+
def read_with_http_info(worker_href, opts = {})
|
126
126
|
if @api_client.config.debugging
|
127
|
-
@api_client.config.logger.debug 'Calling API: WorkersApi.
|
127
|
+
@api_client.config.logger.debug 'Calling API: WorkersApi.read ...'
|
128
128
|
end
|
129
129
|
# verify the required parameter 'worker_href' is set
|
130
130
|
if @api_client.config.client_side_validation && worker_href.nil?
|
131
|
-
fail ArgumentError, "Missing the required parameter 'worker_href' when calling WorkersApi.
|
131
|
+
fail ArgumentError, "Missing the required parameter 'worker_href' when calling WorkersApi.read"
|
132
132
|
end
|
133
133
|
# resource path
|
134
134
|
local_var_path = '{worker_href}'.sub('{' + 'worker_href' + '}', worker_href.to_s)
|
@@ -164,7 +164,7 @@ module PulpcoreClient
|
|
164
164
|
|
165
165
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
166
166
|
if @api_client.config.debugging
|
167
|
-
@api_client.config.logger.debug "API called: WorkersApi#
|
167
|
+
@api_client.config.logger.debug "API called: WorkersApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
168
168
|
end
|
169
169
|
return data, status_code, headers
|
170
170
|
end
|