pulp_rpm_client 3.0.0b4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +134 -0
  5. data/Rakefile +10 -0
  6. data/docs/AsyncOperationResponse.md +17 -0
  7. data/docs/ContentAdvisoriesApi.md +196 -0
  8. data/docs/ContentPackagesApi.md +208 -0
  9. data/docs/DistributionsRpmApi.md +352 -0
  10. data/docs/InlineResponse200.md +23 -0
  11. data/docs/InlineResponse2001.md +23 -0
  12. data/docs/InlineResponse2002.md +23 -0
  13. data/docs/InlineResponse2003.md +23 -0
  14. data/docs/InlineResponse2004.md +23 -0
  15. data/docs/Package.md +95 -0
  16. data/docs/PublicationsRpmApi.md +229 -0
  17. data/docs/RemotesRpmApi.md +412 -0
  18. data/docs/RepositorySyncURL.md +19 -0
  19. data/docs/RpmCopyApi.md +70 -0
  20. data/docs/RpmDistribution.md +29 -0
  21. data/docs/RpmPublication.md +27 -0
  22. data/docs/RpmRemote.md +45 -0
  23. data/docs/RpmUploadApi.md +66 -0
  24. data/docs/UpdateRecord.md +55 -0
  25. data/git_push.sh +55 -0
  26. data/lib/pulp_rpm_client/api/content_advisories_api.rb +243 -0
  27. data/lib/pulp_rpm_client/api/content_packages_api.rb +261 -0
  28. data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +430 -0
  29. data/lib/pulp_rpm_client/api/publications_rpm_api.rb +273 -0
  30. data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +506 -0
  31. data/lib/pulp_rpm_client/api/rpm_copy_api.rb +96 -0
  32. data/lib/pulp_rpm_client/api/rpm_upload_api.rb +90 -0
  33. data/lib/pulp_rpm_client/api_client.rb +387 -0
  34. data/lib/pulp_rpm_client/api_error.rb +57 -0
  35. data/lib/pulp_rpm_client/configuration.rb +251 -0
  36. data/lib/pulp_rpm_client/models/async_operation_response.rb +202 -0
  37. data/lib/pulp_rpm_client/models/inline_response200.rb +235 -0
  38. data/lib/pulp_rpm_client/models/inline_response2001.rb +235 -0
  39. data/lib/pulp_rpm_client/models/inline_response2002.rb +235 -0
  40. data/lib/pulp_rpm_client/models/inline_response2003.rb +235 -0
  41. data/lib/pulp_rpm_client/models/inline_response2004.rb +235 -0
  42. data/lib/pulp_rpm_client/models/package.rb +983 -0
  43. data/lib/pulp_rpm_client/models/repository_sync_url.rb +214 -0
  44. data/lib/pulp_rpm_client/models/rpm_distribution.rb +337 -0
  45. data/lib/pulp_rpm_client/models/rpm_publication.rb +258 -0
  46. data/lib/pulp_rpm_client/models/rpm_remote.rb +539 -0
  47. data/lib/pulp_rpm_client/models/update_record.rb +764 -0
  48. data/lib/pulp_rpm_client/version.rb +15 -0
  49. data/lib/pulp_rpm_client.rb +58 -0
  50. data/pulp_rpm_client.gemspec +45 -0
  51. data/spec/api/content_advisories_api_spec.rb +83 -0
  52. data/spec/api/content_packages_api_spec.rb +89 -0
  53. data/spec/api/distributions_rpm_api_spec.rb +116 -0
  54. data/spec/api/publications_rpm_api_spec.rb +85 -0
  55. data/spec/api/remotes_rpm_api_spec.rb +131 -0
  56. data/spec/api/rpm_copy_api_spec.rb +50 -0
  57. data/spec/api/rpm_upload_api_spec.rb +48 -0
  58. data/spec/api_client_spec.rb +226 -0
  59. data/spec/configuration_spec.rb +42 -0
  60. data/spec/models/async_operation_response_spec.rb +41 -0
  61. data/spec/models/inline_response2001_spec.rb +59 -0
  62. data/spec/models/inline_response2002_spec.rb +59 -0
  63. data/spec/models/inline_response2003_spec.rb +59 -0
  64. data/spec/models/inline_response2004_spec.rb +59 -0
  65. data/spec/models/inline_response200_spec.rb +59 -0
  66. data/spec/models/package_spec.rb +275 -0
  67. data/spec/models/repository_sync_url_spec.rb +47 -0
  68. data/spec/models/rpm_distribution_spec.rb +77 -0
  69. data/spec/models/rpm_publication_spec.rb +71 -0
  70. data/spec/models/rpm_remote_spec.rb +129 -0
  71. data/spec/models/update_record_spec.rb +155 -0
  72. data/spec/spec_helper.rb +111 -0
  73. metadata +317 -0
@@ -0,0 +1,506 @@
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.0
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module PulpRpmClient
16
+ class RemotesRpmApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a rpm remote
23
+ # A ViewSet for RpmRemote.
24
+ # @param data [RpmRemote]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [RpmRemote]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a rpm remote
33
+ # A ViewSet for RpmRemote.
34
+ # @param data [RpmRemote]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(RpmRemote, Integer, Hash)>] RpmRemote data, response status code and response headers
37
+ def create_with_http_info(data, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RemotesRpmApi.create ...'
40
+ end
41
+ # verify the required parameter 'data' is set
42
+ if @api_client.config.client_side_validation && data.nil?
43
+ fail ArgumentError, "Missing the required parameter 'data' when calling RemotesRpmApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/remotes/rpm/rpm/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'RpmRemote'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['Basic']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: RemotesRpmApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a rpm remote
87
+ # Trigger an asynchronous delete task
88
+ # @param rpm_remote_href [String] URI of Rpm Remote. e.g.: /pulp/api/v3/remotes/rpm/rpm/1/
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(rpm_remote_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(rpm_remote_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a rpm remote
97
+ # Trigger an asynchronous delete task
98
+ # @param rpm_remote_href [String] URI of Rpm Remote. e.g.: /pulp/api/v3/remotes/rpm/rpm/1/
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
101
+ def delete_with_http_info(rpm_remote_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RemotesRpmApi.delete ...'
104
+ end
105
+ # verify the required parameter 'rpm_remote_href' is set
106
+ if @api_client.config.client_side_validation && rpm_remote_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'rpm_remote_href' when calling RemotesRpmApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{rpm_remote_href}'.sub('{' + 'rpm_remote_href' + '}', rpm_remote_href.to_s)
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:body]
125
+
126
+ # return_type
127
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
128
+
129
+ # auth_names
130
+ auth_names = opts[:auth_names] || ['Basic']
131
+
132
+ new_options = opts.merge(
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: RemotesRpmApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List rpm remotes
149
+ # A ViewSet for RpmRemote.
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [String] :name
152
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
153
+ # @option opts [String] :_last_updated__lt Filter results where _last_updated is less than value
154
+ # @option opts [String] :_last_updated__lte Filter results where _last_updated is less than or equal to value
155
+ # @option opts [String] :_last_updated__gt Filter results where _last_updated is greater than value
156
+ # @option opts [String] :_last_updated__gte Filter results where _last_updated is greater than or equal to value
157
+ # @option opts [String] :_last_updated__range Filter results where _last_updated is between two comma separated values
158
+ # @option opts [String] :_last_updated ISO 8601 formatted dates are supported
159
+ # @option opts [Integer] :page A page number within the paginated result set.
160
+ # @option opts [Integer] :page_size Number of results to return per page.
161
+ # @return [InlineResponse2004]
162
+ def list(opts = {})
163
+ data, _status_code, _headers = list_with_http_info(opts)
164
+ data
165
+ end
166
+
167
+ # List rpm remotes
168
+ # A ViewSet for RpmRemote.
169
+ # @param [Hash] opts the optional parameters
170
+ # @option opts [String] :name
171
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
172
+ # @option opts [String] :_last_updated__lt Filter results where _last_updated is less than value
173
+ # @option opts [String] :_last_updated__lte Filter results where _last_updated is less than or equal to value
174
+ # @option opts [String] :_last_updated__gt Filter results where _last_updated is greater than value
175
+ # @option opts [String] :_last_updated__gte Filter results where _last_updated is greater than or equal to value
176
+ # @option opts [String] :_last_updated__range Filter results where _last_updated is between two comma separated values
177
+ # @option opts [String] :_last_updated ISO 8601 formatted dates are supported
178
+ # @option opts [Integer] :page A page number within the paginated result set.
179
+ # @option opts [Integer] :page_size Number of results to return per page.
180
+ # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
181
+ def list_with_http_info(opts = {})
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug 'Calling API: RemotesRpmApi.list ...'
184
+ end
185
+ # resource path
186
+ local_var_path = '/pulp/api/v3/remotes/rpm/rpm/'
187
+
188
+ # query parameters
189
+ query_params = opts[:query_params] || {}
190
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
191
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
192
+ query_params[:'_last_updated__lt'] = opts[:'_last_updated__lt'] if !opts[:'_last_updated__lt'].nil?
193
+ query_params[:'_last_updated__lte'] = opts[:'_last_updated__lte'] if !opts[:'_last_updated__lte'].nil?
194
+ query_params[:'_last_updated__gt'] = opts[:'_last_updated__gt'] if !opts[:'_last_updated__gt'].nil?
195
+ query_params[:'_last_updated__gte'] = opts[:'_last_updated__gte'] if !opts[:'_last_updated__gte'].nil?
196
+ query_params[:'_last_updated__range'] = opts[:'_last_updated__range'] if !opts[:'_last_updated__range'].nil?
197
+ query_params[:'_last_updated'] = opts[:'_last_updated'] if !opts[:'_last_updated'].nil?
198
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
199
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
200
+
201
+ # header parameters
202
+ header_params = opts[:header_params] || {}
203
+ # HTTP header 'Accept' (if needed)
204
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
205
+
206
+ # form parameters
207
+ form_params = opts[:form_params] || {}
208
+
209
+ # http body (model)
210
+ post_body = opts[:body]
211
+
212
+ # return_type
213
+ return_type = opts[:return_type] || 'InlineResponse2004'
214
+
215
+ # auth_names
216
+ auth_names = opts[:auth_names] || ['Basic']
217
+
218
+ new_options = opts.merge(
219
+ :header_params => header_params,
220
+ :query_params => query_params,
221
+ :form_params => form_params,
222
+ :body => post_body,
223
+ :auth_names => auth_names,
224
+ :return_type => return_type
225
+ )
226
+
227
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug "API called: RemotesRpmApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
230
+ end
231
+ return data, status_code, headers
232
+ end
233
+
234
+ # Partially update a rpm remote
235
+ # Trigger an asynchronous partial update task
236
+ # @param rpm_remote_href [String] URI of Rpm Remote. e.g.: /pulp/api/v3/remotes/rpm/rpm/1/
237
+ # @param data [RpmRemote]
238
+ # @param [Hash] opts the optional parameters
239
+ # @return [AsyncOperationResponse]
240
+ def partial_update(rpm_remote_href, data, opts = {})
241
+ data, _status_code, _headers = partial_update_with_http_info(rpm_remote_href, data, opts)
242
+ data
243
+ end
244
+
245
+ # Partially update a rpm remote
246
+ # Trigger an asynchronous partial update task
247
+ # @param rpm_remote_href [String] URI of Rpm Remote. e.g.: /pulp/api/v3/remotes/rpm/rpm/1/
248
+ # @param data [RpmRemote]
249
+ # @param [Hash] opts the optional parameters
250
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
251
+ def partial_update_with_http_info(rpm_remote_href, data, opts = {})
252
+ if @api_client.config.debugging
253
+ @api_client.config.logger.debug 'Calling API: RemotesRpmApi.partial_update ...'
254
+ end
255
+ # verify the required parameter 'rpm_remote_href' is set
256
+ if @api_client.config.client_side_validation && rpm_remote_href.nil?
257
+ fail ArgumentError, "Missing the required parameter 'rpm_remote_href' when calling RemotesRpmApi.partial_update"
258
+ end
259
+ # verify the required parameter 'data' is set
260
+ if @api_client.config.client_side_validation && data.nil?
261
+ fail ArgumentError, "Missing the required parameter 'data' when calling RemotesRpmApi.partial_update"
262
+ end
263
+ # resource path
264
+ local_var_path = '{rpm_remote_href}'.sub('{' + 'rpm_remote_href' + '}', rpm_remote_href.to_s)
265
+
266
+ # query parameters
267
+ query_params = opts[:query_params] || {}
268
+
269
+ # header parameters
270
+ header_params = opts[:header_params] || {}
271
+ # HTTP header 'Accept' (if needed)
272
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
273
+ # HTTP header 'Content-Type'
274
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
275
+
276
+ # form parameters
277
+ form_params = opts[:form_params] || {}
278
+
279
+ # http body (model)
280
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
281
+
282
+ # return_type
283
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
284
+
285
+ # auth_names
286
+ auth_names = opts[:auth_names] || ['Basic']
287
+
288
+ new_options = opts.merge(
289
+ :header_params => header_params,
290
+ :query_params => query_params,
291
+ :form_params => form_params,
292
+ :body => post_body,
293
+ :auth_names => auth_names,
294
+ :return_type => return_type
295
+ )
296
+
297
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
298
+ if @api_client.config.debugging
299
+ @api_client.config.logger.debug "API called: RemotesRpmApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
300
+ end
301
+ return data, status_code, headers
302
+ end
303
+
304
+ # Inspect a rpm remote
305
+ # A ViewSet for RpmRemote.
306
+ # @param rpm_remote_href [String] URI of Rpm Remote. e.g.: /pulp/api/v3/remotes/rpm/rpm/1/
307
+ # @param [Hash] opts the optional parameters
308
+ # @return [RpmRemote]
309
+ def read(rpm_remote_href, opts = {})
310
+ data, _status_code, _headers = read_with_http_info(rpm_remote_href, opts)
311
+ data
312
+ end
313
+
314
+ # Inspect a rpm remote
315
+ # A ViewSet for RpmRemote.
316
+ # @param rpm_remote_href [String] URI of Rpm Remote. e.g.: /pulp/api/v3/remotes/rpm/rpm/1/
317
+ # @param [Hash] opts the optional parameters
318
+ # @return [Array<(RpmRemote, Integer, Hash)>] RpmRemote data, response status code and response headers
319
+ def read_with_http_info(rpm_remote_href, opts = {})
320
+ if @api_client.config.debugging
321
+ @api_client.config.logger.debug 'Calling API: RemotesRpmApi.read ...'
322
+ end
323
+ # verify the required parameter 'rpm_remote_href' is set
324
+ if @api_client.config.client_side_validation && rpm_remote_href.nil?
325
+ fail ArgumentError, "Missing the required parameter 'rpm_remote_href' when calling RemotesRpmApi.read"
326
+ end
327
+ # resource path
328
+ local_var_path = '{rpm_remote_href}'.sub('{' + 'rpm_remote_href' + '}', rpm_remote_href.to_s)
329
+
330
+ # query parameters
331
+ query_params = opts[:query_params] || {}
332
+
333
+ # header parameters
334
+ header_params = opts[:header_params] || {}
335
+ # HTTP header 'Accept' (if needed)
336
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
337
+
338
+ # form parameters
339
+ form_params = opts[:form_params] || {}
340
+
341
+ # http body (model)
342
+ post_body = opts[:body]
343
+
344
+ # return_type
345
+ return_type = opts[:return_type] || 'RpmRemote'
346
+
347
+ # auth_names
348
+ auth_names = opts[:auth_names] || ['Basic']
349
+
350
+ new_options = opts.merge(
351
+ :header_params => header_params,
352
+ :query_params => query_params,
353
+ :form_params => form_params,
354
+ :body => post_body,
355
+ :auth_names => auth_names,
356
+ :return_type => return_type
357
+ )
358
+
359
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
360
+ if @api_client.config.debugging
361
+ @api_client.config.logger.debug "API called: RemotesRpmApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
362
+ end
363
+ return data, status_code, headers
364
+ end
365
+
366
+ # Sync from remote
367
+ # Trigger an asynchronous task to sync RPM content.
368
+ # @param rpm_remote_href [String] URI of Rpm Remote. e.g.: /pulp/api/v3/remotes/rpm/rpm/1/
369
+ # @param data [RepositorySyncURL]
370
+ # @param [Hash] opts the optional parameters
371
+ # @return [AsyncOperationResponse]
372
+ def sync(rpm_remote_href, data, opts = {})
373
+ data, _status_code, _headers = sync_with_http_info(rpm_remote_href, data, opts)
374
+ data
375
+ end
376
+
377
+ # Sync from remote
378
+ # Trigger an asynchronous task to sync RPM content.
379
+ # @param rpm_remote_href [String] URI of Rpm Remote. e.g.: /pulp/api/v3/remotes/rpm/rpm/1/
380
+ # @param data [RepositorySyncURL]
381
+ # @param [Hash] opts the optional parameters
382
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
383
+ def sync_with_http_info(rpm_remote_href, data, opts = {})
384
+ if @api_client.config.debugging
385
+ @api_client.config.logger.debug 'Calling API: RemotesRpmApi.sync ...'
386
+ end
387
+ # verify the required parameter 'rpm_remote_href' is set
388
+ if @api_client.config.client_side_validation && rpm_remote_href.nil?
389
+ fail ArgumentError, "Missing the required parameter 'rpm_remote_href' when calling RemotesRpmApi.sync"
390
+ end
391
+ # verify the required parameter 'data' is set
392
+ if @api_client.config.client_side_validation && data.nil?
393
+ fail ArgumentError, "Missing the required parameter 'data' when calling RemotesRpmApi.sync"
394
+ end
395
+ # resource path
396
+ local_var_path = '{rpm_remote_href}sync/'.sub('{' + 'rpm_remote_href' + '}', rpm_remote_href.to_s)
397
+
398
+ # query parameters
399
+ query_params = opts[:query_params] || {}
400
+
401
+ # header parameters
402
+ header_params = opts[:header_params] || {}
403
+ # HTTP header 'Accept' (if needed)
404
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
405
+ # HTTP header 'Content-Type'
406
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
407
+
408
+ # form parameters
409
+ form_params = opts[:form_params] || {}
410
+
411
+ # http body (model)
412
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
413
+
414
+ # return_type
415
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
416
+
417
+ # auth_names
418
+ auth_names = opts[:auth_names] || ['Basic']
419
+
420
+ new_options = opts.merge(
421
+ :header_params => header_params,
422
+ :query_params => query_params,
423
+ :form_params => form_params,
424
+ :body => post_body,
425
+ :auth_names => auth_names,
426
+ :return_type => return_type
427
+ )
428
+
429
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
430
+ if @api_client.config.debugging
431
+ @api_client.config.logger.debug "API called: RemotesRpmApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
432
+ end
433
+ return data, status_code, headers
434
+ end
435
+
436
+ # Update a rpm remote
437
+ # Trigger an asynchronous update task
438
+ # @param rpm_remote_href [String] URI of Rpm Remote. e.g.: /pulp/api/v3/remotes/rpm/rpm/1/
439
+ # @param data [RpmRemote]
440
+ # @param [Hash] opts the optional parameters
441
+ # @return [AsyncOperationResponse]
442
+ def update(rpm_remote_href, data, opts = {})
443
+ data, _status_code, _headers = update_with_http_info(rpm_remote_href, data, opts)
444
+ data
445
+ end
446
+
447
+ # Update a rpm remote
448
+ # Trigger an asynchronous update task
449
+ # @param rpm_remote_href [String] URI of Rpm Remote. e.g.: /pulp/api/v3/remotes/rpm/rpm/1/
450
+ # @param data [RpmRemote]
451
+ # @param [Hash] opts the optional parameters
452
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
453
+ def update_with_http_info(rpm_remote_href, data, opts = {})
454
+ if @api_client.config.debugging
455
+ @api_client.config.logger.debug 'Calling API: RemotesRpmApi.update ...'
456
+ end
457
+ # verify the required parameter 'rpm_remote_href' is set
458
+ if @api_client.config.client_side_validation && rpm_remote_href.nil?
459
+ fail ArgumentError, "Missing the required parameter 'rpm_remote_href' when calling RemotesRpmApi.update"
460
+ end
461
+ # verify the required parameter 'data' is set
462
+ if @api_client.config.client_side_validation && data.nil?
463
+ fail ArgumentError, "Missing the required parameter 'data' when calling RemotesRpmApi.update"
464
+ end
465
+ # resource path
466
+ local_var_path = '{rpm_remote_href}'.sub('{' + 'rpm_remote_href' + '}', rpm_remote_href.to_s)
467
+
468
+ # query parameters
469
+ query_params = opts[:query_params] || {}
470
+
471
+ # header parameters
472
+ header_params = opts[:header_params] || {}
473
+ # HTTP header 'Accept' (if needed)
474
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
475
+ # HTTP header 'Content-Type'
476
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
477
+
478
+ # form parameters
479
+ form_params = opts[:form_params] || {}
480
+
481
+ # http body (model)
482
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
483
+
484
+ # return_type
485
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
486
+
487
+ # auth_names
488
+ auth_names = opts[:auth_names] || ['Basic']
489
+
490
+ new_options = opts.merge(
491
+ :header_params => header_params,
492
+ :query_params => query_params,
493
+ :form_params => form_params,
494
+ :body => post_body,
495
+ :auth_names => auth_names,
496
+ :return_type => return_type
497
+ )
498
+
499
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug "API called: RemotesRpmApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
502
+ end
503
+ return data, status_code, headers
504
+ end
505
+ end
506
+ end
@@ -0,0 +1,96 @@
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.0
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module PulpRpmClient
16
+ class RpmCopyApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Copy content
23
+ # Trigger an asynchronous task to copy RPM contentfrom one repository into another, creating a newrepository version.
24
+ # @param dest_repo [String] A URI of the repository.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :source_repo A URI of the repository.
27
+ # @option opts [String] :source_repo_version A URI of the repository version
28
+ # @option opts [Array<String>] :types A list of types to copy [\&quot;package\&quot;, \&quot;advisory\&quot;]
29
+ # @return [AsyncOperationResponse]
30
+ def copy_content(dest_repo, opts = {})
31
+ data, _status_code, _headers = copy_content_with_http_info(dest_repo, opts)
32
+ data
33
+ end
34
+
35
+ # Copy content
36
+ # Trigger an asynchronous task to copy RPM contentfrom one repository into another, creating a newrepository version.
37
+ # @param dest_repo [String] A URI of the repository.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :source_repo A URI of the repository.
40
+ # @option opts [String] :source_repo_version A URI of the repository version
41
+ # @option opts [Array<String>] :types A list of types to copy [\&quot;package\&quot;, \&quot;advisory\&quot;]
42
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
43
+ def copy_content_with_http_info(dest_repo, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: RpmCopyApi.copy_content ...'
46
+ end
47
+ # verify the required parameter 'dest_repo' is set
48
+ if @api_client.config.client_side_validation && dest_repo.nil?
49
+ fail ArgumentError, "Missing the required parameter 'dest_repo' when calling RpmCopyApi.copy_content"
50
+ end
51
+ # resource path
52
+ local_var_path = '/rpm/copy/'
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(['multipart/form-data', 'application/x-www-form-urlencoded'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+ form_params['dest_repo'] = dest_repo
67
+ form_params['source_repo'] = opts[:'source_repo'] if !opts[:'source_repo'].nil?
68
+ form_params['source_repo_version'] = opts[:'source_repo_version'] if !opts[:'source_repo_version'].nil?
69
+ form_params['types'] = @api_client.build_collection_param(opts[:'types'], :csv) if !opts[:'types'].nil?
70
+
71
+ # http body (model)
72
+ post_body = opts[:body]
73
+
74
+ # return_type
75
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
76
+
77
+ # auth_names
78
+ auth_names = opts[:auth_names] || ['Basic']
79
+
80
+ new_options = opts.merge(
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: RpmCopyApi#copy_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,90 @@
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.0
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module PulpRpmClient
16
+ class RpmUploadApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Upload a package
23
+ # Create an artifact and trigger an asynchronoustask to create RPM content from it, optionallycreate new repository version.
24
+ # @param file [File] The rpm file.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :repository A URI of the repository.
27
+ # @return [AsyncOperationResponse]
28
+ def upload_rpm_package(file, opts = {})
29
+ data, _status_code, _headers = upload_rpm_package_with_http_info(file, opts)
30
+ data
31
+ end
32
+
33
+ # Upload a package
34
+ # Create an artifact and trigger an asynchronoustask to create RPM content from it, optionallycreate new repository version.
35
+ # @param file [File] The rpm file.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :repository A URI of the repository.
38
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
39
+ def upload_rpm_package_with_http_info(file, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: RpmUploadApi.upload_rpm_package ...'
42
+ end
43
+ # verify the required parameter 'file' is set
44
+ if @api_client.config.client_side_validation && file.nil?
45
+ fail ArgumentError, "Missing the required parameter 'file' when calling RpmUploadApi.upload_rpm_package"
46
+ end
47
+ # resource path
48
+ local_var_path = '/rpm/upload/'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+ # HTTP header 'Content-Type'
58
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+ form_params['file'] = file
63
+ form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
64
+
65
+ # http body (model)
66
+ post_body = opts[:body]
67
+
68
+ # return_type
69
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
70
+
71
+ # auth_names
72
+ auth_names = opts[:auth_names] || ['Basic']
73
+
74
+ new_options = opts.merge(
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: RpmUploadApi#upload_rpm_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+ end
90
+ end