pulp_file_client 1.8.2 → 1.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -15
- data/docs/AcsFileApi.md +417 -0
- data/docs/ContentFilesApi.md +1 -1
- data/docs/DistributionsFileApi.md +1 -1
- data/docs/FileFileAlternateContentSource.md +23 -0
- data/docs/FileFileAlternateContentSourceResponse.md +27 -0
- data/docs/FileFileRepository.md +3 -3
- data/docs/FileFileRepositoryResponse.md +3 -3
- data/docs/PaginatedfileFileAlternateContentSourceResponseList.md +23 -0
- data/docs/PatchedfileFileAlternateContentSource.md +23 -0
- data/docs/PatchedfileFileRepository.md +3 -3
- data/docs/PublicationsFileApi.md +1 -1
- data/docs/RemotesFileApi.md +1 -1
- data/docs/RepositoriesFileApi.md +1 -1
- data/docs/RepositoriesFileVersionsApi.md +1 -1
- data/docs/TaskGroupOperationResponse.md +17 -0
- data/lib/pulp_file_client/api/acs_file_api.rb +510 -0
- data/lib/pulp_file_client/configuration.rb +2 -2
- data/lib/pulp_file_client/models/file_file_alternate_content_source.rb +251 -0
- data/lib/pulp_file_client/models/file_file_alternate_content_source_response.rb +270 -0
- data/lib/pulp_file_client/models/file_file_repository.rb +17 -16
- data/lib/pulp_file_client/models/file_file_repository_response.rb +17 -16
- data/lib/pulp_file_client/models/paginatedfile_file_alternate_content_source_response_list.rb +237 -0
- data/lib/pulp_file_client/models/patchedfile_file_alternate_content_source.rb +241 -0
- data/lib/pulp_file_client/models/patchedfile_file_repository.rb +17 -16
- data/lib/pulp_file_client/models/task_group_operation_response.rb +213 -0
- data/lib/pulp_file_client/version.rb +1 -1
- data/lib/pulp_file_client.rb +6 -0
- data/spec/api/acs_file_api_spec.rb +132 -0
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/file_file_alternate_content_source_response_spec.rb +71 -0
- data/spec/models/file_file_alternate_content_source_spec.rb +59 -0
- data/spec/models/file_file_repository_response_spec.rb +1 -1
- data/spec/models/file_file_repository_spec.rb +1 -1
- data/spec/models/paginatedfile_file_alternate_content_source_response_list_spec.rb +59 -0
- data/spec/models/patchedfile_file_alternate_content_source_spec.rb +59 -0
- data/spec/models/patchedfile_file_repository_spec.rb +1 -1
- data/spec/models/task_group_operation_response_spec.rb +41 -0
- metadata +47 -23
@@ -0,0 +1,23 @@
|
|
1
|
+
# PulpFileClient::PatchedfileFileAlternateContentSource
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | Name of Alternate Content Source. | [optional]
|
8
|
+
**last_refreshed** | **DateTime** | Date of last refresh of AlternateContentSource. | [optional]
|
9
|
+
**paths** | **Array<String>** | List of paths that will be appended to the Remote url when searching for content. | [optional]
|
10
|
+
**remote** | **String** | The remote to provide alternate content source. | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'PulpFileClient'
|
16
|
+
|
17
|
+
instance = PulpFileClient::PatchedfileFileAlternateContentSource.new(name: null,
|
18
|
+
last_refreshed: null,
|
19
|
+
paths: null,
|
20
|
+
remote: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -7,8 +7,8 @@ Name | Type | Description | Notes
|
|
7
7
|
**pulp_labels** | [**Object**](.md) | | [optional]
|
8
8
|
**name** | **String** | A unique name for this repository. | [optional]
|
9
9
|
**description** | **String** | An optional description. | [optional]
|
10
|
-
**
|
11
|
-
**remote** | **String** |
|
10
|
+
**retain_repo_versions** | **Integer** | Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future. | [optional]
|
11
|
+
**remote** | **String** | An optional remote to use by default when syncing. | [optional]
|
12
12
|
**autopublish** | **Boolean** | Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. | [optional] [default to false]
|
13
13
|
**manifest** | **String** | Filename to use for manifest file containing metadata for all the files. | [optional] [default to 'PULP_MANIFEST']
|
14
14
|
|
@@ -20,7 +20,7 @@ require 'PulpFileClient'
|
|
20
20
|
instance = PulpFileClient::PatchedfileFileRepository.new(pulp_labels: null,
|
21
21
|
name: null,
|
22
22
|
description: null,
|
23
|
-
|
23
|
+
retain_repo_versions: null,
|
24
24
|
remote: null,
|
25
25
|
autopublish: null,
|
26
26
|
manifest: null)
|
data/docs/PublicationsFileApi.md
CHANGED
data/docs/RemotesFileApi.md
CHANGED
data/docs/RepositoriesFileApi.md
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
# PulpFileClient::TaskGroupOperationResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**task_group** | **String** | The href of the task group. |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'PulpFileClient'
|
13
|
+
|
14
|
+
instance = PulpFileClient::TaskGroupOperationResponse.new(task_group: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,510 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpFileClient
|
16
|
+
class AcsFileApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a file alternate content source
|
23
|
+
# Alternate Content Source ViewSet for File ACS support is provided as a tech preview in pulp_file.
|
24
|
+
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [FileFileAlternateContentSourceResponse]
|
27
|
+
def create(file_file_alternate_content_source, opts = {})
|
28
|
+
data, _status_code, _headers = create_with_http_info(file_file_alternate_content_source, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a file alternate content source
|
33
|
+
# Alternate Content Source ViewSet for File ACS support is provided as a tech preview in pulp_file.
|
34
|
+
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(FileFileAlternateContentSourceResponse, Integer, Hash)>] FileFileAlternateContentSourceResponse data, response status code and response headers
|
37
|
+
def create_with_http_info(file_file_alternate_content_source, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: AcsFileApi.create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'file_file_alternate_content_source' is set
|
42
|
+
if @api_client.config.client_side_validation && file_file_alternate_content_source.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source' when calling AcsFileApi.create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/pulp/api/v3/acs/file/file/'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = opts[:form_params] || {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = opts[:body] || @api_client.object_to_http_body(file_file_alternate_content_source)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'FileFileAlternateContentSourceResponse'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
69
|
+
|
70
|
+
new_options = opts.merge(
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: AcsFileApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Delete a file alternate content source
|
87
|
+
# Trigger an asynchronous delete ACS task
|
88
|
+
# @param file_file_alternate_content_source_href [String]
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [AsyncOperationResponse]
|
91
|
+
def delete(file_file_alternate_content_source_href, opts = {})
|
92
|
+
data, _status_code, _headers = delete_with_http_info(file_file_alternate_content_source_href, opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete a file alternate content source
|
97
|
+
# Trigger an asynchronous delete ACS task
|
98
|
+
# @param file_file_alternate_content_source_href [String]
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
101
|
+
def delete_with_http_info(file_file_alternate_content_source_href, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: AcsFileApi.delete ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'file_file_alternate_content_source_href' is set
|
106
|
+
if @api_client.config.client_side_validation && file_file_alternate_content_source_href.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source_href' when calling AcsFileApi.delete"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '{file_file_alternate_content_source_href}'.sub('{' + 'file_file_alternate_content_source_href' + '}', CGI.escape(file_file_alternate_content_source_href.to_s).gsub('%2F', '/'))
|
111
|
+
|
112
|
+
# query parameters
|
113
|
+
query_params = opts[:query_params] || {}
|
114
|
+
|
115
|
+
# header parameters
|
116
|
+
header_params = opts[:header_params] || {}
|
117
|
+
# HTTP header 'Accept' (if needed)
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
119
|
+
|
120
|
+
# form parameters
|
121
|
+
form_params = opts[:form_params] || {}
|
122
|
+
|
123
|
+
# http body (model)
|
124
|
+
post_body = opts[:body]
|
125
|
+
|
126
|
+
# return_type
|
127
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
128
|
+
|
129
|
+
# auth_names
|
130
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
131
|
+
|
132
|
+
new_options = opts.merge(
|
133
|
+
:header_params => header_params,
|
134
|
+
:query_params => query_params,
|
135
|
+
:form_params => form_params,
|
136
|
+
:body => post_body,
|
137
|
+
:auth_names => auth_names,
|
138
|
+
:return_type => return_type
|
139
|
+
)
|
140
|
+
|
141
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
142
|
+
if @api_client.config.debugging
|
143
|
+
@api_client.config.logger.debug "API called: AcsFileApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# List file alternate content sources
|
149
|
+
# Alternate Content Source ViewSet for File ACS support is provided as a tech preview in pulp_file.
|
150
|
+
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
152
|
+
# @option opts [String] :name
|
153
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
154
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
155
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
156
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
157
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
158
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
159
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
160
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
161
|
+
# @return [PaginatedfileFileAlternateContentSourceResponseList]
|
162
|
+
def list(opts = {})
|
163
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# List file alternate content sources
|
168
|
+
# Alternate Content Source ViewSet for File ACS support is provided as a tech preview in pulp_file.
|
169
|
+
# @param [Hash] opts the optional parameters
|
170
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
171
|
+
# @option opts [String] :name
|
172
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
173
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
174
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
175
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
176
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
177
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
178
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
179
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
180
|
+
# @return [Array<(PaginatedfileFileAlternateContentSourceResponseList, Integer, Hash)>] PaginatedfileFileAlternateContentSourceResponseList data, response status code and response headers
|
181
|
+
def list_with_http_info(opts = {})
|
182
|
+
if @api_client.config.debugging
|
183
|
+
@api_client.config.logger.debug 'Calling API: AcsFileApi.list ...'
|
184
|
+
end
|
185
|
+
# resource path
|
186
|
+
local_var_path = '/pulp/api/v3/acs/file/file/'
|
187
|
+
|
188
|
+
# query parameters
|
189
|
+
query_params = opts[:query_params] || {}
|
190
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
191
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
192
|
+
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
193
|
+
query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
|
194
|
+
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
195
|
+
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
196
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
197
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
198
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
199
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
200
|
+
|
201
|
+
# header parameters
|
202
|
+
header_params = opts[:header_params] || {}
|
203
|
+
# HTTP header 'Accept' (if needed)
|
204
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
205
|
+
|
206
|
+
# form parameters
|
207
|
+
form_params = opts[:form_params] || {}
|
208
|
+
|
209
|
+
# http body (model)
|
210
|
+
post_body = opts[:body]
|
211
|
+
|
212
|
+
# return_type
|
213
|
+
return_type = opts[:return_type] || 'PaginatedfileFileAlternateContentSourceResponseList'
|
214
|
+
|
215
|
+
# auth_names
|
216
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
217
|
+
|
218
|
+
new_options = opts.merge(
|
219
|
+
:header_params => header_params,
|
220
|
+
:query_params => query_params,
|
221
|
+
:form_params => form_params,
|
222
|
+
:body => post_body,
|
223
|
+
:auth_names => auth_names,
|
224
|
+
:return_type => return_type
|
225
|
+
)
|
226
|
+
|
227
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
228
|
+
if @api_client.config.debugging
|
229
|
+
@api_client.config.logger.debug "API called: AcsFileApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
230
|
+
end
|
231
|
+
return data, status_code, headers
|
232
|
+
end
|
233
|
+
|
234
|
+
# Update a file alternate content source
|
235
|
+
# Trigger an asynchronous partial update task
|
236
|
+
# @param file_file_alternate_content_source_href [String]
|
237
|
+
# @param patchedfile_file_alternate_content_source [PatchedfileFileAlternateContentSource]
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [AsyncOperationResponse]
|
240
|
+
def partial_update(file_file_alternate_content_source_href, patchedfile_file_alternate_content_source, opts = {})
|
241
|
+
data, _status_code, _headers = partial_update_with_http_info(file_file_alternate_content_source_href, patchedfile_file_alternate_content_source, opts)
|
242
|
+
data
|
243
|
+
end
|
244
|
+
|
245
|
+
# Update a file alternate content source
|
246
|
+
# Trigger an asynchronous partial update task
|
247
|
+
# @param file_file_alternate_content_source_href [String]
|
248
|
+
# @param patchedfile_file_alternate_content_source [PatchedfileFileAlternateContentSource]
|
249
|
+
# @param [Hash] opts the optional parameters
|
250
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
251
|
+
def partial_update_with_http_info(file_file_alternate_content_source_href, patchedfile_file_alternate_content_source, opts = {})
|
252
|
+
if @api_client.config.debugging
|
253
|
+
@api_client.config.logger.debug 'Calling API: AcsFileApi.partial_update ...'
|
254
|
+
end
|
255
|
+
# verify the required parameter 'file_file_alternate_content_source_href' is set
|
256
|
+
if @api_client.config.client_side_validation && file_file_alternate_content_source_href.nil?
|
257
|
+
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source_href' when calling AcsFileApi.partial_update"
|
258
|
+
end
|
259
|
+
# verify the required parameter 'patchedfile_file_alternate_content_source' is set
|
260
|
+
if @api_client.config.client_side_validation && patchedfile_file_alternate_content_source.nil?
|
261
|
+
fail ArgumentError, "Missing the required parameter 'patchedfile_file_alternate_content_source' when calling AcsFileApi.partial_update"
|
262
|
+
end
|
263
|
+
# resource path
|
264
|
+
local_var_path = '{file_file_alternate_content_source_href}'.sub('{' + 'file_file_alternate_content_source_href' + '}', CGI.escape(file_file_alternate_content_source_href.to_s).gsub('%2F', '/'))
|
265
|
+
|
266
|
+
# query parameters
|
267
|
+
query_params = opts[:query_params] || {}
|
268
|
+
|
269
|
+
# header parameters
|
270
|
+
header_params = opts[:header_params] || {}
|
271
|
+
# HTTP header 'Accept' (if needed)
|
272
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
273
|
+
# HTTP header 'Content-Type'
|
274
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
275
|
+
|
276
|
+
# form parameters
|
277
|
+
form_params = opts[:form_params] || {}
|
278
|
+
|
279
|
+
# http body (model)
|
280
|
+
post_body = opts[:body] || @api_client.object_to_http_body(patchedfile_file_alternate_content_source)
|
281
|
+
|
282
|
+
# return_type
|
283
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
284
|
+
|
285
|
+
# auth_names
|
286
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
287
|
+
|
288
|
+
new_options = opts.merge(
|
289
|
+
:header_params => header_params,
|
290
|
+
:query_params => query_params,
|
291
|
+
:form_params => form_params,
|
292
|
+
:body => post_body,
|
293
|
+
:auth_names => auth_names,
|
294
|
+
:return_type => return_type
|
295
|
+
)
|
296
|
+
|
297
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug "API called: AcsFileApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
300
|
+
end
|
301
|
+
return data, status_code, headers
|
302
|
+
end
|
303
|
+
|
304
|
+
# Inspect a file alternate content source
|
305
|
+
# Alternate Content Source ViewSet for File ACS support is provided as a tech preview in pulp_file.
|
306
|
+
# @param file_file_alternate_content_source_href [String]
|
307
|
+
# @param [Hash] opts the optional parameters
|
308
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
309
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
310
|
+
# @return [FileFileAlternateContentSourceResponse]
|
311
|
+
def read(file_file_alternate_content_source_href, opts = {})
|
312
|
+
data, _status_code, _headers = read_with_http_info(file_file_alternate_content_source_href, opts)
|
313
|
+
data
|
314
|
+
end
|
315
|
+
|
316
|
+
# Inspect a file alternate content source
|
317
|
+
# Alternate Content Source ViewSet for File ACS support is provided as a tech preview in pulp_file.
|
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<(FileFileAlternateContentSourceResponse, Integer, Hash)>] FileFileAlternateContentSourceResponse data, response status code and response headers
|
323
|
+
def read_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.read ...'
|
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.read"
|
330
|
+
end
|
331
|
+
# resource path
|
332
|
+
local_var_path = '{file_file_alternate_content_source_href}'.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] || 'FileFileAlternateContentSourceResponse'
|
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#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
368
|
+
end
|
369
|
+
return data, status_code, headers
|
370
|
+
end
|
371
|
+
|
372
|
+
# Trigger an asynchronous task to create Alternate Content Source content.
|
373
|
+
# @param file_file_alternate_content_source_href [String]
|
374
|
+
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
375
|
+
# @param [Hash] opts the optional parameters
|
376
|
+
# @return [TaskGroupOperationResponse]
|
377
|
+
def refresh(file_file_alternate_content_source_href, file_file_alternate_content_source, opts = {})
|
378
|
+
data, _status_code, _headers = refresh_with_http_info(file_file_alternate_content_source_href, file_file_alternate_content_source, opts)
|
379
|
+
data
|
380
|
+
end
|
381
|
+
|
382
|
+
# Trigger an asynchronous task to create Alternate Content Source content.
|
383
|
+
# @param file_file_alternate_content_source_href [String]
|
384
|
+
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
385
|
+
# @param [Hash] opts the optional parameters
|
386
|
+
# @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, file_file_alternate_content_source, opts = {})
|
388
|
+
if @api_client.config.debugging
|
389
|
+
@api_client.config.logger.debug 'Calling API: AcsFileApi.refresh ...'
|
390
|
+
end
|
391
|
+
# verify the required parameter 'file_file_alternate_content_source_href' is set
|
392
|
+
if @api_client.config.client_side_validation && file_file_alternate_content_source_href.nil?
|
393
|
+
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source_href' when calling AcsFileApi.refresh"
|
394
|
+
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
|
+
# resource path
|
400
|
+
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
|
+
|
402
|
+
# query parameters
|
403
|
+
query_params = opts[:query_params] || {}
|
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
|
+
# 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
|
+
|
412
|
+
# form parameters
|
413
|
+
form_params = opts[:form_params] || {}
|
414
|
+
|
415
|
+
# http body (model)
|
416
|
+
post_body = opts[:body] || @api_client.object_to_http_body(file_file_alternate_content_source)
|
417
|
+
|
418
|
+
# return_type
|
419
|
+
return_type = opts[:return_type] || 'TaskGroupOperationResponse'
|
420
|
+
|
421
|
+
# auth_names
|
422
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
423
|
+
|
424
|
+
new_options = opts.merge(
|
425
|
+
:header_params => header_params,
|
426
|
+
:query_params => query_params,
|
427
|
+
:form_params => form_params,
|
428
|
+
:body => post_body,
|
429
|
+
:auth_names => auth_names,
|
430
|
+
:return_type => return_type
|
431
|
+
)
|
432
|
+
|
433
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
434
|
+
if @api_client.config.debugging
|
435
|
+
@api_client.config.logger.debug "API called: AcsFileApi#refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
436
|
+
end
|
437
|
+
return data, status_code, headers
|
438
|
+
end
|
439
|
+
|
440
|
+
# Update a file alternate content source
|
441
|
+
# Trigger an asynchronous update task
|
442
|
+
# @param file_file_alternate_content_source_href [String]
|
443
|
+
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
444
|
+
# @param [Hash] opts the optional parameters
|
445
|
+
# @return [AsyncOperationResponse]
|
446
|
+
def update(file_file_alternate_content_source_href, file_file_alternate_content_source, opts = {})
|
447
|
+
data, _status_code, _headers = update_with_http_info(file_file_alternate_content_source_href, file_file_alternate_content_source, opts)
|
448
|
+
data
|
449
|
+
end
|
450
|
+
|
451
|
+
# Update a file alternate content source
|
452
|
+
# Trigger an asynchronous update task
|
453
|
+
# @param file_file_alternate_content_source_href [String]
|
454
|
+
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
455
|
+
# @param [Hash] opts the optional parameters
|
456
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
457
|
+
def update_with_http_info(file_file_alternate_content_source_href, file_file_alternate_content_source, opts = {})
|
458
|
+
if @api_client.config.debugging
|
459
|
+
@api_client.config.logger.debug 'Calling API: AcsFileApi.update ...'
|
460
|
+
end
|
461
|
+
# verify the required parameter 'file_file_alternate_content_source_href' is set
|
462
|
+
if @api_client.config.client_side_validation && file_file_alternate_content_source_href.nil?
|
463
|
+
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source_href' when calling AcsFileApi.update"
|
464
|
+
end
|
465
|
+
# verify the required parameter 'file_file_alternate_content_source' is set
|
466
|
+
if @api_client.config.client_side_validation && file_file_alternate_content_source.nil?
|
467
|
+
fail ArgumentError, "Missing the required parameter 'file_file_alternate_content_source' when calling AcsFileApi.update"
|
468
|
+
end
|
469
|
+
# resource path
|
470
|
+
local_var_path = '{file_file_alternate_content_source_href}'.sub('{' + 'file_file_alternate_content_source_href' + '}', CGI.escape(file_file_alternate_content_source_href.to_s).gsub('%2F', '/'))
|
471
|
+
|
472
|
+
# query parameters
|
473
|
+
query_params = opts[:query_params] || {}
|
474
|
+
|
475
|
+
# header parameters
|
476
|
+
header_params = opts[:header_params] || {}
|
477
|
+
# HTTP header 'Accept' (if needed)
|
478
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
479
|
+
# HTTP header 'Content-Type'
|
480
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
481
|
+
|
482
|
+
# form parameters
|
483
|
+
form_params = opts[:form_params] || {}
|
484
|
+
|
485
|
+
# http body (model)
|
486
|
+
post_body = opts[:body] || @api_client.object_to_http_body(file_file_alternate_content_source)
|
487
|
+
|
488
|
+
# return_type
|
489
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
490
|
+
|
491
|
+
# auth_names
|
492
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
493
|
+
|
494
|
+
new_options = opts.merge(
|
495
|
+
:header_params => header_params,
|
496
|
+
:query_params => query_params,
|
497
|
+
:form_params => form_params,
|
498
|
+
:body => post_body,
|
499
|
+
:auth_names => auth_names,
|
500
|
+
:return_type => return_type
|
501
|
+
)
|
502
|
+
|
503
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
504
|
+
if @api_client.config.debugging
|
505
|
+
@api_client.config.logger.debug "API called: AcsFileApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
506
|
+
end
|
507
|
+
return data, status_code, headers
|
508
|
+
end
|
509
|
+
end
|
510
|
+
end
|
@@ -127,7 +127,7 @@ module PulpFileClient
|
|
127
127
|
attr_accessor :force_ending_format
|
128
128
|
|
129
129
|
def initialize
|
130
|
-
@scheme = '
|
130
|
+
@scheme = 'https'
|
131
131
|
@host = 'pulp'
|
132
132
|
@base_path = ''
|
133
133
|
@api_key = {}
|
@@ -209,7 +209,7 @@ module PulpFileClient
|
|
209
209
|
def server_settings
|
210
210
|
[
|
211
211
|
{
|
212
|
-
url: "
|
212
|
+
url: "https://pulp/",
|
213
213
|
description: "No description provided",
|
214
214
|
}
|
215
215
|
]
|