pulp_file_client 1.10.5 → 1.11.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 +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_distribution_href [String]
|
24
|
+
# @param nested_role [NestedRole]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NestedRoleResponse]
|
27
|
+
def add_role(file_file_distribution_href, nested_role, opts = {})
|
28
|
+
data, _status_code, _headers = add_role_with_http_info(file_file_distribution_href, nested_role, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a role for this object to users/groups.
|
33
|
+
# @param file_file_distribution_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_distribution_href, nested_role, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: DistributionsFileApi.add_role ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'file_file_distribution_href' is set
|
42
|
+
if @api_client.config.client_side_validation && file_file_distribution_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'file_file_distribution_href' when calling DistributionsFileApi.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 DistributionsFileApi.add_role"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '{file_file_distribution_href}add_role/'.sub('{' + 'file_file_distribution_href' + '}', CGI.escape(file_file_distribution_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: DistributionsFileApi#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 distribution
|
23
91
|
# Trigger an asynchronous create task
|
24
92
|
# @param file_file_distribution [FileFileDistribution]
|
@@ -159,7 +227,7 @@ module PulpFileClient
|
|
159
227
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
160
228
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
161
229
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
162
|
-
# @option opts [String] :ordering
|
230
|
+
# @option opts [Array<String>] :ordering Ordering
|
163
231
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
164
232
|
# @option opts [String] :fields A list of fields to include in the response.
|
165
233
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
@@ -183,7 +251,7 @@ module PulpFileClient
|
|
183
251
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
184
252
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
185
253
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
186
|
-
# @option opts [String] :ordering
|
254
|
+
# @option opts [Array<String>] :ordering Ordering
|
187
255
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
188
256
|
# @option opts [String] :fields A list of fields to include in the response.
|
189
257
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
@@ -192,6 +260,10 @@ module PulpFileClient
|
|
192
260
|
if @api_client.config.debugging
|
193
261
|
@api_client.config.logger.debug 'Calling API: DistributionsFileApi.list ...'
|
194
262
|
end
|
263
|
+
allowable_values = ["-base_path", "-content_guard", "-file_filedistribution", "-group_roles", "-name", "-pk", "-publication", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-remote", "-repository", "-repository_version", "-user_roles", "base_path", "content_guard", "file_filedistribution", "group_roles", "name", "pk", "publication", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "remote", "repository", "repository_version", "user_roles"]
|
264
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
265
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
266
|
+
end
|
195
267
|
# resource path
|
196
268
|
local_var_path = '/pulp/api/v3/distributions/file/file/'
|
197
269
|
|
@@ -208,7 +280,7 @@ module PulpFileClient
|
|
208
280
|
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
209
281
|
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
210
282
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
211
|
-
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
283
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
212
284
|
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
213
285
|
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
214
286
|
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
@@ -246,6 +318,138 @@ module PulpFileClient
|
|
246
318
|
return data, status_code, headers
|
247
319
|
end
|
248
320
|
|
321
|
+
# List roles assigned to this object.
|
322
|
+
# @param file_file_distribution_href [String]
|
323
|
+
# @param [Hash] opts the optional parameters
|
324
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
325
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
326
|
+
# @return [ObjectRolesResponse]
|
327
|
+
def list_roles(file_file_distribution_href, opts = {})
|
328
|
+
data, _status_code, _headers = list_roles_with_http_info(file_file_distribution_href, opts)
|
329
|
+
data
|
330
|
+
end
|
331
|
+
|
332
|
+
# List roles assigned to this object.
|
333
|
+
# @param file_file_distribution_href [String]
|
334
|
+
# @param [Hash] opts the optional parameters
|
335
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
336
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
337
|
+
# @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
|
338
|
+
def list_roles_with_http_info(file_file_distribution_href, opts = {})
|
339
|
+
if @api_client.config.debugging
|
340
|
+
@api_client.config.logger.debug 'Calling API: DistributionsFileApi.list_roles ...'
|
341
|
+
end
|
342
|
+
# verify the required parameter 'file_file_distribution_href' is set
|
343
|
+
if @api_client.config.client_side_validation && file_file_distribution_href.nil?
|
344
|
+
fail ArgumentError, "Missing the required parameter 'file_file_distribution_href' when calling DistributionsFileApi.list_roles"
|
345
|
+
end
|
346
|
+
# resource path
|
347
|
+
local_var_path = '{file_file_distribution_href}list_roles/'.sub('{' + 'file_file_distribution_href' + '}', CGI.escape(file_file_distribution_href.to_s).gsub('%2F', '/'))
|
348
|
+
|
349
|
+
# query parameters
|
350
|
+
query_params = opts[:query_params] || {}
|
351
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
352
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
353
|
+
|
354
|
+
# header parameters
|
355
|
+
header_params = opts[:header_params] || {}
|
356
|
+
# HTTP header 'Accept' (if needed)
|
357
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
358
|
+
|
359
|
+
# form parameters
|
360
|
+
form_params = opts[:form_params] || {}
|
361
|
+
|
362
|
+
# http body (model)
|
363
|
+
post_body = opts[:body]
|
364
|
+
|
365
|
+
# return_type
|
366
|
+
return_type = opts[:return_type] || 'ObjectRolesResponse'
|
367
|
+
|
368
|
+
# auth_names
|
369
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
370
|
+
|
371
|
+
new_options = opts.merge(
|
372
|
+
:header_params => header_params,
|
373
|
+
:query_params => query_params,
|
374
|
+
:form_params => form_params,
|
375
|
+
:body => post_body,
|
376
|
+
:auth_names => auth_names,
|
377
|
+
:return_type => return_type
|
378
|
+
)
|
379
|
+
|
380
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
381
|
+
if @api_client.config.debugging
|
382
|
+
@api_client.config.logger.debug "API called: DistributionsFileApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
383
|
+
end
|
384
|
+
return data, status_code, headers
|
385
|
+
end
|
386
|
+
|
387
|
+
# List permissions available to the current user on this object.
|
388
|
+
# @param file_file_distribution_href [String]
|
389
|
+
# @param [Hash] opts the optional parameters
|
390
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
391
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
392
|
+
# @return [MyPermissionsResponse]
|
393
|
+
def my_permissions(file_file_distribution_href, opts = {})
|
394
|
+
data, _status_code, _headers = my_permissions_with_http_info(file_file_distribution_href, opts)
|
395
|
+
data
|
396
|
+
end
|
397
|
+
|
398
|
+
# List permissions available to the current user on this object.
|
399
|
+
# @param file_file_distribution_href [String]
|
400
|
+
# @param [Hash] opts the optional parameters
|
401
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
402
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
403
|
+
# @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
|
404
|
+
def my_permissions_with_http_info(file_file_distribution_href, opts = {})
|
405
|
+
if @api_client.config.debugging
|
406
|
+
@api_client.config.logger.debug 'Calling API: DistributionsFileApi.my_permissions ...'
|
407
|
+
end
|
408
|
+
# verify the required parameter 'file_file_distribution_href' is set
|
409
|
+
if @api_client.config.client_side_validation && file_file_distribution_href.nil?
|
410
|
+
fail ArgumentError, "Missing the required parameter 'file_file_distribution_href' when calling DistributionsFileApi.my_permissions"
|
411
|
+
end
|
412
|
+
# resource path
|
413
|
+
local_var_path = '{file_file_distribution_href}my_permissions/'.sub('{' + 'file_file_distribution_href' + '}', CGI.escape(file_file_distribution_href.to_s).gsub('%2F', '/'))
|
414
|
+
|
415
|
+
# query parameters
|
416
|
+
query_params = opts[:query_params] || {}
|
417
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
418
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
419
|
+
|
420
|
+
# header parameters
|
421
|
+
header_params = opts[:header_params] || {}
|
422
|
+
# HTTP header 'Accept' (if needed)
|
423
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
424
|
+
|
425
|
+
# form parameters
|
426
|
+
form_params = opts[:form_params] || {}
|
427
|
+
|
428
|
+
# http body (model)
|
429
|
+
post_body = opts[:body]
|
430
|
+
|
431
|
+
# return_type
|
432
|
+
return_type = opts[:return_type] || 'MyPermissionsResponse'
|
433
|
+
|
434
|
+
# auth_names
|
435
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
436
|
+
|
437
|
+
new_options = opts.merge(
|
438
|
+
:header_params => header_params,
|
439
|
+
:query_params => query_params,
|
440
|
+
:form_params => form_params,
|
441
|
+
:body => post_body,
|
442
|
+
:auth_names => auth_names,
|
443
|
+
:return_type => return_type
|
444
|
+
)
|
445
|
+
|
446
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
447
|
+
if @api_client.config.debugging
|
448
|
+
@api_client.config.logger.debug "API called: DistributionsFileApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
449
|
+
end
|
450
|
+
return data, status_code, headers
|
451
|
+
end
|
452
|
+
|
249
453
|
# Update a file distribution
|
250
454
|
# Trigger an asynchronous partial update task
|
251
455
|
# @param file_file_distribution_href [String]
|
@@ -384,6 +588,74 @@ module PulpFileClient
|
|
384
588
|
return data, status_code, headers
|
385
589
|
end
|
386
590
|
|
591
|
+
# Remove a role for this object from users/groups.
|
592
|
+
# @param file_file_distribution_href [String]
|
593
|
+
# @param nested_role [NestedRole]
|
594
|
+
# @param [Hash] opts the optional parameters
|
595
|
+
# @return [NestedRoleResponse]
|
596
|
+
def remove_role(file_file_distribution_href, nested_role, opts = {})
|
597
|
+
data, _status_code, _headers = remove_role_with_http_info(file_file_distribution_href, nested_role, opts)
|
598
|
+
data
|
599
|
+
end
|
600
|
+
|
601
|
+
# Remove a role for this object from users/groups.
|
602
|
+
# @param file_file_distribution_href [String]
|
603
|
+
# @param nested_role [NestedRole]
|
604
|
+
# @param [Hash] opts the optional parameters
|
605
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
606
|
+
def remove_role_with_http_info(file_file_distribution_href, nested_role, opts = {})
|
607
|
+
if @api_client.config.debugging
|
608
|
+
@api_client.config.logger.debug 'Calling API: DistributionsFileApi.remove_role ...'
|
609
|
+
end
|
610
|
+
# verify the required parameter 'file_file_distribution_href' is set
|
611
|
+
if @api_client.config.client_side_validation && file_file_distribution_href.nil?
|
612
|
+
fail ArgumentError, "Missing the required parameter 'file_file_distribution_href' when calling DistributionsFileApi.remove_role"
|
613
|
+
end
|
614
|
+
# verify the required parameter 'nested_role' is set
|
615
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
616
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling DistributionsFileApi.remove_role"
|
617
|
+
end
|
618
|
+
# resource path
|
619
|
+
local_var_path = '{file_file_distribution_href}remove_role/'.sub('{' + 'file_file_distribution_href' + '}', CGI.escape(file_file_distribution_href.to_s).gsub('%2F', '/'))
|
620
|
+
|
621
|
+
# query parameters
|
622
|
+
query_params = opts[:query_params] || {}
|
623
|
+
|
624
|
+
# header parameters
|
625
|
+
header_params = opts[:header_params] || {}
|
626
|
+
# HTTP header 'Accept' (if needed)
|
627
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
628
|
+
# HTTP header 'Content-Type'
|
629
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
630
|
+
|
631
|
+
# form parameters
|
632
|
+
form_params = opts[:form_params] || {}
|
633
|
+
|
634
|
+
# http body (model)
|
635
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
636
|
+
|
637
|
+
# return_type
|
638
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
639
|
+
|
640
|
+
# auth_names
|
641
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
642
|
+
|
643
|
+
new_options = opts.merge(
|
644
|
+
:header_params => header_params,
|
645
|
+
:query_params => query_params,
|
646
|
+
:form_params => form_params,
|
647
|
+
:body => post_body,
|
648
|
+
:auth_names => auth_names,
|
649
|
+
:return_type => return_type
|
650
|
+
)
|
651
|
+
|
652
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
653
|
+
if @api_client.config.debugging
|
654
|
+
@api_client.config.logger.debug "API called: DistributionsFileApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
655
|
+
end
|
656
|
+
return data, status_code, headers
|
657
|
+
end
|
658
|
+
|
387
659
|
# Update a file distribution
|
388
660
|
# Trigger an asynchronous update task
|
389
661
|
# @param file_file_distribution_href [String]
|
@@ -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_publication_href [String]
|
24
|
+
# @param nested_role [NestedRole]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NestedRoleResponse]
|
27
|
+
def add_role(file_file_publication_href, nested_role, opts = {})
|
28
|
+
data, _status_code, _headers = add_role_with_http_info(file_file_publication_href, nested_role, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a role for this object to users/groups.
|
33
|
+
# @param file_file_publication_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_publication_href, nested_role, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: PublicationsFileApi.add_role ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'file_file_publication_href' is set
|
42
|
+
if @api_client.config.client_side_validation && file_file_publication_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'file_file_publication_href' when calling PublicationsFileApi.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 PublicationsFileApi.add_role"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '{file_file_publication_href}add_role/'.sub('{' + 'file_file_publication_href' + '}', CGI.escape(file_file_publication_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: PublicationsFileApi#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 publication
|
23
91
|
# Trigger an asynchronous task to publish file content.
|
24
92
|
# @param file_file_publication [FileFilePublication]
|
@@ -150,13 +218,14 @@ module PulpFileClient
|
|
150
218
|
# @option opts [String] :content__in Content Unit referenced by HREF
|
151
219
|
# @option opts [Integer] :limit Number of results to return per page.
|
152
220
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
153
|
-
# @option opts [String] :ordering
|
221
|
+
# @option opts [Array<String>] :ordering Ordering
|
154
222
|
# @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
|
155
223
|
# @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
|
156
224
|
# @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
157
225
|
# @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
|
158
226
|
# @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
159
227
|
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
228
|
+
# @option opts [String] :repository Repository referenced by HREF
|
160
229
|
# @option opts [String] :repository_version Repository Version referenced by HREF
|
161
230
|
# @option opts [String] :fields A list of fields to include in the response.
|
162
231
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
@@ -173,13 +242,14 @@ module PulpFileClient
|
|
173
242
|
# @option opts [String] :content__in Content Unit referenced by HREF
|
174
243
|
# @option opts [Integer] :limit Number of results to return per page.
|
175
244
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
176
|
-
# @option opts [String] :ordering
|
245
|
+
# @option opts [Array<String>] :ordering Ordering
|
177
246
|
# @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
|
178
247
|
# @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
|
179
248
|
# @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
180
249
|
# @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
|
181
250
|
# @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
182
251
|
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
252
|
+
# @option opts [String] :repository Repository referenced by HREF
|
183
253
|
# @option opts [String] :repository_version Repository Version referenced by HREF
|
184
254
|
# @option opts [String] :fields A list of fields to include in the response.
|
185
255
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
@@ -188,6 +258,10 @@ module PulpFileClient
|
|
188
258
|
if @api_client.config.debugging
|
189
259
|
@api_client.config.logger.debug 'Calling API: PublicationsFileApi.list ...'
|
190
260
|
end
|
261
|
+
allowable_values = ["-complete", "-distribution", "-file_filepublication", "-group_roles", "-pass_through", "-pk", "-published_artifact", "-published_metadata", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-repository_version", "-user_roles", "complete", "distribution", "file_filepublication", "group_roles", "pass_through", "pk", "published_artifact", "published_metadata", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "repository_version", "user_roles"]
|
262
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
263
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
264
|
+
end
|
191
265
|
# resource path
|
192
266
|
local_var_path = '/pulp/api/v3/publications/file/file/'
|
193
267
|
|
@@ -197,13 +271,14 @@ module PulpFileClient
|
|
197
271
|
query_params[:'content__in'] = opts[:'content__in'] if !opts[:'content__in'].nil?
|
198
272
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
199
273
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
200
|
-
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
274
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
201
275
|
query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
|
202
276
|
query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
|
203
277
|
query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
|
204
278
|
query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
|
205
279
|
query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
|
206
280
|
query_params[:'pulp_created__range'] = @api_client.build_collection_param(opts[:'pulp_created__range'], :csv) if !opts[:'pulp_created__range'].nil?
|
281
|
+
query_params[:'repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
207
282
|
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
208
283
|
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
209
284
|
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
@@ -241,6 +316,138 @@ module PulpFileClient
|
|
241
316
|
return data, status_code, headers
|
242
317
|
end
|
243
318
|
|
319
|
+
# List roles assigned to this object.
|
320
|
+
# @param file_file_publication_href [String]
|
321
|
+
# @param [Hash] opts the optional parameters
|
322
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
323
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
324
|
+
# @return [ObjectRolesResponse]
|
325
|
+
def list_roles(file_file_publication_href, opts = {})
|
326
|
+
data, _status_code, _headers = list_roles_with_http_info(file_file_publication_href, opts)
|
327
|
+
data
|
328
|
+
end
|
329
|
+
|
330
|
+
# List roles assigned to this object.
|
331
|
+
# @param file_file_publication_href [String]
|
332
|
+
# @param [Hash] opts the optional parameters
|
333
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
334
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
335
|
+
# @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
|
336
|
+
def list_roles_with_http_info(file_file_publication_href, opts = {})
|
337
|
+
if @api_client.config.debugging
|
338
|
+
@api_client.config.logger.debug 'Calling API: PublicationsFileApi.list_roles ...'
|
339
|
+
end
|
340
|
+
# verify the required parameter 'file_file_publication_href' is set
|
341
|
+
if @api_client.config.client_side_validation && file_file_publication_href.nil?
|
342
|
+
fail ArgumentError, "Missing the required parameter 'file_file_publication_href' when calling PublicationsFileApi.list_roles"
|
343
|
+
end
|
344
|
+
# resource path
|
345
|
+
local_var_path = '{file_file_publication_href}list_roles/'.sub('{' + 'file_file_publication_href' + '}', CGI.escape(file_file_publication_href.to_s).gsub('%2F', '/'))
|
346
|
+
|
347
|
+
# query parameters
|
348
|
+
query_params = opts[:query_params] || {}
|
349
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
350
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
351
|
+
|
352
|
+
# header parameters
|
353
|
+
header_params = opts[:header_params] || {}
|
354
|
+
# HTTP header 'Accept' (if needed)
|
355
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
356
|
+
|
357
|
+
# form parameters
|
358
|
+
form_params = opts[:form_params] || {}
|
359
|
+
|
360
|
+
# http body (model)
|
361
|
+
post_body = opts[:body]
|
362
|
+
|
363
|
+
# return_type
|
364
|
+
return_type = opts[:return_type] || 'ObjectRolesResponse'
|
365
|
+
|
366
|
+
# auth_names
|
367
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
368
|
+
|
369
|
+
new_options = opts.merge(
|
370
|
+
:header_params => header_params,
|
371
|
+
:query_params => query_params,
|
372
|
+
:form_params => form_params,
|
373
|
+
:body => post_body,
|
374
|
+
:auth_names => auth_names,
|
375
|
+
:return_type => return_type
|
376
|
+
)
|
377
|
+
|
378
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
379
|
+
if @api_client.config.debugging
|
380
|
+
@api_client.config.logger.debug "API called: PublicationsFileApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
381
|
+
end
|
382
|
+
return data, status_code, headers
|
383
|
+
end
|
384
|
+
|
385
|
+
# List permissions available to the current user on this object.
|
386
|
+
# @param file_file_publication_href [String]
|
387
|
+
# @param [Hash] opts the optional parameters
|
388
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
389
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
390
|
+
# @return [MyPermissionsResponse]
|
391
|
+
def my_permissions(file_file_publication_href, opts = {})
|
392
|
+
data, _status_code, _headers = my_permissions_with_http_info(file_file_publication_href, opts)
|
393
|
+
data
|
394
|
+
end
|
395
|
+
|
396
|
+
# List permissions available to the current user on this object.
|
397
|
+
# @param file_file_publication_href [String]
|
398
|
+
# @param [Hash] opts the optional parameters
|
399
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
400
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
401
|
+
# @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
|
402
|
+
def my_permissions_with_http_info(file_file_publication_href, opts = {})
|
403
|
+
if @api_client.config.debugging
|
404
|
+
@api_client.config.logger.debug 'Calling API: PublicationsFileApi.my_permissions ...'
|
405
|
+
end
|
406
|
+
# verify the required parameter 'file_file_publication_href' is set
|
407
|
+
if @api_client.config.client_side_validation && file_file_publication_href.nil?
|
408
|
+
fail ArgumentError, "Missing the required parameter 'file_file_publication_href' when calling PublicationsFileApi.my_permissions"
|
409
|
+
end
|
410
|
+
# resource path
|
411
|
+
local_var_path = '{file_file_publication_href}my_permissions/'.sub('{' + 'file_file_publication_href' + '}', CGI.escape(file_file_publication_href.to_s).gsub('%2F', '/'))
|
412
|
+
|
413
|
+
# query parameters
|
414
|
+
query_params = opts[:query_params] || {}
|
415
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
416
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
417
|
+
|
418
|
+
# header parameters
|
419
|
+
header_params = opts[:header_params] || {}
|
420
|
+
# HTTP header 'Accept' (if needed)
|
421
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
422
|
+
|
423
|
+
# form parameters
|
424
|
+
form_params = opts[:form_params] || {}
|
425
|
+
|
426
|
+
# http body (model)
|
427
|
+
post_body = opts[:body]
|
428
|
+
|
429
|
+
# return_type
|
430
|
+
return_type = opts[:return_type] || 'MyPermissionsResponse'
|
431
|
+
|
432
|
+
# auth_names
|
433
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
434
|
+
|
435
|
+
new_options = opts.merge(
|
436
|
+
:header_params => header_params,
|
437
|
+
:query_params => query_params,
|
438
|
+
:form_params => form_params,
|
439
|
+
:body => post_body,
|
440
|
+
:auth_names => auth_names,
|
441
|
+
:return_type => return_type
|
442
|
+
)
|
443
|
+
|
444
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
445
|
+
if @api_client.config.debugging
|
446
|
+
@api_client.config.logger.debug "API called: PublicationsFileApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
447
|
+
end
|
448
|
+
return data, status_code, headers
|
449
|
+
end
|
450
|
+
|
244
451
|
# Inspect a file publication
|
245
452
|
# A FilePublication contains metadata about all the File Content in a particular File Repository Version. Once a FilePublication has been created, it can be hosted using the File Distribution API.
|
246
453
|
# @param file_file_publication_href [String]
|
@@ -308,5 +515,73 @@ module PulpFileClient
|
|
308
515
|
end
|
309
516
|
return data, status_code, headers
|
310
517
|
end
|
518
|
+
|
519
|
+
# Remove a role for this object from users/groups.
|
520
|
+
# @param file_file_publication_href [String]
|
521
|
+
# @param nested_role [NestedRole]
|
522
|
+
# @param [Hash] opts the optional parameters
|
523
|
+
# @return [NestedRoleResponse]
|
524
|
+
def remove_role(file_file_publication_href, nested_role, opts = {})
|
525
|
+
data, _status_code, _headers = remove_role_with_http_info(file_file_publication_href, nested_role, opts)
|
526
|
+
data
|
527
|
+
end
|
528
|
+
|
529
|
+
# Remove a role for this object from users/groups.
|
530
|
+
# @param file_file_publication_href [String]
|
531
|
+
# @param nested_role [NestedRole]
|
532
|
+
# @param [Hash] opts the optional parameters
|
533
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
534
|
+
def remove_role_with_http_info(file_file_publication_href, nested_role, opts = {})
|
535
|
+
if @api_client.config.debugging
|
536
|
+
@api_client.config.logger.debug 'Calling API: PublicationsFileApi.remove_role ...'
|
537
|
+
end
|
538
|
+
# verify the required parameter 'file_file_publication_href' is set
|
539
|
+
if @api_client.config.client_side_validation && file_file_publication_href.nil?
|
540
|
+
fail ArgumentError, "Missing the required parameter 'file_file_publication_href' when calling PublicationsFileApi.remove_role"
|
541
|
+
end
|
542
|
+
# verify the required parameter 'nested_role' is set
|
543
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
544
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling PublicationsFileApi.remove_role"
|
545
|
+
end
|
546
|
+
# resource path
|
547
|
+
local_var_path = '{file_file_publication_href}remove_role/'.sub('{' + 'file_file_publication_href' + '}', CGI.escape(file_file_publication_href.to_s).gsub('%2F', '/'))
|
548
|
+
|
549
|
+
# query parameters
|
550
|
+
query_params = opts[:query_params] || {}
|
551
|
+
|
552
|
+
# header parameters
|
553
|
+
header_params = opts[:header_params] || {}
|
554
|
+
# HTTP header 'Accept' (if needed)
|
555
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
556
|
+
# HTTP header 'Content-Type'
|
557
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
558
|
+
|
559
|
+
# form parameters
|
560
|
+
form_params = opts[:form_params] || {}
|
561
|
+
|
562
|
+
# http body (model)
|
563
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
564
|
+
|
565
|
+
# return_type
|
566
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
567
|
+
|
568
|
+
# auth_names
|
569
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
570
|
+
|
571
|
+
new_options = opts.merge(
|
572
|
+
:header_params => header_params,
|
573
|
+
:query_params => query_params,
|
574
|
+
:form_params => form_params,
|
575
|
+
:body => post_body,
|
576
|
+
:auth_names => auth_names,
|
577
|
+
:return_type => return_type
|
578
|
+
)
|
579
|
+
|
580
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
581
|
+
if @api_client.config.debugging
|
582
|
+
@api_client.config.logger.debug "API called: PublicationsFileApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
583
|
+
end
|
584
|
+
return data, status_code, headers
|
585
|
+
end
|
311
586
|
end
|
312
587
|
end
|