pulp_container_client 2.10.13 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +41 -17
- data/docs/ContainerBlobResponse.md +1 -3
- data/docs/ContainerContainerDistribution.md +5 -5
- data/docs/ContainerContainerDistributionResponse.md +9 -9
- data/docs/ContainerContainerPushRepository.md +7 -5
- data/docs/ContainerContainerPushRepositoryResponse.md +14 -12
- data/docs/ContainerContainerRemote.md +3 -1
- data/docs/ContainerContainerRemoteResponse.md +3 -1
- data/docs/ContainerContainerRepository.md +3 -1
- data/docs/ContainerContainerRepositoryResponse.md +3 -1
- data/docs/ContainerManifestSignatureResponse.md +33 -0
- data/docs/{RepositorySyncURL.md → ContainerRepositorySyncURL.md} +5 -3
- data/docs/ContentBlobsApi.md +0 -2
- data/docs/ContentSignaturesApi.md +158 -0
- data/docs/ContentSummary.md +21 -0
- data/docs/DistributionsContainerApi.md +228 -0
- data/docs/MyPermissionsResponse.md +17 -0
- data/docs/NestedRole.md +21 -0
- data/docs/NestedRoleResponse.md +21 -0
- data/docs/ObjectRolesResponse.md +17 -0
- data/docs/{PaginatedcontainerContentRedirectContentGuardResponseList.md → PaginatedcontainerManifestSignatureResponseList.md} +3 -3
- data/docs/PatchedcontainerContainerDistribution.md +5 -5
- data/docs/PatchedcontainerContainerPushRepository.md +7 -5
- data/docs/PatchedcontainerContainerRemote.md +3 -1
- data/docs/PatchedcontainerContainerRepository.md +3 -1
- data/docs/PulpContainerNamespacesApi.md +228 -0
- data/docs/RemotesContainerApi.md +228 -0
- data/docs/RemoveSignatures.md +17 -0
- data/docs/RemoveSignaturesResponse.md +17 -0
- data/docs/RepositoriesContainerApi.md +288 -4
- data/docs/RepositoriesContainerPushApi.md +339 -0
- data/docs/RepositoriesContainerPushVersionsApi.md +4 -4
- data/docs/RepositoriesContainerVersionsApi.md +4 -4
- data/docs/RepositorySign.md +21 -0
- data/docs/RepositoryVersion.md +17 -0
- data/git_push.sh +58 -0
- data/lib/pulp_container_client/api/content_blobs_api.rb +0 -7
- data/lib/pulp_container_client/api/content_signatures_api.rb +200 -0
- data/lib/pulp_container_client/api/distributions_container_api.rb +268 -0
- data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +268 -0
- data/lib/pulp_container_client/api/remotes_container_api.rb +268 -0
- data/lib/pulp_container_client/api/repositories_container_api.rb +347 -9
- data/lib/pulp_container_client/api/repositories_container_push_api.rb +406 -0
- data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +9 -9
- data/lib/pulp_container_client/api/repositories_container_versions_api.rb +9 -9
- data/lib/pulp_container_client/api_client.rb +5 -2
- data/lib/pulp_container_client/configuration.rb +0 -1
- data/lib/pulp_container_client/models/container_blob_response.rb +4 -19
- data/lib/pulp_container_client/models/container_container_distribution.rb +21 -21
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +34 -34
- data/lib/pulp_container_client/models/container_container_push_repository.rb +44 -33
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +55 -44
- data/lib/pulp_container_client/models/container_container_remote.rb +30 -5
- data/lib/pulp_container_client/models/container_container_remote_response.rb +15 -5
- data/lib/pulp_container_client/models/container_container_repository.rb +16 -5
- data/lib/pulp_container_client/models/container_container_repository_response.rb +16 -5
- data/lib/pulp_container_client/models/{container_content_redirect_content_guard.rb → container_manifest_signature_response.rb} +108 -44
- data/lib/pulp_container_client/models/{repository_sync_url.rb → container_repository_sync_url.rb} +20 -8
- data/lib/pulp_container_client/models/content_summary.rb +246 -0
- data/lib/pulp_container_client/models/my_permissions_response.rb +213 -0
- data/lib/pulp_container_client/models/{container_content_redirect_content_guard_response.rb → nested_role.rb} +30 -39
- data/lib/pulp_container_client/models/nested_role_response.rb +234 -0
- data/lib/pulp_container_client/models/{repair.rb → object_roles_response.rb} +17 -13
- data/lib/pulp_container_client/models/{paginatedcontainer_content_redirect_content_guard_response_list.rb → paginatedcontainer_manifest_signature_response_list.rb} +4 -4
- data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +21 -21
- data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +44 -33
- data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +30 -5
- data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +16 -5
- data/lib/pulp_container_client/models/remove_signatures.rb +232 -0
- data/lib/pulp_container_client/models/remove_signatures_response.rb +213 -0
- data/lib/pulp_container_client/models/{patchedcontainer_content_redirect_content_guard.rb → repository_sign.rb} +40 -43
- data/lib/pulp_container_client/models/repository_version.rb +208 -0
- data/lib/pulp_container_client/version.rb +1 -1
- data/lib/pulp_container_client.rb +13 -7
- data/pulp_container_client.gemspec +3 -3
- data/spec/api/content_blobs_api_spec.rb +0 -1
- data/spec/api/content_signatures_api_spec.rb +78 -0
- data/spec/api/distributions_container_api_spec.rb +50 -0
- data/spec/api/pulp_container_namespaces_api_spec.rb +50 -0
- data/spec/api/remotes_container_api_spec.rb +50 -0
- data/spec/api/repositories_container_api_spec.rb +64 -1
- data/spec/api/repositories_container_push_api_spec.rb +75 -0
- data/spec/api/repositories_container_push_versions_api_spec.rb +1 -1
- data/spec/api/repositories_container_versions_api_spec.rb +1 -1
- data/spec/models/container_blob_response_spec.rb +0 -6
- data/spec/models/container_container_distribution_response_spec.rb +7 -7
- data/spec/models/container_container_distribution_spec.rb +5 -5
- data/spec/models/container_container_push_repository_response_spec.rb +13 -7
- data/spec/models/container_container_push_repository_spec.rb +9 -3
- data/spec/models/container_container_remote_response_spec.rb +6 -0
- data/spec/models/container_container_remote_spec.rb +6 -0
- data/spec/models/container_container_repository_response_spec.rb +6 -0
- data/spec/models/container_container_repository_spec.rb +6 -0
- data/spec/models/container_manifest_signature_response_spec.rb +89 -0
- data/spec/models/{container_content_redirect_content_guard_response_spec.rb → container_repository_sync_url_spec.rb} +9 -15
- data/spec/models/{container_content_redirect_content_guard_spec.rb → content_summary_spec.rb} +14 -8
- data/spec/models/my_permissions_response_spec.rb +41 -0
- data/spec/models/nested_role_response_spec.rb +53 -0
- data/spec/models/{patchedcontainer_content_redirect_content_guard_spec.rb → nested_role_spec.rb} +14 -8
- data/spec/models/object_roles_response_spec.rb +41 -0
- data/spec/models/{paginatedcontainer_content_redirect_content_guard_response_list_spec.rb → paginatedcontainer_manifest_signature_response_list_spec.rb} +6 -6
- data/spec/models/patchedcontainer_container_distribution_spec.rb +5 -5
- data/spec/models/patchedcontainer_container_push_repository_spec.rb +9 -3
- data/spec/models/patchedcontainer_container_remote_spec.rb +6 -0
- data/spec/models/patchedcontainer_container_repository_spec.rb +6 -0
- data/spec/models/remove_signatures_response_spec.rb +41 -0
- data/spec/models/{repair_spec.rb → remove_signatures_spec.rb} +7 -7
- data/spec/models/{repository_sync_url_spec.rb → repository_sign_spec.rb} +14 -8
- data/spec/models/repository_version_spec.rb +41 -0
- metadata +99 -74
- data/docs/ContainerContentRedirectContentGuard.md +0 -19
- data/docs/ContainerContentRedirectContentGuardResponse.md +0 -23
- data/docs/ContentguardsContentRedirectApi.md +0 -361
- data/docs/PatchedcontainerContentRedirectContentGuard.md +0 -19
- data/docs/Repair.md +0 -17
- data/lib/pulp_container_client/api/contentguards_content_redirect_api.rb +0 -440
- data/spec/api/contentguards_content_redirect_api_spec.rb +0 -120
@@ -19,6 +19,74 @@ module PulpContainerClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Add a role for this object to users/groups.
|
23
|
+
# @param container_container_push_repository_href [String]
|
24
|
+
# @param nested_role [NestedRole]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NestedRoleResponse]
|
27
|
+
def add_role(container_container_push_repository_href, nested_role, opts = {})
|
28
|
+
data, _status_code, _headers = add_role_with_http_info(container_container_push_repository_href, nested_role, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a role for this object to users/groups.
|
33
|
+
# @param container_container_push_repository_href [String]
|
34
|
+
# @param nested_role [NestedRole]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
37
|
+
def add_role_with_http_info(container_container_push_repository_href, nested_role, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesContainerPushApi.add_role ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'container_container_push_repository_href' is set
|
42
|
+
if @api_client.config.client_side_validation && container_container_push_repository_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'container_container_push_repository_href' when calling RepositoriesContainerPushApi.add_role"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'nested_role' is set
|
46
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling RepositoriesContainerPushApi.add_role"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '{container_container_push_repository_href}add_role/'.sub('{' + 'container_container_push_repository_href' + '}', CGI.escape(container_container_push_repository_href.to_s).gsub('%2F', '/'))
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = opts[:query_params] || {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = opts[:header_params] || {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
|
+
# HTTP header 'Content-Type'
|
60
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = opts[:form_params] || {}
|
64
|
+
|
65
|
+
# http body (model)
|
66
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
67
|
+
|
68
|
+
# return_type
|
69
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
70
|
+
|
71
|
+
# auth_names
|
72
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
73
|
+
|
74
|
+
new_options = opts.merge(
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type
|
81
|
+
)
|
82
|
+
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: RepositoriesContainerPushApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
22
90
|
# List container push repositorys
|
23
91
|
# ViewSet for a container push repository. POST and DELETE are disallowed because a push repository is tightly coupled with a ContainerDistribution which handles it automatically. Created - during push operation, removed - with ContainerDistribution removal.
|
24
92
|
# @param [Hash] opts the optional parameters
|
@@ -108,6 +176,138 @@ module PulpContainerClient
|
|
108
176
|
return data, status_code, headers
|
109
177
|
end
|
110
178
|
|
179
|
+
# List roles assigned to this object.
|
180
|
+
# @param container_container_push_repository_href [String]
|
181
|
+
# @param [Hash] opts the optional parameters
|
182
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
183
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
184
|
+
# @return [ObjectRolesResponse]
|
185
|
+
def list_roles(container_container_push_repository_href, opts = {})
|
186
|
+
data, _status_code, _headers = list_roles_with_http_info(container_container_push_repository_href, opts)
|
187
|
+
data
|
188
|
+
end
|
189
|
+
|
190
|
+
# List roles assigned to this object.
|
191
|
+
# @param container_container_push_repository_href [String]
|
192
|
+
# @param [Hash] opts the optional parameters
|
193
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
194
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
195
|
+
# @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
|
196
|
+
def list_roles_with_http_info(container_container_push_repository_href, opts = {})
|
197
|
+
if @api_client.config.debugging
|
198
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesContainerPushApi.list_roles ...'
|
199
|
+
end
|
200
|
+
# verify the required parameter 'container_container_push_repository_href' is set
|
201
|
+
if @api_client.config.client_side_validation && container_container_push_repository_href.nil?
|
202
|
+
fail ArgumentError, "Missing the required parameter 'container_container_push_repository_href' when calling RepositoriesContainerPushApi.list_roles"
|
203
|
+
end
|
204
|
+
# resource path
|
205
|
+
local_var_path = '{container_container_push_repository_href}list_roles/'.sub('{' + 'container_container_push_repository_href' + '}', CGI.escape(container_container_push_repository_href.to_s).gsub('%2F', '/'))
|
206
|
+
|
207
|
+
# query parameters
|
208
|
+
query_params = opts[:query_params] || {}
|
209
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
210
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
211
|
+
|
212
|
+
# header parameters
|
213
|
+
header_params = opts[:header_params] || {}
|
214
|
+
# HTTP header 'Accept' (if needed)
|
215
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
216
|
+
|
217
|
+
# form parameters
|
218
|
+
form_params = opts[:form_params] || {}
|
219
|
+
|
220
|
+
# http body (model)
|
221
|
+
post_body = opts[:body]
|
222
|
+
|
223
|
+
# return_type
|
224
|
+
return_type = opts[:return_type] || 'ObjectRolesResponse'
|
225
|
+
|
226
|
+
# auth_names
|
227
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
228
|
+
|
229
|
+
new_options = opts.merge(
|
230
|
+
:header_params => header_params,
|
231
|
+
:query_params => query_params,
|
232
|
+
:form_params => form_params,
|
233
|
+
:body => post_body,
|
234
|
+
:auth_names => auth_names,
|
235
|
+
:return_type => return_type
|
236
|
+
)
|
237
|
+
|
238
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
239
|
+
if @api_client.config.debugging
|
240
|
+
@api_client.config.logger.debug "API called: RepositoriesContainerPushApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
241
|
+
end
|
242
|
+
return data, status_code, headers
|
243
|
+
end
|
244
|
+
|
245
|
+
# List permissions available to the current user on this object.
|
246
|
+
# @param container_container_push_repository_href [String]
|
247
|
+
# @param [Hash] opts the optional parameters
|
248
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
249
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
250
|
+
# @return [MyPermissionsResponse]
|
251
|
+
def my_permissions(container_container_push_repository_href, opts = {})
|
252
|
+
data, _status_code, _headers = my_permissions_with_http_info(container_container_push_repository_href, opts)
|
253
|
+
data
|
254
|
+
end
|
255
|
+
|
256
|
+
# List permissions available to the current user on this object.
|
257
|
+
# @param container_container_push_repository_href [String]
|
258
|
+
# @param [Hash] opts the optional parameters
|
259
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
260
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
261
|
+
# @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
|
262
|
+
def my_permissions_with_http_info(container_container_push_repository_href, opts = {})
|
263
|
+
if @api_client.config.debugging
|
264
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesContainerPushApi.my_permissions ...'
|
265
|
+
end
|
266
|
+
# verify the required parameter 'container_container_push_repository_href' is set
|
267
|
+
if @api_client.config.client_side_validation && container_container_push_repository_href.nil?
|
268
|
+
fail ArgumentError, "Missing the required parameter 'container_container_push_repository_href' when calling RepositoriesContainerPushApi.my_permissions"
|
269
|
+
end
|
270
|
+
# resource path
|
271
|
+
local_var_path = '{container_container_push_repository_href}my_permissions/'.sub('{' + 'container_container_push_repository_href' + '}', CGI.escape(container_container_push_repository_href.to_s).gsub('%2F', '/'))
|
272
|
+
|
273
|
+
# query parameters
|
274
|
+
query_params = opts[:query_params] || {}
|
275
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
276
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
277
|
+
|
278
|
+
# header parameters
|
279
|
+
header_params = opts[:header_params] || {}
|
280
|
+
# HTTP header 'Accept' (if needed)
|
281
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
282
|
+
|
283
|
+
# form parameters
|
284
|
+
form_params = opts[:form_params] || {}
|
285
|
+
|
286
|
+
# http body (model)
|
287
|
+
post_body = opts[:body]
|
288
|
+
|
289
|
+
# return_type
|
290
|
+
return_type = opts[:return_type] || 'MyPermissionsResponse'
|
291
|
+
|
292
|
+
# auth_names
|
293
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
294
|
+
|
295
|
+
new_options = opts.merge(
|
296
|
+
:header_params => header_params,
|
297
|
+
:query_params => query_params,
|
298
|
+
:form_params => form_params,
|
299
|
+
:body => post_body,
|
300
|
+
:auth_names => auth_names,
|
301
|
+
:return_type => return_type
|
302
|
+
)
|
303
|
+
|
304
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
305
|
+
if @api_client.config.debugging
|
306
|
+
@api_client.config.logger.debug "API called: RepositoriesContainerPushApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
307
|
+
end
|
308
|
+
return data, status_code, headers
|
309
|
+
end
|
310
|
+
|
111
311
|
# Update a container push repository
|
112
312
|
# Trigger an asynchronous partial update task
|
113
313
|
# @param container_container_push_repository_href [String]
|
@@ -316,6 +516,212 @@ module PulpContainerClient
|
|
316
516
|
return data, status_code, headers
|
317
517
|
end
|
318
518
|
|
519
|
+
# Remove a role for this object from users/groups.
|
520
|
+
# @param container_container_push_repository_href [String]
|
521
|
+
# @param nested_role [NestedRole]
|
522
|
+
# @param [Hash] opts the optional parameters
|
523
|
+
# @return [NestedRoleResponse]
|
524
|
+
def remove_role(container_container_push_repository_href, nested_role, opts = {})
|
525
|
+
data, _status_code, _headers = remove_role_with_http_info(container_container_push_repository_href, nested_role, opts)
|
526
|
+
data
|
527
|
+
end
|
528
|
+
|
529
|
+
# Remove a role for this object from users/groups.
|
530
|
+
# @param container_container_push_repository_href [String]
|
531
|
+
# @param nested_role [NestedRole]
|
532
|
+
# @param [Hash] opts the optional parameters
|
533
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
534
|
+
def remove_role_with_http_info(container_container_push_repository_href, nested_role, opts = {})
|
535
|
+
if @api_client.config.debugging
|
536
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesContainerPushApi.remove_role ...'
|
537
|
+
end
|
538
|
+
# verify the required parameter 'container_container_push_repository_href' is set
|
539
|
+
if @api_client.config.client_side_validation && container_container_push_repository_href.nil?
|
540
|
+
fail ArgumentError, "Missing the required parameter 'container_container_push_repository_href' when calling RepositoriesContainerPushApi.remove_role"
|
541
|
+
end
|
542
|
+
# verify the required parameter 'nested_role' is set
|
543
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
544
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling RepositoriesContainerPushApi.remove_role"
|
545
|
+
end
|
546
|
+
# resource path
|
547
|
+
local_var_path = '{container_container_push_repository_href}remove_role/'.sub('{' + 'container_container_push_repository_href' + '}', CGI.escape(container_container_push_repository_href.to_s).gsub('%2F', '/'))
|
548
|
+
|
549
|
+
# query parameters
|
550
|
+
query_params = opts[:query_params] || {}
|
551
|
+
|
552
|
+
# header parameters
|
553
|
+
header_params = opts[:header_params] || {}
|
554
|
+
# HTTP header 'Accept' (if needed)
|
555
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
556
|
+
# HTTP header 'Content-Type'
|
557
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
558
|
+
|
559
|
+
# form parameters
|
560
|
+
form_params = opts[:form_params] || {}
|
561
|
+
|
562
|
+
# http body (model)
|
563
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
564
|
+
|
565
|
+
# return_type
|
566
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
567
|
+
|
568
|
+
# auth_names
|
569
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
570
|
+
|
571
|
+
new_options = opts.merge(
|
572
|
+
:header_params => header_params,
|
573
|
+
:query_params => query_params,
|
574
|
+
:form_params => form_params,
|
575
|
+
:body => post_body,
|
576
|
+
:auth_names => auth_names,
|
577
|
+
:return_type => return_type
|
578
|
+
)
|
579
|
+
|
580
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
581
|
+
if @api_client.config.debugging
|
582
|
+
@api_client.config.logger.debug "API called: RepositoriesContainerPushApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
583
|
+
end
|
584
|
+
return data, status_code, headers
|
585
|
+
end
|
586
|
+
|
587
|
+
# Create a task which deletes signatures by the passed key_id.
|
588
|
+
# @param container_container_push_repository_href [String]
|
589
|
+
# @param remove_signatures [RemoveSignatures]
|
590
|
+
# @param [Hash] opts the optional parameters
|
591
|
+
# @return [RemoveSignaturesResponse]
|
592
|
+
def remove_signatures(container_container_push_repository_href, remove_signatures, opts = {})
|
593
|
+
data, _status_code, _headers = remove_signatures_with_http_info(container_container_push_repository_href, remove_signatures, opts)
|
594
|
+
data
|
595
|
+
end
|
596
|
+
|
597
|
+
# Create a task which deletes signatures by the passed key_id.
|
598
|
+
# @param container_container_push_repository_href [String]
|
599
|
+
# @param remove_signatures [RemoveSignatures]
|
600
|
+
# @param [Hash] opts the optional parameters
|
601
|
+
# @return [Array<(RemoveSignaturesResponse, Integer, Hash)>] RemoveSignaturesResponse data, response status code and response headers
|
602
|
+
def remove_signatures_with_http_info(container_container_push_repository_href, remove_signatures, opts = {})
|
603
|
+
if @api_client.config.debugging
|
604
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesContainerPushApi.remove_signatures ...'
|
605
|
+
end
|
606
|
+
# verify the required parameter 'container_container_push_repository_href' is set
|
607
|
+
if @api_client.config.client_side_validation && container_container_push_repository_href.nil?
|
608
|
+
fail ArgumentError, "Missing the required parameter 'container_container_push_repository_href' when calling RepositoriesContainerPushApi.remove_signatures"
|
609
|
+
end
|
610
|
+
# verify the required parameter 'remove_signatures' is set
|
611
|
+
if @api_client.config.client_side_validation && remove_signatures.nil?
|
612
|
+
fail ArgumentError, "Missing the required parameter 'remove_signatures' when calling RepositoriesContainerPushApi.remove_signatures"
|
613
|
+
end
|
614
|
+
# resource path
|
615
|
+
local_var_path = '{container_container_push_repository_href}remove_signatures/'.sub('{' + 'container_container_push_repository_href' + '}', CGI.escape(container_container_push_repository_href.to_s).gsub('%2F', '/'))
|
616
|
+
|
617
|
+
# query parameters
|
618
|
+
query_params = opts[:query_params] || {}
|
619
|
+
|
620
|
+
# header parameters
|
621
|
+
header_params = opts[:header_params] || {}
|
622
|
+
# HTTP header 'Accept' (if needed)
|
623
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
624
|
+
# HTTP header 'Content-Type'
|
625
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
626
|
+
|
627
|
+
# form parameters
|
628
|
+
form_params = opts[:form_params] || {}
|
629
|
+
|
630
|
+
# http body (model)
|
631
|
+
post_body = opts[:body] || @api_client.object_to_http_body(remove_signatures)
|
632
|
+
|
633
|
+
# return_type
|
634
|
+
return_type = opts[:return_type] || 'RemoveSignaturesResponse'
|
635
|
+
|
636
|
+
# auth_names
|
637
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
638
|
+
|
639
|
+
new_options = opts.merge(
|
640
|
+
:header_params => header_params,
|
641
|
+
:query_params => query_params,
|
642
|
+
:form_params => form_params,
|
643
|
+
:body => post_body,
|
644
|
+
:auth_names => auth_names,
|
645
|
+
:return_type => return_type
|
646
|
+
)
|
647
|
+
|
648
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
649
|
+
if @api_client.config.debugging
|
650
|
+
@api_client.config.logger.debug "API called: RepositoriesContainerPushApi#remove_signatures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
651
|
+
end
|
652
|
+
return data, status_code, headers
|
653
|
+
end
|
654
|
+
|
655
|
+
# Sign images in the repo
|
656
|
+
# Trigger an asynchronous task to sign content.
|
657
|
+
# @param container_container_push_repository_href [String]
|
658
|
+
# @param repository_sign [RepositorySign]
|
659
|
+
# @param [Hash] opts the optional parameters
|
660
|
+
# @return [AsyncOperationResponse]
|
661
|
+
def sign(container_container_push_repository_href, repository_sign, opts = {})
|
662
|
+
data, _status_code, _headers = sign_with_http_info(container_container_push_repository_href, repository_sign, opts)
|
663
|
+
data
|
664
|
+
end
|
665
|
+
|
666
|
+
# Sign images in the repo
|
667
|
+
# Trigger an asynchronous task to sign content.
|
668
|
+
# @param container_container_push_repository_href [String]
|
669
|
+
# @param repository_sign [RepositorySign]
|
670
|
+
# @param [Hash] opts the optional parameters
|
671
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
672
|
+
def sign_with_http_info(container_container_push_repository_href, repository_sign, opts = {})
|
673
|
+
if @api_client.config.debugging
|
674
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesContainerPushApi.sign ...'
|
675
|
+
end
|
676
|
+
# verify the required parameter 'container_container_push_repository_href' is set
|
677
|
+
if @api_client.config.client_side_validation && container_container_push_repository_href.nil?
|
678
|
+
fail ArgumentError, "Missing the required parameter 'container_container_push_repository_href' when calling RepositoriesContainerPushApi.sign"
|
679
|
+
end
|
680
|
+
# verify the required parameter 'repository_sign' is set
|
681
|
+
if @api_client.config.client_side_validation && repository_sign.nil?
|
682
|
+
fail ArgumentError, "Missing the required parameter 'repository_sign' when calling RepositoriesContainerPushApi.sign"
|
683
|
+
end
|
684
|
+
# resource path
|
685
|
+
local_var_path = '{container_container_push_repository_href}sign/'.sub('{' + 'container_container_push_repository_href' + '}', CGI.escape(container_container_push_repository_href.to_s).gsub('%2F', '/'))
|
686
|
+
|
687
|
+
# query parameters
|
688
|
+
query_params = opts[:query_params] || {}
|
689
|
+
|
690
|
+
# header parameters
|
691
|
+
header_params = opts[:header_params] || {}
|
692
|
+
# HTTP header 'Accept' (if needed)
|
693
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
694
|
+
# HTTP header 'Content-Type'
|
695
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
696
|
+
|
697
|
+
# form parameters
|
698
|
+
form_params = opts[:form_params] || {}
|
699
|
+
|
700
|
+
# http body (model)
|
701
|
+
post_body = opts[:body] || @api_client.object_to_http_body(repository_sign)
|
702
|
+
|
703
|
+
# return_type
|
704
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
705
|
+
|
706
|
+
# auth_names
|
707
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
708
|
+
|
709
|
+
new_options = opts.merge(
|
710
|
+
:header_params => header_params,
|
711
|
+
:query_params => query_params,
|
712
|
+
:form_params => form_params,
|
713
|
+
:body => post_body,
|
714
|
+
:auth_names => auth_names,
|
715
|
+
:return_type => return_type
|
716
|
+
)
|
717
|
+
|
718
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
719
|
+
if @api_client.config.debugging
|
720
|
+
@api_client.config.logger.debug "API called: RepositoriesContainerPushApi#sign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
721
|
+
end
|
722
|
+
return data, status_code, headers
|
723
|
+
end
|
724
|
+
|
319
725
|
# Create a Tag
|
320
726
|
# Trigger an asynchronous task to tag an image in the repository
|
321
727
|
# @param container_container_push_repository_href [String]
|
@@ -270,20 +270,20 @@ module PulpContainerClient
|
|
270
270
|
|
271
271
|
# Trigger an asynchronous task to repair a repository version.
|
272
272
|
# @param container_container_push_repository_version_href [String]
|
273
|
-
# @param
|
273
|
+
# @param repository_version [RepositoryVersion]
|
274
274
|
# @param [Hash] opts the optional parameters
|
275
275
|
# @return [AsyncOperationResponse]
|
276
|
-
def repair(container_container_push_repository_version_href,
|
277
|
-
data, _status_code, _headers = repair_with_http_info(container_container_push_repository_version_href,
|
276
|
+
def repair(container_container_push_repository_version_href, repository_version, opts = {})
|
277
|
+
data, _status_code, _headers = repair_with_http_info(container_container_push_repository_version_href, repository_version, opts)
|
278
278
|
data
|
279
279
|
end
|
280
280
|
|
281
281
|
# Trigger an asynchronous task to repair a repository version.
|
282
282
|
# @param container_container_push_repository_version_href [String]
|
283
|
-
# @param
|
283
|
+
# @param repository_version [RepositoryVersion]
|
284
284
|
# @param [Hash] opts the optional parameters
|
285
285
|
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
286
|
-
def repair_with_http_info(container_container_push_repository_version_href,
|
286
|
+
def repair_with_http_info(container_container_push_repository_version_href, repository_version, opts = {})
|
287
287
|
if @api_client.config.debugging
|
288
288
|
@api_client.config.logger.debug 'Calling API: RepositoriesContainerPushVersionsApi.repair ...'
|
289
289
|
end
|
@@ -291,9 +291,9 @@ module PulpContainerClient
|
|
291
291
|
if @api_client.config.client_side_validation && container_container_push_repository_version_href.nil?
|
292
292
|
fail ArgumentError, "Missing the required parameter 'container_container_push_repository_version_href' when calling RepositoriesContainerPushVersionsApi.repair"
|
293
293
|
end
|
294
|
-
# verify the required parameter '
|
295
|
-
if @api_client.config.client_side_validation &&
|
296
|
-
fail ArgumentError, "Missing the required parameter '
|
294
|
+
# verify the required parameter 'repository_version' is set
|
295
|
+
if @api_client.config.client_side_validation && repository_version.nil?
|
296
|
+
fail ArgumentError, "Missing the required parameter 'repository_version' when calling RepositoriesContainerPushVersionsApi.repair"
|
297
297
|
end
|
298
298
|
# resource path
|
299
299
|
local_var_path = '{container_container_push_repository_version_href}repair/'.sub('{' + 'container_container_push_repository_version_href' + '}', CGI.escape(container_container_push_repository_version_href.to_s).gsub('%2F', '/'))
|
@@ -312,7 +312,7 @@ module PulpContainerClient
|
|
312
312
|
form_params = opts[:form_params] || {}
|
313
313
|
|
314
314
|
# http body (model)
|
315
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
315
|
+
post_body = opts[:body] || @api_client.object_to_http_body(repository_version)
|
316
316
|
|
317
317
|
# return_type
|
318
318
|
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
@@ -270,20 +270,20 @@ module PulpContainerClient
|
|
270
270
|
|
271
271
|
# Trigger an asynchronous task to repair a repository version.
|
272
272
|
# @param container_container_repository_version_href [String]
|
273
|
-
# @param
|
273
|
+
# @param repository_version [RepositoryVersion]
|
274
274
|
# @param [Hash] opts the optional parameters
|
275
275
|
# @return [AsyncOperationResponse]
|
276
|
-
def repair(container_container_repository_version_href,
|
277
|
-
data, _status_code, _headers = repair_with_http_info(container_container_repository_version_href,
|
276
|
+
def repair(container_container_repository_version_href, repository_version, opts = {})
|
277
|
+
data, _status_code, _headers = repair_with_http_info(container_container_repository_version_href, repository_version, opts)
|
278
278
|
data
|
279
279
|
end
|
280
280
|
|
281
281
|
# Trigger an asynchronous task to repair a repository version.
|
282
282
|
# @param container_container_repository_version_href [String]
|
283
|
-
# @param
|
283
|
+
# @param repository_version [RepositoryVersion]
|
284
284
|
# @param [Hash] opts the optional parameters
|
285
285
|
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
286
|
-
def repair_with_http_info(container_container_repository_version_href,
|
286
|
+
def repair_with_http_info(container_container_repository_version_href, repository_version, opts = {})
|
287
287
|
if @api_client.config.debugging
|
288
288
|
@api_client.config.logger.debug 'Calling API: RepositoriesContainerVersionsApi.repair ...'
|
289
289
|
end
|
@@ -291,9 +291,9 @@ module PulpContainerClient
|
|
291
291
|
if @api_client.config.client_side_validation && container_container_repository_version_href.nil?
|
292
292
|
fail ArgumentError, "Missing the required parameter 'container_container_repository_version_href' when calling RepositoriesContainerVersionsApi.repair"
|
293
293
|
end
|
294
|
-
# verify the required parameter '
|
295
|
-
if @api_client.config.client_side_validation &&
|
296
|
-
fail ArgumentError, "Missing the required parameter '
|
294
|
+
# verify the required parameter 'repository_version' is set
|
295
|
+
if @api_client.config.client_side_validation && repository_version.nil?
|
296
|
+
fail ArgumentError, "Missing the required parameter 'repository_version' when calling RepositoriesContainerVersionsApi.repair"
|
297
297
|
end
|
298
298
|
# resource path
|
299
299
|
local_var_path = '{container_container_repository_version_href}repair/'.sub('{' + 'container_container_repository_version_href' + '}', CGI.escape(container_container_repository_version_href.to_s).gsub('%2F', '/'))
|
@@ -312,7 +312,7 @@ module PulpContainerClient
|
|
312
312
|
form_params = opts[:form_params] || {}
|
313
313
|
|
314
314
|
# http body (model)
|
315
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
315
|
+
post_body = opts[:body] || @api_client.object_to_http_body(repository_version)
|
316
316
|
|
317
317
|
# return_type
|
318
318
|
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
@@ -118,6 +118,9 @@ module PulpContainerClient
|
|
118
118
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
119
119
|
|
120
120
|
req_opts = {
|
121
|
+
:method => http_method,
|
122
|
+
:headers => header_params,
|
123
|
+
:params => query_params,
|
121
124
|
:params_encoding => @config.params_encoding,
|
122
125
|
:timeout => @config.timeout,
|
123
126
|
:verbose => @config.debugging
|
@@ -125,13 +128,13 @@ module PulpContainerClient
|
|
125
128
|
|
126
129
|
if [:post, :patch, :put, :delete].include?(http_method)
|
127
130
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
131
|
+
req_opts.update :body => req_body
|
128
132
|
if @config.debugging
|
129
133
|
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
130
134
|
end
|
131
135
|
end
|
132
136
|
request.headers = header_params
|
133
137
|
request.body = req_body
|
134
|
-
request.options = OpenStruct.new(req_opts)
|
135
138
|
request.url url
|
136
139
|
request.params = query_params
|
137
140
|
download_file(request) if opts[:return_type] == 'File'
|
@@ -154,7 +157,7 @@ module PulpContainerClient
|
|
154
157
|
case value
|
155
158
|
when ::File, ::Tempfile
|
156
159
|
# TODO hardcode to application/octet-stream, need better way to detect content type
|
157
|
-
data[key] = Faraday::
|
160
|
+
data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path)
|
158
161
|
when ::Array, nil
|
159
162
|
# let Faraday handle Array and nil parameters
|
160
163
|
data[key] = value
|
@@ -26,17 +26,13 @@ module PulpContainerClient
|
|
26
26
|
# sha256 of the Blob file
|
27
27
|
attr_accessor :digest
|
28
28
|
|
29
|
-
# Blob media type of the file
|
30
|
-
attr_accessor :media_type
|
31
|
-
|
32
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
30
|
def self.attribute_map
|
34
31
|
{
|
35
32
|
:'pulp_href' => :'pulp_href',
|
36
33
|
:'pulp_created' => :'pulp_created',
|
37
34
|
:'artifact' => :'artifact',
|
38
|
-
:'digest' => :'digest'
|
39
|
-
:'media_type' => :'media_type'
|
35
|
+
:'digest' => :'digest'
|
40
36
|
}
|
41
37
|
end
|
42
38
|
|
@@ -46,8 +42,7 @@ module PulpContainerClient
|
|
46
42
|
:'pulp_href' => :'String',
|
47
43
|
:'pulp_created' => :'DateTime',
|
48
44
|
:'artifact' => :'String',
|
49
|
-
:'digest' => :'String'
|
50
|
-
:'media_type' => :'String'
|
45
|
+
:'digest' => :'String'
|
51
46
|
}
|
52
47
|
end
|
53
48
|
|
@@ -87,10 +82,6 @@ module PulpContainerClient
|
|
87
82
|
if attributes.key?(:'digest')
|
88
83
|
self.digest = attributes[:'digest']
|
89
84
|
end
|
90
|
-
|
91
|
-
if attributes.key?(:'media_type')
|
92
|
-
self.media_type = attributes[:'media_type']
|
93
|
-
end
|
94
85
|
end
|
95
86
|
|
96
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -105,10 +96,6 @@ module PulpContainerClient
|
|
105
96
|
invalid_properties.push('invalid value for "digest", digest cannot be nil.')
|
106
97
|
end
|
107
98
|
|
108
|
-
if @media_type.nil?
|
109
|
-
invalid_properties.push('invalid value for "media_type", media_type cannot be nil.')
|
110
|
-
end
|
111
|
-
|
112
99
|
invalid_properties
|
113
100
|
end
|
114
101
|
|
@@ -117,7 +104,6 @@ module PulpContainerClient
|
|
117
104
|
def valid?
|
118
105
|
return false if @artifact.nil?
|
119
106
|
return false if @digest.nil?
|
120
|
-
return false if @media_type.nil?
|
121
107
|
true
|
122
108
|
end
|
123
109
|
|
@@ -129,8 +115,7 @@ module PulpContainerClient
|
|
129
115
|
pulp_href == o.pulp_href &&
|
130
116
|
pulp_created == o.pulp_created &&
|
131
117
|
artifact == o.artifact &&
|
132
|
-
digest == o.digest
|
133
|
-
media_type == o.media_type
|
118
|
+
digest == o.digest
|
134
119
|
end
|
135
120
|
|
136
121
|
# @see the `==` method
|
@@ -142,7 +127,7 @@ module PulpContainerClient
|
|
142
127
|
# Calculates hash code according to all attributes.
|
143
128
|
# @return [Integer] Hash code
|
144
129
|
def hash
|
145
|
-
[pulp_href, pulp_created, artifact, digest
|
130
|
+
[pulp_href, pulp_created, artifact, digest].hash
|
146
131
|
end
|
147
132
|
|
148
133
|
# Builds the object from hash
|