pulp_ostree_client 2.0.0a6 → 2.0.0
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.
- checksums.yaml +4 -4
- data/README.md +12 -7
- data/docs/ContentCommitsApi.md +8 -8
- data/docs/ContentConfigsApi.md +8 -8
- data/docs/ContentContentApi.md +138 -0
- data/docs/ContentObjectsApi.md +8 -8
- data/docs/ContentRefsApi.md +8 -8
- data/docs/ContentSummariesApi.md +8 -8
- data/docs/DistributionsOstreeApi.md +18 -12
- data/docs/OstreeOstreeContentResponse.md +25 -0
- data/docs/OstreeOstreeDistribution.md +1 -1
- data/docs/OstreeOstreeDistributionResponse.md +1 -1
- data/docs/OstreeOstreeRemote.md +1 -1
- data/docs/OstreeOstreeRemoteResponse.md +3 -1
- data/docs/OstreeOstreeRemoteResponseHiddenFields.md +19 -0
- data/docs/OstreeOstreeRepository.md +5 -3
- data/docs/OstreeOstreeRepositoryResponse.md +5 -3
- data/docs/PaginatedostreeOstreeContentResponseList.md +23 -0
- data/docs/PatchedostreeOstreeDistribution.md +1 -1
- data/docs/PatchedostreeOstreeRemote.md +1 -1
- data/docs/PatchedostreeOstreeRepository.md +5 -3
- data/docs/RemotesOstreeApi.md +12 -12
- data/docs/RepositoriesOstreeApi.md +32 -14
- data/docs/RepositoriesOstreeVersionsApi.md +12 -12
- data/docs/RepositoryAddRemoveContent.md +21 -0
- data/lib/pulp_ostree_client/api/content_commits_api.rb +13 -13
- data/lib/pulp_ostree_client/api/content_configs_api.rb +12 -12
- data/lib/pulp_ostree_client/api/content_content_api.rb +174 -0
- data/lib/pulp_ostree_client/api/content_objects_api.rb +13 -13
- data/lib/pulp_ostree_client/api/content_refs_api.rb +13 -13
- data/lib/pulp_ostree_client/api/content_summaries_api.rb +12 -12
- data/lib/pulp_ostree_client/api/distributions_ostree_api.rb +26 -17
- data/lib/pulp_ostree_client/api/remotes_ostree_api.rb +17 -17
- data/lib/pulp_ostree_client/api/repositories_ostree_api.rb +51 -24
- data/lib/pulp_ostree_client/api/repositories_ostree_versions_api.rb +17 -17
- data/lib/pulp_ostree_client/api_client.rb +1 -1
- data/lib/pulp_ostree_client/models/ostree_ostree_content_response.rb +260 -0
- data/lib/pulp_ostree_client/models/ostree_ostree_distribution.rb +4 -2
- data/lib/pulp_ostree_client/models/ostree_ostree_distribution_response.rb +4 -2
- data/lib/pulp_ostree_client/models/ostree_ostree_remote.rb +4 -2
- data/lib/pulp_ostree_client/models/ostree_ostree_remote_response.rb +17 -3
- data/lib/pulp_ostree_client/models/ostree_ostree_remote_response_hidden_fields.rb +215 -0
- data/lib/pulp_ostree_client/models/ostree_ostree_repository.rb +21 -8
- data/lib/pulp_ostree_client/models/ostree_ostree_repository_response.rb +21 -8
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_content_response_list.rb +237 -0
- data/lib/pulp_ostree_client/models/patchedostree_ostree_distribution.rb +4 -2
- data/lib/pulp_ostree_client/models/patchedostree_ostree_remote.rb +4 -2
- data/lib/pulp_ostree_client/models/patchedostree_ostree_repository.rb +21 -8
- data/lib/pulp_ostree_client/models/{ostree_repository_add_remove_content.rb → repository_add_remove_content.rb} +6 -6
- data/lib/pulp_ostree_client/version.rb +1 -1
- data/lib/pulp_ostree_client.rb +5 -1
- data/pulp_ostree_client.gemspec +3 -3
- data/spec/api/content_commits_api_spec.rb +4 -4
- data/spec/api/content_configs_api_spec.rb +4 -4
- data/spec/api/content_content_api_spec.rb +68 -0
- data/spec/api/content_objects_api_spec.rb +4 -4
- data/spec/api/content_refs_api_spec.rb +4 -4
- data/spec/api/content_summaries_api_spec.rb +4 -4
- data/spec/api/distributions_ostree_api_spec.rb +9 -6
- data/spec/api/remotes_ostree_api_spec.rb +6 -6
- data/spec/api/repositories_ostree_api_spec.rb +15 -6
- data/spec/api/repositories_ostree_versions_api_spec.rb +6 -6
- data/spec/models/ostree_ostree_content_response_spec.rb +65 -0
- data/spec/models/ostree_ostree_remote_response_hidden_fields_spec.rb +47 -0
- data/spec/models/ostree_ostree_remote_response_spec.rb +6 -0
- data/spec/models/ostree_ostree_repository_response_spec.rb +6 -0
- data/spec/models/ostree_ostree_repository_spec.rb +6 -0
- data/spec/models/paginatedostree_ostree_content_response_list_spec.rb +59 -0
- data/spec/models/patchedostree_ostree_repository_spec.rb +6 -0
- data/spec/models/{ostree_repository_add_remove_content_spec.rb → repository_add_remove_content_spec.rb} +6 -6
- metadata +60 -45
- data/docs/OstreeRepositoryAddRemoveContent.md +0 -21
- data/git_push.sh +0 -58
@@ -289,7 +289,7 @@ module PulpOstreeClient
|
|
289
289
|
# A ViewSet class for OSTree repositories.
|
290
290
|
# @param [Hash] opts the optional parameters
|
291
291
|
# @option opts [Integer] :limit Number of results to return per page.
|
292
|
-
# @option opts [String] :name
|
292
|
+
# @option opts [String] :name Filter results where name matches value
|
293
293
|
# @option opts [String] :name__contains Filter results where name contains value
|
294
294
|
# @option opts [String] :name__icontains Filter results where name contains value
|
295
295
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
@@ -297,8 +297,17 @@ module PulpOstreeClient
|
|
297
297
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
298
298
|
# @option opts [Array<String>] :ordering Ordering
|
299
299
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
300
|
-
# @option opts [String] :
|
301
|
-
# @option opts [
|
300
|
+
# @option opts [String] :remote Foreign Key referenced by HREF
|
301
|
+
# @option opts [Integer] :retain_repo_versions Filter results where retain_repo_versions matches value
|
302
|
+
# @option opts [Integer] :retain_repo_versions__gt Filter results where retain_repo_versions is greater than value
|
303
|
+
# @option opts [Integer] :retain_repo_versions__gte Filter results where retain_repo_versions is greater than or equal to value
|
304
|
+
# @option opts [Boolean] :retain_repo_versions__isnull Filter results where retain_repo_versions has a null value
|
305
|
+
# @option opts [Integer] :retain_repo_versions__lt Filter results where retain_repo_versions is less than value
|
306
|
+
# @option opts [Integer] :retain_repo_versions__lte Filter results where retain_repo_versions is less than or equal to value
|
307
|
+
# @option opts [Integer] :retain_repo_versions__ne Filter results where retain_repo_versions not equal to value
|
308
|
+
# @option opts [Array<Integer>] :retain_repo_versions__range Filter results where retain_repo_versions is between two comma separated values
|
309
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
310
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
302
311
|
# @return [PaginatedostreeOstreeRepositoryResponseList]
|
303
312
|
def list(opts = {})
|
304
313
|
data, _status_code, _headers = list_with_http_info(opts)
|
@@ -309,7 +318,7 @@ module PulpOstreeClient
|
|
309
318
|
# A ViewSet class for OSTree repositories.
|
310
319
|
# @param [Hash] opts the optional parameters
|
311
320
|
# @option opts [Integer] :limit Number of results to return per page.
|
312
|
-
# @option opts [String] :name
|
321
|
+
# @option opts [String] :name Filter results where name matches value
|
313
322
|
# @option opts [String] :name__contains Filter results where name contains value
|
314
323
|
# @option opts [String] :name__icontains Filter results where name contains value
|
315
324
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
@@ -317,14 +326,23 @@ module PulpOstreeClient
|
|
317
326
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
318
327
|
# @option opts [Array<String>] :ordering Ordering
|
319
328
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
320
|
-
# @option opts [String] :
|
321
|
-
# @option opts [
|
329
|
+
# @option opts [String] :remote Foreign Key referenced by HREF
|
330
|
+
# @option opts [Integer] :retain_repo_versions Filter results where retain_repo_versions matches value
|
331
|
+
# @option opts [Integer] :retain_repo_versions__gt Filter results where retain_repo_versions is greater than value
|
332
|
+
# @option opts [Integer] :retain_repo_versions__gte Filter results where retain_repo_versions is greater than or equal to value
|
333
|
+
# @option opts [Boolean] :retain_repo_versions__isnull Filter results where retain_repo_versions has a null value
|
334
|
+
# @option opts [Integer] :retain_repo_versions__lt Filter results where retain_repo_versions is less than value
|
335
|
+
# @option opts [Integer] :retain_repo_versions__lte Filter results where retain_repo_versions is less than or equal to value
|
336
|
+
# @option opts [Integer] :retain_repo_versions__ne Filter results where retain_repo_versions not equal to value
|
337
|
+
# @option opts [Array<Integer>] :retain_repo_versions__range Filter results where retain_repo_versions is between two comma separated values
|
338
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
339
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
322
340
|
# @return [Array<(PaginatedostreeOstreeRepositoryResponseList, Integer, Hash)>] PaginatedostreeOstreeRepositoryResponseList data, response status code and response headers
|
323
341
|
def list_with_http_info(opts = {})
|
324
342
|
if @api_client.config.debugging
|
325
343
|
@api_client.config.logger.debug 'Calling API: RepositoriesOstreeApi.list ...'
|
326
344
|
end
|
327
|
-
allowable_values = ["-
|
345
|
+
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"]
|
328
346
|
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
329
347
|
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
330
348
|
end
|
@@ -342,8 +360,17 @@ module PulpOstreeClient
|
|
342
360
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
343
361
|
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
344
362
|
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
345
|
-
query_params[:'
|
346
|
-
query_params[:'
|
363
|
+
query_params[:'remote'] = opts[:'remote'] if !opts[:'remote'].nil?
|
364
|
+
query_params[:'retain_repo_versions'] = opts[:'retain_repo_versions'] if !opts[:'retain_repo_versions'].nil?
|
365
|
+
query_params[:'retain_repo_versions__gt'] = opts[:'retain_repo_versions__gt'] if !opts[:'retain_repo_versions__gt'].nil?
|
366
|
+
query_params[:'retain_repo_versions__gte'] = opts[:'retain_repo_versions__gte'] if !opts[:'retain_repo_versions__gte'].nil?
|
367
|
+
query_params[:'retain_repo_versions__isnull'] = opts[:'retain_repo_versions__isnull'] if !opts[:'retain_repo_versions__isnull'].nil?
|
368
|
+
query_params[:'retain_repo_versions__lt'] = opts[:'retain_repo_versions__lt'] if !opts[:'retain_repo_versions__lt'].nil?
|
369
|
+
query_params[:'retain_repo_versions__lte'] = opts[:'retain_repo_versions__lte'] if !opts[:'retain_repo_versions__lte'].nil?
|
370
|
+
query_params[:'retain_repo_versions__ne'] = opts[:'retain_repo_versions__ne'] if !opts[:'retain_repo_versions__ne'].nil?
|
371
|
+
query_params[:'retain_repo_versions__range'] = @api_client.build_collection_param(opts[:'retain_repo_versions__range'], :csv) if !opts[:'retain_repo_versions__range'].nil?
|
372
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
373
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
347
374
|
|
348
375
|
# header parameters
|
349
376
|
header_params = opts[:header_params] || {}
|
@@ -381,21 +408,21 @@ module PulpOstreeClient
|
|
381
408
|
# Modify repository
|
382
409
|
# Trigger an asynchronous task to modify content.
|
383
410
|
# @param ostree_ostree_repository_href [String]
|
384
|
-
# @param
|
411
|
+
# @param repository_add_remove_content [RepositoryAddRemoveContent]
|
385
412
|
# @param [Hash] opts the optional parameters
|
386
413
|
# @return [AsyncOperationResponse]
|
387
|
-
def modify(ostree_ostree_repository_href,
|
388
|
-
data, _status_code, _headers = modify_with_http_info(ostree_ostree_repository_href,
|
414
|
+
def modify(ostree_ostree_repository_href, repository_add_remove_content, opts = {})
|
415
|
+
data, _status_code, _headers = modify_with_http_info(ostree_ostree_repository_href, repository_add_remove_content, opts)
|
389
416
|
data
|
390
417
|
end
|
391
418
|
|
392
419
|
# Modify repository
|
393
420
|
# Trigger an asynchronous task to modify content.
|
394
421
|
# @param ostree_ostree_repository_href [String]
|
395
|
-
# @param
|
422
|
+
# @param repository_add_remove_content [RepositoryAddRemoveContent]
|
396
423
|
# @param [Hash] opts the optional parameters
|
397
424
|
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
398
|
-
def modify_with_http_info(ostree_ostree_repository_href,
|
425
|
+
def modify_with_http_info(ostree_ostree_repository_href, repository_add_remove_content, opts = {})
|
399
426
|
if @api_client.config.debugging
|
400
427
|
@api_client.config.logger.debug 'Calling API: RepositoriesOstreeApi.modify ...'
|
401
428
|
end
|
@@ -403,9 +430,9 @@ module PulpOstreeClient
|
|
403
430
|
if @api_client.config.client_side_validation && ostree_ostree_repository_href.nil?
|
404
431
|
fail ArgumentError, "Missing the required parameter 'ostree_ostree_repository_href' when calling RepositoriesOstreeApi.modify"
|
405
432
|
end
|
406
|
-
# verify the required parameter '
|
407
|
-
if @api_client.config.client_side_validation &&
|
408
|
-
fail ArgumentError, "Missing the required parameter '
|
433
|
+
# verify the required parameter 'repository_add_remove_content' is set
|
434
|
+
if @api_client.config.client_side_validation && repository_add_remove_content.nil?
|
435
|
+
fail ArgumentError, "Missing the required parameter 'repository_add_remove_content' when calling RepositoriesOstreeApi.modify"
|
409
436
|
end
|
410
437
|
# resource path
|
411
438
|
local_var_path = '{ostree_ostree_repository_href}modify/'.sub('{' + 'ostree_ostree_repository_href' + '}', CGI.escape(ostree_ostree_repository_href.to_s).gsub('%2F', '/'))
|
@@ -424,7 +451,7 @@ module PulpOstreeClient
|
|
424
451
|
form_params = opts[:form_params] || {}
|
425
452
|
|
426
453
|
# http body (model)
|
427
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
454
|
+
post_body = opts[:body] || @api_client.object_to_http_body(repository_add_remove_content)
|
428
455
|
|
429
456
|
# return_type
|
430
457
|
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
@@ -522,8 +549,8 @@ module PulpOstreeClient
|
|
522
549
|
# A ViewSet class for OSTree repositories.
|
523
550
|
# @param ostree_ostree_repository_href [String]
|
524
551
|
# @param [Hash] opts the optional parameters
|
525
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
526
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
552
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
553
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
527
554
|
# @return [OstreeOstreeRepositoryResponse]
|
528
555
|
def read(ostree_ostree_repository_href, opts = {})
|
529
556
|
data, _status_code, _headers = read_with_http_info(ostree_ostree_repository_href, opts)
|
@@ -534,8 +561,8 @@ module PulpOstreeClient
|
|
534
561
|
# A ViewSet class for OSTree repositories.
|
535
562
|
# @param ostree_ostree_repository_href [String]
|
536
563
|
# @param [Hash] opts the optional parameters
|
537
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
538
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
564
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
565
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
539
566
|
# @return [Array<(OstreeOstreeRepositoryResponse, Integer, Hash)>] OstreeOstreeRepositoryResponse data, response status code and response headers
|
540
567
|
def read_with_http_info(ostree_ostree_repository_href, opts = {})
|
541
568
|
if @api_client.config.debugging
|
@@ -550,8 +577,8 @@ module PulpOstreeClient
|
|
550
577
|
|
551
578
|
# query parameters
|
552
579
|
query_params = opts[:query_params] || {}
|
553
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
554
|
-
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
580
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
581
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
555
582
|
|
556
583
|
# header parameters
|
557
584
|
header_params = opts[:header_params] || {}
|
@@ -88,7 +88,7 @@ module PulpOstreeClient
|
|
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
|
@@ -96,14 +96,14 @@ module PulpOstreeClient
|
|
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
98
|
# @option opts [Array<String>] :ordering Ordering
|
99
|
-
# @option opts [DateTime] :pulp_created
|
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(ostree_ostree_repository_href, opts = {})
|
109
109
|
data, _status_code, _headers = list_with_http_info(ostree_ostree_repository_href, opts)
|
@@ -117,7 +117,7 @@ module PulpOstreeClient
|
|
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
|
@@ -125,14 +125,14 @@ module PulpOstreeClient
|
|
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
127
|
# @option opts [Array<String>] :ordering Ordering
|
128
|
-
# @option opts [DateTime] :pulp_created
|
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(ostree_ostree_repository_href, opts = {})
|
138
138
|
if @api_client.config.debugging
|
@@ -142,7 +142,7 @@ module PulpOstreeClient
|
|
142
142
|
if @api_client.config.client_side_validation && ostree_ostree_repository_href.nil?
|
143
143
|
fail ArgumentError, "Missing the required parameter 'ostree_ostree_repository_href' when calling RepositoriesOstreeVersionsApi.list"
|
144
144
|
end
|
145
|
-
allowable_values = ["-
|
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
146
|
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
147
147
|
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
148
148
|
end
|
@@ -168,8 +168,8 @@ module PulpOstreeClient
|
|
168
168
|
query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
|
169
169
|
query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
|
170
170
|
query_params[:'pulp_created__range'] = @api_client.build_collection_param(opts[:'pulp_created__range'], :csv) if !opts[:'pulp_created__range'].nil?
|
171
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
172
|
-
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?
|
173
173
|
|
174
174
|
# header parameters
|
175
175
|
header_params = opts[:header_params] || {}
|
@@ -208,8 +208,8 @@ module PulpOstreeClient
|
|
208
208
|
# A ViewSet class that represents a single OSTree repository version.
|
209
209
|
# @param ostree_ostree_repository_version_href [String]
|
210
210
|
# @param [Hash] opts the optional parameters
|
211
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
212
|
-
# @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.
|
213
213
|
# @return [RepositoryVersionResponse]
|
214
214
|
def read(ostree_ostree_repository_version_href, opts = {})
|
215
215
|
data, _status_code, _headers = read_with_http_info(ostree_ostree_repository_version_href, opts)
|
@@ -220,8 +220,8 @@ module PulpOstreeClient
|
|
220
220
|
# A ViewSet class that represents a single OSTree repository version.
|
221
221
|
# @param ostree_ostree_repository_version_href [String]
|
222
222
|
# @param [Hash] opts the optional parameters
|
223
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
224
|
-
# @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.
|
225
225
|
# @return [Array<(RepositoryVersionResponse, Integer, Hash)>] RepositoryVersionResponse data, response status code and response headers
|
226
226
|
def read_with_http_info(ostree_ostree_repository_version_href, opts = {})
|
227
227
|
if @api_client.config.debugging
|
@@ -236,8 +236,8 @@ module PulpOstreeClient
|
|
236
236
|
|
237
237
|
# query parameters
|
238
238
|
query_params = opts[:query_params] || {}
|
239
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
240
|
-
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?
|
241
241
|
|
242
242
|
# header parameters
|
243
243
|
header_params = opts[:header_params] || {}
|
@@ -154,7 +154,7 @@ module PulpOstreeClient
|
|
154
154
|
case value
|
155
155
|
when ::File, ::Tempfile
|
156
156
|
# TODO hardcode to application/octet-stream, need better way to detect content type
|
157
|
-
data[key] = Faraday::
|
157
|
+
data[key] = Faraday::FilePart.new(value.path, 'application/octet-stream', value.path)
|
158
158
|
when ::Array, nil
|
159
159
|
# let Faraday handle Array and nil parameters
|
160
160
|
data[key] = value
|
@@ -0,0 +1,260 @@
|
|
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 PulpOstreeClient
|
16
|
+
# A Serializer class for uncategorized content units (e.g., static deltas).
|
17
|
+
class OstreeOstreeContentResponse
|
18
|
+
attr_accessor :pulp_href
|
19
|
+
|
20
|
+
# Timestamp of creation.
|
21
|
+
attr_accessor :pulp_created
|
22
|
+
|
23
|
+
# Artifact file representing the physical content
|
24
|
+
attr_accessor :artifact
|
25
|
+
|
26
|
+
attr_accessor :relative_path
|
27
|
+
|
28
|
+
attr_accessor :digest
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'pulp_href' => :'pulp_href',
|
34
|
+
:'pulp_created' => :'pulp_created',
|
35
|
+
:'artifact' => :'artifact',
|
36
|
+
:'relative_path' => :'relative_path',
|
37
|
+
:'digest' => :'digest'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'pulp_href' => :'String',
|
45
|
+
:'pulp_created' => :'DateTime',
|
46
|
+
:'artifact' => :'String',
|
47
|
+
:'relative_path' => :'String',
|
48
|
+
:'digest' => :'String'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# List of attributes with nullable: true
|
53
|
+
def self.openapi_nullable
|
54
|
+
Set.new([
|
55
|
+
])
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
def initialize(attributes = {})
|
61
|
+
if (!attributes.is_a?(Hash))
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpOstreeClient::OstreeOstreeContentResponse` initialize method"
|
63
|
+
end
|
64
|
+
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpOstreeClient::OstreeOstreeContentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
|
+
end
|
70
|
+
h[k.to_sym] = v
|
71
|
+
}
|
72
|
+
|
73
|
+
if attributes.key?(:'pulp_href')
|
74
|
+
self.pulp_href = attributes[:'pulp_href']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'pulp_created')
|
78
|
+
self.pulp_created = attributes[:'pulp_created']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'artifact')
|
82
|
+
self.artifact = attributes[:'artifact']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'relative_path')
|
86
|
+
self.relative_path = attributes[:'relative_path']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'digest')
|
90
|
+
self.digest = attributes[:'digest']
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
95
|
+
# @return Array for valid properties with the reasons
|
96
|
+
def list_invalid_properties
|
97
|
+
invalid_properties = Array.new
|
98
|
+
if @artifact.nil?
|
99
|
+
invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
|
100
|
+
end
|
101
|
+
|
102
|
+
if @relative_path.nil?
|
103
|
+
invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
|
104
|
+
end
|
105
|
+
|
106
|
+
if @digest.nil?
|
107
|
+
invalid_properties.push('invalid value for "digest", digest cannot be nil.')
|
108
|
+
end
|
109
|
+
|
110
|
+
invalid_properties
|
111
|
+
end
|
112
|
+
|
113
|
+
# Check to see if the all the properties in the model are valid
|
114
|
+
# @return true if the model is valid
|
115
|
+
def valid?
|
116
|
+
return false if @artifact.nil?
|
117
|
+
return false if @relative_path.nil?
|
118
|
+
return false if @digest.nil?
|
119
|
+
true
|
120
|
+
end
|
121
|
+
|
122
|
+
# Checks equality by comparing each attribute.
|
123
|
+
# @param [Object] Object to be compared
|
124
|
+
def ==(o)
|
125
|
+
return true if self.equal?(o)
|
126
|
+
self.class == o.class &&
|
127
|
+
pulp_href == o.pulp_href &&
|
128
|
+
pulp_created == o.pulp_created &&
|
129
|
+
artifact == o.artifact &&
|
130
|
+
relative_path == o.relative_path &&
|
131
|
+
digest == o.digest
|
132
|
+
end
|
133
|
+
|
134
|
+
# @see the `==` method
|
135
|
+
# @param [Object] Object to be compared
|
136
|
+
def eql?(o)
|
137
|
+
self == o
|
138
|
+
end
|
139
|
+
|
140
|
+
# Calculates hash code according to all attributes.
|
141
|
+
# @return [Integer] Hash code
|
142
|
+
def hash
|
143
|
+
[pulp_href, pulp_created, artifact, relative_path, digest].hash
|
144
|
+
end
|
145
|
+
|
146
|
+
# Builds the object from hash
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
148
|
+
# @return [Object] Returns the model itself
|
149
|
+
def self.build_from_hash(attributes)
|
150
|
+
new.build_from_hash(attributes)
|
151
|
+
end
|
152
|
+
|
153
|
+
# Builds the object from hash
|
154
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
155
|
+
# @return [Object] Returns the model itself
|
156
|
+
def build_from_hash(attributes)
|
157
|
+
return nil unless attributes.is_a?(Hash)
|
158
|
+
self.class.openapi_types.each_pair do |key, type|
|
159
|
+
if type =~ /\AArray<(.*)>/i
|
160
|
+
# check to ensure the input is an array given that the attribute
|
161
|
+
# is documented as an array but the input is not
|
162
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
163
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
164
|
+
end
|
165
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
166
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
167
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
168
|
+
end
|
169
|
+
|
170
|
+
self
|
171
|
+
end
|
172
|
+
|
173
|
+
# Deserializes the data based on type
|
174
|
+
# @param string type Data type
|
175
|
+
# @param string value Value to be deserialized
|
176
|
+
# @return [Object] Deserialized data
|
177
|
+
def _deserialize(type, value)
|
178
|
+
case type.to_sym
|
179
|
+
when :DateTime
|
180
|
+
DateTime.parse(value)
|
181
|
+
when :Date
|
182
|
+
Date.parse(value)
|
183
|
+
when :String
|
184
|
+
value.to_s
|
185
|
+
when :Integer
|
186
|
+
value.to_i
|
187
|
+
when :Float
|
188
|
+
value.to_f
|
189
|
+
when :Boolean
|
190
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
191
|
+
true
|
192
|
+
else
|
193
|
+
false
|
194
|
+
end
|
195
|
+
when :Object
|
196
|
+
# generic object (usually a Hash), return directly
|
197
|
+
value
|
198
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
199
|
+
inner_type = Regexp.last_match[:inner_type]
|
200
|
+
value.map { |v| _deserialize(inner_type, v) }
|
201
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
202
|
+
k_type = Regexp.last_match[:k_type]
|
203
|
+
v_type = Regexp.last_match[:v_type]
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each do |k, v|
|
206
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
else # model
|
210
|
+
PulpOstreeClient.const_get(type).build_from_hash(value)
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the string representation of the object
|
215
|
+
# @return [String] String presentation of the object
|
216
|
+
def to_s
|
217
|
+
to_hash.to_s
|
218
|
+
end
|
219
|
+
|
220
|
+
# to_body is an alias to to_hash (backward compatibility)
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_body
|
223
|
+
to_hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Returns the object in the form of hash
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
228
|
+
def to_hash
|
229
|
+
hash = {}
|
230
|
+
self.class.attribute_map.each_pair do |attr, param|
|
231
|
+
value = self.send(attr)
|
232
|
+
if value.nil?
|
233
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
234
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
235
|
+
end
|
236
|
+
|
237
|
+
hash[param] = _to_hash(value)
|
238
|
+
end
|
239
|
+
hash
|
240
|
+
end
|
241
|
+
|
242
|
+
# Outputs non-array value in the form of hash
|
243
|
+
# For object, use to_hash. Otherwise, just return the value
|
244
|
+
# @param [Object] value Any valid value
|
245
|
+
# @return [Hash] Returns the value in the form of hash
|
246
|
+
def _to_hash(value)
|
247
|
+
if value.is_a?(Array)
|
248
|
+
value.compact.map { |v| _to_hash(v) }
|
249
|
+
elsif value.is_a?(Hash)
|
250
|
+
{}.tap do |hash|
|
251
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
252
|
+
end
|
253
|
+
elsif value.respond_to? :to_hash
|
254
|
+
value.to_hash
|
255
|
+
else
|
256
|
+
value
|
257
|
+
end
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
@@ -49,7 +49,7 @@ module PulpOstreeClient
|
|
49
49
|
{
|
50
50
|
:'base_path' => :'String',
|
51
51
|
:'content_guard' => :'String',
|
52
|
-
:'pulp_labels' => :'
|
52
|
+
:'pulp_labels' => :'Hash<String, String>',
|
53
53
|
:'name' => :'String',
|
54
54
|
:'repository' => :'String',
|
55
55
|
:'repository_version' => :'String'
|
@@ -89,7 +89,9 @@ module PulpOstreeClient
|
|
89
89
|
end
|
90
90
|
|
91
91
|
if attributes.key?(:'pulp_labels')
|
92
|
-
|
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 PulpOstreeClient
|
|
63
63
|
:'base_path' => :'String',
|
64
64
|
:'base_url' => :'String',
|
65
65
|
:'content_guard' => :'String',
|
66
|
-
:'pulp_labels' => :'
|
66
|
+
:'pulp_labels' => :'Hash<String, String>',
|
67
67
|
:'name' => :'String',
|
68
68
|
:'repository' => :'String',
|
69
69
|
:'repository_version' => :'String'
|
@@ -115,7 +115,9 @@ module PulpOstreeClient
|
|
115
115
|
end
|
116
116
|
|
117
117
|
if attributes.key?(:'pulp_labels')
|
118
|
-
|
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')
|
@@ -130,7 +130,7 @@ module PulpOstreeClient
|
|
130
130
|
:'proxy_password' => :'String',
|
131
131
|
:'username' => :'String',
|
132
132
|
:'password' => :'String',
|
133
|
-
:'pulp_labels' => :'
|
133
|
+
:'pulp_labels' => :'Hash<String, String>',
|
134
134
|
:'download_concurrency' => :'Integer',
|
135
135
|
:'max_retries' => :'Integer',
|
136
136
|
:'policy' => :'PolicyEnum',
|
@@ -229,7 +229,9 @@ module PulpOstreeClient
|
|
229
229
|
end
|
230
230
|
|
231
231
|
if attributes.key?(:'pulp_labels')
|
232
|
-
|
232
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
233
|
+
self.pulp_labels = value
|
234
|
+
end
|
233
235
|
end
|
234
236
|
|
235
237
|
if attributes.key?(:'download_concurrency')
|