pulp-python-client 3.32.1__py3-none-any.whl → 3.34.0__py3-none-any.whl
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.
- {pulp_python_client-3.32.1.dist-info → pulp_python_client-3.34.0.dist-info}/METADATA +11 -2
- {pulp_python_client-3.32.1.dist-info → pulp_python_client-3.34.0.dist-info}/RECORD +22 -16
- {pulp_python_client-3.32.1.dist-info → pulp_python_client-3.34.0.dist-info}/WHEEL +1 -1
- pulpcore/client/pulp_python/__init__.py +13 -1
- pulpcore/client/pulp_python/api/__init__.py +3 -0
- pulpcore/client/pulp_python/api/content_packages_api.py +17 -0
- pulpcore/client/pulp_python/api/content_yanks_api.py +1483 -0
- pulpcore/client/pulp_python/api/pypi_legacy_api.py +6 -6
- pulpcore/client/pulp_python/api/pypi_simple_api.py +6 -6
- pulpcore/client/pulp_python/api/pypi_unyank_api.py +349 -0
- pulpcore/client/pulp_python/api/pypi_yank_api.py +349 -0
- pulpcore/client/pulp_python/api_client.py +1 -1
- pulpcore/client/pulp_python/configuration.py +1 -1
- pulpcore/client/pulp_python/models/__init__.py +3 -0
- pulpcore/client/pulp_python/models/metadata_version_enum.py +2 -1
- pulpcore/client/pulp_python/models/paginatedpython_package_yank_response_list.py +97 -0
- pulpcore/client/pulp_python/models/patchedpython_python_repository.py +2 -1
- pulpcore/client/pulp_python/models/python_package_yank_response.py +111 -0
- pulpcore/client/pulp_python/models/python_python_repository.py +2 -1
- pulpcore/client/pulp_python/models/python_python_repository_response.py +2 -1
- pulpcore/client/pulp_python/models/yank.py +89 -0
- {pulp_python_client-3.32.1.dist-info → pulp_python_client-3.34.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pulp 3 API
|
|
5
|
+
|
|
6
|
+
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3
|
|
9
|
+
Contact: pulp-list@redhat.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from pydantic import Field, StrictStr
|
|
21
|
+
from typing import List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from pulpcore.client.pulp_python.models.async_operation_response import AsyncOperationResponse
|
|
24
|
+
from pulpcore.client.pulp_python.models.yank import Yank
|
|
25
|
+
|
|
26
|
+
from pulpcore.client.pulp_python.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from pulpcore.client.pulp_python.api_response import ApiResponse
|
|
28
|
+
from pulpcore.client.pulp_python.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class PypiYankApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def yank(
|
|
46
|
+
self,
|
|
47
|
+
path: StrictStr,
|
|
48
|
+
yank: Yank,
|
|
49
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
50
|
+
_request_timeout: Union[
|
|
51
|
+
None,
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Tuple[
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
56
|
+
]
|
|
57
|
+
] = None,
|
|
58
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_content_type: Optional[StrictStr] = None,
|
|
60
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
62
|
+
) -> AsyncOperationResponse:
|
|
63
|
+
"""Yank a package version
|
|
64
|
+
|
|
65
|
+
Yank a package version, marking all its files with data-yanked.
|
|
66
|
+
|
|
67
|
+
:param path: (required)
|
|
68
|
+
:type path: str
|
|
69
|
+
:param yank: (required)
|
|
70
|
+
:type yank: Yank
|
|
71
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
72
|
+
:type x_task_diagnostics: List[str]
|
|
73
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
74
|
+
number provided, it will be total request
|
|
75
|
+
timeout. It can also be a pair (tuple) of
|
|
76
|
+
(connection, read) timeouts.
|
|
77
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
78
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
79
|
+
request; this effectively ignores the
|
|
80
|
+
authentication in the spec for a single request.
|
|
81
|
+
:type _request_auth: dict, optional
|
|
82
|
+
:param _content_type: force content-type for the request.
|
|
83
|
+
:type _content_type: str, Optional
|
|
84
|
+
:param _headers: set to override the headers for a single
|
|
85
|
+
request; this effectively ignores the headers
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _headers: dict, optional
|
|
88
|
+
:param _host_index: set to override the host_index for a single
|
|
89
|
+
request; this effectively ignores the host_index
|
|
90
|
+
in the spec for a single request.
|
|
91
|
+
:type _host_index: int, optional
|
|
92
|
+
:return: Returns the result object.
|
|
93
|
+
""" # noqa: E501
|
|
94
|
+
|
|
95
|
+
_param = self._yank_serialize(
|
|
96
|
+
path=path,
|
|
97
|
+
yank=yank,
|
|
98
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
99
|
+
_request_auth=_request_auth,
|
|
100
|
+
_content_type=_content_type,
|
|
101
|
+
_headers=_headers,
|
|
102
|
+
_host_index=_host_index
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
106
|
+
'202': "AsyncOperationResponse",
|
|
107
|
+
}
|
|
108
|
+
response_data = self.api_client.call_api(
|
|
109
|
+
*_param,
|
|
110
|
+
_request_timeout=_request_timeout
|
|
111
|
+
)
|
|
112
|
+
response_data.read()
|
|
113
|
+
return self.api_client.response_deserialize(
|
|
114
|
+
response_data=response_data,
|
|
115
|
+
response_types_map=_response_types_map,
|
|
116
|
+
).data
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@validate_call
|
|
120
|
+
def yank_with_http_info(
|
|
121
|
+
self,
|
|
122
|
+
path: StrictStr,
|
|
123
|
+
yank: Yank,
|
|
124
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
125
|
+
_request_timeout: Union[
|
|
126
|
+
None,
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
128
|
+
Tuple[
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
131
|
+
]
|
|
132
|
+
] = None,
|
|
133
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
134
|
+
_content_type: Optional[StrictStr] = None,
|
|
135
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
136
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
137
|
+
) -> ApiResponse[AsyncOperationResponse]:
|
|
138
|
+
"""Yank a package version
|
|
139
|
+
|
|
140
|
+
Yank a package version, marking all its files with data-yanked.
|
|
141
|
+
|
|
142
|
+
:param path: (required)
|
|
143
|
+
:type path: str
|
|
144
|
+
:param yank: (required)
|
|
145
|
+
:type yank: Yank
|
|
146
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
147
|
+
:type x_task_diagnostics: List[str]
|
|
148
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
149
|
+
number provided, it will be total request
|
|
150
|
+
timeout. It can also be a pair (tuple) of
|
|
151
|
+
(connection, read) timeouts.
|
|
152
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
153
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
154
|
+
request; this effectively ignores the
|
|
155
|
+
authentication in the spec for a single request.
|
|
156
|
+
:type _request_auth: dict, optional
|
|
157
|
+
:param _content_type: force content-type for the request.
|
|
158
|
+
:type _content_type: str, Optional
|
|
159
|
+
:param _headers: set to override the headers for a single
|
|
160
|
+
request; this effectively ignores the headers
|
|
161
|
+
in the spec for a single request.
|
|
162
|
+
:type _headers: dict, optional
|
|
163
|
+
:param _host_index: set to override the host_index for a single
|
|
164
|
+
request; this effectively ignores the host_index
|
|
165
|
+
in the spec for a single request.
|
|
166
|
+
:type _host_index: int, optional
|
|
167
|
+
:return: Returns the result object.
|
|
168
|
+
""" # noqa: E501
|
|
169
|
+
|
|
170
|
+
_param = self._yank_serialize(
|
|
171
|
+
path=path,
|
|
172
|
+
yank=yank,
|
|
173
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
174
|
+
_request_auth=_request_auth,
|
|
175
|
+
_content_type=_content_type,
|
|
176
|
+
_headers=_headers,
|
|
177
|
+
_host_index=_host_index
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
181
|
+
'202': "AsyncOperationResponse",
|
|
182
|
+
}
|
|
183
|
+
response_data = self.api_client.call_api(
|
|
184
|
+
*_param,
|
|
185
|
+
_request_timeout=_request_timeout
|
|
186
|
+
)
|
|
187
|
+
response_data.read()
|
|
188
|
+
return self.api_client.response_deserialize(
|
|
189
|
+
response_data=response_data,
|
|
190
|
+
response_types_map=_response_types_map,
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
@validate_call
|
|
195
|
+
def yank_without_preload_content(
|
|
196
|
+
self,
|
|
197
|
+
path: StrictStr,
|
|
198
|
+
yank: Yank,
|
|
199
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
200
|
+
_request_timeout: Union[
|
|
201
|
+
None,
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
203
|
+
Tuple[
|
|
204
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
205
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
206
|
+
]
|
|
207
|
+
] = None,
|
|
208
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
209
|
+
_content_type: Optional[StrictStr] = None,
|
|
210
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
211
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
212
|
+
) -> RESTResponseType:
|
|
213
|
+
"""Yank a package version
|
|
214
|
+
|
|
215
|
+
Yank a package version, marking all its files with data-yanked.
|
|
216
|
+
|
|
217
|
+
:param path: (required)
|
|
218
|
+
:type path: str
|
|
219
|
+
:param yank: (required)
|
|
220
|
+
:type yank: Yank
|
|
221
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
222
|
+
:type x_task_diagnostics: List[str]
|
|
223
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
224
|
+
number provided, it will be total request
|
|
225
|
+
timeout. It can also be a pair (tuple) of
|
|
226
|
+
(connection, read) timeouts.
|
|
227
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
228
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
229
|
+
request; this effectively ignores the
|
|
230
|
+
authentication in the spec for a single request.
|
|
231
|
+
:type _request_auth: dict, optional
|
|
232
|
+
:param _content_type: force content-type for the request.
|
|
233
|
+
:type _content_type: str, Optional
|
|
234
|
+
:param _headers: set to override the headers for a single
|
|
235
|
+
request; this effectively ignores the headers
|
|
236
|
+
in the spec for a single request.
|
|
237
|
+
:type _headers: dict, optional
|
|
238
|
+
:param _host_index: set to override the host_index for a single
|
|
239
|
+
request; this effectively ignores the host_index
|
|
240
|
+
in the spec for a single request.
|
|
241
|
+
:type _host_index: int, optional
|
|
242
|
+
:return: Returns the result object.
|
|
243
|
+
""" # noqa: E501
|
|
244
|
+
|
|
245
|
+
_param = self._yank_serialize(
|
|
246
|
+
path=path,
|
|
247
|
+
yank=yank,
|
|
248
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
249
|
+
_request_auth=_request_auth,
|
|
250
|
+
_content_type=_content_type,
|
|
251
|
+
_headers=_headers,
|
|
252
|
+
_host_index=_host_index
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
256
|
+
'202': "AsyncOperationResponse",
|
|
257
|
+
}
|
|
258
|
+
response_data = self.api_client.call_api(
|
|
259
|
+
*_param,
|
|
260
|
+
_request_timeout=_request_timeout
|
|
261
|
+
)
|
|
262
|
+
return response_data.response
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
def _yank_serialize(
|
|
266
|
+
self,
|
|
267
|
+
path,
|
|
268
|
+
yank,
|
|
269
|
+
x_task_diagnostics,
|
|
270
|
+
_request_auth,
|
|
271
|
+
_content_type,
|
|
272
|
+
_headers,
|
|
273
|
+
_host_index,
|
|
274
|
+
) -> RequestSerialized:
|
|
275
|
+
|
|
276
|
+
_host = None
|
|
277
|
+
|
|
278
|
+
_collection_formats: Dict[str, str] = {
|
|
279
|
+
'X-Task-Diagnostics': 'csv',
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
_path_params: Dict[str, str] = {}
|
|
283
|
+
_query_params: List[Tuple[str, str]] = []
|
|
284
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
285
|
+
_form_params: List[Tuple[str, str]] = []
|
|
286
|
+
_files: Dict[
|
|
287
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
288
|
+
] = {}
|
|
289
|
+
_body_params: Optional[bytes] = None
|
|
290
|
+
|
|
291
|
+
# process the path parameters
|
|
292
|
+
if path is not None:
|
|
293
|
+
_path_params['path'] = path
|
|
294
|
+
# process the query parameters
|
|
295
|
+
# process the header parameters
|
|
296
|
+
if x_task_diagnostics is not None:
|
|
297
|
+
_header_params['X-Task-Diagnostics'] = x_task_diagnostics
|
|
298
|
+
# process the form parameters
|
|
299
|
+
# process the body parameter
|
|
300
|
+
if yank is not None:
|
|
301
|
+
_body_params = yank
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
# set the HTTP header `Accept`
|
|
305
|
+
if 'Accept' not in _header_params:
|
|
306
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
307
|
+
[
|
|
308
|
+
'application/json'
|
|
309
|
+
]
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
# set the HTTP header `Content-Type`
|
|
313
|
+
if _content_type:
|
|
314
|
+
_header_params['Content-Type'] = _content_type
|
|
315
|
+
else:
|
|
316
|
+
_default_content_type = (
|
|
317
|
+
self.api_client.select_header_content_type(
|
|
318
|
+
[
|
|
319
|
+
'application/json',
|
|
320
|
+
'application/x-www-form-urlencoded',
|
|
321
|
+
'multipart/form-data'
|
|
322
|
+
]
|
|
323
|
+
)
|
|
324
|
+
)
|
|
325
|
+
if _default_content_type is not None:
|
|
326
|
+
_header_params['Content-Type'] = _default_content_type
|
|
327
|
+
|
|
328
|
+
# authentication setting
|
|
329
|
+
_auth_settings: List[str] = [
|
|
330
|
+
'basicAuth',
|
|
331
|
+
'cookieAuth'
|
|
332
|
+
]
|
|
333
|
+
|
|
334
|
+
return self.api_client.param_serialize(
|
|
335
|
+
method='POST',
|
|
336
|
+
resource_path='/pypi/{path}/yank/',
|
|
337
|
+
path_params=_path_params,
|
|
338
|
+
query_params=_query_params,
|
|
339
|
+
header_params=_header_params,
|
|
340
|
+
body=_body_params,
|
|
341
|
+
post_params=_form_params,
|
|
342
|
+
files=_files,
|
|
343
|
+
auth_settings=_auth_settings,
|
|
344
|
+
collection_formats=_collection_formats,
|
|
345
|
+
_host=_host,
|
|
346
|
+
_request_auth=_request_auth
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
|
|
@@ -92,7 +92,7 @@ class ApiClient:
|
|
|
92
92
|
self.default_headers[header_name] = header_value
|
|
93
93
|
self.cookie = cookie
|
|
94
94
|
# Set default User-Agent.
|
|
95
|
-
self.user_agent = 'OpenAPI-Generator/3.
|
|
95
|
+
self.user_agent = 'OpenAPI-Generator/3.34.0/python'
|
|
96
96
|
self.client_side_validation = configuration.client_side_validation
|
|
97
97
|
|
|
98
98
|
def __enter__(self):
|
|
@@ -561,7 +561,7 @@ conf = pulpcore.client.pulp_python.Configuration(
|
|
|
561
561
|
"OS: {env}\n"\
|
|
562
562
|
"Python Version: {pyversion}\n"\
|
|
563
563
|
"Version of the API: v3\n"\
|
|
564
|
-
"SDK Package Version: 3.
|
|
564
|
+
"SDK Package Version: 3.34.0".\
|
|
565
565
|
format(env=sys.platform, pyversion=sys.version)
|
|
566
566
|
|
|
567
567
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -28,6 +28,7 @@ from pulpcore.client.pulp_python.models.package_types_enum import PackageTypesEn
|
|
|
28
28
|
from pulpcore.client.pulp_python.models.package_upload_task_response import PackageUploadTaskResponse
|
|
29
29
|
from pulpcore.client.pulp_python.models.paginated_repository_version_response_list import PaginatedRepositoryVersionResponseList
|
|
30
30
|
from pulpcore.client.pulp_python.models.paginatedpython_package_provenance_response_list import PaginatedpythonPackageProvenanceResponseList
|
|
31
|
+
from pulpcore.client.pulp_python.models.paginatedpython_package_yank_response_list import PaginatedpythonPackageYankResponseList
|
|
31
32
|
from pulpcore.client.pulp_python.models.paginatedpython_python_blocklist_entry_response_list import PaginatedpythonPythonBlocklistEntryResponseList
|
|
32
33
|
from pulpcore.client.pulp_python.models.paginatedpython_python_distribution_response_list import PaginatedpythonPythonDistributionResponseList
|
|
33
34
|
from pulpcore.client.pulp_python.models.paginatedpython_python_package_content_response_list import PaginatedpythonPythonPackageContentResponseList
|
|
@@ -40,6 +41,7 @@ from pulpcore.client.pulp_python.models.patchedpython_python_repository import P
|
|
|
40
41
|
from pulpcore.client.pulp_python.models.policy_enum import PolicyEnum
|
|
41
42
|
from pulpcore.client.pulp_python.models.protocol_version_enum import ProtocolVersionEnum
|
|
42
43
|
from pulpcore.client.pulp_python.models.python_package_provenance_response import PythonPackageProvenanceResponse
|
|
44
|
+
from pulpcore.client.pulp_python.models.python_package_yank_response import PythonPackageYankResponse
|
|
43
45
|
from pulpcore.client.pulp_python.models.python_python_blocklist_entry import PythonPythonBlocklistEntry
|
|
44
46
|
from pulpcore.client.pulp_python.models.python_python_blocklist_entry_response import PythonPythonBlocklistEntryResponse
|
|
45
47
|
from pulpcore.client.pulp_python.models.python_python_distribution import PythonPythonDistribution
|
|
@@ -63,4 +65,5 @@ from pulpcore.client.pulp_python.models.set_label_response import SetLabelRespon
|
|
|
63
65
|
from pulpcore.client.pulp_python.models.summary_response import SummaryResponse
|
|
64
66
|
from pulpcore.client.pulp_python.models.unset_label import UnsetLabel
|
|
65
67
|
from pulpcore.client.pulp_python.models.unset_label_response import UnsetLabelResponse
|
|
68
|
+
from pulpcore.client.pulp_python.models.yank import Yank
|
|
66
69
|
|
|
@@ -21,7 +21,7 @@ from typing_extensions import Self
|
|
|
21
21
|
|
|
22
22
|
class MetadataVersionEnum(str, Enum):
|
|
23
23
|
"""
|
|
24
|
-
* `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
|
|
24
|
+
* `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
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
"""
|
|
@@ -35,6 +35,7 @@ class MetadataVersionEnum(str, Enum):
|
|
|
35
35
|
ENUM_2_DOT_2 = '2.2'
|
|
36
36
|
ENUM_2_DOT_3 = '2.3'
|
|
37
37
|
ENUM_2_DOT_4 = '2.4'
|
|
38
|
+
ENUM_2_DOT_5 = '2.5'
|
|
38
39
|
|
|
39
40
|
@classmethod
|
|
40
41
|
def from_json(cls, json_str: str) -> Self:
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pulp 3 API
|
|
5
|
+
|
|
6
|
+
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3
|
|
9
|
+
Contact: pulp-list@redhat.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from pulpcore.client.pulp_python.models.python_package_yank_response import PythonPackageYankResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedpythonPackageYankResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedpythonPackageYankResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[PythonPackageYankResponse]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PaginatedpythonPackageYankResponseList from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.results:
|
|
79
|
+
for _item_results in self.results:
|
|
80
|
+
if _item_results:
|
|
81
|
+
_items.append(_item_results.to_dict())
|
|
82
|
+
_dict['results'] = _items
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of PaginatedpythonPackageYankResponseList from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate(obj)
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -36,7 +36,8 @@ class PatchedpythonPythonRepository(BaseModel):
|
|
|
36
36
|
remote: Optional[StrictStr] = Field(default=None, description="An optional remote to use by default when syncing.")
|
|
37
37
|
autopublish: Optional[StrictBool] = Field(default=False, description="Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. [Deprecated]")
|
|
38
38
|
allow_package_substitution: Optional[StrictBool] = Field(default=True, description="Whether to allow package substitution (replacing existing packages with packages that have the same filename but a different checksum). When False, any new repository version that would cause such a substitution will be rejected. This applies to all repository version creation paths including uploads, modify, and sync. When True (the default), package substitution is allowed.")
|
|
39
|
-
|
|
39
|
+
error_on_reject: Optional[StrictBool] = Field(default=True, description="Whether to fail the entire repository version when packages are rejected by the package substitution or blocklist policies. When True (the default), a ValidationError is raised and no packages from the request are added. When False, rejected packages are skipped and remaining packages are added; skipped packages are recorded in a task progress report.")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["pulp_labels", "name", "description", "retain_repo_versions", "retain_checkpoints", "remote", "autopublish", "allow_package_substitution", "error_on_reject"]
|
|
40
41
|
|
|
41
42
|
model_config = ConfigDict(
|
|
42
43
|
populate_by_name=True,
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pulp 3 API
|
|
5
|
+
|
|
6
|
+
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3
|
|
9
|
+
Contact: pulp-list@redhat.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PythonPackageYankResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Read-only serializer for PackageYank content units (PEP 592). Used by PackageYankViewSet to expose yank markers via the Pulp REST API.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
pulp_href: Optional[StrictStr] = None
|
|
32
|
+
prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
|
|
33
|
+
pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
|
|
34
|
+
pulp_last_updated: Optional[datetime] = Field(default=None, description="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.")
|
|
35
|
+
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")
|
|
36
|
+
vuln_report: Optional[StrictStr] = None
|
|
37
|
+
name_normalized: Optional[StrictStr] = None
|
|
38
|
+
version: Optional[StrictStr] = None
|
|
39
|
+
yanked_reason: Optional[StrictStr] = None
|
|
40
|
+
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "pulp_labels", "vuln_report", "name_normalized", "version", "yanked_reason"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of PythonPackageYankResponse from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
73
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
74
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
75
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
76
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
77
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
79
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
"pulp_href",
|
|
83
|
+
"prn",
|
|
84
|
+
"pulp_created",
|
|
85
|
+
"pulp_last_updated",
|
|
86
|
+
"vuln_report",
|
|
87
|
+
"name_normalized",
|
|
88
|
+
"version",
|
|
89
|
+
"yanked_reason",
|
|
90
|
+
])
|
|
91
|
+
|
|
92
|
+
_dict = self.model_dump(
|
|
93
|
+
by_alias=True,
|
|
94
|
+
exclude=excluded_fields,
|
|
95
|
+
exclude_none=True,
|
|
96
|
+
)
|
|
97
|
+
return _dict
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
101
|
+
"""Create an instance of PythonPackageYankResponse from a dict"""
|
|
102
|
+
if obj is None:
|
|
103
|
+
return None
|
|
104
|
+
|
|
105
|
+
if not isinstance(obj, dict):
|
|
106
|
+
return cls.model_validate(obj)
|
|
107
|
+
|
|
108
|
+
_obj = cls.model_validate(obj)
|
|
109
|
+
return _obj
|
|
110
|
+
|
|
111
|
+
|
|
@@ -36,7 +36,8 @@ class PythonPythonRepository(BaseModel):
|
|
|
36
36
|
remote: Optional[StrictStr] = Field(default=None, description="An optional remote to use by default when syncing.")
|
|
37
37
|
autopublish: Optional[StrictBool] = Field(default=False, description="Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. [Deprecated]")
|
|
38
38
|
allow_package_substitution: Optional[StrictBool] = Field(default=True, description="Whether to allow package substitution (replacing existing packages with packages that have the same filename but a different checksum). When False, any new repository version that would cause such a substitution will be rejected. This applies to all repository version creation paths including uploads, modify, and sync. When True (the default), package substitution is allowed.")
|
|
39
|
-
|
|
39
|
+
error_on_reject: Optional[StrictBool] = Field(default=True, description="Whether to fail the entire repository version when packages are rejected by the package substitution or blocklist policies. When True (the default), a ValidationError is raised and no packages from the request are added. When False, rejected packages are skipped and remaining packages are added; skipped packages are recorded in a task progress report.")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["pulp_labels", "name", "description", "retain_repo_versions", "retain_checkpoints", "remote", "autopublish", "allow_package_substitution", "error_on_reject"]
|
|
40
41
|
|
|
41
42
|
model_config = ConfigDict(
|
|
42
43
|
populate_by_name=True,
|
|
@@ -43,8 +43,9 @@ class PythonPythonRepositoryResponse(BaseModel):
|
|
|
43
43
|
remote: Optional[StrictStr] = Field(default=None, description="An optional remote to use by default when syncing.")
|
|
44
44
|
autopublish: Optional[StrictBool] = Field(default=False, description="Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. [Deprecated]")
|
|
45
45
|
allow_package_substitution: Optional[StrictBool] = Field(default=True, description="Whether to allow package substitution (replacing existing packages with packages that have the same filename but a different checksum). When False, any new repository version that would cause such a substitution will be rejected. This applies to all repository version creation paths including uploads, modify, and sync. When True (the default), package substitution is allowed.")
|
|
46
|
+
error_on_reject: Optional[StrictBool] = Field(default=True, description="Whether to fail the entire repository version when packages are rejected by the package substitution or blocklist policies. When True (the default), a ValidationError is raised and no packages from the request are added. When False, rejected packages are skipped and remaining packages are added; skipped packages are recorded in a task progress report.")
|
|
46
47
|
blocklist_entries_href: Optional[StrictStr] = Field(default=None, description="URL to the blocklist entries for this repository.")
|
|
47
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "versions_href", "pulp_labels", "latest_version_href", "name", "description", "retain_repo_versions", "retain_checkpoints", "remote", "autopublish", "allow_package_substitution", "blocklist_entries_href"]
|
|
48
|
+
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "versions_href", "pulp_labels", "latest_version_href", "name", "description", "retain_repo_versions", "retain_checkpoints", "remote", "autopublish", "allow_package_substitution", "error_on_reject", "blocklist_entries_href"]
|
|
48
49
|
|
|
49
50
|
model_config = ConfigDict(
|
|
50
51
|
populate_by_name=True,
|