pulp_container_client 1.0.0rc1
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/README.md +164 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContainerBlob.md +25 -0
- data/docs/ContainerContainerDistribution.md +31 -0
- data/docs/ContainerContainerRemote.md +43 -0
- data/docs/ContainerContainerRepository.md +27 -0
- data/docs/ContainerManifest.md +33 -0
- data/docs/ContainerTag.md +25 -0
- data/docs/ContentBlobsApi.md +142 -0
- data/docs/ContentManifestsApi.md +142 -0
- data/docs/ContentSummary.md +21 -0
- data/docs/ContentTagsApi.md +144 -0
- data/docs/DistributionsContainerApi.md +362 -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/InlineResponse2004.md +23 -0
- data/docs/InlineResponse2005.md +23 -0
- data/docs/InlineResponse2006.md +23 -0
- data/docs/ManifestCopy.md +23 -0
- data/docs/RecursiveManage.md +17 -0
- data/docs/RemotesContainerApi.md +366 -0
- data/docs/RepositoriesContainerApi.md +739 -0
- data/docs/RepositoriesContainerVersionsApi.md +214 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/RepositoryVersion.md +25 -0
- data/docs/TagCopy.md +21 -0
- data/docs/TagImage.md +19 -0
- data/docs/UnTagImage.md +17 -0
- data/git_push.sh +58 -0
- data/lib/pulp_container_client/api/content_blobs_api.rb +176 -0
- data/lib/pulp_container_client/api/content_manifests_api.rb +176 -0
- data/lib/pulp_container_client/api/content_tags_api.rb +179 -0
- data/lib/pulp_container_client/api/distributions_container_api.rb +442 -0
- data/lib/pulp_container_client/api/remotes_container_api.rb +448 -0
- data/lib/pulp_container_client/api/repositories_container_api.rb +906 -0
- data/lib/pulp_container_client/api/repositories_container_versions_api.rb +268 -0
- data/lib/pulp_container_client/api_client.rb +402 -0
- data/lib/pulp_container_client/api_error.rb +57 -0
- data/lib/pulp_container_client/configuration.rb +243 -0
- data/lib/pulp_container_client/models/async_operation_response.rb +212 -0
- data/lib/pulp_container_client/models/container_blob.rb +299 -0
- data/lib/pulp_container_client/models/container_container_distribution.rb +342 -0
- data/lib/pulp_container_client/models/container_container_remote.rb +526 -0
- data/lib/pulp_container_client/models/container_container_repository.rb +294 -0
- data/lib/pulp_container_client/models/container_manifest.rb +363 -0
- data/lib/pulp_container_client/models/container_tag.rb +280 -0
- data/lib/pulp_container_client/models/content_summary.rb +246 -0
- data/lib/pulp_container_client/models/inline_response200.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2001.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2002.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2003.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2004.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2005.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2006.rb +247 -0
- data/lib/pulp_container_client/models/manifest_copy.rb +263 -0
- data/lib/pulp_container_client/models/recursive_manage.rb +209 -0
- data/lib/pulp_container_client/models/repository_sync_url.rb +224 -0
- data/lib/pulp_container_client/models/repository_version.rb +244 -0
- data/lib/pulp_container_client/models/tag_copy.rb +229 -0
- data/lib/pulp_container_client/models/tag_image.rb +265 -0
- data/lib/pulp_container_client/models/un_tag_image.rb +231 -0
- data/lib/pulp_container_client/version.rb +15 -0
- data/lib/pulp_container_client.rb +68 -0
- data/pulp_container_client.gemspec +39 -0
- data/spec/api/content_blobs_api_spec.rb +70 -0
- data/spec/api/content_manifests_api_spec.rb +70 -0
- data/spec/api/content_tags_api_spec.rb +71 -0
- data/spec/api/distributions_container_api_spec.rb +120 -0
- data/spec/api/remotes_container_api_spec.rb +122 -0
- data/spec/api/repositories_container_api_spec.rb +200 -0
- data/spec/api/repositories_container_versions_api_spec.rb +91 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/container_blob_spec.rb +65 -0
- data/spec/models/container_container_distribution_spec.rb +83 -0
- data/spec/models/container_container_remote_spec.rb +123 -0
- data/spec/models/container_container_repository_spec.rb +71 -0
- data/spec/models/container_manifest_spec.rb +89 -0
- data/spec/models/container_tag_spec.rb +65 -0
- data/spec/models/content_summary_spec.rb +53 -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_response2004_spec.rb +59 -0
- data/spec/models/inline_response2005_spec.rb +59 -0
- data/spec/models/inline_response2006_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/manifest_copy_spec.rb +63 -0
- data/spec/models/recursive_manage_spec.rb +41 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/repository_version_spec.rb +65 -0
- data/spec/models/tag_copy_spec.rb +53 -0
- data/spec/models/tag_image_spec.rb +47 -0
- data/spec/models/un_tag_image_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +230 -0
|
@@ -0,0 +1,448 @@
|
|
|
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.2-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PulpContainerClient
|
|
16
|
+
class RemotesContainerApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a container remote
|
|
23
|
+
# Container remotes represent an external repository that implements the Container Registry API. Container remotes support deferred downloading by configuring the ``policy`` field. ``on_demand`` and ``streamed`` policies can provide significant disk space savings.
|
|
24
|
+
# @param data [ContainerContainerRemote]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [ContainerContainerRemote]
|
|
27
|
+
def create(data, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_with_http_info(data, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create a container remote
|
|
33
|
+
# Container remotes represent an external repository that implements the Container Registry API. Container remotes support deferred downloading by configuring the ``policy`` field. ``on_demand`` and ``streamed`` policies can provide significant disk space savings.
|
|
34
|
+
# @param data [ContainerContainerRemote]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(ContainerContainerRemote, Integer, Hash)>] ContainerContainerRemote 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: RemotesContainerApi.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 RemotesContainerApi.create"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/pulp/api/v3/remotes/container/container/'
|
|
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] || 'ContainerContainerRemote'
|
|
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: RemotesContainerApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Delete a container remote
|
|
87
|
+
# Trigger an asynchronous delete task
|
|
88
|
+
# @param container_remote_href [String] URI of Container Remote. e.g.: /pulp/api/v3/remotes/container/container/1/
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @return [AsyncOperationResponse]
|
|
91
|
+
def delete(container_remote_href, opts = {})
|
|
92
|
+
data, _status_code, _headers = delete_with_http_info(container_remote_href, opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Delete a container remote
|
|
97
|
+
# Trigger an asynchronous delete task
|
|
98
|
+
# @param container_remote_href [String] URI of Container Remote. e.g.: /pulp/api/v3/remotes/container/container/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(container_remote_href, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: RemotesContainerApi.delete ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'container_remote_href' is set
|
|
106
|
+
if @api_client.config.client_side_validation && container_remote_href.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'container_remote_href' when calling RemotesContainerApi.delete"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '{container_remote_href}'.sub('{' + 'container_remote_href' + '}', CGI.escape(container_remote_href.to_s).gsub('%2F', '/'))
|
|
111
|
+
|
|
112
|
+
# query parameters
|
|
113
|
+
query_params = opts[:query_params] || {}
|
|
114
|
+
|
|
115
|
+
# header parameters
|
|
116
|
+
header_params = opts[:header_params] || {}
|
|
117
|
+
# HTTP header 'Accept' (if needed)
|
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
119
|
+
|
|
120
|
+
# form parameters
|
|
121
|
+
form_params = opts[:form_params] || {}
|
|
122
|
+
|
|
123
|
+
# http body (model)
|
|
124
|
+
post_body = opts[:body]
|
|
125
|
+
|
|
126
|
+
# return_type
|
|
127
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
128
|
+
|
|
129
|
+
# auth_names
|
|
130
|
+
auth_names = opts[:auth_names] || ['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: RemotesContainerApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
144
|
+
end
|
|
145
|
+
return data, status_code, headers
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# List container remotes
|
|
149
|
+
# Container remotes represent an external repository that implements the Container Registry API. Container remotes support deferred downloading by configuring the ``policy`` field. ``on_demand`` and ``streamed`` policies can provide significant disk space savings.
|
|
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] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
|
|
154
|
+
# @option opts [String] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
|
|
155
|
+
# @option opts [String] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
|
|
156
|
+
# @option opts [String] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
|
|
157
|
+
# @option opts [String] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
|
|
158
|
+
# @option opts [String] :pulp_last_updated ISO 8601 formatted dates are supported
|
|
159
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
160
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
161
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
162
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
163
|
+
# @return [InlineResponse2004]
|
|
164
|
+
def list(opts = {})
|
|
165
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
|
166
|
+
data
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# List container remotes
|
|
170
|
+
# Container remotes represent an external repository that implements the Container Registry API. Container remotes support deferred downloading by configuring the ``policy`` field. ``on_demand`` and ``streamed`` policies can provide significant disk space savings.
|
|
171
|
+
# @param [Hash] opts the optional parameters
|
|
172
|
+
# @option opts [String] :name
|
|
173
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
|
174
|
+
# @option opts [String] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
|
|
175
|
+
# @option opts [String] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
|
|
176
|
+
# @option opts [String] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
|
|
177
|
+
# @option opts [String] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
|
|
178
|
+
# @option opts [String] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
|
|
179
|
+
# @option opts [String] :pulp_last_updated ISO 8601 formatted dates are supported
|
|
180
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
181
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
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 [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
|
|
185
|
+
def list_with_http_info(opts = {})
|
|
186
|
+
if @api_client.config.debugging
|
|
187
|
+
@api_client.config.logger.debug 'Calling API: RemotesContainerApi.list ...'
|
|
188
|
+
end
|
|
189
|
+
# resource path
|
|
190
|
+
local_var_path = '/pulp/api/v3/remotes/container/container/'
|
|
191
|
+
|
|
192
|
+
# query parameters
|
|
193
|
+
query_params = opts[:query_params] || {}
|
|
194
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
195
|
+
query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
|
|
196
|
+
query_params[:'pulp_last_updated__lt'] = opts[:'pulp_last_updated__lt'] if !opts[:'pulp_last_updated__lt'].nil?
|
|
197
|
+
query_params[:'pulp_last_updated__lte'] = opts[:'pulp_last_updated__lte'] if !opts[:'pulp_last_updated__lte'].nil?
|
|
198
|
+
query_params[:'pulp_last_updated__gt'] = opts[:'pulp_last_updated__gt'] if !opts[:'pulp_last_updated__gt'].nil?
|
|
199
|
+
query_params[:'pulp_last_updated__gte'] = opts[:'pulp_last_updated__gte'] if !opts[:'pulp_last_updated__gte'].nil?
|
|
200
|
+
query_params[:'pulp_last_updated__range'] = opts[:'pulp_last_updated__range'] if !opts[:'pulp_last_updated__range'].nil?
|
|
201
|
+
query_params[:'pulp_last_updated'] = opts[:'pulp_last_updated'] if !opts[:'pulp_last_updated'].nil?
|
|
202
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
203
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
204
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
205
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
|
206
|
+
|
|
207
|
+
# header parameters
|
|
208
|
+
header_params = opts[:header_params] || {}
|
|
209
|
+
# HTTP header 'Accept' (if needed)
|
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
211
|
+
|
|
212
|
+
# form parameters
|
|
213
|
+
form_params = opts[:form_params] || {}
|
|
214
|
+
|
|
215
|
+
# http body (model)
|
|
216
|
+
post_body = opts[:body]
|
|
217
|
+
|
|
218
|
+
# return_type
|
|
219
|
+
return_type = opts[:return_type] || 'InlineResponse2004'
|
|
220
|
+
|
|
221
|
+
# auth_names
|
|
222
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
223
|
+
|
|
224
|
+
new_options = opts.merge(
|
|
225
|
+
:header_params => header_params,
|
|
226
|
+
:query_params => query_params,
|
|
227
|
+
:form_params => form_params,
|
|
228
|
+
:body => post_body,
|
|
229
|
+
:auth_names => auth_names,
|
|
230
|
+
:return_type => return_type
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
234
|
+
if @api_client.config.debugging
|
|
235
|
+
@api_client.config.logger.debug "API called: RemotesContainerApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
236
|
+
end
|
|
237
|
+
return data, status_code, headers
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Partially update a container remote
|
|
241
|
+
# Trigger an asynchronous partial update task
|
|
242
|
+
# @param container_remote_href [String] URI of Container Remote. e.g.: /pulp/api/v3/remotes/container/container/1/
|
|
243
|
+
# @param data [ContainerContainerRemote]
|
|
244
|
+
# @param [Hash] opts the optional parameters
|
|
245
|
+
# @return [AsyncOperationResponse]
|
|
246
|
+
def partial_update(container_remote_href, data, opts = {})
|
|
247
|
+
data, _status_code, _headers = partial_update_with_http_info(container_remote_href, data, opts)
|
|
248
|
+
data
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Partially update a container remote
|
|
252
|
+
# Trigger an asynchronous partial update task
|
|
253
|
+
# @param container_remote_href [String] URI of Container Remote. e.g.: /pulp/api/v3/remotes/container/container/1/
|
|
254
|
+
# @param data [ContainerContainerRemote]
|
|
255
|
+
# @param [Hash] opts the optional parameters
|
|
256
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
257
|
+
def partial_update_with_http_info(container_remote_href, data, opts = {})
|
|
258
|
+
if @api_client.config.debugging
|
|
259
|
+
@api_client.config.logger.debug 'Calling API: RemotesContainerApi.partial_update ...'
|
|
260
|
+
end
|
|
261
|
+
# verify the required parameter 'container_remote_href' is set
|
|
262
|
+
if @api_client.config.client_side_validation && container_remote_href.nil?
|
|
263
|
+
fail ArgumentError, "Missing the required parameter 'container_remote_href' when calling RemotesContainerApi.partial_update"
|
|
264
|
+
end
|
|
265
|
+
# verify the required parameter 'data' is set
|
|
266
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
267
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesContainerApi.partial_update"
|
|
268
|
+
end
|
|
269
|
+
# resource path
|
|
270
|
+
local_var_path = '{container_remote_href}'.sub('{' + 'container_remote_href' + '}', CGI.escape(container_remote_href.to_s).gsub('%2F', '/'))
|
|
271
|
+
|
|
272
|
+
# query parameters
|
|
273
|
+
query_params = opts[:query_params] || {}
|
|
274
|
+
|
|
275
|
+
# header parameters
|
|
276
|
+
header_params = opts[:header_params] || {}
|
|
277
|
+
# HTTP header 'Accept' (if needed)
|
|
278
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
279
|
+
# HTTP header 'Content-Type'
|
|
280
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
281
|
+
|
|
282
|
+
# form parameters
|
|
283
|
+
form_params = opts[:form_params] || {}
|
|
284
|
+
|
|
285
|
+
# http body (model)
|
|
286
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
287
|
+
|
|
288
|
+
# return_type
|
|
289
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
290
|
+
|
|
291
|
+
# auth_names
|
|
292
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
293
|
+
|
|
294
|
+
new_options = opts.merge(
|
|
295
|
+
:header_params => header_params,
|
|
296
|
+
:query_params => query_params,
|
|
297
|
+
:form_params => form_params,
|
|
298
|
+
:body => post_body,
|
|
299
|
+
:auth_names => auth_names,
|
|
300
|
+
:return_type => return_type
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
304
|
+
if @api_client.config.debugging
|
|
305
|
+
@api_client.config.logger.debug "API called: RemotesContainerApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
306
|
+
end
|
|
307
|
+
return data, status_code, headers
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Inspect a container remote
|
|
311
|
+
# Container remotes represent an external repository that implements the Container Registry API. Container remotes support deferred downloading by configuring the ``policy`` field. ``on_demand`` and ``streamed`` policies can provide significant disk space savings.
|
|
312
|
+
# @param container_remote_href [String] URI of Container Remote. e.g.: /pulp/api/v3/remotes/container/container/1/
|
|
313
|
+
# @param [Hash] opts the optional parameters
|
|
314
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
315
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
316
|
+
# @return [ContainerContainerRemote]
|
|
317
|
+
def read(container_remote_href, opts = {})
|
|
318
|
+
data, _status_code, _headers = read_with_http_info(container_remote_href, opts)
|
|
319
|
+
data
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# Inspect a container remote
|
|
323
|
+
# Container remotes represent an external repository that implements the Container Registry API. Container remotes support deferred downloading by configuring the ``policy`` field. ``on_demand`` and ``streamed`` policies can provide significant disk space savings.
|
|
324
|
+
# @param container_remote_href [String] URI of Container Remote. e.g.: /pulp/api/v3/remotes/container/container/1/
|
|
325
|
+
# @param [Hash] opts the optional parameters
|
|
326
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
327
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
328
|
+
# @return [Array<(ContainerContainerRemote, Integer, Hash)>] ContainerContainerRemote data, response status code and response headers
|
|
329
|
+
def read_with_http_info(container_remote_href, opts = {})
|
|
330
|
+
if @api_client.config.debugging
|
|
331
|
+
@api_client.config.logger.debug 'Calling API: RemotesContainerApi.read ...'
|
|
332
|
+
end
|
|
333
|
+
# verify the required parameter 'container_remote_href' is set
|
|
334
|
+
if @api_client.config.client_side_validation && container_remote_href.nil?
|
|
335
|
+
fail ArgumentError, "Missing the required parameter 'container_remote_href' when calling RemotesContainerApi.read"
|
|
336
|
+
end
|
|
337
|
+
# resource path
|
|
338
|
+
local_var_path = '{container_remote_href}'.sub('{' + 'container_remote_href' + '}', CGI.escape(container_remote_href.to_s).gsub('%2F', '/'))
|
|
339
|
+
|
|
340
|
+
# query parameters
|
|
341
|
+
query_params = opts[:query_params] || {}
|
|
342
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
343
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
|
344
|
+
|
|
345
|
+
# header parameters
|
|
346
|
+
header_params = opts[:header_params] || {}
|
|
347
|
+
# HTTP header 'Accept' (if needed)
|
|
348
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
349
|
+
|
|
350
|
+
# form parameters
|
|
351
|
+
form_params = opts[:form_params] || {}
|
|
352
|
+
|
|
353
|
+
# http body (model)
|
|
354
|
+
post_body = opts[:body]
|
|
355
|
+
|
|
356
|
+
# return_type
|
|
357
|
+
return_type = opts[:return_type] || 'ContainerContainerRemote'
|
|
358
|
+
|
|
359
|
+
# auth_names
|
|
360
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
361
|
+
|
|
362
|
+
new_options = opts.merge(
|
|
363
|
+
:header_params => header_params,
|
|
364
|
+
:query_params => query_params,
|
|
365
|
+
:form_params => form_params,
|
|
366
|
+
:body => post_body,
|
|
367
|
+
:auth_names => auth_names,
|
|
368
|
+
:return_type => return_type
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
372
|
+
if @api_client.config.debugging
|
|
373
|
+
@api_client.config.logger.debug "API called: RemotesContainerApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
374
|
+
end
|
|
375
|
+
return data, status_code, headers
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# Update a container remote
|
|
379
|
+
# Trigger an asynchronous update task
|
|
380
|
+
# @param container_remote_href [String] URI of Container Remote. e.g.: /pulp/api/v3/remotes/container/container/1/
|
|
381
|
+
# @param data [ContainerContainerRemote]
|
|
382
|
+
# @param [Hash] opts the optional parameters
|
|
383
|
+
# @return [AsyncOperationResponse]
|
|
384
|
+
def update(container_remote_href, data, opts = {})
|
|
385
|
+
data, _status_code, _headers = update_with_http_info(container_remote_href, data, opts)
|
|
386
|
+
data
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
# Update a container remote
|
|
390
|
+
# Trigger an asynchronous update task
|
|
391
|
+
# @param container_remote_href [String] URI of Container Remote. e.g.: /pulp/api/v3/remotes/container/container/1/
|
|
392
|
+
# @param data [ContainerContainerRemote]
|
|
393
|
+
# @param [Hash] opts the optional parameters
|
|
394
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
395
|
+
def update_with_http_info(container_remote_href, data, opts = {})
|
|
396
|
+
if @api_client.config.debugging
|
|
397
|
+
@api_client.config.logger.debug 'Calling API: RemotesContainerApi.update ...'
|
|
398
|
+
end
|
|
399
|
+
# verify the required parameter 'container_remote_href' is set
|
|
400
|
+
if @api_client.config.client_side_validation && container_remote_href.nil?
|
|
401
|
+
fail ArgumentError, "Missing the required parameter 'container_remote_href' when calling RemotesContainerApi.update"
|
|
402
|
+
end
|
|
403
|
+
# verify the required parameter 'data' is set
|
|
404
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
405
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesContainerApi.update"
|
|
406
|
+
end
|
|
407
|
+
# resource path
|
|
408
|
+
local_var_path = '{container_remote_href}'.sub('{' + 'container_remote_href' + '}', CGI.escape(container_remote_href.to_s).gsub('%2F', '/'))
|
|
409
|
+
|
|
410
|
+
# query parameters
|
|
411
|
+
query_params = opts[:query_params] || {}
|
|
412
|
+
|
|
413
|
+
# header parameters
|
|
414
|
+
header_params = opts[:header_params] || {}
|
|
415
|
+
# HTTP header 'Accept' (if needed)
|
|
416
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
417
|
+
# HTTP header 'Content-Type'
|
|
418
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
419
|
+
|
|
420
|
+
# form parameters
|
|
421
|
+
form_params = opts[:form_params] || {}
|
|
422
|
+
|
|
423
|
+
# http body (model)
|
|
424
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
425
|
+
|
|
426
|
+
# return_type
|
|
427
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
428
|
+
|
|
429
|
+
# auth_names
|
|
430
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
431
|
+
|
|
432
|
+
new_options = opts.merge(
|
|
433
|
+
:header_params => header_params,
|
|
434
|
+
:query_params => query_params,
|
|
435
|
+
:form_params => form_params,
|
|
436
|
+
:body => post_body,
|
|
437
|
+
:auth_names => auth_names,
|
|
438
|
+
:return_type => return_type
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
442
|
+
if @api_client.config.debugging
|
|
443
|
+
@api_client.config.logger.debug "API called: RemotesContainerApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
444
|
+
end
|
|
445
|
+
return data, status_code, headers
|
|
446
|
+
end
|
|
447
|
+
end
|
|
448
|
+
end
|