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_remote_href [String]
|
24
|
+
# @param nested_role [NestedRole]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NestedRoleResponse]
|
27
|
+
def add_role(file_file_remote_href, nested_role, opts = {})
|
28
|
+
data, _status_code, _headers = add_role_with_http_info(file_file_remote_href, nested_role, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a role for this object to users/groups.
|
33
|
+
# @param file_file_remote_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_remote_href, nested_role, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: RemotesFileApi.add_role ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'file_file_remote_href' is set
|
42
|
+
if @api_client.config.client_side_validation && file_file_remote_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'file_file_remote_href' when calling RemotesFileApi.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 RemotesFileApi.add_role"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '{file_file_remote_href}add_role/'.sub('{' + 'file_file_remote_href' + '}', CGI.escape(file_file_remote_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: RemotesFileApi#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 remote
|
23
91
|
# FileRemote represents an external source of File Content. The target url of a FileRemote must contain a file manifest, which contains the metadata for all files at the source.
|
24
92
|
# @param file_file_remote [FileFileRemote]
|
@@ -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] :pulp_label_select Filter labels by search string
|
160
228
|
# @option opts [DateTime] :pulp_last_updated ISO 8601 formatted dates are supported
|
161
229
|
# @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
|
@@ -181,7 +249,7 @@ module PulpFileClient
|
|
181
249
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
182
250
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
183
251
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
184
|
-
# @option opts [String] :ordering
|
252
|
+
# @option opts [Array<String>] :ordering Ordering
|
185
253
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
186
254
|
# @option opts [DateTime] :pulp_last_updated ISO 8601 formatted dates are supported
|
187
255
|
# @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
|
@@ -196,6 +264,10 @@ module PulpFileClient
|
|
196
264
|
if @api_client.config.debugging
|
197
265
|
@api_client.config.logger.debug 'Calling API: RemotesFileApi.list ...'
|
198
266
|
end
|
267
|
+
allowable_values = ["-alternatecontentsource", "-basedistribution", "-ca_cert", "-client_cert", "-client_key", "-connect_timeout", "-distribution", "-download_concurrency", "-file_fileremote", "-group_roles", "-headers", "-max_retries", "-name", "-password", "-pk", "-policy", "-proxy_password", "-proxy_url", "-proxy_username", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-rate_limit", "-remoteartifact", "-repository", "-sock_connect_timeout", "-sock_read_timeout", "-tls_validation", "-total_timeout", "-url", "-user_roles", "-username", "alternatecontentsource", "basedistribution", "ca_cert", "client_cert", "client_key", "connect_timeout", "distribution", "download_concurrency", "file_fileremote", "group_roles", "headers", "max_retries", "name", "password", "pk", "policy", "proxy_password", "proxy_url", "proxy_username", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "rate_limit", "remoteartifact", "repository", "sock_connect_timeout", "sock_read_timeout", "tls_validation", "total_timeout", "url", "user_roles", "username"]
|
268
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
269
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
270
|
+
end
|
199
271
|
# resource path
|
200
272
|
local_var_path = '/pulp/api/v3/remotes/file/file/'
|
201
273
|
|
@@ -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[:'pulp_last_updated'] = opts[:'pulp_last_updated'] if !opts[:'pulp_last_updated'].nil?
|
214
286
|
query_params[:'pulp_last_updated__gt'] = opts[:'pulp_last_updated__gt'] if !opts[:'pulp_last_updated__gt'].nil?
|
@@ -252,6 +324,138 @@ module PulpFileClient
|
|
252
324
|
return data, status_code, headers
|
253
325
|
end
|
254
326
|
|
327
|
+
# List roles assigned to this object.
|
328
|
+
# @param file_file_remote_href [String]
|
329
|
+
# @param [Hash] opts the optional parameters
|
330
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
331
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
332
|
+
# @return [ObjectRolesResponse]
|
333
|
+
def list_roles(file_file_remote_href, opts = {})
|
334
|
+
data, _status_code, _headers = list_roles_with_http_info(file_file_remote_href, opts)
|
335
|
+
data
|
336
|
+
end
|
337
|
+
|
338
|
+
# List roles assigned to this object.
|
339
|
+
# @param file_file_remote_href [String]
|
340
|
+
# @param [Hash] opts the optional parameters
|
341
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
342
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
343
|
+
# @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
|
344
|
+
def list_roles_with_http_info(file_file_remote_href, opts = {})
|
345
|
+
if @api_client.config.debugging
|
346
|
+
@api_client.config.logger.debug 'Calling API: RemotesFileApi.list_roles ...'
|
347
|
+
end
|
348
|
+
# verify the required parameter 'file_file_remote_href' is set
|
349
|
+
if @api_client.config.client_side_validation && file_file_remote_href.nil?
|
350
|
+
fail ArgumentError, "Missing the required parameter 'file_file_remote_href' when calling RemotesFileApi.list_roles"
|
351
|
+
end
|
352
|
+
# resource path
|
353
|
+
local_var_path = '{file_file_remote_href}list_roles/'.sub('{' + 'file_file_remote_href' + '}', CGI.escape(file_file_remote_href.to_s).gsub('%2F', '/'))
|
354
|
+
|
355
|
+
# query parameters
|
356
|
+
query_params = opts[:query_params] || {}
|
357
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
358
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
359
|
+
|
360
|
+
# header parameters
|
361
|
+
header_params = opts[:header_params] || {}
|
362
|
+
# HTTP header 'Accept' (if needed)
|
363
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
364
|
+
|
365
|
+
# form parameters
|
366
|
+
form_params = opts[:form_params] || {}
|
367
|
+
|
368
|
+
# http body (model)
|
369
|
+
post_body = opts[:body]
|
370
|
+
|
371
|
+
# return_type
|
372
|
+
return_type = opts[:return_type] || 'ObjectRolesResponse'
|
373
|
+
|
374
|
+
# auth_names
|
375
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
376
|
+
|
377
|
+
new_options = opts.merge(
|
378
|
+
:header_params => header_params,
|
379
|
+
:query_params => query_params,
|
380
|
+
:form_params => form_params,
|
381
|
+
:body => post_body,
|
382
|
+
:auth_names => auth_names,
|
383
|
+
:return_type => return_type
|
384
|
+
)
|
385
|
+
|
386
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
387
|
+
if @api_client.config.debugging
|
388
|
+
@api_client.config.logger.debug "API called: RemotesFileApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
389
|
+
end
|
390
|
+
return data, status_code, headers
|
391
|
+
end
|
392
|
+
|
393
|
+
# List permissions available to the current user on this object.
|
394
|
+
# @param file_file_remote_href [String]
|
395
|
+
# @param [Hash] opts the optional parameters
|
396
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
397
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
398
|
+
# @return [MyPermissionsResponse]
|
399
|
+
def my_permissions(file_file_remote_href, opts = {})
|
400
|
+
data, _status_code, _headers = my_permissions_with_http_info(file_file_remote_href, opts)
|
401
|
+
data
|
402
|
+
end
|
403
|
+
|
404
|
+
# List permissions available to the current user on this object.
|
405
|
+
# @param file_file_remote_href [String]
|
406
|
+
# @param [Hash] opts the optional parameters
|
407
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
408
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
409
|
+
# @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
|
410
|
+
def my_permissions_with_http_info(file_file_remote_href, opts = {})
|
411
|
+
if @api_client.config.debugging
|
412
|
+
@api_client.config.logger.debug 'Calling API: RemotesFileApi.my_permissions ...'
|
413
|
+
end
|
414
|
+
# verify the required parameter 'file_file_remote_href' is set
|
415
|
+
if @api_client.config.client_side_validation && file_file_remote_href.nil?
|
416
|
+
fail ArgumentError, "Missing the required parameter 'file_file_remote_href' when calling RemotesFileApi.my_permissions"
|
417
|
+
end
|
418
|
+
# resource path
|
419
|
+
local_var_path = '{file_file_remote_href}my_permissions/'.sub('{' + 'file_file_remote_href' + '}', CGI.escape(file_file_remote_href.to_s).gsub('%2F', '/'))
|
420
|
+
|
421
|
+
# query parameters
|
422
|
+
query_params = opts[:query_params] || {}
|
423
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
424
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
425
|
+
|
426
|
+
# header parameters
|
427
|
+
header_params = opts[:header_params] || {}
|
428
|
+
# HTTP header 'Accept' (if needed)
|
429
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
430
|
+
|
431
|
+
# form parameters
|
432
|
+
form_params = opts[:form_params] || {}
|
433
|
+
|
434
|
+
# http body (model)
|
435
|
+
post_body = opts[:body]
|
436
|
+
|
437
|
+
# return_type
|
438
|
+
return_type = opts[:return_type] || 'MyPermissionsResponse'
|
439
|
+
|
440
|
+
# auth_names
|
441
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
442
|
+
|
443
|
+
new_options = opts.merge(
|
444
|
+
:header_params => header_params,
|
445
|
+
:query_params => query_params,
|
446
|
+
:form_params => form_params,
|
447
|
+
:body => post_body,
|
448
|
+
:auth_names => auth_names,
|
449
|
+
:return_type => return_type
|
450
|
+
)
|
451
|
+
|
452
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
453
|
+
if @api_client.config.debugging
|
454
|
+
@api_client.config.logger.debug "API called: RemotesFileApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
455
|
+
end
|
456
|
+
return data, status_code, headers
|
457
|
+
end
|
458
|
+
|
255
459
|
# Update a file remote
|
256
460
|
# Trigger an asynchronous partial update task
|
257
461
|
# @param file_file_remote_href [String]
|
@@ -390,6 +594,74 @@ module PulpFileClient
|
|
390
594
|
return data, status_code, headers
|
391
595
|
end
|
392
596
|
|
597
|
+
# Remove a role for this object from users/groups.
|
598
|
+
# @param file_file_remote_href [String]
|
599
|
+
# @param nested_role [NestedRole]
|
600
|
+
# @param [Hash] opts the optional parameters
|
601
|
+
# @return [NestedRoleResponse]
|
602
|
+
def remove_role(file_file_remote_href, nested_role, opts = {})
|
603
|
+
data, _status_code, _headers = remove_role_with_http_info(file_file_remote_href, nested_role, opts)
|
604
|
+
data
|
605
|
+
end
|
606
|
+
|
607
|
+
# Remove a role for this object from users/groups.
|
608
|
+
# @param file_file_remote_href [String]
|
609
|
+
# @param nested_role [NestedRole]
|
610
|
+
# @param [Hash] opts the optional parameters
|
611
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
612
|
+
def remove_role_with_http_info(file_file_remote_href, nested_role, opts = {})
|
613
|
+
if @api_client.config.debugging
|
614
|
+
@api_client.config.logger.debug 'Calling API: RemotesFileApi.remove_role ...'
|
615
|
+
end
|
616
|
+
# verify the required parameter 'file_file_remote_href' is set
|
617
|
+
if @api_client.config.client_side_validation && file_file_remote_href.nil?
|
618
|
+
fail ArgumentError, "Missing the required parameter 'file_file_remote_href' when calling RemotesFileApi.remove_role"
|
619
|
+
end
|
620
|
+
# verify the required parameter 'nested_role' is set
|
621
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
622
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling RemotesFileApi.remove_role"
|
623
|
+
end
|
624
|
+
# resource path
|
625
|
+
local_var_path = '{file_file_remote_href}remove_role/'.sub('{' + 'file_file_remote_href' + '}', CGI.escape(file_file_remote_href.to_s).gsub('%2F', '/'))
|
626
|
+
|
627
|
+
# query parameters
|
628
|
+
query_params = opts[:query_params] || {}
|
629
|
+
|
630
|
+
# header parameters
|
631
|
+
header_params = opts[:header_params] || {}
|
632
|
+
# HTTP header 'Accept' (if needed)
|
633
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
634
|
+
# HTTP header 'Content-Type'
|
635
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
636
|
+
|
637
|
+
# form parameters
|
638
|
+
form_params = opts[:form_params] || {}
|
639
|
+
|
640
|
+
# http body (model)
|
641
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
642
|
+
|
643
|
+
# return_type
|
644
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
645
|
+
|
646
|
+
# auth_names
|
647
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
648
|
+
|
649
|
+
new_options = opts.merge(
|
650
|
+
:header_params => header_params,
|
651
|
+
:query_params => query_params,
|
652
|
+
:form_params => form_params,
|
653
|
+
:body => post_body,
|
654
|
+
:auth_names => auth_names,
|
655
|
+
:return_type => return_type
|
656
|
+
)
|
657
|
+
|
658
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
659
|
+
if @api_client.config.debugging
|
660
|
+
@api_client.config.logger.debug "API called: RemotesFileApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
661
|
+
end
|
662
|
+
return data, status_code, headers
|
663
|
+
end
|
664
|
+
|
393
665
|
# Update a file remote
|
394
666
|
# Trigger an asynchronous update task
|
395
667
|
# @param file_file_remote_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_repository_href [String]
|
24
|
+
# @param nested_role [NestedRole]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NestedRoleResponse]
|
27
|
+
def add_role(file_file_repository_href, nested_role, opts = {})
|
28
|
+
data, _status_code, _headers = add_role_with_http_info(file_file_repository_href, nested_role, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a role for this object to users/groups.
|
33
|
+
# @param file_file_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(file_file_repository_href, nested_role, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesFileApi.add_role ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'file_file_repository_href' is set
|
42
|
+
if @api_client.config.client_side_validation && file_file_repository_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'file_file_repository_href' when calling RepositoriesFileApi.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 RepositoriesFileApi.add_role"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '{file_file_repository_href}add_role/'.sub('{' + 'file_file_repository_href' + '}', CGI.escape(file_file_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: RepositoriesFileApi#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 repository
|
23
91
|
# FileRepository represents a single file repository, to which content can be synced, added, or removed.
|
24
92
|
# @param file_file_repository [FileFileRepository]
|
@@ -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] :pulp_label_select Filter labels by search string
|
160
228
|
# @option opts [String] :fields A list of fields to include in the response.
|
161
229
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
@@ -175,7 +243,7 @@ module PulpFileClient
|
|
175
243
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
176
244
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
177
245
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
178
|
-
# @option opts [String] :ordering
|
246
|
+
# @option opts [Array<String>] :ordering Ordering
|
179
247
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
180
248
|
# @option opts [String] :fields A list of fields to include in the response.
|
181
249
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
@@ -184,6 +252,10 @@ module PulpFileClient
|
|
184
252
|
if @api_client.config.debugging
|
185
253
|
@api_client.config.logger.debug 'Calling API: RepositoriesFileApi.list ...'
|
186
254
|
end
|
255
|
+
allowable_values = ["-alternatecontentsourcepath", "-content", "-core_pulp_exporter", "-description", "-distributions", "-file_filerepository", "-group_roles", "-name", "-next_version", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-pulpimporterrepository", "-remote", "-repositorycontent", "-retain_repo_versions", "-user_hidden", "-user_roles", "-versions", "alternatecontentsourcepath", "content", "core_pulp_exporter", "description", "distributions", "file_filerepository", "group_roles", "name", "next_version", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "pulpimporterrepository", "remote", "repositorycontent", "retain_repo_versions", "user_hidden", "user_roles", "versions"]
|
256
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
257
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
258
|
+
end
|
187
259
|
# resource path
|
188
260
|
local_var_path = '/pulp/api/v3/repositories/file/file/'
|
189
261
|
|
@@ -196,7 +268,7 @@ module PulpFileClient
|
|
196
268
|
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
197
269
|
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
198
270
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
199
|
-
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
271
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
200
272
|
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
201
273
|
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
202
274
|
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
@@ -234,6 +306,72 @@ module PulpFileClient
|
|
234
306
|
return data, status_code, headers
|
235
307
|
end
|
236
308
|
|
309
|
+
# List roles assigned to this object.
|
310
|
+
# @param file_file_repository_href [String]
|
311
|
+
# @param [Hash] opts the optional parameters
|
312
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
313
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
314
|
+
# @return [ObjectRolesResponse]
|
315
|
+
def list_roles(file_file_repository_href, opts = {})
|
316
|
+
data, _status_code, _headers = list_roles_with_http_info(file_file_repository_href, opts)
|
317
|
+
data
|
318
|
+
end
|
319
|
+
|
320
|
+
# List roles assigned to this object.
|
321
|
+
# @param file_file_repository_href [String]
|
322
|
+
# @param [Hash] opts the optional parameters
|
323
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
324
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
325
|
+
# @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
|
326
|
+
def list_roles_with_http_info(file_file_repository_href, opts = {})
|
327
|
+
if @api_client.config.debugging
|
328
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesFileApi.list_roles ...'
|
329
|
+
end
|
330
|
+
# verify the required parameter 'file_file_repository_href' is set
|
331
|
+
if @api_client.config.client_side_validation && file_file_repository_href.nil?
|
332
|
+
fail ArgumentError, "Missing the required parameter 'file_file_repository_href' when calling RepositoriesFileApi.list_roles"
|
333
|
+
end
|
334
|
+
# resource path
|
335
|
+
local_var_path = '{file_file_repository_href}list_roles/'.sub('{' + 'file_file_repository_href' + '}', CGI.escape(file_file_repository_href.to_s).gsub('%2F', '/'))
|
336
|
+
|
337
|
+
# query parameters
|
338
|
+
query_params = opts[:query_params] || {}
|
339
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
340
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
341
|
+
|
342
|
+
# header parameters
|
343
|
+
header_params = opts[:header_params] || {}
|
344
|
+
# HTTP header 'Accept' (if needed)
|
345
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
346
|
+
|
347
|
+
# form parameters
|
348
|
+
form_params = opts[:form_params] || {}
|
349
|
+
|
350
|
+
# http body (model)
|
351
|
+
post_body = opts[:body]
|
352
|
+
|
353
|
+
# return_type
|
354
|
+
return_type = opts[:return_type] || 'ObjectRolesResponse'
|
355
|
+
|
356
|
+
# auth_names
|
357
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
358
|
+
|
359
|
+
new_options = opts.merge(
|
360
|
+
:header_params => header_params,
|
361
|
+
:query_params => query_params,
|
362
|
+
:form_params => form_params,
|
363
|
+
:body => post_body,
|
364
|
+
:auth_names => auth_names,
|
365
|
+
:return_type => return_type
|
366
|
+
)
|
367
|
+
|
368
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
369
|
+
if @api_client.config.debugging
|
370
|
+
@api_client.config.logger.debug "API called: RepositoriesFileApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
371
|
+
end
|
372
|
+
return data, status_code, headers
|
373
|
+
end
|
374
|
+
|
237
375
|
# Modify Repository Content
|
238
376
|
# Trigger an asynchronous task to create a new repository version.
|
239
377
|
# @param file_file_repository_href [String]
|
@@ -304,6 +442,72 @@ module PulpFileClient
|
|
304
442
|
return data, status_code, headers
|
305
443
|
end
|
306
444
|
|
445
|
+
# List permissions available to the current user on this object.
|
446
|
+
# @param file_file_repository_href [String]
|
447
|
+
# @param [Hash] opts the optional parameters
|
448
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
449
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
450
|
+
# @return [MyPermissionsResponse]
|
451
|
+
def my_permissions(file_file_repository_href, opts = {})
|
452
|
+
data, _status_code, _headers = my_permissions_with_http_info(file_file_repository_href, opts)
|
453
|
+
data
|
454
|
+
end
|
455
|
+
|
456
|
+
# List permissions available to the current user on this object.
|
457
|
+
# @param file_file_repository_href [String]
|
458
|
+
# @param [Hash] opts the optional parameters
|
459
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
460
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
461
|
+
# @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
|
462
|
+
def my_permissions_with_http_info(file_file_repository_href, opts = {})
|
463
|
+
if @api_client.config.debugging
|
464
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesFileApi.my_permissions ...'
|
465
|
+
end
|
466
|
+
# verify the required parameter 'file_file_repository_href' is set
|
467
|
+
if @api_client.config.client_side_validation && file_file_repository_href.nil?
|
468
|
+
fail ArgumentError, "Missing the required parameter 'file_file_repository_href' when calling RepositoriesFileApi.my_permissions"
|
469
|
+
end
|
470
|
+
# resource path
|
471
|
+
local_var_path = '{file_file_repository_href}my_permissions/'.sub('{' + 'file_file_repository_href' + '}', CGI.escape(file_file_repository_href.to_s).gsub('%2F', '/'))
|
472
|
+
|
473
|
+
# query parameters
|
474
|
+
query_params = opts[:query_params] || {}
|
475
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
476
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
477
|
+
|
478
|
+
# header parameters
|
479
|
+
header_params = opts[:header_params] || {}
|
480
|
+
# HTTP header 'Accept' (if needed)
|
481
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
482
|
+
|
483
|
+
# form parameters
|
484
|
+
form_params = opts[:form_params] || {}
|
485
|
+
|
486
|
+
# http body (model)
|
487
|
+
post_body = opts[:body]
|
488
|
+
|
489
|
+
# return_type
|
490
|
+
return_type = opts[:return_type] || 'MyPermissionsResponse'
|
491
|
+
|
492
|
+
# auth_names
|
493
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
494
|
+
|
495
|
+
new_options = opts.merge(
|
496
|
+
:header_params => header_params,
|
497
|
+
:query_params => query_params,
|
498
|
+
:form_params => form_params,
|
499
|
+
:body => post_body,
|
500
|
+
:auth_names => auth_names,
|
501
|
+
:return_type => return_type
|
502
|
+
)
|
503
|
+
|
504
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
505
|
+
if @api_client.config.debugging
|
506
|
+
@api_client.config.logger.debug "API called: RepositoriesFileApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
507
|
+
end
|
508
|
+
return data, status_code, headers
|
509
|
+
end
|
510
|
+
|
307
511
|
# Update a file repository
|
308
512
|
# Trigger an asynchronous partial update task
|
309
513
|
# @param file_file_repository_href [String]
|
@@ -442,6 +646,75 @@ module PulpFileClient
|
|
442
646
|
return data, status_code, headers
|
443
647
|
end
|
444
648
|
|
649
|
+
# Remove a role for this object from users/groups.
|
650
|
+
# @param file_file_repository_href [String]
|
651
|
+
# @param nested_role [NestedRole]
|
652
|
+
# @param [Hash] opts the optional parameters
|
653
|
+
# @return [NestedRoleResponse]
|
654
|
+
def remove_role(file_file_repository_href, nested_role, opts = {})
|
655
|
+
data, _status_code, _headers = remove_role_with_http_info(file_file_repository_href, nested_role, opts)
|
656
|
+
data
|
657
|
+
end
|
658
|
+
|
659
|
+
# Remove a role for this object from users/groups.
|
660
|
+
# @param file_file_repository_href [String]
|
661
|
+
# @param nested_role [NestedRole]
|
662
|
+
# @param [Hash] opts the optional parameters
|
663
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
664
|
+
def remove_role_with_http_info(file_file_repository_href, nested_role, opts = {})
|
665
|
+
if @api_client.config.debugging
|
666
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesFileApi.remove_role ...'
|
667
|
+
end
|
668
|
+
# verify the required parameter 'file_file_repository_href' is set
|
669
|
+
if @api_client.config.client_side_validation && file_file_repository_href.nil?
|
670
|
+
fail ArgumentError, "Missing the required parameter 'file_file_repository_href' when calling RepositoriesFileApi.remove_role"
|
671
|
+
end
|
672
|
+
# verify the required parameter 'nested_role' is set
|
673
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
674
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling RepositoriesFileApi.remove_role"
|
675
|
+
end
|
676
|
+
# resource path
|
677
|
+
local_var_path = '{file_file_repository_href}remove_role/'.sub('{' + 'file_file_repository_href' + '}', CGI.escape(file_file_repository_href.to_s).gsub('%2F', '/'))
|
678
|
+
|
679
|
+
# query parameters
|
680
|
+
query_params = opts[:query_params] || {}
|
681
|
+
|
682
|
+
# header parameters
|
683
|
+
header_params = opts[:header_params] || {}
|
684
|
+
# HTTP header 'Accept' (if needed)
|
685
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
686
|
+
# HTTP header 'Content-Type'
|
687
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
688
|
+
|
689
|
+
# form parameters
|
690
|
+
form_params = opts[:form_params] || {}
|
691
|
+
|
692
|
+
# http body (model)
|
693
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
694
|
+
|
695
|
+
# return_type
|
696
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
697
|
+
|
698
|
+
# auth_names
|
699
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
700
|
+
|
701
|
+
new_options = opts.merge(
|
702
|
+
:header_params => header_params,
|
703
|
+
:query_params => query_params,
|
704
|
+
:form_params => form_params,
|
705
|
+
:body => post_body,
|
706
|
+
:auth_names => auth_names,
|
707
|
+
:return_type => return_type
|
708
|
+
)
|
709
|
+
|
710
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
711
|
+
if @api_client.config.debugging
|
712
|
+
@api_client.config.logger.debug "API called: RepositoriesFileApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
713
|
+
end
|
714
|
+
return data, status_code, headers
|
715
|
+
end
|
716
|
+
|
717
|
+
# Sync from a remote
|
445
718
|
# Trigger an asynchronous task to sync file content.
|
446
719
|
# @param file_file_repository_href [String]
|
447
720
|
# @param repository_sync_url [RepositorySyncURL]
|
@@ -452,6 +725,7 @@ module PulpFileClient
|
|
452
725
|
data
|
453
726
|
end
|
454
727
|
|
728
|
+
# Sync from a remote
|
455
729
|
# Trigger an asynchronous task to sync file content.
|
456
730
|
# @param file_file_repository_href [String]
|
457
731
|
# @param repository_sync_url [RepositorySyncURL]
|