pulp_maven_client 0.16.1 → 0.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 +12 -4
- data/docs/ContentMetadataApi.md +531 -0
- data/docs/MavenMavenMetadataResponse.md +40 -0
- data/docs/PaginatedmavenMavenMetadataResponseList.md +24 -0
- data/lib/pulp_maven_client/api/content_metadata_api.rb +574 -0
- data/lib/pulp_maven_client/models/maven_maven_metadata_response.rb +327 -0
- data/lib/pulp_maven_client/models/paginatedmaven_maven_metadata_response_list.rb +257 -0
- data/lib/pulp_maven_client/version.rb +1 -1
- data/lib/pulp_maven_client.rb +3 -0
- data/spec/api/content_metadata_api_spec.rb +150 -0
- data/spec/models/maven_maven_metadata_response_spec.rb +102 -0
- data/spec/models/paginatedmaven_maven_metadata_response_list_spec.rb +54 -0
- metadata +14 -2
|
@@ -0,0 +1,574 @@
|
|
|
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
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PulpMavenClient
|
|
16
|
+
class ContentMetadataApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a maven metadata
|
|
23
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
|
24
|
+
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
27
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
28
|
+
# @option opts [Boolean] :overwrite When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
29
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
30
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
31
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
32
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
33
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
34
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
35
|
+
# @return [AsyncOperationResponse]
|
|
36
|
+
def create(relative_path, opts = {})
|
|
37
|
+
data, _status_code, _headers = create_with_http_info(relative_path, opts)
|
|
38
|
+
data
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Create a maven metadata
|
|
42
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
|
43
|
+
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
|
44
|
+
# @param [Hash] opts the optional parameters
|
|
45
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
46
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
47
|
+
# @option opts [Boolean] :overwrite When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
48
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
49
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
50
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
51
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
52
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
53
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
54
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
55
|
+
def create_with_http_info(relative_path, opts = {})
|
|
56
|
+
if @api_client.config.debugging
|
|
57
|
+
@api_client.config.logger.debug 'Calling API: ContentMetadataApi.create ...'
|
|
58
|
+
end
|
|
59
|
+
# verify the required parameter 'relative_path' is set
|
|
60
|
+
if @api_client.config.client_side_validation && relative_path.nil?
|
|
61
|
+
fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentMetadataApi.create"
|
|
62
|
+
end
|
|
63
|
+
if @api_client.config.client_side_validation && relative_path.to_s.length < 1
|
|
64
|
+
fail ArgumentError, 'invalid value for "relative_path" when calling ContentMetadataApi.create, the character length must be great than or equal to 1.'
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
if @api_client.config.client_side_validation && !opts[:'file_url'].nil? && opts[:'file_url'].to_s.length < 1
|
|
68
|
+
fail ArgumentError, 'invalid value for "opts[:"file_url"]" when calling ContentMetadataApi.create, the character length must be great than or equal to 1.'
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# resource path
|
|
72
|
+
local_var_path = '/pulp/api/v3/content/maven/metadata/'
|
|
73
|
+
|
|
74
|
+
# query parameters
|
|
75
|
+
query_params = opts[:query_params] || {}
|
|
76
|
+
|
|
77
|
+
# header parameters
|
|
78
|
+
header_params = opts[:header_params] || {}
|
|
79
|
+
# HTTP header 'Accept' (if needed)
|
|
80
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
81
|
+
# HTTP header 'Content-Type'
|
|
82
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
|
83
|
+
if !content_type.nil?
|
|
84
|
+
header_params['Content-Type'] = content_type
|
|
85
|
+
end
|
|
86
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
87
|
+
|
|
88
|
+
# form parameters
|
|
89
|
+
form_params = opts[:form_params] || {}
|
|
90
|
+
form_params['relative_path'] = relative_path
|
|
91
|
+
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
|
92
|
+
form_params['overwrite'] = opts[:'overwrite'] if !opts[:'overwrite'].nil?
|
|
93
|
+
form_params['pulp_labels'] = opts[:'pulp_labels'] if !opts[:'pulp_labels'].nil?
|
|
94
|
+
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
|
95
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
96
|
+
form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
|
|
97
|
+
form_params['file_url'] = opts[:'file_url'] if !opts[:'file_url'].nil?
|
|
98
|
+
form_params['downloader_config'] = opts[:'downloader_config'] if !opts[:'downloader_config'].nil?
|
|
99
|
+
|
|
100
|
+
# http body (model)
|
|
101
|
+
post_body = opts[:debug_body]
|
|
102
|
+
|
|
103
|
+
# return_type
|
|
104
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
105
|
+
|
|
106
|
+
# auth_names
|
|
107
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
108
|
+
|
|
109
|
+
new_options = opts.merge(
|
|
110
|
+
:operation => :"ContentMetadataApi.create",
|
|
111
|
+
:header_params => header_params,
|
|
112
|
+
:query_params => query_params,
|
|
113
|
+
:form_params => form_params,
|
|
114
|
+
:body => post_body,
|
|
115
|
+
:auth_names => auth_names,
|
|
116
|
+
:return_type => return_type
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
120
|
+
if @api_client.config.debugging
|
|
121
|
+
@api_client.config.logger.debug "API called: ContentMetadataApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
122
|
+
end
|
|
123
|
+
return data, status_code, headers
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# List maven metadatas
|
|
127
|
+
# A ViewSet for MavenMetadata.
|
|
128
|
+
# @param [Hash] opts the optional parameters
|
|
129
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
130
|
+
# @option opts [String] :artifact_id Filter results where artifact_id matches value
|
|
131
|
+
# @option opts [String] :filename Filter results where filename matches value
|
|
132
|
+
# @option opts [String] :group_id Filter results where group_id matches value
|
|
133
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
134
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
135
|
+
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `group_id` - Group id * `-group_id` - Group id (descending) * `artifact_id` - Artifact id * `-artifact_id` - Artifact id (descending) * `version` - Version * `-version` - Version (descending) * `filename` - Filename * `-filename` - Filename (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
136
|
+
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
|
137
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
138
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
139
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
140
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
141
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
142
|
+
# @option opts [String] :repository_version
|
|
143
|
+
# @option opts [String] :repository_version_added
|
|
144
|
+
# @option opts [String] :repository_version_removed
|
|
145
|
+
# @option opts [String] :version Filter results where version matches value
|
|
146
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
147
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
148
|
+
# @return [PaginatedmavenMavenMetadataResponseList]
|
|
149
|
+
def list(opts = {})
|
|
150
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
|
151
|
+
data
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# List maven metadatas
|
|
155
|
+
# A ViewSet for MavenMetadata.
|
|
156
|
+
# @param [Hash] opts the optional parameters
|
|
157
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
158
|
+
# @option opts [String] :artifact_id Filter results where artifact_id matches value
|
|
159
|
+
# @option opts [String] :filename Filter results where filename matches value
|
|
160
|
+
# @option opts [String] :group_id Filter results where group_id matches value
|
|
161
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
162
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
163
|
+
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `group_id` - Group id * `-group_id` - Group id (descending) * `artifact_id` - Artifact id * `-artifact_id` - Artifact id (descending) * `version` - Version * `-version` - Version (descending) * `filename` - Filename * `-filename` - Filename (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
164
|
+
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
|
165
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
166
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
167
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
168
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
169
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
170
|
+
# @option opts [String] :repository_version
|
|
171
|
+
# @option opts [String] :repository_version_added
|
|
172
|
+
# @option opts [String] :repository_version_removed
|
|
173
|
+
# @option opts [String] :version Filter results where version matches value
|
|
174
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
175
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
176
|
+
# @return [Array<(PaginatedmavenMavenMetadataResponseList, Integer, Hash)>] PaginatedmavenMavenMetadataResponseList data, response status code and response headers
|
|
177
|
+
def list_with_http_info(opts = {})
|
|
178
|
+
if @api_client.config.debugging
|
|
179
|
+
@api_client.config.logger.debug 'Calling API: ContentMetadataApi.list ...'
|
|
180
|
+
end
|
|
181
|
+
allowable_values = ["-artifact_id", "-filename", "-group_id", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-sha256", "-timestamp_of_interest", "-upstream_id", "-version", "artifact_id", "filename", "group_id", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "sha256", "timestamp_of_interest", "upstream_id", "version"]
|
|
182
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
|
183
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
|
184
|
+
end
|
|
185
|
+
# resource path
|
|
186
|
+
local_var_path = '/pulp/api/v3/content/maven/metadata/'
|
|
187
|
+
|
|
188
|
+
# query parameters
|
|
189
|
+
query_params = opts[:query_params] || {}
|
|
190
|
+
query_params[:'artifact_id'] = opts[:'artifact_id'] if !opts[:'artifact_id'].nil?
|
|
191
|
+
query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil?
|
|
192
|
+
query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
|
|
193
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
194
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
195
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
|
196
|
+
query_params[:'orphaned_for'] = opts[:'orphaned_for'] if !opts[:'orphaned_for'].nil?
|
|
197
|
+
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
|
198
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
|
199
|
+
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
|
200
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
|
201
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
202
|
+
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
|
203
|
+
query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
|
|
204
|
+
query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
|
|
205
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
206
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
207
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
208
|
+
|
|
209
|
+
# header parameters
|
|
210
|
+
header_params = opts[:header_params] || {}
|
|
211
|
+
# HTTP header 'Accept' (if needed)
|
|
212
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
213
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
214
|
+
|
|
215
|
+
# form parameters
|
|
216
|
+
form_params = opts[:form_params] || {}
|
|
217
|
+
|
|
218
|
+
# http body (model)
|
|
219
|
+
post_body = opts[:debug_body]
|
|
220
|
+
|
|
221
|
+
# return_type
|
|
222
|
+
return_type = opts[:debug_return_type] || 'PaginatedmavenMavenMetadataResponseList'
|
|
223
|
+
|
|
224
|
+
# auth_names
|
|
225
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
226
|
+
|
|
227
|
+
new_options = opts.merge(
|
|
228
|
+
:operation => :"ContentMetadataApi.list",
|
|
229
|
+
:header_params => header_params,
|
|
230
|
+
:query_params => query_params,
|
|
231
|
+
:form_params => form_params,
|
|
232
|
+
:body => post_body,
|
|
233
|
+
:auth_names => auth_names,
|
|
234
|
+
:return_type => return_type
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
238
|
+
if @api_client.config.debugging
|
|
239
|
+
@api_client.config.logger.debug "API called: ContentMetadataApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
240
|
+
end
|
|
241
|
+
return data, status_code, headers
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Inspect a maven metadata
|
|
245
|
+
# A ViewSet for MavenMetadata.
|
|
246
|
+
# @param maven_maven_metadata_href [String]
|
|
247
|
+
# @param [Hash] opts the optional parameters
|
|
248
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
249
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
250
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
251
|
+
# @return [MavenMavenMetadataResponse]
|
|
252
|
+
def read(maven_maven_metadata_href, opts = {})
|
|
253
|
+
data, _status_code, _headers = read_with_http_info(maven_maven_metadata_href, opts)
|
|
254
|
+
data
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Inspect a maven metadata
|
|
258
|
+
# A ViewSet for MavenMetadata.
|
|
259
|
+
# @param maven_maven_metadata_href [String]
|
|
260
|
+
# @param [Hash] opts the optional parameters
|
|
261
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
262
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
263
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
264
|
+
# @return [Array<(MavenMavenMetadataResponse, Integer, Hash)>] MavenMavenMetadataResponse data, response status code and response headers
|
|
265
|
+
def read_with_http_info(maven_maven_metadata_href, opts = {})
|
|
266
|
+
if @api_client.config.debugging
|
|
267
|
+
@api_client.config.logger.debug 'Calling API: ContentMetadataApi.read ...'
|
|
268
|
+
end
|
|
269
|
+
# verify the required parameter 'maven_maven_metadata_href' is set
|
|
270
|
+
if @api_client.config.client_side_validation && maven_maven_metadata_href.nil?
|
|
271
|
+
fail ArgumentError, "Missing the required parameter 'maven_maven_metadata_href' when calling ContentMetadataApi.read"
|
|
272
|
+
end
|
|
273
|
+
# resource path
|
|
274
|
+
local_var_path = '{maven_maven_metadata_href}'.sub('{' + 'maven_maven_metadata_href' + '}', CGI.escape(maven_maven_metadata_href.to_s).gsub('%2F', '/'))
|
|
275
|
+
|
|
276
|
+
# query parameters
|
|
277
|
+
query_params = opts[:query_params] || {}
|
|
278
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
279
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
280
|
+
|
|
281
|
+
# header parameters
|
|
282
|
+
header_params = opts[:header_params] || {}
|
|
283
|
+
# HTTP header 'Accept' (if needed)
|
|
284
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
285
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
286
|
+
|
|
287
|
+
# form parameters
|
|
288
|
+
form_params = opts[:form_params] || {}
|
|
289
|
+
|
|
290
|
+
# http body (model)
|
|
291
|
+
post_body = opts[:debug_body]
|
|
292
|
+
|
|
293
|
+
# return_type
|
|
294
|
+
return_type = opts[:debug_return_type] || 'MavenMavenMetadataResponse'
|
|
295
|
+
|
|
296
|
+
# auth_names
|
|
297
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
298
|
+
|
|
299
|
+
new_options = opts.merge(
|
|
300
|
+
:operation => :"ContentMetadataApi.read",
|
|
301
|
+
:header_params => header_params,
|
|
302
|
+
:query_params => query_params,
|
|
303
|
+
:form_params => form_params,
|
|
304
|
+
:body => post_body,
|
|
305
|
+
:auth_names => auth_names,
|
|
306
|
+
:return_type => return_type
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
310
|
+
if @api_client.config.debugging
|
|
311
|
+
@api_client.config.logger.debug "API called: ContentMetadataApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
312
|
+
end
|
|
313
|
+
return data, status_code, headers
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Set a label
|
|
317
|
+
# Set a single pulp_label on the object to a specific value or null.
|
|
318
|
+
# @param maven_maven_metadata_href [String]
|
|
319
|
+
# @param set_label [SetLabel]
|
|
320
|
+
# @param [Hash] opts the optional parameters
|
|
321
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
322
|
+
# @return [SetLabelResponse]
|
|
323
|
+
def set_label(maven_maven_metadata_href, set_label, opts = {})
|
|
324
|
+
data, _status_code, _headers = set_label_with_http_info(maven_maven_metadata_href, set_label, opts)
|
|
325
|
+
data
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Set a label
|
|
329
|
+
# Set a single pulp_label on the object to a specific value or null.
|
|
330
|
+
# @param maven_maven_metadata_href [String]
|
|
331
|
+
# @param set_label [SetLabel]
|
|
332
|
+
# @param [Hash] opts the optional parameters
|
|
333
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
334
|
+
# @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
|
|
335
|
+
def set_label_with_http_info(maven_maven_metadata_href, set_label, opts = {})
|
|
336
|
+
if @api_client.config.debugging
|
|
337
|
+
@api_client.config.logger.debug 'Calling API: ContentMetadataApi.set_label ...'
|
|
338
|
+
end
|
|
339
|
+
# verify the required parameter 'maven_maven_metadata_href' is set
|
|
340
|
+
if @api_client.config.client_side_validation && maven_maven_metadata_href.nil?
|
|
341
|
+
fail ArgumentError, "Missing the required parameter 'maven_maven_metadata_href' when calling ContentMetadataApi.set_label"
|
|
342
|
+
end
|
|
343
|
+
# verify the required parameter 'set_label' is set
|
|
344
|
+
if @api_client.config.client_side_validation && set_label.nil?
|
|
345
|
+
fail ArgumentError, "Missing the required parameter 'set_label' when calling ContentMetadataApi.set_label"
|
|
346
|
+
end
|
|
347
|
+
# resource path
|
|
348
|
+
local_var_path = '{maven_maven_metadata_href}set_label/'.sub('{' + 'maven_maven_metadata_href' + '}', CGI.escape(maven_maven_metadata_href.to_s).gsub('%2F', '/'))
|
|
349
|
+
|
|
350
|
+
# query parameters
|
|
351
|
+
query_params = opts[:query_params] || {}
|
|
352
|
+
|
|
353
|
+
# header parameters
|
|
354
|
+
header_params = opts[:header_params] || {}
|
|
355
|
+
# HTTP header 'Accept' (if needed)
|
|
356
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
357
|
+
# HTTP header 'Content-Type'
|
|
358
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
359
|
+
if !content_type.nil?
|
|
360
|
+
header_params['Content-Type'] = content_type
|
|
361
|
+
end
|
|
362
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
363
|
+
|
|
364
|
+
# form parameters
|
|
365
|
+
form_params = opts[:form_params] || {}
|
|
366
|
+
|
|
367
|
+
# http body (model)
|
|
368
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
|
|
369
|
+
|
|
370
|
+
# return_type
|
|
371
|
+
return_type = opts[:debug_return_type] || 'SetLabelResponse'
|
|
372
|
+
|
|
373
|
+
# auth_names
|
|
374
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
375
|
+
|
|
376
|
+
new_options = opts.merge(
|
|
377
|
+
:operation => :"ContentMetadataApi.set_label",
|
|
378
|
+
:header_params => header_params,
|
|
379
|
+
:query_params => query_params,
|
|
380
|
+
:form_params => form_params,
|
|
381
|
+
:body => post_body,
|
|
382
|
+
:auth_names => auth_names,
|
|
383
|
+
:return_type => return_type
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
387
|
+
if @api_client.config.debugging
|
|
388
|
+
@api_client.config.logger.debug "API called: ContentMetadataApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
389
|
+
end
|
|
390
|
+
return data, status_code, headers
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Unset a label
|
|
394
|
+
# Unset a single pulp_label on the object.
|
|
395
|
+
# @param maven_maven_metadata_href [String]
|
|
396
|
+
# @param unset_label [UnsetLabel]
|
|
397
|
+
# @param [Hash] opts the optional parameters
|
|
398
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
399
|
+
# @return [UnsetLabelResponse]
|
|
400
|
+
def unset_label(maven_maven_metadata_href, unset_label, opts = {})
|
|
401
|
+
data, _status_code, _headers = unset_label_with_http_info(maven_maven_metadata_href, unset_label, opts)
|
|
402
|
+
data
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# Unset a label
|
|
406
|
+
# Unset a single pulp_label on the object.
|
|
407
|
+
# @param maven_maven_metadata_href [String]
|
|
408
|
+
# @param unset_label [UnsetLabel]
|
|
409
|
+
# @param [Hash] opts the optional parameters
|
|
410
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
411
|
+
# @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
|
|
412
|
+
def unset_label_with_http_info(maven_maven_metadata_href, unset_label, opts = {})
|
|
413
|
+
if @api_client.config.debugging
|
|
414
|
+
@api_client.config.logger.debug 'Calling API: ContentMetadataApi.unset_label ...'
|
|
415
|
+
end
|
|
416
|
+
# verify the required parameter 'maven_maven_metadata_href' is set
|
|
417
|
+
if @api_client.config.client_side_validation && maven_maven_metadata_href.nil?
|
|
418
|
+
fail ArgumentError, "Missing the required parameter 'maven_maven_metadata_href' when calling ContentMetadataApi.unset_label"
|
|
419
|
+
end
|
|
420
|
+
# verify the required parameter 'unset_label' is set
|
|
421
|
+
if @api_client.config.client_side_validation && unset_label.nil?
|
|
422
|
+
fail ArgumentError, "Missing the required parameter 'unset_label' when calling ContentMetadataApi.unset_label"
|
|
423
|
+
end
|
|
424
|
+
# resource path
|
|
425
|
+
local_var_path = '{maven_maven_metadata_href}unset_label/'.sub('{' + 'maven_maven_metadata_href' + '}', CGI.escape(maven_maven_metadata_href.to_s).gsub('%2F', '/'))
|
|
426
|
+
|
|
427
|
+
# query parameters
|
|
428
|
+
query_params = opts[:query_params] || {}
|
|
429
|
+
|
|
430
|
+
# header parameters
|
|
431
|
+
header_params = opts[:header_params] || {}
|
|
432
|
+
# HTTP header 'Accept' (if needed)
|
|
433
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
434
|
+
# HTTP header 'Content-Type'
|
|
435
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
436
|
+
if !content_type.nil?
|
|
437
|
+
header_params['Content-Type'] = content_type
|
|
438
|
+
end
|
|
439
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
440
|
+
|
|
441
|
+
# form parameters
|
|
442
|
+
form_params = opts[:form_params] || {}
|
|
443
|
+
|
|
444
|
+
# http body (model)
|
|
445
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
|
|
446
|
+
|
|
447
|
+
# return_type
|
|
448
|
+
return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
|
|
449
|
+
|
|
450
|
+
# auth_names
|
|
451
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
452
|
+
|
|
453
|
+
new_options = opts.merge(
|
|
454
|
+
:operation => :"ContentMetadataApi.unset_label",
|
|
455
|
+
:header_params => header_params,
|
|
456
|
+
:query_params => query_params,
|
|
457
|
+
:form_params => form_params,
|
|
458
|
+
:body => post_body,
|
|
459
|
+
:auth_names => auth_names,
|
|
460
|
+
:return_type => return_type
|
|
461
|
+
)
|
|
462
|
+
|
|
463
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
464
|
+
if @api_client.config.debugging
|
|
465
|
+
@api_client.config.logger.debug "API called: ContentMetadataApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
466
|
+
end
|
|
467
|
+
return data, status_code, headers
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Upload a Maven metadata file synchronously.
|
|
471
|
+
# Synchronously upload a Maven metadata file.
|
|
472
|
+
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
|
473
|
+
# @param [Hash] opts the optional parameters
|
|
474
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
475
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
476
|
+
# @option opts [Boolean] :overwrite When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
477
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
478
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
479
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
480
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
481
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
482
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
483
|
+
# @return [MavenMavenMetadataResponse]
|
|
484
|
+
def upload(relative_path, opts = {})
|
|
485
|
+
data, _status_code, _headers = upload_with_http_info(relative_path, opts)
|
|
486
|
+
data
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
# Upload a Maven metadata file synchronously.
|
|
490
|
+
# Synchronously upload a Maven metadata file.
|
|
491
|
+
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
|
492
|
+
# @param [Hash] opts the optional parameters
|
|
493
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
494
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
495
|
+
# @option opts [Boolean] :overwrite When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
496
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
497
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
498
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
499
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
500
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
501
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
502
|
+
# @return [Array<(MavenMavenMetadataResponse, Integer, Hash)>] MavenMavenMetadataResponse data, response status code and response headers
|
|
503
|
+
def upload_with_http_info(relative_path, opts = {})
|
|
504
|
+
if @api_client.config.debugging
|
|
505
|
+
@api_client.config.logger.debug 'Calling API: ContentMetadataApi.upload ...'
|
|
506
|
+
end
|
|
507
|
+
# verify the required parameter 'relative_path' is set
|
|
508
|
+
if @api_client.config.client_side_validation && relative_path.nil?
|
|
509
|
+
fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentMetadataApi.upload"
|
|
510
|
+
end
|
|
511
|
+
if @api_client.config.client_side_validation && relative_path.to_s.length < 1
|
|
512
|
+
fail ArgumentError, 'invalid value for "relative_path" when calling ContentMetadataApi.upload, the character length must be great than or equal to 1.'
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
if @api_client.config.client_side_validation && !opts[:'file_url'].nil? && opts[:'file_url'].to_s.length < 1
|
|
516
|
+
fail ArgumentError, 'invalid value for "opts[:"file_url"]" when calling ContentMetadataApi.upload, the character length must be great than or equal to 1.'
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
# resource path
|
|
520
|
+
local_var_path = '/pulp/api/v3/content/maven/metadata/upload/'
|
|
521
|
+
|
|
522
|
+
# query parameters
|
|
523
|
+
query_params = opts[:query_params] || {}
|
|
524
|
+
|
|
525
|
+
# header parameters
|
|
526
|
+
header_params = opts[:header_params] || {}
|
|
527
|
+
# HTTP header 'Accept' (if needed)
|
|
528
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
529
|
+
# HTTP header 'Content-Type'
|
|
530
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
|
531
|
+
if !content_type.nil?
|
|
532
|
+
header_params['Content-Type'] = content_type
|
|
533
|
+
end
|
|
534
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
535
|
+
|
|
536
|
+
# form parameters
|
|
537
|
+
form_params = opts[:form_params] || {}
|
|
538
|
+
form_params['relative_path'] = relative_path
|
|
539
|
+
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
|
540
|
+
form_params['overwrite'] = opts[:'overwrite'] if !opts[:'overwrite'].nil?
|
|
541
|
+
form_params['pulp_labels'] = opts[:'pulp_labels'] if !opts[:'pulp_labels'].nil?
|
|
542
|
+
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
|
543
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
544
|
+
form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
|
|
545
|
+
form_params['file_url'] = opts[:'file_url'] if !opts[:'file_url'].nil?
|
|
546
|
+
form_params['downloader_config'] = opts[:'downloader_config'] if !opts[:'downloader_config'].nil?
|
|
547
|
+
|
|
548
|
+
# http body (model)
|
|
549
|
+
post_body = opts[:debug_body]
|
|
550
|
+
|
|
551
|
+
# return_type
|
|
552
|
+
return_type = opts[:debug_return_type] || 'MavenMavenMetadataResponse'
|
|
553
|
+
|
|
554
|
+
# auth_names
|
|
555
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
556
|
+
|
|
557
|
+
new_options = opts.merge(
|
|
558
|
+
:operation => :"ContentMetadataApi.upload",
|
|
559
|
+
:header_params => header_params,
|
|
560
|
+
:query_params => query_params,
|
|
561
|
+
:form_params => form_params,
|
|
562
|
+
:body => post_body,
|
|
563
|
+
:auth_names => auth_names,
|
|
564
|
+
:return_type => return_type
|
|
565
|
+
)
|
|
566
|
+
|
|
567
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
568
|
+
if @api_client.config.debugging
|
|
569
|
+
@api_client.config.logger.debug "API called: ContentMetadataApi#upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
570
|
+
end
|
|
571
|
+
return data, status_code, headers
|
|
572
|
+
end
|
|
573
|
+
end
|
|
574
|
+
end
|