pulp_maven_client 0.2.0 → 0.3.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 +4 -4
- data/build/lib/pulpcore/__init__.py +2 -0
- data/build/lib/pulpcore/client/__init__.py +2 -0
- data/build/lib/pulpcore/client/pulp_maven/__init__.py +58 -0
- data/build/lib/pulpcore/client/pulp_maven/api/__init__.py +10 -0
- data/build/lib/pulpcore/client/pulp_maven/api/content_artifact_api.py +445 -0
- data/build/lib/pulpcore/client/pulp_maven/api/distributions_maven_api.py +830 -0
- data/build/lib/pulpcore/client/pulp_maven/api/remotes_maven_api.py +840 -0
- data/build/lib/pulpcore/client/pulp_maven/api/repositories_maven_api.py +809 -0
- data/build/lib/pulpcore/client/pulp_maven/api/repositories_maven_versions_api.py +614 -0
- data/build/lib/pulpcore/client/pulp_maven/api_client.py +667 -0
- data/build/lib/pulpcore/client/pulp_maven/configuration.py +427 -0
- data/build/lib/pulpcore/client/pulp_maven/exceptions.py +121 -0
- data/build/lib/pulpcore/client/pulp_maven/models/__init__.py +39 -0
- data/build/lib/pulpcore/client/pulp_maven/models/async_operation_response.py +124 -0
- data/build/lib/pulpcore/client/pulp_maven/models/content_summary.py +176 -0
- data/build/lib/pulpcore/client/pulp_maven/models/content_summary_response.py +176 -0
- data/build/lib/pulpcore/client/pulp_maven/models/maven_maven_artifact.py +153 -0
- data/build/lib/pulpcore/client/pulp_maven/models/maven_maven_artifact_response.py +290 -0
- data/build/lib/pulpcore/client/pulp_maven/models/maven_maven_distribution.py +260 -0
- data/build/lib/pulpcore/client/pulp_maven/models/maven_maven_distribution_response.py +342 -0
- data/build/lib/pulpcore/client/pulp_maven/models/maven_maven_remote.py +657 -0
- data/build/lib/pulpcore/client/pulp_maven/models/maven_maven_remote_response.py +604 -0
- data/build/lib/pulpcore/client/pulp_maven/models/maven_maven_repository.py +202 -0
- data/build/lib/pulpcore/client/pulp_maven/models/maven_maven_repository_response.py +308 -0
- data/build/lib/pulpcore/client/pulp_maven/models/paginated_repository_version_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_maven/models/paginatedmaven_maven_artifact_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_maven/models/paginatedmaven_maven_distribution_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_maven/models/paginatedmaven_maven_remote_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_maven/models/paginatedmaven_maven_repository_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_maven/models/patchedmaven_maven_distribution.py +258 -0
- data/build/lib/pulpcore/client/pulp_maven/models/patchedmaven_maven_remote.py +655 -0
- data/build/lib/pulpcore/client/pulp_maven/models/patchedmaven_maven_repository.py +201 -0
- data/build/lib/pulpcore/client/pulp_maven/models/policy_enum.py +101 -0
- data/build/lib/pulpcore/client/pulp_maven/models/repository_version.py +123 -0
- data/build/lib/pulpcore/client/pulp_maven/models/repository_version_response.py +231 -0
- data/build/lib/pulpcore/client/pulp_maven/rest.py +292 -0
- data/dist/pulp_maven-client-0.3.0.tar.gz +0 -0
- data/dist/pulp_maven_client-0.3.0-py3-none-any.whl +0 -0
- data/docs/ContentArtifactApi.md +14 -14
- data/docs/ContentSummary.md +3 -3
- data/docs/ContentSummaryResponse.md +3 -3
- data/docs/DistributionsMavenApi.md +20 -12
- data/docs/MavenMavenDistribution.md +4 -0
- data/docs/MavenMavenDistributionResponse.md +4 -0
- data/docs/MavenMavenRemote.md +12 -2
- data/docs/MavenMavenRemoteResponse.md +8 -8
- data/docs/MavenMavenRepository.md +3 -1
- data/docs/MavenMavenRepositoryResponse.md +2 -0
- data/docs/PatchedmavenMavenDistribution.md +4 -0
- data/docs/PatchedmavenMavenRemote.md +12 -2
- data/docs/PatchedmavenMavenRepository.md +3 -1
- data/docs/RemotesMavenApi.md +24 -16
- data/docs/RepositoriesMavenApi.md +12 -4
- data/docs/RepositoriesMavenVersionsApi.md +28 -28
- data/lib/pulp_maven_client/api/content_artifact_api.rb +14 -14
- data/lib/pulp_maven_client/api/distributions_maven_api.rb +26 -14
- data/lib/pulp_maven_client/api/remotes_maven_api.rb +30 -18
- data/lib/pulp_maven_client/api/repositories_maven_api.rb +17 -5
- data/lib/pulp_maven_client/api/repositories_maven_versions_api.rb +30 -30
- data/lib/pulp_maven_client/models/content_summary.rb +12 -6
- data/lib/pulp_maven_client/models/content_summary_response.rb +12 -6
- data/lib/pulp_maven_client/models/maven_maven_distribution.rb +21 -1
- data/lib/pulp_maven_client/models/maven_maven_distribution_response.rb +21 -1
- data/lib/pulp_maven_client/models/maven_maven_remote.rb +60 -6
- data/lib/pulp_maven_client/models/maven_maven_remote_response.rb +35 -36
- data/lib/pulp_maven_client/models/maven_maven_repository.rb +10 -1
- data/lib/pulp_maven_client/models/maven_maven_repository_response.rb +10 -1
- data/lib/pulp_maven_client/models/patchedmaven_maven_distribution.rb +21 -1
- data/lib/pulp_maven_client/models/patchedmaven_maven_remote.rb +60 -6
- data/lib/pulp_maven_client/models/patchedmaven_maven_repository.rb +10 -1
- data/lib/pulp_maven_client/version.rb +1 -1
- data/pulp_maven_client.egg-info/PKG-INFO +15 -0
- data/pulp_maven_client.egg-info/SOURCES.txt +71 -0
- data/pulp_maven_client.egg-info/dependency_links.txt +1 -0
- data/pulp_maven_client.egg-info/requires.txt +4 -0
- data/pulp_maven_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_maven/__init__.py +58 -0
- data/pulpcore/client/pulp_maven/api/__init__.py +10 -0
- data/pulpcore/client/pulp_maven/api/content_artifact_api.py +445 -0
- data/pulpcore/client/pulp_maven/api/distributions_maven_api.py +830 -0
- data/pulpcore/client/pulp_maven/api/remotes_maven_api.py +840 -0
- data/pulpcore/client/pulp_maven/api/repositories_maven_api.py +809 -0
- data/pulpcore/client/pulp_maven/api/repositories_maven_versions_api.py +614 -0
- data/pulpcore/client/pulp_maven/api_client.py +667 -0
- data/pulpcore/client/pulp_maven/configuration.py +427 -0
- data/pulpcore/client/pulp_maven/exceptions.py +121 -0
- data/pulpcore/client/pulp_maven/models/__init__.py +39 -0
- data/pulpcore/client/pulp_maven/models/async_operation_response.py +124 -0
- data/pulpcore/client/pulp_maven/models/content_summary.py +176 -0
- data/pulpcore/client/pulp_maven/models/content_summary_response.py +176 -0
- data/pulpcore/client/pulp_maven/models/maven_maven_artifact.py +153 -0
- data/pulpcore/client/pulp_maven/models/maven_maven_artifact_response.py +290 -0
- data/pulpcore/client/pulp_maven/models/maven_maven_distribution.py +260 -0
- data/pulpcore/client/pulp_maven/models/maven_maven_distribution_response.py +342 -0
- data/pulpcore/client/pulp_maven/models/maven_maven_remote.py +657 -0
- data/pulpcore/client/pulp_maven/models/maven_maven_remote_response.py +604 -0
- data/pulpcore/client/pulp_maven/models/maven_maven_repository.py +202 -0
- data/pulpcore/client/pulp_maven/models/maven_maven_repository_response.py +308 -0
- data/pulpcore/client/pulp_maven/models/paginated_repository_version_response_list.py +197 -0
- data/pulpcore/client/pulp_maven/models/paginatedmaven_maven_artifact_response_list.py +197 -0
- data/pulpcore/client/pulp_maven/models/paginatedmaven_maven_distribution_response_list.py +197 -0
- data/pulpcore/client/pulp_maven/models/paginatedmaven_maven_remote_response_list.py +197 -0
- data/pulpcore/client/pulp_maven/models/paginatedmaven_maven_repository_response_list.py +197 -0
- data/pulpcore/client/pulp_maven/models/patchedmaven_maven_distribution.py +258 -0
- data/pulpcore/client/pulp_maven/models/patchedmaven_maven_remote.py +655 -0
- data/pulpcore/client/pulp_maven/models/patchedmaven_maven_repository.py +201 -0
- data/pulpcore/client/pulp_maven/models/policy_enum.py +101 -0
- data/pulpcore/client/pulp_maven/models/repository_version.py +123 -0
- data/pulpcore/client/pulp_maven/models/repository_version_response.py +231 -0
- data/pulpcore/client/pulp_maven/rest.py +292 -0
- data/requirements.txt +6 -0
- data/setup.cfg +2 -0
- data/setup.py +42 -0
- data/spec/api/content_artifact_api_spec.rb +7 -7
- data/spec/api/distributions_maven_api_spec.rb +10 -6
- data/spec/api/remotes_maven_api_spec.rb +12 -8
- data/spec/api/repositories_maven_api_spec.rb +6 -2
- data/spec/api/repositories_maven_versions_api_spec.rb +14 -14
- data/spec/models/maven_maven_distribution_response_spec.rb +12 -0
- data/spec/models/maven_maven_distribution_spec.rb +12 -0
- data/spec/models/maven_maven_remote_response_spec.rb +12 -12
- data/spec/models/maven_maven_remote_spec.rb +30 -0
- data/spec/models/maven_maven_repository_response_spec.rb +6 -0
- data/spec/models/maven_maven_repository_spec.rb +6 -0
- data/spec/models/patchedmaven_maven_distribution_spec.rb +12 -0
- data/spec/models/patchedmaven_maven_remote_spec.rb +30 -0
- data/spec/models/patchedmaven_maven_repository_spec.rb +6 -0
- data/test/__init__.py +0 -0
- data/test/test_async_operation_response.py +54 -0
- data/test/test_content_artifact_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_maven_api.py +76 -0
- data/test/test_maven_maven_artifact.py +56 -0
- data/test/test_maven_maven_artifact_response.py +60 -0
- data/test/test_maven_maven_distribution.py +60 -0
- data/test/test_maven_maven_distribution_response.py +63 -0
- data/test/test_maven_maven_remote.py +76 -0
- data/test/test_maven_maven_remote_response.py +74 -0
- data/test/test_maven_maven_repository.py +57 -0
- data/test/test_maven_maven_repository_response.py +61 -0
- data/test/test_paginated_repository_version_response_list.py +63 -0
- data/test/test_paginatedmaven_maven_artifact_response_list.py +65 -0
- data/test/test_paginatedmaven_maven_distribution_response_list.py +67 -0
- data/test/test_paginatedmaven_maven_remote_response_list.py +78 -0
- data/test/test_paginatedmaven_maven_repository_response_list.py +66 -0
- data/test/test_patchedmaven_maven_distribution.py +58 -0
- data/test/test_patchedmaven_maven_remote.py +74 -0
- data/test/test_patchedmaven_maven_repository.py +56 -0
- data/test/test_policy_enum.py +52 -0
- data/test/test_remotes_maven_api.py +76 -0
- data/test/test_repositories_maven_api.py +76 -0
- data/test/test_repositories_maven_versions_api.py +61 -0
- data/test/test_repository_version.py +53 -0
- data/test/test_repository_version_response.py +57 -0
- data/test-requirements.txt +3 -0
- data/tox.ini +9 -0
- metadata +133 -21
@@ -0,0 +1,292 @@
|
|
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 io
|
17
|
+
import json
|
18
|
+
import logging
|
19
|
+
import re
|
20
|
+
import ssl
|
21
|
+
|
22
|
+
import certifi
|
23
|
+
# python 2 and python 3 compatibility library
|
24
|
+
import six
|
25
|
+
from six.moves.urllib.parse import urlencode
|
26
|
+
import urllib3
|
27
|
+
|
28
|
+
from pulpcore.client.pulp_maven.exceptions import ApiException, ApiValueError
|
29
|
+
|
30
|
+
|
31
|
+
logger = logging.getLogger(__name__)
|
32
|
+
|
33
|
+
|
34
|
+
class RESTResponse(io.IOBase):
|
35
|
+
|
36
|
+
def __init__(self, resp):
|
37
|
+
self.urllib3_response = resp
|
38
|
+
self.status = resp.status
|
39
|
+
self.reason = resp.reason
|
40
|
+
self.data = resp.data
|
41
|
+
|
42
|
+
def getheaders(self):
|
43
|
+
"""Returns a dictionary of the response headers."""
|
44
|
+
return self.urllib3_response.getheaders()
|
45
|
+
|
46
|
+
def getheader(self, name, default=None):
|
47
|
+
"""Returns a given response header."""
|
48
|
+
return self.urllib3_response.getheader(name, default)
|
49
|
+
|
50
|
+
|
51
|
+
class RESTClientObject(object):
|
52
|
+
|
53
|
+
def __init__(self, configuration, pools_size=4, maxsize=None):
|
54
|
+
# urllib3.PoolManager will pass all kw parameters to connectionpool
|
55
|
+
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
|
56
|
+
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
|
57
|
+
# maxsize is the number of requests to host that are allowed in parallel # noqa: E501
|
58
|
+
# Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
|
59
|
+
|
60
|
+
# cert_reqs
|
61
|
+
if configuration.verify_ssl:
|
62
|
+
cert_reqs = ssl.CERT_REQUIRED
|
63
|
+
else:
|
64
|
+
cert_reqs = ssl.CERT_NONE
|
65
|
+
|
66
|
+
# ca_certs
|
67
|
+
if configuration.ssl_ca_cert:
|
68
|
+
ca_certs = configuration.ssl_ca_cert
|
69
|
+
else:
|
70
|
+
# if not set certificate file, use Mozilla's root certificates.
|
71
|
+
ca_certs = certifi.where()
|
72
|
+
|
73
|
+
addition_pool_args = {}
|
74
|
+
if configuration.assert_hostname is not None:
|
75
|
+
addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
|
76
|
+
|
77
|
+
if configuration.retries is not None:
|
78
|
+
addition_pool_args['retries'] = configuration.retries
|
79
|
+
|
80
|
+
if maxsize is None:
|
81
|
+
if configuration.connection_pool_maxsize is not None:
|
82
|
+
maxsize = configuration.connection_pool_maxsize
|
83
|
+
else:
|
84
|
+
maxsize = 4
|
85
|
+
|
86
|
+
# https pool manager
|
87
|
+
if configuration.proxy:
|
88
|
+
self.pool_manager = urllib3.ProxyManager(
|
89
|
+
num_pools=pools_size,
|
90
|
+
maxsize=maxsize,
|
91
|
+
cert_reqs=cert_reqs,
|
92
|
+
ca_certs=ca_certs,
|
93
|
+
cert_file=configuration.cert_file,
|
94
|
+
key_file=configuration.key_file,
|
95
|
+
proxy_url=configuration.proxy,
|
96
|
+
proxy_headers=configuration.proxy_headers,
|
97
|
+
**addition_pool_args
|
98
|
+
)
|
99
|
+
else:
|
100
|
+
self.pool_manager = urllib3.PoolManager(
|
101
|
+
num_pools=pools_size,
|
102
|
+
maxsize=maxsize,
|
103
|
+
cert_reqs=cert_reqs,
|
104
|
+
ca_certs=ca_certs,
|
105
|
+
cert_file=configuration.cert_file,
|
106
|
+
key_file=configuration.key_file,
|
107
|
+
**addition_pool_args
|
108
|
+
)
|
109
|
+
|
110
|
+
def request(self, method, url, query_params=None, headers=None,
|
111
|
+
body=None, post_params=None, _preload_content=True,
|
112
|
+
_request_timeout=None):
|
113
|
+
"""Perform requests.
|
114
|
+
|
115
|
+
:param method: http request method
|
116
|
+
:param url: http request url
|
117
|
+
:param query_params: query parameters in the url
|
118
|
+
:param headers: http request headers
|
119
|
+
:param body: request json body, for `application/json`
|
120
|
+
:param post_params: request post parameters,
|
121
|
+
`application/x-www-form-urlencoded`
|
122
|
+
and `multipart/form-data`
|
123
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
124
|
+
be returned without reading/decoding response
|
125
|
+
data. Default is True.
|
126
|
+
:param _request_timeout: timeout setting for this request. If one
|
127
|
+
number provided, it will be total request
|
128
|
+
timeout. It can also be a pair (tuple) of
|
129
|
+
(connection, read) timeouts.
|
130
|
+
"""
|
131
|
+
method = method.upper()
|
132
|
+
assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
|
133
|
+
'PATCH', 'OPTIONS']
|
134
|
+
|
135
|
+
if post_params and body:
|
136
|
+
raise ApiValueError(
|
137
|
+
"body parameter cannot be used with post_params parameter."
|
138
|
+
)
|
139
|
+
|
140
|
+
post_params = post_params or {}
|
141
|
+
headers = headers or {}
|
142
|
+
|
143
|
+
timeout = None
|
144
|
+
if _request_timeout:
|
145
|
+
if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
|
146
|
+
timeout = urllib3.Timeout(total=_request_timeout)
|
147
|
+
elif (isinstance(_request_timeout, tuple) and
|
148
|
+
len(_request_timeout) == 2):
|
149
|
+
timeout = urllib3.Timeout(
|
150
|
+
connect=_request_timeout[0], read=_request_timeout[1])
|
151
|
+
|
152
|
+
if 'Content-Type' not in headers:
|
153
|
+
headers['Content-Type'] = 'application/json'
|
154
|
+
|
155
|
+
try:
|
156
|
+
# For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
|
157
|
+
if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
|
158
|
+
if query_params:
|
159
|
+
url += '?' + urlencode(query_params)
|
160
|
+
if re.search('json', headers['Content-Type'], re.IGNORECASE):
|
161
|
+
request_body = None
|
162
|
+
if body is not None:
|
163
|
+
request_body = json.dumps(body)
|
164
|
+
r = self.pool_manager.request(
|
165
|
+
method, url,
|
166
|
+
body=request_body,
|
167
|
+
preload_content=_preload_content,
|
168
|
+
timeout=timeout,
|
169
|
+
headers=headers)
|
170
|
+
elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
|
171
|
+
r = self.pool_manager.request(
|
172
|
+
method, url,
|
173
|
+
fields=post_params,
|
174
|
+
encode_multipart=False,
|
175
|
+
preload_content=_preload_content,
|
176
|
+
timeout=timeout,
|
177
|
+
headers=headers)
|
178
|
+
elif headers['Content-Type'] == 'multipart/form-data':
|
179
|
+
# must del headers['Content-Type'], or the correct
|
180
|
+
# Content-Type which generated by urllib3 will be
|
181
|
+
# overwritten.
|
182
|
+
del headers['Content-Type']
|
183
|
+
r = self.pool_manager.request(
|
184
|
+
method, url,
|
185
|
+
fields=post_params,
|
186
|
+
encode_multipart=True,
|
187
|
+
preload_content=_preload_content,
|
188
|
+
timeout=timeout,
|
189
|
+
headers=headers)
|
190
|
+
# Pass a `string` parameter directly in the body to support
|
191
|
+
# other content types than Json when `body` argument is
|
192
|
+
# provided in serialized form
|
193
|
+
elif isinstance(body, str) or isinstance(body, bytes):
|
194
|
+
request_body = body
|
195
|
+
r = self.pool_manager.request(
|
196
|
+
method, url,
|
197
|
+
body=request_body,
|
198
|
+
preload_content=_preload_content,
|
199
|
+
timeout=timeout,
|
200
|
+
headers=headers)
|
201
|
+
else:
|
202
|
+
# Cannot generate the request from given parameters
|
203
|
+
msg = """Cannot prepare a request message for provided
|
204
|
+
arguments. Please check that your arguments match
|
205
|
+
declared content type."""
|
206
|
+
raise ApiException(status=0, reason=msg)
|
207
|
+
# For `GET`, `HEAD`
|
208
|
+
else:
|
209
|
+
r = self.pool_manager.request(method, url,
|
210
|
+
fields=query_params,
|
211
|
+
preload_content=_preload_content,
|
212
|
+
timeout=timeout,
|
213
|
+
headers=headers)
|
214
|
+
except urllib3.exceptions.SSLError as e:
|
215
|
+
msg = "{0}\n{1}".format(type(e).__name__, str(e))
|
216
|
+
raise ApiException(status=0, reason=msg)
|
217
|
+
|
218
|
+
if _preload_content:
|
219
|
+
r = RESTResponse(r)
|
220
|
+
|
221
|
+
# log response body
|
222
|
+
logger.debug("response body: %s", r.data)
|
223
|
+
|
224
|
+
if not 200 <= r.status <= 299:
|
225
|
+
raise ApiException(http_resp=r)
|
226
|
+
|
227
|
+
return r
|
228
|
+
|
229
|
+
def GET(self, url, headers=None, query_params=None, _preload_content=True,
|
230
|
+
_request_timeout=None):
|
231
|
+
return self.request("GET", url,
|
232
|
+
headers=headers,
|
233
|
+
_preload_content=_preload_content,
|
234
|
+
_request_timeout=_request_timeout,
|
235
|
+
query_params=query_params)
|
236
|
+
|
237
|
+
def HEAD(self, url, headers=None, query_params=None, _preload_content=True,
|
238
|
+
_request_timeout=None):
|
239
|
+
return self.request("HEAD", url,
|
240
|
+
headers=headers,
|
241
|
+
_preload_content=_preload_content,
|
242
|
+
_request_timeout=_request_timeout,
|
243
|
+
query_params=query_params)
|
244
|
+
|
245
|
+
def OPTIONS(self, url, headers=None, query_params=None, post_params=None,
|
246
|
+
body=None, _preload_content=True, _request_timeout=None):
|
247
|
+
return self.request("OPTIONS", url,
|
248
|
+
headers=headers,
|
249
|
+
query_params=query_params,
|
250
|
+
post_params=post_params,
|
251
|
+
_preload_content=_preload_content,
|
252
|
+
_request_timeout=_request_timeout,
|
253
|
+
body=body)
|
254
|
+
|
255
|
+
def DELETE(self, url, headers=None, query_params=None, body=None,
|
256
|
+
_preload_content=True, _request_timeout=None):
|
257
|
+
return self.request("DELETE", url,
|
258
|
+
headers=headers,
|
259
|
+
query_params=query_params,
|
260
|
+
_preload_content=_preload_content,
|
261
|
+
_request_timeout=_request_timeout,
|
262
|
+
body=body)
|
263
|
+
|
264
|
+
def POST(self, url, headers=None, query_params=None, post_params=None,
|
265
|
+
body=None, _preload_content=True, _request_timeout=None):
|
266
|
+
return self.request("POST", url,
|
267
|
+
headers=headers,
|
268
|
+
query_params=query_params,
|
269
|
+
post_params=post_params,
|
270
|
+
_preload_content=_preload_content,
|
271
|
+
_request_timeout=_request_timeout,
|
272
|
+
body=body)
|
273
|
+
|
274
|
+
def PUT(self, url, headers=None, query_params=None, post_params=None,
|
275
|
+
body=None, _preload_content=True, _request_timeout=None):
|
276
|
+
return self.request("PUT", url,
|
277
|
+
headers=headers,
|
278
|
+
query_params=query_params,
|
279
|
+
post_params=post_params,
|
280
|
+
_preload_content=_preload_content,
|
281
|
+
_request_timeout=_request_timeout,
|
282
|
+
body=body)
|
283
|
+
|
284
|
+
def PATCH(self, url, headers=None, query_params=None, post_params=None,
|
285
|
+
body=None, _preload_content=True, _request_timeout=None):
|
286
|
+
return self.request("PATCH", url,
|
287
|
+
headers=headers,
|
288
|
+
query_params=query_params,
|
289
|
+
post_params=post_params,
|
290
|
+
_preload_content=_preload_content,
|
291
|
+
_request_timeout=_request_timeout,
|
292
|
+
body=body)
|
data/requirements.txt
ADDED
data/setup.cfg
ADDED
data/setup.py
ADDED
@@ -0,0 +1,42 @@
|
|
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 setuptools import setup, find_packages # noqa: H301
|
15
|
+
|
16
|
+
NAME = "pulp_maven-client"
|
17
|
+
VERSION = "0.3.0"
|
18
|
+
# To install the library, run the following
|
19
|
+
#
|
20
|
+
# python setup.py install
|
21
|
+
#
|
22
|
+
# prerequisite: setuptools
|
23
|
+
# http://pypi.python.org/pypi/setuptools
|
24
|
+
|
25
|
+
REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"]
|
26
|
+
setup(
|
27
|
+
name=NAME,
|
28
|
+
version=VERSION,
|
29
|
+
description="Pulp 3 API",
|
30
|
+
author="Pulp Team",
|
31
|
+
author_email="pulp-list@redhat.com",
|
32
|
+
url="",
|
33
|
+
keywords=["pulp", "pulpcore", "client", "Pulp 3 API"],
|
34
|
+
install_requires=REQUIRES,
|
35
|
+
python_requires='>=3.4', # restrict client usage to Python 3 only
|
36
|
+
packages=find_packages(exclude=["test", "tests"]),
|
37
|
+
include_package_data=True,
|
38
|
+
license="GPLv2+",
|
39
|
+
long_description="""\
|
40
|
+
Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
|
41
|
+
"""
|
42
|
+
)
|
@@ -48,16 +48,16 @@ describe 'ContentArtifactApi' do
|
|
48
48
|
# List maven artifacts
|
49
49
|
# A ViewSet for MavenArtifact.
|
50
50
|
# @param [Hash] opts the optional parameters
|
51
|
-
# @option opts [String] :artifact_id artifact_id
|
52
|
-
# @option opts [String] :filename filename
|
53
|
-
# @option opts [String] :group_id group_id
|
51
|
+
# @option opts [String] :artifact_id Filter results where artifact_id matches value
|
52
|
+
# @option opts [String] :filename Filter results where filename matches value
|
53
|
+
# @option opts [String] :group_id Filter results where group_id matches value
|
54
54
|
# @option opts [Integer] :limit Number of results to return per page.
|
55
55
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
56
56
|
# @option opts [String] :ordering Which field to use when ordering the results.
|
57
|
-
# @option opts [String] :repository_version
|
58
|
-
# @option opts [String] :repository_version_added
|
59
|
-
# @option opts [String] :repository_version_removed
|
60
|
-
# @option opts [String] :version version
|
57
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF
|
58
|
+
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
59
|
+
# @option opts [String] :repository_version_removed Repository Version referenced by HREF
|
60
|
+
# @option opts [String] :version Filter results where version matches value
|
61
61
|
# @option opts [String] :fields A list of fields to include in the response.
|
62
62
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
63
63
|
# @return [PaginatedmavenMavenArtifactResponseList]
|
@@ -60,15 +60,19 @@ describe 'DistributionsMavenApi' do
|
|
60
60
|
# List maven distributions
|
61
61
|
# ViewSet for Maven Distributions.
|
62
62
|
# @param [Hash] opts the optional parameters
|
63
|
-
# @option opts [String] :base_path
|
64
|
-
# @option opts [String] :base_path__contains
|
65
|
-
# @option opts [String] :base_path__icontains
|
66
|
-
# @option opts [String] :base_path__in
|
63
|
+
# @option opts [String] :base_path
|
64
|
+
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
65
|
+
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
66
|
+
# @option opts [Array<String>] :base_path__in Filter results where base_path is in a comma-separated list of values
|
67
67
|
# @option opts [Integer] :limit Number of results to return per page.
|
68
|
-
# @option opts [String] :name
|
69
|
-
# @option opts [String] :
|
68
|
+
# @option opts [String] :name
|
69
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
70
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
71
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
72
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
70
73
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
71
74
|
# @option opts [String] :ordering Which field to use when ordering the results.
|
75
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
72
76
|
# @option opts [String] :fields A list of fields to include in the response.
|
73
77
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
74
78
|
# @return [PaginatedmavenMavenDistributionResponseList]
|
@@ -61,16 +61,20 @@ describe 'RemotesMavenApi' do
|
|
61
61
|
# A ViewSet for MavenRemote.
|
62
62
|
# @param [Hash] opts the optional parameters
|
63
63
|
# @option opts [Integer] :limit Number of results to return per page.
|
64
|
-
# @option opts [String] :name
|
65
|
-
# @option opts [String] :
|
64
|
+
# @option opts [String] :name
|
65
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
66
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
67
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
68
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
66
69
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
67
70
|
# @option opts [String] :ordering Which field to use when ordering the results.
|
68
|
-
# @option opts [String] :
|
69
|
-
# @option opts [
|
70
|
-
# @option opts [
|
71
|
-
# @option opts [
|
72
|
-
# @option opts [
|
73
|
-
# @option opts [
|
71
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
72
|
+
# @option opts [DateTime] :pulp_last_updated ISO 8601 formatted dates are supported
|
73
|
+
# @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
|
74
|
+
# @option opts [DateTime] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
|
75
|
+
# @option opts [DateTime] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
|
76
|
+
# @option opts [DateTime] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
|
77
|
+
# @option opts [Array<DateTime>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
|
74
78
|
# @option opts [String] :fields A list of fields to include in the response.
|
75
79
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
76
80
|
# @return [PaginatedmavenMavenRemoteResponseList]
|
@@ -61,10 +61,14 @@ describe 'RepositoriesMavenApi' do
|
|
61
61
|
# A ViewSet for MavenRemote.
|
62
62
|
# @param [Hash] opts the optional parameters
|
63
63
|
# @option opts [Integer] :limit Number of results to return per page.
|
64
|
-
# @option opts [String] :name
|
65
|
-
# @option opts [String] :
|
64
|
+
# @option opts [String] :name
|
65
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
66
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
67
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
68
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
66
69
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
67
70
|
# @option opts [String] :ordering Which field to use when ordering the results.
|
71
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
68
72
|
# @option opts [String] :fields A list of fields to include in the response.
|
69
73
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
70
74
|
# @return [PaginatedmavenMavenRepositoryResponseList]
|
@@ -49,23 +49,23 @@ describe 'RepositoriesMavenVersionsApi' do
|
|
49
49
|
# MavenRepositoryVersion represents a single Maven repository version.
|
50
50
|
# @param maven_maven_repository_href
|
51
51
|
# @param [Hash] opts the optional parameters
|
52
|
-
# @option opts [String] :content
|
53
|
-
# @option opts [String] :content__in
|
52
|
+
# @option opts [String] :content Content Unit referenced by HREF
|
53
|
+
# @option opts [String] :content__in Content Unit referenced by HREF
|
54
54
|
# @option opts [Integer] :limit Number of results to return per page.
|
55
|
-
# @option opts [
|
56
|
-
# @option opts [
|
57
|
-
# @option opts [
|
58
|
-
# @option opts [
|
59
|
-
# @option opts [
|
60
|
-
# @option opts [
|
55
|
+
# @option opts [Integer] :number
|
56
|
+
# @option opts [Integer] :number__gt Filter results where number is greater than value
|
57
|
+
# @option opts [Integer] :number__gte Filter results where number is greater than or equal to value
|
58
|
+
# @option opts [Integer] :number__lt Filter results where number is less than value
|
59
|
+
# @option opts [Integer] :number__lte Filter results where number is less than or equal to value
|
60
|
+
# @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
|
61
61
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
62
62
|
# @option opts [String] :ordering Which field to use when ordering the results.
|
63
|
-
# @option opts [
|
64
|
-
# @option opts [
|
65
|
-
# @option opts [
|
66
|
-
# @option opts [
|
67
|
-
# @option opts [
|
68
|
-
# @option opts [
|
63
|
+
# @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
|
64
|
+
# @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
|
65
|
+
# @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
66
|
+
# @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
|
67
|
+
# @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
68
|
+
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
69
69
|
# @option opts [String] :fields A list of fields to include in the response.
|
70
70
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
71
71
|
# @return [PaginatedRepositoryVersionResponseList]
|
@@ -62,12 +62,24 @@ describe 'MavenMavenDistributionResponse' do
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
describe 'test attribute "pulp_labels"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
65
71
|
describe 'test attribute "name"' do
|
66
72
|
it 'should work' do
|
67
73
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
74
|
end
|
69
75
|
end
|
70
76
|
|
77
|
+
describe 'test attribute "repository"' do
|
78
|
+
it 'should work' do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
71
83
|
describe 'test attribute "remote"' do
|
72
84
|
it 'should work' do
|
73
85
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -44,12 +44,24 @@ describe 'MavenMavenDistribution' do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
describe 'test attribute "pulp_labels"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
47
53
|
describe 'test attribute "name"' do
|
48
54
|
it 'should work' do
|
49
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
56
|
end
|
51
57
|
end
|
52
58
|
|
59
|
+
describe 'test attribute "repository"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
53
65
|
describe 'test attribute "remote"' do
|
54
66
|
it 'should work' do
|
55
67
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -68,73 +68,73 @@ describe 'MavenMavenRemoteResponse' do
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
describe 'test attribute "
|
71
|
+
describe 'test attribute "tls_validation"' do
|
72
72
|
it 'should work' do
|
73
73
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
-
describe 'test attribute "
|
77
|
+
describe 'test attribute "proxy_url"' do
|
78
78
|
it 'should work' do
|
79
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
-
describe 'test attribute "
|
83
|
+
describe 'test attribute "pulp_labels"' do
|
84
84
|
it 'should work' do
|
85
85
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
describe 'test attribute "
|
89
|
+
describe 'test attribute "pulp_last_updated"' do
|
90
90
|
it 'should work' do
|
91
91
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
-
describe 'test attribute "
|
95
|
+
describe 'test attribute "download_concurrency"' do
|
96
96
|
it 'should work' do
|
97
97
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
-
describe 'test attribute "
|
101
|
+
describe 'test attribute "policy"' do
|
102
102
|
it 'should work' do
|
103
103
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
-
describe 'test attribute "
|
107
|
+
describe 'test attribute "total_timeout"' do
|
108
108
|
it 'should work' do
|
109
109
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
-
describe 'test attribute "
|
113
|
+
describe 'test attribute "connect_timeout"' do
|
114
114
|
it 'should work' do
|
115
115
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
|
-
describe 'test attribute "
|
119
|
+
describe 'test attribute "sock_connect_timeout"' do
|
120
120
|
it 'should work' do
|
121
121
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
125
|
-
describe 'test attribute "
|
125
|
+
describe 'test attribute "sock_read_timeout"' do
|
126
126
|
it 'should work' do
|
127
127
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
-
describe 'test attribute "
|
131
|
+
describe 'test attribute "headers"' do
|
132
132
|
it 'should work' do
|
133
133
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
137
|
-
describe 'test attribute "
|
137
|
+
describe 'test attribute "rate_limit"' do
|
138
138
|
it 'should work' do
|
139
139
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
140
140
|
end
|