pulp_python_client 3.32.1 → 3.33.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 +13 -4
- data/docs/ContentPackagesApi.md +2 -0
- data/docs/ContentYanksApi.md +341 -0
- data/docs/PaginatedpythonPackageYankResponseList.md +24 -0
- data/docs/PypiLegacyApi.md +2 -2
- data/docs/PypiSimpleApi.md +2 -2
- data/docs/PypiUnyankApi.md +84 -0
- data/docs/PypiYankApi.md +84 -0
- data/docs/PythonPackageYankResponse.md +34 -0
- data/docs/Yank.md +22 -0
- data/lib/pulp_python_client/api/content_packages_api.rb +3 -0
- data/lib/pulp_python_client/api/content_yanks_api.rb +354 -0
- data/lib/pulp_python_client/api/pypi_legacy_api.rb +2 -2
- data/lib/pulp_python_client/api/pypi_simple_api.rb +2 -2
- data/lib/pulp_python_client/api/pypi_unyank_api.rb +99 -0
- data/lib/pulp_python_client/api/pypi_yank_api.rb +99 -0
- data/lib/pulp_python_client/models/metadata_version_enum.rb +2 -1
- data/lib/pulp_python_client/models/paginatedpython_package_yank_response_list.rb +257 -0
- data/lib/pulp_python_client/models/python_package_yank_response.rb +293 -0
- data/lib/pulp_python_client/models/yank.rb +290 -0
- data/lib/pulp_python_client/version.rb +1 -1
- data/lib/pulp_python_client.rb +6 -0
- data/spec/api/content_packages_api_spec.rb +1 -0
- data/spec/api/content_yanks_api_spec.rb +104 -0
- data/spec/api/pypi_legacy_api_spec.rb +1 -1
- data/spec/api/pypi_simple_api_spec.rb +1 -1
- data/spec/api/pypi_unyank_api_spec.rb +49 -0
- data/spec/api/pypi_yank_api_spec.rb +49 -0
- data/spec/models/paginatedpython_package_yank_response_list_spec.rb +54 -0
- data/spec/models/python_package_yank_response_spec.rb +84 -0
- data/spec/models/yank_spec.rb +48 -0
- metadata +26 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# PulpPythonClient::PythonPackageYankResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **pulp_href** | **String** | | [optional][readonly] |
|
|
8
|
+
| **prn** | **String** | The Pulp Resource Name (PRN). | [optional][readonly] |
|
|
9
|
+
| **pulp_created** | **Time** | Timestamp of creation. | [optional][readonly] |
|
|
10
|
+
| **pulp_last_updated** | **Time** | Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same. | [optional][readonly] |
|
|
11
|
+
| **pulp_labels** | **Hash<String, String>** | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
|
|
12
|
+
| **vuln_report** | **String** | | [optional][readonly] |
|
|
13
|
+
| **name_normalized** | **String** | | [optional][readonly] |
|
|
14
|
+
| **version** | **String** | | [optional][readonly] |
|
|
15
|
+
| **yanked_reason** | **String** | | [optional][readonly] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'pulp_python_client'
|
|
21
|
+
|
|
22
|
+
instance = PulpPythonClient::PythonPackageYankResponse.new(
|
|
23
|
+
pulp_href: null,
|
|
24
|
+
prn: null,
|
|
25
|
+
pulp_created: null,
|
|
26
|
+
pulp_last_updated: null,
|
|
27
|
+
pulp_labels: null,
|
|
28
|
+
vuln_report: null,
|
|
29
|
+
name_normalized: null,
|
|
30
|
+
version: null,
|
|
31
|
+
yanked_reason: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
data/docs/Yank.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# PulpPythonClient::Yank
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | The name of the package to yank or unyank. | |
|
|
8
|
+
| **version** | **String** | The version of the package to yank or unyank. | |
|
|
9
|
+
| **yanked_reason** | **String** | The reason for yanking the package version. | [optional][default to ''] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'pulp_python_client'
|
|
15
|
+
|
|
16
|
+
instance = PulpPythonClient::Yank.new(
|
|
17
|
+
name: null,
|
|
18
|
+
version: null,
|
|
19
|
+
yanked_reason: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -254,6 +254,7 @@ module PulpPythonClient
|
|
|
254
254
|
# @option opts [String] :version__gte Filter results where version is greater than or equal to value
|
|
255
255
|
# @option opts [String] :version__lt Filter results where version is less than value
|
|
256
256
|
# @option opts [String] :version__lte Filter results where version is less than or equal to value
|
|
257
|
+
# @option opts [String] :version_specifier Filter by PEP 440 version specifier (e.g., >=2.4,<3.0 or ~=1.26)
|
|
257
258
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
258
259
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
259
260
|
# @return [PaginatedpythonPythonPackageContentResponseList]
|
|
@@ -301,6 +302,7 @@ module PulpPythonClient
|
|
|
301
302
|
# @option opts [String] :version__gte Filter results where version is greater than or equal to value
|
|
302
303
|
# @option opts [String] :version__lt Filter results where version is less than value
|
|
303
304
|
# @option opts [String] :version__lte Filter results where version is less than or equal to value
|
|
305
|
+
# @option opts [String] :version_specifier Filter by PEP 440 version specifier (e.g., >=2.4,<3.0 or ~=1.26)
|
|
304
306
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
305
307
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
306
308
|
# @return [Array<(PaginatedpythonPythonPackageContentResponseList, Integer, Hash)>] PaginatedpythonPythonPackageContentResponseList data, response status code and response headers
|
|
@@ -356,6 +358,7 @@ module PulpPythonClient
|
|
|
356
358
|
query_params[:'version__gte'] = opts[:'version__gte'] if !opts[:'version__gte'].nil?
|
|
357
359
|
query_params[:'version__lt'] = opts[:'version__lt'] if !opts[:'version__lt'].nil?
|
|
358
360
|
query_params[:'version__lte'] = opts[:'version__lte'] if !opts[:'version__lte'].nil?
|
|
361
|
+
query_params[:'version_specifier'] = opts[:'version_specifier'] if !opts[:'version_specifier'].nil?
|
|
359
362
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
360
363
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
361
364
|
|
|
@@ -0,0 +1,354 @@
|
|
|
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 PulpPythonClient
|
|
16
|
+
class ContentYanksApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List package yanks
|
|
23
|
+
# Read-only viewset for PackageYank content units (PEP 592). PackageYank markers indicate that a package version has been yanked in a repository. Use the /yank/ and /unyank/ PyPI endpoints to create or remove these markers.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
26
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
27
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
28
|
+
# @option opts [Array<String>] :ordering Ordering * `pk` - Pk * `-pk` - Pk (descending)
|
|
29
|
+
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
|
30
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
31
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
32
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
33
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
34
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
35
|
+
# @option opts [String] :repository_version
|
|
36
|
+
# @option opts [String] :repository_version_added
|
|
37
|
+
# @option opts [String] :repository_version_removed
|
|
38
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
39
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
40
|
+
# @return [PaginatedpythonPackageYankResponseList]
|
|
41
|
+
def list(opts = {})
|
|
42
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
|
43
|
+
data
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List package yanks
|
|
47
|
+
# Read-only viewset for PackageYank content units (PEP 592). PackageYank markers indicate that a package version has been yanked in a repository. Use the /yank/ and /unyank/ PyPI endpoints to create or remove these markers.
|
|
48
|
+
# @param [Hash] opts the optional parameters
|
|
49
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
50
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
51
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
52
|
+
# @option opts [Array<String>] :ordering Ordering * `pk` - Pk * `-pk` - Pk (descending)
|
|
53
|
+
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
|
54
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
55
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
56
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
57
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
58
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
59
|
+
# @option opts [String] :repository_version
|
|
60
|
+
# @option opts [String] :repository_version_added
|
|
61
|
+
# @option opts [String] :repository_version_removed
|
|
62
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
63
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
64
|
+
# @return [Array<(PaginatedpythonPackageYankResponseList, Integer, Hash)>] PaginatedpythonPackageYankResponseList data, response status code and response headers
|
|
65
|
+
def list_with_http_info(opts = {})
|
|
66
|
+
if @api_client.config.debugging
|
|
67
|
+
@api_client.config.logger.debug 'Calling API: ContentYanksApi.list ...'
|
|
68
|
+
end
|
|
69
|
+
allowable_values = ["-pk", "pk"]
|
|
70
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
|
71
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
|
72
|
+
end
|
|
73
|
+
# resource path
|
|
74
|
+
local_var_path = '/pulp/api/v3/content/python/yanks/'
|
|
75
|
+
|
|
76
|
+
# query parameters
|
|
77
|
+
query_params = opts[:query_params] || {}
|
|
78
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
79
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
80
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
|
81
|
+
query_params[:'orphaned_for'] = opts[:'orphaned_for'] if !opts[:'orphaned_for'].nil?
|
|
82
|
+
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
|
83
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
|
84
|
+
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
|
85
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
|
86
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
87
|
+
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
|
88
|
+
query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
|
|
89
|
+
query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
|
|
90
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
91
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
92
|
+
|
|
93
|
+
# header parameters
|
|
94
|
+
header_params = opts[:header_params] || {}
|
|
95
|
+
# HTTP header 'Accept' (if needed)
|
|
96
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
97
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
98
|
+
|
|
99
|
+
# form parameters
|
|
100
|
+
form_params = opts[:form_params] || {}
|
|
101
|
+
|
|
102
|
+
# http body (model)
|
|
103
|
+
post_body = opts[:debug_body]
|
|
104
|
+
|
|
105
|
+
# return_type
|
|
106
|
+
return_type = opts[:debug_return_type] || 'PaginatedpythonPackageYankResponseList'
|
|
107
|
+
|
|
108
|
+
# auth_names
|
|
109
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
110
|
+
|
|
111
|
+
new_options = opts.merge(
|
|
112
|
+
:operation => :"ContentYanksApi.list",
|
|
113
|
+
:header_params => header_params,
|
|
114
|
+
:query_params => query_params,
|
|
115
|
+
:form_params => form_params,
|
|
116
|
+
:body => post_body,
|
|
117
|
+
:auth_names => auth_names,
|
|
118
|
+
:return_type => return_type
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
122
|
+
if @api_client.config.debugging
|
|
123
|
+
@api_client.config.logger.debug "API called: ContentYanksApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
124
|
+
end
|
|
125
|
+
return data, status_code, headers
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Inspect a package yank
|
|
129
|
+
# Read-only viewset for PackageYank content units (PEP 592). PackageYank markers indicate that a package version has been yanked in a repository. Use the /yank/ and /unyank/ PyPI endpoints to create or remove these markers.
|
|
130
|
+
# @param python_package_yank_href [String]
|
|
131
|
+
# @param [Hash] opts the optional parameters
|
|
132
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
133
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
134
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
135
|
+
# @return [PythonPackageYankResponse]
|
|
136
|
+
def read(python_package_yank_href, opts = {})
|
|
137
|
+
data, _status_code, _headers = read_with_http_info(python_package_yank_href, opts)
|
|
138
|
+
data
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Inspect a package yank
|
|
142
|
+
# Read-only viewset for PackageYank content units (PEP 592). PackageYank markers indicate that a package version has been yanked in a repository. Use the /yank/ and /unyank/ PyPI endpoints to create or remove these markers.
|
|
143
|
+
# @param python_package_yank_href [String]
|
|
144
|
+
# @param [Hash] opts the optional parameters
|
|
145
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
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 [Array<(PythonPackageYankResponse, Integer, Hash)>] PythonPackageYankResponse data, response status code and response headers
|
|
149
|
+
def read_with_http_info(python_package_yank_href, opts = {})
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug 'Calling API: ContentYanksApi.read ...'
|
|
152
|
+
end
|
|
153
|
+
# verify the required parameter 'python_package_yank_href' is set
|
|
154
|
+
if @api_client.config.client_side_validation && python_package_yank_href.nil?
|
|
155
|
+
fail ArgumentError, "Missing the required parameter 'python_package_yank_href' when calling ContentYanksApi.read"
|
|
156
|
+
end
|
|
157
|
+
# resource path
|
|
158
|
+
local_var_path = '{python_package_yank_href}'.sub('{' + 'python_package_yank_href' + '}', CGI.escape(python_package_yank_href.to_s).gsub('%2F', '/'))
|
|
159
|
+
|
|
160
|
+
# query parameters
|
|
161
|
+
query_params = opts[:query_params] || {}
|
|
162
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
163
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
164
|
+
|
|
165
|
+
# header parameters
|
|
166
|
+
header_params = opts[:header_params] || {}
|
|
167
|
+
# HTTP header 'Accept' (if needed)
|
|
168
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
169
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
170
|
+
|
|
171
|
+
# form parameters
|
|
172
|
+
form_params = opts[:form_params] || {}
|
|
173
|
+
|
|
174
|
+
# http body (model)
|
|
175
|
+
post_body = opts[:debug_body]
|
|
176
|
+
|
|
177
|
+
# return_type
|
|
178
|
+
return_type = opts[:debug_return_type] || 'PythonPackageYankResponse'
|
|
179
|
+
|
|
180
|
+
# auth_names
|
|
181
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
182
|
+
|
|
183
|
+
new_options = opts.merge(
|
|
184
|
+
:operation => :"ContentYanksApi.read",
|
|
185
|
+
:header_params => header_params,
|
|
186
|
+
:query_params => query_params,
|
|
187
|
+
:form_params => form_params,
|
|
188
|
+
:body => post_body,
|
|
189
|
+
:auth_names => auth_names,
|
|
190
|
+
:return_type => return_type
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
194
|
+
if @api_client.config.debugging
|
|
195
|
+
@api_client.config.logger.debug "API called: ContentYanksApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
196
|
+
end
|
|
197
|
+
return data, status_code, headers
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Set a label
|
|
201
|
+
# Set a single pulp_label on the object to a specific value or null.
|
|
202
|
+
# @param python_package_yank_href [String]
|
|
203
|
+
# @param set_label [SetLabel]
|
|
204
|
+
# @param [Hash] opts the optional parameters
|
|
205
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
206
|
+
# @return [SetLabelResponse]
|
|
207
|
+
def set_label(python_package_yank_href, set_label, opts = {})
|
|
208
|
+
data, _status_code, _headers = set_label_with_http_info(python_package_yank_href, set_label, opts)
|
|
209
|
+
data
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Set a label
|
|
213
|
+
# Set a single pulp_label on the object to a specific value or null.
|
|
214
|
+
# @param python_package_yank_href [String]
|
|
215
|
+
# @param set_label [SetLabel]
|
|
216
|
+
# @param [Hash] opts the optional parameters
|
|
217
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
218
|
+
# @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
|
|
219
|
+
def set_label_with_http_info(python_package_yank_href, set_label, opts = {})
|
|
220
|
+
if @api_client.config.debugging
|
|
221
|
+
@api_client.config.logger.debug 'Calling API: ContentYanksApi.set_label ...'
|
|
222
|
+
end
|
|
223
|
+
# verify the required parameter 'python_package_yank_href' is set
|
|
224
|
+
if @api_client.config.client_side_validation && python_package_yank_href.nil?
|
|
225
|
+
fail ArgumentError, "Missing the required parameter 'python_package_yank_href' when calling ContentYanksApi.set_label"
|
|
226
|
+
end
|
|
227
|
+
# verify the required parameter 'set_label' is set
|
|
228
|
+
if @api_client.config.client_side_validation && set_label.nil?
|
|
229
|
+
fail ArgumentError, "Missing the required parameter 'set_label' when calling ContentYanksApi.set_label"
|
|
230
|
+
end
|
|
231
|
+
# resource path
|
|
232
|
+
local_var_path = '{python_package_yank_href}set_label/'.sub('{' + 'python_package_yank_href' + '}', CGI.escape(python_package_yank_href.to_s).gsub('%2F', '/'))
|
|
233
|
+
|
|
234
|
+
# query parameters
|
|
235
|
+
query_params = opts[:query_params] || {}
|
|
236
|
+
|
|
237
|
+
# header parameters
|
|
238
|
+
header_params = opts[:header_params] || {}
|
|
239
|
+
# HTTP header 'Accept' (if needed)
|
|
240
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
241
|
+
# HTTP header 'Content-Type'
|
|
242
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
243
|
+
if !content_type.nil?
|
|
244
|
+
header_params['Content-Type'] = content_type
|
|
245
|
+
end
|
|
246
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
247
|
+
|
|
248
|
+
# form parameters
|
|
249
|
+
form_params = opts[:form_params] || {}
|
|
250
|
+
|
|
251
|
+
# http body (model)
|
|
252
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
|
|
253
|
+
|
|
254
|
+
# return_type
|
|
255
|
+
return_type = opts[:debug_return_type] || 'SetLabelResponse'
|
|
256
|
+
|
|
257
|
+
# auth_names
|
|
258
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
259
|
+
|
|
260
|
+
new_options = opts.merge(
|
|
261
|
+
:operation => :"ContentYanksApi.set_label",
|
|
262
|
+
:header_params => header_params,
|
|
263
|
+
:query_params => query_params,
|
|
264
|
+
:form_params => form_params,
|
|
265
|
+
:body => post_body,
|
|
266
|
+
:auth_names => auth_names,
|
|
267
|
+
:return_type => return_type
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
271
|
+
if @api_client.config.debugging
|
|
272
|
+
@api_client.config.logger.debug "API called: ContentYanksApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
273
|
+
end
|
|
274
|
+
return data, status_code, headers
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Unset a label
|
|
278
|
+
# Unset a single pulp_label on the object.
|
|
279
|
+
# @param python_package_yank_href [String]
|
|
280
|
+
# @param unset_label [UnsetLabel]
|
|
281
|
+
# @param [Hash] opts the optional parameters
|
|
282
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
283
|
+
# @return [UnsetLabelResponse]
|
|
284
|
+
def unset_label(python_package_yank_href, unset_label, opts = {})
|
|
285
|
+
data, _status_code, _headers = unset_label_with_http_info(python_package_yank_href, unset_label, opts)
|
|
286
|
+
data
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
# Unset a label
|
|
290
|
+
# Unset a single pulp_label on the object.
|
|
291
|
+
# @param python_package_yank_href [String]
|
|
292
|
+
# @param unset_label [UnsetLabel]
|
|
293
|
+
# @param [Hash] opts the optional parameters
|
|
294
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
295
|
+
# @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
|
|
296
|
+
def unset_label_with_http_info(python_package_yank_href, unset_label, opts = {})
|
|
297
|
+
if @api_client.config.debugging
|
|
298
|
+
@api_client.config.logger.debug 'Calling API: ContentYanksApi.unset_label ...'
|
|
299
|
+
end
|
|
300
|
+
# verify the required parameter 'python_package_yank_href' is set
|
|
301
|
+
if @api_client.config.client_side_validation && python_package_yank_href.nil?
|
|
302
|
+
fail ArgumentError, "Missing the required parameter 'python_package_yank_href' when calling ContentYanksApi.unset_label"
|
|
303
|
+
end
|
|
304
|
+
# verify the required parameter 'unset_label' is set
|
|
305
|
+
if @api_client.config.client_side_validation && unset_label.nil?
|
|
306
|
+
fail ArgumentError, "Missing the required parameter 'unset_label' when calling ContentYanksApi.unset_label"
|
|
307
|
+
end
|
|
308
|
+
# resource path
|
|
309
|
+
local_var_path = '{python_package_yank_href}unset_label/'.sub('{' + 'python_package_yank_href' + '}', CGI.escape(python_package_yank_href.to_s).gsub('%2F', '/'))
|
|
310
|
+
|
|
311
|
+
# query parameters
|
|
312
|
+
query_params = opts[:query_params] || {}
|
|
313
|
+
|
|
314
|
+
# header parameters
|
|
315
|
+
header_params = opts[:header_params] || {}
|
|
316
|
+
# HTTP header 'Accept' (if needed)
|
|
317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
318
|
+
# HTTP header 'Content-Type'
|
|
319
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
320
|
+
if !content_type.nil?
|
|
321
|
+
header_params['Content-Type'] = content_type
|
|
322
|
+
end
|
|
323
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
324
|
+
|
|
325
|
+
# form parameters
|
|
326
|
+
form_params = opts[:form_params] || {}
|
|
327
|
+
|
|
328
|
+
# http body (model)
|
|
329
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
|
|
330
|
+
|
|
331
|
+
# return_type
|
|
332
|
+
return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
|
|
333
|
+
|
|
334
|
+
# auth_names
|
|
335
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
336
|
+
|
|
337
|
+
new_options = opts.merge(
|
|
338
|
+
:operation => :"ContentYanksApi.unset_label",
|
|
339
|
+
:header_params => header_params,
|
|
340
|
+
:query_params => query_params,
|
|
341
|
+
:form_params => form_params,
|
|
342
|
+
:body => post_body,
|
|
343
|
+
:auth_names => auth_names,
|
|
344
|
+
:return_type => return_type
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
348
|
+
if @api_client.config.debugging
|
|
349
|
+
@api_client.config.logger.debug "API called: ContentYanksApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
350
|
+
end
|
|
351
|
+
return data, status_code, headers
|
|
352
|
+
end
|
|
353
|
+
end
|
|
354
|
+
end
|
|
@@ -29,7 +29,7 @@ module PulpPythonClient
|
|
|
29
29
|
# @option opts [String] :action Defaults to `file_upload`, don't change it or request will fail! (default to 'file_upload')
|
|
30
30
|
# @option opts [ProtocolVersionEnum] :protocol_version Protocol version to use for the upload. Only version 1 is supported. * `1` - 1
|
|
31
31
|
# @option opts [FiletypeEnum] :filetype Type of artifact to upload. * `bdist_wheel` - bdist_wheel * `sdist` - sdist
|
|
32
|
-
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4
|
|
32
|
+
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4 * `2.5` - 2.5
|
|
33
33
|
# @option opts [Object] :attestations
|
|
34
34
|
# @return [PackageUploadTaskResponse]
|
|
35
35
|
def create(path, content, sha256_digest, opts = {})
|
|
@@ -47,7 +47,7 @@ module PulpPythonClient
|
|
|
47
47
|
# @option opts [String] :action Defaults to `file_upload`, don't change it or request will fail! (default to 'file_upload')
|
|
48
48
|
# @option opts [ProtocolVersionEnum] :protocol_version Protocol version to use for the upload. Only version 1 is supported. * `1` - 1
|
|
49
49
|
# @option opts [FiletypeEnum] :filetype Type of artifact to upload. * `bdist_wheel` - bdist_wheel * `sdist` - sdist
|
|
50
|
-
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4
|
|
50
|
+
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4 * `2.5` - 2.5
|
|
51
51
|
# @option opts [Object] :attestations
|
|
52
52
|
# @return [Array<(PackageUploadTaskResponse, Integer, Hash)>] PackageUploadTaskResponse data, response status code and response headers
|
|
53
53
|
def create_with_http_info(path, content, sha256_digest, opts = {})
|
|
@@ -29,7 +29,7 @@ module PulpPythonClient
|
|
|
29
29
|
# @option opts [String] :action Defaults to `file_upload`, don't change it or request will fail! (default to 'file_upload')
|
|
30
30
|
# @option opts [ProtocolVersionEnum] :protocol_version Protocol version to use for the upload. Only version 1 is supported. * `1` - 1
|
|
31
31
|
# @option opts [FiletypeEnum] :filetype Type of artifact to upload. * `bdist_wheel` - bdist_wheel * `sdist` - sdist
|
|
32
|
-
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4
|
|
32
|
+
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4 * `2.5` - 2.5
|
|
33
33
|
# @option opts [Object] :attestations
|
|
34
34
|
# @return [PackageUploadTaskResponse]
|
|
35
35
|
def create(path, content, sha256_digest, opts = {})
|
|
@@ -47,7 +47,7 @@ module PulpPythonClient
|
|
|
47
47
|
# @option opts [String] :action Defaults to `file_upload`, don't change it or request will fail! (default to 'file_upload')
|
|
48
48
|
# @option opts [ProtocolVersionEnum] :protocol_version Protocol version to use for the upload. Only version 1 is supported. * `1` - 1
|
|
49
49
|
# @option opts [FiletypeEnum] :filetype Type of artifact to upload. * `bdist_wheel` - bdist_wheel * `sdist` - sdist
|
|
50
|
-
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4
|
|
50
|
+
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4 * `2.5` - 2.5
|
|
51
51
|
# @option opts [Object] :attestations
|
|
52
52
|
# @return [Array<(PackageUploadTaskResponse, Integer, Hash)>] PackageUploadTaskResponse data, response status code and response headers
|
|
53
53
|
def create_with_http_info(path, content, sha256_digest, opts = {})
|
|
@@ -0,0 +1,99 @@
|
|
|
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 PulpPythonClient
|
|
16
|
+
class PypiUnyankApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Unyank a package version
|
|
23
|
+
# Unyank a package version, unmarking all its files with data-yanked.
|
|
24
|
+
# @param path [String]
|
|
25
|
+
# @param yank [Yank]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
28
|
+
# @return [AsyncOperationResponse]
|
|
29
|
+
def unyank(path, yank, opts = {})
|
|
30
|
+
data, _status_code, _headers = unyank_with_http_info(path, yank, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Unyank a package version
|
|
35
|
+
# Unyank a package version, unmarking all its files with data-yanked.
|
|
36
|
+
# @param path [String]
|
|
37
|
+
# @param yank [Yank]
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
40
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
41
|
+
def unyank_with_http_info(path, yank, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: PypiUnyankApi.unyank ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'path' is set
|
|
46
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling PypiUnyankApi.unyank"
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'yank' is set
|
|
50
|
+
if @api_client.config.client_side_validation && yank.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'yank' when calling PypiUnyankApi.unyank"
|
|
52
|
+
end
|
|
53
|
+
# resource path
|
|
54
|
+
local_var_path = '/pypi/{path}/unyank/'.sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
|
|
55
|
+
|
|
56
|
+
# query parameters
|
|
57
|
+
query_params = opts[:query_params] || {}
|
|
58
|
+
|
|
59
|
+
# header parameters
|
|
60
|
+
header_params = opts[:header_params] || {}
|
|
61
|
+
# HTTP header 'Accept' (if needed)
|
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
63
|
+
# HTTP header 'Content-Type'
|
|
64
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
65
|
+
if !content_type.nil?
|
|
66
|
+
header_params['Content-Type'] = content_type
|
|
67
|
+
end
|
|
68
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
69
|
+
|
|
70
|
+
# form parameters
|
|
71
|
+
form_params = opts[:form_params] || {}
|
|
72
|
+
|
|
73
|
+
# http body (model)
|
|
74
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(yank)
|
|
75
|
+
|
|
76
|
+
# return_type
|
|
77
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
78
|
+
|
|
79
|
+
# auth_names
|
|
80
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
81
|
+
|
|
82
|
+
new_options = opts.merge(
|
|
83
|
+
:operation => :"PypiUnyankApi.unyank",
|
|
84
|
+
:header_params => header_params,
|
|
85
|
+
:query_params => query_params,
|
|
86
|
+
:form_params => form_params,
|
|
87
|
+
:body => post_body,
|
|
88
|
+
:auth_names => auth_names,
|
|
89
|
+
:return_type => return_type
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug "API called: PypiUnyankApi#unyank\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|