development-framework-cli 1.7.3__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.
- development_framework_cli-1.7.3.dist-info/METADATA +141 -0
- development_framework_cli-1.7.3.dist-info/RECORD +71 -0
- development_framework_cli-1.7.3.dist-info/WHEEL +4 -0
- development_framework_cli-1.7.3.dist-info/entry_points.txt +2 -0
- development_framework_cli-1.7.3.dist-info/licenses/LICENSE +21 -0
- dm_cli/__init__.py +1 -0
- dm_cli/cli.py +180 -0
- dm_cli/command_group/__init__.py +0 -0
- dm_cli/command_group/data_source.py +176 -0
- dm_cli/command_group/entities.py +116 -0
- dm_cli/dmss.py +104 -0
- dm_cli/dmss_api/__init__.py +27 -0
- dm_cli/dmss_api/api/__init__.py +3 -0
- dm_cli/dmss_api/api/access_control_api.py +349 -0
- dm_cli/dmss_api/api/attribute_api.py +175 -0
- dm_cli/dmss_api/api/blob_api.py +344 -0
- dm_cli/dmss_api/api/blueprint_api.py +326 -0
- dm_cli/dmss_api/api/datasource_api.py +448 -0
- dm_cli/dmss_api/api/default_api.py +4439 -0
- dm_cli/dmss_api/api/document_api.py +922 -0
- dm_cli/dmss_api/api/entity_api.py +464 -0
- dm_cli/dmss_api/api/export_api.py +313 -0
- dm_cli/dmss_api/api/file_api.py +197 -0
- dm_cli/dmss_api/api/health_check_api.py +160 -0
- dm_cli/dmss_api/api/lookup_table_api.py +323 -0
- dm_cli/dmss_api/api/meta_api.py +185 -0
- dm_cli/dmss_api/api/personal_access_token_api.py +433 -0
- dm_cli/dmss_api/api/reference_api.py +174 -0
- dm_cli/dmss_api/api/search_api.py +183 -0
- dm_cli/dmss_api/api/whoami_api.py +163 -0
- dm_cli/dmss_api/api_client.py +896 -0
- dm_cli/dmss_api/apis/__init__.py +32 -0
- dm_cli/dmss_api/configuration.py +482 -0
- dm_cli/dmss_api/exceptions.py +158 -0
- dm_cli/dmss_api/model/__init__.py +5 -0
- dm_cli/dmss_api/model/access_control_list.py +287 -0
- dm_cli/dmss_api/model/access_level.py +290 -0
- dm_cli/dmss_api/model/acl.py +287 -0
- dm_cli/dmss_api/model/data_source_information.py +282 -0
- dm_cli/dmss_api/model/data_source_request.py +281 -0
- dm_cli/dmss_api/model/dependency.py +294 -0
- dm_cli/dmss_api/model/entity.py +275 -0
- dm_cli/dmss_api/model/error_response.py +278 -0
- dm_cli/dmss_api/model/export_meta_response.py +277 -0
- dm_cli/dmss_api/model/get_blueprint_response.py +280 -0
- dm_cli/dmss_api/model/lookup.py +283 -0
- dm_cli/dmss_api/model/pat_data.py +299 -0
- dm_cli/dmss_api/model/recipe.py +311 -0
- dm_cli/dmss_api/model/recipe_attribute.py +304 -0
- dm_cli/dmss_api/model/reference.py +280 -0
- dm_cli/dmss_api/model/reference_entity.py +288 -0
- dm_cli/dmss_api/model/repository.py +317 -0
- dm_cli/dmss_api/model/repository_type.py +290 -0
- dm_cli/dmss_api/model/storage_attribute.py +295 -0
- dm_cli/dmss_api/model/storage_data_types.py +292 -0
- dm_cli/dmss_api/model/storage_recipe.py +293 -0
- dm_cli/dmss_api/model_utils.py +2057 -0
- dm_cli/dmss_api/models/__init__.py +29 -0
- dm_cli/dmss_api/rest.py +358 -0
- dm_cli/domain.py +166 -0
- dm_cli/enums.py +48 -0
- dm_cli/import_entity.py +128 -0
- dm_cli/import_package.py +173 -0
- dm_cli/package_tree_from_zip.py +120 -0
- dm_cli/state.py +12 -0
- dm_cli/utils/__init__.py +0 -0
- dm_cli/utils/file_structure.py +31 -0
- dm_cli/utils/reference.py +129 -0
- dm_cli/utils/resolve_local_ids.py +142 -0
- dm_cli/utils/utils.py +161 -0
- dm_cli/utils/zip.py +70 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Data Modelling Storage Service
|
|
3
|
+
|
|
4
|
+
API for basic data modelling interaction # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.3.0
|
|
7
|
+
Generated by: https://openapi-generator.tech
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
import re # noqa: F401
|
|
12
|
+
import sys # noqa: F401
|
|
13
|
+
|
|
14
|
+
from dm_cli.dmss_api.api_client import ApiClient
|
|
15
|
+
from dm_cli.dmss_api.api_client import Endpoint as _Endpoint
|
|
16
|
+
from dm_cli.dmss_api.model.error_response import ErrorResponse
|
|
17
|
+
from dm_cli.dmss_api.model.export_meta_response import ExportMetaResponse
|
|
18
|
+
from dm_cli.dmss_api.model_utils import ( # noqa: F401
|
|
19
|
+
check_allowed_values,
|
|
20
|
+
check_validations,
|
|
21
|
+
date,
|
|
22
|
+
datetime,
|
|
23
|
+
file_type,
|
|
24
|
+
none_type,
|
|
25
|
+
validate_and_convert_types,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ExportApi(object):
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None):
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
self.export_endpoint = _Endpoint(
|
|
41
|
+
settings={
|
|
42
|
+
'response_type': None,
|
|
43
|
+
'auth': [
|
|
44
|
+
'APIKeyHeader',
|
|
45
|
+
'OAuth2AuthorizationCodeBearer'
|
|
46
|
+
],
|
|
47
|
+
'endpoint_path': '/api/export/{path_address}',
|
|
48
|
+
'operation_id': 'export',
|
|
49
|
+
'http_method': 'GET',
|
|
50
|
+
'servers': None,
|
|
51
|
+
},
|
|
52
|
+
params_map={
|
|
53
|
+
'all': [
|
|
54
|
+
'path_address',
|
|
55
|
+
],
|
|
56
|
+
'required': [
|
|
57
|
+
'path_address',
|
|
58
|
+
],
|
|
59
|
+
'nullable': [
|
|
60
|
+
],
|
|
61
|
+
'enum': [
|
|
62
|
+
],
|
|
63
|
+
'validation': [
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
root_map={
|
|
67
|
+
'validations': {
|
|
68
|
+
},
|
|
69
|
+
'allowed_values': {
|
|
70
|
+
},
|
|
71
|
+
'openapi_types': {
|
|
72
|
+
'path_address':
|
|
73
|
+
(str,),
|
|
74
|
+
},
|
|
75
|
+
'attribute_map': {
|
|
76
|
+
'path_address': 'path_address',
|
|
77
|
+
},
|
|
78
|
+
'location_map': {
|
|
79
|
+
'path_address': 'path',
|
|
80
|
+
},
|
|
81
|
+
'collection_format_map': {
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
headers_map={
|
|
85
|
+
'accept': [
|
|
86
|
+
'application/zip',
|
|
87
|
+
'application/json',
|
|
88
|
+
'text/plain'
|
|
89
|
+
],
|
|
90
|
+
'content_type': [],
|
|
91
|
+
},
|
|
92
|
+
api_client=api_client
|
|
93
|
+
)
|
|
94
|
+
self.export_meta_endpoint = _Endpoint(
|
|
95
|
+
settings={
|
|
96
|
+
'response_type': (ExportMetaResponse,),
|
|
97
|
+
'auth': [
|
|
98
|
+
'APIKeyHeader',
|
|
99
|
+
'OAuth2AuthorizationCodeBearer'
|
|
100
|
+
],
|
|
101
|
+
'endpoint_path': '/api/export/meta/{path_address}',
|
|
102
|
+
'operation_id': 'export_meta',
|
|
103
|
+
'http_method': 'GET',
|
|
104
|
+
'servers': None,
|
|
105
|
+
},
|
|
106
|
+
params_map={
|
|
107
|
+
'all': [
|
|
108
|
+
'path_address',
|
|
109
|
+
],
|
|
110
|
+
'required': [
|
|
111
|
+
'path_address',
|
|
112
|
+
],
|
|
113
|
+
'nullable': [
|
|
114
|
+
],
|
|
115
|
+
'enum': [
|
|
116
|
+
],
|
|
117
|
+
'validation': [
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
root_map={
|
|
121
|
+
'validations': {
|
|
122
|
+
},
|
|
123
|
+
'allowed_values': {
|
|
124
|
+
},
|
|
125
|
+
'openapi_types': {
|
|
126
|
+
'path_address':
|
|
127
|
+
(str,),
|
|
128
|
+
},
|
|
129
|
+
'attribute_map': {
|
|
130
|
+
'path_address': 'path_address',
|
|
131
|
+
},
|
|
132
|
+
'location_map': {
|
|
133
|
+
'path_address': 'path',
|
|
134
|
+
},
|
|
135
|
+
'collection_format_map': {
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
headers_map={
|
|
139
|
+
'accept': [
|
|
140
|
+
'application/json',
|
|
141
|
+
'text/plain'
|
|
142
|
+
],
|
|
143
|
+
'content_type': [],
|
|
144
|
+
},
|
|
145
|
+
api_client=api_client
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
def export(
|
|
149
|
+
self,
|
|
150
|
+
path_address,
|
|
151
|
+
**kwargs
|
|
152
|
+
):
|
|
153
|
+
"""Export # noqa: E501
|
|
154
|
+
|
|
155
|
+
Download a zip-folder Containing One or More Documents as JSON Files. This endpoint creates a zip-folder with the contents of the document and it's children. Args: - path_address: Address to the entity or package that should be exported. - Example: PROTOCOL://DATA SOURCE/ROOT PACKAGE/SUB PACKAGE/ENTITY (PROTOCOL is optional, and the default is dmss.) - user (User): The authenticated user accessing the endpoint, automatically generated from provided bearer token or Access-Key. Returns: - FileResponse: A FileResponse containing the zip file. # noqa: E501
|
|
156
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
157
|
+
asynchronous HTTP request, please pass async_req=True
|
|
158
|
+
|
|
159
|
+
>>> thread = api.export(path_address, async_req=True)
|
|
160
|
+
>>> result = thread.get()
|
|
161
|
+
|
|
162
|
+
Args:
|
|
163
|
+
path_address (str):
|
|
164
|
+
|
|
165
|
+
Keyword Args:
|
|
166
|
+
_return_http_data_only (bool): response data without head status
|
|
167
|
+
code and headers. Default is True.
|
|
168
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
169
|
+
will be returned without reading/decoding response data.
|
|
170
|
+
Default is True.
|
|
171
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
172
|
+
one number provided, it will be total request timeout. It can also
|
|
173
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
174
|
+
Default is None.
|
|
175
|
+
_check_input_type (bool): specifies if type checking
|
|
176
|
+
should be done one the data sent to the server.
|
|
177
|
+
Default is True.
|
|
178
|
+
_check_return_type (bool): specifies if type checking
|
|
179
|
+
should be done one the data received from the server.
|
|
180
|
+
Default is True.
|
|
181
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
182
|
+
are serialized names, as specified in the OpenAPI document.
|
|
183
|
+
False if the variable names in the input data
|
|
184
|
+
are pythonic names, e.g. snake case (default)
|
|
185
|
+
_content_type (str/None): force body content-type.
|
|
186
|
+
Default is None and content-type will be predicted by allowed
|
|
187
|
+
content-types and body.
|
|
188
|
+
_host_index (int/None): specifies the index of the server
|
|
189
|
+
that we want to use.
|
|
190
|
+
Default is read from the configuration.
|
|
191
|
+
_request_auths (list): set to override the auth_settings for an a single
|
|
192
|
+
request; this effectively ignores the authentication
|
|
193
|
+
in the spec for a single request.
|
|
194
|
+
Default is None
|
|
195
|
+
async_req (bool): execute request asynchronously
|
|
196
|
+
|
|
197
|
+
Returns:
|
|
198
|
+
None
|
|
199
|
+
If the method is called asynchronously, returns the request
|
|
200
|
+
thread.
|
|
201
|
+
"""
|
|
202
|
+
kwargs['async_req'] = kwargs.get(
|
|
203
|
+
'async_req', False
|
|
204
|
+
)
|
|
205
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
206
|
+
'_return_http_data_only', True
|
|
207
|
+
)
|
|
208
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
209
|
+
'_preload_content', True
|
|
210
|
+
)
|
|
211
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
212
|
+
'_request_timeout', None
|
|
213
|
+
)
|
|
214
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
215
|
+
'_check_input_type', True
|
|
216
|
+
)
|
|
217
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
218
|
+
'_check_return_type', True
|
|
219
|
+
)
|
|
220
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
221
|
+
'_spec_property_naming', False
|
|
222
|
+
)
|
|
223
|
+
kwargs['_content_type'] = kwargs.get(
|
|
224
|
+
'_content_type')
|
|
225
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
226
|
+
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
227
|
+
kwargs['path_address'] = \
|
|
228
|
+
path_address
|
|
229
|
+
return self.export_endpoint.call_with_http_info(**kwargs)
|
|
230
|
+
|
|
231
|
+
def export_meta(
|
|
232
|
+
self,
|
|
233
|
+
path_address,
|
|
234
|
+
**kwargs
|
|
235
|
+
):
|
|
236
|
+
"""Export Meta # noqa: E501
|
|
237
|
+
|
|
238
|
+
Get Meta Information About a Document This endpoint returns meta information about a document provided document id and data source id in which it is located. For more information about the meta-object, see [the docs](https://equinor.github.io/dm-docs/docs/concepts/meta) Args: - path_address (str): Address of the object for which to get the meta-information. - Example: PROTOCOL://DATA SOURCE/ROOT PACKAGE/SUB PACKAGE/ENTITY (PROTOCOL is optional, and the default is dmss.) - user (User): The authenticated user accessing the endpoint. Returns: - dict: A dictionary containing the meta information for the object. # noqa: E501
|
|
239
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
240
|
+
asynchronous HTTP request, please pass async_req=True
|
|
241
|
+
|
|
242
|
+
>>> thread = api.export_meta(path_address, async_req=True)
|
|
243
|
+
>>> result = thread.get()
|
|
244
|
+
|
|
245
|
+
Args:
|
|
246
|
+
path_address (str):
|
|
247
|
+
|
|
248
|
+
Keyword Args:
|
|
249
|
+
_return_http_data_only (bool): response data without head status
|
|
250
|
+
code and headers. Default is True.
|
|
251
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
252
|
+
will be returned without reading/decoding response data.
|
|
253
|
+
Default is True.
|
|
254
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
255
|
+
one number provided, it will be total request timeout. It can also
|
|
256
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
257
|
+
Default is None.
|
|
258
|
+
_check_input_type (bool): specifies if type checking
|
|
259
|
+
should be done one the data sent to the server.
|
|
260
|
+
Default is True.
|
|
261
|
+
_check_return_type (bool): specifies if type checking
|
|
262
|
+
should be done one the data received from the server.
|
|
263
|
+
Default is True.
|
|
264
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
265
|
+
are serialized names, as specified in the OpenAPI document.
|
|
266
|
+
False if the variable names in the input data
|
|
267
|
+
are pythonic names, e.g. snake case (default)
|
|
268
|
+
_content_type (str/None): force body content-type.
|
|
269
|
+
Default is None and content-type will be predicted by allowed
|
|
270
|
+
content-types and body.
|
|
271
|
+
_host_index (int/None): specifies the index of the server
|
|
272
|
+
that we want to use.
|
|
273
|
+
Default is read from the configuration.
|
|
274
|
+
_request_auths (list): set to override the auth_settings for an a single
|
|
275
|
+
request; this effectively ignores the authentication
|
|
276
|
+
in the spec for a single request.
|
|
277
|
+
Default is None
|
|
278
|
+
async_req (bool): execute request asynchronously
|
|
279
|
+
|
|
280
|
+
Returns:
|
|
281
|
+
ExportMetaResponse
|
|
282
|
+
If the method is called asynchronously, returns the request
|
|
283
|
+
thread.
|
|
284
|
+
"""
|
|
285
|
+
kwargs['async_req'] = kwargs.get(
|
|
286
|
+
'async_req', False
|
|
287
|
+
)
|
|
288
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
289
|
+
'_return_http_data_only', True
|
|
290
|
+
)
|
|
291
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
292
|
+
'_preload_content', True
|
|
293
|
+
)
|
|
294
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
295
|
+
'_request_timeout', None
|
|
296
|
+
)
|
|
297
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
298
|
+
'_check_input_type', True
|
|
299
|
+
)
|
|
300
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
301
|
+
'_check_return_type', True
|
|
302
|
+
)
|
|
303
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
304
|
+
'_spec_property_naming', False
|
|
305
|
+
)
|
|
306
|
+
kwargs['_content_type'] = kwargs.get(
|
|
307
|
+
'_content_type')
|
|
308
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
309
|
+
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
310
|
+
kwargs['path_address'] = \
|
|
311
|
+
path_address
|
|
312
|
+
return self.export_meta_endpoint.call_with_http_info(**kwargs)
|
|
313
|
+
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Data Modelling Storage Service
|
|
3
|
+
|
|
4
|
+
API for basic data modelling interaction # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.3.0
|
|
7
|
+
Generated by: https://openapi-generator.tech
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
import re # noqa: F401
|
|
12
|
+
import sys # noqa: F401
|
|
13
|
+
|
|
14
|
+
from dm_cli.dmss_api.api_client import ApiClient
|
|
15
|
+
from dm_cli.dmss_api.api_client import Endpoint as _Endpoint
|
|
16
|
+
from dm_cli.dmss_api.model.error_response import ErrorResponse
|
|
17
|
+
from dm_cli.dmss_api.model_utils import ( # noqa: F401
|
|
18
|
+
check_allowed_values,
|
|
19
|
+
check_validations,
|
|
20
|
+
date,
|
|
21
|
+
datetime,
|
|
22
|
+
file_type,
|
|
23
|
+
none_type,
|
|
24
|
+
validate_and_convert_types,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class FileApi(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
|
+
self.file_upload_endpoint = _Endpoint(
|
|
40
|
+
settings={
|
|
41
|
+
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
|
42
|
+
'auth': [
|
|
43
|
+
'APIKeyHeader',
|
|
44
|
+
'OAuth2AuthorizationCodeBearer'
|
|
45
|
+
],
|
|
46
|
+
'endpoint_path': '/api/files/{data_source_id}',
|
|
47
|
+
'operation_id': 'file_upload',
|
|
48
|
+
'http_method': 'POST',
|
|
49
|
+
'servers': None,
|
|
50
|
+
},
|
|
51
|
+
params_map={
|
|
52
|
+
'all': [
|
|
53
|
+
'data_source_id',
|
|
54
|
+
'data',
|
|
55
|
+
'file',
|
|
56
|
+
],
|
|
57
|
+
'required': [
|
|
58
|
+
'data_source_id',
|
|
59
|
+
'data',
|
|
60
|
+
'file',
|
|
61
|
+
],
|
|
62
|
+
'nullable': [
|
|
63
|
+
],
|
|
64
|
+
'enum': [
|
|
65
|
+
],
|
|
66
|
+
'validation': [
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
root_map={
|
|
70
|
+
'validations': {
|
|
71
|
+
},
|
|
72
|
+
'allowed_values': {
|
|
73
|
+
},
|
|
74
|
+
'openapi_types': {
|
|
75
|
+
'data_source_id':
|
|
76
|
+
(str,),
|
|
77
|
+
'data':
|
|
78
|
+
(str,),
|
|
79
|
+
'file':
|
|
80
|
+
(file_type,),
|
|
81
|
+
},
|
|
82
|
+
'attribute_map': {
|
|
83
|
+
'data_source_id': 'data_source_id',
|
|
84
|
+
'data': 'data',
|
|
85
|
+
'file': 'file',
|
|
86
|
+
},
|
|
87
|
+
'location_map': {
|
|
88
|
+
'data_source_id': 'path',
|
|
89
|
+
'data': 'form',
|
|
90
|
+
'file': 'form',
|
|
91
|
+
},
|
|
92
|
+
'collection_format_map': {
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
headers_map={
|
|
96
|
+
'accept': [
|
|
97
|
+
'application/json',
|
|
98
|
+
'text/plain'
|
|
99
|
+
],
|
|
100
|
+
'content_type': [
|
|
101
|
+
'multipart/form-data'
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
api_client=api_client
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
def file_upload(
|
|
108
|
+
self,
|
|
109
|
+
data_source_id,
|
|
110
|
+
data,
|
|
111
|
+
file,
|
|
112
|
+
**kwargs
|
|
113
|
+
):
|
|
114
|
+
"""Upload File # noqa: E501
|
|
115
|
+
|
|
116
|
+
Upload a New Binary File This endpoint uploads a new file and creates a file entity with the uploaded binary data as content. Args: - data_source_id (str): ID of the data source to which the file should be uploaded. - data (dict with a \"file_id\" attribute): A dict containing data source ID to be used for the file entity that will be created. - user (User): The authenticated user accessing the endpoint, automatically generated from provided bearer token or Access-Key. Returns: - dict: The file entity that was created to contain the file. # noqa: E501
|
|
117
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
118
|
+
asynchronous HTTP request, please pass async_req=True
|
|
119
|
+
|
|
120
|
+
>>> thread = api.file_upload(data_source_id, data, file, async_req=True)
|
|
121
|
+
>>> result = thread.get()
|
|
122
|
+
|
|
123
|
+
Args:
|
|
124
|
+
data_source_id (str):
|
|
125
|
+
data (str):
|
|
126
|
+
file (file_type):
|
|
127
|
+
|
|
128
|
+
Keyword Args:
|
|
129
|
+
_return_http_data_only (bool): response data without head status
|
|
130
|
+
code and headers. Default is True.
|
|
131
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
132
|
+
will be returned without reading/decoding response data.
|
|
133
|
+
Default is True.
|
|
134
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
135
|
+
one number provided, it will be total request timeout. It can also
|
|
136
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
137
|
+
Default is None.
|
|
138
|
+
_check_input_type (bool): specifies if type checking
|
|
139
|
+
should be done one the data sent to the server.
|
|
140
|
+
Default is True.
|
|
141
|
+
_check_return_type (bool): specifies if type checking
|
|
142
|
+
should be done one the data received from the server.
|
|
143
|
+
Default is True.
|
|
144
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
145
|
+
are serialized names, as specified in the OpenAPI document.
|
|
146
|
+
False if the variable names in the input data
|
|
147
|
+
are pythonic names, e.g. snake case (default)
|
|
148
|
+
_content_type (str/None): force body content-type.
|
|
149
|
+
Default is None and content-type will be predicted by allowed
|
|
150
|
+
content-types and body.
|
|
151
|
+
_host_index (int/None): specifies the index of the server
|
|
152
|
+
that we want to use.
|
|
153
|
+
Default is read from the configuration.
|
|
154
|
+
_request_auths (list): set to override the auth_settings for an a single
|
|
155
|
+
request; this effectively ignores the authentication
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
Default is None
|
|
158
|
+
async_req (bool): execute request asynchronously
|
|
159
|
+
|
|
160
|
+
Returns:
|
|
161
|
+
{str: (bool, date, datetime, dict, float, int, list, str, none_type)}
|
|
162
|
+
If the method is called asynchronously, returns the request
|
|
163
|
+
thread.
|
|
164
|
+
"""
|
|
165
|
+
kwargs['async_req'] = kwargs.get(
|
|
166
|
+
'async_req', False
|
|
167
|
+
)
|
|
168
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
169
|
+
'_return_http_data_only', True
|
|
170
|
+
)
|
|
171
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
172
|
+
'_preload_content', True
|
|
173
|
+
)
|
|
174
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
175
|
+
'_request_timeout', None
|
|
176
|
+
)
|
|
177
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
178
|
+
'_check_input_type', True
|
|
179
|
+
)
|
|
180
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
181
|
+
'_check_return_type', True
|
|
182
|
+
)
|
|
183
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
184
|
+
'_spec_property_naming', False
|
|
185
|
+
)
|
|
186
|
+
kwargs['_content_type'] = kwargs.get(
|
|
187
|
+
'_content_type')
|
|
188
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
189
|
+
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
190
|
+
kwargs['data_source_id'] = \
|
|
191
|
+
data_source_id
|
|
192
|
+
kwargs['data'] = \
|
|
193
|
+
data
|
|
194
|
+
kwargs['file'] = \
|
|
195
|
+
file
|
|
196
|
+
return self.file_upload_endpoint.call_with_http_info(**kwargs)
|
|
197
|
+
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Data Modelling Storage Service
|
|
3
|
+
|
|
4
|
+
API for basic data modelling interaction # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.3.0
|
|
7
|
+
Generated by: https://openapi-generator.tech
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
import re # noqa: F401
|
|
12
|
+
import sys # noqa: F401
|
|
13
|
+
|
|
14
|
+
from dm_cli.dmss_api.api_client import ApiClient
|
|
15
|
+
from dm_cli.dmss_api.api_client import Endpoint as _Endpoint
|
|
16
|
+
from dm_cli.dmss_api.model.error_response import ErrorResponse
|
|
17
|
+
from dm_cli.dmss_api.model_utils import ( # noqa: F401
|
|
18
|
+
check_allowed_values,
|
|
19
|
+
check_validations,
|
|
20
|
+
date,
|
|
21
|
+
datetime,
|
|
22
|
+
file_type,
|
|
23
|
+
none_type,
|
|
24
|
+
validate_and_convert_types,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class HealthCheckApi(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
|
+
self.get_api_healthcheck_get_endpoint = _Endpoint(
|
|
40
|
+
settings={
|
|
41
|
+
'response_type': (str,),
|
|
42
|
+
'auth': [],
|
|
43
|
+
'endpoint_path': '/api/healthcheck',
|
|
44
|
+
'operation_id': 'get_api_healthcheck_get',
|
|
45
|
+
'http_method': 'GET',
|
|
46
|
+
'servers': None,
|
|
47
|
+
},
|
|
48
|
+
params_map={
|
|
49
|
+
'all': [
|
|
50
|
+
],
|
|
51
|
+
'required': [],
|
|
52
|
+
'nullable': [
|
|
53
|
+
],
|
|
54
|
+
'enum': [
|
|
55
|
+
],
|
|
56
|
+
'validation': [
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
root_map={
|
|
60
|
+
'validations': {
|
|
61
|
+
},
|
|
62
|
+
'allowed_values': {
|
|
63
|
+
},
|
|
64
|
+
'openapi_types': {
|
|
65
|
+
},
|
|
66
|
+
'attribute_map': {
|
|
67
|
+
},
|
|
68
|
+
'location_map': {
|
|
69
|
+
},
|
|
70
|
+
'collection_format_map': {
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
headers_map={
|
|
74
|
+
'accept': [
|
|
75
|
+
'text/plain',
|
|
76
|
+
'application/json'
|
|
77
|
+
],
|
|
78
|
+
'content_type': [],
|
|
79
|
+
},
|
|
80
|
+
api_client=api_client
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
def get_api_healthcheck_get(
|
|
84
|
+
self,
|
|
85
|
+
**kwargs
|
|
86
|
+
):
|
|
87
|
+
"""Get # noqa: E501
|
|
88
|
+
|
|
89
|
+
Get the Health Status Of the Service. This endpoint can be used to check the health status of the service. It always returns a 200 OK response to indicate that the service is up and running. Returns: - string: A string indicating the health status. (\"OK\") # noqa: E501
|
|
90
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
91
|
+
asynchronous HTTP request, please pass async_req=True
|
|
92
|
+
|
|
93
|
+
>>> thread = api.get_api_healthcheck_get(async_req=True)
|
|
94
|
+
>>> result = thread.get()
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
Keyword Args:
|
|
98
|
+
_return_http_data_only (bool): response data without head status
|
|
99
|
+
code and headers. Default is True.
|
|
100
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
101
|
+
will be returned without reading/decoding response data.
|
|
102
|
+
Default is True.
|
|
103
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
104
|
+
one number provided, it will be total request timeout. It can also
|
|
105
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
106
|
+
Default is None.
|
|
107
|
+
_check_input_type (bool): specifies if type checking
|
|
108
|
+
should be done one the data sent to the server.
|
|
109
|
+
Default is True.
|
|
110
|
+
_check_return_type (bool): specifies if type checking
|
|
111
|
+
should be done one the data received from the server.
|
|
112
|
+
Default is True.
|
|
113
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
114
|
+
are serialized names, as specified in the OpenAPI document.
|
|
115
|
+
False if the variable names in the input data
|
|
116
|
+
are pythonic names, e.g. snake case (default)
|
|
117
|
+
_content_type (str/None): force body content-type.
|
|
118
|
+
Default is None and content-type will be predicted by allowed
|
|
119
|
+
content-types and body.
|
|
120
|
+
_host_index (int/None): specifies the index of the server
|
|
121
|
+
that we want to use.
|
|
122
|
+
Default is read from the configuration.
|
|
123
|
+
_request_auths (list): set to override the auth_settings for an a single
|
|
124
|
+
request; this effectively ignores the authentication
|
|
125
|
+
in the spec for a single request.
|
|
126
|
+
Default is None
|
|
127
|
+
async_req (bool): execute request asynchronously
|
|
128
|
+
|
|
129
|
+
Returns:
|
|
130
|
+
str
|
|
131
|
+
If the method is called asynchronously, returns the request
|
|
132
|
+
thread.
|
|
133
|
+
"""
|
|
134
|
+
kwargs['async_req'] = kwargs.get(
|
|
135
|
+
'async_req', False
|
|
136
|
+
)
|
|
137
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
138
|
+
'_return_http_data_only', True
|
|
139
|
+
)
|
|
140
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
141
|
+
'_preload_content', True
|
|
142
|
+
)
|
|
143
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
144
|
+
'_request_timeout', None
|
|
145
|
+
)
|
|
146
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
147
|
+
'_check_input_type', True
|
|
148
|
+
)
|
|
149
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
150
|
+
'_check_return_type', True
|
|
151
|
+
)
|
|
152
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
153
|
+
'_spec_property_naming', False
|
|
154
|
+
)
|
|
155
|
+
kwargs['_content_type'] = kwargs.get(
|
|
156
|
+
'_content_type')
|
|
157
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
158
|
+
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
159
|
+
return self.get_api_healthcheck_get_endpoint.call_with_http_info(**kwargs)
|
|
160
|
+
|