pulp_python_client 3.3.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -4
- data/build/lib/pulpcore/__init__.py +2 -0
- data/build/lib/pulpcore/client/__init__.py +2 -0
- data/build/lib/pulpcore/client/pulp_python/__init__.py +75 -0
- data/build/lib/pulpcore/client/pulp_python/api/__init__.py +15 -0
- data/build/lib/pulpcore/client/pulp_python/api/content_packages_api.py +626 -0
- data/build/lib/pulpcore/client/pulp_python/api/distributions_pypi_api.py +830 -0
- data/build/lib/pulpcore/client/pulp_python/api/publications_pypi_api.py +566 -0
- data/build/lib/pulpcore/client/pulp_python/api/pypi_api.py +162 -0
- data/build/lib/pulpcore/client/pulp_python/api/pypi_legacy_api.py +185 -0
- data/build/lib/pulpcore/client/pulp_python/api/pypi_metadata_api.py +171 -0
- data/build/lib/pulpcore/client/pulp_python/api/pypi_simple_api.py +434 -0
- data/build/lib/pulpcore/client/pulp_python/api/remotes_python_api.py +972 -0
- data/build/lib/pulpcore/client/pulp_python/api/repositories_python_api.py +1063 -0
- data/build/lib/pulpcore/client/pulp_python/api/repositories_python_versions_api.py +614 -0
- data/build/lib/pulpcore/client/pulp_python/api_client.py +667 -0
- data/build/lib/pulpcore/client/pulp_python/configuration.py +427 -0
- data/build/lib/pulpcore/client/pulp_python/exceptions.py +121 -0
- data/build/lib/pulpcore/client/pulp_python/models/__init__.py +51 -0
- data/build/lib/pulpcore/client/pulp_python/models/async_operation_response.py +124 -0
- data/build/lib/pulpcore/client/pulp_python/models/content_summary.py +176 -0
- data/build/lib/pulpcore/client/pulp_python/models/content_summary_response.py +176 -0
- data/build/lib/pulpcore/client/pulp_python/models/exclude_platforms_enum.py +103 -0
- data/build/lib/pulpcore/client/pulp_python/models/package_metadata_response.py +209 -0
- data/build/lib/pulpcore/client/pulp_python/models/package_types_enum.py +107 -0
- data/build/lib/pulpcore/client/pulp_python/models/package_upload.py +187 -0
- data/build/lib/pulpcore/client/pulp_python/models/package_upload_task_response.py +176 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +286 -0
- data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_remote.py +823 -0
- data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_repository.py +259 -0
- data/build/lib/pulpcore/client/pulp_python/models/policy_enum.py +102 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_bander_remote.py +181 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_distribution.py +288 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_distribution_response.py +368 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_package_content.py +824 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_package_content_response.py +933 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_publication.py +149 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_publication_response.py +231 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_remote.py +825 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_remote_response.py +772 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_repository.py +260 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_repository_response.py +366 -0
- data/build/lib/pulpcore/client/pulp_python/models/repository_add_remove_content.py +179 -0
- data/build/lib/pulpcore/client/pulp_python/models/repository_sync_url.py +151 -0
- data/build/lib/pulpcore/client/pulp_python/models/repository_version.py +123 -0
- data/build/lib/pulpcore/client/pulp_python/models/repository_version_response.py +257 -0
- data/build/lib/pulpcore/client/pulp_python/models/summary_response.py +182 -0
- data/build/lib/pulpcore/client/pulp_python/rest.py +292 -0
- data/dist/pulp_python-client-3.4.0.tar.gz +0 -0
- data/dist/pulp_python_client-3.4.0-py3-none-any.whl +0 -0
- data/docs/ContentPackagesApi.md +6 -0
- data/docs/DistributionsPypiApi.md +2 -2
- data/docs/PackageMetadataResponse.md +23 -0
- data/docs/PackageUpload.md +21 -0
- data/docs/PackageUploadTaskResponse.md +21 -0
- data/docs/PatchedpythonPythonDistribution.md +3 -1
- data/docs/PatchedpythonPythonRemote.md +1 -1
- data/docs/PublicationsPypiApi.md +1 -1
- data/docs/PypiApi.md +62 -0
- data/docs/PypiLegacyApi.md +70 -0
- data/docs/PypiMetadataApi.md +64 -0
- data/docs/PypiSimpleApi.md +190 -0
- data/docs/PythonBanderRemote.md +1 -1
- data/docs/PythonPythonDistribution.md +3 -1
- data/docs/PythonPythonDistributionResponse.md +4 -2
- data/docs/PythonPythonPackageContent.md +6 -0
- data/docs/PythonPythonPackageContentResponse.md +5 -1
- data/docs/PythonPythonRemote.md +1 -1
- data/docs/PythonPythonRemoteResponse.md +1 -1
- data/docs/RemotesPythonApi.md +3 -3
- data/docs/RepositoriesPythonApi.md +4 -4
- data/docs/SummaryResponse.md +21 -0
- data/lib/pulp_python_client/api/content_packages_api.rb +9 -0
- data/lib/pulp_python_client/api/distributions_pypi_api.rb +4 -4
- data/lib/pulp_python_client/api/publications_pypi_api.rb +2 -2
- data/lib/pulp_python_client/api/pypi_api.rb +90 -0
- data/lib/pulp_python_client/api/pypi_legacy_api.rb +111 -0
- data/lib/pulp_python_client/api/pypi_metadata_api.rb +96 -0
- data/lib/pulp_python_client/api/pypi_simple_api.rb +249 -0
- data/lib/pulp_python_client/api/remotes_python_api.rb +4 -4
- data/lib/pulp_python_client/api/repositories_python_api.rb +8 -8
- data/lib/pulp_python_client/models/package_metadata_response.rb +257 -0
- data/lib/pulp_python_client/models/package_upload.rb +268 -0
- data/lib/pulp_python_client/models/package_upload_task_response.rb +240 -0
- data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +17 -5
- data/lib/pulp_python_client/models/patchedpython_python_remote.rb +1 -1
- data/lib/pulp_python_client/models/python_bander_remote.rb +1 -1
- data/lib/pulp_python_client/models/python_python_distribution.rb +17 -5
- data/lib/pulp_python_client/models/python_python_distribution_response.rb +17 -6
- data/lib/pulp_python_client/models/python_python_package_content.rb +33 -1
- data/lib/pulp_python_client/models/python_python_package_content_response.rb +23 -1
- data/lib/pulp_python_client/models/python_python_remote.rb +1 -1
- data/lib/pulp_python_client/models/python_python_remote_response.rb +1 -1
- data/lib/pulp_python_client/models/summary_response.rb +243 -0
- data/lib/pulp_python_client/version.rb +1 -1
- data/lib/pulp_python_client.rb +8 -0
- data/pulp_python_client.egg-info/PKG-INFO +15 -0
- data/pulp_python_client.egg-info/SOURCES.txt +105 -0
- data/pulp_python_client.egg-info/dependency_links.txt +1 -0
- data/pulp_python_client.egg-info/requires.txt +4 -0
- data/pulp_python_client.egg-info/top_level.txt +1 -0
- data/pulpcore/__init__.py +2 -0
- data/pulpcore/client/__init__.py +2 -0
- data/pulpcore/client/pulp_python/__init__.py +75 -0
- data/pulpcore/client/pulp_python/api/__init__.py +15 -0
- data/pulpcore/client/pulp_python/api/content_packages_api.py +626 -0
- data/pulpcore/client/pulp_python/api/distributions_pypi_api.py +830 -0
- data/pulpcore/client/pulp_python/api/publications_pypi_api.py +566 -0
- data/pulpcore/client/pulp_python/api/pypi_api.py +162 -0
- data/pulpcore/client/pulp_python/api/pypi_legacy_api.py +185 -0
- data/pulpcore/client/pulp_python/api/pypi_metadata_api.py +171 -0
- data/pulpcore/client/pulp_python/api/pypi_simple_api.py +434 -0
- data/pulpcore/client/pulp_python/api/remotes_python_api.py +972 -0
- data/pulpcore/client/pulp_python/api/repositories_python_api.py +1063 -0
- data/pulpcore/client/pulp_python/api/repositories_python_versions_api.py +614 -0
- data/pulpcore/client/pulp_python/api_client.py +667 -0
- data/pulpcore/client/pulp_python/configuration.py +427 -0
- data/pulpcore/client/pulp_python/exceptions.py +121 -0
- data/pulpcore/client/pulp_python/models/__init__.py +51 -0
- data/pulpcore/client/pulp_python/models/async_operation_response.py +124 -0
- data/pulpcore/client/pulp_python/models/content_summary.py +176 -0
- data/pulpcore/client/pulp_python/models/content_summary_response.py +176 -0
- data/pulpcore/client/pulp_python/models/exclude_platforms_enum.py +103 -0
- data/pulpcore/client/pulp_python/models/package_metadata_response.py +209 -0
- data/pulpcore/client/pulp_python/models/package_types_enum.py +107 -0
- data/pulpcore/client/pulp_python/models/package_upload.py +187 -0
- data/pulpcore/client/pulp_python/models/package_upload_task_response.py +176 -0
- data/pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +286 -0
- data/pulpcore/client/pulp_python/models/patchedpython_python_remote.py +823 -0
- data/pulpcore/client/pulp_python/models/patchedpython_python_repository.py +259 -0
- data/pulpcore/client/pulp_python/models/policy_enum.py +102 -0
- data/pulpcore/client/pulp_python/models/python_bander_remote.py +181 -0
- data/pulpcore/client/pulp_python/models/python_python_distribution.py +288 -0
- data/pulpcore/client/pulp_python/models/python_python_distribution_response.py +368 -0
- data/pulpcore/client/pulp_python/models/python_python_package_content.py +824 -0
- data/pulpcore/client/pulp_python/models/python_python_package_content_response.py +933 -0
- data/pulpcore/client/pulp_python/models/python_python_publication.py +149 -0
- data/pulpcore/client/pulp_python/models/python_python_publication_response.py +231 -0
- data/pulpcore/client/pulp_python/models/python_python_remote.py +825 -0
- data/pulpcore/client/pulp_python/models/python_python_remote_response.py +772 -0
- data/pulpcore/client/pulp_python/models/python_python_repository.py +260 -0
- data/pulpcore/client/pulp_python/models/python_python_repository_response.py +366 -0
- data/pulpcore/client/pulp_python/models/repository_add_remove_content.py +179 -0
- data/pulpcore/client/pulp_python/models/repository_sync_url.py +151 -0
- data/pulpcore/client/pulp_python/models/repository_version.py +123 -0
- data/pulpcore/client/pulp_python/models/repository_version_response.py +257 -0
- data/pulpcore/client/pulp_python/models/summary_response.py +182 -0
- data/pulpcore/client/pulp_python/rest.py +292 -0
- data/requirements.txt +6 -0
- data/setup.cfg +2 -0
- data/setup.py +42 -0
- data/spec/api/content_packages_api_spec.rb +3 -0
- data/spec/api/distributions_pypi_api_spec.rb +2 -2
- data/spec/api/publications_pypi_api_spec.rb +1 -1
- data/spec/api/pypi_api_spec.rb +49 -0
- data/spec/api/pypi_legacy_api_spec.rb +50 -0
- data/spec/api/pypi_metadata_api_spec.rb +50 -0
- data/spec/api/pypi_simple_api_spec.rb +79 -0
- data/spec/api/remotes_python_api_spec.rb +2 -2
- data/spec/api/repositories_python_api_spec.rb +4 -4
- data/spec/models/package_metadata_response_spec.rb +59 -0
- data/spec/models/package_upload_spec.rb +53 -0
- data/spec/models/package_upload_task_response_spec.rb +53 -0
- data/spec/models/patchedpython_python_distribution_spec.rb +6 -0
- data/spec/models/python_python_distribution_response_spec.rb +6 -0
- data/spec/models/python_python_distribution_spec.rb +6 -0
- data/spec/models/python_python_package_content_response_spec.rb +12 -0
- data/spec/models/python_python_package_content_spec.rb +18 -0
- data/spec/models/summary_response_spec.rb +53 -0
- data/test/__init__.py +0 -0
- data/test/test_async_operation_response.py +54 -0
- data/test/test_content_packages_api.py +55 -0
- data/test/test_content_summary.py +70 -0
- data/test/test_content_summary_response.py +70 -0
- data/test/test_distributions_pypi_api.py +76 -0
- data/test/test_exclude_platforms_enum.py +52 -0
- data/test/test_package_metadata_response.py +60 -0
- data/test/test_package_types_enum.py +52 -0
- data/test/test_package_upload.py +57 -0
- data/test/test_package_upload_task_response.py +58 -0
- data/test/test_paginated_repository_version_response_list.py +64 -0
- data/test/test_paginatedpython_python_distribution_response_list.py +68 -0
- data/test/test_paginatedpython_python_package_content_response_list.py +88 -0
- data/test/test_paginatedpython_python_publication_response_list.py +65 -0
- data/test/test_paginatedpython_python_remote_response_list.py +88 -0
- data/test/test_paginatedpython_python_repository_response_list.py +68 -0
- data/test/test_patchedpython_python_distribution.py +59 -0
- data/test/test_patchedpython_python_remote.py +84 -0
- data/test/test_patchedpython_python_repository.py +58 -0
- data/test/test_policy_enum.py +52 -0
- data/test/test_publications_pypi_api.py +62 -0
- data/test/test_pypi_api.py +41 -0
- data/test/test_pypi_legacy_api.py +41 -0
- data/test/test_pypi_metadata_api.py +41 -0
- data/test/test_pypi_simple_api.py +55 -0
- data/test/test_python_bander_remote.py +57 -0
- data/test/test_python_python_distribution.py +61 -0
- data/test/test_python_python_distribution_response.py +64 -0
- data/test/test_python_python_package_content.py +79 -0
- data/test/test_python_python_package_content_response.py +82 -0
- data/test/test_python_python_publication.py +54 -0
- data/test/test_python_python_publication_response.py +59 -0
- data/test/test_python_python_remote.py +86 -0
- data/test/test_python_python_remote_response.py +84 -0
- data/test/test_python_python_repository.py +59 -0
- data/test/test_python_python_repository_response.py +63 -0
- data/test/test_remotes_python_api.py +83 -0
- data/test/test_repositories_python_api.py +90 -0
- data/test/test_repositories_python_versions_api.py +61 -0
- data/test/test_repository_add_remove_content.py +59 -0
- data/test/test_repository_sync_url.py +54 -0
- data/test/test_repository_version.py +53 -0
- data/test/test_repository_version_response.py +58 -0
- data/test/test_summary_response.py +58 -0
- data/test-requirements.txt +3 -0
- data/tox.ini +9 -0
- metadata +221 -26
@@ -0,0 +1,162 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pulp 3 API
|
5
|
+
|
6
|
+
Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
|
7
|
+
|
8
|
+
The version of the OpenAPI document: v3
|
9
|
+
Contact: pulp-list@redhat.com
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
"""
|
12
|
+
|
13
|
+
|
14
|
+
from __future__ import absolute_import
|
15
|
+
|
16
|
+
import re # noqa: F401
|
17
|
+
|
18
|
+
# python 2 and python 3 compatibility library
|
19
|
+
import six
|
20
|
+
|
21
|
+
from pulpcore.client.pulp_python.api_client import ApiClient
|
22
|
+
from pulpcore.client.pulp_python.exceptions import ( # noqa: F401
|
23
|
+
ApiTypeError,
|
24
|
+
ApiValueError
|
25
|
+
)
|
26
|
+
|
27
|
+
|
28
|
+
class PypiApi(object):
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
30
|
+
Ref: https://openapi-generator.tech
|
31
|
+
|
32
|
+
Do not edit the class manually.
|
33
|
+
"""
|
34
|
+
|
35
|
+
def __init__(self, api_client=None):
|
36
|
+
if api_client is None:
|
37
|
+
api_client = ApiClient()
|
38
|
+
self.api_client = api_client
|
39
|
+
|
40
|
+
def read(self, path, **kwargs): # noqa: E501
|
41
|
+
"""Get index summary # noqa: E501
|
42
|
+
|
43
|
+
Gets package summary stats of index. # noqa: E501
|
44
|
+
This method makes a synchronous HTTP request by default. To make an
|
45
|
+
asynchronous HTTP request, please pass async_req=True
|
46
|
+
>>> thread = api.read(path, async_req=True)
|
47
|
+
>>> result = thread.get()
|
48
|
+
|
49
|
+
:param async_req bool: execute request asynchronously
|
50
|
+
:param str path: (required)
|
51
|
+
:param str fields: A list of fields to include in the response.
|
52
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
53
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
54
|
+
be returned without reading/decoding response
|
55
|
+
data. Default is True.
|
56
|
+
:param _request_timeout: timeout setting for this request. If one
|
57
|
+
number provided, it will be total request
|
58
|
+
timeout. It can also be a pair (tuple) of
|
59
|
+
(connection, read) timeouts.
|
60
|
+
:return: SummaryResponse
|
61
|
+
If the method is called asynchronously,
|
62
|
+
returns the request thread.
|
63
|
+
"""
|
64
|
+
kwargs['_return_http_data_only'] = True
|
65
|
+
return self.read_with_http_info(path, **kwargs) # noqa: E501
|
66
|
+
|
67
|
+
def read_with_http_info(self, path, **kwargs): # noqa: E501
|
68
|
+
"""Get index summary # noqa: E501
|
69
|
+
|
70
|
+
Gets package summary stats of index. # noqa: E501
|
71
|
+
This method makes a synchronous HTTP request by default. To make an
|
72
|
+
asynchronous HTTP request, please pass async_req=True
|
73
|
+
>>> thread = api.read_with_http_info(path, async_req=True)
|
74
|
+
>>> result = thread.get()
|
75
|
+
|
76
|
+
:param async_req bool: execute request asynchronously
|
77
|
+
:param str path: (required)
|
78
|
+
:param str fields: A list of fields to include in the response.
|
79
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
80
|
+
:param _return_http_data_only: response data without head status code
|
81
|
+
and headers
|
82
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
83
|
+
be returned without reading/decoding response
|
84
|
+
data. Default is True.
|
85
|
+
:param _request_timeout: timeout setting for this request. If one
|
86
|
+
number provided, it will be total request
|
87
|
+
timeout. It can also be a pair (tuple) of
|
88
|
+
(connection, read) timeouts.
|
89
|
+
:return: tuple(SummaryResponse, status_code(int), headers(HTTPHeaderDict))
|
90
|
+
If the method is called asynchronously,
|
91
|
+
returns the request thread.
|
92
|
+
"""
|
93
|
+
|
94
|
+
local_var_params = locals()
|
95
|
+
|
96
|
+
all_params = [
|
97
|
+
'path',
|
98
|
+
'fields',
|
99
|
+
'exclude_fields'
|
100
|
+
]
|
101
|
+
all_params.extend(
|
102
|
+
[
|
103
|
+
'async_req',
|
104
|
+
'_return_http_data_only',
|
105
|
+
'_preload_content',
|
106
|
+
'_request_timeout'
|
107
|
+
]
|
108
|
+
)
|
109
|
+
|
110
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
111
|
+
if key not in all_params:
|
112
|
+
raise ApiTypeError(
|
113
|
+
"Got an unexpected keyword argument '%s'"
|
114
|
+
" to method read" % key
|
115
|
+
)
|
116
|
+
local_var_params[key] = val
|
117
|
+
del local_var_params['kwargs']
|
118
|
+
# verify the required parameter 'path' is set
|
119
|
+
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
120
|
+
local_var_params['path'] is None): # noqa: E501
|
121
|
+
raise ApiValueError("Missing the required parameter `path` when calling `read`") # noqa: E501
|
122
|
+
|
123
|
+
collection_formats = {}
|
124
|
+
|
125
|
+
path_params = {}
|
126
|
+
if 'path' in local_var_params:
|
127
|
+
path_params['path'] = local_var_params['path'] # noqa: E501
|
128
|
+
|
129
|
+
query_params = []
|
130
|
+
if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
|
131
|
+
query_params.append(('fields', local_var_params['fields'])) # noqa: E501
|
132
|
+
if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
|
133
|
+
query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
|
134
|
+
|
135
|
+
header_params = {}
|
136
|
+
|
137
|
+
form_params = []
|
138
|
+
local_var_files = {}
|
139
|
+
|
140
|
+
body_params = None
|
141
|
+
# HTTP header `Accept`
|
142
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
143
|
+
['application/json']) # noqa: E501
|
144
|
+
|
145
|
+
# Authentication setting
|
146
|
+
auth_settings = [] # noqa: E501
|
147
|
+
|
148
|
+
return self.api_client.call_api(
|
149
|
+
'/pypi/{path}/', 'GET',
|
150
|
+
path_params,
|
151
|
+
query_params,
|
152
|
+
header_params,
|
153
|
+
body=body_params,
|
154
|
+
post_params=form_params,
|
155
|
+
files=local_var_files,
|
156
|
+
response_type='SummaryResponse', # noqa: E501
|
157
|
+
auth_settings=auth_settings,
|
158
|
+
async_req=local_var_params.get('async_req'),
|
159
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
160
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
161
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
162
|
+
collection_formats=collection_formats)
|
@@ -0,0 +1,185 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pulp 3 API
|
5
|
+
|
6
|
+
Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
|
7
|
+
|
8
|
+
The version of the OpenAPI document: v3
|
9
|
+
Contact: pulp-list@redhat.com
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
"""
|
12
|
+
|
13
|
+
|
14
|
+
from __future__ import absolute_import
|
15
|
+
|
16
|
+
import re # noqa: F401
|
17
|
+
|
18
|
+
# python 2 and python 3 compatibility library
|
19
|
+
import six
|
20
|
+
|
21
|
+
from pulpcore.client.pulp_python.api_client import ApiClient
|
22
|
+
from pulpcore.client.pulp_python.exceptions import ( # noqa: F401
|
23
|
+
ApiTypeError,
|
24
|
+
ApiValueError
|
25
|
+
)
|
26
|
+
|
27
|
+
|
28
|
+
class PypiLegacyApi(object):
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
30
|
+
Ref: https://openapi-generator.tech
|
31
|
+
|
32
|
+
Do not edit the class manually.
|
33
|
+
"""
|
34
|
+
|
35
|
+
def __init__(self, api_client=None):
|
36
|
+
if api_client is None:
|
37
|
+
api_client = ApiClient()
|
38
|
+
self.api_client = api_client
|
39
|
+
|
40
|
+
def create(self, path, content, sha256_digest, **kwargs): # noqa: E501
|
41
|
+
"""Upload a package # noqa: E501
|
42
|
+
|
43
|
+
Upload package to the index. This is the endpoint that tools like Twine and Poetry use for their upload commands. # noqa: E501
|
44
|
+
This method makes a synchronous HTTP request by default. To make an
|
45
|
+
asynchronous HTTP request, please pass async_req=True
|
46
|
+
>>> thread = api.create(path, content, sha256_digest, async_req=True)
|
47
|
+
>>> result = thread.get()
|
48
|
+
|
49
|
+
:param async_req bool: execute request asynchronously
|
50
|
+
:param str path: (required)
|
51
|
+
:param file content: A Python package release file to upload to the index. (required)
|
52
|
+
:param str sha256_digest: SHA256 of package to validate upload integrity. (required)
|
53
|
+
:param str action: Defaults to `file_upload`, don't change it or request will fail!
|
54
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
55
|
+
be returned without reading/decoding response
|
56
|
+
data. Default is True.
|
57
|
+
:param _request_timeout: timeout setting for this request. If one
|
58
|
+
number provided, it will be total request
|
59
|
+
timeout. It can also be a pair (tuple) of
|
60
|
+
(connection, read) timeouts.
|
61
|
+
:return: PackageUploadTaskResponse
|
62
|
+
If the method is called asynchronously,
|
63
|
+
returns the request thread.
|
64
|
+
"""
|
65
|
+
kwargs['_return_http_data_only'] = True
|
66
|
+
return self.create_with_http_info(path, content, sha256_digest, **kwargs) # noqa: E501
|
67
|
+
|
68
|
+
def create_with_http_info(self, path, content, sha256_digest, **kwargs): # noqa: E501
|
69
|
+
"""Upload a package # noqa: E501
|
70
|
+
|
71
|
+
Upload package to the index. This is the endpoint that tools like Twine and Poetry use for their upload commands. # noqa: E501
|
72
|
+
This method makes a synchronous HTTP request by default. To make an
|
73
|
+
asynchronous HTTP request, please pass async_req=True
|
74
|
+
>>> thread = api.create_with_http_info(path, content, sha256_digest, async_req=True)
|
75
|
+
>>> result = thread.get()
|
76
|
+
|
77
|
+
:param async_req bool: execute request asynchronously
|
78
|
+
:param str path: (required)
|
79
|
+
:param file content: A Python package release file to upload to the index. (required)
|
80
|
+
:param str sha256_digest: SHA256 of package to validate upload integrity. (required)
|
81
|
+
:param str action: Defaults to `file_upload`, don't change it or request will fail!
|
82
|
+
:param _return_http_data_only: response data without head status code
|
83
|
+
and headers
|
84
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
85
|
+
be returned without reading/decoding response
|
86
|
+
data. Default is True.
|
87
|
+
:param _request_timeout: timeout setting for this request. If one
|
88
|
+
number provided, it will be total request
|
89
|
+
timeout. It can also be a pair (tuple) of
|
90
|
+
(connection, read) timeouts.
|
91
|
+
:return: tuple(PackageUploadTaskResponse, status_code(int), headers(HTTPHeaderDict))
|
92
|
+
If the method is called asynchronously,
|
93
|
+
returns the request thread.
|
94
|
+
"""
|
95
|
+
|
96
|
+
local_var_params = locals()
|
97
|
+
|
98
|
+
all_params = [
|
99
|
+
'path',
|
100
|
+
'content',
|
101
|
+
'sha256_digest',
|
102
|
+
'action'
|
103
|
+
]
|
104
|
+
all_params.extend(
|
105
|
+
[
|
106
|
+
'async_req',
|
107
|
+
'_return_http_data_only',
|
108
|
+
'_preload_content',
|
109
|
+
'_request_timeout'
|
110
|
+
]
|
111
|
+
)
|
112
|
+
|
113
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
114
|
+
if key not in all_params:
|
115
|
+
raise ApiTypeError(
|
116
|
+
"Got an unexpected keyword argument '%s'"
|
117
|
+
" to method create" % key
|
118
|
+
)
|
119
|
+
local_var_params[key] = val
|
120
|
+
del local_var_params['kwargs']
|
121
|
+
# verify the required parameter 'path' is set
|
122
|
+
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
123
|
+
local_var_params['path'] is None): # noqa: E501
|
124
|
+
raise ApiValueError("Missing the required parameter `path` when calling `create`") # noqa: E501
|
125
|
+
# verify the required parameter 'content' is set
|
126
|
+
if self.api_client.client_side_validation and ('content' not in local_var_params or # noqa: E501
|
127
|
+
local_var_params['content'] is None): # noqa: E501
|
128
|
+
raise ApiValueError("Missing the required parameter `content` when calling `create`") # noqa: E501
|
129
|
+
# verify the required parameter 'sha256_digest' is set
|
130
|
+
if self.api_client.client_side_validation and ('sha256_digest' not in local_var_params or # noqa: E501
|
131
|
+
local_var_params['sha256_digest'] is None): # noqa: E501
|
132
|
+
raise ApiValueError("Missing the required parameter `sha256_digest` when calling `create`") # noqa: E501
|
133
|
+
|
134
|
+
if self.api_client.client_side_validation and ('sha256_digest' in local_var_params and # noqa: E501
|
135
|
+
len(local_var_params['sha256_digest']) > 64): # noqa: E501
|
136
|
+
raise ApiValueError("Invalid value for parameter `sha256_digest` when calling `create`, length must be less than or equal to `64`") # noqa: E501
|
137
|
+
if self.api_client.client_side_validation and ('sha256_digest' in local_var_params and # noqa: E501
|
138
|
+
len(local_var_params['sha256_digest']) < 64): # noqa: E501
|
139
|
+
raise ApiValueError("Invalid value for parameter `sha256_digest` when calling `create`, length must be greater than or equal to `64`") # noqa: E501
|
140
|
+
collection_formats = {}
|
141
|
+
|
142
|
+
path_params = {}
|
143
|
+
if 'path' in local_var_params:
|
144
|
+
path_params['path'] = local_var_params['path'] # noqa: E501
|
145
|
+
|
146
|
+
query_params = []
|
147
|
+
|
148
|
+
header_params = {}
|
149
|
+
|
150
|
+
form_params = []
|
151
|
+
local_var_files = {}
|
152
|
+
if 'content' in local_var_params:
|
153
|
+
local_var_files['content'] = local_var_params['content'] # noqa: E501
|
154
|
+
if 'action' in local_var_params:
|
155
|
+
form_params.append(('action', local_var_params['action'])) # noqa: E501
|
156
|
+
if 'sha256_digest' in local_var_params:
|
157
|
+
form_params.append(('sha256_digest', local_var_params['sha256_digest'])) # noqa: E501
|
158
|
+
|
159
|
+
body_params = None
|
160
|
+
# HTTP header `Accept`
|
161
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
162
|
+
['application/json']) # noqa: E501
|
163
|
+
|
164
|
+
# HTTP header `Content-Type`
|
165
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
166
|
+
['multipart/form-data', 'application/x-www-form-urlencoded']) # noqa: E501
|
167
|
+
|
168
|
+
# Authentication setting
|
169
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
170
|
+
|
171
|
+
return self.api_client.call_api(
|
172
|
+
'/pypi/{path}/legacy/', 'POST',
|
173
|
+
path_params,
|
174
|
+
query_params,
|
175
|
+
header_params,
|
176
|
+
body=body_params,
|
177
|
+
post_params=form_params,
|
178
|
+
files=local_var_files,
|
179
|
+
response_type='PackageUploadTaskResponse', # noqa: E501
|
180
|
+
auth_settings=auth_settings,
|
181
|
+
async_req=local_var_params.get('async_req'),
|
182
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
183
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
184
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
185
|
+
collection_formats=collection_formats)
|
@@ -0,0 +1,171 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pulp 3 API
|
5
|
+
|
6
|
+
Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
|
7
|
+
|
8
|
+
The version of the OpenAPI document: v3
|
9
|
+
Contact: pulp-list@redhat.com
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
"""
|
12
|
+
|
13
|
+
|
14
|
+
from __future__ import absolute_import
|
15
|
+
|
16
|
+
import re # noqa: F401
|
17
|
+
|
18
|
+
# python 2 and python 3 compatibility library
|
19
|
+
import six
|
20
|
+
|
21
|
+
from pulpcore.client.pulp_python.api_client import ApiClient
|
22
|
+
from pulpcore.client.pulp_python.exceptions import ( # noqa: F401
|
23
|
+
ApiTypeError,
|
24
|
+
ApiValueError
|
25
|
+
)
|
26
|
+
|
27
|
+
|
28
|
+
class PypiMetadataApi(object):
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
30
|
+
Ref: https://openapi-generator.tech
|
31
|
+
|
32
|
+
Do not edit the class manually.
|
33
|
+
"""
|
34
|
+
|
35
|
+
def __init__(self, api_client=None):
|
36
|
+
if api_client is None:
|
37
|
+
api_client = ApiClient()
|
38
|
+
self.api_client = api_client
|
39
|
+
|
40
|
+
def read(self, meta, path, **kwargs): # noqa: E501
|
41
|
+
"""Get package metadata # noqa: E501
|
42
|
+
|
43
|
+
Retrieves the package's core-metadata specified by https://packaging.python.org/specifications/core-metadata/. `meta` must be a path in form of `{package}/json/` or `{package}/{version}/json/` # noqa: E501
|
44
|
+
This method makes a synchronous HTTP request by default. To make an
|
45
|
+
asynchronous HTTP request, please pass async_req=True
|
46
|
+
>>> thread = api.read(meta, path, async_req=True)
|
47
|
+
>>> result = thread.get()
|
48
|
+
|
49
|
+
:param async_req bool: execute request asynchronously
|
50
|
+
:param str meta: (required)
|
51
|
+
:param str path: (required)
|
52
|
+
:param str fields: A list of fields to include in the response.
|
53
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
54
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
55
|
+
be returned without reading/decoding response
|
56
|
+
data. Default is True.
|
57
|
+
:param _request_timeout: timeout setting for this request. If one
|
58
|
+
number provided, it will be total request
|
59
|
+
timeout. It can also be a pair (tuple) of
|
60
|
+
(connection, read) timeouts.
|
61
|
+
:return: PackageMetadataResponse
|
62
|
+
If the method is called asynchronously,
|
63
|
+
returns the request thread.
|
64
|
+
"""
|
65
|
+
kwargs['_return_http_data_only'] = True
|
66
|
+
return self.read_with_http_info(meta, path, **kwargs) # noqa: E501
|
67
|
+
|
68
|
+
def read_with_http_info(self, meta, path, **kwargs): # noqa: E501
|
69
|
+
"""Get package metadata # noqa: E501
|
70
|
+
|
71
|
+
Retrieves the package's core-metadata specified by https://packaging.python.org/specifications/core-metadata/. `meta` must be a path in form of `{package}/json/` or `{package}/{version}/json/` # noqa: E501
|
72
|
+
This method makes a synchronous HTTP request by default. To make an
|
73
|
+
asynchronous HTTP request, please pass async_req=True
|
74
|
+
>>> thread = api.read_with_http_info(meta, path, async_req=True)
|
75
|
+
>>> result = thread.get()
|
76
|
+
|
77
|
+
:param async_req bool: execute request asynchronously
|
78
|
+
:param str meta: (required)
|
79
|
+
:param str path: (required)
|
80
|
+
:param str fields: A list of fields to include in the response.
|
81
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
82
|
+
:param _return_http_data_only: response data without head status code
|
83
|
+
and headers
|
84
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
85
|
+
be returned without reading/decoding response
|
86
|
+
data. Default is True.
|
87
|
+
:param _request_timeout: timeout setting for this request. If one
|
88
|
+
number provided, it will be total request
|
89
|
+
timeout. It can also be a pair (tuple) of
|
90
|
+
(connection, read) timeouts.
|
91
|
+
:return: tuple(PackageMetadataResponse, status_code(int), headers(HTTPHeaderDict))
|
92
|
+
If the method is called asynchronously,
|
93
|
+
returns the request thread.
|
94
|
+
"""
|
95
|
+
|
96
|
+
local_var_params = locals()
|
97
|
+
|
98
|
+
all_params = [
|
99
|
+
'meta',
|
100
|
+
'path',
|
101
|
+
'fields',
|
102
|
+
'exclude_fields'
|
103
|
+
]
|
104
|
+
all_params.extend(
|
105
|
+
[
|
106
|
+
'async_req',
|
107
|
+
'_return_http_data_only',
|
108
|
+
'_preload_content',
|
109
|
+
'_request_timeout'
|
110
|
+
]
|
111
|
+
)
|
112
|
+
|
113
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
114
|
+
if key not in all_params:
|
115
|
+
raise ApiTypeError(
|
116
|
+
"Got an unexpected keyword argument '%s'"
|
117
|
+
" to method read" % key
|
118
|
+
)
|
119
|
+
local_var_params[key] = val
|
120
|
+
del local_var_params['kwargs']
|
121
|
+
# verify the required parameter 'meta' is set
|
122
|
+
if self.api_client.client_side_validation and ('meta' not in local_var_params or # noqa: E501
|
123
|
+
local_var_params['meta'] is None): # noqa: E501
|
124
|
+
raise ApiValueError("Missing the required parameter `meta` when calling `read`") # noqa: E501
|
125
|
+
# verify the required parameter 'path' is set
|
126
|
+
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
127
|
+
local_var_params['path'] is None): # noqa: E501
|
128
|
+
raise ApiValueError("Missing the required parameter `path` when calling `read`") # noqa: E501
|
129
|
+
|
130
|
+
collection_formats = {}
|
131
|
+
|
132
|
+
path_params = {}
|
133
|
+
if 'meta' in local_var_params:
|
134
|
+
path_params['meta'] = local_var_params['meta'] # noqa: E501
|
135
|
+
if 'path' in local_var_params:
|
136
|
+
path_params['path'] = local_var_params['path'] # noqa: E501
|
137
|
+
|
138
|
+
query_params = []
|
139
|
+
if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
|
140
|
+
query_params.append(('fields', local_var_params['fields'])) # noqa: E501
|
141
|
+
if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
|
142
|
+
query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
|
143
|
+
|
144
|
+
header_params = {}
|
145
|
+
|
146
|
+
form_params = []
|
147
|
+
local_var_files = {}
|
148
|
+
|
149
|
+
body_params = None
|
150
|
+
# HTTP header `Accept`
|
151
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
152
|
+
['application/json']) # noqa: E501
|
153
|
+
|
154
|
+
# Authentication setting
|
155
|
+
auth_settings = [] # noqa: E501
|
156
|
+
|
157
|
+
return self.api_client.call_api(
|
158
|
+
'/pypi/{path}/pypi/{meta}/', 'GET',
|
159
|
+
path_params,
|
160
|
+
query_params,
|
161
|
+
header_params,
|
162
|
+
body=body_params,
|
163
|
+
post_params=form_params,
|
164
|
+
files=local_var_files,
|
165
|
+
response_type='PackageMetadataResponse', # noqa: E501
|
166
|
+
auth_settings=auth_settings,
|
167
|
+
async_req=local_var_params.get('async_req'),
|
168
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
169
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
170
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
171
|
+
collection_formats=collection_formats)
|