pulp_deb_client 3.4.0 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -4
- data/docs/DebReleaseComponentResponse.md +3 -1
- data/docs/DebSourcePackageResponse.md +2 -0
- data/docs/DistributionsAptApi.md +232 -0
- data/docs/MyPermissionsResponse.md +17 -0
- data/docs/NestedRole.md +21 -0
- data/docs/NestedRoleResponse.md +21 -0
- data/docs/ObjectRolesResponse.md +17 -0
- data/docs/PublicationsAptApi.md +232 -0
- data/docs/PublicationsVerbatimApi.md +232 -0
- data/docs/RemotesAptApi.md +232 -0
- data/docs/RepositoriesAptApi.md +232 -0
- data/lib/pulp_deb_client/api/distributions_apt_api.rb +276 -0
- data/lib/pulp_deb_client/api/publications_apt_api.rb +276 -0
- data/lib/pulp_deb_client/api/publications_verbatim_api.rb +276 -0
- data/lib/pulp_deb_client/api/remotes_apt_api.rb +276 -0
- data/lib/pulp_deb_client/api/repositories_apt_api.rb +276 -0
- data/lib/pulp_deb_client/models/deb_apt_remote.rb +20 -20
- data/lib/pulp_deb_client/models/deb_apt_remote_response.rb +20 -20
- data/lib/pulp_deb_client/models/deb_release_component_response.rb +14 -4
- data/lib/pulp_deb_client/models/deb_source_package_response.rb +11 -1
- data/lib/pulp_deb_client/models/my_permissions_response.rb +213 -0
- data/lib/pulp_deb_client/models/nested_role.rb +253 -0
- data/lib/pulp_deb_client/models/nested_role_response.rb +234 -0
- data/lib/pulp_deb_client/models/object_roles_response.rb +213 -0
- data/lib/pulp_deb_client/models/patcheddeb_apt_remote.rb +20 -20
- data/lib/pulp_deb_client/version.rb +1 -1
- data/lib/pulp_deb_client.rb +4 -0
- data/spec/api/distributions_apt_api_spec.rb +54 -0
- data/spec/api/publications_apt_api_spec.rb +54 -0
- data/spec/api/publications_verbatim_api_spec.rb +54 -0
- data/spec/api/remotes_apt_api_spec.rb +54 -0
- data/spec/api/repositories_apt_api_spec.rb +54 -0
- data/spec/models/deb_release_component_response_spec.rb +6 -0
- data/spec/models/deb_source_package_response_spec.rb +6 -0
- data/spec/models/my_permissions_response_spec.rb +41 -0
- data/spec/models/nested_role_response_spec.rb +53 -0
- data/spec/models/nested_role_spec.rb +53 -0
- data/spec/models/object_roles_response_spec.rb +41 -0
- metadata +95 -79
@@ -19,6 +19,76 @@ module PulpDebClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Add a role
|
23
|
+
# Add a role for this object to users/groups.
|
24
|
+
# @param deb_apt_distribution_href [String]
|
25
|
+
# @param nested_role [NestedRole]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [NestedRoleResponse]
|
28
|
+
def add_role(deb_apt_distribution_href, nested_role, opts = {})
|
29
|
+
data, _status_code, _headers = add_role_with_http_info(deb_apt_distribution_href, nested_role, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Add a role
|
34
|
+
# Add a role for this object to users/groups.
|
35
|
+
# @param deb_apt_distribution_href [String]
|
36
|
+
# @param nested_role [NestedRole]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
39
|
+
def add_role_with_http_info(deb_apt_distribution_href, nested_role, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: DistributionsAptApi.add_role ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'deb_apt_distribution_href' is set
|
44
|
+
if @api_client.config.client_side_validation && deb_apt_distribution_href.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'deb_apt_distribution_href' when calling DistributionsAptApi.add_role"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'nested_role' is set
|
48
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling DistributionsAptApi.add_role"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '{deb_apt_distribution_href}add_role/'.sub('{' + 'deb_apt_distribution_href' + '}', CGI.escape(deb_apt_distribution_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(nested_role)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
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: DistributionsAptApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
22
92
|
# Create an apt distribution
|
23
93
|
# Trigger an asynchronous create task
|
24
94
|
# @param deb_apt_distribution [DebAptDistribution]
|
@@ -283,6 +353,142 @@ module PulpDebClient
|
|
283
353
|
return data, status_code, headers
|
284
354
|
end
|
285
355
|
|
356
|
+
# List roles
|
357
|
+
# List roles assigned to this object.
|
358
|
+
# @param deb_apt_distribution_href [String]
|
359
|
+
# @param [Hash] opts the optional parameters
|
360
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
361
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
362
|
+
# @return [ObjectRolesResponse]
|
363
|
+
def list_roles(deb_apt_distribution_href, opts = {})
|
364
|
+
data, _status_code, _headers = list_roles_with_http_info(deb_apt_distribution_href, opts)
|
365
|
+
data
|
366
|
+
end
|
367
|
+
|
368
|
+
# List roles
|
369
|
+
# List roles assigned to this object.
|
370
|
+
# @param deb_apt_distribution_href [String]
|
371
|
+
# @param [Hash] opts the optional parameters
|
372
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
373
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
374
|
+
# @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
|
375
|
+
def list_roles_with_http_info(deb_apt_distribution_href, opts = {})
|
376
|
+
if @api_client.config.debugging
|
377
|
+
@api_client.config.logger.debug 'Calling API: DistributionsAptApi.list_roles ...'
|
378
|
+
end
|
379
|
+
# verify the required parameter 'deb_apt_distribution_href' is set
|
380
|
+
if @api_client.config.client_side_validation && deb_apt_distribution_href.nil?
|
381
|
+
fail ArgumentError, "Missing the required parameter 'deb_apt_distribution_href' when calling DistributionsAptApi.list_roles"
|
382
|
+
end
|
383
|
+
# resource path
|
384
|
+
local_var_path = '{deb_apt_distribution_href}list_roles/'.sub('{' + 'deb_apt_distribution_href' + '}', CGI.escape(deb_apt_distribution_href.to_s).gsub('%2F', '/'))
|
385
|
+
|
386
|
+
# query parameters
|
387
|
+
query_params = opts[:query_params] || {}
|
388
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
389
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
390
|
+
|
391
|
+
# header parameters
|
392
|
+
header_params = opts[:header_params] || {}
|
393
|
+
# HTTP header 'Accept' (if needed)
|
394
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
395
|
+
|
396
|
+
# form parameters
|
397
|
+
form_params = opts[:form_params] || {}
|
398
|
+
|
399
|
+
# http body (model)
|
400
|
+
post_body = opts[:body]
|
401
|
+
|
402
|
+
# return_type
|
403
|
+
return_type = opts[:return_type] || 'ObjectRolesResponse'
|
404
|
+
|
405
|
+
# auth_names
|
406
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
407
|
+
|
408
|
+
new_options = opts.merge(
|
409
|
+
:header_params => header_params,
|
410
|
+
:query_params => query_params,
|
411
|
+
:form_params => form_params,
|
412
|
+
:body => post_body,
|
413
|
+
:auth_names => auth_names,
|
414
|
+
:return_type => return_type
|
415
|
+
)
|
416
|
+
|
417
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
418
|
+
if @api_client.config.debugging
|
419
|
+
@api_client.config.logger.debug "API called: DistributionsAptApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
420
|
+
end
|
421
|
+
return data, status_code, headers
|
422
|
+
end
|
423
|
+
|
424
|
+
# List user permissions
|
425
|
+
# List permissions available to the current user on this object.
|
426
|
+
# @param deb_apt_distribution_href [String]
|
427
|
+
# @param [Hash] opts the optional parameters
|
428
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
429
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
430
|
+
# @return [MyPermissionsResponse]
|
431
|
+
def my_permissions(deb_apt_distribution_href, opts = {})
|
432
|
+
data, _status_code, _headers = my_permissions_with_http_info(deb_apt_distribution_href, opts)
|
433
|
+
data
|
434
|
+
end
|
435
|
+
|
436
|
+
# List user permissions
|
437
|
+
# List permissions available to the current user on this object.
|
438
|
+
# @param deb_apt_distribution_href [String]
|
439
|
+
# @param [Hash] opts the optional parameters
|
440
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
441
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
442
|
+
# @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
|
443
|
+
def my_permissions_with_http_info(deb_apt_distribution_href, opts = {})
|
444
|
+
if @api_client.config.debugging
|
445
|
+
@api_client.config.logger.debug 'Calling API: DistributionsAptApi.my_permissions ...'
|
446
|
+
end
|
447
|
+
# verify the required parameter 'deb_apt_distribution_href' is set
|
448
|
+
if @api_client.config.client_side_validation && deb_apt_distribution_href.nil?
|
449
|
+
fail ArgumentError, "Missing the required parameter 'deb_apt_distribution_href' when calling DistributionsAptApi.my_permissions"
|
450
|
+
end
|
451
|
+
# resource path
|
452
|
+
local_var_path = '{deb_apt_distribution_href}my_permissions/'.sub('{' + 'deb_apt_distribution_href' + '}', CGI.escape(deb_apt_distribution_href.to_s).gsub('%2F', '/'))
|
453
|
+
|
454
|
+
# query parameters
|
455
|
+
query_params = opts[:query_params] || {}
|
456
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
457
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
458
|
+
|
459
|
+
# header parameters
|
460
|
+
header_params = opts[:header_params] || {}
|
461
|
+
# HTTP header 'Accept' (if needed)
|
462
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
463
|
+
|
464
|
+
# form parameters
|
465
|
+
form_params = opts[:form_params] || {}
|
466
|
+
|
467
|
+
# http body (model)
|
468
|
+
post_body = opts[:body]
|
469
|
+
|
470
|
+
# return_type
|
471
|
+
return_type = opts[:return_type] || 'MyPermissionsResponse'
|
472
|
+
|
473
|
+
# auth_names
|
474
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
475
|
+
|
476
|
+
new_options = opts.merge(
|
477
|
+
:header_params => header_params,
|
478
|
+
:query_params => query_params,
|
479
|
+
:form_params => form_params,
|
480
|
+
:body => post_body,
|
481
|
+
:auth_names => auth_names,
|
482
|
+
:return_type => return_type
|
483
|
+
)
|
484
|
+
|
485
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
486
|
+
if @api_client.config.debugging
|
487
|
+
@api_client.config.logger.debug "API called: DistributionsAptApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
488
|
+
end
|
489
|
+
return data, status_code, headers
|
490
|
+
end
|
491
|
+
|
286
492
|
# Update an apt distribution
|
287
493
|
# Trigger an asynchronous partial update task
|
288
494
|
# @param deb_apt_distribution_href [String]
|
@@ -421,6 +627,76 @@ module PulpDebClient
|
|
421
627
|
return data, status_code, headers
|
422
628
|
end
|
423
629
|
|
630
|
+
# Remove a role
|
631
|
+
# Remove a role for this object from users/groups.
|
632
|
+
# @param deb_apt_distribution_href [String]
|
633
|
+
# @param nested_role [NestedRole]
|
634
|
+
# @param [Hash] opts the optional parameters
|
635
|
+
# @return [NestedRoleResponse]
|
636
|
+
def remove_role(deb_apt_distribution_href, nested_role, opts = {})
|
637
|
+
data, _status_code, _headers = remove_role_with_http_info(deb_apt_distribution_href, nested_role, opts)
|
638
|
+
data
|
639
|
+
end
|
640
|
+
|
641
|
+
# Remove a role
|
642
|
+
# Remove a role for this object from users/groups.
|
643
|
+
# @param deb_apt_distribution_href [String]
|
644
|
+
# @param nested_role [NestedRole]
|
645
|
+
# @param [Hash] opts the optional parameters
|
646
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
647
|
+
def remove_role_with_http_info(deb_apt_distribution_href, nested_role, opts = {})
|
648
|
+
if @api_client.config.debugging
|
649
|
+
@api_client.config.logger.debug 'Calling API: DistributionsAptApi.remove_role ...'
|
650
|
+
end
|
651
|
+
# verify the required parameter 'deb_apt_distribution_href' is set
|
652
|
+
if @api_client.config.client_side_validation && deb_apt_distribution_href.nil?
|
653
|
+
fail ArgumentError, "Missing the required parameter 'deb_apt_distribution_href' when calling DistributionsAptApi.remove_role"
|
654
|
+
end
|
655
|
+
# verify the required parameter 'nested_role' is set
|
656
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
657
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling DistributionsAptApi.remove_role"
|
658
|
+
end
|
659
|
+
# resource path
|
660
|
+
local_var_path = '{deb_apt_distribution_href}remove_role/'.sub('{' + 'deb_apt_distribution_href' + '}', CGI.escape(deb_apt_distribution_href.to_s).gsub('%2F', '/'))
|
661
|
+
|
662
|
+
# query parameters
|
663
|
+
query_params = opts[:query_params] || {}
|
664
|
+
|
665
|
+
# header parameters
|
666
|
+
header_params = opts[:header_params] || {}
|
667
|
+
# HTTP header 'Accept' (if needed)
|
668
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
669
|
+
# HTTP header 'Content-Type'
|
670
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
671
|
+
|
672
|
+
# form parameters
|
673
|
+
form_params = opts[:form_params] || {}
|
674
|
+
|
675
|
+
# http body (model)
|
676
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
677
|
+
|
678
|
+
# return_type
|
679
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
680
|
+
|
681
|
+
# auth_names
|
682
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
683
|
+
|
684
|
+
new_options = opts.merge(
|
685
|
+
:header_params => header_params,
|
686
|
+
:query_params => query_params,
|
687
|
+
:form_params => form_params,
|
688
|
+
:body => post_body,
|
689
|
+
:auth_names => auth_names,
|
690
|
+
:return_type => return_type
|
691
|
+
)
|
692
|
+
|
693
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
694
|
+
if @api_client.config.debugging
|
695
|
+
@api_client.config.logger.debug "API called: DistributionsAptApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
696
|
+
end
|
697
|
+
return data, status_code, headers
|
698
|
+
end
|
699
|
+
|
424
700
|
# Set a label
|
425
701
|
# Set a single pulp_label on the object to a specific value or null.
|
426
702
|
# @param deb_apt_distribution_href [String]
|
@@ -19,6 +19,76 @@ module PulpDebClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Add a role
|
23
|
+
# Add a role for this object to users/groups.
|
24
|
+
# @param deb_apt_publication_href [String]
|
25
|
+
# @param nested_role [NestedRole]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [NestedRoleResponse]
|
28
|
+
def add_role(deb_apt_publication_href, nested_role, opts = {})
|
29
|
+
data, _status_code, _headers = add_role_with_http_info(deb_apt_publication_href, nested_role, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Add a role
|
34
|
+
# Add a role for this object to users/groups.
|
35
|
+
# @param deb_apt_publication_href [String]
|
36
|
+
# @param nested_role [NestedRole]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
39
|
+
def add_role_with_http_info(deb_apt_publication_href, nested_role, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: PublicationsAptApi.add_role ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'deb_apt_publication_href' is set
|
44
|
+
if @api_client.config.client_side_validation && deb_apt_publication_href.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'deb_apt_publication_href' when calling PublicationsAptApi.add_role"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'nested_role' is set
|
48
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling PublicationsAptApi.add_role"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '{deb_apt_publication_href}add_role/'.sub('{' + 'deb_apt_publication_href' + '}', CGI.escape(deb_apt_publication_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(nested_role)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
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: PublicationsAptApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
22
92
|
# Create an apt publication
|
23
93
|
# Trigger an asynchronous task to publish content
|
24
94
|
# @param deb_apt_publication [DebAptPublication]
|
@@ -260,6 +330,142 @@ module PulpDebClient
|
|
260
330
|
return data, status_code, headers
|
261
331
|
end
|
262
332
|
|
333
|
+
# List roles
|
334
|
+
# List roles assigned to this object.
|
335
|
+
# @param deb_apt_publication_href [String]
|
336
|
+
# @param [Hash] opts the optional parameters
|
337
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
338
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
339
|
+
# @return [ObjectRolesResponse]
|
340
|
+
def list_roles(deb_apt_publication_href, opts = {})
|
341
|
+
data, _status_code, _headers = list_roles_with_http_info(deb_apt_publication_href, opts)
|
342
|
+
data
|
343
|
+
end
|
344
|
+
|
345
|
+
# List roles
|
346
|
+
# List roles assigned to this object.
|
347
|
+
# @param deb_apt_publication_href [String]
|
348
|
+
# @param [Hash] opts the optional parameters
|
349
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
350
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
351
|
+
# @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
|
352
|
+
def list_roles_with_http_info(deb_apt_publication_href, opts = {})
|
353
|
+
if @api_client.config.debugging
|
354
|
+
@api_client.config.logger.debug 'Calling API: PublicationsAptApi.list_roles ...'
|
355
|
+
end
|
356
|
+
# verify the required parameter 'deb_apt_publication_href' is set
|
357
|
+
if @api_client.config.client_side_validation && deb_apt_publication_href.nil?
|
358
|
+
fail ArgumentError, "Missing the required parameter 'deb_apt_publication_href' when calling PublicationsAptApi.list_roles"
|
359
|
+
end
|
360
|
+
# resource path
|
361
|
+
local_var_path = '{deb_apt_publication_href}list_roles/'.sub('{' + 'deb_apt_publication_href' + '}', CGI.escape(deb_apt_publication_href.to_s).gsub('%2F', '/'))
|
362
|
+
|
363
|
+
# query parameters
|
364
|
+
query_params = opts[:query_params] || {}
|
365
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
366
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
367
|
+
|
368
|
+
# header parameters
|
369
|
+
header_params = opts[:header_params] || {}
|
370
|
+
# HTTP header 'Accept' (if needed)
|
371
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
372
|
+
|
373
|
+
# form parameters
|
374
|
+
form_params = opts[:form_params] || {}
|
375
|
+
|
376
|
+
# http body (model)
|
377
|
+
post_body = opts[:body]
|
378
|
+
|
379
|
+
# return_type
|
380
|
+
return_type = opts[:return_type] || 'ObjectRolesResponse'
|
381
|
+
|
382
|
+
# auth_names
|
383
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
384
|
+
|
385
|
+
new_options = opts.merge(
|
386
|
+
:header_params => header_params,
|
387
|
+
:query_params => query_params,
|
388
|
+
:form_params => form_params,
|
389
|
+
:body => post_body,
|
390
|
+
:auth_names => auth_names,
|
391
|
+
:return_type => return_type
|
392
|
+
)
|
393
|
+
|
394
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
395
|
+
if @api_client.config.debugging
|
396
|
+
@api_client.config.logger.debug "API called: PublicationsAptApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
397
|
+
end
|
398
|
+
return data, status_code, headers
|
399
|
+
end
|
400
|
+
|
401
|
+
# List user permissions
|
402
|
+
# List permissions available to the current user on this object.
|
403
|
+
# @param deb_apt_publication_href [String]
|
404
|
+
# @param [Hash] opts the optional parameters
|
405
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
406
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
407
|
+
# @return [MyPermissionsResponse]
|
408
|
+
def my_permissions(deb_apt_publication_href, opts = {})
|
409
|
+
data, _status_code, _headers = my_permissions_with_http_info(deb_apt_publication_href, opts)
|
410
|
+
data
|
411
|
+
end
|
412
|
+
|
413
|
+
# List user permissions
|
414
|
+
# List permissions available to the current user on this object.
|
415
|
+
# @param deb_apt_publication_href [String]
|
416
|
+
# @param [Hash] opts the optional parameters
|
417
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
418
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
419
|
+
# @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
|
420
|
+
def my_permissions_with_http_info(deb_apt_publication_href, opts = {})
|
421
|
+
if @api_client.config.debugging
|
422
|
+
@api_client.config.logger.debug 'Calling API: PublicationsAptApi.my_permissions ...'
|
423
|
+
end
|
424
|
+
# verify the required parameter 'deb_apt_publication_href' is set
|
425
|
+
if @api_client.config.client_side_validation && deb_apt_publication_href.nil?
|
426
|
+
fail ArgumentError, "Missing the required parameter 'deb_apt_publication_href' when calling PublicationsAptApi.my_permissions"
|
427
|
+
end
|
428
|
+
# resource path
|
429
|
+
local_var_path = '{deb_apt_publication_href}my_permissions/'.sub('{' + 'deb_apt_publication_href' + '}', CGI.escape(deb_apt_publication_href.to_s).gsub('%2F', '/'))
|
430
|
+
|
431
|
+
# query parameters
|
432
|
+
query_params = opts[:query_params] || {}
|
433
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
434
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
435
|
+
|
436
|
+
# header parameters
|
437
|
+
header_params = opts[:header_params] || {}
|
438
|
+
# HTTP header 'Accept' (if needed)
|
439
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
440
|
+
|
441
|
+
# form parameters
|
442
|
+
form_params = opts[:form_params] || {}
|
443
|
+
|
444
|
+
# http body (model)
|
445
|
+
post_body = opts[:body]
|
446
|
+
|
447
|
+
# return_type
|
448
|
+
return_type = opts[:return_type] || 'MyPermissionsResponse'
|
449
|
+
|
450
|
+
# auth_names
|
451
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
452
|
+
|
453
|
+
new_options = opts.merge(
|
454
|
+
:header_params => header_params,
|
455
|
+
:query_params => query_params,
|
456
|
+
:form_params => form_params,
|
457
|
+
:body => post_body,
|
458
|
+
:auth_names => auth_names,
|
459
|
+
:return_type => return_type
|
460
|
+
)
|
461
|
+
|
462
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
463
|
+
if @api_client.config.debugging
|
464
|
+
@api_client.config.logger.debug "API called: PublicationsAptApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
465
|
+
end
|
466
|
+
return data, status_code, headers
|
467
|
+
end
|
468
|
+
|
263
469
|
# Inspect an apt publication
|
264
470
|
# An AptPublication is the ready to serve Pulp-internal representation of an AptRepositoryVersion. When creating an APT publication, users must use simple or structured mode (or both). If the publication should include '.deb' packages that were manually uploaded to the relevant AptRepository, users must use 'simple=true'. Conversely, 'structured=true' is only useful for publishing content obtained via synchronization. Once a Pulp publication has been created, it can be served by creating a Pulp distribution (in a near atomic action).
|
265
471
|
# @param deb_apt_publication_href [String]
|
@@ -327,5 +533,75 @@ module PulpDebClient
|
|
327
533
|
end
|
328
534
|
return data, status_code, headers
|
329
535
|
end
|
536
|
+
|
537
|
+
# Remove a role
|
538
|
+
# Remove a role for this object from users/groups.
|
539
|
+
# @param deb_apt_publication_href [String]
|
540
|
+
# @param nested_role [NestedRole]
|
541
|
+
# @param [Hash] opts the optional parameters
|
542
|
+
# @return [NestedRoleResponse]
|
543
|
+
def remove_role(deb_apt_publication_href, nested_role, opts = {})
|
544
|
+
data, _status_code, _headers = remove_role_with_http_info(deb_apt_publication_href, nested_role, opts)
|
545
|
+
data
|
546
|
+
end
|
547
|
+
|
548
|
+
# Remove a role
|
549
|
+
# Remove a role for this object from users/groups.
|
550
|
+
# @param deb_apt_publication_href [String]
|
551
|
+
# @param nested_role [NestedRole]
|
552
|
+
# @param [Hash] opts the optional parameters
|
553
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
554
|
+
def remove_role_with_http_info(deb_apt_publication_href, nested_role, opts = {})
|
555
|
+
if @api_client.config.debugging
|
556
|
+
@api_client.config.logger.debug 'Calling API: PublicationsAptApi.remove_role ...'
|
557
|
+
end
|
558
|
+
# verify the required parameter 'deb_apt_publication_href' is set
|
559
|
+
if @api_client.config.client_side_validation && deb_apt_publication_href.nil?
|
560
|
+
fail ArgumentError, "Missing the required parameter 'deb_apt_publication_href' when calling PublicationsAptApi.remove_role"
|
561
|
+
end
|
562
|
+
# verify the required parameter 'nested_role' is set
|
563
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
564
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling PublicationsAptApi.remove_role"
|
565
|
+
end
|
566
|
+
# resource path
|
567
|
+
local_var_path = '{deb_apt_publication_href}remove_role/'.sub('{' + 'deb_apt_publication_href' + '}', CGI.escape(deb_apt_publication_href.to_s).gsub('%2F', '/'))
|
568
|
+
|
569
|
+
# query parameters
|
570
|
+
query_params = opts[:query_params] || {}
|
571
|
+
|
572
|
+
# header parameters
|
573
|
+
header_params = opts[:header_params] || {}
|
574
|
+
# HTTP header 'Accept' (if needed)
|
575
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
576
|
+
# HTTP header 'Content-Type'
|
577
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
578
|
+
|
579
|
+
# form parameters
|
580
|
+
form_params = opts[:form_params] || {}
|
581
|
+
|
582
|
+
# http body (model)
|
583
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
584
|
+
|
585
|
+
# return_type
|
586
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
587
|
+
|
588
|
+
# auth_names
|
589
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
590
|
+
|
591
|
+
new_options = opts.merge(
|
592
|
+
:header_params => header_params,
|
593
|
+
:query_params => query_params,
|
594
|
+
:form_params => form_params,
|
595
|
+
:body => post_body,
|
596
|
+
:auth_names => auth_names,
|
597
|
+
:return_type => return_type
|
598
|
+
)
|
599
|
+
|
600
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
601
|
+
if @api_client.config.debugging
|
602
|
+
@api_client.config.logger.debug "API called: PublicationsAptApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
603
|
+
end
|
604
|
+
return data, status_code, headers
|
605
|
+
end
|
330
606
|
end
|
331
607
|
end
|