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,972 @@
|
|
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 RemotesPythonApi(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, python_python_remote, **kwargs): # noqa: E501
|
41
|
+
"""Create a python remote # noqa: E501
|
42
|
+
|
43
|
+
Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # 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(python_python_remote, async_req=True)
|
47
|
+
>>> result = thread.get()
|
48
|
+
|
49
|
+
:param async_req bool: execute request asynchronously
|
50
|
+
:param PythonPythonRemote python_python_remote: (required)
|
51
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
52
|
+
be returned without reading/decoding response
|
53
|
+
data. Default is True.
|
54
|
+
:param _request_timeout: timeout setting for this request. If one
|
55
|
+
number provided, it will be total request
|
56
|
+
timeout. It can also be a pair (tuple) of
|
57
|
+
(connection, read) timeouts.
|
58
|
+
:return: PythonPythonRemoteResponse
|
59
|
+
If the method is called asynchronously,
|
60
|
+
returns the request thread.
|
61
|
+
"""
|
62
|
+
kwargs['_return_http_data_only'] = True
|
63
|
+
return self.create_with_http_info(python_python_remote, **kwargs) # noqa: E501
|
64
|
+
|
65
|
+
def create_with_http_info(self, python_python_remote, **kwargs): # noqa: E501
|
66
|
+
"""Create a python remote # noqa: E501
|
67
|
+
|
68
|
+
Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
|
69
|
+
This method makes a synchronous HTTP request by default. To make an
|
70
|
+
asynchronous HTTP request, please pass async_req=True
|
71
|
+
>>> thread = api.create_with_http_info(python_python_remote, async_req=True)
|
72
|
+
>>> result = thread.get()
|
73
|
+
|
74
|
+
:param async_req bool: execute request asynchronously
|
75
|
+
:param PythonPythonRemote python_python_remote: (required)
|
76
|
+
:param _return_http_data_only: response data without head status code
|
77
|
+
and headers
|
78
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
79
|
+
be returned without reading/decoding response
|
80
|
+
data. Default is True.
|
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
|
+
:return: tuple(PythonPythonRemoteResponse, status_code(int), headers(HTTPHeaderDict))
|
86
|
+
If the method is called asynchronously,
|
87
|
+
returns the request thread.
|
88
|
+
"""
|
89
|
+
|
90
|
+
local_var_params = locals()
|
91
|
+
|
92
|
+
all_params = [
|
93
|
+
'python_python_remote'
|
94
|
+
]
|
95
|
+
all_params.extend(
|
96
|
+
[
|
97
|
+
'async_req',
|
98
|
+
'_return_http_data_only',
|
99
|
+
'_preload_content',
|
100
|
+
'_request_timeout'
|
101
|
+
]
|
102
|
+
)
|
103
|
+
|
104
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
105
|
+
if key not in all_params:
|
106
|
+
raise ApiTypeError(
|
107
|
+
"Got an unexpected keyword argument '%s'"
|
108
|
+
" to method create" % key
|
109
|
+
)
|
110
|
+
local_var_params[key] = val
|
111
|
+
del local_var_params['kwargs']
|
112
|
+
# verify the required parameter 'python_python_remote' is set
|
113
|
+
if self.api_client.client_side_validation and ('python_python_remote' not in local_var_params or # noqa: E501
|
114
|
+
local_var_params['python_python_remote'] is None): # noqa: E501
|
115
|
+
raise ApiValueError("Missing the required parameter `python_python_remote` when calling `create`") # noqa: E501
|
116
|
+
|
117
|
+
collection_formats = {}
|
118
|
+
|
119
|
+
path_params = {}
|
120
|
+
|
121
|
+
query_params = []
|
122
|
+
|
123
|
+
header_params = {}
|
124
|
+
|
125
|
+
form_params = []
|
126
|
+
local_var_files = {}
|
127
|
+
|
128
|
+
body_params = None
|
129
|
+
if 'python_python_remote' in local_var_params:
|
130
|
+
body_params = local_var_params['python_python_remote']
|
131
|
+
# HTTP header `Accept`
|
132
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
133
|
+
['application/json']) # noqa: E501
|
134
|
+
|
135
|
+
# HTTP header `Content-Type`
|
136
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
137
|
+
['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # noqa: E501
|
138
|
+
|
139
|
+
# Authentication setting
|
140
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
141
|
+
|
142
|
+
return self.api_client.call_api(
|
143
|
+
'/pulp/api/v3/remotes/python/python/', 'POST',
|
144
|
+
path_params,
|
145
|
+
query_params,
|
146
|
+
header_params,
|
147
|
+
body=body_params,
|
148
|
+
post_params=form_params,
|
149
|
+
files=local_var_files,
|
150
|
+
response_type='PythonPythonRemoteResponse', # noqa: E501
|
151
|
+
auth_settings=auth_settings,
|
152
|
+
async_req=local_var_params.get('async_req'),
|
153
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
154
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
155
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
156
|
+
collection_formats=collection_formats)
|
157
|
+
|
158
|
+
def delete(self, python_python_remote_href, **kwargs): # noqa: E501
|
159
|
+
"""Delete a python remote # noqa: E501
|
160
|
+
|
161
|
+
Trigger an asynchronous delete task # noqa: E501
|
162
|
+
This method makes a synchronous HTTP request by default. To make an
|
163
|
+
asynchronous HTTP request, please pass async_req=True
|
164
|
+
>>> thread = api.delete(python_python_remote_href, async_req=True)
|
165
|
+
>>> result = thread.get()
|
166
|
+
|
167
|
+
:param async_req bool: execute request asynchronously
|
168
|
+
:param str python_python_remote_href: (required)
|
169
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
170
|
+
be returned without reading/decoding response
|
171
|
+
data. Default is True.
|
172
|
+
:param _request_timeout: timeout setting for this request. If one
|
173
|
+
number provided, it will be total request
|
174
|
+
timeout. It can also be a pair (tuple) of
|
175
|
+
(connection, read) timeouts.
|
176
|
+
:return: AsyncOperationResponse
|
177
|
+
If the method is called asynchronously,
|
178
|
+
returns the request thread.
|
179
|
+
"""
|
180
|
+
kwargs['_return_http_data_only'] = True
|
181
|
+
return self.delete_with_http_info(python_python_remote_href, **kwargs) # noqa: E501
|
182
|
+
|
183
|
+
def delete_with_http_info(self, python_python_remote_href, **kwargs): # noqa: E501
|
184
|
+
"""Delete a python remote # noqa: E501
|
185
|
+
|
186
|
+
Trigger an asynchronous delete task # noqa: E501
|
187
|
+
This method makes a synchronous HTTP request by default. To make an
|
188
|
+
asynchronous HTTP request, please pass async_req=True
|
189
|
+
>>> thread = api.delete_with_http_info(python_python_remote_href, async_req=True)
|
190
|
+
>>> result = thread.get()
|
191
|
+
|
192
|
+
:param async_req bool: execute request asynchronously
|
193
|
+
:param str python_python_remote_href: (required)
|
194
|
+
:param _return_http_data_only: response data without head status code
|
195
|
+
and headers
|
196
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
197
|
+
be returned without reading/decoding response
|
198
|
+
data. Default is True.
|
199
|
+
:param _request_timeout: timeout setting for this request. If one
|
200
|
+
number provided, it will be total request
|
201
|
+
timeout. It can also be a pair (tuple) of
|
202
|
+
(connection, read) timeouts.
|
203
|
+
:return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
|
204
|
+
If the method is called asynchronously,
|
205
|
+
returns the request thread.
|
206
|
+
"""
|
207
|
+
|
208
|
+
local_var_params = locals()
|
209
|
+
|
210
|
+
all_params = [
|
211
|
+
'python_python_remote_href'
|
212
|
+
]
|
213
|
+
all_params.extend(
|
214
|
+
[
|
215
|
+
'async_req',
|
216
|
+
'_return_http_data_only',
|
217
|
+
'_preload_content',
|
218
|
+
'_request_timeout'
|
219
|
+
]
|
220
|
+
)
|
221
|
+
|
222
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
223
|
+
if key not in all_params:
|
224
|
+
raise ApiTypeError(
|
225
|
+
"Got an unexpected keyword argument '%s'"
|
226
|
+
" to method delete" % key
|
227
|
+
)
|
228
|
+
local_var_params[key] = val
|
229
|
+
del local_var_params['kwargs']
|
230
|
+
# verify the required parameter 'python_python_remote_href' is set
|
231
|
+
if self.api_client.client_side_validation and ('python_python_remote_href' not in local_var_params or # noqa: E501
|
232
|
+
local_var_params['python_python_remote_href'] is None): # noqa: E501
|
233
|
+
raise ApiValueError("Missing the required parameter `python_python_remote_href` when calling `delete`") # noqa: E501
|
234
|
+
|
235
|
+
collection_formats = {}
|
236
|
+
|
237
|
+
path_params = {}
|
238
|
+
if 'python_python_remote_href' in local_var_params:
|
239
|
+
path_params['python_python_remote_href'] = local_var_params['python_python_remote_href'] # noqa: E501
|
240
|
+
|
241
|
+
query_params = []
|
242
|
+
|
243
|
+
header_params = {}
|
244
|
+
|
245
|
+
form_params = []
|
246
|
+
local_var_files = {}
|
247
|
+
|
248
|
+
body_params = None
|
249
|
+
# HTTP header `Accept`
|
250
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
251
|
+
['application/json']) # noqa: E501
|
252
|
+
|
253
|
+
# Authentication setting
|
254
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
255
|
+
|
256
|
+
return self.api_client.call_api(
|
257
|
+
'{python_python_remote_href}', 'DELETE',
|
258
|
+
path_params,
|
259
|
+
query_params,
|
260
|
+
header_params,
|
261
|
+
body=body_params,
|
262
|
+
post_params=form_params,
|
263
|
+
files=local_var_files,
|
264
|
+
response_type='AsyncOperationResponse', # noqa: E501
|
265
|
+
auth_settings=auth_settings,
|
266
|
+
async_req=local_var_params.get('async_req'),
|
267
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
268
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
269
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
270
|
+
collection_formats=collection_formats)
|
271
|
+
|
272
|
+
def from_bandersnatch(self, config, name, **kwargs): # noqa: E501
|
273
|
+
"""Create from Bandersnatch # noqa: E501
|
274
|
+
|
275
|
+
Takes the fields specified in the Bandersnatch config and creates a Python Remote from it. # noqa: E501
|
276
|
+
This method makes a synchronous HTTP request by default. To make an
|
277
|
+
asynchronous HTTP request, please pass async_req=True
|
278
|
+
>>> thread = api.from_bandersnatch(config, name, async_req=True)
|
279
|
+
>>> result = thread.get()
|
280
|
+
|
281
|
+
:param async_req bool: execute request asynchronously
|
282
|
+
:param file config: A Bandersnatch config that may be used to construct a Python Remote. (required)
|
283
|
+
:param str name: A unique name for this remote (required)
|
284
|
+
:param PolicyEnum policy: The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' is the default.
|
285
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
286
|
+
be returned without reading/decoding response
|
287
|
+
data. Default is True.
|
288
|
+
:param _request_timeout: timeout setting for this request. If one
|
289
|
+
number provided, it will be total request
|
290
|
+
timeout. It can also be a pair (tuple) of
|
291
|
+
(connection, read) timeouts.
|
292
|
+
:return: PythonPythonRemoteResponse
|
293
|
+
If the method is called asynchronously,
|
294
|
+
returns the request thread.
|
295
|
+
"""
|
296
|
+
kwargs['_return_http_data_only'] = True
|
297
|
+
return self.from_bandersnatch_with_http_info(config, name, **kwargs) # noqa: E501
|
298
|
+
|
299
|
+
def from_bandersnatch_with_http_info(self, config, name, **kwargs): # noqa: E501
|
300
|
+
"""Create from Bandersnatch # noqa: E501
|
301
|
+
|
302
|
+
Takes the fields specified in the Bandersnatch config and creates a Python Remote from it. # noqa: E501
|
303
|
+
This method makes a synchronous HTTP request by default. To make an
|
304
|
+
asynchronous HTTP request, please pass async_req=True
|
305
|
+
>>> thread = api.from_bandersnatch_with_http_info(config, name, async_req=True)
|
306
|
+
>>> result = thread.get()
|
307
|
+
|
308
|
+
:param async_req bool: execute request asynchronously
|
309
|
+
:param file config: A Bandersnatch config that may be used to construct a Python Remote. (required)
|
310
|
+
:param str name: A unique name for this remote (required)
|
311
|
+
:param PolicyEnum policy: The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' is the default.
|
312
|
+
:param _return_http_data_only: response data without head status code
|
313
|
+
and headers
|
314
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
315
|
+
be returned without reading/decoding response
|
316
|
+
data. Default is True.
|
317
|
+
:param _request_timeout: timeout setting for this request. If one
|
318
|
+
number provided, it will be total request
|
319
|
+
timeout. It can also be a pair (tuple) of
|
320
|
+
(connection, read) timeouts.
|
321
|
+
:return: tuple(PythonPythonRemoteResponse, status_code(int), headers(HTTPHeaderDict))
|
322
|
+
If the method is called asynchronously,
|
323
|
+
returns the request thread.
|
324
|
+
"""
|
325
|
+
|
326
|
+
local_var_params = locals()
|
327
|
+
|
328
|
+
all_params = [
|
329
|
+
'config',
|
330
|
+
'name',
|
331
|
+
'policy'
|
332
|
+
]
|
333
|
+
all_params.extend(
|
334
|
+
[
|
335
|
+
'async_req',
|
336
|
+
'_return_http_data_only',
|
337
|
+
'_preload_content',
|
338
|
+
'_request_timeout'
|
339
|
+
]
|
340
|
+
)
|
341
|
+
|
342
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
343
|
+
if key not in all_params:
|
344
|
+
raise ApiTypeError(
|
345
|
+
"Got an unexpected keyword argument '%s'"
|
346
|
+
" to method from_bandersnatch" % key
|
347
|
+
)
|
348
|
+
local_var_params[key] = val
|
349
|
+
del local_var_params['kwargs']
|
350
|
+
# verify the required parameter 'config' is set
|
351
|
+
if self.api_client.client_side_validation and ('config' not in local_var_params or # noqa: E501
|
352
|
+
local_var_params['config'] is None): # noqa: E501
|
353
|
+
raise ApiValueError("Missing the required parameter `config` when calling `from_bandersnatch`") # noqa: E501
|
354
|
+
# verify the required parameter 'name' is set
|
355
|
+
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
|
356
|
+
local_var_params['name'] is None): # noqa: E501
|
357
|
+
raise ApiValueError("Missing the required parameter `name` when calling `from_bandersnatch`") # noqa: E501
|
358
|
+
|
359
|
+
collection_formats = {}
|
360
|
+
|
361
|
+
path_params = {}
|
362
|
+
|
363
|
+
query_params = []
|
364
|
+
|
365
|
+
header_params = {}
|
366
|
+
|
367
|
+
form_params = []
|
368
|
+
local_var_files = {}
|
369
|
+
if 'config' in local_var_params:
|
370
|
+
local_var_files['config'] = local_var_params['config'] # noqa: E501
|
371
|
+
if 'name' in local_var_params:
|
372
|
+
form_params.append(('name', local_var_params['name'])) # noqa: E501
|
373
|
+
if 'policy' in local_var_params:
|
374
|
+
form_params.append(('policy', local_var_params['policy'])) # noqa: E501
|
375
|
+
|
376
|
+
body_params = None
|
377
|
+
# HTTP header `Accept`
|
378
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
379
|
+
['application/json']) # noqa: E501
|
380
|
+
|
381
|
+
# HTTP header `Content-Type`
|
382
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
383
|
+
['multipart/form-data', 'application/x-www-form-urlencoded']) # noqa: E501
|
384
|
+
|
385
|
+
# Authentication setting
|
386
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
387
|
+
|
388
|
+
return self.api_client.call_api(
|
389
|
+
'/pulp/api/v3/remotes/python/python/from_bandersnatch/', 'POST',
|
390
|
+
path_params,
|
391
|
+
query_params,
|
392
|
+
header_params,
|
393
|
+
body=body_params,
|
394
|
+
post_params=form_params,
|
395
|
+
files=local_var_files,
|
396
|
+
response_type='PythonPythonRemoteResponse', # noqa: E501
|
397
|
+
auth_settings=auth_settings,
|
398
|
+
async_req=local_var_params.get('async_req'),
|
399
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
400
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
401
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
402
|
+
collection_formats=collection_formats)
|
403
|
+
|
404
|
+
def list(self, **kwargs): # noqa: E501
|
405
|
+
"""List python remotes # noqa: E501
|
406
|
+
|
407
|
+
Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
|
408
|
+
This method makes a synchronous HTTP request by default. To make an
|
409
|
+
asynchronous HTTP request, please pass async_req=True
|
410
|
+
>>> thread = api.list(async_req=True)
|
411
|
+
>>> result = thread.get()
|
412
|
+
|
413
|
+
:param async_req bool: execute request asynchronously
|
414
|
+
:param int limit: Number of results to return per page.
|
415
|
+
:param str name:
|
416
|
+
:param str name__contains: Filter results where name contains value
|
417
|
+
:param str name__icontains: Filter results where name contains value
|
418
|
+
:param list[str] name__in: Filter results where name is in a comma-separated list of values
|
419
|
+
:param str name__startswith: Filter results where name starts with value
|
420
|
+
:param int offset: The initial index from which to return the results.
|
421
|
+
:param str ordering: Which field to use when ordering the results.
|
422
|
+
:param str pulp_label_select: Filter labels by search string
|
423
|
+
:param datetime pulp_last_updated: ISO 8601 formatted dates are supported
|
424
|
+
:param datetime pulp_last_updated__gt: Filter results where pulp_last_updated is greater than value
|
425
|
+
:param datetime pulp_last_updated__gte: Filter results where pulp_last_updated is greater than or equal to value
|
426
|
+
:param datetime pulp_last_updated__lt: Filter results where pulp_last_updated is less than value
|
427
|
+
:param datetime pulp_last_updated__lte: Filter results where pulp_last_updated is less than or equal to value
|
428
|
+
:param list[datetime] pulp_last_updated__range: Filter results where pulp_last_updated is between two comma separated values
|
429
|
+
:param str fields: A list of fields to include in the response.
|
430
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
431
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
432
|
+
be returned without reading/decoding response
|
433
|
+
data. Default is True.
|
434
|
+
:param _request_timeout: timeout setting for this request. If one
|
435
|
+
number provided, it will be total request
|
436
|
+
timeout. It can also be a pair (tuple) of
|
437
|
+
(connection, read) timeouts.
|
438
|
+
:return: PaginatedpythonPythonRemoteResponseList
|
439
|
+
If the method is called asynchronously,
|
440
|
+
returns the request thread.
|
441
|
+
"""
|
442
|
+
kwargs['_return_http_data_only'] = True
|
443
|
+
return self.list_with_http_info(**kwargs) # noqa: E501
|
444
|
+
|
445
|
+
def list_with_http_info(self, **kwargs): # noqa: E501
|
446
|
+
"""List python remotes # noqa: E501
|
447
|
+
|
448
|
+
Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
|
449
|
+
This method makes a synchronous HTTP request by default. To make an
|
450
|
+
asynchronous HTTP request, please pass async_req=True
|
451
|
+
>>> thread = api.list_with_http_info(async_req=True)
|
452
|
+
>>> result = thread.get()
|
453
|
+
|
454
|
+
:param async_req bool: execute request asynchronously
|
455
|
+
:param int limit: Number of results to return per page.
|
456
|
+
:param str name:
|
457
|
+
:param str name__contains: Filter results where name contains value
|
458
|
+
:param str name__icontains: Filter results where name contains value
|
459
|
+
:param list[str] name__in: Filter results where name is in a comma-separated list of values
|
460
|
+
:param str name__startswith: Filter results where name starts with value
|
461
|
+
:param int offset: The initial index from which to return the results.
|
462
|
+
:param str ordering: Which field to use when ordering the results.
|
463
|
+
:param str pulp_label_select: Filter labels by search string
|
464
|
+
:param datetime pulp_last_updated: ISO 8601 formatted dates are supported
|
465
|
+
:param datetime pulp_last_updated__gt: Filter results where pulp_last_updated is greater than value
|
466
|
+
:param datetime pulp_last_updated__gte: Filter results where pulp_last_updated is greater than or equal to value
|
467
|
+
:param datetime pulp_last_updated__lt: Filter results where pulp_last_updated is less than value
|
468
|
+
:param datetime pulp_last_updated__lte: Filter results where pulp_last_updated is less than or equal to value
|
469
|
+
:param list[datetime] pulp_last_updated__range: Filter results where pulp_last_updated is between two comma separated values
|
470
|
+
:param str fields: A list of fields to include in the response.
|
471
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
472
|
+
:param _return_http_data_only: response data without head status code
|
473
|
+
and headers
|
474
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
475
|
+
be returned without reading/decoding response
|
476
|
+
data. Default is True.
|
477
|
+
:param _request_timeout: timeout setting for this request. If one
|
478
|
+
number provided, it will be total request
|
479
|
+
timeout. It can also be a pair (tuple) of
|
480
|
+
(connection, read) timeouts.
|
481
|
+
:return: tuple(PaginatedpythonPythonRemoteResponseList, status_code(int), headers(HTTPHeaderDict))
|
482
|
+
If the method is called asynchronously,
|
483
|
+
returns the request thread.
|
484
|
+
"""
|
485
|
+
|
486
|
+
local_var_params = locals()
|
487
|
+
|
488
|
+
all_params = [
|
489
|
+
'limit',
|
490
|
+
'name',
|
491
|
+
'name__contains',
|
492
|
+
'name__icontains',
|
493
|
+
'name__in',
|
494
|
+
'name__startswith',
|
495
|
+
'offset',
|
496
|
+
'ordering',
|
497
|
+
'pulp_label_select',
|
498
|
+
'pulp_last_updated',
|
499
|
+
'pulp_last_updated__gt',
|
500
|
+
'pulp_last_updated__gte',
|
501
|
+
'pulp_last_updated__lt',
|
502
|
+
'pulp_last_updated__lte',
|
503
|
+
'pulp_last_updated__range',
|
504
|
+
'fields',
|
505
|
+
'exclude_fields'
|
506
|
+
]
|
507
|
+
all_params.extend(
|
508
|
+
[
|
509
|
+
'async_req',
|
510
|
+
'_return_http_data_only',
|
511
|
+
'_preload_content',
|
512
|
+
'_request_timeout'
|
513
|
+
]
|
514
|
+
)
|
515
|
+
|
516
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
517
|
+
if key not in all_params:
|
518
|
+
raise ApiTypeError(
|
519
|
+
"Got an unexpected keyword argument '%s'"
|
520
|
+
" to method list" % key
|
521
|
+
)
|
522
|
+
local_var_params[key] = val
|
523
|
+
del local_var_params['kwargs']
|
524
|
+
|
525
|
+
collection_formats = {}
|
526
|
+
|
527
|
+
path_params = {}
|
528
|
+
|
529
|
+
query_params = []
|
530
|
+
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
|
531
|
+
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
|
532
|
+
if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501
|
533
|
+
query_params.append(('name', local_var_params['name'])) # noqa: E501
|
534
|
+
if 'name__contains' in local_var_params and local_var_params['name__contains'] is not None: # noqa: E501
|
535
|
+
query_params.append(('name__contains', local_var_params['name__contains'])) # noqa: E501
|
536
|
+
if 'name__icontains' in local_var_params and local_var_params['name__icontains'] is not None: # noqa: E501
|
537
|
+
query_params.append(('name__icontains', local_var_params['name__icontains'])) # noqa: E501
|
538
|
+
if 'name__in' in local_var_params and local_var_params['name__in'] is not None: # noqa: E501
|
539
|
+
query_params.append(('name__in', local_var_params['name__in'])) # noqa: E501
|
540
|
+
collection_formats['name__in'] = 'csv' # noqa: E501
|
541
|
+
if 'name__startswith' in local_var_params and local_var_params['name__startswith'] is not None: # noqa: E501
|
542
|
+
query_params.append(('name__startswith', local_var_params['name__startswith'])) # noqa: E501
|
543
|
+
if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
|
544
|
+
query_params.append(('offset', local_var_params['offset'])) # noqa: E501
|
545
|
+
if 'ordering' in local_var_params and local_var_params['ordering'] is not None: # noqa: E501
|
546
|
+
query_params.append(('ordering', local_var_params['ordering'])) # noqa: E501
|
547
|
+
if 'pulp_label_select' in local_var_params and local_var_params['pulp_label_select'] is not None: # noqa: E501
|
548
|
+
query_params.append(('pulp_label_select', local_var_params['pulp_label_select'])) # noqa: E501
|
549
|
+
if 'pulp_last_updated' in local_var_params and local_var_params['pulp_last_updated'] is not None: # noqa: E501
|
550
|
+
query_params.append(('pulp_last_updated', local_var_params['pulp_last_updated'])) # noqa: E501
|
551
|
+
if 'pulp_last_updated__gt' in local_var_params and local_var_params['pulp_last_updated__gt'] is not None: # noqa: E501
|
552
|
+
query_params.append(('pulp_last_updated__gt', local_var_params['pulp_last_updated__gt'])) # noqa: E501
|
553
|
+
if 'pulp_last_updated__gte' in local_var_params and local_var_params['pulp_last_updated__gte'] is not None: # noqa: E501
|
554
|
+
query_params.append(('pulp_last_updated__gte', local_var_params['pulp_last_updated__gte'])) # noqa: E501
|
555
|
+
if 'pulp_last_updated__lt' in local_var_params and local_var_params['pulp_last_updated__lt'] is not None: # noqa: E501
|
556
|
+
query_params.append(('pulp_last_updated__lt', local_var_params['pulp_last_updated__lt'])) # noqa: E501
|
557
|
+
if 'pulp_last_updated__lte' in local_var_params and local_var_params['pulp_last_updated__lte'] is not None: # noqa: E501
|
558
|
+
query_params.append(('pulp_last_updated__lte', local_var_params['pulp_last_updated__lte'])) # noqa: E501
|
559
|
+
if 'pulp_last_updated__range' in local_var_params and local_var_params['pulp_last_updated__range'] is not None: # noqa: E501
|
560
|
+
query_params.append(('pulp_last_updated__range', local_var_params['pulp_last_updated__range'])) # noqa: E501
|
561
|
+
collection_formats['pulp_last_updated__range'] = 'csv' # noqa: E501
|
562
|
+
if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
|
563
|
+
query_params.append(('fields', local_var_params['fields'])) # noqa: E501
|
564
|
+
if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
|
565
|
+
query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
|
566
|
+
|
567
|
+
header_params = {}
|
568
|
+
|
569
|
+
form_params = []
|
570
|
+
local_var_files = {}
|
571
|
+
|
572
|
+
body_params = None
|
573
|
+
# HTTP header `Accept`
|
574
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
575
|
+
['application/json']) # noqa: E501
|
576
|
+
|
577
|
+
# Authentication setting
|
578
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
579
|
+
|
580
|
+
return self.api_client.call_api(
|
581
|
+
'/pulp/api/v3/remotes/python/python/', 'GET',
|
582
|
+
path_params,
|
583
|
+
query_params,
|
584
|
+
header_params,
|
585
|
+
body=body_params,
|
586
|
+
post_params=form_params,
|
587
|
+
files=local_var_files,
|
588
|
+
response_type='PaginatedpythonPythonRemoteResponseList', # noqa: E501
|
589
|
+
auth_settings=auth_settings,
|
590
|
+
async_req=local_var_params.get('async_req'),
|
591
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
592
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
593
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
594
|
+
collection_formats=collection_formats)
|
595
|
+
|
596
|
+
def partial_update(self, python_python_remote_href, patchedpython_python_remote, **kwargs): # noqa: E501
|
597
|
+
"""Update a python remote # noqa: E501
|
598
|
+
|
599
|
+
Trigger an asynchronous partial update task # noqa: E501
|
600
|
+
This method makes a synchronous HTTP request by default. To make an
|
601
|
+
asynchronous HTTP request, please pass async_req=True
|
602
|
+
>>> thread = api.partial_update(python_python_remote_href, patchedpython_python_remote, async_req=True)
|
603
|
+
>>> result = thread.get()
|
604
|
+
|
605
|
+
:param async_req bool: execute request asynchronously
|
606
|
+
:param str python_python_remote_href: (required)
|
607
|
+
:param PatchedpythonPythonRemote patchedpython_python_remote: (required)
|
608
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
609
|
+
be returned without reading/decoding response
|
610
|
+
data. Default is True.
|
611
|
+
:param _request_timeout: timeout setting for this request. If one
|
612
|
+
number provided, it will be total request
|
613
|
+
timeout. It can also be a pair (tuple) of
|
614
|
+
(connection, read) timeouts.
|
615
|
+
:return: AsyncOperationResponse
|
616
|
+
If the method is called asynchronously,
|
617
|
+
returns the request thread.
|
618
|
+
"""
|
619
|
+
kwargs['_return_http_data_only'] = True
|
620
|
+
return self.partial_update_with_http_info(python_python_remote_href, patchedpython_python_remote, **kwargs) # noqa: E501
|
621
|
+
|
622
|
+
def partial_update_with_http_info(self, python_python_remote_href, patchedpython_python_remote, **kwargs): # noqa: E501
|
623
|
+
"""Update a python remote # noqa: E501
|
624
|
+
|
625
|
+
Trigger an asynchronous partial update task # noqa: E501
|
626
|
+
This method makes a synchronous HTTP request by default. To make an
|
627
|
+
asynchronous HTTP request, please pass async_req=True
|
628
|
+
>>> thread = api.partial_update_with_http_info(python_python_remote_href, patchedpython_python_remote, async_req=True)
|
629
|
+
>>> result = thread.get()
|
630
|
+
|
631
|
+
:param async_req bool: execute request asynchronously
|
632
|
+
:param str python_python_remote_href: (required)
|
633
|
+
:param PatchedpythonPythonRemote patchedpython_python_remote: (required)
|
634
|
+
:param _return_http_data_only: response data without head status code
|
635
|
+
and headers
|
636
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
637
|
+
be returned without reading/decoding response
|
638
|
+
data. Default is True.
|
639
|
+
:param _request_timeout: timeout setting for this request. If one
|
640
|
+
number provided, it will be total request
|
641
|
+
timeout. It can also be a pair (tuple) of
|
642
|
+
(connection, read) timeouts.
|
643
|
+
:return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
|
644
|
+
If the method is called asynchronously,
|
645
|
+
returns the request thread.
|
646
|
+
"""
|
647
|
+
|
648
|
+
local_var_params = locals()
|
649
|
+
|
650
|
+
all_params = [
|
651
|
+
'python_python_remote_href',
|
652
|
+
'patchedpython_python_remote'
|
653
|
+
]
|
654
|
+
all_params.extend(
|
655
|
+
[
|
656
|
+
'async_req',
|
657
|
+
'_return_http_data_only',
|
658
|
+
'_preload_content',
|
659
|
+
'_request_timeout'
|
660
|
+
]
|
661
|
+
)
|
662
|
+
|
663
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
664
|
+
if key not in all_params:
|
665
|
+
raise ApiTypeError(
|
666
|
+
"Got an unexpected keyword argument '%s'"
|
667
|
+
" to method partial_update" % key
|
668
|
+
)
|
669
|
+
local_var_params[key] = val
|
670
|
+
del local_var_params['kwargs']
|
671
|
+
# verify the required parameter 'python_python_remote_href' is set
|
672
|
+
if self.api_client.client_side_validation and ('python_python_remote_href' not in local_var_params or # noqa: E501
|
673
|
+
local_var_params['python_python_remote_href'] is None): # noqa: E501
|
674
|
+
raise ApiValueError("Missing the required parameter `python_python_remote_href` when calling `partial_update`") # noqa: E501
|
675
|
+
# verify the required parameter 'patchedpython_python_remote' is set
|
676
|
+
if self.api_client.client_side_validation and ('patchedpython_python_remote' not in local_var_params or # noqa: E501
|
677
|
+
local_var_params['patchedpython_python_remote'] is None): # noqa: E501
|
678
|
+
raise ApiValueError("Missing the required parameter `patchedpython_python_remote` when calling `partial_update`") # noqa: E501
|
679
|
+
|
680
|
+
collection_formats = {}
|
681
|
+
|
682
|
+
path_params = {}
|
683
|
+
if 'python_python_remote_href' in local_var_params:
|
684
|
+
path_params['python_python_remote_href'] = local_var_params['python_python_remote_href'] # noqa: E501
|
685
|
+
|
686
|
+
query_params = []
|
687
|
+
|
688
|
+
header_params = {}
|
689
|
+
|
690
|
+
form_params = []
|
691
|
+
local_var_files = {}
|
692
|
+
|
693
|
+
body_params = None
|
694
|
+
if 'patchedpython_python_remote' in local_var_params:
|
695
|
+
body_params = local_var_params['patchedpython_python_remote']
|
696
|
+
# HTTP header `Accept`
|
697
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
698
|
+
['application/json']) # noqa: E501
|
699
|
+
|
700
|
+
# HTTP header `Content-Type`
|
701
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
702
|
+
['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # noqa: E501
|
703
|
+
|
704
|
+
# Authentication setting
|
705
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
706
|
+
|
707
|
+
return self.api_client.call_api(
|
708
|
+
'{python_python_remote_href}', 'PATCH',
|
709
|
+
path_params,
|
710
|
+
query_params,
|
711
|
+
header_params,
|
712
|
+
body=body_params,
|
713
|
+
post_params=form_params,
|
714
|
+
files=local_var_files,
|
715
|
+
response_type='AsyncOperationResponse', # noqa: E501
|
716
|
+
auth_settings=auth_settings,
|
717
|
+
async_req=local_var_params.get('async_req'),
|
718
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
719
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
720
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
721
|
+
collection_formats=collection_formats)
|
722
|
+
|
723
|
+
def read(self, python_python_remote_href, **kwargs): # noqa: E501
|
724
|
+
"""Inspect a python remote # noqa: E501
|
725
|
+
|
726
|
+
Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
|
727
|
+
This method makes a synchronous HTTP request by default. To make an
|
728
|
+
asynchronous HTTP request, please pass async_req=True
|
729
|
+
>>> thread = api.read(python_python_remote_href, async_req=True)
|
730
|
+
>>> result = thread.get()
|
731
|
+
|
732
|
+
:param async_req bool: execute request asynchronously
|
733
|
+
:param str python_python_remote_href: (required)
|
734
|
+
:param str fields: A list of fields to include in the response.
|
735
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
736
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
737
|
+
be returned without reading/decoding response
|
738
|
+
data. Default is True.
|
739
|
+
:param _request_timeout: timeout setting for this request. If one
|
740
|
+
number provided, it will be total request
|
741
|
+
timeout. It can also be a pair (tuple) of
|
742
|
+
(connection, read) timeouts.
|
743
|
+
:return: PythonPythonRemoteResponse
|
744
|
+
If the method is called asynchronously,
|
745
|
+
returns the request thread.
|
746
|
+
"""
|
747
|
+
kwargs['_return_http_data_only'] = True
|
748
|
+
return self.read_with_http_info(python_python_remote_href, **kwargs) # noqa: E501
|
749
|
+
|
750
|
+
def read_with_http_info(self, python_python_remote_href, **kwargs): # noqa: E501
|
751
|
+
"""Inspect a python remote # noqa: E501
|
752
|
+
|
753
|
+
Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
|
754
|
+
This method makes a synchronous HTTP request by default. To make an
|
755
|
+
asynchronous HTTP request, please pass async_req=True
|
756
|
+
>>> thread = api.read_with_http_info(python_python_remote_href, async_req=True)
|
757
|
+
>>> result = thread.get()
|
758
|
+
|
759
|
+
:param async_req bool: execute request asynchronously
|
760
|
+
:param str python_python_remote_href: (required)
|
761
|
+
:param str fields: A list of fields to include in the response.
|
762
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
763
|
+
:param _return_http_data_only: response data without head status code
|
764
|
+
and headers
|
765
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
766
|
+
be returned without reading/decoding response
|
767
|
+
data. Default is True.
|
768
|
+
:param _request_timeout: timeout setting for this request. If one
|
769
|
+
number provided, it will be total request
|
770
|
+
timeout. It can also be a pair (tuple) of
|
771
|
+
(connection, read) timeouts.
|
772
|
+
:return: tuple(PythonPythonRemoteResponse, status_code(int), headers(HTTPHeaderDict))
|
773
|
+
If the method is called asynchronously,
|
774
|
+
returns the request thread.
|
775
|
+
"""
|
776
|
+
|
777
|
+
local_var_params = locals()
|
778
|
+
|
779
|
+
all_params = [
|
780
|
+
'python_python_remote_href',
|
781
|
+
'fields',
|
782
|
+
'exclude_fields'
|
783
|
+
]
|
784
|
+
all_params.extend(
|
785
|
+
[
|
786
|
+
'async_req',
|
787
|
+
'_return_http_data_only',
|
788
|
+
'_preload_content',
|
789
|
+
'_request_timeout'
|
790
|
+
]
|
791
|
+
)
|
792
|
+
|
793
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
794
|
+
if key not in all_params:
|
795
|
+
raise ApiTypeError(
|
796
|
+
"Got an unexpected keyword argument '%s'"
|
797
|
+
" to method read" % key
|
798
|
+
)
|
799
|
+
local_var_params[key] = val
|
800
|
+
del local_var_params['kwargs']
|
801
|
+
# verify the required parameter 'python_python_remote_href' is set
|
802
|
+
if self.api_client.client_side_validation and ('python_python_remote_href' not in local_var_params or # noqa: E501
|
803
|
+
local_var_params['python_python_remote_href'] is None): # noqa: E501
|
804
|
+
raise ApiValueError("Missing the required parameter `python_python_remote_href` when calling `read`") # noqa: E501
|
805
|
+
|
806
|
+
collection_formats = {}
|
807
|
+
|
808
|
+
path_params = {}
|
809
|
+
if 'python_python_remote_href' in local_var_params:
|
810
|
+
path_params['python_python_remote_href'] = local_var_params['python_python_remote_href'] # noqa: E501
|
811
|
+
|
812
|
+
query_params = []
|
813
|
+
if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
|
814
|
+
query_params.append(('fields', local_var_params['fields'])) # noqa: E501
|
815
|
+
if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
|
816
|
+
query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
|
817
|
+
|
818
|
+
header_params = {}
|
819
|
+
|
820
|
+
form_params = []
|
821
|
+
local_var_files = {}
|
822
|
+
|
823
|
+
body_params = None
|
824
|
+
# HTTP header `Accept`
|
825
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
826
|
+
['application/json']) # noqa: E501
|
827
|
+
|
828
|
+
# Authentication setting
|
829
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
830
|
+
|
831
|
+
return self.api_client.call_api(
|
832
|
+
'{python_python_remote_href}', 'GET',
|
833
|
+
path_params,
|
834
|
+
query_params,
|
835
|
+
header_params,
|
836
|
+
body=body_params,
|
837
|
+
post_params=form_params,
|
838
|
+
files=local_var_files,
|
839
|
+
response_type='PythonPythonRemoteResponse', # noqa: E501
|
840
|
+
auth_settings=auth_settings,
|
841
|
+
async_req=local_var_params.get('async_req'),
|
842
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
843
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
844
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
845
|
+
collection_formats=collection_formats)
|
846
|
+
|
847
|
+
def update(self, python_python_remote_href, python_python_remote, **kwargs): # noqa: E501
|
848
|
+
"""Update a python remote # noqa: E501
|
849
|
+
|
850
|
+
Trigger an asynchronous update task # noqa: E501
|
851
|
+
This method makes a synchronous HTTP request by default. To make an
|
852
|
+
asynchronous HTTP request, please pass async_req=True
|
853
|
+
>>> thread = api.update(python_python_remote_href, python_python_remote, async_req=True)
|
854
|
+
>>> result = thread.get()
|
855
|
+
|
856
|
+
:param async_req bool: execute request asynchronously
|
857
|
+
:param str python_python_remote_href: (required)
|
858
|
+
:param PythonPythonRemote python_python_remote: (required)
|
859
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
860
|
+
be returned without reading/decoding response
|
861
|
+
data. Default is True.
|
862
|
+
:param _request_timeout: timeout setting for this request. If one
|
863
|
+
number provided, it will be total request
|
864
|
+
timeout. It can also be a pair (tuple) of
|
865
|
+
(connection, read) timeouts.
|
866
|
+
:return: AsyncOperationResponse
|
867
|
+
If the method is called asynchronously,
|
868
|
+
returns the request thread.
|
869
|
+
"""
|
870
|
+
kwargs['_return_http_data_only'] = True
|
871
|
+
return self.update_with_http_info(python_python_remote_href, python_python_remote, **kwargs) # noqa: E501
|
872
|
+
|
873
|
+
def update_with_http_info(self, python_python_remote_href, python_python_remote, **kwargs): # noqa: E501
|
874
|
+
"""Update a python remote # noqa: E501
|
875
|
+
|
876
|
+
Trigger an asynchronous update task # noqa: E501
|
877
|
+
This method makes a synchronous HTTP request by default. To make an
|
878
|
+
asynchronous HTTP request, please pass async_req=True
|
879
|
+
>>> thread = api.update_with_http_info(python_python_remote_href, python_python_remote, async_req=True)
|
880
|
+
>>> result = thread.get()
|
881
|
+
|
882
|
+
:param async_req bool: execute request asynchronously
|
883
|
+
:param str python_python_remote_href: (required)
|
884
|
+
:param PythonPythonRemote python_python_remote: (required)
|
885
|
+
:param _return_http_data_only: response data without head status code
|
886
|
+
and headers
|
887
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
888
|
+
be returned without reading/decoding response
|
889
|
+
data. Default is True.
|
890
|
+
:param _request_timeout: timeout setting for this request. If one
|
891
|
+
number provided, it will be total request
|
892
|
+
timeout. It can also be a pair (tuple) of
|
893
|
+
(connection, read) timeouts.
|
894
|
+
:return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
|
895
|
+
If the method is called asynchronously,
|
896
|
+
returns the request thread.
|
897
|
+
"""
|
898
|
+
|
899
|
+
local_var_params = locals()
|
900
|
+
|
901
|
+
all_params = [
|
902
|
+
'python_python_remote_href',
|
903
|
+
'python_python_remote'
|
904
|
+
]
|
905
|
+
all_params.extend(
|
906
|
+
[
|
907
|
+
'async_req',
|
908
|
+
'_return_http_data_only',
|
909
|
+
'_preload_content',
|
910
|
+
'_request_timeout'
|
911
|
+
]
|
912
|
+
)
|
913
|
+
|
914
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
915
|
+
if key not in all_params:
|
916
|
+
raise ApiTypeError(
|
917
|
+
"Got an unexpected keyword argument '%s'"
|
918
|
+
" to method update" % key
|
919
|
+
)
|
920
|
+
local_var_params[key] = val
|
921
|
+
del local_var_params['kwargs']
|
922
|
+
# verify the required parameter 'python_python_remote_href' is set
|
923
|
+
if self.api_client.client_side_validation and ('python_python_remote_href' not in local_var_params or # noqa: E501
|
924
|
+
local_var_params['python_python_remote_href'] is None): # noqa: E501
|
925
|
+
raise ApiValueError("Missing the required parameter `python_python_remote_href` when calling `update`") # noqa: E501
|
926
|
+
# verify the required parameter 'python_python_remote' is set
|
927
|
+
if self.api_client.client_side_validation and ('python_python_remote' not in local_var_params or # noqa: E501
|
928
|
+
local_var_params['python_python_remote'] is None): # noqa: E501
|
929
|
+
raise ApiValueError("Missing the required parameter `python_python_remote` when calling `update`") # noqa: E501
|
930
|
+
|
931
|
+
collection_formats = {}
|
932
|
+
|
933
|
+
path_params = {}
|
934
|
+
if 'python_python_remote_href' in local_var_params:
|
935
|
+
path_params['python_python_remote_href'] = local_var_params['python_python_remote_href'] # noqa: E501
|
936
|
+
|
937
|
+
query_params = []
|
938
|
+
|
939
|
+
header_params = {}
|
940
|
+
|
941
|
+
form_params = []
|
942
|
+
local_var_files = {}
|
943
|
+
|
944
|
+
body_params = None
|
945
|
+
if 'python_python_remote' in local_var_params:
|
946
|
+
body_params = local_var_params['python_python_remote']
|
947
|
+
# HTTP header `Accept`
|
948
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
949
|
+
['application/json']) # noqa: E501
|
950
|
+
|
951
|
+
# HTTP header `Content-Type`
|
952
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
953
|
+
['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # noqa: E501
|
954
|
+
|
955
|
+
# Authentication setting
|
956
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
957
|
+
|
958
|
+
return self.api_client.call_api(
|
959
|
+
'{python_python_remote_href}', 'PUT',
|
960
|
+
path_params,
|
961
|
+
query_params,
|
962
|
+
header_params,
|
963
|
+
body=body_params,
|
964
|
+
post_params=form_params,
|
965
|
+
files=local_var_files,
|
966
|
+
response_type='AsyncOperationResponse', # noqa: E501
|
967
|
+
auth_settings=auth_settings,
|
968
|
+
async_req=local_var_params.get('async_req'),
|
969
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
970
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
971
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
972
|
+
collection_formats=collection_formats)
|