pulpcore_client 3.2.1 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -4
  3. data/docs/ArtifactsApi.md +2 -0
  4. data/docs/ExportersCoreExportsApi.md +243 -0
  5. data/docs/ExportersPulpApi.md +355 -0
  6. data/docs/Import.md +23 -0
  7. data/docs/ImportersCoreImportsApi.md +243 -0
  8. data/docs/ImportersPulpApi.md +355 -0
  9. data/docs/InlineResponse2001.md +1 -1
  10. data/docs/InlineResponse2002.md +1 -1
  11. data/docs/InlineResponse2003.md +1 -1
  12. data/docs/InlineResponse2004.md +1 -1
  13. data/docs/InlineResponse2005.md +23 -0
  14. data/docs/InlineResponse2006.md +23 -0
  15. data/docs/InlineResponse2007.md +23 -0
  16. data/docs/InlineResponse2008.md +23 -0
  17. data/docs/InlineResponse2009.md +23 -0
  18. data/docs/PulpExport.md +29 -0
  19. data/docs/PulpExporter.md +27 -0
  20. data/docs/PulpImport.md +17 -0
  21. data/docs/PulpImporter.md +23 -0
  22. data/docs/SigningServicesApi.md +6 -2
  23. data/docs/Task.md +6 -0
  24. data/docs/TaskGroup.md +29 -0
  25. data/docs/TaskGroupsApi.md +128 -0
  26. data/docs/TasksApi.md +10 -6
  27. data/docs/UploadsApi.md +4 -2
  28. data/docs/WorkersApi.md +4 -2
  29. data/lib/pulpcore_client/api/artifacts_api.rb +3 -0
  30. data/lib/pulpcore_client/api/exporters_core_exports_api.rb +297 -0
  31. data/lib/pulpcore_client/api/exporters_pulp_api.rb +431 -0
  32. data/lib/pulpcore_client/api/importers_core_imports_api.rb +297 -0
  33. data/lib/pulpcore_client/api/importers_pulp_api.rb +431 -0
  34. data/lib/pulpcore_client/api/signing_services_api.rb +9 -3
  35. data/lib/pulpcore_client/api/task_groups_api.rb +157 -0
  36. data/lib/pulpcore_client/api/tasks_api.rb +15 -9
  37. data/lib/pulpcore_client/api/uploads_api.rb +6 -3
  38. data/lib/pulpcore_client/api/workers_api.rb +6 -3
  39. data/lib/pulpcore_client/models/import.rb +246 -0
  40. data/lib/pulpcore_client/models/inline_response2001.rb +1 -1
  41. data/lib/pulpcore_client/models/inline_response2002.rb +1 -1
  42. data/lib/pulpcore_client/models/inline_response2003.rb +1 -1
  43. data/lib/pulpcore_client/models/inline_response2004.rb +1 -1
  44. data/lib/pulpcore_client/models/inline_response2005.rb +247 -0
  45. data/lib/pulpcore_client/models/inline_response2006.rb +247 -0
  46. data/lib/pulpcore_client/models/inline_response2007.rb +247 -0
  47. data/lib/pulpcore_client/models/inline_response2008.rb +247 -0
  48. data/lib/pulpcore_client/models/inline_response2009.rb +247 -0
  49. data/lib/pulpcore_client/models/pulp_export.rb +310 -0
  50. data/lib/pulpcore_client/models/pulp_exporter.rb +310 -0
  51. data/lib/pulpcore_client/models/pulp_import.rb +231 -0
  52. data/lib/pulpcore_client/models/pulp_importer.rb +262 -0
  53. data/lib/pulpcore_client/models/task.rb +33 -1
  54. data/lib/pulpcore_client/models/task_group.rb +291 -0
  55. data/lib/pulpcore_client/version.rb +1 -1
  56. data/lib/pulpcore_client.rb +16 -0
  57. data/spec/api/artifacts_api_spec.rb +1 -0
  58. data/spec/api/exporters_core_exports_api_spec.rb +91 -0
  59. data/spec/api/exporters_pulp_api_spec.rb +117 -0
  60. data/spec/api/importers_core_imports_api_spec.rb +91 -0
  61. data/spec/api/importers_pulp_api_spec.rb +117 -0
  62. data/spec/api/signing_services_api_spec.rb +3 -1
  63. data/spec/api/task_groups_api_spec.rb +63 -0
  64. data/spec/api/tasks_api_spec.rb +5 -3
  65. data/spec/api/uploads_api_spec.rb +2 -1
  66. data/spec/api/workers_api_spec.rb +2 -1
  67. data/spec/models/import_spec.rb +59 -0
  68. data/spec/models/inline_response2005_spec.rb +59 -0
  69. data/spec/models/inline_response2006_spec.rb +59 -0
  70. data/spec/models/inline_response2007_spec.rb +59 -0
  71. data/spec/models/inline_response2008_spec.rb +59 -0
  72. data/spec/models/inline_response2009_spec.rb +59 -0
  73. data/spec/models/pulp_export_spec.rb +77 -0
  74. data/spec/models/pulp_exporter_spec.rb +71 -0
  75. data/spec/models/pulp_import_spec.rb +41 -0
  76. data/spec/models/pulp_importer_spec.rb +59 -0
  77. data/spec/models/task_group_spec.rb +77 -0
  78. data/spec/models/task_spec.rb +18 -0
  79. metadata +66 -2
@@ -0,0 +1,297 @@
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.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpcoreClient
16
+ class ImportersCoreImportsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a pulp import
23
+ # Trigger an asynchronous task to import a Pulp export.
24
+ # @param importer_pk [String]
25
+ # @param data [PulpImport]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [AsyncOperationResponse]
28
+ def create(importer_pk, data, opts = {})
29
+ data, _status_code, _headers = create_with_http_info(importer_pk, data, opts)
30
+ data
31
+ end
32
+
33
+ # Create a pulp import
34
+ # Trigger an asynchronous task to import a Pulp export.
35
+ # @param importer_pk [String]
36
+ # @param data [PulpImport]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
39
+ def create_with_http_info(importer_pk, data, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: ImportersCoreImportsApi.create ...'
42
+ end
43
+ # verify the required parameter 'importer_pk' is set
44
+ if @api_client.config.client_side_validation && importer_pk.nil?
45
+ fail ArgumentError, "Missing the required parameter 'importer_pk' when calling ImportersCoreImportsApi.create"
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 ImportersCoreImportsApi.create"
50
+ end
51
+ # resource path
52
+ local_var_path = '/pulp/api/v3/importers/core/pulp/{importer_pk}/imports/'.sub('{' + 'importer_pk' + '}', CGI.escape(importer_pk.to_s).gsub('%2F', '/'))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+ # HTTP header 'Content-Type'
62
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
69
+
70
+ # return_type
71
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
72
+
73
+ # auth_names
74
+ auth_names = opts[:auth_names] || ['Basic']
75
+
76
+ new_options = opts.merge(
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: ImportersCoreImportsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # Delete a pulp import
93
+ # ViewSet for PulpImports.
94
+ # @param pulp_import_href [String] URI of Pulp Import. e.g.: /pulp/api/v3/importers/core/pulp/1/imports/1/
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [nil]
97
+ def delete(pulp_import_href, opts = {})
98
+ delete_with_http_info(pulp_import_href, opts)
99
+ nil
100
+ end
101
+
102
+ # Delete a pulp import
103
+ # ViewSet for PulpImports.
104
+ # @param pulp_import_href [String] URI of Pulp Import. e.g.: /pulp/api/v3/importers/core/pulp/1/imports/1/
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
107
+ def delete_with_http_info(pulp_import_href, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: ImportersCoreImportsApi.delete ...'
110
+ end
111
+ # verify the required parameter 'pulp_import_href' is set
112
+ if @api_client.config.client_side_validation && pulp_import_href.nil?
113
+ fail ArgumentError, "Missing the required parameter 'pulp_import_href' when calling ImportersCoreImportsApi.delete"
114
+ end
115
+ # resource path
116
+ local_var_path = '{pulp_import_href}'.sub('{' + 'pulp_import_href' + '}', CGI.escape(pulp_import_href.to_s).gsub('%2F', '/'))
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:body]
129
+
130
+ # return_type
131
+ return_type = opts[:return_type]
132
+
133
+ # auth_names
134
+ auth_names = opts[:auth_names] || ['Basic']
135
+
136
+ new_options = opts.merge(
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => return_type
143
+ )
144
+
145
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug "API called: ImportersCoreImportsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+
152
+ # List pulp imports
153
+ # ViewSet for PulpImports.
154
+ # @param importer_pk [String]
155
+ # @param [Hash] opts the optional parameters
156
+ # @option opts [String] :ordering Which field to use when ordering the results.
157
+ # @option opts [Integer] :limit Number of results to return per page.
158
+ # @option opts [Integer] :offset The initial index from which to return the results.
159
+ # @option opts [String] :fields A list of fields to include in the response.
160
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
161
+ # @return [InlineResponse2004]
162
+ def list(importer_pk, opts = {})
163
+ data, _status_code, _headers = list_with_http_info(importer_pk, opts)
164
+ data
165
+ end
166
+
167
+ # List pulp imports
168
+ # ViewSet for PulpImports.
169
+ # @param importer_pk [String]
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [String] :ordering Which field to use when ordering the results.
172
+ # @option opts [Integer] :limit Number of results to return per page.
173
+ # @option opts [Integer] :offset The initial index from which to return the results.
174
+ # @option opts [String] :fields A list of fields to include in the response.
175
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
176
+ # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
177
+ def list_with_http_info(importer_pk, opts = {})
178
+ if @api_client.config.debugging
179
+ @api_client.config.logger.debug 'Calling API: ImportersCoreImportsApi.list ...'
180
+ end
181
+ # verify the required parameter 'importer_pk' is set
182
+ if @api_client.config.client_side_validation && importer_pk.nil?
183
+ fail ArgumentError, "Missing the required parameter 'importer_pk' when calling ImportersCoreImportsApi.list"
184
+ end
185
+ # resource path
186
+ local_var_path = '/pulp/api/v3/importers/core/pulp/{importer_pk}/imports/'.sub('{' + 'importer_pk' + '}', CGI.escape(importer_pk.to_s).gsub('%2F', '/'))
187
+
188
+ # query parameters
189
+ query_params = opts[:query_params] || {}
190
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
191
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
192
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
193
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
194
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
195
+
196
+ # header parameters
197
+ header_params = opts[:header_params] || {}
198
+ # HTTP header 'Accept' (if needed)
199
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
200
+
201
+ # form parameters
202
+ form_params = opts[:form_params] || {}
203
+
204
+ # http body (model)
205
+ post_body = opts[:body]
206
+
207
+ # return_type
208
+ return_type = opts[:return_type] || 'InlineResponse2004'
209
+
210
+ # auth_names
211
+ auth_names = opts[:auth_names] || ['Basic']
212
+
213
+ new_options = opts.merge(
214
+ :header_params => header_params,
215
+ :query_params => query_params,
216
+ :form_params => form_params,
217
+ :body => post_body,
218
+ :auth_names => auth_names,
219
+ :return_type => return_type
220
+ )
221
+
222
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug "API called: ImportersCoreImportsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
+ end
226
+ return data, status_code, headers
227
+ end
228
+
229
+ # Inspect a pulp import
230
+ # ViewSet for PulpImports.
231
+ # @param pulp_import_href [String] URI of Pulp Import. e.g.: /pulp/api/v3/importers/core/pulp/1/imports/1/
232
+ # @param [Hash] opts the optional parameters
233
+ # @option opts [String] :fields A list of fields to include in the response.
234
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
235
+ # @return [Import]
236
+ def read(pulp_import_href, opts = {})
237
+ data, _status_code, _headers = read_with_http_info(pulp_import_href, opts)
238
+ data
239
+ end
240
+
241
+ # Inspect a pulp import
242
+ # ViewSet for PulpImports.
243
+ # @param pulp_import_href [String] URI of Pulp Import. e.g.: /pulp/api/v3/importers/core/pulp/1/imports/1/
244
+ # @param [Hash] opts the optional parameters
245
+ # @option opts [String] :fields A list of fields to include in the response.
246
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
247
+ # @return [Array<(Import, Integer, Hash)>] Import data, response status code and response headers
248
+ def read_with_http_info(pulp_import_href, opts = {})
249
+ if @api_client.config.debugging
250
+ @api_client.config.logger.debug 'Calling API: ImportersCoreImportsApi.read ...'
251
+ end
252
+ # verify the required parameter 'pulp_import_href' is set
253
+ if @api_client.config.client_side_validation && pulp_import_href.nil?
254
+ fail ArgumentError, "Missing the required parameter 'pulp_import_href' when calling ImportersCoreImportsApi.read"
255
+ end
256
+ # resource path
257
+ local_var_path = '{pulp_import_href}'.sub('{' + 'pulp_import_href' + '}', CGI.escape(pulp_import_href.to_s).gsub('%2F', '/'))
258
+
259
+ # query parameters
260
+ query_params = opts[:query_params] || {}
261
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
262
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
263
+
264
+ # header parameters
265
+ header_params = opts[:header_params] || {}
266
+ # HTTP header 'Accept' (if needed)
267
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
268
+
269
+ # form parameters
270
+ form_params = opts[:form_params] || {}
271
+
272
+ # http body (model)
273
+ post_body = opts[:body]
274
+
275
+ # return_type
276
+ return_type = opts[:return_type] || 'Import'
277
+
278
+ # auth_names
279
+ auth_names = opts[:auth_names] || ['Basic']
280
+
281
+ new_options = opts.merge(
282
+ :header_params => header_params,
283
+ :query_params => query_params,
284
+ :form_params => form_params,
285
+ :body => post_body,
286
+ :auth_names => auth_names,
287
+ :return_type => return_type
288
+ )
289
+
290
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
291
+ if @api_client.config.debugging
292
+ @api_client.config.logger.debug "API called: ImportersCoreImportsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
293
+ end
294
+ return data, status_code, headers
295
+ end
296
+ end
297
+ end