pulpcore_client 3.14.19 → 3.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -5
  3. data/docs/AccessPoliciesApi.md +1 -1
  4. data/docs/ArtifactsApi.md +1 -1
  5. data/docs/ContentApi.md +1 -1
  6. data/docs/ContentguardsApi.md +1 -1
  7. data/docs/ContentguardsRbacApi.md +473 -0
  8. data/docs/ExportersFilesystemApi.md +362 -0
  9. data/docs/ExportersFilesystemExportsApi.md +243 -0
  10. data/docs/ExportersPulpApi.md +1 -1
  11. data/docs/ExportersPulpExportsApi.md +1 -1
  12. data/docs/FilesystemExport.md +21 -0
  13. data/docs/FilesystemExportResponse.md +25 -0
  14. data/docs/FilesystemExporter.md +21 -0
  15. data/docs/FilesystemExporterResponse.md +25 -0
  16. data/docs/GroupsApi.md +1 -1
  17. data/docs/GroupsModelPermissionsApi.md +1 -1
  18. data/docs/GroupsObjectPermissionsApi.md +1 -1
  19. data/docs/GroupsUsersApi.md +1 -1
  20. data/docs/ImportersPulpApi.md +1 -1
  21. data/docs/ImportersPulpImportCheckApi.md +1 -1
  22. data/docs/ImportersPulpImportsApi.md +1 -1
  23. data/docs/MethodEnum.md +16 -0
  24. data/docs/OrphansApi.md +1 -1
  25. data/docs/OrphansCleanup.md +3 -1
  26. data/docs/OrphansCleanupApi.md +1 -1
  27. data/docs/PaginatedFilesystemExportResponseList.md +23 -0
  28. data/docs/PaginatedFilesystemExporterResponseList.md +23 -0
  29. data/docs/PaginatedRBACContentGuardResponseList.md +23 -0
  30. data/docs/PatchedFilesystemExporter.md +21 -0
  31. data/docs/PatchedRBACContentGuard.md +19 -0
  32. data/docs/PublicationsApi.md +1 -1
  33. data/docs/RBACContentGuard.md +19 -0
  34. data/docs/RBACContentGuardPermission.md +19 -0
  35. data/docs/RBACContentGuardResponse.md +27 -0
  36. data/docs/ReclaimSpace.md +19 -0
  37. data/docs/RepairApi.md +1 -1
  38. data/docs/RepositoriesApi.md +1 -1
  39. data/docs/RepositoriesReclaimSpaceApi.md +61 -0
  40. data/docs/RepositoryResponse.md +3 -3
  41. data/docs/RepositoryVersionsApi.md +1 -1
  42. data/docs/SigningServicesApi.md +1 -1
  43. data/docs/StatusApi.md +1 -1
  44. data/docs/TaskGroupsApi.md +1 -1
  45. data/docs/TasksApi.md +1 -1
  46. data/docs/UploadsApi.md +1 -1
  47. data/docs/UsersApi.md +1 -1
  48. data/docs/WorkersApi.md +1 -1
  49. data/git_push.sh +58 -0
  50. data/lib/pulpcore_client/api/contentguards_rbac_api.rb +580 -0
  51. data/lib/pulpcore_client/api/exporters_filesystem_api.rb +442 -0
  52. data/lib/pulpcore_client/api/exporters_filesystem_exports_api.rb +297 -0
  53. data/lib/pulpcore_client/api/repositories_reclaim_space_api.rb +84 -0
  54. data/lib/pulpcore_client/api_client.rb +5 -2
  55. data/lib/pulpcore_client/configuration.rb +2 -3
  56. data/lib/pulpcore_client/models/filesystem_export.rb +229 -0
  57. data/lib/pulpcore_client/models/filesystem_export_response.rb +250 -0
  58. data/lib/pulpcore_client/models/filesystem_exporter.rb +238 -0
  59. data/lib/pulpcore_client/models/filesystem_exporter_response.rb +257 -0
  60. data/lib/pulpcore_client/models/method_enum.rb +37 -0
  61. data/lib/pulpcore_client/models/orphans_cleanup.rb +17 -4
  62. data/lib/pulpcore_client/models/paginated_filesystem_export_response_list.rb +237 -0
  63. data/lib/pulpcore_client/models/paginated_filesystem_exporter_response_list.rb +237 -0
  64. data/lib/pulpcore_client/models/paginated_rbac_content_guard_response_list.rb +237 -0
  65. data/lib/pulpcore_client/models/patched_filesystem_exporter.rb +228 -0
  66. data/lib/pulpcore_client/models/patched_rbac_content_guard.rb +219 -0
  67. data/lib/pulpcore_client/models/rbac_content_guard.rb +224 -0
  68. data/lib/pulpcore_client/models/rbac_content_guard_permission.rb +219 -0
  69. data/lib/pulpcore_client/models/rbac_content_guard_response.rb +261 -0
  70. data/lib/pulpcore_client/models/reclaim_space.rb +227 -0
  71. data/lib/pulpcore_client/models/repository_response.rb +17 -16
  72. data/lib/pulpcore_client/version.rb +1 -1
  73. data/lib/pulpcore_client.rb +18 -0
  74. data/pulpcore_client.gemspec +3 -3
  75. data/spec/api/contentguards_rbac_api_spec.rb +146 -0
  76. data/spec/api/exporters_filesystem_api_spec.rb +120 -0
  77. data/spec/api/exporters_filesystem_exports_api_spec.rb +91 -0
  78. data/spec/api/repositories_reclaim_space_api_spec.rb +46 -0
  79. data/spec/configuration_spec.rb +3 -3
  80. data/spec/models/filesystem_export_response_spec.rb +65 -0
  81. data/spec/models/filesystem_export_spec.rb +53 -0
  82. data/spec/models/filesystem_exporter_response_spec.rb +65 -0
  83. data/spec/models/filesystem_exporter_spec.rb +53 -0
  84. data/spec/models/method_enum_spec.rb +35 -0
  85. data/spec/models/orphans_cleanup_spec.rb +6 -0
  86. data/spec/models/paginated_filesystem_export_response_list_spec.rb +59 -0
  87. data/spec/models/paginated_filesystem_exporter_response_list_spec.rb +59 -0
  88. data/spec/models/paginated_rbac_content_guard_response_list_spec.rb +59 -0
  89. data/spec/models/patched_filesystem_exporter_spec.rb +53 -0
  90. data/spec/models/patched_rbac_content_guard_spec.rb +47 -0
  91. data/spec/models/rbac_content_guard_permission_spec.rb +47 -0
  92. data/spec/models/rbac_content_guard_response_spec.rb +71 -0
  93. data/spec/models/rbac_content_guard_spec.rb +47 -0
  94. data/spec/models/reclaim_space_spec.rb +47 -0
  95. data/spec/models/repository_response_spec.rb +1 -1
  96. metadata +158 -91
@@ -0,0 +1,297 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpcoreClient
16
+ class ExportersFilesystemExportsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a filesystem export
23
+ # Trigger an asynchronous task to export files to the filesystem
24
+ # @param filesystem_exporter_href [String]
25
+ # @param filesystem_export [FilesystemExport]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [AsyncOperationResponse]
28
+ def create(filesystem_exporter_href, filesystem_export, opts = {})
29
+ data, _status_code, _headers = create_with_http_info(filesystem_exporter_href, filesystem_export, opts)
30
+ data
31
+ end
32
+
33
+ # Create a filesystem export
34
+ # Trigger an asynchronous task to export files to the filesystem
35
+ # @param filesystem_exporter_href [String]
36
+ # @param filesystem_export [FilesystemExport]
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(filesystem_exporter_href, filesystem_export, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: ExportersFilesystemExportsApi.create ...'
42
+ end
43
+ # verify the required parameter 'filesystem_exporter_href' is set
44
+ if @api_client.config.client_side_validation && filesystem_exporter_href.nil?
45
+ fail ArgumentError, "Missing the required parameter 'filesystem_exporter_href' when calling ExportersFilesystemExportsApi.create"
46
+ end
47
+ # verify the required parameter 'filesystem_export' is set
48
+ if @api_client.config.client_side_validation && filesystem_export.nil?
49
+ fail ArgumentError, "Missing the required parameter 'filesystem_export' when calling ExportersFilesystemExportsApi.create"
50
+ end
51
+ # resource path
52
+ local_var_path = '{filesystem_exporter_href}exports/'.sub('{' + 'filesystem_exporter_href' + '}', CGI.escape(filesystem_exporter_href.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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
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(filesystem_export)
69
+
70
+ # return_type
71
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
72
+
73
+ # auth_names
74
+ auth_names = opts[:auth_names] || ['basicAuth']
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: ExportersFilesystemExportsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # Delete a filesystem export
93
+ # Endpoint for managing FilesystemExports. This endpoint is provided as a tech preview.
94
+ # @param filesystem_filesystem_export_href [String]
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [nil]
97
+ def delete(filesystem_filesystem_export_href, opts = {})
98
+ delete_with_http_info(filesystem_filesystem_export_href, opts)
99
+ nil
100
+ end
101
+
102
+ # Delete a filesystem export
103
+ # Endpoint for managing FilesystemExports. This endpoint is provided as a tech preview.
104
+ # @param filesystem_filesystem_export_href [String]
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(filesystem_filesystem_export_href, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: ExportersFilesystemExportsApi.delete ...'
110
+ end
111
+ # verify the required parameter 'filesystem_filesystem_export_href' is set
112
+ if @api_client.config.client_side_validation && filesystem_filesystem_export_href.nil?
113
+ fail ArgumentError, "Missing the required parameter 'filesystem_filesystem_export_href' when calling ExportersFilesystemExportsApi.delete"
114
+ end
115
+ # resource path
116
+ local_var_path = '{filesystem_filesystem_export_href}'.sub('{' + 'filesystem_filesystem_export_href' + '}', CGI.escape(filesystem_filesystem_export_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] || ['basicAuth']
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: ExportersFilesystemExportsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+
152
+ # List filesystem exports
153
+ # Endpoint for managing FilesystemExports. This endpoint is provided as a tech preview.
154
+ # @param filesystem_exporter_href [String]
155
+ # @param [Hash] opts the optional parameters
156
+ # @option opts [Integer] :limit Number of results to return per page.
157
+ # @option opts [Integer] :offset The initial index from which to return the results.
158
+ # @option opts [String] :ordering Which field to use when ordering 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 [PaginatedFilesystemExportResponseList]
162
+ def list(filesystem_exporter_href, opts = {})
163
+ data, _status_code, _headers = list_with_http_info(filesystem_exporter_href, opts)
164
+ data
165
+ end
166
+
167
+ # List filesystem exports
168
+ # Endpoint for managing FilesystemExports. This endpoint is provided as a tech preview.
169
+ # @param filesystem_exporter_href [String]
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [Integer] :limit Number of results to return per page.
172
+ # @option opts [Integer] :offset The initial index from which to return the results.
173
+ # @option opts [String] :ordering Which field to use when ordering 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<(PaginatedFilesystemExportResponseList, Integer, Hash)>] PaginatedFilesystemExportResponseList data, response status code and response headers
177
+ def list_with_http_info(filesystem_exporter_href, opts = {})
178
+ if @api_client.config.debugging
179
+ @api_client.config.logger.debug 'Calling API: ExportersFilesystemExportsApi.list ...'
180
+ end
181
+ # verify the required parameter 'filesystem_exporter_href' is set
182
+ if @api_client.config.client_side_validation && filesystem_exporter_href.nil?
183
+ fail ArgumentError, "Missing the required parameter 'filesystem_exporter_href' when calling ExportersFilesystemExportsApi.list"
184
+ end
185
+ # resource path
186
+ local_var_path = '{filesystem_exporter_href}exports/'.sub('{' + 'filesystem_exporter_href' + '}', CGI.escape(filesystem_exporter_href.to_s).gsub('%2F', '/'))
187
+
188
+ # query parameters
189
+ query_params = opts[:query_params] || {}
190
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
191
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
192
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].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] || 'PaginatedFilesystemExportResponseList'
209
+
210
+ # auth_names
211
+ auth_names = opts[:auth_names] || ['basicAuth']
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: ExportersFilesystemExportsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
+ end
226
+ return data, status_code, headers
227
+ end
228
+
229
+ # Inspect a filesystem export
230
+ # Endpoint for managing FilesystemExports. This endpoint is provided as a tech preview.
231
+ # @param filesystem_filesystem_export_href [String]
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 [FilesystemExportResponse]
236
+ def read(filesystem_filesystem_export_href, opts = {})
237
+ data, _status_code, _headers = read_with_http_info(filesystem_filesystem_export_href, opts)
238
+ data
239
+ end
240
+
241
+ # Inspect a filesystem export
242
+ # Endpoint for managing FilesystemExports. This endpoint is provided as a tech preview.
243
+ # @param filesystem_filesystem_export_href [String]
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<(FilesystemExportResponse, Integer, Hash)>] FilesystemExportResponse data, response status code and response headers
248
+ def read_with_http_info(filesystem_filesystem_export_href, opts = {})
249
+ if @api_client.config.debugging
250
+ @api_client.config.logger.debug 'Calling API: ExportersFilesystemExportsApi.read ...'
251
+ end
252
+ # verify the required parameter 'filesystem_filesystem_export_href' is set
253
+ if @api_client.config.client_side_validation && filesystem_filesystem_export_href.nil?
254
+ fail ArgumentError, "Missing the required parameter 'filesystem_filesystem_export_href' when calling ExportersFilesystemExportsApi.read"
255
+ end
256
+ # resource path
257
+ local_var_path = '{filesystem_filesystem_export_href}'.sub('{' + 'filesystem_filesystem_export_href' + '}', CGI.escape(filesystem_filesystem_export_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] || 'FilesystemExportResponse'
277
+
278
+ # auth_names
279
+ auth_names = opts[:auth_names] || ['basicAuth']
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: ExportersFilesystemExportsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
293
+ end
294
+ return data, status_code, headers
295
+ end
296
+ end
297
+ end
@@ -0,0 +1,84 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpcoreClient
16
+ class RepositoriesReclaimSpaceApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Trigger an asynchronous space reclaim operation.
23
+ # @param reclaim_space [ReclaimSpace]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [AsyncOperationResponse]
26
+ def reclaim(reclaim_space, opts = {})
27
+ data, _status_code, _headers = reclaim_with_http_info(reclaim_space, opts)
28
+ data
29
+ end
30
+
31
+ # Trigger an asynchronous space reclaim operation.
32
+ # @param reclaim_space [ReclaimSpace]
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
35
+ def reclaim_with_http_info(reclaim_space, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: RepositoriesReclaimSpaceApi.reclaim ...'
38
+ end
39
+ # verify the required parameter 'reclaim_space' is set
40
+ if @api_client.config.client_side_validation && reclaim_space.nil?
41
+ fail ArgumentError, "Missing the required parameter 'reclaim_space' when calling RepositoriesReclaimSpaceApi.reclaim"
42
+ end
43
+ # resource path
44
+ local_var_path = '/pulp/api/v3/repositories/reclaim_space/'
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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
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(reclaim_space)
61
+
62
+ # return_type
63
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
64
+
65
+ # auth_names
66
+ auth_names = opts[:auth_names] || ['basicAuth']
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: RepositoriesReclaimSpaceApi#reclaim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+ end
84
+ end
@@ -118,6 +118,9 @@ module PulpcoreClient
118
118
  update_params_for_auth! header_params, query_params, opts[:auth_names]
119
119
 
120
120
  req_opts = {
121
+ :method => http_method,
122
+ :headers => header_params,
123
+ :params => query_params,
121
124
  :params_encoding => @config.params_encoding,
122
125
  :timeout => @config.timeout,
123
126
  :verbose => @config.debugging
@@ -125,13 +128,13 @@ module PulpcoreClient
125
128
 
126
129
  if [:post, :patch, :put, :delete].include?(http_method)
127
130
  req_body = build_request_body(header_params, form_params, opts[:body])
131
+ req_opts.update :body => req_body
128
132
  if @config.debugging
129
133
  @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
130
134
  end
131
135
  end
132
136
  request.headers = header_params
133
137
  request.body = req_body
134
- request.options = OpenStruct.new(req_opts)
135
138
  request.url url
136
139
  request.params = query_params
137
140
  download_file(request) if opts[:return_type] == 'File'
@@ -154,7 +157,7 @@ module PulpcoreClient
154
157
  case value
155
158
  when ::File, ::Tempfile
156
159
  # TODO hardcode to application/octet-stream, need better way to detect content type
157
- data[key] = Faraday::FilePart.new(value.path, 'application/octet-stream', value.path)
160
+ data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path)
158
161
  when ::Array, nil
159
162
  # let Faraday handle Array and nil parameters
160
163
  data[key] = value
@@ -127,7 +127,7 @@ module PulpcoreClient
127
127
  attr_accessor :force_ending_format
128
128
 
129
129
  def initialize
130
- @scheme = 'http'
130
+ @scheme = 'https'
131
131
  @host = 'pulp'
132
132
  @base_path = ''
133
133
  @api_key = {}
@@ -140,7 +140,6 @@ module PulpcoreClient
140
140
  @ssl_client_cert = nil
141
141
  @ssl_client_key = nil
142
142
  @params_encoder = nil
143
- @timeout = 60
144
143
  @debugging = false
145
144
  @inject_format = false
146
145
  @force_ending_format = false
@@ -210,7 +209,7 @@ module PulpcoreClient
210
209
  def server_settings
211
210
  [
212
211
  {
213
- url: "http://pulp/",
212
+ url: "https://pulp/",
214
213
  description: "No description provided",
215
214
  }
216
215
  ]
@@ -0,0 +1,229 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpcoreClient
16
+ # Serializer for FilesystemExports.
17
+ class FilesystemExport
18
+ # A URI of the task that ran the Export.
19
+ attr_accessor :task
20
+
21
+ # A URI of the publication to be exported.
22
+ attr_accessor :publication
23
+
24
+ # A URI of the repository version export.
25
+ attr_accessor :repository_version
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'task' => :'task',
31
+ :'publication' => :'publication',
32
+ :'repository_version' => :'repository_version'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'task' => :'String',
40
+ :'publication' => :'String',
41
+ :'repository_version' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ :'task',
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::FilesystemExport` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::FilesystemExport`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'task')
68
+ self.task = attributes[:'task']
69
+ end
70
+
71
+ if attributes.key?(:'publication')
72
+ self.publication = attributes[:'publication']
73
+ end
74
+
75
+ if attributes.key?(:'repository_version')
76
+ self.repository_version = attributes[:'repository_version']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ true
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param [Object] Object to be compared
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ task == o.task &&
99
+ publication == o.publication &&
100
+ repository_version == o.repository_version
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [task, publication, repository_version].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ new.build_from_hash(attributes)
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ self.class.openapi_types.each_pair do |key, type|
128
+ if type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
132
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
133
+ end
134
+ elsif !attributes[self.class.attribute_map[key]].nil?
135
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
137
+ end
138
+
139
+ self
140
+ end
141
+
142
+ # Deserializes the data based on type
143
+ # @param string type Data type
144
+ # @param string value Value to be deserialized
145
+ # @return [Object] Deserialized data
146
+ def _deserialize(type, value)
147
+ case type.to_sym
148
+ when :DateTime
149
+ DateTime.parse(value)
150
+ when :Date
151
+ Date.parse(value)
152
+ when :String
153
+ value.to_s
154
+ when :Integer
155
+ value.to_i
156
+ when :Float
157
+ value.to_f
158
+ when :Boolean
159
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
+ true
161
+ else
162
+ false
163
+ end
164
+ when :Object
165
+ # generic object (usually a Hash), return directly
166
+ value
167
+ when /\AArray<(?<inner_type>.+)>\z/
168
+ inner_type = Regexp.last_match[:inner_type]
169
+ value.map { |v| _deserialize(inner_type, v) }
170
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
+ k_type = Regexp.last_match[:k_type]
172
+ v_type = Regexp.last_match[:v_type]
173
+ {}.tap do |hash|
174
+ value.each do |k, v|
175
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
+ end
177
+ end
178
+ else # model
179
+ PulpcoreClient.const_get(type).build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ if value.nil?
202
+ is_nullable = self.class.openapi_nullable.include?(attr)
203
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
+ end
205
+
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Outputs non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ # @param [Object] value Any valid value
214
+ # @return [Hash] Returns the value in the form of hash
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map { |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+ end
229
+ end