pulp_file_client 0.1.0b1
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 +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +79 -0
- data/README.md +127 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContentFilesApi.md +184 -0
- data/docs/DistributionsFileApi.md +352 -0
- data/docs/FileContent.md +37 -0
- data/docs/FileDistribution.md +29 -0
- data/docs/FilePublication.md +31 -0
- data/docs/FileRemote.md +45 -0
- data/docs/InlineResponse200.md +23 -0
- data/docs/InlineResponse2001.md +23 -0
- data/docs/InlineResponse2002.md +23 -0
- data/docs/InlineResponse2003.md +23 -0
- data/docs/PublicationsFileApi.md +229 -0
- data/docs/RemotesFileApi.md +411 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/git_push.sh +55 -0
- data/lib/pulp_file_client/api/content_files_api.rb +225 -0
- data/lib/pulp_file_client/api/distributions_file_api.rb +430 -0
- data/lib/pulp_file_client/api/publications_file_api.rb +273 -0
- data/lib/pulp_file_client/api/remotes_file_api.rb +504 -0
- data/lib/pulp_file_client/api_client.rb +387 -0
- data/lib/pulp_file_client/api_error.rb +57 -0
- data/lib/pulp_file_client/configuration.rb +251 -0
- data/lib/pulp_file_client/models/async_operation_response.rb +202 -0
- data/lib/pulp_file_client/models/file_content.rb +429 -0
- data/lib/pulp_file_client/models/file_distribution.rb +337 -0
- data/lib/pulp_file_client/models/file_publication.rb +297 -0
- data/lib/pulp_file_client/models/file_remote.rb +539 -0
- data/lib/pulp_file_client/models/inline_response200.rb +235 -0
- data/lib/pulp_file_client/models/inline_response2001.rb +235 -0
- data/lib/pulp_file_client/models/inline_response2002.rb +235 -0
- data/lib/pulp_file_client/models/inline_response2003.rb +235 -0
- data/lib/pulp_file_client/models/repository_sync_url.rb +214 -0
- data/lib/pulp_file_client/version.rb +15 -0
- data/lib/pulp_file_client.rb +53 -0
- data/pulp_file_client.gemspec +45 -0
- data/spec/api/content_files_api_spec.rb +77 -0
- data/spec/api/distributions_file_api_spec.rb +116 -0
- data/spec/api/publications_file_api_spec.rb +85 -0
- data/spec/api/remotes_file_api_spec.rb +130 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/file_content_spec.rb +101 -0
- data/spec/models/file_distribution_spec.rb +77 -0
- data/spec/models/file_publication_spec.rb +83 -0
- data/spec/models/file_remote_spec.rb +129 -0
- data/spec/models/inline_response2001_spec.rb +59 -0
- data/spec/models/inline_response2002_spec.rb +59 -0
- data/spec/models/inline_response2003_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/spec_helper.rb +111 -0
- metadata +297 -0
@@ -0,0 +1,504 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module PulpFileClient
|
16
|
+
class RemotesFileApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a file remote
|
23
|
+
# <!-- User-facing documentation, rendered as html--> FileRemote represents an external source of <a href=\"#operation/content_file_files_list\">File Content</a>. The target url of a FileRemote must contain a file manifest, which contains the metadata for all files at the source.
|
24
|
+
# @param data [FileRemote]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [FileRemote]
|
27
|
+
def create(data, opts = {})
|
28
|
+
data, _status_code, _headers = create_with_http_info(data, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a file remote
|
33
|
+
# <!-- User-facing documentation, rendered as html--> FileRemote represents an external source of <a href=\"#operation/content_file_files_list\">File Content</a>. The target url of a FileRemote must contain a file manifest, which contains the metadata for all files at the source.
|
34
|
+
# @param data [FileRemote]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(FileRemote, Integer, Hash)>] FileRemote data, response status code and response headers
|
37
|
+
def create_with_http_info(data, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: RemotesFileApi.create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'data' is set
|
42
|
+
if @api_client.config.client_side_validation && data.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesFileApi.create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/pulp/api/v3/remotes/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'])
|
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(data)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'FileRemote'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:auth_names] || ['Basic']
|
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: RemotesFileApi#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 remote
|
87
|
+
# Trigger an asynchronous delete task
|
88
|
+
# @param file_remote_href [String] URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [AsyncOperationResponse]
|
91
|
+
def delete(file_remote_href, opts = {})
|
92
|
+
data, _status_code, _headers = delete_with_http_info(file_remote_href, opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete a file remote
|
97
|
+
# Trigger an asynchronous delete task
|
98
|
+
# @param file_remote_href [String] URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
|
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_remote_href, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: RemotesFileApi.delete ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'file_remote_href' is set
|
106
|
+
if @api_client.config.client_side_validation && file_remote_href.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'file_remote_href' when calling RemotesFileApi.delete"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '{file_remote_href}'.sub('{' + 'file_remote_href' + '}', file_remote_href.to_s)
|
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] || ['Basic']
|
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: RemotesFileApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# List file remotes
|
149
|
+
# <!-- User-facing documentation, rendered as html--> FileRemote represents an external source of <a href=\"#operation/content_file_files_list\">File Content</a>. The target url of a FileRemote must contain a file manifest, which contains the metadata for all files at the source.
|
150
|
+
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [String] :name
|
152
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
153
|
+
# @option opts [String] :_last_updated__lt Filter results where _last_updated is less than value
|
154
|
+
# @option opts [String] :_last_updated__lte Filter results where _last_updated is less than or equal to value
|
155
|
+
# @option opts [String] :_last_updated__gt Filter results where _last_updated is greater than value
|
156
|
+
# @option opts [String] :_last_updated__gte Filter results where _last_updated is greater than or equal to value
|
157
|
+
# @option opts [String] :_last_updated__range Filter results where _last_updated is between two comma separated values
|
158
|
+
# @option opts [String] :_last_updated ISO 8601 formatted dates are supported
|
159
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
160
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
161
|
+
# @return [InlineResponse2003]
|
162
|
+
def list(opts = {})
|
163
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# List file remotes
|
168
|
+
# <!-- User-facing documentation, rendered as html--> FileRemote represents an external source of <a href=\"#operation/content_file_files_list\">File Content</a>. The target url of a FileRemote must contain a file manifest, which contains the metadata for all files at the source.
|
169
|
+
# @param [Hash] opts the optional parameters
|
170
|
+
# @option opts [String] :name
|
171
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
172
|
+
# @option opts [String] :_last_updated__lt Filter results where _last_updated is less than value
|
173
|
+
# @option opts [String] :_last_updated__lte Filter results where _last_updated is less than or equal to value
|
174
|
+
# @option opts [String] :_last_updated__gt Filter results where _last_updated is greater than value
|
175
|
+
# @option opts [String] :_last_updated__gte Filter results where _last_updated is greater than or equal to value
|
176
|
+
# @option opts [String] :_last_updated__range Filter results where _last_updated is between two comma separated values
|
177
|
+
# @option opts [String] :_last_updated ISO 8601 formatted dates are supported
|
178
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
179
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
180
|
+
# @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 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: RemotesFileApi.list ...'
|
184
|
+
end
|
185
|
+
# resource path
|
186
|
+
local_var_path = '/pulp/api/v3/remotes/file/file/'
|
187
|
+
|
188
|
+
# query parameters
|
189
|
+
query_params = opts[:query_params] || {}
|
190
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
191
|
+
query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
|
192
|
+
query_params[:'_last_updated__lt'] = opts[:'_last_updated__lt'] if !opts[:'_last_updated__lt'].nil?
|
193
|
+
query_params[:'_last_updated__lte'] = opts[:'_last_updated__lte'] if !opts[:'_last_updated__lte'].nil?
|
194
|
+
query_params[:'_last_updated__gt'] = opts[:'_last_updated__gt'] if !opts[:'_last_updated__gt'].nil?
|
195
|
+
query_params[:'_last_updated__gte'] = opts[:'_last_updated__gte'] if !opts[:'_last_updated__gte'].nil?
|
196
|
+
query_params[:'_last_updated__range'] = opts[:'_last_updated__range'] if !opts[:'_last_updated__range'].nil?
|
197
|
+
query_params[:'_last_updated'] = opts[:'_last_updated'] if !opts[:'_last_updated'].nil?
|
198
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
199
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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] || 'InlineResponse2003'
|
214
|
+
|
215
|
+
# auth_names
|
216
|
+
auth_names = opts[:auth_names] || ['Basic']
|
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: RemotesFileApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
230
|
+
end
|
231
|
+
return data, status_code, headers
|
232
|
+
end
|
233
|
+
|
234
|
+
# Partially update a file remote
|
235
|
+
# Trigger an asynchronous partial update task
|
236
|
+
# @param file_remote_href [String] URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
|
237
|
+
# @param data [FileRemote]
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [AsyncOperationResponse]
|
240
|
+
def partial_update(file_remote_href, data, opts = {})
|
241
|
+
data, _status_code, _headers = partial_update_with_http_info(file_remote_href, data, opts)
|
242
|
+
data
|
243
|
+
end
|
244
|
+
|
245
|
+
# Partially update a file remote
|
246
|
+
# Trigger an asynchronous partial update task
|
247
|
+
# @param file_remote_href [String] URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
|
248
|
+
# @param data [FileRemote]
|
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_remote_href, data, opts = {})
|
252
|
+
if @api_client.config.debugging
|
253
|
+
@api_client.config.logger.debug 'Calling API: RemotesFileApi.partial_update ...'
|
254
|
+
end
|
255
|
+
# verify the required parameter 'file_remote_href' is set
|
256
|
+
if @api_client.config.client_side_validation && file_remote_href.nil?
|
257
|
+
fail ArgumentError, "Missing the required parameter 'file_remote_href' when calling RemotesFileApi.partial_update"
|
258
|
+
end
|
259
|
+
# verify the required parameter 'data' is set
|
260
|
+
if @api_client.config.client_side_validation && data.nil?
|
261
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesFileApi.partial_update"
|
262
|
+
end
|
263
|
+
# resource path
|
264
|
+
local_var_path = '{file_remote_href}'.sub('{' + 'file_remote_href' + '}', file_remote_href.to_s)
|
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'])
|
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(data)
|
281
|
+
|
282
|
+
# return_type
|
283
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
284
|
+
|
285
|
+
# auth_names
|
286
|
+
auth_names = opts[:auth_names] || ['Basic']
|
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: RemotesFileApi#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 remote
|
305
|
+
# <!-- User-facing documentation, rendered as html--> FileRemote represents an external source of <a href=\"#operation/content_file_files_list\">File Content</a>. The target url of a FileRemote must contain a file manifest, which contains the metadata for all files at the source.
|
306
|
+
# @param file_remote_href [String] URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
|
307
|
+
# @param [Hash] opts the optional parameters
|
308
|
+
# @return [FileRemote]
|
309
|
+
def read(file_remote_href, opts = {})
|
310
|
+
data, _status_code, _headers = read_with_http_info(file_remote_href, opts)
|
311
|
+
data
|
312
|
+
end
|
313
|
+
|
314
|
+
# Inspect a file remote
|
315
|
+
# <!-- User-facing documentation, rendered as html--> FileRemote represents an external source of <a href=\"#operation/content_file_files_list\">File Content</a>. The target url of a FileRemote must contain a file manifest, which contains the metadata for all files at the source.
|
316
|
+
# @param file_remote_href [String] URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
|
317
|
+
# @param [Hash] opts the optional parameters
|
318
|
+
# @return [Array<(FileRemote, Integer, Hash)>] FileRemote data, response status code and response headers
|
319
|
+
def read_with_http_info(file_remote_href, opts = {})
|
320
|
+
if @api_client.config.debugging
|
321
|
+
@api_client.config.logger.debug 'Calling API: RemotesFileApi.read ...'
|
322
|
+
end
|
323
|
+
# verify the required parameter 'file_remote_href' is set
|
324
|
+
if @api_client.config.client_side_validation && file_remote_href.nil?
|
325
|
+
fail ArgumentError, "Missing the required parameter 'file_remote_href' when calling RemotesFileApi.read"
|
326
|
+
end
|
327
|
+
# resource path
|
328
|
+
local_var_path = '{file_remote_href}'.sub('{' + 'file_remote_href' + '}', file_remote_href.to_s)
|
329
|
+
|
330
|
+
# query parameters
|
331
|
+
query_params = opts[:query_params] || {}
|
332
|
+
|
333
|
+
# header parameters
|
334
|
+
header_params = opts[:header_params] || {}
|
335
|
+
# HTTP header 'Accept' (if needed)
|
336
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
337
|
+
|
338
|
+
# form parameters
|
339
|
+
form_params = opts[:form_params] || {}
|
340
|
+
|
341
|
+
# http body (model)
|
342
|
+
post_body = opts[:body]
|
343
|
+
|
344
|
+
# return_type
|
345
|
+
return_type = opts[:return_type] || 'FileRemote'
|
346
|
+
|
347
|
+
# auth_names
|
348
|
+
auth_names = opts[:auth_names] || ['Basic']
|
349
|
+
|
350
|
+
new_options = opts.merge(
|
351
|
+
:header_params => header_params,
|
352
|
+
:query_params => query_params,
|
353
|
+
:form_params => form_params,
|
354
|
+
:body => post_body,
|
355
|
+
:auth_names => auth_names,
|
356
|
+
:return_type => return_type
|
357
|
+
)
|
358
|
+
|
359
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
360
|
+
if @api_client.config.debugging
|
361
|
+
@api_client.config.logger.debug "API called: RemotesFileApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
362
|
+
end
|
363
|
+
return data, status_code, headers
|
364
|
+
end
|
365
|
+
|
366
|
+
# Trigger an asynchronous task to sync file content.
|
367
|
+
# @param file_remote_href [String] URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
|
368
|
+
# @param data [RepositorySyncURL]
|
369
|
+
# @param [Hash] opts the optional parameters
|
370
|
+
# @return [AsyncOperationResponse]
|
371
|
+
def sync(file_remote_href, data, opts = {})
|
372
|
+
data, _status_code, _headers = sync_with_http_info(file_remote_href, data, opts)
|
373
|
+
data
|
374
|
+
end
|
375
|
+
|
376
|
+
# Trigger an asynchronous task to sync file content.
|
377
|
+
# @param file_remote_href [String] URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
|
378
|
+
# @param data [RepositorySyncURL]
|
379
|
+
# @param [Hash] opts the optional parameters
|
380
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
381
|
+
def sync_with_http_info(file_remote_href, data, opts = {})
|
382
|
+
if @api_client.config.debugging
|
383
|
+
@api_client.config.logger.debug 'Calling API: RemotesFileApi.sync ...'
|
384
|
+
end
|
385
|
+
# verify the required parameter 'file_remote_href' is set
|
386
|
+
if @api_client.config.client_side_validation && file_remote_href.nil?
|
387
|
+
fail ArgumentError, "Missing the required parameter 'file_remote_href' when calling RemotesFileApi.sync"
|
388
|
+
end
|
389
|
+
# verify the required parameter 'data' is set
|
390
|
+
if @api_client.config.client_side_validation && data.nil?
|
391
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesFileApi.sync"
|
392
|
+
end
|
393
|
+
# resource path
|
394
|
+
local_var_path = '{file_remote_href}sync/'.sub('{' + 'file_remote_href' + '}', file_remote_href.to_s)
|
395
|
+
|
396
|
+
# query parameters
|
397
|
+
query_params = opts[:query_params] || {}
|
398
|
+
|
399
|
+
# header parameters
|
400
|
+
header_params = opts[:header_params] || {}
|
401
|
+
# HTTP header 'Accept' (if needed)
|
402
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
403
|
+
# HTTP header 'Content-Type'
|
404
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
405
|
+
|
406
|
+
# form parameters
|
407
|
+
form_params = opts[:form_params] || {}
|
408
|
+
|
409
|
+
# http body (model)
|
410
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
411
|
+
|
412
|
+
# return_type
|
413
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
414
|
+
|
415
|
+
# auth_names
|
416
|
+
auth_names = opts[:auth_names] || ['Basic']
|
417
|
+
|
418
|
+
new_options = opts.merge(
|
419
|
+
:header_params => header_params,
|
420
|
+
:query_params => query_params,
|
421
|
+
:form_params => form_params,
|
422
|
+
:body => post_body,
|
423
|
+
:auth_names => auth_names,
|
424
|
+
:return_type => return_type
|
425
|
+
)
|
426
|
+
|
427
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug "API called: RemotesFileApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
430
|
+
end
|
431
|
+
return data, status_code, headers
|
432
|
+
end
|
433
|
+
|
434
|
+
# Update a file remote
|
435
|
+
# Trigger an asynchronous update task
|
436
|
+
# @param file_remote_href [String] URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
|
437
|
+
# @param data [FileRemote]
|
438
|
+
# @param [Hash] opts the optional parameters
|
439
|
+
# @return [AsyncOperationResponse]
|
440
|
+
def update(file_remote_href, data, opts = {})
|
441
|
+
data, _status_code, _headers = update_with_http_info(file_remote_href, data, opts)
|
442
|
+
data
|
443
|
+
end
|
444
|
+
|
445
|
+
# Update a file remote
|
446
|
+
# Trigger an asynchronous update task
|
447
|
+
# @param file_remote_href [String] URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
|
448
|
+
# @param data [FileRemote]
|
449
|
+
# @param [Hash] opts the optional parameters
|
450
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
451
|
+
def update_with_http_info(file_remote_href, data, opts = {})
|
452
|
+
if @api_client.config.debugging
|
453
|
+
@api_client.config.logger.debug 'Calling API: RemotesFileApi.update ...'
|
454
|
+
end
|
455
|
+
# verify the required parameter 'file_remote_href' is set
|
456
|
+
if @api_client.config.client_side_validation && file_remote_href.nil?
|
457
|
+
fail ArgumentError, "Missing the required parameter 'file_remote_href' when calling RemotesFileApi.update"
|
458
|
+
end
|
459
|
+
# verify the required parameter 'data' is set
|
460
|
+
if @api_client.config.client_side_validation && data.nil?
|
461
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesFileApi.update"
|
462
|
+
end
|
463
|
+
# resource path
|
464
|
+
local_var_path = '{file_remote_href}'.sub('{' + 'file_remote_href' + '}', file_remote_href.to_s)
|
465
|
+
|
466
|
+
# query parameters
|
467
|
+
query_params = opts[:query_params] || {}
|
468
|
+
|
469
|
+
# header parameters
|
470
|
+
header_params = opts[:header_params] || {}
|
471
|
+
# HTTP header 'Accept' (if needed)
|
472
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
473
|
+
# HTTP header 'Content-Type'
|
474
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
475
|
+
|
476
|
+
# form parameters
|
477
|
+
form_params = opts[:form_params] || {}
|
478
|
+
|
479
|
+
# http body (model)
|
480
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
481
|
+
|
482
|
+
# return_type
|
483
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
484
|
+
|
485
|
+
# auth_names
|
486
|
+
auth_names = opts[:auth_names] || ['Basic']
|
487
|
+
|
488
|
+
new_options = opts.merge(
|
489
|
+
:header_params => header_params,
|
490
|
+
:query_params => query_params,
|
491
|
+
:form_params => form_params,
|
492
|
+
:body => post_body,
|
493
|
+
:auth_names => auth_names,
|
494
|
+
:return_type => return_type
|
495
|
+
)
|
496
|
+
|
497
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
498
|
+
if @api_client.config.debugging
|
499
|
+
@api_client.config.logger.debug "API called: RemotesFileApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
500
|
+
end
|
501
|
+
return data, status_code, headers
|
502
|
+
end
|
503
|
+
end
|
504
|
+
end
|