pulp_file_client 1.10.5 → 1.11.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 +35 -12
- data/docs/AcsFileApi.md +235 -8
- data/docs/ContentFilesApi.md +5 -3
- data/docs/DistributionsFileApi.md +230 -2
- data/docs/FileFileContent.md +3 -1
- data/docs/FileFileRemote.md +3 -3
- data/docs/FileFileRemoteResponse.md +1 -1
- 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/PatchedfileFileRemote.md +3 -3
- data/docs/PublicationsFileApi.md +232 -2
- data/docs/RemotesFileApi.md +230 -2
- data/docs/Repair.md +17 -0
- data/docs/RepositoriesFileApi.md +233 -4
- data/docs/RepositoriesFileVersionsApi.md +6 -6
- data/lib/pulp_file_client/api/acs_file_api.rb +281 -15
- data/lib/pulp_file_client/api/content_files_api.rb +14 -3
- data/lib/pulp_file_client/api/distributions_file_api.rb +275 -3
- data/lib/pulp_file_client/api/publications_file_api.rb +278 -3
- data/lib/pulp_file_client/api/remotes_file_api.rb +275 -3
- data/lib/pulp_file_client/api/repositories_file_api.rb +277 -3
- data/lib/pulp_file_client/api/repositories_file_versions_api.rb +16 -12
- data/lib/pulp_file_client/api_client.rb +1 -1
- data/lib/pulp_file_client/models/file_file_alternate_content_source.rb +19 -0
- data/lib/pulp_file_client/models/file_file_content.rb +33 -4
- data/lib/pulp_file_client/models/file_file_distribution.rb +38 -0
- data/lib/pulp_file_client/models/file_file_publication.rb +15 -0
- data/lib/pulp_file_client/models/file_file_remote.rb +161 -3
- data/lib/pulp_file_client/models/file_file_remote_response.rb +1 -1
- data/lib/pulp_file_client/models/file_file_repository.rb +49 -0
- data/lib/pulp_file_client/models/{repository_version.rb → my_permissions_response.rb} +17 -12
- data/lib/pulp_file_client/models/{content_summary.rb → nested_role.rb} +28 -40
- data/lib/pulp_file_client/models/nested_role_response.rb +234 -0
- data/lib/pulp_file_client/models/object_roles_response.rb +213 -0
- data/lib/pulp_file_client/models/patchedfile_file_alternate_content_source.rb +15 -0
- data/lib/pulp_file_client/models/patchedfile_file_distribution.rb +30 -0
- data/lib/pulp_file_client/models/patchedfile_file_remote.rb +153 -3
- data/lib/pulp_file_client/models/patchedfile_file_repository.rb +45 -0
- data/lib/pulp_file_client/models/repair.rb +209 -0
- data/lib/pulp_file_client/version.rb +1 -1
- data/lib/pulp_file_client.rb +5 -2
- data/pulp_file_client.gemspec +1 -1
- data/spec/api/acs_file_api_spec.rb +52 -2
- data/spec/api/content_files_api_spec.rb +2 -1
- data/spec/api/distributions_file_api_spec.rb +51 -1
- data/spec/api/publications_file_api_spec.rb +52 -1
- data/spec/api/remotes_file_api_spec.rb +51 -1
- data/spec/api/repositories_file_api_spec.rb +52 -1
- data/spec/api/repositories_file_versions_api_spec.rb +2 -2
- data/spec/models/file_file_content_spec.rb +6 -0
- data/spec/models/my_permissions_response_spec.rb +41 -0
- data/spec/models/nested_role_response_spec.rb +53 -0
- data/spec/models/{content_summary_spec.rb → nested_role_spec.rb} +9 -9
- data/spec/models/object_roles_response_spec.rb +41 -0
- data/spec/models/{repository_version_spec.rb → repair_spec.rb} +7 -7
- metadata +48 -36
- data/docs/ContentSummary.md +0 -21
- data/docs/RepositoryVersion.md +0 -17
@@ -19,6 +19,74 @@ module PulpFileClient
|
|
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 file_file_alternate_content_source_href [String]
|
24
|
+
# @param nested_role [NestedRole]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NestedRoleResponse]
|
27
|
+
def add_role(file_file_alternate_content_source_href, nested_role, opts = {})
|
28
|
+
data, _status_code, _headers = add_role_with_http_info(file_file_alternate_content_source_href, nested_role, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a role for this object to users/groups.
|
33
|
+
# @param file_file_alternate_content_source_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(file_file_alternate_content_source_href, nested_role, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: AcsFileApi.add_role ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'file_file_alternate_content_source_href' is set
|
42
|
+
if @api_client.config.client_side_validation && file_file_alternate_content_source_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source_href' when calling AcsFileApi.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 AcsFileApi.add_role"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '{file_file_alternate_content_source_href}add_role/'.sub('{' + 'file_file_alternate_content_source_href' + '}', CGI.escape(file_file_alternate_content_source_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: AcsFileApi#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 file alternate content source
|
23
91
|
# Alternate Content Source ViewSet for File ACS support is provided as a tech preview in pulp_file.
|
24
92
|
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
@@ -155,7 +223,7 @@ module PulpFileClient
|
|
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 [String] :ordering
|
226
|
+
# @option opts [Array<String>] :ordering Ordering
|
159
227
|
# @option opts [String] :fields A list of fields to include in the response.
|
160
228
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
161
229
|
# @return [PaginatedfileFileAlternateContentSourceResponseList]
|
@@ -174,7 +242,7 @@ module PulpFileClient
|
|
174
242
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
175
243
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
176
244
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
177
|
-
# @option opts [String] :ordering
|
245
|
+
# @option opts [Array<String>] :ordering Ordering
|
178
246
|
# @option opts [String] :fields A list of fields to include in the response.
|
179
247
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
180
248
|
# @return [Array<(PaginatedfileFileAlternateContentSourceResponseList, Integer, Hash)>] PaginatedfileFileAlternateContentSourceResponseList data, response status code and response headers
|
@@ -182,6 +250,10 @@ module PulpFileClient
|
|
182
250
|
if @api_client.config.debugging
|
183
251
|
@api_client.config.logger.debug 'Calling API: AcsFileApi.list ...'
|
184
252
|
end
|
253
|
+
allowable_values = ["-file_filealternatecontentsource", "-group_roles", "-last_refreshed", "-name", "-paths", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-remote", "-user_roles", "file_filealternatecontentsource", "group_roles", "last_refreshed", "name", "paths", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "remote", "user_roles"]
|
254
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
255
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
256
|
+
end
|
185
257
|
# resource path
|
186
258
|
local_var_path = '/pulp/api/v3/acs/file/file/'
|
187
259
|
|
@@ -194,7 +266,7 @@ module PulpFileClient
|
|
194
266
|
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
195
267
|
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
196
268
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
197
|
-
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
269
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
198
270
|
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
199
271
|
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
200
272
|
|
@@ -231,6 +303,138 @@ module PulpFileClient
|
|
231
303
|
return data, status_code, headers
|
232
304
|
end
|
233
305
|
|
306
|
+
# List roles assigned to this object.
|
307
|
+
# @param file_file_alternate_content_source_href [String]
|
308
|
+
# @param [Hash] opts the optional parameters
|
309
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
310
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
311
|
+
# @return [ObjectRolesResponse]
|
312
|
+
def list_roles(file_file_alternate_content_source_href, opts = {})
|
313
|
+
data, _status_code, _headers = list_roles_with_http_info(file_file_alternate_content_source_href, opts)
|
314
|
+
data
|
315
|
+
end
|
316
|
+
|
317
|
+
# List roles assigned to this object.
|
318
|
+
# @param file_file_alternate_content_source_href [String]
|
319
|
+
# @param [Hash] opts the optional parameters
|
320
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
321
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
322
|
+
# @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
|
323
|
+
def list_roles_with_http_info(file_file_alternate_content_source_href, opts = {})
|
324
|
+
if @api_client.config.debugging
|
325
|
+
@api_client.config.logger.debug 'Calling API: AcsFileApi.list_roles ...'
|
326
|
+
end
|
327
|
+
# verify the required parameter 'file_file_alternate_content_source_href' is set
|
328
|
+
if @api_client.config.client_side_validation && file_file_alternate_content_source_href.nil?
|
329
|
+
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source_href' when calling AcsFileApi.list_roles"
|
330
|
+
end
|
331
|
+
# resource path
|
332
|
+
local_var_path = '{file_file_alternate_content_source_href}list_roles/'.sub('{' + 'file_file_alternate_content_source_href' + '}', CGI.escape(file_file_alternate_content_source_href.to_s).gsub('%2F', '/'))
|
333
|
+
|
334
|
+
# query parameters
|
335
|
+
query_params = opts[:query_params] || {}
|
336
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
337
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
338
|
+
|
339
|
+
# header parameters
|
340
|
+
header_params = opts[:header_params] || {}
|
341
|
+
# HTTP header 'Accept' (if needed)
|
342
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
343
|
+
|
344
|
+
# form parameters
|
345
|
+
form_params = opts[:form_params] || {}
|
346
|
+
|
347
|
+
# http body (model)
|
348
|
+
post_body = opts[:body]
|
349
|
+
|
350
|
+
# return_type
|
351
|
+
return_type = opts[:return_type] || 'ObjectRolesResponse'
|
352
|
+
|
353
|
+
# auth_names
|
354
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
355
|
+
|
356
|
+
new_options = opts.merge(
|
357
|
+
:header_params => header_params,
|
358
|
+
:query_params => query_params,
|
359
|
+
:form_params => form_params,
|
360
|
+
:body => post_body,
|
361
|
+
:auth_names => auth_names,
|
362
|
+
:return_type => return_type
|
363
|
+
)
|
364
|
+
|
365
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
366
|
+
if @api_client.config.debugging
|
367
|
+
@api_client.config.logger.debug "API called: AcsFileApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
368
|
+
end
|
369
|
+
return data, status_code, headers
|
370
|
+
end
|
371
|
+
|
372
|
+
# List permissions available to the current user on this object.
|
373
|
+
# @param file_file_alternate_content_source_href [String]
|
374
|
+
# @param [Hash] opts the optional parameters
|
375
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
376
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
377
|
+
# @return [MyPermissionsResponse]
|
378
|
+
def my_permissions(file_file_alternate_content_source_href, opts = {})
|
379
|
+
data, _status_code, _headers = my_permissions_with_http_info(file_file_alternate_content_source_href, opts)
|
380
|
+
data
|
381
|
+
end
|
382
|
+
|
383
|
+
# List permissions available to the current user on this object.
|
384
|
+
# @param file_file_alternate_content_source_href [String]
|
385
|
+
# @param [Hash] opts the optional parameters
|
386
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
387
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
388
|
+
# @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
|
389
|
+
def my_permissions_with_http_info(file_file_alternate_content_source_href, opts = {})
|
390
|
+
if @api_client.config.debugging
|
391
|
+
@api_client.config.logger.debug 'Calling API: AcsFileApi.my_permissions ...'
|
392
|
+
end
|
393
|
+
# verify the required parameter 'file_file_alternate_content_source_href' is set
|
394
|
+
if @api_client.config.client_side_validation && file_file_alternate_content_source_href.nil?
|
395
|
+
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source_href' when calling AcsFileApi.my_permissions"
|
396
|
+
end
|
397
|
+
# resource path
|
398
|
+
local_var_path = '{file_file_alternate_content_source_href}my_permissions/'.sub('{' + 'file_file_alternate_content_source_href' + '}', CGI.escape(file_file_alternate_content_source_href.to_s).gsub('%2F', '/'))
|
399
|
+
|
400
|
+
# query parameters
|
401
|
+
query_params = opts[:query_params] || {}
|
402
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
403
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
404
|
+
|
405
|
+
# header parameters
|
406
|
+
header_params = opts[:header_params] || {}
|
407
|
+
# HTTP header 'Accept' (if needed)
|
408
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
409
|
+
|
410
|
+
# form parameters
|
411
|
+
form_params = opts[:form_params] || {}
|
412
|
+
|
413
|
+
# http body (model)
|
414
|
+
post_body = opts[:body]
|
415
|
+
|
416
|
+
# return_type
|
417
|
+
return_type = opts[:return_type] || 'MyPermissionsResponse'
|
418
|
+
|
419
|
+
# auth_names
|
420
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
421
|
+
|
422
|
+
new_options = opts.merge(
|
423
|
+
:header_params => header_params,
|
424
|
+
:query_params => query_params,
|
425
|
+
:form_params => form_params,
|
426
|
+
:body => post_body,
|
427
|
+
:auth_names => auth_names,
|
428
|
+
:return_type => return_type
|
429
|
+
)
|
430
|
+
|
431
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
432
|
+
if @api_client.config.debugging
|
433
|
+
@api_client.config.logger.debug "API called: AcsFileApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
434
|
+
end
|
435
|
+
return data, status_code, headers
|
436
|
+
end
|
437
|
+
|
234
438
|
# Update a file alternate content source
|
235
439
|
# Trigger an asynchronous partial update task
|
236
440
|
# @param file_file_alternate_content_source_href [String]
|
@@ -369,22 +573,22 @@ module PulpFileClient
|
|
369
573
|
return data, status_code, headers
|
370
574
|
end
|
371
575
|
|
576
|
+
# Refresh metadata
|
372
577
|
# Trigger an asynchronous task to create Alternate Content Source content.
|
373
578
|
# @param file_file_alternate_content_source_href [String]
|
374
|
-
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
375
579
|
# @param [Hash] opts the optional parameters
|
376
580
|
# @return [TaskGroupOperationResponse]
|
377
|
-
def refresh(file_file_alternate_content_source_href,
|
378
|
-
data, _status_code, _headers = refresh_with_http_info(file_file_alternate_content_source_href,
|
581
|
+
def refresh(file_file_alternate_content_source_href, opts = {})
|
582
|
+
data, _status_code, _headers = refresh_with_http_info(file_file_alternate_content_source_href, opts)
|
379
583
|
data
|
380
584
|
end
|
381
585
|
|
586
|
+
# Refresh metadata
|
382
587
|
# Trigger an asynchronous task to create Alternate Content Source content.
|
383
588
|
# @param file_file_alternate_content_source_href [String]
|
384
|
-
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
385
589
|
# @param [Hash] opts the optional parameters
|
386
590
|
# @return [Array<(TaskGroupOperationResponse, Integer, Hash)>] TaskGroupOperationResponse data, response status code and response headers
|
387
|
-
def refresh_with_http_info(file_file_alternate_content_source_href,
|
591
|
+
def refresh_with_http_info(file_file_alternate_content_source_href, opts = {})
|
388
592
|
if @api_client.config.debugging
|
389
593
|
@api_client.config.logger.debug 'Calling API: AcsFileApi.refresh ...'
|
390
594
|
end
|
@@ -392,10 +596,6 @@ module PulpFileClient
|
|
392
596
|
if @api_client.config.client_side_validation && file_file_alternate_content_source_href.nil?
|
393
597
|
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source_href' when calling AcsFileApi.refresh"
|
394
598
|
end
|
395
|
-
# verify the required parameter 'file_file_alternate_content_source' is set
|
396
|
-
if @api_client.config.client_side_validation && file_file_alternate_content_source.nil?
|
397
|
-
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source' when calling AcsFileApi.refresh"
|
398
|
-
end
|
399
599
|
# resource path
|
400
600
|
local_var_path = '{file_file_alternate_content_source_href}refresh/'.sub('{' + 'file_file_alternate_content_source_href' + '}', CGI.escape(file_file_alternate_content_source_href.to_s).gsub('%2F', '/'))
|
401
601
|
|
@@ -406,14 +606,12 @@ module PulpFileClient
|
|
406
606
|
header_params = opts[:header_params] || {}
|
407
607
|
# HTTP header 'Accept' (if needed)
|
408
608
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
409
|
-
# HTTP header 'Content-Type'
|
410
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
411
609
|
|
412
610
|
# form parameters
|
413
611
|
form_params = opts[:form_params] || {}
|
414
612
|
|
415
613
|
# http body (model)
|
416
|
-
post_body = opts[:body]
|
614
|
+
post_body = opts[:body]
|
417
615
|
|
418
616
|
# return_type
|
419
617
|
return_type = opts[:return_type] || 'TaskGroupOperationResponse'
|
@@ -437,6 +635,74 @@ module PulpFileClient
|
|
437
635
|
return data, status_code, headers
|
438
636
|
end
|
439
637
|
|
638
|
+
# Remove a role for this object from users/groups.
|
639
|
+
# @param file_file_alternate_content_source_href [String]
|
640
|
+
# @param nested_role [NestedRole]
|
641
|
+
# @param [Hash] opts the optional parameters
|
642
|
+
# @return [NestedRoleResponse]
|
643
|
+
def remove_role(file_file_alternate_content_source_href, nested_role, opts = {})
|
644
|
+
data, _status_code, _headers = remove_role_with_http_info(file_file_alternate_content_source_href, nested_role, opts)
|
645
|
+
data
|
646
|
+
end
|
647
|
+
|
648
|
+
# Remove a role for this object from users/groups.
|
649
|
+
# @param file_file_alternate_content_source_href [String]
|
650
|
+
# @param nested_role [NestedRole]
|
651
|
+
# @param [Hash] opts the optional parameters
|
652
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
653
|
+
def remove_role_with_http_info(file_file_alternate_content_source_href, nested_role, opts = {})
|
654
|
+
if @api_client.config.debugging
|
655
|
+
@api_client.config.logger.debug 'Calling API: AcsFileApi.remove_role ...'
|
656
|
+
end
|
657
|
+
# verify the required parameter 'file_file_alternate_content_source_href' is set
|
658
|
+
if @api_client.config.client_side_validation && file_file_alternate_content_source_href.nil?
|
659
|
+
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source_href' when calling AcsFileApi.remove_role"
|
660
|
+
end
|
661
|
+
# verify the required parameter 'nested_role' is set
|
662
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
663
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling AcsFileApi.remove_role"
|
664
|
+
end
|
665
|
+
# resource path
|
666
|
+
local_var_path = '{file_file_alternate_content_source_href}remove_role/'.sub('{' + 'file_file_alternate_content_source_href' + '}', CGI.escape(file_file_alternate_content_source_href.to_s).gsub('%2F', '/'))
|
667
|
+
|
668
|
+
# query parameters
|
669
|
+
query_params = opts[:query_params] || {}
|
670
|
+
|
671
|
+
# header parameters
|
672
|
+
header_params = opts[:header_params] || {}
|
673
|
+
# HTTP header 'Accept' (if needed)
|
674
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
675
|
+
# HTTP header 'Content-Type'
|
676
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
677
|
+
|
678
|
+
# form parameters
|
679
|
+
form_params = opts[:form_params] || {}
|
680
|
+
|
681
|
+
# http body (model)
|
682
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
683
|
+
|
684
|
+
# return_type
|
685
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
686
|
+
|
687
|
+
# auth_names
|
688
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
689
|
+
|
690
|
+
new_options = opts.merge(
|
691
|
+
:header_params => header_params,
|
692
|
+
:query_params => query_params,
|
693
|
+
:form_params => form_params,
|
694
|
+
:body => post_body,
|
695
|
+
:auth_names => auth_names,
|
696
|
+
:return_type => return_type
|
697
|
+
)
|
698
|
+
|
699
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
700
|
+
if @api_client.config.debugging
|
701
|
+
@api_client.config.logger.debug "API called: AcsFileApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
702
|
+
end
|
703
|
+
return data, status_code, headers
|
704
|
+
end
|
705
|
+
|
440
706
|
# Update a file alternate content source
|
441
707
|
# Trigger an asynchronous update task
|
442
708
|
# @param file_file_alternate_content_source_href [String]
|
@@ -26,6 +26,7 @@ module PulpFileClient
|
|
26
26
|
# @option opts [String] :artifact Artifact file representing the physical content
|
27
27
|
# @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
|
28
28
|
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
29
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the artifact of the content unit.
|
29
30
|
# @return [AsyncOperationResponse]
|
30
31
|
def create(relative_path, opts = {})
|
31
32
|
data, _status_code, _headers = create_with_http_info(relative_path, opts)
|
@@ -39,6 +40,7 @@ module PulpFileClient
|
|
39
40
|
# @option opts [String] :artifact Artifact file representing the physical content
|
40
41
|
# @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
|
41
42
|
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
43
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the artifact of the content unit.
|
42
44
|
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
43
45
|
def create_with_http_info(relative_path, opts = {})
|
44
46
|
if @api_client.config.debugging
|
@@ -48,6 +50,10 @@ module PulpFileClient
|
|
48
50
|
if @api_client.config.client_side_validation && relative_path.nil?
|
49
51
|
fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentFilesApi.create"
|
50
52
|
end
|
53
|
+
if @api_client.config.client_side_validation && relative_path.to_s.length < 1
|
54
|
+
fail ArgumentError, 'invalid value for "relative_path" when calling ContentFilesApi.create, the character length must be great than or equal to 1.'
|
55
|
+
end
|
56
|
+
|
51
57
|
# resource path
|
52
58
|
local_var_path = '/pulp/api/v3/content/file/files/'
|
53
59
|
|
@@ -67,6 +73,7 @@ module PulpFileClient
|
|
67
73
|
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
68
74
|
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
69
75
|
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
76
|
+
form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
|
70
77
|
|
71
78
|
# http body (model)
|
72
79
|
post_body = opts[:body]
|
@@ -98,7 +105,7 @@ module PulpFileClient
|
|
98
105
|
# @param [Hash] opts the optional parameters
|
99
106
|
# @option opts [Integer] :limit Number of results to return per page.
|
100
107
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
101
|
-
# @option opts [String] :ordering
|
108
|
+
# @option opts [Array<String>] :ordering Ordering
|
102
109
|
# @option opts [String] :relative_path Filter results where relative_path matches value
|
103
110
|
# @option opts [String] :repository_version Repository Version referenced by HREF
|
104
111
|
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
@@ -117,7 +124,7 @@ module PulpFileClient
|
|
117
124
|
# @param [Hash] opts the optional parameters
|
118
125
|
# @option opts [Integer] :limit Number of results to return per page.
|
119
126
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
120
|
-
# @option opts [String] :ordering
|
127
|
+
# @option opts [Array<String>] :ordering Ordering
|
121
128
|
# @option opts [String] :relative_path Filter results where relative_path matches value
|
122
129
|
# @option opts [String] :repository_version Repository Version referenced by HREF
|
123
130
|
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
@@ -130,6 +137,10 @@ module PulpFileClient
|
|
130
137
|
if @api_client.config.debugging
|
131
138
|
@api_client.config.logger.debug 'Calling API: ContentFilesApi.list ...'
|
132
139
|
end
|
140
|
+
allowable_values = ["-_artifacts", "-content_ptr", "-contentartifact", "-digest", "-group_roles", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-relative_path", "-repositories", "-timestamp_of_interest", "-upstream_id", "-user_roles", "-version_memberships", "_artifacts", "content_ptr", "contentartifact", "digest", "group_roles", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "relative_path", "repositories", "timestamp_of_interest", "upstream_id", "user_roles", "version_memberships"]
|
141
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
142
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
143
|
+
end
|
133
144
|
# resource path
|
134
145
|
local_var_path = '/pulp/api/v3/content/file/files/'
|
135
146
|
|
@@ -137,7 +148,7 @@ module PulpFileClient
|
|
137
148
|
query_params = opts[:query_params] || {}
|
138
149
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
139
150
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
140
|
-
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
151
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
141
152
|
query_params[:'relative_path'] = opts[:'relative_path'] if !opts[:'relative_path'].nil?
|
142
153
|
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
143
154
|
query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
|