pulp_rpm_client 3.18.20 → 3.19.0.dev1669778102
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pulp_rpm_client might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +36 -8
- data/docs/AcsRpmApi.md +230 -6
- data/docs/ContentAdvisoriesApi.md +2 -6
- data/docs/ContentDistributionTreesApi.md +2 -6
- data/docs/ContentModulemdDefaultsApi.md +2 -6
- data/docs/ContentModulemdObsoletesApi.md +2 -6
- data/docs/ContentModulemdsApi.md +2 -6
- data/docs/ContentPackagecategoriesApi.md +2 -6
- data/docs/ContentPackageenvironmentsApi.md +2 -6
- data/docs/ContentPackagegroupsApi.md +2 -6
- data/docs/ContentPackagelangpacksApi.md +2 -6
- data/docs/ContentPackagesApi.md +4 -8
- data/docs/ContentRepoMetadataFilesApi.md +2 -6
- data/docs/DistributionsRpmApi.md +230 -10
- 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/PatchedrpmRpmDistribution.md +1 -1
- data/docs/PatchedrpmRpmRemote.md +2 -2
- data/docs/PatchedrpmRpmRepository.md +4 -4
- data/docs/PatchedrpmUlnRemote.md +2 -2
- data/docs/PublicationsRpmApi.md +230 -6
- data/docs/RemotesRpmApi.md +230 -6
- data/docs/RemotesUlnApi.md +230 -6
- data/docs/RepositoriesRpmApi.md +230 -22
- data/docs/RepositoriesRpmVersionsApi.md +2 -4
- data/docs/RepositoryAddRemoveContent.md +2 -2
- data/docs/RpmRepositorySyncURL.md +1 -1
- data/docs/RpmRpmDistribution.md +1 -1
- data/docs/RpmRpmDistributionResponse.md +1 -1
- data/docs/RpmRpmPublication.md +2 -2
- data/docs/RpmRpmPublicationResponse.md +2 -2
- data/docs/RpmRpmRemote.md +2 -2
- data/docs/RpmRpmRemoteResponse.md +2 -2
- data/docs/RpmRpmRepository.md +4 -4
- data/docs/RpmRpmRepositoryResponse.md +4 -4
- data/docs/RpmUlnRemote.md +2 -2
- data/docs/RpmUlnRemoteResponse.md +2 -2
- data/lib/pulp_rpm_client/api/acs_rpm_api.rb +270 -8
- data/lib/pulp_rpm_client/api/content_advisories_api.rb +2 -8
- data/lib/pulp_rpm_client/api/content_distribution_trees_api.rb +2 -8
- data/lib/pulp_rpm_client/api/content_modulemd_defaults_api.rb +2 -8
- data/lib/pulp_rpm_client/api/content_modulemd_obsoletes_api.rb +2 -8
- data/lib/pulp_rpm_client/api/content_modulemds_api.rb +2 -8
- data/lib/pulp_rpm_client/api/content_packagecategories_api.rb +2 -8
- data/lib/pulp_rpm_client/api/content_packageenvironments_api.rb +2 -8
- data/lib/pulp_rpm_client/api/content_packagegroups_api.rb +2 -8
- data/lib/pulp_rpm_client/api/content_packagelangpacks_api.rb +2 -8
- data/lib/pulp_rpm_client/api/content_packages_api.rb +4 -10
- data/lib/pulp_rpm_client/api/content_repo_metadata_files_api.rb +2 -8
- data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +271 -15
- data/lib/pulp_rpm_client/api/publications_rpm_api.rb +270 -8
- data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +271 -9
- data/lib/pulp_rpm_client/api/remotes_uln_api.rb +271 -9
- data/lib/pulp_rpm_client/api/repositories_rpm_api.rb +271 -33
- data/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb +2 -5
- data/lib/pulp_rpm_client/models/my_permissions_response.rb +213 -0
- data/lib/pulp_rpm_client/models/nested_role.rb +234 -0
- data/lib/pulp_rpm_client/models/nested_role_response.rb +234 -0
- data/lib/pulp_rpm_client/models/object_roles_response.rb +213 -0
- data/lib/pulp_rpm_client/models/patchedrpm_rpm_distribution.rb +2 -4
- data/lib/pulp_rpm_client/models/patchedrpm_rpm_remote.rb +3 -5
- data/lib/pulp_rpm_client/models/patchedrpm_rpm_repository.rb +5 -7
- data/lib/pulp_rpm_client/models/patchedrpm_uln_remote.rb +3 -5
- data/lib/pulp_rpm_client/models/repository_add_remove_content.rb +2 -2
- data/lib/pulp_rpm_client/models/rpm_repository_sync_url.rb +1 -1
- data/lib/pulp_rpm_client/models/rpm_rpm_distribution.rb +2 -4
- data/lib/pulp_rpm_client/models/rpm_rpm_distribution_response.rb +2 -4
- data/lib/pulp_rpm_client/models/rpm_rpm_publication.rb +2 -2
- data/lib/pulp_rpm_client/models/rpm_rpm_publication_response.rb +2 -2
- data/lib/pulp_rpm_client/models/rpm_rpm_remote.rb +3 -5
- data/lib/pulp_rpm_client/models/rpm_rpm_remote_response.rb +3 -5
- data/lib/pulp_rpm_client/models/rpm_rpm_repository.rb +5 -7
- data/lib/pulp_rpm_client/models/rpm_rpm_repository_response.rb +5 -7
- data/lib/pulp_rpm_client/models/rpm_uln_remote.rb +3 -5
- data/lib/pulp_rpm_client/models/rpm_uln_remote_response.rb +3 -5
- data/lib/pulp_rpm_client/models/skip_types_enum.rb +0 -1
- data/lib/pulp_rpm_client/version.rb +1 -1
- data/lib/pulp_rpm_client.rb +4 -0
- data/spec/api/acs_rpm_api_spec.rb +51 -3
- data/spec/api/content_advisories_api_spec.rb +1 -3
- data/spec/api/content_distribution_trees_api_spec.rb +1 -3
- data/spec/api/content_modulemd_defaults_api_spec.rb +1 -3
- data/spec/api/content_modulemd_obsoletes_api_spec.rb +1 -3
- data/spec/api/content_modulemds_api_spec.rb +1 -3
- data/spec/api/content_packagecategories_api_spec.rb +1 -3
- data/spec/api/content_packageenvironments_api_spec.rb +1 -3
- data/spec/api/content_packagegroups_api_spec.rb +1 -3
- data/spec/api/content_packagelangpacks_api_spec.rb +1 -3
- data/spec/api/content_packages_api_spec.rb +2 -4
- data/spec/api/content_repo_metadata_files_api_spec.rb +1 -3
- data/spec/api/distributions_rpm_api_spec.rb +51 -5
- data/spec/api/publications_rpm_api_spec.rb +51 -3
- data/spec/api/remotes_rpm_api_spec.rb +51 -3
- data/spec/api/remotes_uln_api_spec.rb +51 -3
- data/spec/api/repositories_rpm_api_spec.rb +51 -11
- data/spec/api/repositories_rpm_versions_api_spec.rb +1 -2
- 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 +92 -76
@@ -19,6 +19,74 @@ module PulpRpmClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Add a role for this object to users/groups.
|
23
|
+
# @param rpm_rpm_repository_href [String]
|
24
|
+
# @param nested_role [NestedRole]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NestedRoleResponse]
|
27
|
+
def add_role(rpm_rpm_repository_href, nested_role, opts = {})
|
28
|
+
data, _status_code, _headers = add_role_with_http_info(rpm_rpm_repository_href, nested_role, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a role for this object to users/groups.
|
33
|
+
# @param rpm_rpm_repository_href [String]
|
34
|
+
# @param nested_role [NestedRole]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
37
|
+
def add_role_with_http_info(rpm_rpm_repository_href, nested_role, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesRpmApi.add_role ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'rpm_rpm_repository_href' is set
|
42
|
+
if @api_client.config.client_side_validation && rpm_rpm_repository_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_repository_href' when calling RepositoriesRpmApi.add_role"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'nested_role' is set
|
46
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling RepositoriesRpmApi.add_role"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '{rpm_rpm_repository_href}add_role/'.sub('{' + 'rpm_rpm_repository_href' + '}', CGI.escape(rpm_rpm_repository_href.to_s).gsub('%2F', '/'))
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = opts[:query_params] || {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = opts[:header_params] || {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
|
+
# HTTP header 'Content-Type'
|
60
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = opts[:form_params] || {}
|
64
|
+
|
65
|
+
# http body (model)
|
66
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
67
|
+
|
68
|
+
# return_type
|
69
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
70
|
+
|
71
|
+
# auth_names
|
72
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
73
|
+
|
74
|
+
new_options = opts.merge(
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type
|
81
|
+
)
|
82
|
+
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: RepositoriesRpmApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
22
90
|
# Create a rpm repository
|
23
91
|
# A ViewSet for RpmRepository.
|
24
92
|
# @param rpm_rpm_repository [RpmRpmRepository]
|
@@ -155,19 +223,9 @@ module PulpRpmClient
|
|
155
223
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
156
224
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
157
225
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
158
|
-
# @option opts [Array<String>] :ordering Ordering
|
159
|
-
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
160
|
-
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
226
|
+
# @option opts [Array<String>] :ordering Ordering
|
161
227
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
162
228
|
# @option opts [String] :remote Foreign Key referenced by HREF
|
163
|
-
# @option opts [Integer] :retain_repo_versions Filter results where retain_repo_versions matches value
|
164
|
-
# @option opts [Integer] :retain_repo_versions__gt Filter results where retain_repo_versions is greater than value
|
165
|
-
# @option opts [Integer] :retain_repo_versions__gte Filter results where retain_repo_versions is greater than or equal to value
|
166
|
-
# @option opts [Boolean] :retain_repo_versions__isnull Filter results where retain_repo_versions has a null value
|
167
|
-
# @option opts [Integer] :retain_repo_versions__lt Filter results where retain_repo_versions is less than value
|
168
|
-
# @option opts [Integer] :retain_repo_versions__lte Filter results where retain_repo_versions is less than or equal to value
|
169
|
-
# @option opts [Integer] :retain_repo_versions__ne Filter results where retain_repo_versions not equal to value
|
170
|
-
# @option opts [Array<Integer>] :retain_repo_versions__range Filter results where retain_repo_versions is between two comma separated values
|
171
229
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
172
230
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
173
231
|
# @return [PaginatedrpmRpmRepositoryResponseList]
|
@@ -186,19 +244,9 @@ module PulpRpmClient
|
|
186
244
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
187
245
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
188
246
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
189
|
-
# @option opts [Array<String>] :ordering Ordering
|
190
|
-
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
191
|
-
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
247
|
+
# @option opts [Array<String>] :ordering Ordering
|
192
248
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
193
249
|
# @option opts [String] :remote Foreign Key referenced by HREF
|
194
|
-
# @option opts [Integer] :retain_repo_versions Filter results where retain_repo_versions matches value
|
195
|
-
# @option opts [Integer] :retain_repo_versions__gt Filter results where retain_repo_versions is greater than value
|
196
|
-
# @option opts [Integer] :retain_repo_versions__gte Filter results where retain_repo_versions is greater than or equal to value
|
197
|
-
# @option opts [Boolean] :retain_repo_versions__isnull Filter results where retain_repo_versions has a null value
|
198
|
-
# @option opts [Integer] :retain_repo_versions__lt Filter results where retain_repo_versions is less than value
|
199
|
-
# @option opts [Integer] :retain_repo_versions__lte Filter results where retain_repo_versions is less than or equal to value
|
200
|
-
# @option opts [Integer] :retain_repo_versions__ne Filter results where retain_repo_versions not equal to value
|
201
|
-
# @option opts [Array<Integer>] :retain_repo_versions__range Filter results where retain_repo_versions is between two comma separated values
|
202
250
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
203
251
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
204
252
|
# @return [Array<(PaginatedrpmRpmRepositoryResponseList, Integer, Hash)>] PaginatedrpmRpmRepositoryResponseList data, response status code and response headers
|
@@ -206,7 +254,7 @@ module PulpRpmClient
|
|
206
254
|
if @api_client.config.debugging
|
207
255
|
@api_client.config.logger.debug 'Calling API: RepositoriesRpmApi.list ...'
|
208
256
|
end
|
209
|
-
allowable_values = ["-description", "-name", "-next_version", "-pk", "-pulp_created", "-pulp_id", "-
|
257
|
+
allowable_values = ["-description", "-name", "-next_version", "-pk", "-pulp_created", "-pulp_id", "-pulp_last_updated", "-pulp_type", "-retain_repo_versions", "-user_hidden", "description", "name", "next_version", "pk", "pulp_created", "pulp_id", "pulp_last_updated", "pulp_type", "retain_repo_versions", "user_hidden"]
|
210
258
|
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
211
259
|
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
212
260
|
end
|
@@ -223,18 +271,8 @@ module PulpRpmClient
|
|
223
271
|
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
224
272
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
225
273
|
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
226
|
-
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
227
|
-
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
228
274
|
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
229
275
|
query_params[:'remote'] = opts[:'remote'] if !opts[:'remote'].nil?
|
230
|
-
query_params[:'retain_repo_versions'] = opts[:'retain_repo_versions'] if !opts[:'retain_repo_versions'].nil?
|
231
|
-
query_params[:'retain_repo_versions__gt'] = opts[:'retain_repo_versions__gt'] if !opts[:'retain_repo_versions__gt'].nil?
|
232
|
-
query_params[:'retain_repo_versions__gte'] = opts[:'retain_repo_versions__gte'] if !opts[:'retain_repo_versions__gte'].nil?
|
233
|
-
query_params[:'retain_repo_versions__isnull'] = opts[:'retain_repo_versions__isnull'] if !opts[:'retain_repo_versions__isnull'].nil?
|
234
|
-
query_params[:'retain_repo_versions__lt'] = opts[:'retain_repo_versions__lt'] if !opts[:'retain_repo_versions__lt'].nil?
|
235
|
-
query_params[:'retain_repo_versions__lte'] = opts[:'retain_repo_versions__lte'] if !opts[:'retain_repo_versions__lte'].nil?
|
236
|
-
query_params[:'retain_repo_versions__ne'] = opts[:'retain_repo_versions__ne'] if !opts[:'retain_repo_versions__ne'].nil?
|
237
|
-
query_params[:'retain_repo_versions__range'] = @api_client.build_collection_param(opts[:'retain_repo_versions__range'], :csv) if !opts[:'retain_repo_versions__range'].nil?
|
238
276
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
239
277
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
240
278
|
|
@@ -271,6 +309,72 @@ module PulpRpmClient
|
|
271
309
|
return data, status_code, headers
|
272
310
|
end
|
273
311
|
|
312
|
+
# List roles assigned to this object.
|
313
|
+
# @param rpm_rpm_repository_href [String]
|
314
|
+
# @param [Hash] opts the optional parameters
|
315
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
316
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
317
|
+
# @return [ObjectRolesResponse]
|
318
|
+
def list_roles(rpm_rpm_repository_href, opts = {})
|
319
|
+
data, _status_code, _headers = list_roles_with_http_info(rpm_rpm_repository_href, opts)
|
320
|
+
data
|
321
|
+
end
|
322
|
+
|
323
|
+
# List roles assigned to this object.
|
324
|
+
# @param rpm_rpm_repository_href [String]
|
325
|
+
# @param [Hash] opts the optional parameters
|
326
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
327
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
328
|
+
# @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
|
329
|
+
def list_roles_with_http_info(rpm_rpm_repository_href, opts = {})
|
330
|
+
if @api_client.config.debugging
|
331
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesRpmApi.list_roles ...'
|
332
|
+
end
|
333
|
+
# verify the required parameter 'rpm_rpm_repository_href' is set
|
334
|
+
if @api_client.config.client_side_validation && rpm_rpm_repository_href.nil?
|
335
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_repository_href' when calling RepositoriesRpmApi.list_roles"
|
336
|
+
end
|
337
|
+
# resource path
|
338
|
+
local_var_path = '{rpm_rpm_repository_href}list_roles/'.sub('{' + 'rpm_rpm_repository_href' + '}', CGI.escape(rpm_rpm_repository_href.to_s).gsub('%2F', '/'))
|
339
|
+
|
340
|
+
# query parameters
|
341
|
+
query_params = opts[:query_params] || {}
|
342
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
343
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
344
|
+
|
345
|
+
# header parameters
|
346
|
+
header_params = opts[:header_params] || {}
|
347
|
+
# HTTP header 'Accept' (if needed)
|
348
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
349
|
+
|
350
|
+
# form parameters
|
351
|
+
form_params = opts[:form_params] || {}
|
352
|
+
|
353
|
+
# http body (model)
|
354
|
+
post_body = opts[:body]
|
355
|
+
|
356
|
+
# return_type
|
357
|
+
return_type = opts[:return_type] || 'ObjectRolesResponse'
|
358
|
+
|
359
|
+
# auth_names
|
360
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
361
|
+
|
362
|
+
new_options = opts.merge(
|
363
|
+
:header_params => header_params,
|
364
|
+
:query_params => query_params,
|
365
|
+
:form_params => form_params,
|
366
|
+
:body => post_body,
|
367
|
+
:auth_names => auth_names,
|
368
|
+
:return_type => return_type
|
369
|
+
)
|
370
|
+
|
371
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
372
|
+
if @api_client.config.debugging
|
373
|
+
@api_client.config.logger.debug "API called: RepositoriesRpmApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
374
|
+
end
|
375
|
+
return data, status_code, headers
|
376
|
+
end
|
377
|
+
|
274
378
|
# Modify Repository Content
|
275
379
|
# Trigger an asynchronous task to create a new repository version.
|
276
380
|
# @param rpm_rpm_repository_href [String]
|
@@ -341,6 +445,72 @@ module PulpRpmClient
|
|
341
445
|
return data, status_code, headers
|
342
446
|
end
|
343
447
|
|
448
|
+
# List permissions available to the current user on this object.
|
449
|
+
# @param rpm_rpm_repository_href [String]
|
450
|
+
# @param [Hash] opts the optional parameters
|
451
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
452
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
453
|
+
# @return [MyPermissionsResponse]
|
454
|
+
def my_permissions(rpm_rpm_repository_href, opts = {})
|
455
|
+
data, _status_code, _headers = my_permissions_with_http_info(rpm_rpm_repository_href, opts)
|
456
|
+
data
|
457
|
+
end
|
458
|
+
|
459
|
+
# List permissions available to the current user on this object.
|
460
|
+
# @param rpm_rpm_repository_href [String]
|
461
|
+
# @param [Hash] opts the optional parameters
|
462
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
463
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
464
|
+
# @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
|
465
|
+
def my_permissions_with_http_info(rpm_rpm_repository_href, opts = {})
|
466
|
+
if @api_client.config.debugging
|
467
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesRpmApi.my_permissions ...'
|
468
|
+
end
|
469
|
+
# verify the required parameter 'rpm_rpm_repository_href' is set
|
470
|
+
if @api_client.config.client_side_validation && rpm_rpm_repository_href.nil?
|
471
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_repository_href' when calling RepositoriesRpmApi.my_permissions"
|
472
|
+
end
|
473
|
+
# resource path
|
474
|
+
local_var_path = '{rpm_rpm_repository_href}my_permissions/'.sub('{' + 'rpm_rpm_repository_href' + '}', CGI.escape(rpm_rpm_repository_href.to_s).gsub('%2F', '/'))
|
475
|
+
|
476
|
+
# query parameters
|
477
|
+
query_params = opts[:query_params] || {}
|
478
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
479
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
480
|
+
|
481
|
+
# header parameters
|
482
|
+
header_params = opts[:header_params] || {}
|
483
|
+
# HTTP header 'Accept' (if needed)
|
484
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
485
|
+
|
486
|
+
# form parameters
|
487
|
+
form_params = opts[:form_params] || {}
|
488
|
+
|
489
|
+
# http body (model)
|
490
|
+
post_body = opts[:body]
|
491
|
+
|
492
|
+
# return_type
|
493
|
+
return_type = opts[:return_type] || 'MyPermissionsResponse'
|
494
|
+
|
495
|
+
# auth_names
|
496
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
497
|
+
|
498
|
+
new_options = opts.merge(
|
499
|
+
:header_params => header_params,
|
500
|
+
:query_params => query_params,
|
501
|
+
:form_params => form_params,
|
502
|
+
:body => post_body,
|
503
|
+
:auth_names => auth_names,
|
504
|
+
:return_type => return_type
|
505
|
+
)
|
506
|
+
|
507
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
508
|
+
if @api_client.config.debugging
|
509
|
+
@api_client.config.logger.debug "API called: RepositoriesRpmApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
510
|
+
end
|
511
|
+
return data, status_code, headers
|
512
|
+
end
|
513
|
+
|
344
514
|
# Update a rpm repository
|
345
515
|
# Trigger an asynchronous partial update task
|
346
516
|
# @param rpm_rpm_repository_href [String]
|
@@ -479,6 +649,74 @@ module PulpRpmClient
|
|
479
649
|
return data, status_code, headers
|
480
650
|
end
|
481
651
|
|
652
|
+
# Remove a role for this object from users/groups.
|
653
|
+
# @param rpm_rpm_repository_href [String]
|
654
|
+
# @param nested_role [NestedRole]
|
655
|
+
# @param [Hash] opts the optional parameters
|
656
|
+
# @return [NestedRoleResponse]
|
657
|
+
def remove_role(rpm_rpm_repository_href, nested_role, opts = {})
|
658
|
+
data, _status_code, _headers = remove_role_with_http_info(rpm_rpm_repository_href, nested_role, opts)
|
659
|
+
data
|
660
|
+
end
|
661
|
+
|
662
|
+
# Remove a role for this object from users/groups.
|
663
|
+
# @param rpm_rpm_repository_href [String]
|
664
|
+
# @param nested_role [NestedRole]
|
665
|
+
# @param [Hash] opts the optional parameters
|
666
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
667
|
+
def remove_role_with_http_info(rpm_rpm_repository_href, nested_role, opts = {})
|
668
|
+
if @api_client.config.debugging
|
669
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesRpmApi.remove_role ...'
|
670
|
+
end
|
671
|
+
# verify the required parameter 'rpm_rpm_repository_href' is set
|
672
|
+
if @api_client.config.client_side_validation && rpm_rpm_repository_href.nil?
|
673
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_repository_href' when calling RepositoriesRpmApi.remove_role"
|
674
|
+
end
|
675
|
+
# verify the required parameter 'nested_role' is set
|
676
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
677
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling RepositoriesRpmApi.remove_role"
|
678
|
+
end
|
679
|
+
# resource path
|
680
|
+
local_var_path = '{rpm_rpm_repository_href}remove_role/'.sub('{' + 'rpm_rpm_repository_href' + '}', CGI.escape(rpm_rpm_repository_href.to_s).gsub('%2F', '/'))
|
681
|
+
|
682
|
+
# query parameters
|
683
|
+
query_params = opts[:query_params] || {}
|
684
|
+
|
685
|
+
# header parameters
|
686
|
+
header_params = opts[:header_params] || {}
|
687
|
+
# HTTP header 'Accept' (if needed)
|
688
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
689
|
+
# HTTP header 'Content-Type'
|
690
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
691
|
+
|
692
|
+
# form parameters
|
693
|
+
form_params = opts[:form_params] || {}
|
694
|
+
|
695
|
+
# http body (model)
|
696
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
697
|
+
|
698
|
+
# return_type
|
699
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
700
|
+
|
701
|
+
# auth_names
|
702
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
703
|
+
|
704
|
+
new_options = opts.merge(
|
705
|
+
:header_params => header_params,
|
706
|
+
:query_params => query_params,
|
707
|
+
:form_params => form_params,
|
708
|
+
:body => post_body,
|
709
|
+
:auth_names => auth_names,
|
710
|
+
:return_type => return_type
|
711
|
+
)
|
712
|
+
|
713
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
714
|
+
if @api_client.config.debugging
|
715
|
+
@api_client.config.logger.debug "API called: RepositoriesRpmApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
716
|
+
end
|
717
|
+
return data, status_code, headers
|
718
|
+
end
|
719
|
+
|
482
720
|
# Sync from remote
|
483
721
|
# Trigger an asynchronous task to sync RPM content.
|
484
722
|
# @param rpm_rpm_repository_href [String]
|
@@ -95,14 +95,13 @@ module PulpRpmClient
|
|
95
95
|
# @option opts [Integer] :number__lte Filter results where number is less than or equal to value
|
96
96
|
# @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
|
97
97
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
98
|
-
# @option opts [Array<String>] :ordering Ordering
|
98
|
+
# @option opts [Array<String>] :ordering Ordering
|
99
99
|
# @option opts [DateTime] :pulp_created Filter results where pulp_created matches value
|
100
100
|
# @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
|
101
101
|
# @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
102
102
|
# @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
|
103
103
|
# @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
104
104
|
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
105
|
-
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
106
105
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
107
106
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
108
107
|
# @return [PaginatedRepositoryVersionResponseList]
|
@@ -125,14 +124,13 @@ module PulpRpmClient
|
|
125
124
|
# @option opts [Integer] :number__lte Filter results where number is less than or equal to value
|
126
125
|
# @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
|
127
126
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
128
|
-
# @option opts [Array<String>] :ordering Ordering
|
127
|
+
# @option opts [Array<String>] :ordering Ordering
|
129
128
|
# @option opts [DateTime] :pulp_created Filter results where pulp_created matches value
|
130
129
|
# @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
|
131
130
|
# @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
132
131
|
# @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
|
133
132
|
# @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
134
133
|
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
135
|
-
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
136
134
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
137
135
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
138
136
|
# @return [Array<(PaginatedRepositoryVersionResponseList, Integer, Hash)>] PaginatedRepositoryVersionResponseList data, response status code and response headers
|
@@ -170,7 +168,6 @@ module PulpRpmClient
|
|
170
168
|
query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
|
171
169
|
query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
|
172
170
|
query_params[:'pulp_created__range'] = @api_client.build_collection_param(opts[:'pulp_created__range'], :csv) if !opts[:'pulp_created__range'].nil?
|
173
|
-
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
174
171
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
175
172
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
176
173
|
|
@@ -0,0 +1,213 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpRpmClient
|
16
|
+
class MyPermissionsResponse
|
17
|
+
attr_accessor :permissions
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'permissions' => :'permissions'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'permissions' => :'Array<String>'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# List of attributes with nullable: true
|
34
|
+
def self.openapi_nullable
|
35
|
+
Set.new([
|
36
|
+
])
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
if (!attributes.is_a?(Hash))
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::MyPermissionsResponse` initialize method"
|
44
|
+
end
|
45
|
+
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::MyPermissionsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
50
|
+
end
|
51
|
+
h[k.to_sym] = v
|
52
|
+
}
|
53
|
+
|
54
|
+
if attributes.key?(:'permissions')
|
55
|
+
if (value = attributes[:'permissions']).is_a?(Array)
|
56
|
+
self.permissions = value
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properties with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
if @permissions.nil?
|
66
|
+
invalid_properties.push('invalid value for "permissions", permissions cannot be nil.')
|
67
|
+
end
|
68
|
+
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
return false if @permissions.nil?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
permissions == o.permissions
|
85
|
+
end
|
86
|
+
|
87
|
+
# @see the `==` method
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def eql?(o)
|
90
|
+
self == o
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Integer] Hash code
|
95
|
+
def hash
|
96
|
+
[permissions].hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def self.build_from_hash(attributes)
|
103
|
+
new.build_from_hash(attributes)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def build_from_hash(attributes)
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if type =~ /\AArray<(.*)>/i
|
113
|
+
# check to ensure the input is an array given that the attribute
|
114
|
+
# is documented as an array but the input is not
|
115
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
116
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
117
|
+
end
|
118
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
119
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
120
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
121
|
+
end
|
122
|
+
|
123
|
+
self
|
124
|
+
end
|
125
|
+
|
126
|
+
# Deserializes the data based on type
|
127
|
+
# @param string type Data type
|
128
|
+
# @param string value Value to be deserialized
|
129
|
+
# @return [Object] Deserialized data
|
130
|
+
def _deserialize(type, value)
|
131
|
+
case type.to_sym
|
132
|
+
when :DateTime
|
133
|
+
DateTime.parse(value)
|
134
|
+
when :Date
|
135
|
+
Date.parse(value)
|
136
|
+
when :String
|
137
|
+
value.to_s
|
138
|
+
when :Integer
|
139
|
+
value.to_i
|
140
|
+
when :Float
|
141
|
+
value.to_f
|
142
|
+
when :Boolean
|
143
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
144
|
+
true
|
145
|
+
else
|
146
|
+
false
|
147
|
+
end
|
148
|
+
when :Object
|
149
|
+
# generic object (usually a Hash), return directly
|
150
|
+
value
|
151
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
152
|
+
inner_type = Regexp.last_match[:inner_type]
|
153
|
+
value.map { |v| _deserialize(inner_type, v) }
|
154
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
155
|
+
k_type = Regexp.last_match[:k_type]
|
156
|
+
v_type = Regexp.last_match[:v_type]
|
157
|
+
{}.tap do |hash|
|
158
|
+
value.each do |k, v|
|
159
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
else # model
|
163
|
+
PulpRpmClient.const_get(type).build_from_hash(value)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the string representation of the object
|
168
|
+
# @return [String] String presentation of the object
|
169
|
+
def to_s
|
170
|
+
to_hash.to_s
|
171
|
+
end
|
172
|
+
|
173
|
+
# to_body is an alias to to_hash (backward compatibility)
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_body
|
176
|
+
to_hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the object in the form of hash
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_hash
|
182
|
+
hash = {}
|
183
|
+
self.class.attribute_map.each_pair do |attr, param|
|
184
|
+
value = self.send(attr)
|
185
|
+
if value.nil?
|
186
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
|
+
end
|
189
|
+
|
190
|
+
hash[param] = _to_hash(value)
|
191
|
+
end
|
192
|
+
hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Outputs non-array value in the form of hash
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
197
|
+
# @param [Object] value Any valid value
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
199
|
+
def _to_hash(value)
|
200
|
+
if value.is_a?(Array)
|
201
|
+
value.compact.map { |v| _to_hash(v) }
|
202
|
+
elsif value.is_a?(Hash)
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
205
|
+
end
|
206
|
+
elsif value.respond_to? :to_hash
|
207
|
+
value.to_hash
|
208
|
+
else
|
209
|
+
value
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|