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,273 @@
|
|
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 PublicationsFileApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a file publication
|
23
|
+
# Trigger an asynchronous task to publish file content.
|
24
|
+
# @param data [FilePublication]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [AsyncOperationResponse]
|
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 publication
|
33
|
+
# Trigger an asynchronous task to publish file content.
|
34
|
+
# @param data [FilePublication]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse 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: PublicationsFileApi.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 PublicationsFileApi.create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/pulp/api/v3/publications/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] || 'AsyncOperationResponse'
|
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: PublicationsFileApi#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 publication
|
87
|
+
# <!-- User-facing documentation, rendered as html--> A FilePublication contains metadata about all the <a href=\"#operation/content_file_files_list\">File Content</a> in a particular <a href=\"https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/repositories_versions_list\">Repository Version.</a> Once a FilePublication has been created, it can be hosted using the <a href=\"#operation/distributions_file_file_list\">File Distribution API.</a>
|
88
|
+
# @param file_publication_href [String] URI of File Publication. e.g.: /pulp/api/v3/publications/file/file/1/
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [nil]
|
91
|
+
def delete(file_publication_href, opts = {})
|
92
|
+
delete_with_http_info(file_publication_href, opts)
|
93
|
+
nil
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete a file publication
|
97
|
+
# <!-- User-facing documentation, rendered as html--> A FilePublication contains metadata about all the <a href=\"#operation/content_file_files_list\">File Content</a> in a particular <a href=\"https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/repositories_versions_list\">Repository Version.</a> Once a FilePublication has been created, it can be hosted using the <a href=\"#operation/distributions_file_file_list\">File Distribution API.</a>
|
98
|
+
# @param file_publication_href [String] URI of File Publication. e.g.: /pulp/api/v3/publications/file/file/1/
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
101
|
+
def delete_with_http_info(file_publication_href, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: PublicationsFileApi.delete ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'file_publication_href' is set
|
106
|
+
if @api_client.config.client_side_validation && file_publication_href.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'file_publication_href' when calling PublicationsFileApi.delete"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '{file_publication_href}'.sub('{' + 'file_publication_href' + '}', file_publication_href.to_s)
|
111
|
+
|
112
|
+
# query parameters
|
113
|
+
query_params = opts[:query_params] || {}
|
114
|
+
|
115
|
+
# header parameters
|
116
|
+
header_params = opts[:header_params] || {}
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = opts[:form_params] || {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = opts[:body]
|
123
|
+
|
124
|
+
# return_type
|
125
|
+
return_type = opts[:return_type]
|
126
|
+
|
127
|
+
# auth_names
|
128
|
+
auth_names = opts[:auth_names] || ['Basic']
|
129
|
+
|
130
|
+
new_options = opts.merge(
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: PublicationsFileApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# List file publications
|
147
|
+
# <!-- User-facing documentation, rendered as html--> A FilePublication contains metadata about all the <a href=\"#operation/content_file_files_list\">File Content</a> in a particular <a href=\"https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/repositories_versions_list\">Repository Version.</a> Once a FilePublication has been created, it can be hosted using the <a href=\"#operation/distributions_file_file_list\">File Distribution API.</a>
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
150
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
151
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
152
|
+
# @return [InlineResponse2002]
|
153
|
+
def list(opts = {})
|
154
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
155
|
+
data
|
156
|
+
end
|
157
|
+
|
158
|
+
# List file publications
|
159
|
+
# <!-- User-facing documentation, rendered as html--> A FilePublication contains metadata about all the <a href=\"#operation/content_file_files_list\">File Content</a> in a particular <a href=\"https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/repositories_versions_list\">Repository Version.</a> Once a FilePublication has been created, it can be hosted using the <a href=\"#operation/distributions_file_file_list\">File Distribution API.</a>
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
162
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
163
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
164
|
+
# @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
|
165
|
+
def list_with_http_info(opts = {})
|
166
|
+
if @api_client.config.debugging
|
167
|
+
@api_client.config.logger.debug 'Calling API: PublicationsFileApi.list ...'
|
168
|
+
end
|
169
|
+
# resource path
|
170
|
+
local_var_path = '/pulp/api/v3/publications/file/file/'
|
171
|
+
|
172
|
+
# query parameters
|
173
|
+
query_params = opts[:query_params] || {}
|
174
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
175
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
176
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
177
|
+
|
178
|
+
# header parameters
|
179
|
+
header_params = opts[:header_params] || {}
|
180
|
+
# HTTP header 'Accept' (if needed)
|
181
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
182
|
+
|
183
|
+
# form parameters
|
184
|
+
form_params = opts[:form_params] || {}
|
185
|
+
|
186
|
+
# http body (model)
|
187
|
+
post_body = opts[:body]
|
188
|
+
|
189
|
+
# return_type
|
190
|
+
return_type = opts[:return_type] || 'InlineResponse2002'
|
191
|
+
|
192
|
+
# auth_names
|
193
|
+
auth_names = opts[:auth_names] || ['Basic']
|
194
|
+
|
195
|
+
new_options = opts.merge(
|
196
|
+
:header_params => header_params,
|
197
|
+
:query_params => query_params,
|
198
|
+
:form_params => form_params,
|
199
|
+
:body => post_body,
|
200
|
+
:auth_names => auth_names,
|
201
|
+
:return_type => return_type
|
202
|
+
)
|
203
|
+
|
204
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
205
|
+
if @api_client.config.debugging
|
206
|
+
@api_client.config.logger.debug "API called: PublicationsFileApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
207
|
+
end
|
208
|
+
return data, status_code, headers
|
209
|
+
end
|
210
|
+
|
211
|
+
# Inspect a file publication
|
212
|
+
# <!-- User-facing documentation, rendered as html--> A FilePublication contains metadata about all the <a href=\"#operation/content_file_files_list\">File Content</a> in a particular <a href=\"https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/repositories_versions_list\">Repository Version.</a> Once a FilePublication has been created, it can be hosted using the <a href=\"#operation/distributions_file_file_list\">File Distribution API.</a>
|
213
|
+
# @param file_publication_href [String] URI of File Publication. e.g.: /pulp/api/v3/publications/file/file/1/
|
214
|
+
# @param [Hash] opts the optional parameters
|
215
|
+
# @return [FilePublication]
|
216
|
+
def read(file_publication_href, opts = {})
|
217
|
+
data, _status_code, _headers = read_with_http_info(file_publication_href, opts)
|
218
|
+
data
|
219
|
+
end
|
220
|
+
|
221
|
+
# Inspect a file publication
|
222
|
+
# <!-- User-facing documentation, rendered as html--> A FilePublication contains metadata about all the <a href=\"#operation/content_file_files_list\">File Content</a> in a particular <a href=\"https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/repositories_versions_list\">Repository Version.</a> Once a FilePublication has been created, it can be hosted using the <a href=\"#operation/distributions_file_file_list\">File Distribution API.</a>
|
223
|
+
# @param file_publication_href [String] URI of File Publication. e.g.: /pulp/api/v3/publications/file/file/1/
|
224
|
+
# @param [Hash] opts the optional parameters
|
225
|
+
# @return [Array<(FilePublication, Integer, Hash)>] FilePublication data, response status code and response headers
|
226
|
+
def read_with_http_info(file_publication_href, opts = {})
|
227
|
+
if @api_client.config.debugging
|
228
|
+
@api_client.config.logger.debug 'Calling API: PublicationsFileApi.read ...'
|
229
|
+
end
|
230
|
+
# verify the required parameter 'file_publication_href' is set
|
231
|
+
if @api_client.config.client_side_validation && file_publication_href.nil?
|
232
|
+
fail ArgumentError, "Missing the required parameter 'file_publication_href' when calling PublicationsFileApi.read"
|
233
|
+
end
|
234
|
+
# resource path
|
235
|
+
local_var_path = '{file_publication_href}'.sub('{' + 'file_publication_href' + '}', file_publication_href.to_s)
|
236
|
+
|
237
|
+
# query parameters
|
238
|
+
query_params = opts[:query_params] || {}
|
239
|
+
|
240
|
+
# header parameters
|
241
|
+
header_params = opts[:header_params] || {}
|
242
|
+
# HTTP header 'Accept' (if needed)
|
243
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
244
|
+
|
245
|
+
# form parameters
|
246
|
+
form_params = opts[:form_params] || {}
|
247
|
+
|
248
|
+
# http body (model)
|
249
|
+
post_body = opts[:body]
|
250
|
+
|
251
|
+
# return_type
|
252
|
+
return_type = opts[:return_type] || 'FilePublication'
|
253
|
+
|
254
|
+
# auth_names
|
255
|
+
auth_names = opts[:auth_names] || ['Basic']
|
256
|
+
|
257
|
+
new_options = opts.merge(
|
258
|
+
:header_params => header_params,
|
259
|
+
:query_params => query_params,
|
260
|
+
:form_params => form_params,
|
261
|
+
:body => post_body,
|
262
|
+
:auth_names => auth_names,
|
263
|
+
:return_type => return_type
|
264
|
+
)
|
265
|
+
|
266
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
267
|
+
if @api_client.config.debugging
|
268
|
+
@api_client.config.logger.debug "API called: PublicationsFileApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
269
|
+
end
|
270
|
+
return data, status_code, headers
|
271
|
+
end
|
272
|
+
end
|
273
|
+
end
|