pulpcore_client 3.16.24 → 3.17.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 +70 -22
- data/docs/AccessPoliciesApi.md +53 -0
- data/docs/AccessPolicy.md +3 -1
- data/docs/AccessPolicyResponse.md +3 -1
- data/docs/ContentguardsRbacApi.md +138 -22
- data/docs/GroupRole.md +19 -0
- data/docs/GroupRoleResponse.md +23 -0
- data/docs/GroupsApi.md +248 -20
- data/docs/GroupsModelPermissionsApi.md +20 -20
- data/docs/GroupsObjectPermissionsApi.md +20 -20
- data/docs/GroupsRolesApi.md +255 -0
- data/docs/GroupsUsersApi.md +15 -15
- 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/PaginatedGroupRoleResponseList.md +23 -0
- data/docs/PaginatedRoleResponseList.md +23 -0
- data/docs/PaginatedUserRoleResponseList.md +23 -0
- data/docs/PatchedAccessPolicy.md +3 -1
- data/docs/PatchedRole.md +21 -0
- data/docs/PatchedUser.md +29 -0
- data/docs/PermissionResponse.md +1 -1
- data/docs/Purge.md +19 -0
- data/docs/Role.md +21 -0
- data/docs/RoleResponse.md +27 -0
- data/docs/RolesApi.md +363 -0
- data/docs/StatesEnum.md +16 -0
- data/docs/TasksApi.md +282 -0
- data/docs/User.md +29 -0
- data/docs/UserGroup.md +17 -0
- data/docs/UserResponse.md +3 -3
- data/docs/UserRole.md +19 -0
- data/docs/UserRoleResponse.md +23 -0
- data/docs/UsersApi.md +219 -0
- data/docs/UsersRolesApi.md +255 -0
- data/docs/WorkerResponse.md +3 -3
- data/git_push.sh +58 -0
- data/lib/pulpcore_client/api/access_policies_api.rb +60 -0
- data/lib/pulpcore_client/api/artifacts_api.rb +24 -0
- data/lib/pulpcore_client/api/contentguards_rbac_api.rb +168 -40
- data/lib/pulpcore_client/api/groups_api.rb +304 -36
- data/lib/pulpcore_client/api/groups_model_permissions_api.rb +36 -36
- data/lib/pulpcore_client/api/groups_object_permissions_api.rb +36 -36
- data/lib/pulpcore_client/api/groups_roles_api.rb +315 -0
- data/lib/pulpcore_client/api/groups_users_api.rb +27 -27
- data/lib/pulpcore_client/api/roles_api.rb +443 -0
- data/lib/pulpcore_client/api/tasks_api.rb +332 -0
- data/lib/pulpcore_client/api/uploads_api.rb +4 -0
- data/lib/pulpcore_client/api/users_api.rb +264 -0
- data/lib/pulpcore_client/api/users_roles_api.rb +315 -0
- data/lib/pulpcore_client/api_client.rb +5 -2
- data/lib/pulpcore_client/configuration.rb +0 -1
- data/lib/pulpcore_client/models/access_policy.rb +19 -2
- data/lib/pulpcore_client/models/access_policy_response.rb +19 -2
- data/lib/pulpcore_client/models/artifact.rb +90 -0
- data/lib/pulpcore_client/models/filesystem_exporter.rb +38 -0
- data/lib/pulpcore_client/models/group.rb +9 -0
- data/lib/pulpcore_client/models/group_role.rb +238 -0
- data/lib/pulpcore_client/models/group_role_response.rb +242 -0
- data/lib/pulpcore_client/models/group_user.rb +9 -0
- data/lib/pulpcore_client/models/{rbac_content_guard_permission.rb → my_permissions_response.rb} +16 -22
- data/lib/pulpcore_client/models/nested_role.rb +234 -0
- data/lib/pulpcore_client/models/nested_role_response.rb +234 -0
- data/lib/pulpcore_client/models/object_roles_response.rb +213 -0
- data/lib/pulpcore_client/models/paginated_group_role_response_list.rb +237 -0
- data/lib/pulpcore_client/models/paginated_role_response_list.rb +237 -0
- data/lib/pulpcore_client/models/paginated_user_role_response_list.rb +237 -0
- data/lib/pulpcore_client/models/patched_access_policy.rb +14 -2
- data/lib/pulpcore_client/models/patched_filesystem_exporter.rb +30 -0
- data/lib/pulpcore_client/models/patched_group.rb +9 -0
- data/lib/pulpcore_client/models/patched_pulp_exporter.rb +30 -0
- data/lib/pulpcore_client/models/patched_pulp_importer.rb +15 -0
- data/lib/pulpcore_client/models/patched_rbac_content_guard.rb +30 -0
- data/lib/pulpcore_client/models/patched_role.rb +261 -0
- data/lib/pulpcore_client/models/patched_task_cancel.rb +15 -0
- data/lib/pulpcore_client/models/patched_user.rb +342 -0
- data/lib/pulpcore_client/models/permission_response.rb +1 -1
- data/lib/pulpcore_client/models/pulp_export.rb +15 -0
- data/lib/pulpcore_client/models/pulp_exporter.rb +38 -0
- data/lib/pulpcore_client/models/pulp_import.rb +30 -0
- data/lib/pulpcore_client/models/pulp_import_check.rb +45 -0
- data/lib/pulpcore_client/models/pulp_importer.rb +19 -0
- data/lib/pulpcore_client/models/purge.rb +219 -0
- data/lib/pulpcore_client/models/rbac_content_guard.rb +34 -0
- data/lib/pulpcore_client/models/role.rb +275 -0
- data/lib/pulpcore_client/models/role_response.rb +270 -0
- data/lib/pulpcore_client/models/states_enum.rb +38 -0
- data/lib/pulpcore_client/models/upload_chunk.rb +15 -0
- data/lib/pulpcore_client/models/upload_commit.rb +19 -0
- data/lib/pulpcore_client/models/user.rb +351 -0
- data/lib/pulpcore_client/models/user_group.rb +241 -0
- data/lib/pulpcore_client/models/user_response.rb +6 -29
- data/lib/pulpcore_client/models/user_role.rb +238 -0
- data/lib/pulpcore_client/models/user_role_response.rb +242 -0
- data/lib/pulpcore_client/models/worker_response.rb +10 -10
- data/lib/pulpcore_client/version.rb +1 -1
- data/lib/pulpcore_client.rb +22 -1
- data/pulpcore_client.gemspec +3 -3
- data/spec/api/access_policies_api_spec.rb +11 -0
- data/spec/api/contentguards_rbac_api_spec.rb +36 -12
- data/spec/api/groups_api_spec.rb +54 -4
- data/spec/api/groups_model_permissions_api_spec.rb +4 -4
- data/spec/api/groups_object_permissions_api_spec.rb +4 -4
- data/spec/api/groups_roles_api_spec.rb +97 -0
- data/spec/api/groups_users_api_spec.rb +3 -3
- data/spec/api/roles_api_spec.rb +121 -0
- data/spec/api/tasks_api_spec.rb +62 -0
- data/spec/api/users_api_spec.rb +50 -0
- data/spec/api/users_roles_api_spec.rb +97 -0
- data/spec/models/access_policy_response_spec.rb +6 -0
- data/spec/models/access_policy_spec.rb +6 -0
- data/spec/models/group_role_response_spec.rb +59 -0
- data/spec/models/{rbac_content_guard_permission_spec.rb → group_role_spec.rb} +8 -8
- 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
- data/spec/models/paginated_group_role_response_list_spec.rb +59 -0
- data/spec/models/paginated_role_response_list_spec.rb +59 -0
- data/spec/models/paginated_user_role_response_list_spec.rb +59 -0
- data/spec/models/patched_access_policy_spec.rb +6 -0
- data/spec/models/patched_role_spec.rb +53 -0
- data/spec/models/patched_user_spec.rb +77 -0
- data/spec/models/purge_spec.rb +47 -0
- data/spec/models/role_response_spec.rb +71 -0
- data/spec/models/role_spec.rb +53 -0
- data/spec/models/states_enum_spec.rb +35 -0
- data/spec/models/user_group_spec.rb +41 -0
- data/spec/models/user_role_response_spec.rb +59 -0
- data/spec/models/user_role_spec.rb +47 -0
- data/spec/models/user_spec.rb +77 -0
- data/spec/models/worker_response_spec.rb +2 -2
- metadata +190 -111
- data/docs/RBACContentGuardPermission.md +0 -19
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
Contact: pulp-list@redhat.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PulpcoreClient
|
|
16
|
+
class UsersRolesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create an user role
|
|
23
|
+
# ViewSet for UserRole. NOTE: This API endpoint is in \"tech preview\" and subject to change
|
|
24
|
+
# @param auth_user_href [String]
|
|
25
|
+
# @param user_role [UserRole]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [UserRoleResponse]
|
|
28
|
+
def create(auth_user_href, user_role, opts = {})
|
|
29
|
+
data, _status_code, _headers = create_with_http_info(auth_user_href, user_role, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Create an user role
|
|
34
|
+
# ViewSet for UserRole. NOTE: This API endpoint is in \"tech preview\" and subject to change
|
|
35
|
+
# @param auth_user_href [String]
|
|
36
|
+
# @param user_role [UserRole]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(UserRoleResponse, Integer, Hash)>] UserRoleResponse data, response status code and response headers
|
|
39
|
+
def create_with_http_info(auth_user_href, user_role, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: UsersRolesApi.create ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'auth_user_href' is set
|
|
44
|
+
if @api_client.config.client_side_validation && auth_user_href.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'auth_user_href' when calling UsersRolesApi.create"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'user_role' is set
|
|
48
|
+
if @api_client.config.client_side_validation && user_role.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'user_role' when calling UsersRolesApi.create"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '{auth_user_href}roles/'.sub('{' + 'auth_user_href' + '}', CGI.escape(auth_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(user_role)
|
|
69
|
+
|
|
70
|
+
# return_type
|
|
71
|
+
return_type = opts[:return_type] || 'UserRoleResponse'
|
|
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: UsersRolesApi#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 role
|
|
93
|
+
# ViewSet for UserRole. NOTE: This API endpoint is in \"tech preview\" and subject to change
|
|
94
|
+
# @param auth_users_user_role_href [String]
|
|
95
|
+
# @param [Hash] opts the optional parameters
|
|
96
|
+
# @return [nil]
|
|
97
|
+
def delete(auth_users_user_role_href, opts = {})
|
|
98
|
+
delete_with_http_info(auth_users_user_role_href, opts)
|
|
99
|
+
nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Delete an user role
|
|
103
|
+
# ViewSet for UserRole. NOTE: This API endpoint is in \"tech preview\" and subject to change
|
|
104
|
+
# @param auth_users_user_role_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_users_user_role_href, opts = {})
|
|
108
|
+
if @api_client.config.debugging
|
|
109
|
+
@api_client.config.logger.debug 'Calling API: UsersRolesApi.delete ...'
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'auth_users_user_role_href' is set
|
|
112
|
+
if @api_client.config.client_side_validation && auth_users_user_role_href.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'auth_users_user_role_href' when calling UsersRolesApi.delete"
|
|
114
|
+
end
|
|
115
|
+
# resource path
|
|
116
|
+
local_var_path = '{auth_users_user_role_href}'.sub('{' + 'auth_users_user_role_href' + '}', CGI.escape(auth_users_user_role_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: UsersRolesApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
148
|
+
end
|
|
149
|
+
return data, status_code, headers
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# List user roles
|
|
153
|
+
# ViewSet for UserRole. NOTE: This API endpoint is in \"tech preview\" and subject to change
|
|
154
|
+
# @param auth_user_href [String]
|
|
155
|
+
# @param [Hash] opts the optional parameters
|
|
156
|
+
# @option opts [String] :content_object content_object
|
|
157
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
158
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
159
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
|
160
|
+
# @option opts [String] :role
|
|
161
|
+
# @option opts [String] :role__contains
|
|
162
|
+
# @option opts [String] :role__icontains
|
|
163
|
+
# @option opts [Array<String>] :role__in Multiple values may be separated by commas.
|
|
164
|
+
# @option opts [String] :role__startswith
|
|
165
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
166
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
167
|
+
# @return [PaginatedUserRoleResponseList]
|
|
168
|
+
def list(auth_user_href, opts = {})
|
|
169
|
+
data, _status_code, _headers = list_with_http_info(auth_user_href, opts)
|
|
170
|
+
data
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# List user roles
|
|
174
|
+
# ViewSet for UserRole. NOTE: This API endpoint is in \"tech preview\" and subject to change
|
|
175
|
+
# @param auth_user_href [String]
|
|
176
|
+
# @param [Hash] opts the optional parameters
|
|
177
|
+
# @option opts [String] :content_object content_object
|
|
178
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
179
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
180
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
|
181
|
+
# @option opts [String] :role
|
|
182
|
+
# @option opts [String] :role__contains
|
|
183
|
+
# @option opts [String] :role__icontains
|
|
184
|
+
# @option opts [Array<String>] :role__in Multiple values may be separated by commas.
|
|
185
|
+
# @option opts [String] :role__startswith
|
|
186
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
187
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
188
|
+
# @return [Array<(PaginatedUserRoleResponseList, Integer, Hash)>] PaginatedUserRoleResponseList data, response status code and response headers
|
|
189
|
+
def list_with_http_info(auth_user_href, opts = {})
|
|
190
|
+
if @api_client.config.debugging
|
|
191
|
+
@api_client.config.logger.debug 'Calling API: UsersRolesApi.list ...'
|
|
192
|
+
end
|
|
193
|
+
# verify the required parameter 'auth_user_href' is set
|
|
194
|
+
if @api_client.config.client_side_validation && auth_user_href.nil?
|
|
195
|
+
fail ArgumentError, "Missing the required parameter 'auth_user_href' when calling UsersRolesApi.list"
|
|
196
|
+
end
|
|
197
|
+
# resource path
|
|
198
|
+
local_var_path = '{auth_user_href}roles/'.sub('{' + 'auth_user_href' + '}', CGI.escape(auth_user_href.to_s).gsub('%2F', '/'))
|
|
199
|
+
|
|
200
|
+
# query parameters
|
|
201
|
+
query_params = opts[:query_params] || {}
|
|
202
|
+
query_params[:'content_object'] = opts[:'content_object'] if !opts[:'content_object'].nil?
|
|
203
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
204
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
205
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
|
206
|
+
query_params[:'role'] = opts[:'role'] if !opts[:'role'].nil?
|
|
207
|
+
query_params[:'role__contains'] = opts[:'role__contains'] if !opts[:'role__contains'].nil?
|
|
208
|
+
query_params[:'role__icontains'] = opts[:'role__icontains'] if !opts[:'role__icontains'].nil?
|
|
209
|
+
query_params[:'role__in'] = @api_client.build_collection_param(opts[:'role__in'], :csv) if !opts[:'role__in'].nil?
|
|
210
|
+
query_params[:'role__startswith'] = opts[:'role__startswith'] if !opts[:'role__startswith'].nil?
|
|
211
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
212
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
|
213
|
+
|
|
214
|
+
# header parameters
|
|
215
|
+
header_params = opts[:header_params] || {}
|
|
216
|
+
# HTTP header 'Accept' (if needed)
|
|
217
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
218
|
+
|
|
219
|
+
# form parameters
|
|
220
|
+
form_params = opts[:form_params] || {}
|
|
221
|
+
|
|
222
|
+
# http body (model)
|
|
223
|
+
post_body = opts[:body]
|
|
224
|
+
|
|
225
|
+
# return_type
|
|
226
|
+
return_type = opts[:return_type] || 'PaginatedUserRoleResponseList'
|
|
227
|
+
|
|
228
|
+
# auth_names
|
|
229
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
|
230
|
+
|
|
231
|
+
new_options = opts.merge(
|
|
232
|
+
:header_params => header_params,
|
|
233
|
+
:query_params => query_params,
|
|
234
|
+
:form_params => form_params,
|
|
235
|
+
:body => post_body,
|
|
236
|
+
:auth_names => auth_names,
|
|
237
|
+
:return_type => return_type
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
241
|
+
if @api_client.config.debugging
|
|
242
|
+
@api_client.config.logger.debug "API called: UsersRolesApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
243
|
+
end
|
|
244
|
+
return data, status_code, headers
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Inspect an user role
|
|
248
|
+
# ViewSet for UserRole. NOTE: This API endpoint is in \"tech preview\" and subject to change
|
|
249
|
+
# @param auth_users_user_role_href [String]
|
|
250
|
+
# @param [Hash] opts the optional parameters
|
|
251
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
252
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
253
|
+
# @return [UserRoleResponse]
|
|
254
|
+
def read(auth_users_user_role_href, opts = {})
|
|
255
|
+
data, _status_code, _headers = read_with_http_info(auth_users_user_role_href, opts)
|
|
256
|
+
data
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Inspect an user role
|
|
260
|
+
# ViewSet for UserRole. NOTE: This API endpoint is in \"tech preview\" and subject to change
|
|
261
|
+
# @param auth_users_user_role_href [String]
|
|
262
|
+
# @param [Hash] opts the optional parameters
|
|
263
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
264
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
265
|
+
# @return [Array<(UserRoleResponse, Integer, Hash)>] UserRoleResponse data, response status code and response headers
|
|
266
|
+
def read_with_http_info(auth_users_user_role_href, opts = {})
|
|
267
|
+
if @api_client.config.debugging
|
|
268
|
+
@api_client.config.logger.debug 'Calling API: UsersRolesApi.read ...'
|
|
269
|
+
end
|
|
270
|
+
# verify the required parameter 'auth_users_user_role_href' is set
|
|
271
|
+
if @api_client.config.client_side_validation && auth_users_user_role_href.nil?
|
|
272
|
+
fail ArgumentError, "Missing the required parameter 'auth_users_user_role_href' when calling UsersRolesApi.read"
|
|
273
|
+
end
|
|
274
|
+
# resource path
|
|
275
|
+
local_var_path = '{auth_users_user_role_href}'.sub('{' + 'auth_users_user_role_href' + '}', CGI.escape(auth_users_user_role_href.to_s).gsub('%2F', '/'))
|
|
276
|
+
|
|
277
|
+
# query parameters
|
|
278
|
+
query_params = opts[:query_params] || {}
|
|
279
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
280
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
|
281
|
+
|
|
282
|
+
# header parameters
|
|
283
|
+
header_params = opts[:header_params] || {}
|
|
284
|
+
# HTTP header 'Accept' (if needed)
|
|
285
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
286
|
+
|
|
287
|
+
# form parameters
|
|
288
|
+
form_params = opts[:form_params] || {}
|
|
289
|
+
|
|
290
|
+
# http body (model)
|
|
291
|
+
post_body = opts[:body]
|
|
292
|
+
|
|
293
|
+
# return_type
|
|
294
|
+
return_type = opts[:return_type] || 'UserRoleResponse'
|
|
295
|
+
|
|
296
|
+
# auth_names
|
|
297
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
|
298
|
+
|
|
299
|
+
new_options = opts.merge(
|
|
300
|
+
:header_params => header_params,
|
|
301
|
+
:query_params => query_params,
|
|
302
|
+
:form_params => form_params,
|
|
303
|
+
:body => post_body,
|
|
304
|
+
:auth_names => auth_names,
|
|
305
|
+
:return_type => return_type
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
309
|
+
if @api_client.config.debugging
|
|
310
|
+
@api_client.config.logger.debug "API called: UsersRolesApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
311
|
+
end
|
|
312
|
+
return data, status_code, headers
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
end
|
|
@@ -118,6 +118,9 @@ module PulpcoreClient
|
|
|
118
118
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
|
119
119
|
|
|
120
120
|
req_opts = {
|
|
121
|
+
:method => http_method,
|
|
122
|
+
:headers => header_params,
|
|
123
|
+
:params => query_params,
|
|
121
124
|
:params_encoding => @config.params_encoding,
|
|
122
125
|
:timeout => @config.timeout,
|
|
123
126
|
:verbose => @config.debugging
|
|
@@ -125,13 +128,13 @@ module PulpcoreClient
|
|
|
125
128
|
|
|
126
129
|
if [:post, :patch, :put, :delete].include?(http_method)
|
|
127
130
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
|
131
|
+
req_opts.update :body => req_body
|
|
128
132
|
if @config.debugging
|
|
129
133
|
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
|
130
134
|
end
|
|
131
135
|
end
|
|
132
136
|
request.headers = header_params
|
|
133
137
|
request.body = req_body
|
|
134
|
-
request.options = OpenStruct.new(req_opts)
|
|
135
138
|
request.url url
|
|
136
139
|
request.params = query_params
|
|
137
140
|
download_file(request) if opts[:return_type] == 'File'
|
|
@@ -154,7 +157,7 @@ module PulpcoreClient
|
|
|
154
157
|
case value
|
|
155
158
|
when ::File, ::Tempfile
|
|
156
159
|
# TODO hardcode to application/octet-stream, need better way to detect content type
|
|
157
|
-
data[key] = Faraday::
|
|
160
|
+
data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path)
|
|
158
161
|
when ::Array, nil
|
|
159
162
|
# let Faraday handle Array and nil parameters
|
|
160
163
|
data[key] = value
|
|
@@ -15,9 +15,12 @@ require 'date'
|
|
|
15
15
|
module PulpcoreClient
|
|
16
16
|
# Serializer for AccessPolicy.
|
|
17
17
|
class AccessPolicy
|
|
18
|
-
# List of callables that define the new permissions to be created for new objects.
|
|
18
|
+
# List of callables that define the new permissions to be created for new objects.This is deprecated. Use `creation_hooks` instead.
|
|
19
19
|
attr_accessor :permissions_assignment
|
|
20
20
|
|
|
21
|
+
# List of callables that may associate user roles for new objects.
|
|
22
|
+
attr_accessor :creation_hooks
|
|
23
|
+
|
|
21
24
|
# List of policy statements defining the policy.
|
|
22
25
|
attr_accessor :statements
|
|
23
26
|
|
|
@@ -25,6 +28,7 @@ module PulpcoreClient
|
|
|
25
28
|
def self.attribute_map
|
|
26
29
|
{
|
|
27
30
|
:'permissions_assignment' => :'permissions_assignment',
|
|
31
|
+
:'creation_hooks' => :'creation_hooks',
|
|
28
32
|
:'statements' => :'statements'
|
|
29
33
|
}
|
|
30
34
|
end
|
|
@@ -33,6 +37,7 @@ module PulpcoreClient
|
|
|
33
37
|
def self.openapi_types
|
|
34
38
|
{
|
|
35
39
|
:'permissions_assignment' => :'Array<Object>',
|
|
40
|
+
:'creation_hooks' => :'Array<Object>',
|
|
36
41
|
:'statements' => :'Array<Object>'
|
|
37
42
|
}
|
|
38
43
|
end
|
|
@@ -64,6 +69,12 @@ module PulpcoreClient
|
|
|
64
69
|
end
|
|
65
70
|
end
|
|
66
71
|
|
|
72
|
+
if attributes.key?(:'creation_hooks')
|
|
73
|
+
if (value = attributes[:'creation_hooks']).is_a?(Array)
|
|
74
|
+
self.creation_hooks = value
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
67
78
|
if attributes.key?(:'statements')
|
|
68
79
|
if (value = attributes[:'statements']).is_a?(Array)
|
|
69
80
|
self.statements = value
|
|
@@ -79,6 +90,10 @@ module PulpcoreClient
|
|
|
79
90
|
invalid_properties.push('invalid value for "permissions_assignment", permissions_assignment cannot be nil.')
|
|
80
91
|
end
|
|
81
92
|
|
|
93
|
+
if @creation_hooks.nil?
|
|
94
|
+
invalid_properties.push('invalid value for "creation_hooks", creation_hooks cannot be nil.')
|
|
95
|
+
end
|
|
96
|
+
|
|
82
97
|
if @statements.nil?
|
|
83
98
|
invalid_properties.push('invalid value for "statements", statements cannot be nil.')
|
|
84
99
|
end
|
|
@@ -90,6 +105,7 @@ module PulpcoreClient
|
|
|
90
105
|
# @return true if the model is valid
|
|
91
106
|
def valid?
|
|
92
107
|
return false if @permissions_assignment.nil?
|
|
108
|
+
return false if @creation_hooks.nil?
|
|
93
109
|
return false if @statements.nil?
|
|
94
110
|
true
|
|
95
111
|
end
|
|
@@ -100,6 +116,7 @@ module PulpcoreClient
|
|
|
100
116
|
return true if self.equal?(o)
|
|
101
117
|
self.class == o.class &&
|
|
102
118
|
permissions_assignment == o.permissions_assignment &&
|
|
119
|
+
creation_hooks == o.creation_hooks &&
|
|
103
120
|
statements == o.statements
|
|
104
121
|
end
|
|
105
122
|
|
|
@@ -112,7 +129,7 @@ module PulpcoreClient
|
|
|
112
129
|
# Calculates hash code according to all attributes.
|
|
113
130
|
# @return [Integer] Hash code
|
|
114
131
|
def hash
|
|
115
|
-
[permissions_assignment, statements].hash
|
|
132
|
+
[permissions_assignment, creation_hooks, statements].hash
|
|
116
133
|
end
|
|
117
134
|
|
|
118
135
|
# Builds the object from hash
|
|
@@ -20,9 +20,12 @@ module PulpcoreClient
|
|
|
20
20
|
# Timestamp of creation.
|
|
21
21
|
attr_accessor :pulp_created
|
|
22
22
|
|
|
23
|
-
# List of callables that define the new permissions to be created for new objects.
|
|
23
|
+
# List of callables that define the new permissions to be created for new objects.This is deprecated. Use `creation_hooks` instead.
|
|
24
24
|
attr_accessor :permissions_assignment
|
|
25
25
|
|
|
26
|
+
# List of callables that may associate user roles for new objects.
|
|
27
|
+
attr_accessor :creation_hooks
|
|
28
|
+
|
|
26
29
|
# List of policy statements defining the policy.
|
|
27
30
|
attr_accessor :statements
|
|
28
31
|
|
|
@@ -38,6 +41,7 @@ module PulpcoreClient
|
|
|
38
41
|
:'pulp_href' => :'pulp_href',
|
|
39
42
|
:'pulp_created' => :'pulp_created',
|
|
40
43
|
:'permissions_assignment' => :'permissions_assignment',
|
|
44
|
+
:'creation_hooks' => :'creation_hooks',
|
|
41
45
|
:'statements' => :'statements',
|
|
42
46
|
:'viewset_name' => :'viewset_name',
|
|
43
47
|
:'customized' => :'customized'
|
|
@@ -50,6 +54,7 @@ module PulpcoreClient
|
|
|
50
54
|
:'pulp_href' => :'String',
|
|
51
55
|
:'pulp_created' => :'DateTime',
|
|
52
56
|
:'permissions_assignment' => :'Array<Object>',
|
|
57
|
+
:'creation_hooks' => :'Array<Object>',
|
|
53
58
|
:'statements' => :'Array<Object>',
|
|
54
59
|
:'viewset_name' => :'String',
|
|
55
60
|
:'customized' => :'Boolean'
|
|
@@ -91,6 +96,12 @@ module PulpcoreClient
|
|
|
91
96
|
end
|
|
92
97
|
end
|
|
93
98
|
|
|
99
|
+
if attributes.key?(:'creation_hooks')
|
|
100
|
+
if (value = attributes[:'creation_hooks']).is_a?(Array)
|
|
101
|
+
self.creation_hooks = value
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
94
105
|
if attributes.key?(:'statements')
|
|
95
106
|
if (value = attributes[:'statements']).is_a?(Array)
|
|
96
107
|
self.statements = value
|
|
@@ -114,6 +125,10 @@ module PulpcoreClient
|
|
|
114
125
|
invalid_properties.push('invalid value for "permissions_assignment", permissions_assignment cannot be nil.')
|
|
115
126
|
end
|
|
116
127
|
|
|
128
|
+
if @creation_hooks.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "creation_hooks", creation_hooks cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
117
132
|
if @statements.nil?
|
|
118
133
|
invalid_properties.push('invalid value for "statements", statements cannot be nil.')
|
|
119
134
|
end
|
|
@@ -125,6 +140,7 @@ module PulpcoreClient
|
|
|
125
140
|
# @return true if the model is valid
|
|
126
141
|
def valid?
|
|
127
142
|
return false if @permissions_assignment.nil?
|
|
143
|
+
return false if @creation_hooks.nil?
|
|
128
144
|
return false if @statements.nil?
|
|
129
145
|
true
|
|
130
146
|
end
|
|
@@ -137,6 +153,7 @@ module PulpcoreClient
|
|
|
137
153
|
pulp_href == o.pulp_href &&
|
|
138
154
|
pulp_created == o.pulp_created &&
|
|
139
155
|
permissions_assignment == o.permissions_assignment &&
|
|
156
|
+
creation_hooks == o.creation_hooks &&
|
|
140
157
|
statements == o.statements &&
|
|
141
158
|
viewset_name == o.viewset_name &&
|
|
142
159
|
customized == o.customized
|
|
@@ -151,7 +168,7 @@ module PulpcoreClient
|
|
|
151
168
|
# Calculates hash code according to all attributes.
|
|
152
169
|
# @return [Integer] Hash code
|
|
153
170
|
def hash
|
|
154
|
-
[pulp_href, pulp_created, permissions_assignment, statements, viewset_name, customized].hash
|
|
171
|
+
[pulp_href, pulp_created, permissions_assignment, creation_hooks, statements, viewset_name, customized].hash
|
|
155
172
|
end
|
|
156
173
|
|
|
157
174
|
# Builds the object from hash
|
|
@@ -135,6 +135,30 @@ module PulpcoreClient
|
|
|
135
135
|
invalid_properties.push('invalid value for "file", file cannot be nil.')
|
|
136
136
|
end
|
|
137
137
|
|
|
138
|
+
if !@md5.nil? && @md5.to_s.length < 1
|
|
139
|
+
invalid_properties.push('invalid value for "md5", the character length must be great than or equal to 1.')
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if !@sha1.nil? && @sha1.to_s.length < 1
|
|
143
|
+
invalid_properties.push('invalid value for "sha1", the character length must be great than or equal to 1.')
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if !@sha224.nil? && @sha224.to_s.length < 1
|
|
147
|
+
invalid_properties.push('invalid value for "sha224", the character length must be great than or equal to 1.')
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if !@sha256.nil? && @sha256.to_s.length < 1
|
|
151
|
+
invalid_properties.push('invalid value for "sha256", the character length must be great than or equal to 1.')
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if !@sha384.nil? && @sha384.to_s.length < 1
|
|
155
|
+
invalid_properties.push('invalid value for "sha384", the character length must be great than or equal to 1.')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if !@sha512.nil? && @sha512.to_s.length < 1
|
|
159
|
+
invalid_properties.push('invalid value for "sha512", the character length must be great than or equal to 1.')
|
|
160
|
+
end
|
|
161
|
+
|
|
138
162
|
invalid_properties
|
|
139
163
|
end
|
|
140
164
|
|
|
@@ -142,9 +166,75 @@ module PulpcoreClient
|
|
|
142
166
|
# @return true if the model is valid
|
|
143
167
|
def valid?
|
|
144
168
|
return false if @file.nil?
|
|
169
|
+
return false if !@md5.nil? && @md5.to_s.length < 1
|
|
170
|
+
return false if !@sha1.nil? && @sha1.to_s.length < 1
|
|
171
|
+
return false if !@sha224.nil? && @sha224.to_s.length < 1
|
|
172
|
+
return false if !@sha256.nil? && @sha256.to_s.length < 1
|
|
173
|
+
return false if !@sha384.nil? && @sha384.to_s.length < 1
|
|
174
|
+
return false if !@sha512.nil? && @sha512.to_s.length < 1
|
|
145
175
|
true
|
|
146
176
|
end
|
|
147
177
|
|
|
178
|
+
# Custom attribute writer method with validation
|
|
179
|
+
# @param [Object] md5 Value to be assigned
|
|
180
|
+
def md5=(md5)
|
|
181
|
+
if !md5.nil? && md5.to_s.length < 1
|
|
182
|
+
fail ArgumentError, 'invalid value for "md5", the character length must be great than or equal to 1.'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
@md5 = md5
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Custom attribute writer method with validation
|
|
189
|
+
# @param [Object] sha1 Value to be assigned
|
|
190
|
+
def sha1=(sha1)
|
|
191
|
+
if !sha1.nil? && sha1.to_s.length < 1
|
|
192
|
+
fail ArgumentError, 'invalid value for "sha1", the character length must be great than or equal to 1.'
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
@sha1 = sha1
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Custom attribute writer method with validation
|
|
199
|
+
# @param [Object] sha224 Value to be assigned
|
|
200
|
+
def sha224=(sha224)
|
|
201
|
+
if !sha224.nil? && sha224.to_s.length < 1
|
|
202
|
+
fail ArgumentError, 'invalid value for "sha224", the character length must be great than or equal to 1.'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
@sha224 = sha224
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Custom attribute writer method with validation
|
|
209
|
+
# @param [Object] sha256 Value to be assigned
|
|
210
|
+
def sha256=(sha256)
|
|
211
|
+
if !sha256.nil? && sha256.to_s.length < 1
|
|
212
|
+
fail ArgumentError, 'invalid value for "sha256", the character length must be great than or equal to 1.'
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
@sha256 = sha256
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Custom attribute writer method with validation
|
|
219
|
+
# @param [Object] sha384 Value to be assigned
|
|
220
|
+
def sha384=(sha384)
|
|
221
|
+
if !sha384.nil? && sha384.to_s.length < 1
|
|
222
|
+
fail ArgumentError, 'invalid value for "sha384", the character length must be great than or equal to 1.'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
@sha384 = sha384
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Custom attribute writer method with validation
|
|
229
|
+
# @param [Object] sha512 Value to be assigned
|
|
230
|
+
def sha512=(sha512)
|
|
231
|
+
if !sha512.nil? && sha512.to_s.length < 1
|
|
232
|
+
fail ArgumentError, 'invalid value for "sha512", the character length must be great than or equal to 1.'
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
@sha512 = sha512
|
|
236
|
+
end
|
|
237
|
+
|
|
148
238
|
# Checks equality by comparing each attribute.
|
|
149
239
|
# @param [Object] Object to be compared
|
|
150
240
|
def ==(o)
|
|
@@ -84,10 +84,18 @@ module PulpcoreClient
|
|
|
84
84
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
+
if @name.to_s.length < 1
|
|
88
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
89
|
+
end
|
|
90
|
+
|
|
87
91
|
if @path.nil?
|
|
88
92
|
invalid_properties.push('invalid value for "path", path cannot be nil.')
|
|
89
93
|
end
|
|
90
94
|
|
|
95
|
+
if @path.to_s.length < 1
|
|
96
|
+
invalid_properties.push('invalid value for "path", the character length must be great than or equal to 1.')
|
|
97
|
+
end
|
|
98
|
+
|
|
91
99
|
invalid_properties
|
|
92
100
|
end
|
|
93
101
|
|
|
@@ -95,10 +103,40 @@ module PulpcoreClient
|
|
|
95
103
|
# @return true if the model is valid
|
|
96
104
|
def valid?
|
|
97
105
|
return false if @name.nil?
|
|
106
|
+
return false if @name.to_s.length < 1
|
|
98
107
|
return false if @path.nil?
|
|
108
|
+
return false if @path.to_s.length < 1
|
|
99
109
|
true
|
|
100
110
|
end
|
|
101
111
|
|
|
112
|
+
# Custom attribute writer method with validation
|
|
113
|
+
# @param [Object] name Value to be assigned
|
|
114
|
+
def name=(name)
|
|
115
|
+
if name.nil?
|
|
116
|
+
fail ArgumentError, 'name cannot be nil'
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if name.to_s.length < 1
|
|
120
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
@name = name
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Custom attribute writer method with validation
|
|
127
|
+
# @param [Object] path Value to be assigned
|
|
128
|
+
def path=(path)
|
|
129
|
+
if path.nil?
|
|
130
|
+
fail ArgumentError, 'path cannot be nil'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if path.to_s.length < 1
|
|
134
|
+
fail ArgumentError, 'invalid value for "path", the character length must be great than or equal to 1.'
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
@path = path
|
|
138
|
+
end
|
|
139
|
+
|
|
102
140
|
# Checks equality by comparing each attribute.
|
|
103
141
|
# @param [Object] Object to be compared
|
|
104
142
|
def ==(o)
|