crc-pulp-python-client 20250819.1__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.
Potentially problematic release.
This version of crc-pulp-python-client might be problematic. Click here for more details.
- crc-pulp_python-client/__init__.py +2 -0
- crc-pulp_python-client/api/__init__.py +14 -0
- crc-pulp_python-client/api/api_pypi_api.py +370 -0
- crc-pulp_python-client/api/api_pypi_legacy_api.py +393 -0
- crc-pulp_python-client/api/api_pypi_simple_api.py +1045 -0
- crc-pulp_python-client/api/content_packages_api.py +2594 -0
- crc-pulp_python-client/api/distributions_pypi_api.py +4186 -0
- crc-pulp_python-client/api/publications_pypi_api.py +2881 -0
- crc-pulp_python-client/api/pypi_metadata_api.py +385 -0
- crc-pulp_python-client/api/remotes_python_api.py +4552 -0
- crc-pulp_python-client/api/repositories_python_api.py +4856 -0
- crc-pulp_python-client/api/repositories_python_versions_api.py +1670 -0
- crc-pulp_python-client/api_client.py +798 -0
- crc-pulp_python-client/api_response.py +21 -0
- crc-pulp_python-client/configuration.py +628 -0
- crc-pulp_python-client/exceptions.py +200 -0
- crc-pulp_python-client/models/__init__.py +56 -0
- crc-pulp_python-client/models/async_operation_response.py +88 -0
- crc-pulp_python-client/models/content_summary_response.py +92 -0
- crc-pulp_python-client/models/exclude_platforms_enum.py +40 -0
- crc-pulp_python-client/models/my_permissions_response.py +88 -0
- crc-pulp_python-client/models/nested_role.py +93 -0
- crc-pulp_python-client/models/nested_role_response.py +92 -0
- crc-pulp_python-client/models/object_roles_response.py +96 -0
- crc-pulp_python-client/models/package_metadata_response.py +109 -0
- crc-pulp_python-client/models/package_types_enum.py +44 -0
- crc-pulp_python-client/models/package_upload_task_response.py +103 -0
- crc-pulp_python-client/models/paginated_repository_version_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_distribution_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_package_content_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_publication_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_remote_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_repository_response_list.py +112 -0
- crc-pulp_python-client/models/patchedpython_python_distribution.py +125 -0
- crc-pulp_python-client/models/patchedpython_python_remote.py +219 -0
- crc-pulp_python-client/models/patchedpython_python_repository.py +114 -0
- crc-pulp_python-client/models/policy_enum.py +39 -0
- crc-pulp_python-client/models/python_python_distribution.py +125 -0
- crc-pulp_python-client/models/python_python_distribution_response.py +149 -0
- crc-pulp_python-client/models/python_python_package_content_response.py +201 -0
- crc-pulp_python-client/models/python_python_publication.py +90 -0
- crc-pulp_python-client/models/python_python_publication_response.py +111 -0
- crc-pulp_python-client/models/python_python_remote.py +219 -0
- crc-pulp_python-client/models/python_python_remote_response.py +213 -0
- crc-pulp_python-client/models/python_python_remote_response_hidden_fields_inner.py +90 -0
- crc-pulp_python-client/models/python_python_repository.py +114 -0
- crc-pulp_python-client/models/python_python_repository_response.py +139 -0
- crc-pulp_python-client/models/repair.py +88 -0
- crc-pulp_python-client/models/repository_add_remove_content.py +93 -0
- crc-pulp_python-client/models/repository_sync_url.py +90 -0
- crc-pulp_python-client/models/repository_version_response.py +121 -0
- crc-pulp_python-client/models/set_label.py +103 -0
- crc-pulp_python-client/models/set_label_response.py +103 -0
- crc-pulp_python-client/models/summary_response.py +92 -0
- crc-pulp_python-client/models/unset_label.py +96 -0
- crc-pulp_python-client/models/unset_label_response.py +100 -0
- crc-pulp_python-client/py.typed +0 -0
- crc-pulp_python-client/rest.py +258 -0
- crc_pulp_python_client-20250819.1.dist-info/METADATA +25 -0
- crc_pulp_python_client-20250819.1.dist-info/RECORD +120 -0
- crc_pulp_python_client-20250819.1.dist-info/WHEEL +5 -0
- crc_pulp_python_client-20250819.1.dist-info/top_level.txt +2 -0
- services-pulp_python-client/__init__.py +2 -0
- services-pulp_python-client/api/__init__.py +14 -0
- services-pulp_python-client/api/api_pypi_api.py +370 -0
- services-pulp_python-client/api/api_pypi_legacy_api.py +393 -0
- services-pulp_python-client/api/api_pypi_simple_api.py +1045 -0
- services-pulp_python-client/api/content_packages_api.py +2594 -0
- services-pulp_python-client/api/distributions_pypi_api.py +4186 -0
- services-pulp_python-client/api/publications_pypi_api.py +2881 -0
- services-pulp_python-client/api/pypi_metadata_api.py +385 -0
- services-pulp_python-client/api/remotes_python_api.py +4552 -0
- services-pulp_python-client/api/repositories_python_api.py +4856 -0
- services-pulp_python-client/api/repositories_python_versions_api.py +1670 -0
- services-pulp_python-client/api_client.py +798 -0
- services-pulp_python-client/api_response.py +21 -0
- services-pulp_python-client/configuration.py +628 -0
- services-pulp_python-client/exceptions.py +200 -0
- services-pulp_python-client/models/__init__.py +56 -0
- services-pulp_python-client/models/async_operation_response.py +88 -0
- services-pulp_python-client/models/content_summary_response.py +92 -0
- services-pulp_python-client/models/exclude_platforms_enum.py +40 -0
- services-pulp_python-client/models/my_permissions_response.py +88 -0
- services-pulp_python-client/models/nested_role.py +93 -0
- services-pulp_python-client/models/nested_role_response.py +92 -0
- services-pulp_python-client/models/object_roles_response.py +96 -0
- services-pulp_python-client/models/package_metadata_response.py +109 -0
- services-pulp_python-client/models/package_types_enum.py +44 -0
- services-pulp_python-client/models/package_upload_task_response.py +103 -0
- services-pulp_python-client/models/paginated_repository_version_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_distribution_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_package_content_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_publication_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_remote_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_repository_response_list.py +112 -0
- services-pulp_python-client/models/patchedpython_python_distribution.py +125 -0
- services-pulp_python-client/models/patchedpython_python_remote.py +219 -0
- services-pulp_python-client/models/patchedpython_python_repository.py +114 -0
- services-pulp_python-client/models/policy_enum.py +39 -0
- services-pulp_python-client/models/python_python_distribution.py +125 -0
- services-pulp_python-client/models/python_python_distribution_response.py +149 -0
- services-pulp_python-client/models/python_python_package_content_response.py +201 -0
- services-pulp_python-client/models/python_python_publication.py +90 -0
- services-pulp_python-client/models/python_python_publication_response.py +111 -0
- services-pulp_python-client/models/python_python_remote.py +219 -0
- services-pulp_python-client/models/python_python_remote_response.py +213 -0
- services-pulp_python-client/models/python_python_remote_response_hidden_fields_inner.py +90 -0
- services-pulp_python-client/models/python_python_repository.py +114 -0
- services-pulp_python-client/models/python_python_repository_response.py +139 -0
- services-pulp_python-client/models/repair.py +88 -0
- services-pulp_python-client/models/repository_add_remove_content.py +93 -0
- services-pulp_python-client/models/repository_sync_url.py +90 -0
- services-pulp_python-client/models/repository_version_response.py +121 -0
- services-pulp_python-client/models/set_label.py +103 -0
- services-pulp_python-client/models/set_label_response.py +103 -0
- services-pulp_python-client/models/summary_response.py +92 -0
- services-pulp_python-client/models/unset_label.py +96 -0
- services-pulp_python-client/models/unset_label_response.py +100 -0
- services-pulp_python-client/py.typed +0 -0
- services-pulp_python-client/rest.py +258 -0
|
@@ -0,0 +1,393 @@
|
|
|
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, StrictBytes, StrictStr
|
|
21
|
+
from typing import List, Optional, Tuple, Union
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from crc-pulp_python-client.models.package_upload_task_response import PackageUploadTaskResponse
|
|
24
|
+
|
|
25
|
+
from crc-pulp_python-client.api_client import ApiClient, RequestSerialized
|
|
26
|
+
from crc-pulp_python-client.api_response import ApiResponse
|
|
27
|
+
from crc-pulp_python-client.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ApiPypiLegacyApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@validate_call
|
|
44
|
+
def create(
|
|
45
|
+
self,
|
|
46
|
+
path: StrictStr,
|
|
47
|
+
content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="A Python package release file to upload to the index.")],
|
|
48
|
+
sha256_digest: Annotated[str, Field(min_length=64, strict=True, max_length=64, description="SHA256 of package to validate upload integrity.")],
|
|
49
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
50
|
+
action: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Defaults to `file_upload`, don't change it or request will fail!")] = None,
|
|
51
|
+
pulp_domain: StrictStr = "default",
|
|
52
|
+
_request_timeout: Union[
|
|
53
|
+
None,
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Tuple[
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
58
|
+
]
|
|
59
|
+
] = None,
|
|
60
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_content_type: Optional[StrictStr] = None,
|
|
62
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
64
|
+
) -> PackageUploadTaskResponse:
|
|
65
|
+
"""Upload a package
|
|
66
|
+
|
|
67
|
+
Upload package to the index. This is the endpoint that tools like Twine and Poetry use for their upload commands.
|
|
68
|
+
|
|
69
|
+
:param path: (required)
|
|
70
|
+
:type path: str
|
|
71
|
+
:param pulp_domain: (required)
|
|
72
|
+
:type pulp_domain: str
|
|
73
|
+
:param content: A Python package release file to upload to the index. (required)
|
|
74
|
+
:type content: bytearray
|
|
75
|
+
:param sha256_digest: SHA256 of package to validate upload integrity. (required)
|
|
76
|
+
:type sha256_digest: str
|
|
77
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
78
|
+
:type x_task_diagnostics: List[str]
|
|
79
|
+
:param action: Defaults to `file_upload`, don't change it or request will fail!
|
|
80
|
+
:type action: str
|
|
81
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
82
|
+
number provided, it will be total request
|
|
83
|
+
timeout. It can also be a pair (tuple) of
|
|
84
|
+
(connection, read) timeouts.
|
|
85
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
86
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
87
|
+
request; this effectively ignores the
|
|
88
|
+
authentication in the spec for a single request.
|
|
89
|
+
:type _request_auth: dict, optional
|
|
90
|
+
:param _content_type: force content-type for the request.
|
|
91
|
+
:type _content_type: str, Optional
|
|
92
|
+
:param _headers: set to override the headers for a single
|
|
93
|
+
request; this effectively ignores the headers
|
|
94
|
+
in the spec for a single request.
|
|
95
|
+
:type _headers: dict, optional
|
|
96
|
+
:param _host_index: set to override the host_index for a single
|
|
97
|
+
request; this effectively ignores the host_index
|
|
98
|
+
in the spec for a single request.
|
|
99
|
+
:type _host_index: int, optional
|
|
100
|
+
:return: Returns the result object.
|
|
101
|
+
""" # noqa: E501
|
|
102
|
+
|
|
103
|
+
_param = self._create_serialize(
|
|
104
|
+
path=path,
|
|
105
|
+
pulp_domain=pulp_domain,
|
|
106
|
+
content=content,
|
|
107
|
+
sha256_digest=sha256_digest,
|
|
108
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
109
|
+
action=action,
|
|
110
|
+
_request_auth=_request_auth,
|
|
111
|
+
_content_type=_content_type,
|
|
112
|
+
_headers=_headers,
|
|
113
|
+
_host_index=_host_index
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
117
|
+
'200': "PackageUploadTaskResponse",
|
|
118
|
+
}
|
|
119
|
+
response_data = self.api_client.call_api(
|
|
120
|
+
*_param,
|
|
121
|
+
_request_timeout=_request_timeout
|
|
122
|
+
)
|
|
123
|
+
response_data.read()
|
|
124
|
+
return self.api_client.response_deserialize(
|
|
125
|
+
response_data=response_data,
|
|
126
|
+
response_types_map=_response_types_map,
|
|
127
|
+
).data
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
@validate_call
|
|
131
|
+
def create_with_http_info(
|
|
132
|
+
self,
|
|
133
|
+
path: StrictStr,
|
|
134
|
+
content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="A Python package release file to upload to the index.")],
|
|
135
|
+
sha256_digest: Annotated[str, Field(min_length=64, strict=True, max_length=64, description="SHA256 of package to validate upload integrity.")],
|
|
136
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
137
|
+
action: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Defaults to `file_upload`, don't change it or request will fail!")] = None,
|
|
138
|
+
pulp_domain: StrictStr = "default",
|
|
139
|
+
_request_timeout: Union[
|
|
140
|
+
None,
|
|
141
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
142
|
+
Tuple[
|
|
143
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
144
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
145
|
+
]
|
|
146
|
+
] = None,
|
|
147
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
148
|
+
_content_type: Optional[StrictStr] = None,
|
|
149
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
150
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
151
|
+
) -> ApiResponse[PackageUploadTaskResponse]:
|
|
152
|
+
"""Upload a package
|
|
153
|
+
|
|
154
|
+
Upload package to the index. This is the endpoint that tools like Twine and Poetry use for their upload commands.
|
|
155
|
+
|
|
156
|
+
:param path: (required)
|
|
157
|
+
:type path: str
|
|
158
|
+
:param pulp_domain: (required)
|
|
159
|
+
:type pulp_domain: str
|
|
160
|
+
:param content: A Python package release file to upload to the index. (required)
|
|
161
|
+
:type content: bytearray
|
|
162
|
+
:param sha256_digest: SHA256 of package to validate upload integrity. (required)
|
|
163
|
+
:type sha256_digest: str
|
|
164
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
165
|
+
:type x_task_diagnostics: List[str]
|
|
166
|
+
:param action: Defaults to `file_upload`, don't change it or request will fail!
|
|
167
|
+
:type action: str
|
|
168
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
169
|
+
number provided, it will be total request
|
|
170
|
+
timeout. It can also be a pair (tuple) of
|
|
171
|
+
(connection, read) timeouts.
|
|
172
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
173
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
174
|
+
request; this effectively ignores the
|
|
175
|
+
authentication in the spec for a single request.
|
|
176
|
+
:type _request_auth: dict, optional
|
|
177
|
+
:param _content_type: force content-type for the request.
|
|
178
|
+
:type _content_type: str, Optional
|
|
179
|
+
:param _headers: set to override the headers for a single
|
|
180
|
+
request; this effectively ignores the headers
|
|
181
|
+
in the spec for a single request.
|
|
182
|
+
:type _headers: dict, optional
|
|
183
|
+
:param _host_index: set to override the host_index for a single
|
|
184
|
+
request; this effectively ignores the host_index
|
|
185
|
+
in the spec for a single request.
|
|
186
|
+
:type _host_index: int, optional
|
|
187
|
+
:return: Returns the result object.
|
|
188
|
+
""" # noqa: E501
|
|
189
|
+
|
|
190
|
+
_param = self._create_serialize(
|
|
191
|
+
path=path,
|
|
192
|
+
pulp_domain=pulp_domain,
|
|
193
|
+
content=content,
|
|
194
|
+
sha256_digest=sha256_digest,
|
|
195
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
196
|
+
action=action,
|
|
197
|
+
_request_auth=_request_auth,
|
|
198
|
+
_content_type=_content_type,
|
|
199
|
+
_headers=_headers,
|
|
200
|
+
_host_index=_host_index
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
204
|
+
'200': "PackageUploadTaskResponse",
|
|
205
|
+
}
|
|
206
|
+
response_data = self.api_client.call_api(
|
|
207
|
+
*_param,
|
|
208
|
+
_request_timeout=_request_timeout
|
|
209
|
+
)
|
|
210
|
+
response_data.read()
|
|
211
|
+
return self.api_client.response_deserialize(
|
|
212
|
+
response_data=response_data,
|
|
213
|
+
response_types_map=_response_types_map,
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
@validate_call
|
|
218
|
+
def create_without_preload_content(
|
|
219
|
+
self,
|
|
220
|
+
path: StrictStr,
|
|
221
|
+
content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="A Python package release file to upload to the index.")],
|
|
222
|
+
sha256_digest: Annotated[str, Field(min_length=64, strict=True, max_length=64, description="SHA256 of package to validate upload integrity.")],
|
|
223
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
224
|
+
action: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Defaults to `file_upload`, don't change it or request will fail!")] = None,
|
|
225
|
+
pulp_domain: StrictStr = "default",
|
|
226
|
+
_request_timeout: Union[
|
|
227
|
+
None,
|
|
228
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
229
|
+
Tuple[
|
|
230
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
231
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
232
|
+
]
|
|
233
|
+
] = None,
|
|
234
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
235
|
+
_content_type: Optional[StrictStr] = None,
|
|
236
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
237
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
238
|
+
) -> RESTResponseType:
|
|
239
|
+
"""Upload a package
|
|
240
|
+
|
|
241
|
+
Upload package to the index. This is the endpoint that tools like Twine and Poetry use for their upload commands.
|
|
242
|
+
|
|
243
|
+
:param path: (required)
|
|
244
|
+
:type path: str
|
|
245
|
+
:param pulp_domain: (required)
|
|
246
|
+
:type pulp_domain: str
|
|
247
|
+
:param content: A Python package release file to upload to the index. (required)
|
|
248
|
+
:type content: bytearray
|
|
249
|
+
:param sha256_digest: SHA256 of package to validate upload integrity. (required)
|
|
250
|
+
:type sha256_digest: str
|
|
251
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
252
|
+
:type x_task_diagnostics: List[str]
|
|
253
|
+
:param action: Defaults to `file_upload`, don't change it or request will fail!
|
|
254
|
+
:type action: str
|
|
255
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
256
|
+
number provided, it will be total request
|
|
257
|
+
timeout. It can also be a pair (tuple) of
|
|
258
|
+
(connection, read) timeouts.
|
|
259
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
260
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
261
|
+
request; this effectively ignores the
|
|
262
|
+
authentication in the spec for a single request.
|
|
263
|
+
:type _request_auth: dict, optional
|
|
264
|
+
:param _content_type: force content-type for the request.
|
|
265
|
+
:type _content_type: str, Optional
|
|
266
|
+
:param _headers: set to override the headers for a single
|
|
267
|
+
request; this effectively ignores the headers
|
|
268
|
+
in the spec for a single request.
|
|
269
|
+
:type _headers: dict, optional
|
|
270
|
+
:param _host_index: set to override the host_index for a single
|
|
271
|
+
request; this effectively ignores the host_index
|
|
272
|
+
in the spec for a single request.
|
|
273
|
+
:type _host_index: int, optional
|
|
274
|
+
:return: Returns the result object.
|
|
275
|
+
""" # noqa: E501
|
|
276
|
+
|
|
277
|
+
_param = self._create_serialize(
|
|
278
|
+
path=path,
|
|
279
|
+
pulp_domain=pulp_domain,
|
|
280
|
+
content=content,
|
|
281
|
+
sha256_digest=sha256_digest,
|
|
282
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
283
|
+
action=action,
|
|
284
|
+
_request_auth=_request_auth,
|
|
285
|
+
_content_type=_content_type,
|
|
286
|
+
_headers=_headers,
|
|
287
|
+
_host_index=_host_index
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
291
|
+
'200': "PackageUploadTaskResponse",
|
|
292
|
+
}
|
|
293
|
+
response_data = self.api_client.call_api(
|
|
294
|
+
*_param,
|
|
295
|
+
_request_timeout=_request_timeout
|
|
296
|
+
)
|
|
297
|
+
return response_data.response
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
def _create_serialize(
|
|
301
|
+
self,
|
|
302
|
+
path,
|
|
303
|
+
pulp_domain,
|
|
304
|
+
content,
|
|
305
|
+
sha256_digest,
|
|
306
|
+
x_task_diagnostics,
|
|
307
|
+
action,
|
|
308
|
+
_request_auth,
|
|
309
|
+
_content_type,
|
|
310
|
+
_headers,
|
|
311
|
+
_host_index,
|
|
312
|
+
) -> RequestSerialized:
|
|
313
|
+
|
|
314
|
+
_host = None
|
|
315
|
+
|
|
316
|
+
_collection_formats: Dict[str, str] = {
|
|
317
|
+
'X-Task-Diagnostics': 'csv',
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
_path_params: Dict[str, str] = {}
|
|
321
|
+
_query_params: List[Tuple[str, str]] = []
|
|
322
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
323
|
+
_form_params: List[Tuple[str, str]] = []
|
|
324
|
+
_files: Dict[
|
|
325
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
326
|
+
] = {}
|
|
327
|
+
_body_params: Optional[bytes] = None
|
|
328
|
+
|
|
329
|
+
# process the path parameters
|
|
330
|
+
if path is not None:
|
|
331
|
+
_path_params['path'] = path
|
|
332
|
+
if pulp_domain is not None:
|
|
333
|
+
_path_params['pulp_domain'] = pulp_domain
|
|
334
|
+
# process the query parameters
|
|
335
|
+
# process the header parameters
|
|
336
|
+
if x_task_diagnostics is not None:
|
|
337
|
+
_header_params['X-Task-Diagnostics'] = x_task_diagnostics
|
|
338
|
+
# process the form parameters
|
|
339
|
+
if content is not None:
|
|
340
|
+
_files['content'] = content
|
|
341
|
+
if action is not None:
|
|
342
|
+
_form_params.append(('action', action))
|
|
343
|
+
if sha256_digest is not None:
|
|
344
|
+
_form_params.append(('sha256_digest', sha256_digest))
|
|
345
|
+
# process the body parameter
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
# set the HTTP header `Accept`
|
|
349
|
+
if 'Accept' not in _header_params:
|
|
350
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
351
|
+
[
|
|
352
|
+
'application/json'
|
|
353
|
+
]
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
# set the HTTP header `Content-Type`
|
|
357
|
+
if _content_type:
|
|
358
|
+
_header_params['Content-Type'] = _content_type
|
|
359
|
+
else:
|
|
360
|
+
_default_content_type = (
|
|
361
|
+
self.api_client.select_header_content_type(
|
|
362
|
+
[
|
|
363
|
+
'multipart/form-data',
|
|
364
|
+
'application/x-www-form-urlencoded'
|
|
365
|
+
]
|
|
366
|
+
)
|
|
367
|
+
)
|
|
368
|
+
if _default_content_type is not None:
|
|
369
|
+
_header_params['Content-Type'] = _default_content_type
|
|
370
|
+
|
|
371
|
+
# authentication setting
|
|
372
|
+
_auth_settings: List[str] = [
|
|
373
|
+
'json_header_remote_authentication',
|
|
374
|
+
'basicAuth',
|
|
375
|
+
'cookieAuth'
|
|
376
|
+
]
|
|
377
|
+
|
|
378
|
+
return self.api_client.param_serialize(
|
|
379
|
+
method='POST',
|
|
380
|
+
resource_path='/api/pulp/pypi/{pulp_domain}/{path}/legacy/',
|
|
381
|
+
path_params=_path_params,
|
|
382
|
+
query_params=_query_params,
|
|
383
|
+
header_params=_header_params,
|
|
384
|
+
body=_body_params,
|
|
385
|
+
post_params=_form_params,
|
|
386
|
+
files=_files,
|
|
387
|
+
auth_settings=_auth_settings,
|
|
388
|
+
collection_formats=_collection_formats,
|
|
389
|
+
_host=_host,
|
|
390
|
+
_request_auth=_request_auth
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
|