lockss-pyclient 0.1.0.dev1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lockss/pyclient/__init__.py +67 -0
- lockss/pyclient/config/__init__.py +42 -0
- lockss/pyclient/config/api/__init__.py +12 -0
- lockss/pyclient/config/api/aus_api.py +2195 -0
- lockss/pyclient/config/api/config_api.py +718 -0
- lockss/pyclient/config/api/plugins_api.py +128 -0
- lockss/pyclient/config/api/status_api.py +120 -0
- lockss/pyclient/config/api/tdb_api.py +318 -0
- lockss/pyclient/config/api/users_api.py +516 -0
- lockss/pyclient/config/api/utils_api.py +128 -0
- lockss/pyclient/config/api_client.py +632 -0
- lockss/pyclient/config/configuration.py +254 -0
- lockss/pyclient/config/models/__init__.py +30 -0
- lockss/pyclient/config/models/api_status.py +344 -0
- lockss/pyclient/config/models/au_configuration.py +142 -0
- lockss/pyclient/config/models/au_status.py +113 -0
- lockss/pyclient/config/models/au_ws_result.py +113 -0
- lockss/pyclient/config/models/auids_body.py +168 -0
- lockss/pyclient/config/models/check_substance_result.py +212 -0
- lockss/pyclient/config/models/content_configuration_result.py +200 -0
- lockss/pyclient/config/models/file_section_name_body.py +113 -0
- lockss/pyclient/config/models/platform_configuration_ws_result.py +113 -0
- lockss/pyclient/config/models/plugin_ws_result.py +345 -0
- lockss/pyclient/config/models/request_au_control_result.py +171 -0
- lockss/pyclient/config/models/tdb_au_ws_result.py +360 -0
- lockss/pyclient/config/models/tdb_publisher_ws_result.py +113 -0
- lockss/pyclient/config/models/tdb_title_ws_result.py +390 -0
- lockss/pyclient/config/rest.py +317 -0
- lockss/pyclient/crawler/__init__.py +45 -0
- lockss/pyclient/crawler/api/__init__.py +10 -0
- lockss/pyclient/crawler/api/crawlers_api.py +215 -0
- lockss/pyclient/crawler/api/crawls_api.py +952 -0
- lockss/pyclient/crawler/api/jobs_api.py +504 -0
- lockss/pyclient/crawler/api/status_api.py +120 -0
- lockss/pyclient/crawler/api/ws_api.py +128 -0
- lockss/pyclient/crawler/api_client.py +632 -0
- lockss/pyclient/crawler/configuration.py +254 -0
- lockss/pyclient/crawler/models/__init__.py +35 -0
- lockss/pyclient/crawler/models/api_status.py +344 -0
- lockss/pyclient/crawler/models/counter.py +142 -0
- lockss/pyclient/crawler/models/crawl_desc.py +344 -0
- lockss/pyclient/crawler/models/crawl_job.py +280 -0
- lockss/pyclient/crawler/models/crawl_pager.py +140 -0
- lockss/pyclient/crawler/models/crawl_status.py +780 -0
- lockss/pyclient/crawler/models/crawl_ws_result.py +814 -0
- lockss/pyclient/crawler/models/crawl_ws_result_pages_with_errors.py +162 -0
- lockss/pyclient/crawler/models/crawler_config.py +142 -0
- lockss/pyclient/crawler/models/crawler_status.py +279 -0
- lockss/pyclient/crawler/models/crawler_statuses.py +112 -0
- lockss/pyclient/crawler/models/error_result.py +164 -0
- lockss/pyclient/crawler/models/job_pager.py +140 -0
- lockss/pyclient/crawler/models/job_status.py +147 -0
- lockss/pyclient/crawler/models/mime_counter.py +169 -0
- lockss/pyclient/crawler/models/page_info.py +228 -0
- lockss/pyclient/crawler/models/url_error.py +148 -0
- lockss/pyclient/crawler/models/url_info.py +167 -0
- lockss/pyclient/crawler/models/url_pager.py +140 -0
- lockss/pyclient/crawler/rest.py +317 -0
- lockss/pyclient/md/__init__.py +36 -0
- lockss/pyclient/md/api/__init__.py +9 -0
- lockss/pyclient/md/api/mdupdates_api.py +508 -0
- lockss/pyclient/md/api/metadata_api.py +136 -0
- lockss/pyclient/md/api/status_api.py +120 -0
- lockss/pyclient/md/api/urls_api.py +224 -0
- lockss/pyclient/md/api_client.py +632 -0
- lockss/pyclient/md/configuration.py +254 -0
- lockss/pyclient/md/models/__init__.py +27 -0
- lockss/pyclient/md/models/api_status.py +344 -0
- lockss/pyclient/md/models/au.py +169 -0
- lockss/pyclient/md/models/au_metadata_page_info.py +140 -0
- lockss/pyclient/md/models/error_result.py +164 -0
- lockss/pyclient/md/models/item_metadata.py +196 -0
- lockss/pyclient/md/models/job.py +280 -0
- lockss/pyclient/md/models/job_page_info.py +140 -0
- lockss/pyclient/md/models/metadata_update_spec.py +142 -0
- lockss/pyclient/md/models/page_info.py +228 -0
- lockss/pyclient/md/models/status.py +142 -0
- lockss/pyclient/md/models/url_info.py +142 -0
- lockss/pyclient/md/rest.py +317 -0
- lockss/pyclient/poller/__init__.py +54 -0
- lockss/pyclient/poller/api/__init__.py +13 -0
- lockss/pyclient/poller/api/export_api.py +156 -0
- lockss/pyclient/poller/api/hash_api.py +413 -0
- lockss/pyclient/poller/api/import_api.py +157 -0
- lockss/pyclient/poller/api/poll_detail_api.py +374 -0
- lockss/pyclient/poller/api/poller_polls_api.py +223 -0
- lockss/pyclient/poller/api/repo_api.py +223 -0
- lockss/pyclient/poller/api/service_api.py +694 -0
- lockss/pyclient/poller/api/voter_polls_api.py +223 -0
- lockss/pyclient/poller/api_client.py +632 -0
- lockss/pyclient/poller/configuration.py +254 -0
- lockss/pyclient/poller/models/__init__.py +41 -0
- lockss/pyclient/poller/models/api_status.py +344 -0
- lockss/pyclient/poller/models/aus_import_body.py +199 -0
- lockss/pyclient/poller/models/cached_uri_set_spec.py +169 -0
- lockss/pyclient/poller/models/error_result.py +164 -0
- lockss/pyclient/poller/models/hasher_ws_params.py +432 -0
- lockss/pyclient/poller/models/link_desc.py +141 -0
- lockss/pyclient/poller/models/page_desc.py +227 -0
- lockss/pyclient/poller/models/peer_data.py +638 -0
- lockss/pyclient/poller/models/peer_ws_result.py +113 -0
- lockss/pyclient/poller/models/poll_desc.py +285 -0
- lockss/pyclient/poller/models/poll_ws_result.py +142 -0
- lockss/pyclient/poller/models/poller_detail.py +613 -0
- lockss/pyclient/poller/models/poller_pager.py +139 -0
- lockss/pyclient/poller/models/poller_summary.py +452 -0
- lockss/pyclient/poller/models/repair_data.py +176 -0
- lockss/pyclient/poller/models/repair_pager.py +139 -0
- lockss/pyclient/poller/models/repair_queue.py +249 -0
- lockss/pyclient/poller/models/repository_space_ws_result.py +113 -0
- lockss/pyclient/poller/models/repository_ws_result.py +113 -0
- lockss/pyclient/poller/models/tally_data.py +471 -0
- lockss/pyclient/poller/models/url_pager.py +139 -0
- lockss/pyclient/poller/models/vote_ws_result.py +142 -0
- lockss/pyclient/poller/models/voter_detail.py +701 -0
- lockss/pyclient/poller/models/voter_pager.py +139 -0
- lockss/pyclient/poller/models/voter_summary.py +284 -0
- lockss/pyclient/poller/rest.py +317 -0
- lockss/pyclient/rs/__init__.py +41 -0
- lockss/pyclient/rs/api/__init__.py +10 -0
- lockss/pyclient/rs/api/artifacts_api.py +988 -0
- lockss/pyclient/rs/api/aus_api.py +334 -0
- lockss/pyclient/rs/api/repo_api.py +379 -0
- lockss/pyclient/rs/api/status_api.py +120 -0
- lockss/pyclient/rs/api/wayback_api.py +386 -0
- lockss/pyclient/rs/api_client.py +632 -0
- lockss/pyclient/rs/configuration.py +247 -0
- lockss/pyclient/rs/models/__init__.py +31 -0
- lockss/pyclient/rs/models/api_status.py +344 -0
- lockss/pyclient/rs/models/archives_body.py +142 -0
- lockss/pyclient/rs/models/artifact.py +344 -0
- lockss/pyclient/rs/models/artifact_page_info.py +140 -0
- lockss/pyclient/rs/models/artifact_properties.py +344 -0
- lockss/pyclient/rs/models/artifacts_body.py +170 -0
- lockss/pyclient/rs/models/au_size.py +162 -0
- lockss/pyclient/rs/models/auid_page_info.py +140 -0
- lockss/pyclient/rs/models/error_result.py +164 -0
- lockss/pyclient/rs/models/import_status.py +298 -0
- lockss/pyclient/rs/models/page_info.py +229 -0
- lockss/pyclient/rs/models/repository_info.py +164 -0
- lockss/pyclient/rs/models/repository_statistics.py +112 -0
- lockss/pyclient/rs/models/storage_info.py +287 -0
- lockss/pyclient/rs/models/streaming_response_body.py +84 -0
- lockss/pyclient/rs/rest.py +317 -0
- lockss_pyclient-0.1.0.dev1.dist-info/LICENSE +27 -0
- lockss_pyclient-0.1.0.dev1.dist-info/METADATA +29 -0
- lockss_pyclient-0.1.0.dev1.dist-info/RECORD +148 -0
- lockss_pyclient-0.1.0.dev1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,988 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LOCKSS Repository Service REST API
|
|
5
|
+
|
|
6
|
+
REST API of the LOCKSS Repository Service # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 2.0.0
|
|
9
|
+
Contact: lockss-support@lockss.org
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import absolute_import
|
|
14
|
+
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
|
|
17
|
+
# python 2 and python 3 compatibility library
|
|
18
|
+
import six
|
|
19
|
+
|
|
20
|
+
from lockss.pyclient.rs.api_client import ApiClient
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ArtifactsApi(object):
|
|
24
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
25
|
+
|
|
26
|
+
Do not edit the class manually.
|
|
27
|
+
Ref: https://github.com/swagger-api/swagger-codegen
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
def __init__(self, api_client=None):
|
|
31
|
+
if api_client is None:
|
|
32
|
+
api_client = ApiClient()
|
|
33
|
+
self.api_client = api_client
|
|
34
|
+
|
|
35
|
+
def add_artifacts(self, auid, archive, **kwargs): # noqa: E501
|
|
36
|
+
"""Imports artifacts from an archive # noqa: E501
|
|
37
|
+
|
|
38
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
39
|
+
asynchronous HTTP request, please pass async_req=True
|
|
40
|
+
>>> thread = api.add_artifacts(auid, archive, async_req=True)
|
|
41
|
+
>>> result = thread.get()
|
|
42
|
+
|
|
43
|
+
:param async_req bool
|
|
44
|
+
:param str auid: (required)
|
|
45
|
+
:param str archive: (required)
|
|
46
|
+
:param str namespace: Namespace of the artifacts
|
|
47
|
+
:param bool store_duplicate: If true, artifacts with duplicate content will be stored, otherwise suppressed
|
|
48
|
+
:param str exclude_status_pattern: If supplied, WARC records whose HTTP response status code matches the regular expression will not be imported
|
|
49
|
+
:return: str
|
|
50
|
+
If the method is called asynchronously,
|
|
51
|
+
returns the request thread.
|
|
52
|
+
"""
|
|
53
|
+
kwargs['_return_http_data_only'] = True
|
|
54
|
+
if kwargs.get('async_req'):
|
|
55
|
+
return self.add_artifacts_with_http_info(auid, archive, **kwargs) # noqa: E501
|
|
56
|
+
else:
|
|
57
|
+
(data) = self.add_artifacts_with_http_info(auid, archive, **kwargs) # noqa: E501
|
|
58
|
+
return data
|
|
59
|
+
|
|
60
|
+
def add_artifacts_with_http_info(self, auid, archive, **kwargs): # noqa: E501
|
|
61
|
+
"""Imports artifacts from an archive # noqa: E501
|
|
62
|
+
|
|
63
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
64
|
+
asynchronous HTTP request, please pass async_req=True
|
|
65
|
+
>>> thread = api.add_artifacts_with_http_info(auid, archive, async_req=True)
|
|
66
|
+
>>> result = thread.get()
|
|
67
|
+
|
|
68
|
+
:param async_req bool
|
|
69
|
+
:param str auid: (required)
|
|
70
|
+
:param str archive: (required)
|
|
71
|
+
:param str namespace: Namespace of the artifacts
|
|
72
|
+
:param bool store_duplicate: If true, artifacts with duplicate content will be stored, otherwise suppressed
|
|
73
|
+
:param str exclude_status_pattern: If supplied, WARC records whose HTTP response status code matches the regular expression will not be imported
|
|
74
|
+
:return: str
|
|
75
|
+
If the method is called asynchronously,
|
|
76
|
+
returns the request thread.
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
all_params = ['auid', 'archive', 'namespace', 'store_duplicate', 'exclude_status_pattern'] # noqa: E501
|
|
80
|
+
all_params.append('async_req')
|
|
81
|
+
all_params.append('_return_http_data_only')
|
|
82
|
+
all_params.append('_preload_content')
|
|
83
|
+
all_params.append('_request_timeout')
|
|
84
|
+
|
|
85
|
+
params = locals()
|
|
86
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
87
|
+
if key not in all_params:
|
|
88
|
+
raise TypeError(
|
|
89
|
+
"Got an unexpected keyword argument '%s'"
|
|
90
|
+
" to method add_artifacts" % key
|
|
91
|
+
)
|
|
92
|
+
params[key] = val
|
|
93
|
+
del params['kwargs']
|
|
94
|
+
# verify the required parameter 'auid' is set
|
|
95
|
+
if ('auid' not in params or
|
|
96
|
+
params['auid'] is None):
|
|
97
|
+
raise ValueError("Missing the required parameter `auid` when calling `add_artifacts`") # noqa: E501
|
|
98
|
+
# verify the required parameter 'archive' is set
|
|
99
|
+
if ('archive' not in params or
|
|
100
|
+
params['archive'] is None):
|
|
101
|
+
raise ValueError("Missing the required parameter `archive` when calling `add_artifacts`") # noqa: E501
|
|
102
|
+
|
|
103
|
+
collection_formats = {}
|
|
104
|
+
|
|
105
|
+
path_params = {}
|
|
106
|
+
|
|
107
|
+
query_params = []
|
|
108
|
+
if 'namespace' in params:
|
|
109
|
+
query_params.append(('namespace', params['namespace'])) # noqa: E501
|
|
110
|
+
if 'store_duplicate' in params:
|
|
111
|
+
query_params.append(('storeDuplicate', params['store_duplicate'])) # noqa: E501
|
|
112
|
+
if 'exclude_status_pattern' in params:
|
|
113
|
+
query_params.append(('excludeStatusPattern', params['exclude_status_pattern'])) # noqa: E501
|
|
114
|
+
|
|
115
|
+
header_params = {}
|
|
116
|
+
|
|
117
|
+
form_params = []
|
|
118
|
+
local_var_files = {}
|
|
119
|
+
if 'auid' in params:
|
|
120
|
+
form_params.append(('auid', params['auid'])) # noqa: E501
|
|
121
|
+
if 'archive' in params:
|
|
122
|
+
local_var_files['archive'] = params['archive'] # noqa: E501
|
|
123
|
+
|
|
124
|
+
body_params = None
|
|
125
|
+
# HTTP header `Accept`
|
|
126
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
127
|
+
['application/json']) # noqa: E501
|
|
128
|
+
|
|
129
|
+
# HTTP header `Content-Type`
|
|
130
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
131
|
+
['multipart/form-data']) # noqa: E501
|
|
132
|
+
|
|
133
|
+
# Authentication setting
|
|
134
|
+
auth_settings = [] # noqa: E501
|
|
135
|
+
|
|
136
|
+
return self.api_client.call_api(
|
|
137
|
+
'/archives', 'POST',
|
|
138
|
+
path_params,
|
|
139
|
+
query_params,
|
|
140
|
+
header_params,
|
|
141
|
+
body=body_params,
|
|
142
|
+
post_params=form_params,
|
|
143
|
+
files=local_var_files,
|
|
144
|
+
response_type='str', # noqa: E501
|
|
145
|
+
auth_settings=auth_settings,
|
|
146
|
+
async_req=params.get('async_req'),
|
|
147
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
148
|
+
_preload_content=params.get('_preload_content', True),
|
|
149
|
+
_request_timeout=params.get('_request_timeout'),
|
|
150
|
+
collection_formats=collection_formats)
|
|
151
|
+
|
|
152
|
+
def create_artifact(self, **kwargs): # noqa: E501
|
|
153
|
+
"""Create an artifact # noqa: E501
|
|
154
|
+
|
|
155
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
156
|
+
asynchronous HTTP request, please pass async_req=True
|
|
157
|
+
>>> thread = api.create_artifact(async_req=True)
|
|
158
|
+
>>> result = thread.get()
|
|
159
|
+
|
|
160
|
+
:param async_req bool
|
|
161
|
+
:param str artifact_props:
|
|
162
|
+
:param str payload:
|
|
163
|
+
:param str http_response_header:
|
|
164
|
+
:return: Artifact
|
|
165
|
+
If the method is called asynchronously,
|
|
166
|
+
returns the request thread.
|
|
167
|
+
"""
|
|
168
|
+
kwargs['_return_http_data_only'] = True
|
|
169
|
+
if kwargs.get('async_req'):
|
|
170
|
+
return self.create_artifact_with_http_info(**kwargs) # noqa: E501
|
|
171
|
+
else:
|
|
172
|
+
(data) = self.create_artifact_with_http_info(**kwargs) # noqa: E501
|
|
173
|
+
return data
|
|
174
|
+
|
|
175
|
+
def create_artifact_with_http_info(self, **kwargs): # noqa: E501
|
|
176
|
+
"""Create an artifact # noqa: E501
|
|
177
|
+
|
|
178
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
179
|
+
asynchronous HTTP request, please pass async_req=True
|
|
180
|
+
>>> thread = api.create_artifact_with_http_info(async_req=True)
|
|
181
|
+
>>> result = thread.get()
|
|
182
|
+
|
|
183
|
+
:param async_req bool
|
|
184
|
+
:param str artifact_props:
|
|
185
|
+
:param str payload:
|
|
186
|
+
:param str http_response_header:
|
|
187
|
+
:return: Artifact
|
|
188
|
+
If the method is called asynchronously,
|
|
189
|
+
returns the request thread.
|
|
190
|
+
"""
|
|
191
|
+
|
|
192
|
+
all_params = ['artifact_props', 'payload', 'http_response_header'] # noqa: E501
|
|
193
|
+
all_params.append('async_req')
|
|
194
|
+
all_params.append('_return_http_data_only')
|
|
195
|
+
all_params.append('_preload_content')
|
|
196
|
+
all_params.append('_request_timeout')
|
|
197
|
+
|
|
198
|
+
params = locals()
|
|
199
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
200
|
+
if key not in all_params:
|
|
201
|
+
raise TypeError(
|
|
202
|
+
"Got an unexpected keyword argument '%s'"
|
|
203
|
+
" to method create_artifact" % key
|
|
204
|
+
)
|
|
205
|
+
params[key] = val
|
|
206
|
+
del params['kwargs']
|
|
207
|
+
|
|
208
|
+
collection_formats = {}
|
|
209
|
+
|
|
210
|
+
path_params = {}
|
|
211
|
+
|
|
212
|
+
query_params = []
|
|
213
|
+
|
|
214
|
+
header_params = {}
|
|
215
|
+
|
|
216
|
+
form_params = []
|
|
217
|
+
local_var_files = {}
|
|
218
|
+
if 'artifact_props' in params:
|
|
219
|
+
form_params.append(('artifactProps', params['artifact_props'])) # noqa: E501
|
|
220
|
+
if 'payload' in params:
|
|
221
|
+
local_var_files['payload'] = params['payload'] # noqa: E501
|
|
222
|
+
if 'http_response_header' in params:
|
|
223
|
+
form_params.append(('httpResponseHeader', params['http_response_header'])) # noqa: E501
|
|
224
|
+
|
|
225
|
+
body_params = None
|
|
226
|
+
# HTTP header `Accept`
|
|
227
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
228
|
+
['application/json']) # noqa: E501
|
|
229
|
+
|
|
230
|
+
# HTTP header `Content-Type`
|
|
231
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
232
|
+
['multipart/form-data']) # noqa: E501
|
|
233
|
+
|
|
234
|
+
# Authentication setting
|
|
235
|
+
auth_settings = [] # noqa: E501
|
|
236
|
+
|
|
237
|
+
return self.api_client.call_api(
|
|
238
|
+
'/artifacts', 'POST',
|
|
239
|
+
path_params,
|
|
240
|
+
query_params,
|
|
241
|
+
header_params,
|
|
242
|
+
body=body_params,
|
|
243
|
+
post_params=form_params,
|
|
244
|
+
files=local_var_files,
|
|
245
|
+
response_type='Artifact', # noqa: E501
|
|
246
|
+
auth_settings=auth_settings,
|
|
247
|
+
async_req=params.get('async_req'),
|
|
248
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
249
|
+
_preload_content=params.get('_preload_content', True),
|
|
250
|
+
_request_timeout=params.get('_request_timeout'),
|
|
251
|
+
collection_formats=collection_formats)
|
|
252
|
+
|
|
253
|
+
def delete_artifact(self, uuid, **kwargs): # noqa: E501
|
|
254
|
+
"""Remove an artifact from the repository # noqa: E501
|
|
255
|
+
|
|
256
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
257
|
+
asynchronous HTTP request, please pass async_req=True
|
|
258
|
+
>>> thread = api.delete_artifact(uuid, async_req=True)
|
|
259
|
+
>>> result = thread.get()
|
|
260
|
+
|
|
261
|
+
:param async_req bool
|
|
262
|
+
:param str uuid: Identifier of the artifact (required)
|
|
263
|
+
:param str namespace: Namespace of the artifacts
|
|
264
|
+
:return: None
|
|
265
|
+
If the method is called asynchronously,
|
|
266
|
+
returns the request thread.
|
|
267
|
+
"""
|
|
268
|
+
kwargs['_return_http_data_only'] = True
|
|
269
|
+
if kwargs.get('async_req'):
|
|
270
|
+
return self.delete_artifact_with_http_info(uuid, **kwargs) # noqa: E501
|
|
271
|
+
else:
|
|
272
|
+
(data) = self.delete_artifact_with_http_info(uuid, **kwargs) # noqa: E501
|
|
273
|
+
return data
|
|
274
|
+
|
|
275
|
+
def delete_artifact_with_http_info(self, uuid, **kwargs): # noqa: E501
|
|
276
|
+
"""Remove an artifact from the repository # noqa: E501
|
|
277
|
+
|
|
278
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
279
|
+
asynchronous HTTP request, please pass async_req=True
|
|
280
|
+
>>> thread = api.delete_artifact_with_http_info(uuid, async_req=True)
|
|
281
|
+
>>> result = thread.get()
|
|
282
|
+
|
|
283
|
+
:param async_req bool
|
|
284
|
+
:param str uuid: Identifier of the artifact (required)
|
|
285
|
+
:param str namespace: Namespace of the artifacts
|
|
286
|
+
:return: None
|
|
287
|
+
If the method is called asynchronously,
|
|
288
|
+
returns the request thread.
|
|
289
|
+
"""
|
|
290
|
+
|
|
291
|
+
all_params = ['uuid', 'namespace'] # noqa: E501
|
|
292
|
+
all_params.append('async_req')
|
|
293
|
+
all_params.append('_return_http_data_only')
|
|
294
|
+
all_params.append('_preload_content')
|
|
295
|
+
all_params.append('_request_timeout')
|
|
296
|
+
|
|
297
|
+
params = locals()
|
|
298
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
299
|
+
if key not in all_params:
|
|
300
|
+
raise TypeError(
|
|
301
|
+
"Got an unexpected keyword argument '%s'"
|
|
302
|
+
" to method delete_artifact" % key
|
|
303
|
+
)
|
|
304
|
+
params[key] = val
|
|
305
|
+
del params['kwargs']
|
|
306
|
+
# verify the required parameter 'uuid' is set
|
|
307
|
+
if ('uuid' not in params or
|
|
308
|
+
params['uuid'] is None):
|
|
309
|
+
raise ValueError("Missing the required parameter `uuid` when calling `delete_artifact`") # noqa: E501
|
|
310
|
+
|
|
311
|
+
collection_formats = {}
|
|
312
|
+
|
|
313
|
+
path_params = {}
|
|
314
|
+
if 'uuid' in params:
|
|
315
|
+
path_params['uuid'] = params['uuid'] # noqa: E501
|
|
316
|
+
|
|
317
|
+
query_params = []
|
|
318
|
+
if 'namespace' in params:
|
|
319
|
+
query_params.append(('namespace', params['namespace'])) # noqa: E501
|
|
320
|
+
|
|
321
|
+
header_params = {}
|
|
322
|
+
|
|
323
|
+
form_params = []
|
|
324
|
+
local_var_files = {}
|
|
325
|
+
|
|
326
|
+
body_params = None
|
|
327
|
+
# HTTP header `Accept`
|
|
328
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
329
|
+
['application/json']) # noqa: E501
|
|
330
|
+
|
|
331
|
+
# Authentication setting
|
|
332
|
+
auth_settings = [] # noqa: E501
|
|
333
|
+
|
|
334
|
+
return self.api_client.call_api(
|
|
335
|
+
'/artifacts/{uuid}', 'DELETE',
|
|
336
|
+
path_params,
|
|
337
|
+
query_params,
|
|
338
|
+
header_params,
|
|
339
|
+
body=body_params,
|
|
340
|
+
post_params=form_params,
|
|
341
|
+
files=local_var_files,
|
|
342
|
+
response_type=None, # noqa: E501
|
|
343
|
+
auth_settings=auth_settings,
|
|
344
|
+
async_req=params.get('async_req'),
|
|
345
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
346
|
+
_preload_content=params.get('_preload_content', True),
|
|
347
|
+
_request_timeout=params.get('_request_timeout'),
|
|
348
|
+
collection_formats=collection_formats)
|
|
349
|
+
|
|
350
|
+
def get_artifact_data_by_multipart(self, uuid, **kwargs): # noqa: E501
|
|
351
|
+
"""Get artifact and metadata # noqa: E501
|
|
352
|
+
|
|
353
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
354
|
+
asynchronous HTTP request, please pass async_req=True
|
|
355
|
+
>>> thread = api.get_artifact_data_by_multipart(uuid, async_req=True)
|
|
356
|
+
>>> result = thread.get()
|
|
357
|
+
|
|
358
|
+
:param async_req bool
|
|
359
|
+
:param str uuid: Identifier of the artifact (required)
|
|
360
|
+
:param str namespace: Namespace of the artifacts
|
|
361
|
+
:param str include_content: Controls whether to include the artifact content part in multipart response
|
|
362
|
+
:return: str
|
|
363
|
+
If the method is called asynchronously,
|
|
364
|
+
returns the request thread.
|
|
365
|
+
"""
|
|
366
|
+
kwargs['_return_http_data_only'] = True
|
|
367
|
+
if kwargs.get('async_req'):
|
|
368
|
+
return self.get_artifact_data_by_multipart_with_http_info(uuid, **kwargs) # noqa: E501
|
|
369
|
+
else:
|
|
370
|
+
(data) = self.get_artifact_data_by_multipart_with_http_info(uuid, **kwargs) # noqa: E501
|
|
371
|
+
return data
|
|
372
|
+
|
|
373
|
+
def get_artifact_data_by_multipart_with_http_info(self, uuid, **kwargs): # noqa: E501
|
|
374
|
+
"""Get artifact and metadata # noqa: E501
|
|
375
|
+
|
|
376
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
377
|
+
asynchronous HTTP request, please pass async_req=True
|
|
378
|
+
>>> thread = api.get_artifact_data_by_multipart_with_http_info(uuid, async_req=True)
|
|
379
|
+
>>> result = thread.get()
|
|
380
|
+
|
|
381
|
+
:param async_req bool
|
|
382
|
+
:param str uuid: Identifier of the artifact (required)
|
|
383
|
+
:param str namespace: Namespace of the artifacts
|
|
384
|
+
:param str include_content: Controls whether to include the artifact content part in multipart response
|
|
385
|
+
:return: str
|
|
386
|
+
If the method is called asynchronously,
|
|
387
|
+
returns the request thread.
|
|
388
|
+
"""
|
|
389
|
+
|
|
390
|
+
all_params = ['uuid', 'namespace', 'include_content'] # noqa: E501
|
|
391
|
+
all_params.append('async_req')
|
|
392
|
+
all_params.append('_return_http_data_only')
|
|
393
|
+
all_params.append('_preload_content')
|
|
394
|
+
all_params.append('_request_timeout')
|
|
395
|
+
|
|
396
|
+
params = locals()
|
|
397
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
398
|
+
if key not in all_params:
|
|
399
|
+
raise TypeError(
|
|
400
|
+
"Got an unexpected keyword argument '%s'"
|
|
401
|
+
" to method get_artifact_data_by_multipart" % key
|
|
402
|
+
)
|
|
403
|
+
params[key] = val
|
|
404
|
+
del params['kwargs']
|
|
405
|
+
# verify the required parameter 'uuid' is set
|
|
406
|
+
if ('uuid' not in params or
|
|
407
|
+
params['uuid'] is None):
|
|
408
|
+
raise ValueError("Missing the required parameter `uuid` when calling `get_artifact_data_by_multipart`") # noqa: E501
|
|
409
|
+
|
|
410
|
+
collection_formats = {}
|
|
411
|
+
|
|
412
|
+
path_params = {}
|
|
413
|
+
if 'uuid' in params:
|
|
414
|
+
path_params['uuid'] = params['uuid'] # noqa: E501
|
|
415
|
+
|
|
416
|
+
query_params = []
|
|
417
|
+
if 'namespace' in params:
|
|
418
|
+
query_params.append(('namespace', params['namespace'])) # noqa: E501
|
|
419
|
+
if 'include_content' in params:
|
|
420
|
+
query_params.append(('includeContent', params['include_content'])) # noqa: E501
|
|
421
|
+
|
|
422
|
+
header_params = {}
|
|
423
|
+
|
|
424
|
+
form_params = []
|
|
425
|
+
local_var_files = {}
|
|
426
|
+
|
|
427
|
+
body_params = None
|
|
428
|
+
# HTTP header `Accept`
|
|
429
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
430
|
+
['multipart/form-data', 'application/json']) # noqa: E501
|
|
431
|
+
|
|
432
|
+
# Authentication setting
|
|
433
|
+
auth_settings = [] # noqa: E501
|
|
434
|
+
|
|
435
|
+
return self.api_client.call_api(
|
|
436
|
+
'/artifacts/{uuid}', 'GET',
|
|
437
|
+
path_params,
|
|
438
|
+
query_params,
|
|
439
|
+
header_params,
|
|
440
|
+
body=body_params,
|
|
441
|
+
post_params=form_params,
|
|
442
|
+
files=local_var_files,
|
|
443
|
+
response_type='str', # noqa: E501
|
|
444
|
+
auth_settings=auth_settings,
|
|
445
|
+
async_req=params.get('async_req'),
|
|
446
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
447
|
+
_preload_content=params.get('_preload_content', True),
|
|
448
|
+
_request_timeout=params.get('_request_timeout'),
|
|
449
|
+
collection_formats=collection_formats)
|
|
450
|
+
|
|
451
|
+
def get_artifact_data_by_payload(self, uuid, **kwargs): # noqa: E501
|
|
452
|
+
"""Get artifact payload # noqa: E501
|
|
453
|
+
|
|
454
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
455
|
+
asynchronous HTTP request, please pass async_req=True
|
|
456
|
+
>>> thread = api.get_artifact_data_by_payload(uuid, async_req=True)
|
|
457
|
+
>>> result = thread.get()
|
|
458
|
+
|
|
459
|
+
:param async_req bool
|
|
460
|
+
:param str uuid: Identifier of the artifact (required)
|
|
461
|
+
:param str namespace: Namespace of the artifacts
|
|
462
|
+
:param str include_content: Controls whether to include the artifact content part in multipart response
|
|
463
|
+
:return: str
|
|
464
|
+
If the method is called asynchronously,
|
|
465
|
+
returns the request thread.
|
|
466
|
+
"""
|
|
467
|
+
kwargs['_return_http_data_only'] = True
|
|
468
|
+
if kwargs.get('async_req'):
|
|
469
|
+
return self.get_artifact_data_by_payload_with_http_info(uuid, **kwargs) # noqa: E501
|
|
470
|
+
else:
|
|
471
|
+
(data) = self.get_artifact_data_by_payload_with_http_info(uuid, **kwargs) # noqa: E501
|
|
472
|
+
return data
|
|
473
|
+
|
|
474
|
+
def get_artifact_data_by_payload_with_http_info(self, uuid, **kwargs): # noqa: E501
|
|
475
|
+
"""Get artifact payload # noqa: E501
|
|
476
|
+
|
|
477
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
478
|
+
asynchronous HTTP request, please pass async_req=True
|
|
479
|
+
>>> thread = api.get_artifact_data_by_payload_with_http_info(uuid, async_req=True)
|
|
480
|
+
>>> result = thread.get()
|
|
481
|
+
|
|
482
|
+
:param async_req bool
|
|
483
|
+
:param str uuid: Identifier of the artifact (required)
|
|
484
|
+
:param str namespace: Namespace of the artifacts
|
|
485
|
+
:param str include_content: Controls whether to include the artifact content part in multipart response
|
|
486
|
+
:return: str
|
|
487
|
+
If the method is called asynchronously,
|
|
488
|
+
returns the request thread.
|
|
489
|
+
"""
|
|
490
|
+
|
|
491
|
+
all_params = ['uuid', 'namespace', 'include_content'] # noqa: E501
|
|
492
|
+
all_params.append('async_req')
|
|
493
|
+
all_params.append('_return_http_data_only')
|
|
494
|
+
all_params.append('_preload_content')
|
|
495
|
+
all_params.append('_request_timeout')
|
|
496
|
+
|
|
497
|
+
params = locals()
|
|
498
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
499
|
+
if key not in all_params:
|
|
500
|
+
raise TypeError(
|
|
501
|
+
"Got an unexpected keyword argument '%s'"
|
|
502
|
+
" to method get_artifact_data_by_payload" % key
|
|
503
|
+
)
|
|
504
|
+
params[key] = val
|
|
505
|
+
del params['kwargs']
|
|
506
|
+
# verify the required parameter 'uuid' is set
|
|
507
|
+
if ('uuid' not in params or
|
|
508
|
+
params['uuid'] is None):
|
|
509
|
+
raise ValueError("Missing the required parameter `uuid` when calling `get_artifact_data_by_payload`") # noqa: E501
|
|
510
|
+
|
|
511
|
+
collection_formats = {}
|
|
512
|
+
|
|
513
|
+
path_params = {}
|
|
514
|
+
if 'uuid' in params:
|
|
515
|
+
path_params['uuid'] = params['uuid'] # noqa: E501
|
|
516
|
+
|
|
517
|
+
query_params = []
|
|
518
|
+
if 'namespace' in params:
|
|
519
|
+
query_params.append(('namespace', params['namespace'])) # noqa: E501
|
|
520
|
+
if 'include_content' in params:
|
|
521
|
+
query_params.append(('includeContent', params['include_content'])) # noqa: E501
|
|
522
|
+
|
|
523
|
+
header_params = {}
|
|
524
|
+
|
|
525
|
+
form_params = []
|
|
526
|
+
local_var_files = {}
|
|
527
|
+
|
|
528
|
+
body_params = None
|
|
529
|
+
# HTTP header `Accept`
|
|
530
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
531
|
+
['application/octet-stream', 'application/json']) # noqa: E501
|
|
532
|
+
|
|
533
|
+
# Authentication setting
|
|
534
|
+
auth_settings = [] # noqa: E501
|
|
535
|
+
|
|
536
|
+
return self.api_client.call_api(
|
|
537
|
+
'/artifacts/{uuid}/payload', 'GET',
|
|
538
|
+
path_params,
|
|
539
|
+
query_params,
|
|
540
|
+
header_params,
|
|
541
|
+
body=body_params,
|
|
542
|
+
post_params=form_params,
|
|
543
|
+
files=local_var_files,
|
|
544
|
+
response_type='str', # noqa: E501
|
|
545
|
+
auth_settings=auth_settings,
|
|
546
|
+
async_req=params.get('async_req'),
|
|
547
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
548
|
+
_preload_content=params.get('_preload_content', True),
|
|
549
|
+
_request_timeout=params.get('_request_timeout'),
|
|
550
|
+
collection_formats=collection_formats)
|
|
551
|
+
|
|
552
|
+
def get_artifact_data_by_response(self, uuid, **kwargs): # noqa: E501
|
|
553
|
+
"""Get artifact data as HTTP response # noqa: E501
|
|
554
|
+
|
|
555
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
556
|
+
asynchronous HTTP request, please pass async_req=True
|
|
557
|
+
>>> thread = api.get_artifact_data_by_response(uuid, async_req=True)
|
|
558
|
+
>>> result = thread.get()
|
|
559
|
+
|
|
560
|
+
:param async_req bool
|
|
561
|
+
:param str uuid: Identifier of the artifact (required)
|
|
562
|
+
:param str namespace: Namespace of the artifacts
|
|
563
|
+
:param str include_content: Controls whether to include the artifact content part in multipart response
|
|
564
|
+
:return: str
|
|
565
|
+
If the method is called asynchronously,
|
|
566
|
+
returns the request thread.
|
|
567
|
+
"""
|
|
568
|
+
kwargs['_return_http_data_only'] = True
|
|
569
|
+
if kwargs.get('async_req'):
|
|
570
|
+
return self.get_artifact_data_by_response_with_http_info(uuid, **kwargs) # noqa: E501
|
|
571
|
+
else:
|
|
572
|
+
(data) = self.get_artifact_data_by_response_with_http_info(uuid, **kwargs) # noqa: E501
|
|
573
|
+
return data
|
|
574
|
+
|
|
575
|
+
def get_artifact_data_by_response_with_http_info(self, uuid, **kwargs): # noqa: E501
|
|
576
|
+
"""Get artifact data as HTTP response # noqa: E501
|
|
577
|
+
|
|
578
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
579
|
+
asynchronous HTTP request, please pass async_req=True
|
|
580
|
+
>>> thread = api.get_artifact_data_by_response_with_http_info(uuid, async_req=True)
|
|
581
|
+
>>> result = thread.get()
|
|
582
|
+
|
|
583
|
+
:param async_req bool
|
|
584
|
+
:param str uuid: Identifier of the artifact (required)
|
|
585
|
+
:param str namespace: Namespace of the artifacts
|
|
586
|
+
:param str include_content: Controls whether to include the artifact content part in multipart response
|
|
587
|
+
:return: str
|
|
588
|
+
If the method is called asynchronously,
|
|
589
|
+
returns the request thread.
|
|
590
|
+
"""
|
|
591
|
+
|
|
592
|
+
all_params = ['uuid', 'namespace', 'include_content'] # noqa: E501
|
|
593
|
+
all_params.append('async_req')
|
|
594
|
+
all_params.append('_return_http_data_only')
|
|
595
|
+
all_params.append('_preload_content')
|
|
596
|
+
all_params.append('_request_timeout')
|
|
597
|
+
|
|
598
|
+
params = locals()
|
|
599
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
600
|
+
if key not in all_params:
|
|
601
|
+
raise TypeError(
|
|
602
|
+
"Got an unexpected keyword argument '%s'"
|
|
603
|
+
" to method get_artifact_data_by_response" % key
|
|
604
|
+
)
|
|
605
|
+
params[key] = val
|
|
606
|
+
del params['kwargs']
|
|
607
|
+
# verify the required parameter 'uuid' is set
|
|
608
|
+
if ('uuid' not in params or
|
|
609
|
+
params['uuid'] is None):
|
|
610
|
+
raise ValueError("Missing the required parameter `uuid` when calling `get_artifact_data_by_response`") # noqa: E501
|
|
611
|
+
|
|
612
|
+
collection_formats = {}
|
|
613
|
+
|
|
614
|
+
path_params = {}
|
|
615
|
+
if 'uuid' in params:
|
|
616
|
+
path_params['uuid'] = params['uuid'] # noqa: E501
|
|
617
|
+
|
|
618
|
+
query_params = []
|
|
619
|
+
if 'namespace' in params:
|
|
620
|
+
query_params.append(('namespace', params['namespace'])) # noqa: E501
|
|
621
|
+
if 'include_content' in params:
|
|
622
|
+
query_params.append(('includeContent', params['include_content'])) # noqa: E501
|
|
623
|
+
|
|
624
|
+
header_params = {}
|
|
625
|
+
|
|
626
|
+
form_params = []
|
|
627
|
+
local_var_files = {}
|
|
628
|
+
|
|
629
|
+
body_params = None
|
|
630
|
+
# HTTP header `Accept`
|
|
631
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
632
|
+
['application/http;msgtype=response', 'application/json']) # noqa: E501
|
|
633
|
+
|
|
634
|
+
# Authentication setting
|
|
635
|
+
auth_settings = [] # noqa: E501
|
|
636
|
+
|
|
637
|
+
return self.api_client.call_api(
|
|
638
|
+
'/artifacts/{uuid}/response', 'GET',
|
|
639
|
+
path_params,
|
|
640
|
+
query_params,
|
|
641
|
+
header_params,
|
|
642
|
+
body=body_params,
|
|
643
|
+
post_params=form_params,
|
|
644
|
+
files=local_var_files,
|
|
645
|
+
response_type='str', # noqa: E501
|
|
646
|
+
auth_settings=auth_settings,
|
|
647
|
+
async_req=params.get('async_req'),
|
|
648
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
649
|
+
_preload_content=params.get('_preload_content', True),
|
|
650
|
+
_request_timeout=params.get('_request_timeout'),
|
|
651
|
+
collection_formats=collection_formats)
|
|
652
|
+
|
|
653
|
+
def get_artifacts(self, auid, **kwargs): # noqa: E501
|
|
654
|
+
"""Get artifacts in an Archival Unit # noqa: E501
|
|
655
|
+
|
|
656
|
+
Get a list of all artifacts in a namespace and Archival Unit or a pageful of the list defined by the continuation token and size # noqa: E501
|
|
657
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
658
|
+
asynchronous HTTP request, please pass async_req=True
|
|
659
|
+
>>> thread = api.get_artifacts(auid, async_req=True)
|
|
660
|
+
>>> result = thread.get()
|
|
661
|
+
|
|
662
|
+
:param async_req bool
|
|
663
|
+
:param str auid: Identifier of the Archival Unit containing the artifacts (required)
|
|
664
|
+
:param str namespace: Namespace of the artifacts
|
|
665
|
+
:param str url: The URL contained by the artifacts
|
|
666
|
+
:param str url_prefix: The prefix to be matched by the artifact URLs
|
|
667
|
+
:param str version: The version of the artifact
|
|
668
|
+
:param bool include_uncommitted: Indication of whether uncommitted artifacts should be returned
|
|
669
|
+
:param int limit: The requested maximum number of artifacts per response
|
|
670
|
+
:param str continuation_token: The continuation token of the next page of artifacts to be returned
|
|
671
|
+
:return: ArtifactPageInfo
|
|
672
|
+
If the method is called asynchronously,
|
|
673
|
+
returns the request thread.
|
|
674
|
+
"""
|
|
675
|
+
kwargs['_return_http_data_only'] = True
|
|
676
|
+
if kwargs.get('async_req'):
|
|
677
|
+
return self.get_artifacts_with_http_info(auid, **kwargs) # noqa: E501
|
|
678
|
+
else:
|
|
679
|
+
(data) = self.get_artifacts_with_http_info(auid, **kwargs) # noqa: E501
|
|
680
|
+
return data
|
|
681
|
+
|
|
682
|
+
def get_artifacts_with_http_info(self, auid, **kwargs): # noqa: E501
|
|
683
|
+
"""Get artifacts in an Archival Unit # noqa: E501
|
|
684
|
+
|
|
685
|
+
Get a list of all artifacts in a namespace and Archival Unit or a pageful of the list defined by the continuation token and size # noqa: E501
|
|
686
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
687
|
+
asynchronous HTTP request, please pass async_req=True
|
|
688
|
+
>>> thread = api.get_artifacts_with_http_info(auid, async_req=True)
|
|
689
|
+
>>> result = thread.get()
|
|
690
|
+
|
|
691
|
+
:param async_req bool
|
|
692
|
+
:param str auid: Identifier of the Archival Unit containing the artifacts (required)
|
|
693
|
+
:param str namespace: Namespace of the artifacts
|
|
694
|
+
:param str url: The URL contained by the artifacts
|
|
695
|
+
:param str url_prefix: The prefix to be matched by the artifact URLs
|
|
696
|
+
:param str version: The version of the artifact
|
|
697
|
+
:param bool include_uncommitted: Indication of whether uncommitted artifacts should be returned
|
|
698
|
+
:param int limit: The requested maximum number of artifacts per response
|
|
699
|
+
:param str continuation_token: The continuation token of the next page of artifacts to be returned
|
|
700
|
+
:return: ArtifactPageInfo
|
|
701
|
+
If the method is called asynchronously,
|
|
702
|
+
returns the request thread.
|
|
703
|
+
"""
|
|
704
|
+
|
|
705
|
+
all_params = ['auid', 'namespace', 'url', 'url_prefix', 'version', 'include_uncommitted', 'limit', 'continuation_token'] # noqa: E501
|
|
706
|
+
all_params.append('async_req')
|
|
707
|
+
all_params.append('_return_http_data_only')
|
|
708
|
+
all_params.append('_preload_content')
|
|
709
|
+
all_params.append('_request_timeout')
|
|
710
|
+
|
|
711
|
+
params = locals()
|
|
712
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
713
|
+
if key not in all_params:
|
|
714
|
+
raise TypeError(
|
|
715
|
+
"Got an unexpected keyword argument '%s'"
|
|
716
|
+
" to method get_artifacts" % key
|
|
717
|
+
)
|
|
718
|
+
params[key] = val
|
|
719
|
+
del params['kwargs']
|
|
720
|
+
# verify the required parameter 'auid' is set
|
|
721
|
+
if ('auid' not in params or
|
|
722
|
+
params['auid'] is None):
|
|
723
|
+
raise ValueError("Missing the required parameter `auid` when calling `get_artifacts`") # noqa: E501
|
|
724
|
+
|
|
725
|
+
collection_formats = {}
|
|
726
|
+
|
|
727
|
+
path_params = {}
|
|
728
|
+
if 'auid' in params:
|
|
729
|
+
path_params['auid'] = params['auid'] # noqa: E501
|
|
730
|
+
|
|
731
|
+
query_params = []
|
|
732
|
+
if 'namespace' in params:
|
|
733
|
+
query_params.append(('namespace', params['namespace'])) # noqa: E501
|
|
734
|
+
if 'url' in params:
|
|
735
|
+
query_params.append(('url', params['url'])) # noqa: E501
|
|
736
|
+
if 'url_prefix' in params:
|
|
737
|
+
query_params.append(('urlPrefix', params['url_prefix'])) # noqa: E501
|
|
738
|
+
if 'version' in params:
|
|
739
|
+
query_params.append(('version', params['version'])) # noqa: E501
|
|
740
|
+
if 'include_uncommitted' in params:
|
|
741
|
+
query_params.append(('includeUncommitted', params['include_uncommitted'])) # noqa: E501
|
|
742
|
+
if 'limit' in params:
|
|
743
|
+
query_params.append(('limit', params['limit'])) # noqa: E501
|
|
744
|
+
if 'continuation_token' in params:
|
|
745
|
+
query_params.append(('continuationToken', params['continuation_token'])) # noqa: E501
|
|
746
|
+
|
|
747
|
+
header_params = {}
|
|
748
|
+
|
|
749
|
+
form_params = []
|
|
750
|
+
local_var_files = {}
|
|
751
|
+
|
|
752
|
+
body_params = None
|
|
753
|
+
# HTTP header `Accept`
|
|
754
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
755
|
+
['application/json']) # noqa: E501
|
|
756
|
+
|
|
757
|
+
# Authentication setting
|
|
758
|
+
auth_settings = [] # noqa: E501
|
|
759
|
+
|
|
760
|
+
return self.api_client.call_api(
|
|
761
|
+
'/aus/{auid}/artifacts', 'GET',
|
|
762
|
+
path_params,
|
|
763
|
+
query_params,
|
|
764
|
+
header_params,
|
|
765
|
+
body=body_params,
|
|
766
|
+
post_params=form_params,
|
|
767
|
+
files=local_var_files,
|
|
768
|
+
response_type='ArtifactPageInfo', # noqa: E501
|
|
769
|
+
auth_settings=auth_settings,
|
|
770
|
+
async_req=params.get('async_req'),
|
|
771
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
772
|
+
_preload_content=params.get('_preload_content', True),
|
|
773
|
+
_request_timeout=params.get('_request_timeout'),
|
|
774
|
+
collection_formats=collection_formats)
|
|
775
|
+
|
|
776
|
+
def get_artifacts_from_all_aus(self, **kwargs): # noqa: E501
|
|
777
|
+
"""Returns all artifacts that match a given a URL or URL prefix and/or version. # noqa: E501
|
|
778
|
+
|
|
779
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
780
|
+
asynchronous HTTP request, please pass async_req=True
|
|
781
|
+
>>> thread = api.get_artifacts_from_all_aus(async_req=True)
|
|
782
|
+
>>> result = thread.get()
|
|
783
|
+
|
|
784
|
+
:param async_req bool
|
|
785
|
+
:param str namespace: Namespace of the artifacts
|
|
786
|
+
:param str url: The URL contained by the artifacts
|
|
787
|
+
:param str url_prefix: The prefix to be matched by the artifact URLs
|
|
788
|
+
:param str versions: Versions of the artifacts to return
|
|
789
|
+
:param int limit: The requested maximum number of artifacts per response
|
|
790
|
+
:param str continuation_token: The continuation token of the next page of artifacts to be returned
|
|
791
|
+
:return: ArtifactPageInfo
|
|
792
|
+
If the method is called asynchronously,
|
|
793
|
+
returns the request thread.
|
|
794
|
+
"""
|
|
795
|
+
kwargs['_return_http_data_only'] = True
|
|
796
|
+
if kwargs.get('async_req'):
|
|
797
|
+
return self.get_artifacts_from_all_aus_with_http_info(**kwargs) # noqa: E501
|
|
798
|
+
else:
|
|
799
|
+
(data) = self.get_artifacts_from_all_aus_with_http_info(**kwargs) # noqa: E501
|
|
800
|
+
return data
|
|
801
|
+
|
|
802
|
+
def get_artifacts_from_all_aus_with_http_info(self, **kwargs): # noqa: E501
|
|
803
|
+
"""Returns all artifacts that match a given a URL or URL prefix and/or version. # noqa: E501
|
|
804
|
+
|
|
805
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
806
|
+
asynchronous HTTP request, please pass async_req=True
|
|
807
|
+
>>> thread = api.get_artifacts_from_all_aus_with_http_info(async_req=True)
|
|
808
|
+
>>> result = thread.get()
|
|
809
|
+
|
|
810
|
+
:param async_req bool
|
|
811
|
+
:param str namespace: Namespace of the artifacts
|
|
812
|
+
:param str url: The URL contained by the artifacts
|
|
813
|
+
:param str url_prefix: The prefix to be matched by the artifact URLs
|
|
814
|
+
:param str versions: Versions of the artifacts to return
|
|
815
|
+
:param int limit: The requested maximum number of artifacts per response
|
|
816
|
+
:param str continuation_token: The continuation token of the next page of artifacts to be returned
|
|
817
|
+
:return: ArtifactPageInfo
|
|
818
|
+
If the method is called asynchronously,
|
|
819
|
+
returns the request thread.
|
|
820
|
+
"""
|
|
821
|
+
|
|
822
|
+
all_params = ['namespace', 'url', 'url_prefix', 'versions', 'limit', 'continuation_token'] # noqa: E501
|
|
823
|
+
all_params.append('async_req')
|
|
824
|
+
all_params.append('_return_http_data_only')
|
|
825
|
+
all_params.append('_preload_content')
|
|
826
|
+
all_params.append('_request_timeout')
|
|
827
|
+
|
|
828
|
+
params = locals()
|
|
829
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
830
|
+
if key not in all_params:
|
|
831
|
+
raise TypeError(
|
|
832
|
+
"Got an unexpected keyword argument '%s'"
|
|
833
|
+
" to method get_artifacts_from_all_aus" % key
|
|
834
|
+
)
|
|
835
|
+
params[key] = val
|
|
836
|
+
del params['kwargs']
|
|
837
|
+
|
|
838
|
+
collection_formats = {}
|
|
839
|
+
|
|
840
|
+
path_params = {}
|
|
841
|
+
|
|
842
|
+
query_params = []
|
|
843
|
+
if 'namespace' in params:
|
|
844
|
+
query_params.append(('namespace', params['namespace'])) # noqa: E501
|
|
845
|
+
if 'url' in params:
|
|
846
|
+
query_params.append(('url', params['url'])) # noqa: E501
|
|
847
|
+
if 'url_prefix' in params:
|
|
848
|
+
query_params.append(('urlPrefix', params['url_prefix'])) # noqa: E501
|
|
849
|
+
if 'versions' in params:
|
|
850
|
+
query_params.append(('versions', params['versions'])) # noqa: E501
|
|
851
|
+
if 'limit' in params:
|
|
852
|
+
query_params.append(('limit', params['limit'])) # noqa: E501
|
|
853
|
+
if 'continuation_token' in params:
|
|
854
|
+
query_params.append(('continuationToken', params['continuation_token'])) # noqa: E501
|
|
855
|
+
|
|
856
|
+
header_params = {}
|
|
857
|
+
|
|
858
|
+
form_params = []
|
|
859
|
+
local_var_files = {}
|
|
860
|
+
|
|
861
|
+
body_params = None
|
|
862
|
+
# HTTP header `Accept`
|
|
863
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
864
|
+
['application/json']) # noqa: E501
|
|
865
|
+
|
|
866
|
+
# Authentication setting
|
|
867
|
+
auth_settings = [] # noqa: E501
|
|
868
|
+
|
|
869
|
+
return self.api_client.call_api(
|
|
870
|
+
'/artifacts', 'GET',
|
|
871
|
+
path_params,
|
|
872
|
+
query_params,
|
|
873
|
+
header_params,
|
|
874
|
+
body=body_params,
|
|
875
|
+
post_params=form_params,
|
|
876
|
+
files=local_var_files,
|
|
877
|
+
response_type='ArtifactPageInfo', # noqa: E501
|
|
878
|
+
auth_settings=auth_settings,
|
|
879
|
+
async_req=params.get('async_req'),
|
|
880
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
881
|
+
_preload_content=params.get('_preload_content', True),
|
|
882
|
+
_request_timeout=params.get('_request_timeout'),
|
|
883
|
+
collection_formats=collection_formats)
|
|
884
|
+
|
|
885
|
+
def update_artifact(self, committed, uuid, **kwargs): # noqa: E501
|
|
886
|
+
"""Update the property of an artifact # noqa: E501
|
|
887
|
+
|
|
888
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
889
|
+
asynchronous HTTP request, please pass async_req=True
|
|
890
|
+
>>> thread = api.update_artifact(committed, uuid, async_req=True)
|
|
891
|
+
>>> result = thread.get()
|
|
892
|
+
|
|
893
|
+
:param async_req bool
|
|
894
|
+
:param bool committed: Committed status of the artifact (required)
|
|
895
|
+
:param str uuid: Identifier of the artifact (required)
|
|
896
|
+
:param str namespace: Namespace of the artifacts
|
|
897
|
+
:return: Artifact
|
|
898
|
+
If the method is called asynchronously,
|
|
899
|
+
returns the request thread.
|
|
900
|
+
"""
|
|
901
|
+
kwargs['_return_http_data_only'] = True
|
|
902
|
+
if kwargs.get('async_req'):
|
|
903
|
+
return self.update_artifact_with_http_info(committed, uuid, **kwargs) # noqa: E501
|
|
904
|
+
else:
|
|
905
|
+
(data) = self.update_artifact_with_http_info(committed, uuid, **kwargs) # noqa: E501
|
|
906
|
+
return data
|
|
907
|
+
|
|
908
|
+
def update_artifact_with_http_info(self, committed, uuid, **kwargs): # noqa: E501
|
|
909
|
+
"""Update the property of an artifact # noqa: E501
|
|
910
|
+
|
|
911
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
912
|
+
asynchronous HTTP request, please pass async_req=True
|
|
913
|
+
>>> thread = api.update_artifact_with_http_info(committed, uuid, async_req=True)
|
|
914
|
+
>>> result = thread.get()
|
|
915
|
+
|
|
916
|
+
:param async_req bool
|
|
917
|
+
:param bool committed: Committed status of the artifact (required)
|
|
918
|
+
:param str uuid: Identifier of the artifact (required)
|
|
919
|
+
:param str namespace: Namespace of the artifacts
|
|
920
|
+
:return: Artifact
|
|
921
|
+
If the method is called asynchronously,
|
|
922
|
+
returns the request thread.
|
|
923
|
+
"""
|
|
924
|
+
|
|
925
|
+
all_params = ['committed', 'uuid', 'namespace'] # noqa: E501
|
|
926
|
+
all_params.append('async_req')
|
|
927
|
+
all_params.append('_return_http_data_only')
|
|
928
|
+
all_params.append('_preload_content')
|
|
929
|
+
all_params.append('_request_timeout')
|
|
930
|
+
|
|
931
|
+
params = locals()
|
|
932
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
933
|
+
if key not in all_params:
|
|
934
|
+
raise TypeError(
|
|
935
|
+
"Got an unexpected keyword argument '%s'"
|
|
936
|
+
" to method update_artifact" % key
|
|
937
|
+
)
|
|
938
|
+
params[key] = val
|
|
939
|
+
del params['kwargs']
|
|
940
|
+
# verify the required parameter 'committed' is set
|
|
941
|
+
if ('committed' not in params or
|
|
942
|
+
params['committed'] is None):
|
|
943
|
+
raise ValueError("Missing the required parameter `committed` when calling `update_artifact`") # noqa: E501
|
|
944
|
+
# verify the required parameter 'uuid' is set
|
|
945
|
+
if ('uuid' not in params or
|
|
946
|
+
params['uuid'] is None):
|
|
947
|
+
raise ValueError("Missing the required parameter `uuid` when calling `update_artifact`") # noqa: E501
|
|
948
|
+
|
|
949
|
+
collection_formats = {}
|
|
950
|
+
|
|
951
|
+
path_params = {}
|
|
952
|
+
if 'uuid' in params:
|
|
953
|
+
path_params['uuid'] = params['uuid'] # noqa: E501
|
|
954
|
+
|
|
955
|
+
query_params = []
|
|
956
|
+
if 'namespace' in params:
|
|
957
|
+
query_params.append(('namespace', params['namespace'])) # noqa: E501
|
|
958
|
+
if 'committed' in params:
|
|
959
|
+
query_params.append(('committed', params['committed'])) # noqa: E501
|
|
960
|
+
|
|
961
|
+
header_params = {}
|
|
962
|
+
|
|
963
|
+
form_params = []
|
|
964
|
+
local_var_files = {}
|
|
965
|
+
|
|
966
|
+
body_params = None
|
|
967
|
+
# HTTP header `Accept`
|
|
968
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
969
|
+
['application/json']) # noqa: E501
|
|
970
|
+
|
|
971
|
+
# Authentication setting
|
|
972
|
+
auth_settings = [] # noqa: E501
|
|
973
|
+
|
|
974
|
+
return self.api_client.call_api(
|
|
975
|
+
'/artifacts/{uuid}', 'PUT',
|
|
976
|
+
path_params,
|
|
977
|
+
query_params,
|
|
978
|
+
header_params,
|
|
979
|
+
body=body_params,
|
|
980
|
+
post_params=form_params,
|
|
981
|
+
files=local_var_files,
|
|
982
|
+
response_type='Artifact', # noqa: E501
|
|
983
|
+
auth_settings=auth_settings,
|
|
984
|
+
async_req=params.get('async_req'),
|
|
985
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
986
|
+
_preload_content=params.get('_preload_content', True),
|
|
987
|
+
_request_timeout=params.get('_request_timeout'),
|
|
988
|
+
collection_formats=collection_formats)
|