pulpcore_client 3.0.0rc7 → 3.0.0rc8
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 +7 -22
- data/docs/ArtifactsApi.md +4 -4
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/Status.md +3 -1
- data/docs/Storage.md +21 -0
- data/docs/TasksApi.md +2 -2
- data/docs/UploadsApi.md +2 -2
- data/docs/WorkersApi.md +2 -2
- data/lib/pulpcore_client/api/artifacts_api.rb +11 -7
- data/lib/pulpcore_client/api/orphans_api.rb +1 -1
- data/lib/pulpcore_client/api/status_api.rb +1 -1
- data/lib/pulpcore_client/api/tasks_api.rb +4 -4
- data/lib/pulpcore_client/api/uploads_api.rb +4 -4
- data/lib/pulpcore_client/api/workers_api.rb +4 -4
- data/lib/pulpcore_client/api_client.rb +1 -1
- data/lib/pulpcore_client/api_error.rb +1 -1
- data/lib/pulpcore_client/configuration.rb +1 -1
- data/lib/pulpcore_client/models/artifact.rb +18 -2
- data/lib/pulpcore_client/models/async_operation_response.rb +12 -2
- data/lib/pulpcore_client/models/content_app_status.rb +12 -2
- data/lib/pulpcore_client/models/database_connection.rb +12 -2
- data/lib/pulpcore_client/models/inline_response200.rb +14 -2
- data/lib/pulpcore_client/models/inline_response2001.rb +15 -3
- data/lib/pulpcore_client/models/inline_response2002.rb +15 -3
- data/lib/pulpcore_client/models/inline_response2003.rb +15 -3
- data/lib/pulpcore_client/models/progress_report.rb +13 -2
- data/lib/pulpcore_client/models/redis_connection.rb +12 -2
- data/lib/pulpcore_client/models/status.rb +25 -6
- data/lib/pulpcore_client/models/{inline_response2004.rb → storage.rb} +106 -41
- data/lib/pulpcore_client/models/task.rb +12 -2
- data/lib/pulpcore_client/models/task_cancel.rb +12 -2
- data/lib/pulpcore_client/models/upload.rb +12 -2
- data/lib/pulpcore_client/models/upload_chunk.rb +13 -2
- data/lib/pulpcore_client/models/upload_commit.rb +12 -2
- data/lib/pulpcore_client/models/upload_detail.rb +12 -2
- data/lib/pulpcore_client/models/version.rb +12 -2
- data/lib/pulpcore_client/models/worker.rb +12 -2
- data/lib/pulpcore_client/version.rb +2 -2
- data/lib/pulpcore_client.rb +2 -9
- data/pulpcore_client.gemspec +1 -1
- data/spec/api/artifacts_api_spec.rb +2 -2
- data/spec/api/orphans_api_spec.rb +1 -1
- data/spec/api/status_api_spec.rb +1 -1
- data/spec/api/tasks_api_spec.rb +2 -2
- data/spec/api/uploads_api_spec.rb +2 -2
- data/spec/api/workers_api_spec.rb +2 -2
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/artifact_spec.rb +1 -1
- data/spec/models/async_operation_response_spec.rb +1 -1
- data/spec/models/content_app_status_spec.rb +1 -1
- data/spec/models/database_connection_spec.rb +1 -1
- data/spec/models/inline_response2001_spec.rb +1 -1
- data/spec/models/inline_response2002_spec.rb +1 -1
- data/spec/models/inline_response2003_spec.rb +1 -1
- data/spec/models/inline_response200_spec.rb +1 -1
- data/spec/models/progress_report_spec.rb +1 -1
- data/spec/models/redis_connection_spec.rb +1 -1
- data/spec/models/status_spec.rb +7 -1
- data/spec/models/{content_summary_spec.rb → storage_spec.rb} +10 -10
- data/spec/models/task_cancel_spec.rb +1 -1
- data/spec/models/task_spec.rb +1 -1
- data/spec/models/upload_chunk_spec.rb +1 -1
- data/spec/models/upload_commit_spec.rb +1 -1
- data/spec/models/upload_detail_spec.rb +1 -1
- data/spec/models/upload_spec.rb +1 -1
- data/spec/models/version_spec.rb +1 -1
- data/spec/models/worker_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +6 -34
- data/docs/ContentSummary.md +0 -21
- data/docs/InlineResponse2004.md +0 -23
- data/docs/InlineResponse2005.md +0 -23
- data/docs/RepositoriesApi.md +0 -346
- data/docs/RepositoriesVersionsApi.md +0 -266
- data/docs/Repository.md +0 -29
- data/docs/RepositoryVersion.md +0 -25
- data/docs/RepositoryVersionCreate.md +0 -21
- data/lib/pulpcore_client/api/repositories_api.rb +0 -422
- data/lib/pulpcore_client/api/repositories_versions_api.rb +0 -334
- data/lib/pulpcore_client/models/content_summary.rb +0 -236
- data/lib/pulpcore_client/models/inline_response2005.rb +0 -235
- data/lib/pulpcore_client/models/repository.rb +0 -293
- data/lib/pulpcore_client/models/repository_version.rb +0 -234
- data/lib/pulpcore_client/models/repository_version_create.rb +0 -221
- data/spec/api/repositories_api_spec.rb +0 -112
- data/spec/api/repositories_versions_api_spec.rb +0 -102
- data/spec/models/inline_response2004_spec.rb +0 -59
- data/spec/models/inline_response2005_spec.rb +0 -59
- data/spec/models/repository_spec.rb +0 -77
- data/spec/models/repository_version_create_spec.rb +0 -53
- data/spec/models/repository_version_spec.rb +0 -65
|
@@ -1,422 +0,0 @@
|
|
|
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.2.0-SNAPSHOT
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'cgi'
|
|
14
|
-
|
|
15
|
-
module PulpcoreClient
|
|
16
|
-
class RepositoriesApi
|
|
17
|
-
attr_accessor :api_client
|
|
18
|
-
|
|
19
|
-
def initialize(api_client = ApiClient.default)
|
|
20
|
-
@api_client = api_client
|
|
21
|
-
end
|
|
22
|
-
# Create a repository
|
|
23
|
-
# @param data [Repository]
|
|
24
|
-
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [Repository]
|
|
26
|
-
def create(data, opts = {})
|
|
27
|
-
data, _status_code, _headers = create_with_http_info(data, opts)
|
|
28
|
-
data
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Create a repository
|
|
32
|
-
# @param data [Repository]
|
|
33
|
-
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
|
|
35
|
-
def create_with_http_info(data, opts = {})
|
|
36
|
-
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: RepositoriesApi.create ...'
|
|
38
|
-
end
|
|
39
|
-
# verify the required parameter 'data' is set
|
|
40
|
-
if @api_client.config.client_side_validation && data.nil?
|
|
41
|
-
fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesApi.create"
|
|
42
|
-
end
|
|
43
|
-
# resource path
|
|
44
|
-
local_var_path = '/pulp/api/v3/repositories/'
|
|
45
|
-
|
|
46
|
-
# query parameters
|
|
47
|
-
query_params = opts[:query_params] || {}
|
|
48
|
-
|
|
49
|
-
# header parameters
|
|
50
|
-
header_params = opts[:header_params] || {}
|
|
51
|
-
# HTTP header 'Accept' (if needed)
|
|
52
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
53
|
-
# HTTP header 'Content-Type'
|
|
54
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
55
|
-
|
|
56
|
-
# form parameters
|
|
57
|
-
form_params = opts[:form_params] || {}
|
|
58
|
-
|
|
59
|
-
# http body (model)
|
|
60
|
-
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
61
|
-
|
|
62
|
-
# return_type
|
|
63
|
-
return_type = opts[:return_type] || 'Repository'
|
|
64
|
-
|
|
65
|
-
# auth_names
|
|
66
|
-
auth_names = opts[:auth_names] || ['Basic']
|
|
67
|
-
|
|
68
|
-
new_options = opts.merge(
|
|
69
|
-
:header_params => header_params,
|
|
70
|
-
:query_params => query_params,
|
|
71
|
-
:form_params => form_params,
|
|
72
|
-
:body => post_body,
|
|
73
|
-
:auth_names => auth_names,
|
|
74
|
-
:return_type => return_type
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
78
|
-
if @api_client.config.debugging
|
|
79
|
-
@api_client.config.logger.debug "API called: RepositoriesApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
80
|
-
end
|
|
81
|
-
return data, status_code, headers
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Delete a repository
|
|
85
|
-
# Trigger an asynchronous task to delete a repository.
|
|
86
|
-
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
|
87
|
-
# @param [Hash] opts the optional parameters
|
|
88
|
-
# @return [AsyncOperationResponse]
|
|
89
|
-
def delete(repository_href, opts = {})
|
|
90
|
-
data, _status_code, _headers = delete_with_http_info(repository_href, opts)
|
|
91
|
-
data
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# Delete a repository
|
|
95
|
-
# Trigger an asynchronous task to delete a repository.
|
|
96
|
-
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
|
97
|
-
# @param [Hash] opts the optional parameters
|
|
98
|
-
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
99
|
-
def delete_with_http_info(repository_href, opts = {})
|
|
100
|
-
if @api_client.config.debugging
|
|
101
|
-
@api_client.config.logger.debug 'Calling API: RepositoriesApi.delete ...'
|
|
102
|
-
end
|
|
103
|
-
# verify the required parameter 'repository_href' is set
|
|
104
|
-
if @api_client.config.client_side_validation && repository_href.nil?
|
|
105
|
-
fail ArgumentError, "Missing the required parameter 'repository_href' when calling RepositoriesApi.delete"
|
|
106
|
-
end
|
|
107
|
-
# resource path
|
|
108
|
-
local_var_path = '{repository_href}'.sub('{' + 'repository_href' + '}', CGI.escape(repository_href.to_s).gsub('%2F', '/'))
|
|
109
|
-
|
|
110
|
-
# query parameters
|
|
111
|
-
query_params = opts[:query_params] || {}
|
|
112
|
-
|
|
113
|
-
# header parameters
|
|
114
|
-
header_params = opts[:header_params] || {}
|
|
115
|
-
# HTTP header 'Accept' (if needed)
|
|
116
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
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] || 'AsyncOperationResponse'
|
|
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: RepositoriesApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
142
|
-
end
|
|
143
|
-
return data, status_code, headers
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
# List repositories
|
|
147
|
-
# @param [Hash] opts the optional parameters
|
|
148
|
-
# @option opts [String] :name
|
|
149
|
-
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
|
150
|
-
# @option opts [Integer] :limit Number of results to return per page.
|
|
151
|
-
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
152
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
|
153
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
154
|
-
# @return [InlineResponse2001]
|
|
155
|
-
def list(opts = {})
|
|
156
|
-
data, _status_code, _headers = list_with_http_info(opts)
|
|
157
|
-
data
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
# List repositories
|
|
161
|
-
# @param [Hash] opts the optional parameters
|
|
162
|
-
# @option opts [String] :name
|
|
163
|
-
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
|
164
|
-
# @option opts [Integer] :limit Number of results to return per page.
|
|
165
|
-
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
166
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
|
167
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
168
|
-
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
|
|
169
|
-
def list_with_http_info(opts = {})
|
|
170
|
-
if @api_client.config.debugging
|
|
171
|
-
@api_client.config.logger.debug 'Calling API: RepositoriesApi.list ...'
|
|
172
|
-
end
|
|
173
|
-
# resource path
|
|
174
|
-
local_var_path = '/pulp/api/v3/repositories/'
|
|
175
|
-
|
|
176
|
-
# query parameters
|
|
177
|
-
query_params = opts[:query_params] || {}
|
|
178
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
179
|
-
query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
|
|
180
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
181
|
-
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
182
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
183
|
-
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
|
184
|
-
|
|
185
|
-
# header parameters
|
|
186
|
-
header_params = opts[:header_params] || {}
|
|
187
|
-
# HTTP header 'Accept' (if needed)
|
|
188
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
189
|
-
|
|
190
|
-
# form parameters
|
|
191
|
-
form_params = opts[:form_params] || {}
|
|
192
|
-
|
|
193
|
-
# http body (model)
|
|
194
|
-
post_body = opts[:body]
|
|
195
|
-
|
|
196
|
-
# return_type
|
|
197
|
-
return_type = opts[:return_type] || 'InlineResponse2001'
|
|
198
|
-
|
|
199
|
-
# auth_names
|
|
200
|
-
auth_names = opts[:auth_names] || ['Basic']
|
|
201
|
-
|
|
202
|
-
new_options = opts.merge(
|
|
203
|
-
:header_params => header_params,
|
|
204
|
-
:query_params => query_params,
|
|
205
|
-
:form_params => form_params,
|
|
206
|
-
:body => post_body,
|
|
207
|
-
:auth_names => auth_names,
|
|
208
|
-
:return_type => return_type
|
|
209
|
-
)
|
|
210
|
-
|
|
211
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
212
|
-
if @api_client.config.debugging
|
|
213
|
-
@api_client.config.logger.debug "API called: RepositoriesApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
214
|
-
end
|
|
215
|
-
return data, status_code, headers
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
# Partially update a repository
|
|
219
|
-
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
|
220
|
-
# @param data [Repository]
|
|
221
|
-
# @param [Hash] opts the optional parameters
|
|
222
|
-
# @return [Repository]
|
|
223
|
-
def partial_update(repository_href, data, opts = {})
|
|
224
|
-
data, _status_code, _headers = partial_update_with_http_info(repository_href, data, opts)
|
|
225
|
-
data
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
# Partially update a repository
|
|
229
|
-
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
|
230
|
-
# @param data [Repository]
|
|
231
|
-
# @param [Hash] opts the optional parameters
|
|
232
|
-
# @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
|
|
233
|
-
def partial_update_with_http_info(repository_href, data, opts = {})
|
|
234
|
-
if @api_client.config.debugging
|
|
235
|
-
@api_client.config.logger.debug 'Calling API: RepositoriesApi.partial_update ...'
|
|
236
|
-
end
|
|
237
|
-
# verify the required parameter 'repository_href' is set
|
|
238
|
-
if @api_client.config.client_side_validation && repository_href.nil?
|
|
239
|
-
fail ArgumentError, "Missing the required parameter 'repository_href' when calling RepositoriesApi.partial_update"
|
|
240
|
-
end
|
|
241
|
-
# verify the required parameter 'data' is set
|
|
242
|
-
if @api_client.config.client_side_validation && data.nil?
|
|
243
|
-
fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesApi.partial_update"
|
|
244
|
-
end
|
|
245
|
-
# resource path
|
|
246
|
-
local_var_path = '{repository_href}'.sub('{' + 'repository_href' + '}', CGI.escape(repository_href.to_s).gsub('%2F', '/'))
|
|
247
|
-
|
|
248
|
-
# query parameters
|
|
249
|
-
query_params = opts[:query_params] || {}
|
|
250
|
-
|
|
251
|
-
# header parameters
|
|
252
|
-
header_params = opts[:header_params] || {}
|
|
253
|
-
# HTTP header 'Accept' (if needed)
|
|
254
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
255
|
-
# HTTP header 'Content-Type'
|
|
256
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
257
|
-
|
|
258
|
-
# form parameters
|
|
259
|
-
form_params = opts[:form_params] || {}
|
|
260
|
-
|
|
261
|
-
# http body (model)
|
|
262
|
-
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
263
|
-
|
|
264
|
-
# return_type
|
|
265
|
-
return_type = opts[:return_type] || 'Repository'
|
|
266
|
-
|
|
267
|
-
# auth_names
|
|
268
|
-
auth_names = opts[:auth_names] || ['Basic']
|
|
269
|
-
|
|
270
|
-
new_options = opts.merge(
|
|
271
|
-
:header_params => header_params,
|
|
272
|
-
:query_params => query_params,
|
|
273
|
-
:form_params => form_params,
|
|
274
|
-
:body => post_body,
|
|
275
|
-
:auth_names => auth_names,
|
|
276
|
-
:return_type => return_type
|
|
277
|
-
)
|
|
278
|
-
|
|
279
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
280
|
-
if @api_client.config.debugging
|
|
281
|
-
@api_client.config.logger.debug "API called: RepositoriesApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
282
|
-
end
|
|
283
|
-
return data, status_code, headers
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
# Inspect a repository
|
|
287
|
-
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
|
288
|
-
# @param [Hash] opts the optional parameters
|
|
289
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
|
290
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
291
|
-
# @return [Repository]
|
|
292
|
-
def read(repository_href, opts = {})
|
|
293
|
-
data, _status_code, _headers = read_with_http_info(repository_href, opts)
|
|
294
|
-
data
|
|
295
|
-
end
|
|
296
|
-
|
|
297
|
-
# Inspect a repository
|
|
298
|
-
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
|
299
|
-
# @param [Hash] opts the optional parameters
|
|
300
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
|
301
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
302
|
-
# @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
|
|
303
|
-
def read_with_http_info(repository_href, opts = {})
|
|
304
|
-
if @api_client.config.debugging
|
|
305
|
-
@api_client.config.logger.debug 'Calling API: RepositoriesApi.read ...'
|
|
306
|
-
end
|
|
307
|
-
# verify the required parameter 'repository_href' is set
|
|
308
|
-
if @api_client.config.client_side_validation && repository_href.nil?
|
|
309
|
-
fail ArgumentError, "Missing the required parameter 'repository_href' when calling RepositoriesApi.read"
|
|
310
|
-
end
|
|
311
|
-
# resource path
|
|
312
|
-
local_var_path = '{repository_href}'.sub('{' + 'repository_href' + '}', CGI.escape(repository_href.to_s).gsub('%2F', '/'))
|
|
313
|
-
|
|
314
|
-
# query parameters
|
|
315
|
-
query_params = opts[:query_params] || {}
|
|
316
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
317
|
-
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
|
318
|
-
|
|
319
|
-
# header parameters
|
|
320
|
-
header_params = opts[:header_params] || {}
|
|
321
|
-
# HTTP header 'Accept' (if needed)
|
|
322
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
323
|
-
|
|
324
|
-
# form parameters
|
|
325
|
-
form_params = opts[:form_params] || {}
|
|
326
|
-
|
|
327
|
-
# http body (model)
|
|
328
|
-
post_body = opts[:body]
|
|
329
|
-
|
|
330
|
-
# return_type
|
|
331
|
-
return_type = opts[:return_type] || 'Repository'
|
|
332
|
-
|
|
333
|
-
# auth_names
|
|
334
|
-
auth_names = opts[:auth_names] || ['Basic']
|
|
335
|
-
|
|
336
|
-
new_options = opts.merge(
|
|
337
|
-
:header_params => header_params,
|
|
338
|
-
:query_params => query_params,
|
|
339
|
-
:form_params => form_params,
|
|
340
|
-
:body => post_body,
|
|
341
|
-
:auth_names => auth_names,
|
|
342
|
-
:return_type => return_type
|
|
343
|
-
)
|
|
344
|
-
|
|
345
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
346
|
-
if @api_client.config.debugging
|
|
347
|
-
@api_client.config.logger.debug "API called: RepositoriesApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
348
|
-
end
|
|
349
|
-
return data, status_code, headers
|
|
350
|
-
end
|
|
351
|
-
|
|
352
|
-
# Update a repository
|
|
353
|
-
# Trigger an asynchronous task to updatea repository.
|
|
354
|
-
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
|
355
|
-
# @param data [Repository]
|
|
356
|
-
# @param [Hash] opts the optional parameters
|
|
357
|
-
# @return [AsyncOperationResponse]
|
|
358
|
-
def update(repository_href, data, opts = {})
|
|
359
|
-
data, _status_code, _headers = update_with_http_info(repository_href, data, opts)
|
|
360
|
-
data
|
|
361
|
-
end
|
|
362
|
-
|
|
363
|
-
# Update a repository
|
|
364
|
-
# Trigger an asynchronous task to updatea repository.
|
|
365
|
-
# @param repository_href [String] URI of Repository. e.g.: /pulp/api/v3/repositories/1/
|
|
366
|
-
# @param data [Repository]
|
|
367
|
-
# @param [Hash] opts the optional parameters
|
|
368
|
-
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
369
|
-
def update_with_http_info(repository_href, data, opts = {})
|
|
370
|
-
if @api_client.config.debugging
|
|
371
|
-
@api_client.config.logger.debug 'Calling API: RepositoriesApi.update ...'
|
|
372
|
-
end
|
|
373
|
-
# verify the required parameter 'repository_href' is set
|
|
374
|
-
if @api_client.config.client_side_validation && repository_href.nil?
|
|
375
|
-
fail ArgumentError, "Missing the required parameter 'repository_href' when calling RepositoriesApi.update"
|
|
376
|
-
end
|
|
377
|
-
# verify the required parameter 'data' is set
|
|
378
|
-
if @api_client.config.client_side_validation && data.nil?
|
|
379
|
-
fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesApi.update"
|
|
380
|
-
end
|
|
381
|
-
# resource path
|
|
382
|
-
local_var_path = '{repository_href}'.sub('{' + 'repository_href' + '}', CGI.escape(repository_href.to_s).gsub('%2F', '/'))
|
|
383
|
-
|
|
384
|
-
# query parameters
|
|
385
|
-
query_params = opts[:query_params] || {}
|
|
386
|
-
|
|
387
|
-
# header parameters
|
|
388
|
-
header_params = opts[:header_params] || {}
|
|
389
|
-
# HTTP header 'Accept' (if needed)
|
|
390
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
391
|
-
# HTTP header 'Content-Type'
|
|
392
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
393
|
-
|
|
394
|
-
# form parameters
|
|
395
|
-
form_params = opts[:form_params] || {}
|
|
396
|
-
|
|
397
|
-
# http body (model)
|
|
398
|
-
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
399
|
-
|
|
400
|
-
# return_type
|
|
401
|
-
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
402
|
-
|
|
403
|
-
# auth_names
|
|
404
|
-
auth_names = opts[:auth_names] || ['Basic']
|
|
405
|
-
|
|
406
|
-
new_options = opts.merge(
|
|
407
|
-
:header_params => header_params,
|
|
408
|
-
:query_params => query_params,
|
|
409
|
-
:form_params => form_params,
|
|
410
|
-
:body => post_body,
|
|
411
|
-
:auth_names => auth_names,
|
|
412
|
-
:return_type => return_type
|
|
413
|
-
)
|
|
414
|
-
|
|
415
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
416
|
-
if @api_client.config.debugging
|
|
417
|
-
@api_client.config.logger.debug "API called: RepositoriesApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
418
|
-
end
|
|
419
|
-
return data, status_code, headers
|
|
420
|
-
end
|
|
421
|
-
end
|
|
422
|
-
end
|