pulp_rpm_client 3.16.2 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +23 -12
- data/docs/AcsRpmApi.md +417 -0
- data/docs/CompsXml.md +21 -0
- data/docs/PaginatedrpmRpmAlternateContentSourceResponseList.md +23 -0
- data/docs/PatchedrpmRpmAlternateContentSource.md +23 -0
- data/docs/RpmCompsApi.md +68 -0
- data/docs/RpmRpmAlternateContentSource.md +23 -0
- data/docs/RpmRpmAlternateContentSourceResponse.md +27 -0
- data/docs/TaskGroupOperationResponse.md +17 -0
- data/lib/pulp_rpm_client/api/acs_rpm_api.rb +510 -0
- data/lib/pulp_rpm_client/api/rpm_comps_api.rb +93 -0
- data/lib/pulp_rpm_client/models/comps_xml.rb +233 -0
- data/lib/pulp_rpm_client/models/paginatedrpm_rpm_alternate_content_source_response_list.rb +237 -0
- data/lib/pulp_rpm_client/models/patchedrpm_rpm_alternate_content_source.rb +256 -0
- data/lib/pulp_rpm_client/models/rpm_rpm_alternate_content_source.rb +270 -0
- data/lib/pulp_rpm_client/models/rpm_rpm_alternate_content_source_response.rb +270 -0
- data/lib/pulp_rpm_client/models/task_group_operation_response.rb +213 -0
- data/lib/pulp_rpm_client/version.rb +1 -1
- data/lib/pulp_rpm_client.rb +8 -0
- data/pulp_rpm_client.gemspec +1 -1
- data/spec/api/acs_rpm_api_spec.rb +132 -0
- data/spec/api/rpm_comps_api_spec.rb +49 -0
- data/spec/models/comps_xml_spec.rb +53 -0
- data/spec/models/paginatedrpm_rpm_alternate_content_source_response_list_spec.rb +59 -0
- data/spec/models/patchedrpm_rpm_alternate_content_source_spec.rb +59 -0
- data/spec/models/rpm_rpm_alternate_content_source_response_spec.rb +71 -0
- data/spec/models/rpm_rpm_alternate_content_source_spec.rb +59 -0
- data/spec/models/task_group_operation_response_spec.rb +41 -0
- metadata +107 -69
@@ -0,0 +1,23 @@
|
|
1
|
+
# PulpRpmClient::RpmRpmAlternateContentSource
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | Name of Alternate Content Source. |
|
8
|
+
**last_refreshed** | **DateTime** | Date of last refresh of AlternateContentSource. | [optional]
|
9
|
+
**paths** | **Array<String>** | List of paths that will be appended to the Remote url when searching for content. | [optional]
|
10
|
+
**remote** | **String** | The remote to provide alternate content source. |
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'PulpRpmClient'
|
16
|
+
|
17
|
+
instance = PulpRpmClient::RpmRpmAlternateContentSource.new(name: null,
|
18
|
+
last_refreshed: null,
|
19
|
+
paths: null,
|
20
|
+
remote: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# PulpRpmClient::RpmRpmAlternateContentSourceResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
+
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
+
**name** | **String** | Name of Alternate Content Source. |
|
10
|
+
**last_refreshed** | **DateTime** | Date of last refresh of AlternateContentSource. | [optional]
|
11
|
+
**paths** | **Array<String>** | List of paths that will be appended to the Remote url when searching for content. | [optional]
|
12
|
+
**remote** | **String** | The remote to provide alternate content source. |
|
13
|
+
|
14
|
+
## Code Sample
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'PulpRpmClient'
|
18
|
+
|
19
|
+
instance = PulpRpmClient::RpmRpmAlternateContentSourceResponse.new(pulp_href: null,
|
20
|
+
pulp_created: null,
|
21
|
+
name: null,
|
22
|
+
last_refreshed: null,
|
23
|
+
paths: null,
|
24
|
+
remote: null)
|
25
|
+
```
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# PulpRpmClient::TaskGroupOperationResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**task_group** | **String** | The href of the task group. |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'PulpRpmClient'
|
13
|
+
|
14
|
+
instance = PulpRpmClient::TaskGroupOperationResponse.new(task_group: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,510 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpRpmClient
|
16
|
+
class AcsRpmApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a rpm alternate content source
|
23
|
+
# ViewSet for ACS.
|
24
|
+
# @param rpm_rpm_alternate_content_source [RpmRpmAlternateContentSource]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [RpmRpmAlternateContentSourceResponse]
|
27
|
+
def create(rpm_rpm_alternate_content_source, opts = {})
|
28
|
+
data, _status_code, _headers = create_with_http_info(rpm_rpm_alternate_content_source, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a rpm alternate content source
|
33
|
+
# ViewSet for ACS.
|
34
|
+
# @param rpm_rpm_alternate_content_source [RpmRpmAlternateContentSource]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(RpmRpmAlternateContentSourceResponse, Integer, Hash)>] RpmRpmAlternateContentSourceResponse data, response status code and response headers
|
37
|
+
def create_with_http_info(rpm_rpm_alternate_content_source, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: AcsRpmApi.create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'rpm_rpm_alternate_content_source' is set
|
42
|
+
if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source' when calling AcsRpmApi.create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/pulp/api/v3/acs/rpm/rpm/'
|
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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
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(rpm_rpm_alternate_content_source)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'RpmRpmAlternateContentSourceResponse'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
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: AcsRpmApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Delete a rpm alternate content source
|
87
|
+
# Trigger an asynchronous delete ACS task
|
88
|
+
# @param rpm_rpm_alternate_content_source_href [String]
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [AsyncOperationResponse]
|
91
|
+
def delete(rpm_rpm_alternate_content_source_href, opts = {})
|
92
|
+
data, _status_code, _headers = delete_with_http_info(rpm_rpm_alternate_content_source_href, opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete a rpm alternate content source
|
97
|
+
# Trigger an asynchronous delete ACS task
|
98
|
+
# @param rpm_rpm_alternate_content_source_href [String]
|
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(rpm_rpm_alternate_content_source_href, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: AcsRpmApi.delete ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'rpm_rpm_alternate_content_source_href' is set
|
106
|
+
if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source_href.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source_href' when calling AcsRpmApi.delete"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '{rpm_rpm_alternate_content_source_href}'.sub('{' + 'rpm_rpm_alternate_content_source_href' + '}', CGI.escape(rpm_rpm_alternate_content_source_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] || ['basicAuth']
|
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: AcsRpmApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# List rpm alternate content sources
|
149
|
+
# ViewSet for ACS.
|
150
|
+
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
152
|
+
# @option opts [String] :name
|
153
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
154
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
155
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
156
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
157
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
158
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
159
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
160
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
161
|
+
# @return [PaginatedrpmRpmAlternateContentSourceResponseList]
|
162
|
+
def list(opts = {})
|
163
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# List rpm alternate content sources
|
168
|
+
# ViewSet for ACS.
|
169
|
+
# @param [Hash] opts the optional parameters
|
170
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
171
|
+
# @option opts [String] :name
|
172
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
173
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
174
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
175
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
176
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
177
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
178
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
179
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
180
|
+
# @return [Array<(PaginatedrpmRpmAlternateContentSourceResponseList, Integer, Hash)>] PaginatedrpmRpmAlternateContentSourceResponseList data, response status code and response headers
|
181
|
+
def list_with_http_info(opts = {})
|
182
|
+
if @api_client.config.debugging
|
183
|
+
@api_client.config.logger.debug 'Calling API: AcsRpmApi.list ...'
|
184
|
+
end
|
185
|
+
# resource path
|
186
|
+
local_var_path = '/pulp/api/v3/acs/rpm/rpm/'
|
187
|
+
|
188
|
+
# query parameters
|
189
|
+
query_params = opts[:query_params] || {}
|
190
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
191
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
192
|
+
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
193
|
+
query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
|
194
|
+
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
195
|
+
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
196
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
197
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
198
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
199
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
200
|
+
|
201
|
+
# header parameters
|
202
|
+
header_params = opts[:header_params] || {}
|
203
|
+
# HTTP header 'Accept' (if needed)
|
204
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
205
|
+
|
206
|
+
# form parameters
|
207
|
+
form_params = opts[:form_params] || {}
|
208
|
+
|
209
|
+
# http body (model)
|
210
|
+
post_body = opts[:body]
|
211
|
+
|
212
|
+
# return_type
|
213
|
+
return_type = opts[:return_type] || 'PaginatedrpmRpmAlternateContentSourceResponseList'
|
214
|
+
|
215
|
+
# auth_names
|
216
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
217
|
+
|
218
|
+
new_options = opts.merge(
|
219
|
+
:header_params => header_params,
|
220
|
+
:query_params => query_params,
|
221
|
+
:form_params => form_params,
|
222
|
+
:body => post_body,
|
223
|
+
:auth_names => auth_names,
|
224
|
+
:return_type => return_type
|
225
|
+
)
|
226
|
+
|
227
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
228
|
+
if @api_client.config.debugging
|
229
|
+
@api_client.config.logger.debug "API called: AcsRpmApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
230
|
+
end
|
231
|
+
return data, status_code, headers
|
232
|
+
end
|
233
|
+
|
234
|
+
# Update a rpm alternate content source
|
235
|
+
# Trigger an asynchronous partial update task
|
236
|
+
# @param rpm_rpm_alternate_content_source_href [String]
|
237
|
+
# @param patchedrpm_rpm_alternate_content_source [PatchedrpmRpmAlternateContentSource]
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [AsyncOperationResponse]
|
240
|
+
def partial_update(rpm_rpm_alternate_content_source_href, patchedrpm_rpm_alternate_content_source, opts = {})
|
241
|
+
data, _status_code, _headers = partial_update_with_http_info(rpm_rpm_alternate_content_source_href, patchedrpm_rpm_alternate_content_source, opts)
|
242
|
+
data
|
243
|
+
end
|
244
|
+
|
245
|
+
# Update a rpm alternate content source
|
246
|
+
# Trigger an asynchronous partial update task
|
247
|
+
# @param rpm_rpm_alternate_content_source_href [String]
|
248
|
+
# @param patchedrpm_rpm_alternate_content_source [PatchedrpmRpmAlternateContentSource]
|
249
|
+
# @param [Hash] opts the optional parameters
|
250
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
251
|
+
def partial_update_with_http_info(rpm_rpm_alternate_content_source_href, patchedrpm_rpm_alternate_content_source, opts = {})
|
252
|
+
if @api_client.config.debugging
|
253
|
+
@api_client.config.logger.debug 'Calling API: AcsRpmApi.partial_update ...'
|
254
|
+
end
|
255
|
+
# verify the required parameter 'rpm_rpm_alternate_content_source_href' is set
|
256
|
+
if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source_href.nil?
|
257
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source_href' when calling AcsRpmApi.partial_update"
|
258
|
+
end
|
259
|
+
# verify the required parameter 'patchedrpm_rpm_alternate_content_source' is set
|
260
|
+
if @api_client.config.client_side_validation && patchedrpm_rpm_alternate_content_source.nil?
|
261
|
+
fail ArgumentError, "Missing the required parameter 'patchedrpm_rpm_alternate_content_source' when calling AcsRpmApi.partial_update"
|
262
|
+
end
|
263
|
+
# resource path
|
264
|
+
local_var_path = '{rpm_rpm_alternate_content_source_href}'.sub('{' + 'rpm_rpm_alternate_content_source_href' + '}', CGI.escape(rpm_rpm_alternate_content_source_href.to_s).gsub('%2F', '/'))
|
265
|
+
|
266
|
+
# query parameters
|
267
|
+
query_params = opts[:query_params] || {}
|
268
|
+
|
269
|
+
# header parameters
|
270
|
+
header_params = opts[:header_params] || {}
|
271
|
+
# HTTP header 'Accept' (if needed)
|
272
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
273
|
+
# HTTP header 'Content-Type'
|
274
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
275
|
+
|
276
|
+
# form parameters
|
277
|
+
form_params = opts[:form_params] || {}
|
278
|
+
|
279
|
+
# http body (model)
|
280
|
+
post_body = opts[:body] || @api_client.object_to_http_body(patchedrpm_rpm_alternate_content_source)
|
281
|
+
|
282
|
+
# return_type
|
283
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
284
|
+
|
285
|
+
# auth_names
|
286
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
287
|
+
|
288
|
+
new_options = opts.merge(
|
289
|
+
:header_params => header_params,
|
290
|
+
:query_params => query_params,
|
291
|
+
:form_params => form_params,
|
292
|
+
:body => post_body,
|
293
|
+
:auth_names => auth_names,
|
294
|
+
:return_type => return_type
|
295
|
+
)
|
296
|
+
|
297
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug "API called: AcsRpmApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
300
|
+
end
|
301
|
+
return data, status_code, headers
|
302
|
+
end
|
303
|
+
|
304
|
+
# Inspect a rpm alternate content source
|
305
|
+
# ViewSet for ACS.
|
306
|
+
# @param rpm_rpm_alternate_content_source_href [String]
|
307
|
+
# @param [Hash] opts the optional parameters
|
308
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
309
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
310
|
+
# @return [RpmRpmAlternateContentSourceResponse]
|
311
|
+
def read(rpm_rpm_alternate_content_source_href, opts = {})
|
312
|
+
data, _status_code, _headers = read_with_http_info(rpm_rpm_alternate_content_source_href, opts)
|
313
|
+
data
|
314
|
+
end
|
315
|
+
|
316
|
+
# Inspect a rpm alternate content source
|
317
|
+
# ViewSet for ACS.
|
318
|
+
# @param rpm_rpm_alternate_content_source_href [String]
|
319
|
+
# @param [Hash] opts the optional parameters
|
320
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
321
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
322
|
+
# @return [Array<(RpmRpmAlternateContentSourceResponse, Integer, Hash)>] RpmRpmAlternateContentSourceResponse data, response status code and response headers
|
323
|
+
def read_with_http_info(rpm_rpm_alternate_content_source_href, opts = {})
|
324
|
+
if @api_client.config.debugging
|
325
|
+
@api_client.config.logger.debug 'Calling API: AcsRpmApi.read ...'
|
326
|
+
end
|
327
|
+
# verify the required parameter 'rpm_rpm_alternate_content_source_href' is set
|
328
|
+
if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source_href.nil?
|
329
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source_href' when calling AcsRpmApi.read"
|
330
|
+
end
|
331
|
+
# resource path
|
332
|
+
local_var_path = '{rpm_rpm_alternate_content_source_href}'.sub('{' + 'rpm_rpm_alternate_content_source_href' + '}', CGI.escape(rpm_rpm_alternate_content_source_href.to_s).gsub('%2F', '/'))
|
333
|
+
|
334
|
+
# query parameters
|
335
|
+
query_params = opts[:query_params] || {}
|
336
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
337
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_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] || 'RpmRpmAlternateContentSourceResponse'
|
352
|
+
|
353
|
+
# auth_names
|
354
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
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: AcsRpmApi#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 create Alternate Content Source content.
|
373
|
+
# @param rpm_rpm_alternate_content_source_href [String]
|
374
|
+
# @param rpm_rpm_alternate_content_source [RpmRpmAlternateContentSource]
|
375
|
+
# @param [Hash] opts the optional parameters
|
376
|
+
# @return [TaskGroupOperationResponse]
|
377
|
+
def refresh(rpm_rpm_alternate_content_source_href, rpm_rpm_alternate_content_source, opts = {})
|
378
|
+
data, _status_code, _headers = refresh_with_http_info(rpm_rpm_alternate_content_source_href, rpm_rpm_alternate_content_source, opts)
|
379
|
+
data
|
380
|
+
end
|
381
|
+
|
382
|
+
# Trigger an asynchronous task to create Alternate Content Source content.
|
383
|
+
# @param rpm_rpm_alternate_content_source_href [String]
|
384
|
+
# @param rpm_rpm_alternate_content_source [RpmRpmAlternateContentSource]
|
385
|
+
# @param [Hash] opts the optional parameters
|
386
|
+
# @return [Array<(TaskGroupOperationResponse, Integer, Hash)>] TaskGroupOperationResponse data, response status code and response headers
|
387
|
+
def refresh_with_http_info(rpm_rpm_alternate_content_source_href, rpm_rpm_alternate_content_source, opts = {})
|
388
|
+
if @api_client.config.debugging
|
389
|
+
@api_client.config.logger.debug 'Calling API: AcsRpmApi.refresh ...'
|
390
|
+
end
|
391
|
+
# verify the required parameter 'rpm_rpm_alternate_content_source_href' is set
|
392
|
+
if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source_href.nil?
|
393
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source_href' when calling AcsRpmApi.refresh"
|
394
|
+
end
|
395
|
+
# verify the required parameter 'rpm_rpm_alternate_content_source' is set
|
396
|
+
if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source.nil?
|
397
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source' when calling AcsRpmApi.refresh"
|
398
|
+
end
|
399
|
+
# resource path
|
400
|
+
local_var_path = '{rpm_rpm_alternate_content_source_href}refresh/'.sub('{' + 'rpm_rpm_alternate_content_source_href' + '}', CGI.escape(rpm_rpm_alternate_content_source_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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
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(rpm_rpm_alternate_content_source)
|
417
|
+
|
418
|
+
# return_type
|
419
|
+
return_type = opts[:return_type] || 'TaskGroupOperationResponse'
|
420
|
+
|
421
|
+
# auth_names
|
422
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
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: AcsRpmApi#refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
436
|
+
end
|
437
|
+
return data, status_code, headers
|
438
|
+
end
|
439
|
+
|
440
|
+
# Update a rpm alternate content source
|
441
|
+
# Trigger an asynchronous update task
|
442
|
+
# @param rpm_rpm_alternate_content_source_href [String]
|
443
|
+
# @param rpm_rpm_alternate_content_source [RpmRpmAlternateContentSource]
|
444
|
+
# @param [Hash] opts the optional parameters
|
445
|
+
# @return [AsyncOperationResponse]
|
446
|
+
def update(rpm_rpm_alternate_content_source_href, rpm_rpm_alternate_content_source, opts = {})
|
447
|
+
data, _status_code, _headers = update_with_http_info(rpm_rpm_alternate_content_source_href, rpm_rpm_alternate_content_source, opts)
|
448
|
+
data
|
449
|
+
end
|
450
|
+
|
451
|
+
# Update a rpm alternate content source
|
452
|
+
# Trigger an asynchronous update task
|
453
|
+
# @param rpm_rpm_alternate_content_source_href [String]
|
454
|
+
# @param rpm_rpm_alternate_content_source [RpmRpmAlternateContentSource]
|
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(rpm_rpm_alternate_content_source_href, rpm_rpm_alternate_content_source, opts = {})
|
458
|
+
if @api_client.config.debugging
|
459
|
+
@api_client.config.logger.debug 'Calling API: AcsRpmApi.update ...'
|
460
|
+
end
|
461
|
+
# verify the required parameter 'rpm_rpm_alternate_content_source_href' is set
|
462
|
+
if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source_href.nil?
|
463
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source_href' when calling AcsRpmApi.update"
|
464
|
+
end
|
465
|
+
# verify the required parameter 'rpm_rpm_alternate_content_source' is set
|
466
|
+
if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source.nil?
|
467
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source' when calling AcsRpmApi.update"
|
468
|
+
end
|
469
|
+
# resource path
|
470
|
+
local_var_path = '{rpm_rpm_alternate_content_source_href}'.sub('{' + 'rpm_rpm_alternate_content_source_href' + '}', CGI.escape(rpm_rpm_alternate_content_source_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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
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(rpm_rpm_alternate_content_source)
|
487
|
+
|
488
|
+
# return_type
|
489
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
490
|
+
|
491
|
+
# auth_names
|
492
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
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: AcsRpmApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
506
|
+
end
|
507
|
+
return data, status_code, headers
|
508
|
+
end
|
509
|
+
end
|
510
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpRpmClient
|
16
|
+
class RpmCompsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Upload comps.xml
|
23
|
+
# Trigger an asynchronous task to upload a comps.xml file.
|
24
|
+
# @param file [File] Full path of a comps.xml file that may be parsed into comps.xml Content units.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :repository URI of an RPM repository the comps.xml content units should be associated to.
|
27
|
+
# @option opts [Boolean] :replace If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository.
|
28
|
+
# @return [AsyncOperationResponse]
|
29
|
+
def rpm_comps_upload(file, opts = {})
|
30
|
+
data, _status_code, _headers = rpm_comps_upload_with_http_info(file, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Upload comps.xml
|
35
|
+
# Trigger an asynchronous task to upload a comps.xml file.
|
36
|
+
# @param file [File] Full path of a comps.xml file that may be parsed into comps.xml Content units.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [String] :repository URI of an RPM repository the comps.xml content units should be associated to.
|
39
|
+
# @option opts [Boolean] :replace If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository.
|
40
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
41
|
+
def rpm_comps_upload_with_http_info(file, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: RpmCompsApi.rpm_comps_upload ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'file' is set
|
46
|
+
if @api_client.config.client_side_validation && file.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling RpmCompsApi.rpm_comps_upload"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/pulp/api/v3/rpm/comps/'
|
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(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = opts[:form_params] || {}
|
64
|
+
form_params['file'] = file
|
65
|
+
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
66
|
+
form_params['replace'] = opts[:'replace'] if !opts[:'replace'].nil?
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = opts[:body]
|
70
|
+
|
71
|
+
# return_type
|
72
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
73
|
+
|
74
|
+
# auth_names
|
75
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
76
|
+
|
77
|
+
new_options = opts.merge(
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names,
|
83
|
+
:return_type => return_type
|
84
|
+
)
|
85
|
+
|
86
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: RpmCompsApi#rpm_comps_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|