pulpcore_client 3.5.0 → 3.6.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 +88 -44
- data/docs/AccessPoliciesApi.md +244 -0
- data/docs/AccessPolicy.md +21 -0
- data/docs/AccessPolicyResponse.md +25 -0
- data/docs/Artifact.md +2 -6
- data/docs/ArtifactResponse.md +35 -0
- data/docs/ArtifactsApi.md +40 -34
- data/docs/{ContentAppStatus.md → ContentAppStatusResponse.md} +2 -2
- data/docs/{DatabaseConnection.md → DatabaseConnectionResponse.md} +2 -2
- data/docs/ExportersCoreExportsApi.md +33 -33
- data/docs/ExportersPulpApi.md +51 -51
- data/docs/Group.md +17 -0
- data/docs/{GroupProgressReport.md → GroupProgressReportResponse.md} +2 -2
- data/docs/GroupResponse.md +21 -0
- data/docs/GroupUser.md +17 -0
- data/docs/GroupUserResponse.md +19 -0
- data/docs/GroupsApi.md +351 -0
- data/docs/GroupsModelPermissionsApi.md +128 -0
- data/docs/GroupsObjectPermissionsApi.md +247 -0
- data/docs/GroupsUsersApi.md +183 -0
- data/docs/{Import.md → ImportResponse.md} +2 -2
- data/docs/ImportersCoreImportsApi.md +33 -33
- data/docs/ImportersPulpApi.md +51 -51
- data/docs/InlineResponse200.md +3 -3
- data/docs/InlineResponse2001.md +3 -3
- data/docs/InlineResponse20010.md +23 -0
- data/docs/InlineResponse20011.md +23 -0
- data/docs/InlineResponse20012.md +23 -0
- data/docs/InlineResponse20013.md +23 -0
- data/docs/InlineResponse20014.md +23 -0
- data/docs/InlineResponse2002.md +3 -3
- data/docs/InlineResponse2003.md +3 -3
- data/docs/InlineResponse2004.md +3 -3
- data/docs/InlineResponse2005.md +3 -3
- data/docs/InlineResponse2006.md +3 -3
- data/docs/InlineResponse2007.md +3 -3
- data/docs/InlineResponse2008.md +3 -3
- data/docs/InlineResponse2009.md +3 -3
- data/docs/OrphansApi.md +2 -2
- data/docs/PatchedAccessPolicy.md +21 -0
- data/docs/PatchedGroup.md +17 -0
- data/docs/PatchedPulpExporter.md +23 -0
- data/docs/PatchedPulpImporter.md +19 -0
- data/docs/{TaskCancel.md → PatchedTaskCancel.md} +3 -3
- data/docs/PermissionResponse.md +23 -0
- data/docs/{ProgressReport.md → ProgressReportResponse.md} +2 -2
- data/docs/PulpExport.md +11 -11
- data/docs/PulpExportResponse.md +27 -0
- data/docs/PulpExporter.md +1 -5
- data/docs/PulpExporterResponse.md +27 -0
- data/docs/PulpImport.md +4 -2
- data/docs/PulpImporter.md +2 -6
- data/docs/PulpImporterResponse.md +23 -0
- data/docs/{RedisConnection.md → RedisConnectionResponse.md} +2 -2
- data/docs/{SigningService.md → SigningServiceResponse.md} +2 -2
- data/docs/SigningServicesApi.md +14 -14
- data/docs/StatusApi.md +8 -22
- data/docs/StatusResponse.md +27 -0
- data/docs/{Storage.md → StorageResponse.md} +2 -2
- data/docs/{TaskGroup.md → TaskGroupResponse.md} +3 -3
- data/docs/TaskGroupsApi.md +16 -12
- data/docs/{Task.md → TaskResponse.md} +5 -7
- data/docs/TasksApi.md +144 -88
- data/docs/Upload.md +1 -7
- data/docs/UploadChunk.md +2 -6
- data/docs/UploadChunkResponse.md +19 -0
- data/docs/{UploadDetail.md → UploadDetailResponse.md} +3 -3
- data/docs/UploadResponse.md +23 -0
- data/docs/UploadsApi.md +42 -40
- data/docs/UserGroupResponse.md +19 -0
- data/docs/UserResponse.md +35 -0
- data/docs/UsersApi.md +191 -0
- data/docs/{Version.md → VersionResponse.md} +2 -2
- data/docs/{Worker.md → WorkerResponse.md} +2 -2
- data/docs/WorkersApi.md +36 -32
- data/lib/pulpcore_client/api/access_policies_api.rb +301 -0
- data/lib/pulpcore_client/api/artifacts_api.rb +47 -65
- data/lib/pulpcore_client/api/exporters_core_exports_api.rb +51 -51
- data/lib/pulpcore_client/api/exporters_pulp_api.rb +71 -71
- data/lib/pulpcore_client/api/groups_api.rb +425 -0
- data/lib/pulpcore_client/api/groups_model_permissions_api.rb +161 -0
- data/lib/pulpcore_client/api/groups_object_permissions_api.rb +295 -0
- data/lib/pulpcore_client/api/groups_users_api.rb +229 -0
- data/lib/pulpcore_client/api/importers_core_imports_api.rb +51 -51
- data/lib/pulpcore_client/api/importers_pulp_api.rb +71 -71
- data/lib/pulpcore_client/api/orphans_api.rb +3 -3
- data/lib/pulpcore_client/api/signing_services_api.rb +18 -18
- data/lib/pulpcore_client/api/status_api.rb +11 -17
- data/lib/pulpcore_client/api/task_groups_api.rb +19 -15
- data/lib/pulpcore_client/api/tasks_api.rb +203 -125
- data/lib/pulpcore_client/api/uploads_api.rb +60 -66
- data/lib/pulpcore_client/api/users_api.rb +227 -0
- data/lib/pulpcore_client/api/workers_api.rb +46 -42
- data/lib/pulpcore_client/api_client.rb +2 -2
- data/lib/pulpcore_client/api_error.rb +2 -2
- data/lib/pulpcore_client/configuration.rb +3 -3
- data/lib/pulpcore_client/models/access_policy.rb +247 -0
- data/lib/pulpcore_client/models/access_policy_response.rb +266 -0
- data/lib/pulpcore_client/models/artifact.rb +8 -111
- data/lib/pulpcore_client/models/artifact_response.rb +308 -0
- data/lib/pulpcore_client/models/async_operation_response.rb +3 -2
- data/lib/pulpcore_client/models/{content_app_status.rb → content_app_status_response.rb} +6 -21
- data/lib/pulpcore_client/models/{database_connection.rb → database_connection_response.rb} +6 -6
- data/lib/pulpcore_client/models/group.rb +232 -0
- data/lib/pulpcore_client/models/{group_progress_report.rb → group_progress_report_response.rb} +6 -50
- data/lib/pulpcore_client/models/group_response.rb +250 -0
- data/lib/pulpcore_client/models/group_user.rb +232 -0
- data/lib/pulpcore_client/models/group_user_response.rb +241 -0
- data/lib/pulpcore_client/models/{import.rb → import_response.rb} +6 -5
- data/lib/pulpcore_client/models/inline_response200.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2001.rb +3 -13
- data/lib/pulpcore_client/models/inline_response20010.rb +237 -0
- data/lib/pulpcore_client/models/inline_response20011.rb +237 -0
- data/lib/pulpcore_client/models/inline_response20012.rb +237 -0
- data/lib/pulpcore_client/models/inline_response20013.rb +237 -0
- data/lib/pulpcore_client/models/inline_response20014.rb +237 -0
- data/lib/pulpcore_client/models/inline_response2002.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2003.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2004.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2005.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2006.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2007.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2008.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2009.rb +3 -13
- data/lib/pulpcore_client/models/patched_access_policy.rb +232 -0
- data/lib/pulpcore_client/models/patched_group.rb +223 -0
- data/lib/pulpcore_client/models/patched_pulp_exporter.rb +240 -0
- data/lib/pulpcore_client/models/patched_pulp_importer.rb +218 -0
- data/lib/pulpcore_client/models/{task_cancel.rb → patched_task_cancel.rb} +6 -29
- data/lib/pulpcore_client/models/permission_response.rb +235 -0
- data/lib/pulpcore_client/models/{progress_report.rb → progress_report_response.rb} +6 -65
- data/lib/pulpcore_client/models/pulp_export.rb +50 -42
- data/lib/pulpcore_client/models/pulp_export_response.rb +260 -0
- data/lib/pulpcore_client/models/pulp_exporter.rb +4 -60
- data/lib/pulpcore_client/models/pulp_exporter_response.rb +274 -0
- data/lib/pulpcore_client/models/pulp_import.rb +17 -30
- data/lib/pulpcore_client/models/pulp_importer.rb +6 -45
- data/lib/pulpcore_client/models/pulp_importer_response.rb +242 -0
- data/lib/pulpcore_client/models/{redis_connection.rb → redis_connection_response.rb} +6 -6
- data/lib/pulpcore_client/models/{signing_service.rb → signing_service_response.rb} +6 -43
- data/lib/pulpcore_client/models/{status.rb → status_response.rb} +15 -11
- data/lib/pulpcore_client/models/{storage.rb → storage_response.rb} +6 -6
- data/lib/pulpcore_client/models/{task_group.rb → task_group_response.rb} +7 -25
- data/lib/pulpcore_client/models/{task.rb → task_response.rb} +13 -59
- data/lib/pulpcore_client/models/upload.rb +7 -35
- data/lib/pulpcore_client/models/upload_chunk.rb +11 -39
- data/lib/pulpcore_client/models/upload_chunk_response.rb +215 -0
- data/lib/pulpcore_client/models/upload_commit.rb +2 -21
- data/lib/pulpcore_client/models/{upload_detail.rb → upload_detail_response.rb} +7 -6
- data/lib/pulpcore_client/models/upload_response.rb +242 -0
- data/lib/pulpcore_client/models/user_group_response.rb +241 -0
- data/lib/pulpcore_client/models/user_response.rb +378 -0
- data/lib/pulpcore_client/models/{version.rb → version_response.rb} +6 -44
- data/lib/pulpcore_client/models/{worker.rb → worker_response.rb} +6 -21
- data/lib/pulpcore_client/version.rb +3 -3
- data/lib/pulpcore_client.rb +47 -17
- data/pulpcore_client.gemspec +4 -4
- data/spec/api/access_policies_api_spec.rb +91 -0
- data/spec/api/artifacts_api_spec.rb +18 -15
- data/spec/api/exporters_core_exports_api_spec.rb +10 -10
- data/spec/api/exporters_pulp_api_spec.rb +18 -18
- data/spec/api/groups_api_spec.rb +115 -0
- data/spec/api/groups_model_permissions_api_spec.rb +64 -0
- data/spec/api/groups_object_permissions_api_spec.rb +92 -0
- data/spec/api/groups_users_api_spec.rb +77 -0
- data/spec/api/importers_core_imports_api_spec.rb +10 -10
- data/spec/api/importers_pulp_api_spec.rb +18 -18
- data/spec/api/orphans_api_spec.rb +2 -2
- data/spec/api/signing_services_api_spec.rb +7 -7
- data/spec/api/status_api_spec.rb +5 -7
- data/spec/api/task_groups_api_spec.rb +8 -6
- data/spec/api/tasks_api_spec.rb +69 -42
- data/spec/api/uploads_api_spec.rb +14 -13
- data/spec/api/users_api_spec.rb +78 -0
- data/spec/api/workers_api_spec.rb +18 -16
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/access_policy_response_spec.rb +65 -0
- data/spec/models/access_policy_spec.rb +53 -0
- data/spec/models/artifact_response_spec.rb +95 -0
- data/spec/models/artifact_spec.rb +2 -14
- data/spec/models/async_operation_response_spec.rb +2 -2
- data/spec/models/{content_app_status_spec.rb → content_app_status_response_spec.rb} +8 -8
- data/spec/models/{database_connection_spec.rb → database_connection_response_spec.rb} +8 -8
- data/spec/models/{group_progress_report_spec.rb → group_progress_report_response_spec.rb} +8 -8
- data/spec/models/group_response_spec.rb +53 -0
- data/spec/models/group_spec.rb +41 -0
- data/spec/models/group_user_response_spec.rb +47 -0
- data/spec/models/group_user_spec.rb +41 -0
- data/spec/models/{import_spec.rb → import_response_spec.rb} +8 -8
- data/spec/models/inline_response20010_spec.rb +59 -0
- data/spec/models/inline_response20011_spec.rb +59 -0
- data/spec/models/inline_response20012_spec.rb +59 -0
- data/spec/models/inline_response20013_spec.rb +59 -0
- data/spec/models/inline_response20014_spec.rb +59 -0
- data/spec/models/inline_response2001_spec.rb +2 -2
- data/spec/models/inline_response2002_spec.rb +2 -2
- data/spec/models/inline_response2003_spec.rb +2 -2
- data/spec/models/inline_response2004_spec.rb +2 -2
- data/spec/models/inline_response2005_spec.rb +2 -2
- data/spec/models/inline_response2006_spec.rb +2 -2
- data/spec/models/inline_response2007_spec.rb +2 -2
- data/spec/models/inline_response2008_spec.rb +2 -2
- data/spec/models/inline_response2009_spec.rb +2 -2
- data/spec/models/inline_response200_spec.rb +2 -2
- data/spec/models/patched_access_policy_spec.rb +53 -0
- data/spec/models/patched_group_spec.rb +41 -0
- data/spec/models/patched_pulp_exporter_spec.rb +59 -0
- data/spec/models/patched_pulp_importer_spec.rb +47 -0
- data/spec/models/{task_cancel_spec.rb → patched_task_cancel_spec.rb} +8 -8
- data/spec/models/permission_response_spec.rb +59 -0
- data/spec/models/{progress_report_spec.rb → progress_report_response_spec.rb} +8 -8
- data/spec/models/pulp_export_response_spec.rb +71 -0
- data/spec/models/pulp_export_spec.rb +8 -8
- data/spec/models/pulp_exporter_response_spec.rb +71 -0
- data/spec/models/pulp_exporter_spec.rb +2 -14
- data/spec/models/pulp_import_spec.rb +8 -2
- data/spec/models/pulp_importer_response_spec.rb +59 -0
- data/spec/models/pulp_importer_spec.rb +2 -14
- data/spec/models/{redis_connection_spec.rb → redis_connection_response_spec.rb} +8 -8
- data/spec/models/{signing_service_spec.rb → signing_service_response_spec.rb} +8 -8
- data/spec/models/{status_spec.rb → status_response_spec.rb} +8 -8
- data/spec/models/{storage_spec.rb → storage_response_spec.rb} +8 -8
- data/spec/models/{task_group_spec.rb → task_group_response_spec.rb} +8 -8
- data/spec/models/{task_spec.rb → task_response_spec.rb} +8 -14
- data/spec/models/upload_chunk_response_spec.rb +47 -0
- data/spec/models/upload_chunk_spec.rb +2 -14
- data/spec/models/upload_commit_spec.rb +2 -2
- data/spec/models/{upload_detail_spec.rb → upload_detail_response_spec.rb} +8 -8
- data/spec/models/upload_response_spec.rb +59 -0
- data/spec/models/upload_spec.rb +2 -20
- data/spec/models/user_group_response_spec.rb +47 -0
- data/spec/models/user_response_spec.rb +95 -0
- data/spec/models/{version_spec.rb → version_response_spec.rb} +8 -8
- data/spec/models/{worker_spec.rb → worker_response_spec.rb} +8 -8
- data/spec/spec_helper.rb +2 -2
- metadata +204 -84
- data/docs/Status.md +0 -27
@@ -0,0 +1,295 @@
|
|
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.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpcoreClient
|
16
|
+
class GroupsObjectPermissionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a permission
|
23
|
+
# Add an object permission to a group.
|
24
|
+
# @param auth_auth_groups_permission_href [String]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [PermissionResponse]
|
27
|
+
def create(auth_auth_groups_permission_href, opts = {})
|
28
|
+
data, _status_code, _headers = create_with_http_info(auth_auth_groups_permission_href, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a permission
|
33
|
+
# Add an object permission to a group.
|
34
|
+
# @param auth_auth_groups_permission_href [String]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(PermissionResponse, Integer, Hash)>] PermissionResponse data, response status code and response headers
|
37
|
+
def create_with_http_info(auth_auth_groups_permission_href, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: GroupsObjectPermissionsApi.create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'auth_auth_groups_permission_href' is set
|
42
|
+
if @api_client.config.client_side_validation && auth_auth_groups_permission_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'auth_auth_groups_permission_href' when calling GroupsObjectPermissionsApi.create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '{auth_auth_groups_permission_href}object_permissions/'.sub('{' + 'auth_auth_groups_permission_href' + '}', CGI.escape(auth_auth_groups_permission_href.to_s).gsub('%2F', '/'))
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:return_type] || 'PermissionResponse'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: GroupsObjectPermissionsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# Delete a permission
|
85
|
+
# Remove an object permission from a group.
|
86
|
+
# @param auth_auth_groups_permission_href [String]
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
89
|
+
# @return [nil]
|
90
|
+
def delete(auth_auth_groups_permission_href, opts = {})
|
91
|
+
delete_with_http_info(auth_auth_groups_permission_href, opts)
|
92
|
+
nil
|
93
|
+
end
|
94
|
+
|
95
|
+
# Delete a permission
|
96
|
+
# Remove an object permission from a group.
|
97
|
+
# @param auth_auth_groups_permission_href [String]
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
100
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
101
|
+
def delete_with_http_info(auth_auth_groups_permission_href, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: GroupsObjectPermissionsApi.delete ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'auth_auth_groups_permission_href' is set
|
106
|
+
if @api_client.config.client_side_validation && auth_auth_groups_permission_href.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'auth_auth_groups_permission_href' when calling GroupsObjectPermissionsApi.delete"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '{auth_auth_groups_permission_href}'.sub('{' + 'auth_auth_groups_permission_href' + '}', CGI.escape(auth_auth_groups_permission_href.to_s).gsub('%2F', '/'))
|
111
|
+
|
112
|
+
# query parameters
|
113
|
+
query_params = opts[:query_params] || {}
|
114
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
115
|
+
|
116
|
+
# header parameters
|
117
|
+
header_params = opts[:header_params] || {}
|
118
|
+
|
119
|
+
# form parameters
|
120
|
+
form_params = opts[:form_params] || {}
|
121
|
+
|
122
|
+
# http body (model)
|
123
|
+
post_body = opts[:body]
|
124
|
+
|
125
|
+
# return_type
|
126
|
+
return_type = opts[:return_type]
|
127
|
+
|
128
|
+
# auth_names
|
129
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
130
|
+
|
131
|
+
new_options = opts.merge(
|
132
|
+
:header_params => header_params,
|
133
|
+
:query_params => query_params,
|
134
|
+
:form_params => form_params,
|
135
|
+
:body => post_body,
|
136
|
+
:auth_names => auth_names,
|
137
|
+
:return_type => return_type
|
138
|
+
)
|
139
|
+
|
140
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
141
|
+
if @api_client.config.debugging
|
142
|
+
@api_client.config.logger.debug "API called: GroupsObjectPermissionsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
143
|
+
end
|
144
|
+
return data, status_code, headers
|
145
|
+
end
|
146
|
+
|
147
|
+
# List permissions
|
148
|
+
# List group object permissions.
|
149
|
+
# @param auth_group_href [String]
|
150
|
+
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
152
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
153
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
154
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
155
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
156
|
+
# @return [InlineResponse2005]
|
157
|
+
def list(auth_group_href, opts = {})
|
158
|
+
data, _status_code, _headers = list_with_http_info(auth_group_href, opts)
|
159
|
+
data
|
160
|
+
end
|
161
|
+
|
162
|
+
# List permissions
|
163
|
+
# List group object permissions.
|
164
|
+
# @param auth_group_href [String]
|
165
|
+
# @param [Hash] opts the optional parameters
|
166
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
167
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
168
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
169
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
170
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
171
|
+
# @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
|
172
|
+
def list_with_http_info(auth_group_href, opts = {})
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug 'Calling API: GroupsObjectPermissionsApi.list ...'
|
175
|
+
end
|
176
|
+
# verify the required parameter 'auth_group_href' is set
|
177
|
+
if @api_client.config.client_side_validation && auth_group_href.nil?
|
178
|
+
fail ArgumentError, "Missing the required parameter 'auth_group_href' when calling GroupsObjectPermissionsApi.list"
|
179
|
+
end
|
180
|
+
# resource path
|
181
|
+
local_var_path = '{auth_group_href}object_permissions/'.sub('{' + 'auth_group_href' + '}', CGI.escape(auth_group_href.to_s).gsub('%2F', '/'))
|
182
|
+
|
183
|
+
# query parameters
|
184
|
+
query_params = opts[:query_params] || {}
|
185
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
186
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
187
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
188
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
189
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
190
|
+
|
191
|
+
# header parameters
|
192
|
+
header_params = opts[:header_params] || {}
|
193
|
+
# HTTP header 'Accept' (if needed)
|
194
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
195
|
+
|
196
|
+
# form parameters
|
197
|
+
form_params = opts[:form_params] || {}
|
198
|
+
|
199
|
+
# http body (model)
|
200
|
+
post_body = opts[:body]
|
201
|
+
|
202
|
+
# return_type
|
203
|
+
return_type = opts[:return_type] || 'InlineResponse2005'
|
204
|
+
|
205
|
+
# auth_names
|
206
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
207
|
+
|
208
|
+
new_options = opts.merge(
|
209
|
+
:header_params => header_params,
|
210
|
+
:query_params => query_params,
|
211
|
+
:form_params => form_params,
|
212
|
+
:body => post_body,
|
213
|
+
:auth_names => auth_names,
|
214
|
+
:return_type => return_type
|
215
|
+
)
|
216
|
+
|
217
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
218
|
+
if @api_client.config.debugging
|
219
|
+
@api_client.config.logger.debug "API called: GroupsObjectPermissionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
220
|
+
end
|
221
|
+
return data, status_code, headers
|
222
|
+
end
|
223
|
+
|
224
|
+
# Inspect a permission
|
225
|
+
# Retrieve a model permission from a group.
|
226
|
+
# @param auth_auth_groups_permission_href [String]
|
227
|
+
# @param [Hash] opts the optional parameters
|
228
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
229
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
230
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
231
|
+
# @return [PermissionResponse]
|
232
|
+
def read(auth_auth_groups_permission_href, opts = {})
|
233
|
+
data, _status_code, _headers = read_with_http_info(auth_auth_groups_permission_href, opts)
|
234
|
+
data
|
235
|
+
end
|
236
|
+
|
237
|
+
# Inspect a permission
|
238
|
+
# Retrieve a model permission from a group.
|
239
|
+
# @param auth_auth_groups_permission_href [String]
|
240
|
+
# @param [Hash] opts the optional parameters
|
241
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
242
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
243
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
244
|
+
# @return [Array<(PermissionResponse, Integer, Hash)>] PermissionResponse data, response status code and response headers
|
245
|
+
def read_with_http_info(auth_auth_groups_permission_href, opts = {})
|
246
|
+
if @api_client.config.debugging
|
247
|
+
@api_client.config.logger.debug 'Calling API: GroupsObjectPermissionsApi.read ...'
|
248
|
+
end
|
249
|
+
# verify the required parameter 'auth_auth_groups_permission_href' is set
|
250
|
+
if @api_client.config.client_side_validation && auth_auth_groups_permission_href.nil?
|
251
|
+
fail ArgumentError, "Missing the required parameter 'auth_auth_groups_permission_href' when calling GroupsObjectPermissionsApi.read"
|
252
|
+
end
|
253
|
+
# resource path
|
254
|
+
local_var_path = '{auth_auth_groups_permission_href}'.sub('{' + 'auth_auth_groups_permission_href' + '}', CGI.escape(auth_auth_groups_permission_href.to_s).gsub('%2F', '/'))
|
255
|
+
|
256
|
+
# query parameters
|
257
|
+
query_params = opts[:query_params] || {}
|
258
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
259
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
260
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
261
|
+
|
262
|
+
# header parameters
|
263
|
+
header_params = opts[:header_params] || {}
|
264
|
+
# HTTP header 'Accept' (if needed)
|
265
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
266
|
+
|
267
|
+
# form parameters
|
268
|
+
form_params = opts[:form_params] || {}
|
269
|
+
|
270
|
+
# http body (model)
|
271
|
+
post_body = opts[:body]
|
272
|
+
|
273
|
+
# return_type
|
274
|
+
return_type = opts[:return_type] || 'PermissionResponse'
|
275
|
+
|
276
|
+
# auth_names
|
277
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
278
|
+
|
279
|
+
new_options = opts.merge(
|
280
|
+
:header_params => header_params,
|
281
|
+
:query_params => query_params,
|
282
|
+
:form_params => form_params,
|
283
|
+
:body => post_body,
|
284
|
+
:auth_names => auth_names,
|
285
|
+
:return_type => return_type
|
286
|
+
)
|
287
|
+
|
288
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
289
|
+
if @api_client.config.debugging
|
290
|
+
@api_client.config.logger.debug "API called: GroupsObjectPermissionsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
291
|
+
end
|
292
|
+
return data, status_code, headers
|
293
|
+
end
|
294
|
+
end
|
295
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpcoreClient
|
16
|
+
class GroupsUsersApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create an user
|
23
|
+
# Add a user to a group.
|
24
|
+
# @param auth_auth_groups_user_href [String]
|
25
|
+
# @param group_user [GroupUser]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [GroupUserResponse]
|
28
|
+
def create(auth_auth_groups_user_href, group_user, opts = {})
|
29
|
+
data, _status_code, _headers = create_with_http_info(auth_auth_groups_user_href, group_user, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create an user
|
34
|
+
# Add a user to a group.
|
35
|
+
# @param auth_auth_groups_user_href [String]
|
36
|
+
# @param group_user [GroupUser]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(GroupUserResponse, Integer, Hash)>] GroupUserResponse data, response status code and response headers
|
39
|
+
def create_with_http_info(auth_auth_groups_user_href, group_user, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: GroupsUsersApi.create ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'auth_auth_groups_user_href' is set
|
44
|
+
if @api_client.config.client_side_validation && auth_auth_groups_user_href.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'auth_auth_groups_user_href' when calling GroupsUsersApi.create"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'group_user' is set
|
48
|
+
if @api_client.config.client_side_validation && group_user.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'group_user' when calling GroupsUsersApi.create"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '{auth_auth_groups_user_href}users/'.sub('{' + 'auth_auth_groups_user_href' + '}', CGI.escape(auth_auth_groups_user_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(group_user)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:return_type] || 'GroupUserResponse'
|
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: GroupsUsersApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Delete an user
|
93
|
+
# Remove a user from a group.
|
94
|
+
# @param auth_auth_groups_user_href [String]
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [nil]
|
97
|
+
def delete(auth_auth_groups_user_href, opts = {})
|
98
|
+
delete_with_http_info(auth_auth_groups_user_href, opts)
|
99
|
+
nil
|
100
|
+
end
|
101
|
+
|
102
|
+
# Delete an user
|
103
|
+
# Remove a user from a group.
|
104
|
+
# @param auth_auth_groups_user_href [String]
|
105
|
+
# @param [Hash] opts the optional parameters
|
106
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
107
|
+
def delete_with_http_info(auth_auth_groups_user_href, opts = {})
|
108
|
+
if @api_client.config.debugging
|
109
|
+
@api_client.config.logger.debug 'Calling API: GroupsUsersApi.delete ...'
|
110
|
+
end
|
111
|
+
# verify the required parameter 'auth_auth_groups_user_href' is set
|
112
|
+
if @api_client.config.client_side_validation && auth_auth_groups_user_href.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'auth_auth_groups_user_href' when calling GroupsUsersApi.delete"
|
114
|
+
end
|
115
|
+
# resource path
|
116
|
+
local_var_path = '{auth_auth_groups_user_href}'.sub('{' + 'auth_auth_groups_user_href' + '}', CGI.escape(auth_auth_groups_user_href.to_s).gsub('%2F', '/'))
|
117
|
+
|
118
|
+
# query parameters
|
119
|
+
query_params = opts[:query_params] || {}
|
120
|
+
|
121
|
+
# header parameters
|
122
|
+
header_params = opts[:header_params] || {}
|
123
|
+
|
124
|
+
# form parameters
|
125
|
+
form_params = opts[:form_params] || {}
|
126
|
+
|
127
|
+
# http body (model)
|
128
|
+
post_body = opts[:body]
|
129
|
+
|
130
|
+
# return_type
|
131
|
+
return_type = opts[:return_type]
|
132
|
+
|
133
|
+
# auth_names
|
134
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
135
|
+
|
136
|
+
new_options = opts.merge(
|
137
|
+
:header_params => header_params,
|
138
|
+
:query_params => query_params,
|
139
|
+
:form_params => form_params,
|
140
|
+
:body => post_body,
|
141
|
+
:auth_names => auth_names,
|
142
|
+
:return_type => return_type
|
143
|
+
)
|
144
|
+
|
145
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: GroupsUsersApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
148
|
+
end
|
149
|
+
return data, status_code, headers
|
150
|
+
end
|
151
|
+
|
152
|
+
# List users
|
153
|
+
# List group users.
|
154
|
+
# @param auth_group_href [String]
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
157
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
158
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
159
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
160
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
161
|
+
# @return [InlineResponse2006]
|
162
|
+
def list(auth_group_href, opts = {})
|
163
|
+
data, _status_code, _headers = list_with_http_info(auth_group_href, opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# List users
|
168
|
+
# List group users.
|
169
|
+
# @param auth_group_href [String]
|
170
|
+
# @param [Hash] opts the optional parameters
|
171
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
172
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
173
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
174
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
175
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
176
|
+
# @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
|
177
|
+
def list_with_http_info(auth_group_href, opts = {})
|
178
|
+
if @api_client.config.debugging
|
179
|
+
@api_client.config.logger.debug 'Calling API: GroupsUsersApi.list ...'
|
180
|
+
end
|
181
|
+
# verify the required parameter 'auth_group_href' is set
|
182
|
+
if @api_client.config.client_side_validation && auth_group_href.nil?
|
183
|
+
fail ArgumentError, "Missing the required parameter 'auth_group_href' when calling GroupsUsersApi.list"
|
184
|
+
end
|
185
|
+
# resource path
|
186
|
+
local_var_path = '{auth_group_href}users/'.sub('{' + 'auth_group_href' + '}', CGI.escape(auth_group_href.to_s).gsub('%2F', '/'))
|
187
|
+
|
188
|
+
# query parameters
|
189
|
+
query_params = opts[:query_params] || {}
|
190
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
191
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
192
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
193
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
194
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
195
|
+
|
196
|
+
# header parameters
|
197
|
+
header_params = opts[:header_params] || {}
|
198
|
+
# HTTP header 'Accept' (if needed)
|
199
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
200
|
+
|
201
|
+
# form parameters
|
202
|
+
form_params = opts[:form_params] || {}
|
203
|
+
|
204
|
+
# http body (model)
|
205
|
+
post_body = opts[:body]
|
206
|
+
|
207
|
+
# return_type
|
208
|
+
return_type = opts[:return_type] || 'InlineResponse2006'
|
209
|
+
|
210
|
+
# auth_names
|
211
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
212
|
+
|
213
|
+
new_options = opts.merge(
|
214
|
+
:header_params => header_params,
|
215
|
+
:query_params => query_params,
|
216
|
+
:form_params => form_params,
|
217
|
+
:body => post_body,
|
218
|
+
:auth_names => auth_names,
|
219
|
+
:return_type => return_type
|
220
|
+
)
|
221
|
+
|
222
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
223
|
+
if @api_client.config.debugging
|
224
|
+
@api_client.config.logger.debug "API called: GroupsUsersApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
225
|
+
end
|
226
|
+
return data, status_code, headers
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|