pulp_deb_client 2.0.0b2
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 +163 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContentGenericContentsApi.md +194 -0
- data/docs/ContentInstallerFileIndexApi.md +186 -0
- data/docs/ContentInstallerPackagesApi.md +194 -0
- data/docs/ContentPackageIndexApi.md +186 -0
- data/docs/ContentPackagesApi.md +194 -0
- data/docs/ContentReleasesApi.md +186 -0
- data/docs/DebDistribution.md +29 -0
- data/docs/DebPublication.md +31 -0
- data/docs/DebRemote.md +57 -0
- data/docs/DistributionsAptApi.md +358 -0
- data/docs/GenericContent.md +41 -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/InlineResponse2007.md +23 -0
- data/docs/InlineResponse2008.md +23 -0
- data/docs/InlineResponse2009.md +23 -0
- data/docs/InstallerFileIndex.md +31 -0
- data/docs/InstallerPackage.md +99 -0
- data/docs/Package.md +99 -0
- data/docs/PackageIndex.md +31 -0
- data/docs/PublicationsAptApi.md +235 -0
- data/docs/PublicationsVerbatimApi.md +235 -0
- data/docs/Release.md +31 -0
- data/docs/RemotesAptApi.md +417 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/VerbatimPublication.md +27 -0
- data/git_push.sh +58 -0
- data/lib/pulp_deb_client/api/content_generic_contents_api.rb +239 -0
- data/lib/pulp_deb_client/api/content_installer_file_index_api.rb +225 -0
- data/lib/pulp_deb_client/api/content_installer_packages_api.rb +235 -0
- data/lib/pulp_deb_client/api/content_package_index_api.rb +225 -0
- data/lib/pulp_deb_client/api/content_packages_api.rb +235 -0
- data/lib/pulp_deb_client/api/content_releases_api.rb +225 -0
- data/lib/pulp_deb_client/api/distributions_apt_api.rb +436 -0
- data/lib/pulp_deb_client/api/publications_apt_api.rb +279 -0
- data/lib/pulp_deb_client/api/publications_verbatim_api.rb +279 -0
- data/lib/pulp_deb_client/api/remotes_apt_api.rb +510 -0
- data/lib/pulp_deb_client/api_client.rb +402 -0
- data/lib/pulp_deb_client/api_error.rb +57 -0
- data/lib/pulp_deb_client/configuration.rb +243 -0
- data/lib/pulp_deb_client/models/async_operation_response.rb +202 -0
- data/lib/pulp_deb_client/models/deb_distribution.rb +337 -0
- data/lib/pulp_deb_client/models/deb_publication.rb +282 -0
- data/lib/pulp_deb_client/models/deb_remote.rb +653 -0
- data/lib/pulp_deb_client/models/generic_content.rb +444 -0
- data/lib/pulp_deb_client/models/inline_response200.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2001.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2002.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2003.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2004.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2005.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2006.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2007.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2008.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response2009.rb +235 -0
- data/lib/pulp_deb_client/models/installer_file_index.rb +355 -0
- data/lib/pulp_deb_client/models/installer_package.rb +1101 -0
- data/lib/pulp_deb_client/models/package.rb +1101 -0
- data/lib/pulp_deb_client/models/package_index.rb +355 -0
- data/lib/pulp_deb_client/models/release.rb +356 -0
- data/lib/pulp_deb_client/models/repository_sync_url.rb +214 -0
- data/lib/pulp_deb_client/models/verbatim_publication.rb +258 -0
- data/lib/pulp_deb_client/version.rb +15 -0
- data/lib/pulp_deb_client.rb +71 -0
- data/pulp_deb_client.gemspec +39 -0
- data/spec/api/content_generic_contents_api_spec.rb +80 -0
- data/spec/api/content_installer_file_index_api_spec.rb +77 -0
- data/spec/api/content_installer_packages_api_spec.rb +80 -0
- data/spec/api/content_package_index_api_spec.rb +77 -0
- data/spec/api/content_packages_api_spec.rb +80 -0
- data/spec/api/content_releases_api_spec.rb +77 -0
- data/spec/api/distributions_apt_api_spec.rb +118 -0
- data/spec/api/publications_apt_api_spec.rb +87 -0
- data/spec/api/publications_verbatim_api_spec.rb +87 -0
- data/spec/api/remotes_apt_api_spec.rb +132 -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/deb_distribution_spec.rb +77 -0
- data/spec/models/deb_publication_spec.rb +83 -0
- data/spec/models/deb_remote_spec.rb +165 -0
- data/spec/models/generic_content_spec.rb +113 -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_response2007_spec.rb +59 -0
- data/spec/models/inline_response2008_spec.rb +59 -0
- data/spec/models/inline_response2009_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/installer_file_index_spec.rb +83 -0
- data/spec/models/installer_package_spec.rb +287 -0
- data/spec/models/package_index_spec.rb +83 -0
- data/spec/models/package_spec.rb +287 -0
- data/spec/models/release_spec.rb +83 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/verbatim_publication_spec.rb +71 -0
- data/spec/spec_helper.rb +111 -0
- metadata +242 -0
|
@@ -0,0 +1,510 @@
|
|
|
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.1.3-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PulpDebClient
|
|
16
|
+
class RemotesAptApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a deb remote
|
|
23
|
+
# A ViewSet for DebRemote.
|
|
24
|
+
# @param data [DebRemote]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [DebRemote]
|
|
27
|
+
def create(data, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_with_http_info(data, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create a deb remote
|
|
33
|
+
# A ViewSet for DebRemote.
|
|
34
|
+
# @param data [DebRemote]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(DebRemote, Integer, Hash)>] DebRemote 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: RemotesAptApi.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 RemotesAptApi.create"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/pulp/api/v3/remotes/deb/apt/'
|
|
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] || 'DebRemote'
|
|
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: RemotesAptApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Delete a deb remote
|
|
87
|
+
# Trigger an asynchronous delete task
|
|
88
|
+
# @param deb_remote_href [String] URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @return [AsyncOperationResponse]
|
|
91
|
+
def delete(deb_remote_href, opts = {})
|
|
92
|
+
data, _status_code, _headers = delete_with_http_info(deb_remote_href, opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Delete a deb remote
|
|
97
|
+
# Trigger an asynchronous delete task
|
|
98
|
+
# @param deb_remote_href [String] URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/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(deb_remote_href, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: RemotesAptApi.delete ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'deb_remote_href' is set
|
|
106
|
+
if @api_client.config.client_side_validation && deb_remote_href.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'deb_remote_href' when calling RemotesAptApi.delete"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '{deb_remote_href}'.sub('{' + 'deb_remote_href' + '}', CGI.escape(deb_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: RemotesAptApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
144
|
+
end
|
|
145
|
+
return data, status_code, headers
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# List deb remotes
|
|
149
|
+
# A ViewSet for DebRemote.
|
|
150
|
+
# @param [Hash] opts the optional parameters
|
|
151
|
+
# @option opts [String] :name
|
|
152
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
|
153
|
+
# @option opts [String] :_last_updated__lt Filter results where _last_updated is less than value
|
|
154
|
+
# @option opts [String] :_last_updated__lte Filter results where _last_updated is less than or equal to value
|
|
155
|
+
# @option opts [String] :_last_updated__gt Filter results where _last_updated is greater than value
|
|
156
|
+
# @option opts [String] :_last_updated__gte Filter results where _last_updated is greater than or equal to value
|
|
157
|
+
# @option opts [String] :_last_updated__range Filter results where _last_updated is between two comma separated values
|
|
158
|
+
# @option opts [String] :_last_updated ISO 8601 formatted dates are supported
|
|
159
|
+
# @option opts [Integer] :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
|
+
# @return [InlineResponse2009]
|
|
163
|
+
def list(opts = {})
|
|
164
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
|
165
|
+
data
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# List deb remotes
|
|
169
|
+
# A ViewSet for DebRemote.
|
|
170
|
+
# @param [Hash] opts the optional parameters
|
|
171
|
+
# @option opts [String] :name
|
|
172
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
|
173
|
+
# @option opts [String] :_last_updated__lt Filter results where _last_updated is less than value
|
|
174
|
+
# @option opts [String] :_last_updated__lte Filter results where _last_updated is less than or equal to value
|
|
175
|
+
# @option opts [String] :_last_updated__gt Filter results where _last_updated is greater than value
|
|
176
|
+
# @option opts [String] :_last_updated__gte Filter results where _last_updated is greater than or equal to value
|
|
177
|
+
# @option opts [String] :_last_updated__range Filter results where _last_updated is between two comma separated values
|
|
178
|
+
# @option opts [String] :_last_updated ISO 8601 formatted dates are supported
|
|
179
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
180
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
181
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
182
|
+
# @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers
|
|
183
|
+
def list_with_http_info(opts = {})
|
|
184
|
+
if @api_client.config.debugging
|
|
185
|
+
@api_client.config.logger.debug 'Calling API: RemotesAptApi.list ...'
|
|
186
|
+
end
|
|
187
|
+
# resource path
|
|
188
|
+
local_var_path = '/pulp/api/v3/remotes/deb/apt/'
|
|
189
|
+
|
|
190
|
+
# query parameters
|
|
191
|
+
query_params = opts[:query_params] || {}
|
|
192
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
193
|
+
query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
|
|
194
|
+
query_params[:'_last_updated__lt'] = opts[:'_last_updated__lt'] if !opts[:'_last_updated__lt'].nil?
|
|
195
|
+
query_params[:'_last_updated__lte'] = opts[:'_last_updated__lte'] if !opts[:'_last_updated__lte'].nil?
|
|
196
|
+
query_params[:'_last_updated__gt'] = opts[:'_last_updated__gt'] if !opts[:'_last_updated__gt'].nil?
|
|
197
|
+
query_params[:'_last_updated__gte'] = opts[:'_last_updated__gte'] if !opts[:'_last_updated__gte'].nil?
|
|
198
|
+
query_params[:'_last_updated__range'] = opts[:'_last_updated__range'] if !opts[:'_last_updated__range'].nil?
|
|
199
|
+
query_params[:'_last_updated'] = opts[:'_last_updated'] if !opts[:'_last_updated'].nil?
|
|
200
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
201
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
202
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
203
|
+
|
|
204
|
+
# header parameters
|
|
205
|
+
header_params = opts[:header_params] || {}
|
|
206
|
+
# HTTP header 'Accept' (if needed)
|
|
207
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
208
|
+
|
|
209
|
+
# form parameters
|
|
210
|
+
form_params = opts[:form_params] || {}
|
|
211
|
+
|
|
212
|
+
# http body (model)
|
|
213
|
+
post_body = opts[:body]
|
|
214
|
+
|
|
215
|
+
# return_type
|
|
216
|
+
return_type = opts[:return_type] || 'InlineResponse2009'
|
|
217
|
+
|
|
218
|
+
# auth_names
|
|
219
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
220
|
+
|
|
221
|
+
new_options = opts.merge(
|
|
222
|
+
:header_params => header_params,
|
|
223
|
+
:query_params => query_params,
|
|
224
|
+
:form_params => form_params,
|
|
225
|
+
:body => post_body,
|
|
226
|
+
:auth_names => auth_names,
|
|
227
|
+
:return_type => return_type
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
231
|
+
if @api_client.config.debugging
|
|
232
|
+
@api_client.config.logger.debug "API called: RemotesAptApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
233
|
+
end
|
|
234
|
+
return data, status_code, headers
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Partially update a deb remote
|
|
238
|
+
# Trigger an asynchronous partial update task
|
|
239
|
+
# @param deb_remote_href [String] URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
240
|
+
# @param data [DebRemote]
|
|
241
|
+
# @param [Hash] opts the optional parameters
|
|
242
|
+
# @return [AsyncOperationResponse]
|
|
243
|
+
def partial_update(deb_remote_href, data, opts = {})
|
|
244
|
+
data, _status_code, _headers = partial_update_with_http_info(deb_remote_href, data, opts)
|
|
245
|
+
data
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Partially update a deb remote
|
|
249
|
+
# Trigger an asynchronous partial update task
|
|
250
|
+
# @param deb_remote_href [String] URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
251
|
+
# @param data [DebRemote]
|
|
252
|
+
# @param [Hash] opts the optional parameters
|
|
253
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
254
|
+
def partial_update_with_http_info(deb_remote_href, data, opts = {})
|
|
255
|
+
if @api_client.config.debugging
|
|
256
|
+
@api_client.config.logger.debug 'Calling API: RemotesAptApi.partial_update ...'
|
|
257
|
+
end
|
|
258
|
+
# verify the required parameter 'deb_remote_href' is set
|
|
259
|
+
if @api_client.config.client_side_validation && deb_remote_href.nil?
|
|
260
|
+
fail ArgumentError, "Missing the required parameter 'deb_remote_href' when calling RemotesAptApi.partial_update"
|
|
261
|
+
end
|
|
262
|
+
# verify the required parameter 'data' is set
|
|
263
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
264
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesAptApi.partial_update"
|
|
265
|
+
end
|
|
266
|
+
# resource path
|
|
267
|
+
local_var_path = '{deb_remote_href}'.sub('{' + 'deb_remote_href' + '}', CGI.escape(deb_remote_href.to_s).gsub('%2F', '/'))
|
|
268
|
+
|
|
269
|
+
# query parameters
|
|
270
|
+
query_params = opts[:query_params] || {}
|
|
271
|
+
|
|
272
|
+
# header parameters
|
|
273
|
+
header_params = opts[:header_params] || {}
|
|
274
|
+
# HTTP header 'Accept' (if needed)
|
|
275
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
276
|
+
# HTTP header 'Content-Type'
|
|
277
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
278
|
+
|
|
279
|
+
# form parameters
|
|
280
|
+
form_params = opts[:form_params] || {}
|
|
281
|
+
|
|
282
|
+
# http body (model)
|
|
283
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
284
|
+
|
|
285
|
+
# return_type
|
|
286
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
287
|
+
|
|
288
|
+
# auth_names
|
|
289
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
290
|
+
|
|
291
|
+
new_options = opts.merge(
|
|
292
|
+
:header_params => header_params,
|
|
293
|
+
:query_params => query_params,
|
|
294
|
+
:form_params => form_params,
|
|
295
|
+
:body => post_body,
|
|
296
|
+
:auth_names => auth_names,
|
|
297
|
+
:return_type => return_type
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
301
|
+
if @api_client.config.debugging
|
|
302
|
+
@api_client.config.logger.debug "API called: RemotesAptApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
303
|
+
end
|
|
304
|
+
return data, status_code, headers
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Inspect a deb remote
|
|
308
|
+
# A ViewSet for DebRemote.
|
|
309
|
+
# @param deb_remote_href [String] URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
310
|
+
# @param [Hash] opts the optional parameters
|
|
311
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
312
|
+
# @return [DebRemote]
|
|
313
|
+
def read(deb_remote_href, opts = {})
|
|
314
|
+
data, _status_code, _headers = read_with_http_info(deb_remote_href, opts)
|
|
315
|
+
data
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
# Inspect a deb remote
|
|
319
|
+
# A ViewSet for DebRemote.
|
|
320
|
+
# @param deb_remote_href [String] URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
321
|
+
# @param [Hash] opts the optional parameters
|
|
322
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
323
|
+
# @return [Array<(DebRemote, Integer, Hash)>] DebRemote data, response status code and response headers
|
|
324
|
+
def read_with_http_info(deb_remote_href, opts = {})
|
|
325
|
+
if @api_client.config.debugging
|
|
326
|
+
@api_client.config.logger.debug 'Calling API: RemotesAptApi.read ...'
|
|
327
|
+
end
|
|
328
|
+
# verify the required parameter 'deb_remote_href' is set
|
|
329
|
+
if @api_client.config.client_side_validation && deb_remote_href.nil?
|
|
330
|
+
fail ArgumentError, "Missing the required parameter 'deb_remote_href' when calling RemotesAptApi.read"
|
|
331
|
+
end
|
|
332
|
+
# resource path
|
|
333
|
+
local_var_path = '{deb_remote_href}'.sub('{' + 'deb_remote_href' + '}', CGI.escape(deb_remote_href.to_s).gsub('%2F', '/'))
|
|
334
|
+
|
|
335
|
+
# query parameters
|
|
336
|
+
query_params = opts[:query_params] || {}
|
|
337
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
338
|
+
|
|
339
|
+
# header parameters
|
|
340
|
+
header_params = opts[:header_params] || {}
|
|
341
|
+
# HTTP header 'Accept' (if needed)
|
|
342
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
343
|
+
|
|
344
|
+
# form parameters
|
|
345
|
+
form_params = opts[:form_params] || {}
|
|
346
|
+
|
|
347
|
+
# http body (model)
|
|
348
|
+
post_body = opts[:body]
|
|
349
|
+
|
|
350
|
+
# return_type
|
|
351
|
+
return_type = opts[:return_type] || 'DebRemote'
|
|
352
|
+
|
|
353
|
+
# auth_names
|
|
354
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
355
|
+
|
|
356
|
+
new_options = opts.merge(
|
|
357
|
+
:header_params => header_params,
|
|
358
|
+
:query_params => query_params,
|
|
359
|
+
:form_params => form_params,
|
|
360
|
+
:body => post_body,
|
|
361
|
+
:auth_names => auth_names,
|
|
362
|
+
:return_type => return_type
|
|
363
|
+
)
|
|
364
|
+
|
|
365
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
366
|
+
if @api_client.config.debugging
|
|
367
|
+
@api_client.config.logger.debug "API called: RemotesAptApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
368
|
+
end
|
|
369
|
+
return data, status_code, headers
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Trigger an asynchronous task to sync content
|
|
373
|
+
# @param deb_remote_href [String] URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
374
|
+
# @param data [RepositorySyncURL]
|
|
375
|
+
# @param [Hash] opts the optional parameters
|
|
376
|
+
# @return [AsyncOperationResponse]
|
|
377
|
+
def sync(deb_remote_href, data, opts = {})
|
|
378
|
+
data, _status_code, _headers = sync_with_http_info(deb_remote_href, data, opts)
|
|
379
|
+
data
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# Trigger an asynchronous task to sync content
|
|
383
|
+
# @param deb_remote_href [String] URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
384
|
+
# @param data [RepositorySyncURL]
|
|
385
|
+
# @param [Hash] opts the optional parameters
|
|
386
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
387
|
+
def sync_with_http_info(deb_remote_href, data, opts = {})
|
|
388
|
+
if @api_client.config.debugging
|
|
389
|
+
@api_client.config.logger.debug 'Calling API: RemotesAptApi.sync ...'
|
|
390
|
+
end
|
|
391
|
+
# verify the required parameter 'deb_remote_href' is set
|
|
392
|
+
if @api_client.config.client_side_validation && deb_remote_href.nil?
|
|
393
|
+
fail ArgumentError, "Missing the required parameter 'deb_remote_href' when calling RemotesAptApi.sync"
|
|
394
|
+
end
|
|
395
|
+
# verify the required parameter 'data' is set
|
|
396
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
397
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesAptApi.sync"
|
|
398
|
+
end
|
|
399
|
+
# resource path
|
|
400
|
+
local_var_path = '{deb_remote_href}sync/'.sub('{' + 'deb_remote_href' + '}', CGI.escape(deb_remote_href.to_s).gsub('%2F', '/'))
|
|
401
|
+
|
|
402
|
+
# query parameters
|
|
403
|
+
query_params = opts[:query_params] || {}
|
|
404
|
+
|
|
405
|
+
# header parameters
|
|
406
|
+
header_params = opts[:header_params] || {}
|
|
407
|
+
# HTTP header 'Accept' (if needed)
|
|
408
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
409
|
+
# HTTP header 'Content-Type'
|
|
410
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
411
|
+
|
|
412
|
+
# form parameters
|
|
413
|
+
form_params = opts[:form_params] || {}
|
|
414
|
+
|
|
415
|
+
# http body (model)
|
|
416
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
417
|
+
|
|
418
|
+
# return_type
|
|
419
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
420
|
+
|
|
421
|
+
# auth_names
|
|
422
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
423
|
+
|
|
424
|
+
new_options = opts.merge(
|
|
425
|
+
:header_params => header_params,
|
|
426
|
+
:query_params => query_params,
|
|
427
|
+
:form_params => form_params,
|
|
428
|
+
:body => post_body,
|
|
429
|
+
:auth_names => auth_names,
|
|
430
|
+
:return_type => return_type
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
434
|
+
if @api_client.config.debugging
|
|
435
|
+
@api_client.config.logger.debug "API called: RemotesAptApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
436
|
+
end
|
|
437
|
+
return data, status_code, headers
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Update a deb remote
|
|
441
|
+
# Trigger an asynchronous update task
|
|
442
|
+
# @param deb_remote_href [String] URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
443
|
+
# @param data [DebRemote]
|
|
444
|
+
# @param [Hash] opts the optional parameters
|
|
445
|
+
# @return [AsyncOperationResponse]
|
|
446
|
+
def update(deb_remote_href, data, opts = {})
|
|
447
|
+
data, _status_code, _headers = update_with_http_info(deb_remote_href, data, opts)
|
|
448
|
+
data
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
# Update a deb remote
|
|
452
|
+
# Trigger an asynchronous update task
|
|
453
|
+
# @param deb_remote_href [String] URI of Deb Remote. e.g.: /pulp/api/v3/remotes/deb/apt/1/
|
|
454
|
+
# @param data [DebRemote]
|
|
455
|
+
# @param [Hash] opts the optional parameters
|
|
456
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
457
|
+
def update_with_http_info(deb_remote_href, data, opts = {})
|
|
458
|
+
if @api_client.config.debugging
|
|
459
|
+
@api_client.config.logger.debug 'Calling API: RemotesAptApi.update ...'
|
|
460
|
+
end
|
|
461
|
+
# verify the required parameter 'deb_remote_href' is set
|
|
462
|
+
if @api_client.config.client_side_validation && deb_remote_href.nil?
|
|
463
|
+
fail ArgumentError, "Missing the required parameter 'deb_remote_href' when calling RemotesAptApi.update"
|
|
464
|
+
end
|
|
465
|
+
# verify the required parameter 'data' is set
|
|
466
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
467
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesAptApi.update"
|
|
468
|
+
end
|
|
469
|
+
# resource path
|
|
470
|
+
local_var_path = '{deb_remote_href}'.sub('{' + 'deb_remote_href' + '}', CGI.escape(deb_remote_href.to_s).gsub('%2F', '/'))
|
|
471
|
+
|
|
472
|
+
# query parameters
|
|
473
|
+
query_params = opts[:query_params] || {}
|
|
474
|
+
|
|
475
|
+
# header parameters
|
|
476
|
+
header_params = opts[:header_params] || {}
|
|
477
|
+
# HTTP header 'Accept' (if needed)
|
|
478
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
479
|
+
# HTTP header 'Content-Type'
|
|
480
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
481
|
+
|
|
482
|
+
# form parameters
|
|
483
|
+
form_params = opts[:form_params] || {}
|
|
484
|
+
|
|
485
|
+
# http body (model)
|
|
486
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
487
|
+
|
|
488
|
+
# return_type
|
|
489
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
490
|
+
|
|
491
|
+
# auth_names
|
|
492
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
493
|
+
|
|
494
|
+
new_options = opts.merge(
|
|
495
|
+
:header_params => header_params,
|
|
496
|
+
:query_params => query_params,
|
|
497
|
+
:form_params => form_params,
|
|
498
|
+
:body => post_body,
|
|
499
|
+
:auth_names => auth_names,
|
|
500
|
+
:return_type => return_type
|
|
501
|
+
)
|
|
502
|
+
|
|
503
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
504
|
+
if @api_client.config.debugging
|
|
505
|
+
@api_client.config.logger.debug "API called: RemotesAptApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
506
|
+
end
|
|
507
|
+
return data, status_code, headers
|
|
508
|
+
end
|
|
509
|
+
end
|
|
510
|
+
end
|