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,710 @@
|
|
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 RepositoriesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a repository
|
23
|
+
# @param data [Repository]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [Repository]
|
26
|
+
def repositories_create(data, opts = {})
|
27
|
+
data, _status_code, _headers = repositories_create_with_http_info(data, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Create a repository
|
32
|
+
# @param data [Repository]
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
|
35
|
+
def repositories_create_with_http_info(data, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesApi.repositories_create ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'data' is set
|
40
|
+
if @api_client.config.client_side_validation && data.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesApi.repositories_create"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/pulp/api/v3/repositories/'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:return_type] || 'Repository'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:auth_names] || ['Basic']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: RepositoriesApi#repositories_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# Delete a repository
|
85
|
+
# Trigger an asynchronous task to delete a repository.
|
86
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [AsyncOperationResponse]
|
89
|
+
def repositories_delete(repository_href, opts = {})
|
90
|
+
data, _status_code, _headers = repositories_delete_with_http_info(repository_href, opts)
|
91
|
+
data
|
92
|
+
end
|
93
|
+
|
94
|
+
# Delete a repository
|
95
|
+
# Trigger an asynchronous task to delete a repository.
|
96
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
99
|
+
def repositories_delete_with_http_info(repository_href, opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesApi.repositories_delete ...'
|
102
|
+
end
|
103
|
+
# verify the required parameter 'repository_href' is set
|
104
|
+
if @api_client.config.client_side_validation && repository_href.nil?
|
105
|
+
fail ArgumentError, "Missing the required parameter 'repository_href' when calling RepositoriesApi.repositories_delete"
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = '{repository_href}'.sub('{' + 'repository_href' + '}', repository_href.to_s)
|
109
|
+
|
110
|
+
# query parameters
|
111
|
+
query_params = opts[:query_params] || {}
|
112
|
+
|
113
|
+
# header parameters
|
114
|
+
header_params = opts[:header_params] || {}
|
115
|
+
# HTTP header 'Accept' (if needed)
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = opts[:form_params] || {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = opts[:body]
|
123
|
+
|
124
|
+
# return_type
|
125
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
126
|
+
|
127
|
+
# auth_names
|
128
|
+
auth_names = opts[:auth_names] || ['Basic']
|
129
|
+
|
130
|
+
new_options = opts.merge(
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: RepositoriesApi#repositories_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# List repositories
|
147
|
+
# @param [Hash] opts the optional parameters
|
148
|
+
# @option opts [String] :name
|
149
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
150
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
151
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
152
|
+
# @return [InlineResponse2001]
|
153
|
+
def repositories_list(opts = {})
|
154
|
+
data, _status_code, _headers = repositories_list_with_http_info(opts)
|
155
|
+
data
|
156
|
+
end
|
157
|
+
|
158
|
+
# List repositories
|
159
|
+
# @param [Hash] opts the optional parameters
|
160
|
+
# @option opts [String] :name
|
161
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
162
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
163
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
164
|
+
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
|
165
|
+
def repositories_list_with_http_info(opts = {})
|
166
|
+
if @api_client.config.debugging
|
167
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesApi.repositories_list ...'
|
168
|
+
end
|
169
|
+
# resource path
|
170
|
+
local_var_path = '/pulp/api/v3/repositories/'
|
171
|
+
|
172
|
+
# query parameters
|
173
|
+
query_params = opts[:query_params] || {}
|
174
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
175
|
+
query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
|
176
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
177
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
178
|
+
|
179
|
+
# header parameters
|
180
|
+
header_params = opts[:header_params] || {}
|
181
|
+
# HTTP header 'Accept' (if needed)
|
182
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
183
|
+
|
184
|
+
# form parameters
|
185
|
+
form_params = opts[:form_params] || {}
|
186
|
+
|
187
|
+
# http body (model)
|
188
|
+
post_body = opts[:body]
|
189
|
+
|
190
|
+
# return_type
|
191
|
+
return_type = opts[:return_type] || 'InlineResponse2001'
|
192
|
+
|
193
|
+
# auth_names
|
194
|
+
auth_names = opts[:auth_names] || ['Basic']
|
195
|
+
|
196
|
+
new_options = opts.merge(
|
197
|
+
:header_params => header_params,
|
198
|
+
:query_params => query_params,
|
199
|
+
:form_params => form_params,
|
200
|
+
:body => post_body,
|
201
|
+
:auth_names => auth_names,
|
202
|
+
:return_type => return_type
|
203
|
+
)
|
204
|
+
|
205
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
206
|
+
if @api_client.config.debugging
|
207
|
+
@api_client.config.logger.debug "API called: RepositoriesApi#repositories_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
208
|
+
end
|
209
|
+
return data, status_code, headers
|
210
|
+
end
|
211
|
+
|
212
|
+
# Partially update a repository
|
213
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
214
|
+
# @param data [Repository]
|
215
|
+
# @param [Hash] opts the optional parameters
|
216
|
+
# @return [Repository]
|
217
|
+
def repositories_partial_update(repository_href, data, opts = {})
|
218
|
+
data, _status_code, _headers = repositories_partial_update_with_http_info(repository_href, data, opts)
|
219
|
+
data
|
220
|
+
end
|
221
|
+
|
222
|
+
# Partially update a repository
|
223
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
224
|
+
# @param data [Repository]
|
225
|
+
# @param [Hash] opts the optional parameters
|
226
|
+
# @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
|
227
|
+
def repositories_partial_update_with_http_info(repository_href, data, opts = {})
|
228
|
+
if @api_client.config.debugging
|
229
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesApi.repositories_partial_update ...'
|
230
|
+
end
|
231
|
+
# verify the required parameter 'repository_href' is set
|
232
|
+
if @api_client.config.client_side_validation && repository_href.nil?
|
233
|
+
fail ArgumentError, "Missing the required parameter 'repository_href' when calling RepositoriesApi.repositories_partial_update"
|
234
|
+
end
|
235
|
+
# verify the required parameter 'data' is set
|
236
|
+
if @api_client.config.client_side_validation && data.nil?
|
237
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesApi.repositories_partial_update"
|
238
|
+
end
|
239
|
+
# resource path
|
240
|
+
local_var_path = '{repository_href}'.sub('{' + 'repository_href' + '}', repository_href.to_s)
|
241
|
+
|
242
|
+
# query parameters
|
243
|
+
query_params = opts[:query_params] || {}
|
244
|
+
|
245
|
+
# header parameters
|
246
|
+
header_params = opts[:header_params] || {}
|
247
|
+
# HTTP header 'Accept' (if needed)
|
248
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
249
|
+
# HTTP header 'Content-Type'
|
250
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
251
|
+
|
252
|
+
# form parameters
|
253
|
+
form_params = opts[:form_params] || {}
|
254
|
+
|
255
|
+
# http body (model)
|
256
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
257
|
+
|
258
|
+
# return_type
|
259
|
+
return_type = opts[:return_type] || 'Repository'
|
260
|
+
|
261
|
+
# auth_names
|
262
|
+
auth_names = opts[:auth_names] || ['Basic']
|
263
|
+
|
264
|
+
new_options = opts.merge(
|
265
|
+
:header_params => header_params,
|
266
|
+
:query_params => query_params,
|
267
|
+
:form_params => form_params,
|
268
|
+
:body => post_body,
|
269
|
+
:auth_names => auth_names,
|
270
|
+
:return_type => return_type
|
271
|
+
)
|
272
|
+
|
273
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
274
|
+
if @api_client.config.debugging
|
275
|
+
@api_client.config.logger.debug "API called: RepositoriesApi#repositories_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
276
|
+
end
|
277
|
+
return data, status_code, headers
|
278
|
+
end
|
279
|
+
|
280
|
+
# Inspect a repository
|
281
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
282
|
+
# @param [Hash] opts the optional parameters
|
283
|
+
# @return [Repository]
|
284
|
+
def repositories_read(repository_href, opts = {})
|
285
|
+
data, _status_code, _headers = repositories_read_with_http_info(repository_href, opts)
|
286
|
+
data
|
287
|
+
end
|
288
|
+
|
289
|
+
# Inspect a repository
|
290
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
291
|
+
# @param [Hash] opts the optional parameters
|
292
|
+
# @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
|
293
|
+
def repositories_read_with_http_info(repository_href, opts = {})
|
294
|
+
if @api_client.config.debugging
|
295
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesApi.repositories_read ...'
|
296
|
+
end
|
297
|
+
# verify the required parameter 'repository_href' is set
|
298
|
+
if @api_client.config.client_side_validation && repository_href.nil?
|
299
|
+
fail ArgumentError, "Missing the required parameter 'repository_href' when calling RepositoriesApi.repositories_read"
|
300
|
+
end
|
301
|
+
# resource path
|
302
|
+
local_var_path = '{repository_href}'.sub('{' + 'repository_href' + '}', repository_href.to_s)
|
303
|
+
|
304
|
+
# query parameters
|
305
|
+
query_params = opts[:query_params] || {}
|
306
|
+
|
307
|
+
# header parameters
|
308
|
+
header_params = opts[:header_params] || {}
|
309
|
+
# HTTP header 'Accept' (if needed)
|
310
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
311
|
+
|
312
|
+
# form parameters
|
313
|
+
form_params = opts[:form_params] || {}
|
314
|
+
|
315
|
+
# http body (model)
|
316
|
+
post_body = opts[:body]
|
317
|
+
|
318
|
+
# return_type
|
319
|
+
return_type = opts[:return_type] || 'Repository'
|
320
|
+
|
321
|
+
# auth_names
|
322
|
+
auth_names = opts[:auth_names] || ['Basic']
|
323
|
+
|
324
|
+
new_options = opts.merge(
|
325
|
+
:header_params => header_params,
|
326
|
+
:query_params => query_params,
|
327
|
+
:form_params => form_params,
|
328
|
+
:body => post_body,
|
329
|
+
:auth_names => auth_names,
|
330
|
+
:return_type => return_type
|
331
|
+
)
|
332
|
+
|
333
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
334
|
+
if @api_client.config.debugging
|
335
|
+
@api_client.config.logger.debug "API called: RepositoriesApi#repositories_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
336
|
+
end
|
337
|
+
return data, status_code, headers
|
338
|
+
end
|
339
|
+
|
340
|
+
# Update a repository
|
341
|
+
# Trigger an asynchronous task to updatea repository.
|
342
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
343
|
+
# @param data [Repository]
|
344
|
+
# @param [Hash] opts the optional parameters
|
345
|
+
# @return [AsyncOperationResponse]
|
346
|
+
def repositories_update(repository_href, data, opts = {})
|
347
|
+
data, _status_code, _headers = repositories_update_with_http_info(repository_href, data, opts)
|
348
|
+
data
|
349
|
+
end
|
350
|
+
|
351
|
+
# Update a repository
|
352
|
+
# Trigger an asynchronous task to updatea repository.
|
353
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
354
|
+
# @param data [Repository]
|
355
|
+
# @param [Hash] opts the optional parameters
|
356
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
357
|
+
def repositories_update_with_http_info(repository_href, data, opts = {})
|
358
|
+
if @api_client.config.debugging
|
359
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesApi.repositories_update ...'
|
360
|
+
end
|
361
|
+
# verify the required parameter 'repository_href' is set
|
362
|
+
if @api_client.config.client_side_validation && repository_href.nil?
|
363
|
+
fail ArgumentError, "Missing the required parameter 'repository_href' when calling RepositoriesApi.repositories_update"
|
364
|
+
end
|
365
|
+
# verify the required parameter 'data' is set
|
366
|
+
if @api_client.config.client_side_validation && data.nil?
|
367
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesApi.repositories_update"
|
368
|
+
end
|
369
|
+
# resource path
|
370
|
+
local_var_path = '{repository_href}'.sub('{' + 'repository_href' + '}', repository_href.to_s)
|
371
|
+
|
372
|
+
# query parameters
|
373
|
+
query_params = opts[:query_params] || {}
|
374
|
+
|
375
|
+
# header parameters
|
376
|
+
header_params = opts[:header_params] || {}
|
377
|
+
# HTTP header 'Accept' (if needed)
|
378
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
379
|
+
# HTTP header 'Content-Type'
|
380
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
381
|
+
|
382
|
+
# form parameters
|
383
|
+
form_params = opts[:form_params] || {}
|
384
|
+
|
385
|
+
# http body (model)
|
386
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
387
|
+
|
388
|
+
# return_type
|
389
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
390
|
+
|
391
|
+
# auth_names
|
392
|
+
auth_names = opts[:auth_names] || ['Basic']
|
393
|
+
|
394
|
+
new_options = opts.merge(
|
395
|
+
:header_params => header_params,
|
396
|
+
:query_params => query_params,
|
397
|
+
:form_params => form_params,
|
398
|
+
:body => post_body,
|
399
|
+
:auth_names => auth_names,
|
400
|
+
:return_type => return_type
|
401
|
+
)
|
402
|
+
|
403
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
404
|
+
if @api_client.config.debugging
|
405
|
+
@api_client.config.logger.debug "API called: RepositoriesApi#repositories_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
406
|
+
end
|
407
|
+
return data, status_code, headers
|
408
|
+
end
|
409
|
+
|
410
|
+
# Create a repository version
|
411
|
+
# Trigger an asynchronous task to create a new repository version.
|
412
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
413
|
+
# @param data [RepositoryVersionCreate]
|
414
|
+
# @param [Hash] opts the optional parameters
|
415
|
+
# @return [AsyncOperationResponse]
|
416
|
+
def repositories_versions_create(repository_href, data, opts = {})
|
417
|
+
data, _status_code, _headers = repositories_versions_create_with_http_info(repository_href, data, opts)
|
418
|
+
data
|
419
|
+
end
|
420
|
+
|
421
|
+
# Create a repository version
|
422
|
+
# Trigger an asynchronous task to create a new repository version.
|
423
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
424
|
+
# @param data [RepositoryVersionCreate]
|
425
|
+
# @param [Hash] opts the optional parameters
|
426
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
427
|
+
def repositories_versions_create_with_http_info(repository_href, data, opts = {})
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesApi.repositories_versions_create ...'
|
430
|
+
end
|
431
|
+
# verify the required parameter 'repository_href' is set
|
432
|
+
if @api_client.config.client_side_validation && repository_href.nil?
|
433
|
+
fail ArgumentError, "Missing the required parameter 'repository_href' when calling RepositoriesApi.repositories_versions_create"
|
434
|
+
end
|
435
|
+
# verify the required parameter 'data' is set
|
436
|
+
if @api_client.config.client_side_validation && data.nil?
|
437
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesApi.repositories_versions_create"
|
438
|
+
end
|
439
|
+
# resource path
|
440
|
+
local_var_path = '{repository_href}versions/'.sub('{' + 'repository_href' + '}', repository_href.to_s)
|
441
|
+
|
442
|
+
# query parameters
|
443
|
+
query_params = opts[:query_params] || {}
|
444
|
+
|
445
|
+
# header parameters
|
446
|
+
header_params = opts[:header_params] || {}
|
447
|
+
# HTTP header 'Accept' (if needed)
|
448
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
449
|
+
# HTTP header 'Content-Type'
|
450
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
451
|
+
|
452
|
+
# form parameters
|
453
|
+
form_params = opts[:form_params] || {}
|
454
|
+
|
455
|
+
# http body (model)
|
456
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
457
|
+
|
458
|
+
# return_type
|
459
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
460
|
+
|
461
|
+
# auth_names
|
462
|
+
auth_names = opts[:auth_names] || ['Basic']
|
463
|
+
|
464
|
+
new_options = opts.merge(
|
465
|
+
:header_params => header_params,
|
466
|
+
:query_params => query_params,
|
467
|
+
:form_params => form_params,
|
468
|
+
:body => post_body,
|
469
|
+
:auth_names => auth_names,
|
470
|
+
:return_type => return_type
|
471
|
+
)
|
472
|
+
|
473
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
474
|
+
if @api_client.config.debugging
|
475
|
+
@api_client.config.logger.debug "API called: RepositoriesApi#repositories_versions_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
476
|
+
end
|
477
|
+
return data, status_code, headers
|
478
|
+
end
|
479
|
+
|
480
|
+
# Delete a repository version
|
481
|
+
# Trigger an asynchronous task to delete a repositroy version.
|
482
|
+
# @param repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/1/versions/1/
|
483
|
+
# @param [Hash] opts the optional parameters
|
484
|
+
# @return [AsyncOperationResponse]
|
485
|
+
def repositories_versions_delete(repository_version_href, opts = {})
|
486
|
+
data, _status_code, _headers = repositories_versions_delete_with_http_info(repository_version_href, opts)
|
487
|
+
data
|
488
|
+
end
|
489
|
+
|
490
|
+
# Delete a repository version
|
491
|
+
# Trigger an asynchronous task to delete a repositroy version.
|
492
|
+
# @param repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/1/versions/1/
|
493
|
+
# @param [Hash] opts the optional parameters
|
494
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
495
|
+
def repositories_versions_delete_with_http_info(repository_version_href, opts = {})
|
496
|
+
if @api_client.config.debugging
|
497
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesApi.repositories_versions_delete ...'
|
498
|
+
end
|
499
|
+
# verify the required parameter 'repository_version_href' is set
|
500
|
+
if @api_client.config.client_side_validation && repository_version_href.nil?
|
501
|
+
fail ArgumentError, "Missing the required parameter 'repository_version_href' when calling RepositoriesApi.repositories_versions_delete"
|
502
|
+
end
|
503
|
+
# resource path
|
504
|
+
local_var_path = '{repository_version_href}'.sub('{' + 'repository_version_href' + '}', repository_version_href.to_s)
|
505
|
+
|
506
|
+
# query parameters
|
507
|
+
query_params = opts[:query_params] || {}
|
508
|
+
|
509
|
+
# header parameters
|
510
|
+
header_params = opts[:header_params] || {}
|
511
|
+
# HTTP header 'Accept' (if needed)
|
512
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
513
|
+
|
514
|
+
# form parameters
|
515
|
+
form_params = opts[:form_params] || {}
|
516
|
+
|
517
|
+
# http body (model)
|
518
|
+
post_body = opts[:body]
|
519
|
+
|
520
|
+
# return_type
|
521
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
522
|
+
|
523
|
+
# auth_names
|
524
|
+
auth_names = opts[:auth_names] || ['Basic']
|
525
|
+
|
526
|
+
new_options = opts.merge(
|
527
|
+
:header_params => header_params,
|
528
|
+
:query_params => query_params,
|
529
|
+
:form_params => form_params,
|
530
|
+
:body => post_body,
|
531
|
+
:auth_names => auth_names,
|
532
|
+
:return_type => return_type
|
533
|
+
)
|
534
|
+
|
535
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
536
|
+
if @api_client.config.debugging
|
537
|
+
@api_client.config.logger.debug "API called: RepositoriesApi#repositories_versions_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
538
|
+
end
|
539
|
+
return data, status_code, headers
|
540
|
+
end
|
541
|
+
|
542
|
+
# List repository versions
|
543
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
544
|
+
# @param [Hash] opts the optional parameters
|
545
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
546
|
+
# @option opts [Float] :number
|
547
|
+
# @option opts [Float] :number__lt Filter results where number is less than value
|
548
|
+
# @option opts [Float] :number__lte Filter results where number is less than or equal to value
|
549
|
+
# @option opts [Float] :number__gt Filter results where number is greater than value
|
550
|
+
# @option opts [Float] :number__gte Filter results where number is greater than or equal to value
|
551
|
+
# @option opts [Float] :number__range Filter results where number is between two comma separated values
|
552
|
+
# @option opts [String] :_created__lt Filter results where _created is less than value
|
553
|
+
# @option opts [String] :_created__lte Filter results where _created is less than or equal to value
|
554
|
+
# @option opts [String] :_created__gt Filter results where _created is greater than value
|
555
|
+
# @option opts [String] :_created__gte Filter results where _created is greater than or equal to value
|
556
|
+
# @option opts [String] :_created__range Filter results where _created is between two comma separated values
|
557
|
+
# @option opts [String] :content Content Unit referenced by HREF
|
558
|
+
# @option opts [String] :_created ISO 8601 formatted dates are supported
|
559
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
560
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
561
|
+
# @return [InlineResponse2002]
|
562
|
+
def repositories_versions_list(repository_href, opts = {})
|
563
|
+
data, _status_code, _headers = repositories_versions_list_with_http_info(repository_href, opts)
|
564
|
+
data
|
565
|
+
end
|
566
|
+
|
567
|
+
# List repository versions
|
568
|
+
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
569
|
+
# @param [Hash] opts the optional parameters
|
570
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
571
|
+
# @option opts [Float] :number
|
572
|
+
# @option opts [Float] :number__lt Filter results where number is less than value
|
573
|
+
# @option opts [Float] :number__lte Filter results where number is less than or equal to value
|
574
|
+
# @option opts [Float] :number__gt Filter results where number is greater than value
|
575
|
+
# @option opts [Float] :number__gte Filter results where number is greater than or equal to value
|
576
|
+
# @option opts [Float] :number__range Filter results where number is between two comma separated values
|
577
|
+
# @option opts [String] :_created__lt Filter results where _created is less than value
|
578
|
+
# @option opts [String] :_created__lte Filter results where _created is less than or equal to value
|
579
|
+
# @option opts [String] :_created__gt Filter results where _created is greater than value
|
580
|
+
# @option opts [String] :_created__gte Filter results where _created is greater than or equal to value
|
581
|
+
# @option opts [String] :_created__range Filter results where _created is between two comma separated values
|
582
|
+
# @option opts [String] :content Content Unit referenced by HREF
|
583
|
+
# @option opts [String] :_created ISO 8601 formatted dates are supported
|
584
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
585
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
586
|
+
# @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
|
587
|
+
def repositories_versions_list_with_http_info(repository_href, opts = {})
|
588
|
+
if @api_client.config.debugging
|
589
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesApi.repositories_versions_list ...'
|
590
|
+
end
|
591
|
+
# verify the required parameter 'repository_href' is set
|
592
|
+
if @api_client.config.client_side_validation && repository_href.nil?
|
593
|
+
fail ArgumentError, "Missing the required parameter 'repository_href' when calling RepositoriesApi.repositories_versions_list"
|
594
|
+
end
|
595
|
+
# resource path
|
596
|
+
local_var_path = '{repository_href}versions/'.sub('{' + 'repository_href' + '}', repository_href.to_s)
|
597
|
+
|
598
|
+
# query parameters
|
599
|
+
query_params = opts[:query_params] || {}
|
600
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
601
|
+
query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
|
602
|
+
query_params[:'number__lt'] = opts[:'number__lt'] if !opts[:'number__lt'].nil?
|
603
|
+
query_params[:'number__lte'] = opts[:'number__lte'] if !opts[:'number__lte'].nil?
|
604
|
+
query_params[:'number__gt'] = opts[:'number__gt'] if !opts[:'number__gt'].nil?
|
605
|
+
query_params[:'number__gte'] = opts[:'number__gte'] if !opts[:'number__gte'].nil?
|
606
|
+
query_params[:'number__range'] = opts[:'number__range'] if !opts[:'number__range'].nil?
|
607
|
+
query_params[:'_created__lt'] = opts[:'_created__lt'] if !opts[:'_created__lt'].nil?
|
608
|
+
query_params[:'_created__lte'] = opts[:'_created__lte'] if !opts[:'_created__lte'].nil?
|
609
|
+
query_params[:'_created__gt'] = opts[:'_created__gt'] if !opts[:'_created__gt'].nil?
|
610
|
+
query_params[:'_created__gte'] = opts[:'_created__gte'] if !opts[:'_created__gte'].nil?
|
611
|
+
query_params[:'_created__range'] = opts[:'_created__range'] if !opts[:'_created__range'].nil?
|
612
|
+
query_params[:'content'] = opts[:'content'] if !opts[:'content'].nil?
|
613
|
+
query_params[:'_created'] = opts[:'_created'] if !opts[:'_created'].nil?
|
614
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
615
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
616
|
+
|
617
|
+
# header parameters
|
618
|
+
header_params = opts[:header_params] || {}
|
619
|
+
# HTTP header 'Accept' (if needed)
|
620
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
621
|
+
|
622
|
+
# form parameters
|
623
|
+
form_params = opts[:form_params] || {}
|
624
|
+
|
625
|
+
# http body (model)
|
626
|
+
post_body = opts[:body]
|
627
|
+
|
628
|
+
# return_type
|
629
|
+
return_type = opts[:return_type] || 'InlineResponse2002'
|
630
|
+
|
631
|
+
# auth_names
|
632
|
+
auth_names = opts[:auth_names] || ['Basic']
|
633
|
+
|
634
|
+
new_options = opts.merge(
|
635
|
+
:header_params => header_params,
|
636
|
+
:query_params => query_params,
|
637
|
+
:form_params => form_params,
|
638
|
+
:body => post_body,
|
639
|
+
:auth_names => auth_names,
|
640
|
+
:return_type => return_type
|
641
|
+
)
|
642
|
+
|
643
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
644
|
+
if @api_client.config.debugging
|
645
|
+
@api_client.config.logger.debug "API called: RepositoriesApi#repositories_versions_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
646
|
+
end
|
647
|
+
return data, status_code, headers
|
648
|
+
end
|
649
|
+
|
650
|
+
# Inspect a repository version
|
651
|
+
# @param repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/1/versions/1/
|
652
|
+
# @param [Hash] opts the optional parameters
|
653
|
+
# @return [RepositoryVersion]
|
654
|
+
def repositories_versions_read(repository_version_href, opts = {})
|
655
|
+
data, _status_code, _headers = repositories_versions_read_with_http_info(repository_version_href, opts)
|
656
|
+
data
|
657
|
+
end
|
658
|
+
|
659
|
+
# Inspect a repository version
|
660
|
+
# @param repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/1/versions/1/
|
661
|
+
# @param [Hash] opts the optional parameters
|
662
|
+
# @return [Array<(RepositoryVersion, Integer, Hash)>] RepositoryVersion data, response status code and response headers
|
663
|
+
def repositories_versions_read_with_http_info(repository_version_href, opts = {})
|
664
|
+
if @api_client.config.debugging
|
665
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesApi.repositories_versions_read ...'
|
666
|
+
end
|
667
|
+
# verify the required parameter 'repository_version_href' is set
|
668
|
+
if @api_client.config.client_side_validation && repository_version_href.nil?
|
669
|
+
fail ArgumentError, "Missing the required parameter 'repository_version_href' when calling RepositoriesApi.repositories_versions_read"
|
670
|
+
end
|
671
|
+
# resource path
|
672
|
+
local_var_path = '{repository_version_href}'.sub('{' + 'repository_version_href' + '}', repository_version_href.to_s)
|
673
|
+
|
674
|
+
# query parameters
|
675
|
+
query_params = opts[:query_params] || {}
|
676
|
+
|
677
|
+
# header parameters
|
678
|
+
header_params = opts[:header_params] || {}
|
679
|
+
# HTTP header 'Accept' (if needed)
|
680
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
681
|
+
|
682
|
+
# form parameters
|
683
|
+
form_params = opts[:form_params] || {}
|
684
|
+
|
685
|
+
# http body (model)
|
686
|
+
post_body = opts[:body]
|
687
|
+
|
688
|
+
# return_type
|
689
|
+
return_type = opts[:return_type] || 'RepositoryVersion'
|
690
|
+
|
691
|
+
# auth_names
|
692
|
+
auth_names = opts[:auth_names] || ['Basic']
|
693
|
+
|
694
|
+
new_options = opts.merge(
|
695
|
+
:header_params => header_params,
|
696
|
+
:query_params => query_params,
|
697
|
+
:form_params => form_params,
|
698
|
+
:body => post_body,
|
699
|
+
:auth_names => auth_names,
|
700
|
+
:return_type => return_type
|
701
|
+
)
|
702
|
+
|
703
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
704
|
+
if @api_client.config.debugging
|
705
|
+
@api_client.config.logger.debug "API called: RepositoriesApi#repositories_versions_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
706
|
+
end
|
707
|
+
return data, status_code, headers
|
708
|
+
end
|
709
|
+
end
|
710
|
+
end
|