pulp_cookbook_client 0.1.0b9 → 0.1.0b10.dev1674790537

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulp_cookbook_client might be problematic. Click here for more details.

Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -8
  3. data/docs/ContentCookbooksApi.md +16 -14
  4. data/docs/CookbookCookbookDistribution.md +1 -1
  5. data/docs/CookbookCookbookDistributionResponse.md +1 -1
  6. data/docs/CookbookCookbookPackageContent.md +6 -4
  7. data/docs/CookbookCookbookPackageContentResponse.md +3 -3
  8. data/docs/CookbookCookbookRemote.md +3 -3
  9. data/docs/CookbookCookbookRemoteResponse.md +3 -1
  10. data/docs/CookbookCookbookRemoteResponseHiddenFields.md +19 -0
  11. data/docs/CookbookCookbookRepository.md +1 -1
  12. data/docs/CookbookCookbookRepositoryResponse.md +1 -1
  13. data/docs/DistributionsCookbookApi.md +20 -14
  14. data/docs/PatchedcookbookCookbookDistribution.md +1 -1
  15. data/docs/PatchedcookbookCookbookRemote.md +3 -3
  16. data/docs/PatchedcookbookCookbookRepository.md +1 -1
  17. data/docs/PublicationsCookbookApi.md +14 -12
  18. data/docs/RemotesCookbookApi.md +14 -14
  19. data/docs/Repair.md +17 -0
  20. data/docs/RepositoriesCookbookApi.md +14 -12
  21. data/docs/RepositoriesCookbookVersionsApi.md +18 -18
  22. data/lib/pulp_cookbook_client/api/content_cookbooks_api.rb +28 -21
  23. data/lib/pulp_cookbook_client/api/distributions_cookbook_api.rb +32 -19
  24. data/lib/pulp_cookbook_client/api/publications_cookbook_api.rb +24 -17
  25. data/lib/pulp_cookbook_client/api/remotes_cookbook_api.rb +23 -19
  26. data/lib/pulp_cookbook_client/api/repositories_cookbook_api.rb +24 -17
  27. data/lib/pulp_cookbook_client/api/repositories_cookbook_versions_api.rb +32 -28
  28. data/lib/pulp_cookbook_client/api_client.rb +2 -5
  29. data/lib/pulp_cookbook_client/configuration.rb +1 -0
  30. data/lib/pulp_cookbook_client/models/cookbook_cookbook_distribution.rb +4 -2
  31. data/lib/pulp_cookbook_client/models/cookbook_cookbook_distribution_response.rb +4 -2
  32. data/lib/pulp_cookbook_client/models/cookbook_cookbook_package_content.rb +25 -15
  33. data/lib/pulp_cookbook_client/models/cookbook_cookbook_package_content_response.rb +11 -11
  34. data/lib/pulp_cookbook_client/models/cookbook_cookbook_remote.rb +6 -4
  35. data/lib/pulp_cookbook_client/models/cookbook_cookbook_remote_response.rb +17 -3
  36. data/lib/pulp_cookbook_client/models/{repository_version.rb → cookbook_cookbook_remote_response_hidden_fields.rb} +19 -12
  37. data/lib/pulp_cookbook_client/models/cookbook_cookbook_repository.rb +4 -2
  38. data/lib/pulp_cookbook_client/models/cookbook_cookbook_repository_response.rb +4 -2
  39. data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_distribution.rb +4 -2
  40. data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_remote.rb +6 -4
  41. data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_repository.rb +4 -2
  42. data/lib/pulp_cookbook_client/models/{content_summary.rb → repair.rb} +13 -50
  43. data/lib/pulp_cookbook_client/version.rb +1 -1
  44. data/lib/pulp_cookbook_client.rb +2 -2
  45. data/pulp_cookbook_client.gemspec +3 -3
  46. data/spec/api/content_cookbooks_api_spec.rb +8 -7
  47. data/spec/api/distributions_cookbook_api_spec.rb +10 -7
  48. data/spec/api/publications_cookbook_api_spec.rb +7 -6
  49. data/spec/api/remotes_cookbook_api_spec.rb +7 -7
  50. data/spec/api/repositories_cookbook_api_spec.rb +7 -6
  51. data/spec/api/repositories_cookbook_versions_api_spec.rb +8 -8
  52. data/spec/models/cookbook_cookbook_package_content_response_spec.rb +2 -2
  53. data/spec/models/cookbook_cookbook_package_content_spec.rb +8 -2
  54. data/spec/models/{content_summary_spec.rb → cookbook_cookbook_remote_response_hidden_fields_spec.rb} +8 -14
  55. data/spec/models/cookbook_cookbook_remote_response_spec.rb +6 -0
  56. data/spec/models/{repository_version_spec.rb → repair_spec.rb} +7 -7
  57. metadata +37 -38
  58. data/docs/ContentSummary.md +0 -21
  59. data/docs/RepositoryVersion.md +0 -17
  60. data/git_push.sh +0 -58
@@ -149,22 +149,22 @@ module PulpCookbookClient
149
149
  # Cookbook Remote Endpoint. CookbookRemote represents an external source of Cookbook Content. The target url of a CookbookRemote must point to a universe API endpont.
150
150
  # @param [Hash] opts the optional parameters
151
151
  # @option opts [Integer] :limit Number of results to return per page.
152
- # @option opts [String] :name
152
+ # @option opts [String] :name Filter results where name matches value
153
153
  # @option opts [String] :name__contains Filter results where name contains value
154
154
  # @option opts [String] :name__icontains Filter results where name contains value
155
155
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
156
156
  # @option opts [String] :name__startswith Filter results where name starts with value
157
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.
158
+ # @option opts [Array<String>] :ordering Ordering
159
159
  # @option opts [String] :pulp_label_select Filter labels by search string
160
- # @option opts [DateTime] :pulp_last_updated ISO 8601 formatted dates are supported
160
+ # @option opts [DateTime] :pulp_last_updated Filter results where pulp_last_updated matches value
161
161
  # @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
162
162
  # @option opts [DateTime] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
163
163
  # @option opts [DateTime] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
164
164
  # @option opts [DateTime] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
165
165
  # @option opts [Array<DateTime>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
166
- # @option opts [String] :fields A list of fields to include in the response.
167
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
166
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
167
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
168
168
  # @return [PaginatedcookbookCookbookRemoteResponseList]
169
169
  def list(opts = {})
170
170
  data, _status_code, _headers = list_with_http_info(opts)
@@ -175,27 +175,31 @@ module PulpCookbookClient
175
175
  # Cookbook Remote Endpoint. CookbookRemote represents an external source of Cookbook Content. The target url of a CookbookRemote must point to a universe API endpont.
176
176
  # @param [Hash] opts the optional parameters
177
177
  # @option opts [Integer] :limit Number of results to return per page.
178
- # @option opts [String] :name
178
+ # @option opts [String] :name Filter results where name matches value
179
179
  # @option opts [String] :name__contains Filter results where name contains value
180
180
  # @option opts [String] :name__icontains Filter results where name contains value
181
181
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
182
182
  # @option opts [String] :name__startswith Filter results where name starts with value
183
183
  # @option opts [Integer] :offset The initial index from which to return the results.
184
- # @option opts [String] :ordering Which field to use when ordering the results.
184
+ # @option opts [Array<String>] :ordering Ordering
185
185
  # @option opts [String] :pulp_label_select Filter labels by search string
186
- # @option opts [DateTime] :pulp_last_updated ISO 8601 formatted dates are supported
186
+ # @option opts [DateTime] :pulp_last_updated Filter results where pulp_last_updated matches value
187
187
  # @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
188
188
  # @option opts [DateTime] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
189
189
  # @option opts [DateTime] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
190
190
  # @option opts [DateTime] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
191
191
  # @option opts [Array<DateTime>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
192
- # @option opts [String] :fields A list of fields to include in the response.
193
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
192
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
193
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
194
194
  # @return [Array<(PaginatedcookbookCookbookRemoteResponseList, Integer, Hash)>] PaginatedcookbookCookbookRemoteResponseList data, response status code and response headers
195
195
  def list_with_http_info(opts = {})
196
196
  if @api_client.config.debugging
197
197
  @api_client.config.logger.debug 'Calling API: RemotesCookbookApi.list ...'
198
198
  end
199
+ allowable_values = ["-ca_cert", "-client_cert", "-client_key", "-connect_timeout", "-download_concurrency", "-headers", "-max_retries", "-name", "-password", "-pk", "-policy", "-proxy_password", "-proxy_url", "-proxy_username", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-rate_limit", "-sock_connect_timeout", "-sock_read_timeout", "-tls_validation", "-total_timeout", "-url", "-username", "ca_cert", "client_cert", "client_key", "connect_timeout", "download_concurrency", "headers", "max_retries", "name", "password", "pk", "policy", "proxy_password", "proxy_url", "proxy_username", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "rate_limit", "sock_connect_timeout", "sock_read_timeout", "tls_validation", "total_timeout", "url", "username"]
200
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
201
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
202
+ end
199
203
  # resource path
200
204
  local_var_path = '/pulp/api/v3/remotes/cookbook/cookbook/'
201
205
 
@@ -208,7 +212,7 @@ module PulpCookbookClient
208
212
  query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
209
213
  query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
210
214
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
211
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
215
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
212
216
  query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
213
217
  query_params[:'pulp_last_updated'] = opts[:'pulp_last_updated'] if !opts[:'pulp_last_updated'].nil?
214
218
  query_params[:'pulp_last_updated__gt'] = opts[:'pulp_last_updated__gt'] if !opts[:'pulp_last_updated__gt'].nil?
@@ -216,8 +220,8 @@ module PulpCookbookClient
216
220
  query_params[:'pulp_last_updated__lt'] = opts[:'pulp_last_updated__lt'] if !opts[:'pulp_last_updated__lt'].nil?
217
221
  query_params[:'pulp_last_updated__lte'] = opts[:'pulp_last_updated__lte'] if !opts[:'pulp_last_updated__lte'].nil?
218
222
  query_params[:'pulp_last_updated__range'] = @api_client.build_collection_param(opts[:'pulp_last_updated__range'], :csv) if !opts[:'pulp_last_updated__range'].nil?
219
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
220
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
223
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
224
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
221
225
 
222
226
  # header parameters
223
227
  header_params = opts[:header_params] || {}
@@ -326,8 +330,8 @@ module PulpCookbookClient
326
330
  # Cookbook Remote Endpoint. CookbookRemote represents an external source of Cookbook Content. The target url of a CookbookRemote must point to a universe API endpont.
327
331
  # @param cookbook_cookbook_remote_href [String]
328
332
  # @param [Hash] opts the optional parameters
329
- # @option opts [String] :fields A list of fields to include in the response.
330
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
333
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
334
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
331
335
  # @return [CookbookCookbookRemoteResponse]
332
336
  def read(cookbook_cookbook_remote_href, opts = {})
333
337
  data, _status_code, _headers = read_with_http_info(cookbook_cookbook_remote_href, opts)
@@ -338,8 +342,8 @@ module PulpCookbookClient
338
342
  # Cookbook Remote Endpoint. CookbookRemote represents an external source of Cookbook Content. The target url of a CookbookRemote must point to a universe API endpont.
339
343
  # @param cookbook_cookbook_remote_href [String]
340
344
  # @param [Hash] opts the optional parameters
341
- # @option opts [String] :fields A list of fields to include in the response.
342
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
345
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
346
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
343
347
  # @return [Array<(CookbookCookbookRemoteResponse, Integer, Hash)>] CookbookCookbookRemoteResponse data, response status code and response headers
344
348
  def read_with_http_info(cookbook_cookbook_remote_href, opts = {})
345
349
  if @api_client.config.debugging
@@ -354,8 +358,8 @@ module PulpCookbookClient
354
358
 
355
359
  # query parameters
356
360
  query_params = opts[:query_params] || {}
357
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
358
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
361
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
362
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
359
363
 
360
364
  # header parameters
361
365
  header_params = opts[:header_params] || {}
@@ -149,16 +149,17 @@ module PulpCookbookClient
149
149
  # Cookbook Repository Endpoint. CookbookRepository represents a single cookbook repository, to which content can be synced, added, or removed.
150
150
  # @param [Hash] opts the optional parameters
151
151
  # @option opts [Integer] :limit Number of results to return per page.
152
- # @option opts [String] :name
152
+ # @option opts [String] :name Filter results where name matches value
153
153
  # @option opts [String] :name__contains Filter results where name contains value
154
154
  # @option opts [String] :name__icontains Filter results where name contains value
155
155
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
156
156
  # @option opts [String] :name__startswith Filter results where name starts with value
157
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.
158
+ # @option opts [Array<String>] :ordering Ordering
159
159
  # @option opts [String] :pulp_label_select Filter labels by search string
160
- # @option opts [String] :fields A list of fields to include in the response.
161
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
160
+ # @option opts [String] :remote Foreign Key referenced by HREF
161
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
162
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
162
163
  # @return [PaginatedcookbookCookbookRepositoryResponseList]
163
164
  def list(opts = {})
164
165
  data, _status_code, _headers = list_with_http_info(opts)
@@ -169,21 +170,26 @@ module PulpCookbookClient
169
170
  # Cookbook Repository Endpoint. CookbookRepository represents a single cookbook repository, to which content can be synced, added, or removed.
170
171
  # @param [Hash] opts the optional parameters
171
172
  # @option opts [Integer] :limit Number of results to return per page.
172
- # @option opts [String] :name
173
+ # @option opts [String] :name Filter results where name matches value
173
174
  # @option opts [String] :name__contains Filter results where name contains value
174
175
  # @option opts [String] :name__icontains Filter results where name contains value
175
176
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
176
177
  # @option opts [String] :name__startswith Filter results where name starts with value
177
178
  # @option opts [Integer] :offset The initial index from which to return the results.
178
- # @option opts [String] :ordering Which field to use when ordering the results.
179
+ # @option opts [Array<String>] :ordering Ordering
179
180
  # @option opts [String] :pulp_label_select Filter labels by search string
180
- # @option opts [String] :fields A list of fields to include in the response.
181
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
181
+ # @option opts [String] :remote Foreign Key referenced by HREF
182
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
183
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
182
184
  # @return [Array<(PaginatedcookbookCookbookRepositoryResponseList, Integer, Hash)>] PaginatedcookbookCookbookRepositoryResponseList data, response status code and response headers
183
185
  def list_with_http_info(opts = {})
184
186
  if @api_client.config.debugging
185
187
  @api_client.config.logger.debug 'Calling API: RepositoriesCookbookApi.list ...'
186
188
  end
189
+ allowable_values = ["-description", "-name", "-next_version", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-retain_repo_versions", "-user_hidden", "description", "name", "next_version", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "retain_repo_versions", "user_hidden"]
190
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
191
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
192
+ end
187
193
  # resource path
188
194
  local_var_path = '/pulp/api/v3/repositories/cookbook/cookbook/'
189
195
 
@@ -196,10 +202,11 @@ module PulpCookbookClient
196
202
  query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
197
203
  query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
198
204
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
199
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
205
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
200
206
  query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
201
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
202
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
207
+ query_params[:'remote'] = opts[:'remote'] if !opts[:'remote'].nil?
208
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
209
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
203
210
 
204
211
  # header parameters
205
212
  header_params = opts[:header_params] || {}
@@ -378,8 +385,8 @@ module PulpCookbookClient
378
385
  # Cookbook Repository Endpoint. CookbookRepository represents a single cookbook repository, to which content can be synced, added, or removed.
379
386
  # @param cookbook_cookbook_repository_href [String]
380
387
  # @param [Hash] opts the optional parameters
381
- # @option opts [String] :fields A list of fields to include in the response.
382
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
388
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
389
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
383
390
  # @return [CookbookCookbookRepositoryResponse]
384
391
  def read(cookbook_cookbook_repository_href, opts = {})
385
392
  data, _status_code, _headers = read_with_http_info(cookbook_cookbook_repository_href, opts)
@@ -390,8 +397,8 @@ module PulpCookbookClient
390
397
  # Cookbook Repository Endpoint. CookbookRepository represents a single cookbook repository, to which content can be synced, added, or removed.
391
398
  # @param cookbook_cookbook_repository_href [String]
392
399
  # @param [Hash] opts the optional parameters
393
- # @option opts [String] :fields A list of fields to include in the response.
394
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
400
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
401
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
395
402
  # @return [Array<(CookbookCookbookRepositoryResponse, Integer, Hash)>] CookbookCookbookRepositoryResponse data, response status code and response headers
396
403
  def read_with_http_info(cookbook_cookbook_repository_href, opts = {})
397
404
  if @api_client.config.debugging
@@ -406,8 +413,8 @@ module PulpCookbookClient
406
413
 
407
414
  # query parameters
408
415
  query_params = opts[:query_params] || {}
409
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
410
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
416
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
417
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
411
418
 
412
419
  # header parameters
413
420
  header_params = opts[:header_params] || {}
@@ -88,22 +88,22 @@ module PulpCookbookClient
88
88
  # @option opts [String] :content Content Unit referenced by HREF
89
89
  # @option opts [String] :content__in Content Unit referenced by HREF
90
90
  # @option opts [Integer] :limit Number of results to return per page.
91
- # @option opts [Integer] :number
91
+ # @option opts [Integer] :number Filter results where number matches value
92
92
  # @option opts [Integer] :number__gt Filter results where number is greater than value
93
93
  # @option opts [Integer] :number__gte Filter results where number is greater than or equal to value
94
94
  # @option opts [Integer] :number__lt Filter results where number is less than value
95
95
  # @option opts [Integer] :number__lte Filter results where number is less than or equal to value
96
96
  # @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
97
97
  # @option opts [Integer] :offset The initial index from which to return the results.
98
- # @option opts [String] :ordering Which field to use when ordering the results.
99
- # @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
98
+ # @option opts [Array<String>] :ordering Ordering
99
+ # @option opts [DateTime] :pulp_created Filter results where pulp_created matches value
100
100
  # @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
101
101
  # @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
102
102
  # @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
103
103
  # @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
104
104
  # @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
105
- # @option opts [String] :fields A list of fields to include in the response.
106
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
105
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
106
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
107
107
  # @return [PaginatedRepositoryVersionResponseList]
108
108
  def list(cookbook_cookbook_repository_href, opts = {})
109
109
  data, _status_code, _headers = list_with_http_info(cookbook_cookbook_repository_href, opts)
@@ -117,22 +117,22 @@ module PulpCookbookClient
117
117
  # @option opts [String] :content Content Unit referenced by HREF
118
118
  # @option opts [String] :content__in Content Unit referenced by HREF
119
119
  # @option opts [Integer] :limit Number of results to return per page.
120
- # @option opts [Integer] :number
120
+ # @option opts [Integer] :number Filter results where number matches value
121
121
  # @option opts [Integer] :number__gt Filter results where number is greater than value
122
122
  # @option opts [Integer] :number__gte Filter results where number is greater than or equal to value
123
123
  # @option opts [Integer] :number__lt Filter results where number is less than value
124
124
  # @option opts [Integer] :number__lte Filter results where number is less than or equal to value
125
125
  # @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
126
126
  # @option opts [Integer] :offset The initial index from which to return the results.
127
- # @option opts [String] :ordering Which field to use when ordering the results.
128
- # @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
127
+ # @option opts [Array<String>] :ordering Ordering
128
+ # @option opts [DateTime] :pulp_created Filter results where pulp_created matches value
129
129
  # @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
130
130
  # @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
131
131
  # @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
132
132
  # @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
133
133
  # @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
134
- # @option opts [String] :fields A list of fields to include in the response.
135
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
134
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
135
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
136
136
  # @return [Array<(PaginatedRepositoryVersionResponseList, Integer, Hash)>] PaginatedRepositoryVersionResponseList data, response status code and response headers
137
137
  def list_with_http_info(cookbook_cookbook_repository_href, opts = {})
138
138
  if @api_client.config.debugging
@@ -142,6 +142,10 @@ module PulpCookbookClient
142
142
  if @api_client.config.client_side_validation && cookbook_cookbook_repository_href.nil?
143
143
  fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_href' when calling RepositoriesCookbookVersionsApi.list"
144
144
  end
145
+ allowable_values = ["-complete", "-info", "-number", "-pk", "-pulp_created", "-pulp_id", "-pulp_last_updated", "complete", "info", "number", "pk", "pulp_created", "pulp_id", "pulp_last_updated"]
146
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
147
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
148
+ end
145
149
  # resource path
146
150
  local_var_path = '{cookbook_cookbook_repository_href}versions/'.sub('{' + 'cookbook_cookbook_repository_href' + '}', CGI.escape(cookbook_cookbook_repository_href.to_s).gsub('%2F', '/'))
147
151
 
@@ -157,15 +161,15 @@ module PulpCookbookClient
157
161
  query_params[:'number__lte'] = opts[:'number__lte'] if !opts[:'number__lte'].nil?
158
162
  query_params[:'number__range'] = @api_client.build_collection_param(opts[:'number__range'], :csv) if !opts[:'number__range'].nil?
159
163
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
160
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
164
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
161
165
  query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
162
166
  query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
163
167
  query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
164
168
  query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
165
169
  query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
166
170
  query_params[:'pulp_created__range'] = @api_client.build_collection_param(opts[:'pulp_created__range'], :csv) if !opts[:'pulp_created__range'].nil?
167
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
168
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
171
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
172
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
169
173
 
170
174
  # header parameters
171
175
  header_params = opts[:header_params] || {}
@@ -204,8 +208,8 @@ module PulpCookbookClient
204
208
  # Cookbook Repository Version Endpoint. CookbookRepositoryVersion represents a single cookbook repository version.
205
209
  # @param cookbook_cookbook_repository_version_href [String]
206
210
  # @param [Hash] opts the optional parameters
207
- # @option opts [String] :fields A list of fields to include in the response.
208
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
211
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
212
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
209
213
  # @return [RepositoryVersionResponse]
210
214
  def read(cookbook_cookbook_repository_version_href, opts = {})
211
215
  data, _status_code, _headers = read_with_http_info(cookbook_cookbook_repository_version_href, opts)
@@ -216,8 +220,8 @@ module PulpCookbookClient
216
220
  # Cookbook Repository Version Endpoint. CookbookRepositoryVersion represents a single cookbook repository version.
217
221
  # @param cookbook_cookbook_repository_version_href [String]
218
222
  # @param [Hash] opts the optional parameters
219
- # @option opts [String] :fields A list of fields to include in the response.
220
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
223
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
224
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
221
225
  # @return [Array<(RepositoryVersionResponse, Integer, Hash)>] RepositoryVersionResponse data, response status code and response headers
222
226
  def read_with_http_info(cookbook_cookbook_repository_version_href, opts = {})
223
227
  if @api_client.config.debugging
@@ -232,8 +236,8 @@ module PulpCookbookClient
232
236
 
233
237
  # query parameters
234
238
  query_params = opts[:query_params] || {}
235
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
236
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
239
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
240
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
237
241
 
238
242
  # header parameters
239
243
  header_params = opts[:header_params] || {}
@@ -270,20 +274,20 @@ module PulpCookbookClient
270
274
 
271
275
  # Trigger an asynchronous task to repair a repository version.
272
276
  # @param cookbook_cookbook_repository_version_href [String]
273
- # @param repository_version [RepositoryVersion]
277
+ # @param repair [Repair]
274
278
  # @param [Hash] opts the optional parameters
275
279
  # @return [AsyncOperationResponse]
276
- def repair(cookbook_cookbook_repository_version_href, repository_version, opts = {})
277
- data, _status_code, _headers = repair_with_http_info(cookbook_cookbook_repository_version_href, repository_version, opts)
280
+ def repair(cookbook_cookbook_repository_version_href, repair, opts = {})
281
+ data, _status_code, _headers = repair_with_http_info(cookbook_cookbook_repository_version_href, repair, opts)
278
282
  data
279
283
  end
280
284
 
281
285
  # Trigger an asynchronous task to repair a repository version.
282
286
  # @param cookbook_cookbook_repository_version_href [String]
283
- # @param repository_version [RepositoryVersion]
287
+ # @param repair [Repair]
284
288
  # @param [Hash] opts the optional parameters
285
289
  # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
286
- def repair_with_http_info(cookbook_cookbook_repository_version_href, repository_version, opts = {})
290
+ def repair_with_http_info(cookbook_cookbook_repository_version_href, repair, opts = {})
287
291
  if @api_client.config.debugging
288
292
  @api_client.config.logger.debug 'Calling API: RepositoriesCookbookVersionsApi.repair ...'
289
293
  end
@@ -291,9 +295,9 @@ module PulpCookbookClient
291
295
  if @api_client.config.client_side_validation && cookbook_cookbook_repository_version_href.nil?
292
296
  fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_version_href' when calling RepositoriesCookbookVersionsApi.repair"
293
297
  end
294
- # verify the required parameter 'repository_version' is set
295
- if @api_client.config.client_side_validation && repository_version.nil?
296
- fail ArgumentError, "Missing the required parameter 'repository_version' when calling RepositoriesCookbookVersionsApi.repair"
298
+ # verify the required parameter 'repair' is set
299
+ if @api_client.config.client_side_validation && repair.nil?
300
+ fail ArgumentError, "Missing the required parameter 'repair' when calling RepositoriesCookbookVersionsApi.repair"
297
301
  end
298
302
  # resource path
299
303
  local_var_path = '{cookbook_cookbook_repository_version_href}repair/'.sub('{' + 'cookbook_cookbook_repository_version_href' + '}', CGI.escape(cookbook_cookbook_repository_version_href.to_s).gsub('%2F', '/'))
@@ -312,7 +316,7 @@ module PulpCookbookClient
312
316
  form_params = opts[:form_params] || {}
313
317
 
314
318
  # http body (model)
315
- post_body = opts[:body] || @api_client.object_to_http_body(repository_version)
319
+ post_body = opts[:body] || @api_client.object_to_http_body(repair)
316
320
 
317
321
  # return_type
318
322
  return_type = opts[:return_type] || 'AsyncOperationResponse'
@@ -118,9 +118,6 @@ module PulpCookbookClient
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,
124
121
  :params_encoding => @config.params_encoding,
125
122
  :timeout => @config.timeout,
126
123
  :verbose => @config.debugging
@@ -128,13 +125,13 @@ module PulpCookbookClient
128
125
 
129
126
  if [:post, :patch, :put, :delete].include?(http_method)
130
127
  req_body = build_request_body(header_params, form_params, opts[:body])
131
- req_opts.update :body => req_body
132
128
  if @config.debugging
133
129
  @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
134
130
  end
135
131
  end
136
132
  request.headers = header_params
137
133
  request.body = req_body
134
+ request.options = OpenStruct.new(req_opts)
138
135
  request.url url
139
136
  request.params = query_params
140
137
  download_file(request) if opts[:return_type] == 'File'
@@ -157,7 +154,7 @@ module PulpCookbookClient
157
154
  case value
158
155
  when ::File, ::Tempfile
159
156
  # TODO hardcode to application/octet-stream, need better way to detect content type
160
- data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path)
157
+ data[key] = Faraday::FilePart.new(value.path, 'application/octet-stream', value.path)
161
158
  when ::Array, nil
162
159
  # let Faraday handle Array and nil parameters
163
160
  data[key] = value
@@ -140,6 +140,7 @@ module PulpCookbookClient
140
140
  @ssl_client_cert = nil
141
141
  @ssl_client_key = nil
142
142
  @params_encoder = nil
143
+ @timeout = 60
143
144
  @debugging = false
144
145
  @inject_format = false
145
146
  @force_ending_format = false
@@ -49,7 +49,7 @@ module PulpCookbookClient
49
49
  {
50
50
  :'base_path' => :'String',
51
51
  :'content_guard' => :'String',
52
- :'pulp_labels' => :'Object',
52
+ :'pulp_labels' => :'Hash<String, String>',
53
53
  :'name' => :'String',
54
54
  :'repository' => :'String',
55
55
  :'publication' => :'String'
@@ -89,7 +89,9 @@ module PulpCookbookClient
89
89
  end
90
90
 
91
91
  if attributes.key?(:'pulp_labels')
92
- self.pulp_labels = attributes[:'pulp_labels']
92
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
93
+ self.pulp_labels = value
94
+ end
93
95
  end
94
96
 
95
97
  if attributes.key?(:'name')
@@ -63,7 +63,7 @@ module PulpCookbookClient
63
63
  :'base_path' => :'String',
64
64
  :'base_url' => :'String',
65
65
  :'content_guard' => :'String',
66
- :'pulp_labels' => :'Object',
66
+ :'pulp_labels' => :'Hash<String, String>',
67
67
  :'name' => :'String',
68
68
  :'repository' => :'String',
69
69
  :'publication' => :'String'
@@ -115,7 +115,9 @@ module PulpCookbookClient
115
115
  end
116
116
 
117
117
  if attributes.key?(:'pulp_labels')
118
- self.pulp_labels = attributes[:'pulp_labels']
118
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
119
+ self.pulp_labels = value
120
+ end
119
121
  end
120
122
 
121
123
  if attributes.key?(:'name')
@@ -15,14 +15,17 @@ require 'date'
15
15
  module PulpCookbookClient
16
16
  # Serializer for the cookbook content.
17
17
  class CookbookCookbookPackageContent
18
- # Artifact file representing the physical content
19
- attr_accessor :artifact
18
+ # A URI of a repository the new content unit should be associated with.
19
+ attr_accessor :repository
20
20
 
21
21
  # An uploaded file that may be turned into the artifact of the content unit.
22
22
  attr_accessor :file
23
23
 
24
- # A URI of a repository the new content unit should be associated with.
25
- attr_accessor :repository
24
+ # Artifact file representing the physical content
25
+ attr_accessor :artifact
26
+
27
+ # An uncommitted upload that may be turned into the artifact of the content unit.
28
+ attr_accessor :upload
26
29
 
27
30
  # name of the cookbook
28
31
  attr_accessor :name
@@ -33,9 +36,10 @@ module PulpCookbookClient
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
36
- :'artifact' => :'artifact',
37
- :'file' => :'file',
38
39
  :'repository' => :'repository',
40
+ :'file' => :'file',
41
+ :'artifact' => :'artifact',
42
+ :'upload' => :'upload',
39
43
  :'name' => :'name',
40
44
  :'version' => :'version'
41
45
  }
@@ -44,9 +48,10 @@ module PulpCookbookClient
44
48
  # Attribute type mapping.
45
49
  def self.openapi_types
46
50
  {
47
- :'artifact' => :'String',
48
- :'file' => :'File',
49
51
  :'repository' => :'String',
52
+ :'file' => :'File',
53
+ :'artifact' => :'String',
54
+ :'upload' => :'String',
50
55
  :'name' => :'String',
51
56
  :'version' => :'String'
52
57
  }
@@ -73,16 +78,20 @@ module PulpCookbookClient
73
78
  h[k.to_sym] = v
74
79
  }
75
80
 
76
- if attributes.key?(:'artifact')
77
- self.artifact = attributes[:'artifact']
81
+ if attributes.key?(:'repository')
82
+ self.repository = attributes[:'repository']
78
83
  end
79
84
 
80
85
  if attributes.key?(:'file')
81
86
  self.file = attributes[:'file']
82
87
  end
83
88
 
84
- if attributes.key?(:'repository')
85
- self.repository = attributes[:'repository']
89
+ if attributes.key?(:'artifact')
90
+ self.artifact = attributes[:'artifact']
91
+ end
92
+
93
+ if attributes.key?(:'upload')
94
+ self.upload = attributes[:'upload']
86
95
  end
87
96
 
88
97
  if attributes.key?(:'name')
@@ -151,9 +160,10 @@ module PulpCookbookClient
151
160
  def ==(o)
152
161
  return true if self.equal?(o)
153
162
  self.class == o.class &&
154
- artifact == o.artifact &&
155
- file == o.file &&
156
163
  repository == o.repository &&
164
+ file == o.file &&
165
+ artifact == o.artifact &&
166
+ upload == o.upload &&
157
167
  name == o.name &&
158
168
  version == o.version
159
169
  end
@@ -167,7 +177,7 @@ module PulpCookbookClient
167
177
  # Calculates hash code according to all attributes.
168
178
  # @return [Integer] Hash code
169
179
  def hash
170
- [artifact, file, repository, name, version].hash
180
+ [repository, file, artifact, upload, name, version].hash
171
181
  end
172
182
 
173
183
  # Builds the object from hash