aas-http-client 1.2.5__tar.gz → 1.2.7__tar.gz
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.
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/PKG-INFO +1 -1
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/client/aas_client.py +16 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/client/implementations/experimental_implementation.py +46 -10
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/client/implementations/shell_implementation.py +64 -15
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/wrapper/sdk_wrapper.py +8 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/utilities/__init__.py +2 -0
- aas_http_client-1.2.7/aas_http_client/utilities/constants.py +8 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client.egg-info/PKG-INFO +1 -1
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client.egg-info/SOURCES.txt +1 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/pyproject.toml +1 -1
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/LICENSE +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/README.md +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/__init__.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/Configuration/config_classes.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/client/implementations/__init__.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/client/implementations/authentication.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/client/implementations/shell_registry_implementation.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/client/implementations/sm_implementation.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/client/implementations/sm_registry_implementation.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/wrapper/attachment.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/wrapper/pagination.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/demo/demo_process.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/demo/logging_handler.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/utilities/encoder.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/utilities/http_helper.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/utilities/model_builder.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/utilities/sdk_tools.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/utilities/version_check.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client.egg-info/dependency_links.txt +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client.egg-info/requires.txt +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client.egg-info/top_level.txt +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/setup.cfg +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/tests/test_client.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/tests/test_client_reg.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/tests/test_sdk_tools.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/tests/test_utils.py +0 -0
- {aas_http_client-1.2.5 → aas_http_client-1.2.7}/tests/test_wrapper.py +0 -0
{aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/client/aas_client.py
RENAMED
|
@@ -22,6 +22,7 @@ from aas_http_client.classes.client.implementations import (
|
|
|
22
22
|
get_token,
|
|
23
23
|
)
|
|
24
24
|
from aas_http_client.classes.Configuration.config_classes import AuthenticationConfig
|
|
25
|
+
from aas_http_client.utilities.constants import LogIntensity
|
|
25
26
|
from aas_http_client.utilities.http_helper import (
|
|
26
27
|
STATUS_CODE_200,
|
|
27
28
|
STATUS_CODE_201,
|
|
@@ -75,6 +76,7 @@ class AasHttpClient(BaseModel):
|
|
|
75
76
|
experimental: ExperimentalImplementation | None = Field(default=None)
|
|
76
77
|
submodel_registry: SubmodelRegistryImplementation | None = Field(default=None)
|
|
77
78
|
_cached_token: TokenData | None = PrivateAttr(default=None)
|
|
79
|
+
_log_intensity: LogIntensity = PrivateAttr(default=LogIntensity.High)
|
|
78
80
|
|
|
79
81
|
def initialize(self):
|
|
80
82
|
"""Initialize the AasHttpClient with the given URL, username and password."""
|
|
@@ -107,6 +109,20 @@ class AasHttpClient(BaseModel):
|
|
|
107
109
|
self.submodel_registry = SubmodelRegistryImplementation(self)
|
|
108
110
|
self.experimental = ExperimentalImplementation(self)
|
|
109
111
|
|
|
112
|
+
def set_log_intensity(self, intensity: LogIntensity):
|
|
113
|
+
"""Set the log intensity level for the client.
|
|
114
|
+
|
|
115
|
+
:param intensity: LogIntensity level to set (Standard or High)
|
|
116
|
+
"""
|
|
117
|
+
self._log_intensity = intensity
|
|
118
|
+
|
|
119
|
+
def get_log_intensity(self) -> LogIntensity:
|
|
120
|
+
"""Get the log intensity level for the client.
|
|
121
|
+
|
|
122
|
+
:return: The current LogIntensity level (Standard or High)
|
|
123
|
+
"""
|
|
124
|
+
return self._log_intensity
|
|
125
|
+
|
|
110
126
|
def get_auth_method(self) -> AuthMethod:
|
|
111
127
|
"""Get the authentication method used by the client.
|
|
112
128
|
|
|
@@ -5,6 +5,8 @@ import mimetypes
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from typing import TYPE_CHECKING
|
|
7
7
|
|
|
8
|
+
from aas_http_client.utilities.constants import LogIntensity
|
|
9
|
+
|
|
8
10
|
if TYPE_CHECKING:
|
|
9
11
|
from aas_http_client.classes.client.aas_client import AasHttpClient
|
|
10
12
|
|
|
@@ -50,7 +52,11 @@ class ExperimentalImplementation(BaseModel):
|
|
|
50
52
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
51
53
|
|
|
52
54
|
if response.status_code == STATUS_CODE_404:
|
|
53
|
-
|
|
55
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
56
|
+
_logger.warning("Concept descriptions not found.")
|
|
57
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
58
|
+
_logger.debug("Concept descriptions not found.")
|
|
59
|
+
|
|
54
60
|
_logger.debug(response.text)
|
|
55
61
|
return None
|
|
56
62
|
|
|
@@ -80,7 +86,11 @@ class ExperimentalImplementation(BaseModel):
|
|
|
80
86
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
81
87
|
|
|
82
88
|
if response.status_code == STATUS_CODE_404:
|
|
83
|
-
|
|
89
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
90
|
+
_logger.warning(f"Concept description with id '{concept_description_identifier}' not found.")
|
|
91
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
92
|
+
_logger.debug(f"Concept description with id '{concept_description_identifier}' not found.")
|
|
93
|
+
|
|
84
94
|
_logger.debug(response.text)
|
|
85
95
|
return None
|
|
86
96
|
|
|
@@ -110,7 +120,11 @@ class ExperimentalImplementation(BaseModel):
|
|
|
110
120
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
111
121
|
|
|
112
122
|
if response.status_code == STATUS_CODE_404:
|
|
113
|
-
|
|
123
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
124
|
+
_logger.warning("Concept descriptions endpoint not found.")
|
|
125
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
126
|
+
_logger.debug("Concept descriptions endpoint not found.")
|
|
127
|
+
|
|
114
128
|
_logger.debug(response.text)
|
|
115
129
|
return False
|
|
116
130
|
|
|
@@ -140,7 +154,11 @@ class ExperimentalImplementation(BaseModel):
|
|
|
140
154
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
141
155
|
|
|
142
156
|
if response.status_code == STATUS_CODE_404:
|
|
143
|
-
|
|
157
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
158
|
+
_logger.warning(f"Concept description with id '{concept_description_identifier}' not found.")
|
|
159
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
160
|
+
_logger.debug(f"Concept description with id '{concept_description_identifier}' not found.")
|
|
161
|
+
|
|
144
162
|
_logger.debug(response.text)
|
|
145
163
|
return False
|
|
146
164
|
|
|
@@ -174,9 +192,15 @@ class ExperimentalImplementation(BaseModel):
|
|
|
174
192
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
175
193
|
|
|
176
194
|
if response.status_code == STATUS_CODE_404:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
195
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
196
|
+
_logger.warning(
|
|
197
|
+
f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' or file content not found."
|
|
198
|
+
)
|
|
199
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
200
|
+
_logger.debug(
|
|
201
|
+
f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' or file content not found."
|
|
202
|
+
)
|
|
203
|
+
|
|
180
204
|
_logger.debug(response.text)
|
|
181
205
|
return None
|
|
182
206
|
|
|
@@ -220,7 +244,11 @@ class ExperimentalImplementation(BaseModel):
|
|
|
220
244
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
221
245
|
|
|
222
246
|
if response.status_code == STATUS_CODE_404:
|
|
223
|
-
|
|
247
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
248
|
+
_logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
|
|
249
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
250
|
+
_logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
|
|
251
|
+
|
|
224
252
|
_logger.debug(response.text)
|
|
225
253
|
return False
|
|
226
254
|
|
|
@@ -265,7 +293,11 @@ class ExperimentalImplementation(BaseModel):
|
|
|
265
293
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
266
294
|
|
|
267
295
|
if response.status_code == STATUS_CODE_404:
|
|
268
|
-
|
|
296
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
297
|
+
_logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
|
|
298
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
299
|
+
_logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
|
|
300
|
+
|
|
269
301
|
_logger.debug(response.text)
|
|
270
302
|
return False
|
|
271
303
|
|
|
@@ -300,7 +332,11 @@ class ExperimentalImplementation(BaseModel):
|
|
|
300
332
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
301
333
|
|
|
302
334
|
if response.status_code == 404:
|
|
303
|
-
|
|
335
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
336
|
+
_logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
|
|
337
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
338
|
+
_logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
|
|
339
|
+
|
|
304
340
|
return False
|
|
305
341
|
|
|
306
342
|
if response.status_code != STATUS_CODE_200:
|
|
@@ -12,6 +12,7 @@ from pydantic import BaseModel
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
13
|
from aas_http_client.classes.client.aas_client import AasHttpClient
|
|
14
14
|
|
|
15
|
+
from aas_http_client.utilities.constants import LogIntensity
|
|
15
16
|
from aas_http_client.utilities.encoder import encode_base_64
|
|
16
17
|
from aas_http_client.utilities.http_helper import (
|
|
17
18
|
STATUS_CODE_200,
|
|
@@ -34,7 +35,7 @@ class ShellRepoImplementation(BaseModel):
|
|
|
34
35
|
session = client.get_session()
|
|
35
36
|
if session is None:
|
|
36
37
|
raise ValueError(
|
|
37
|
-
"HTTP session is not initialized in the client. Call 'initialize()' method of the client before creating
|
|
38
|
+
"HTTP session is not initialized in the client. Call 'initialize()' method of the client before creating ShellRepoImplementation instance."
|
|
38
39
|
)
|
|
39
40
|
|
|
40
41
|
self._session: requests.Session = session
|
|
@@ -58,7 +59,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
58
59
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
59
60
|
|
|
60
61
|
if response.status_code == STATUS_CODE_404:
|
|
61
|
-
|
|
62
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
63
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
64
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
65
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
66
|
+
|
|
62
67
|
_logger.debug(response.text)
|
|
63
68
|
return None
|
|
64
69
|
|
|
@@ -92,12 +97,16 @@ class ShellRepoImplementation(BaseModel):
|
|
|
92
97
|
response = self._session.put(url, json=request_body, timeout=self._client.time_out)
|
|
93
98
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
94
99
|
|
|
95
|
-
if response.status_code == STATUS_CODE_404:
|
|
96
|
-
|
|
100
|
+
if response.status_code == STATUS_CODE_404: #
|
|
101
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
102
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
103
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
104
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
105
|
+
|
|
97
106
|
_logger.debug(response.text)
|
|
98
107
|
return False
|
|
99
108
|
|
|
100
|
-
if response.status_code
|
|
109
|
+
if response.status_code != STATUS_CODE_204:
|
|
101
110
|
log_response(response)
|
|
102
111
|
return False
|
|
103
112
|
|
|
@@ -126,7 +135,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
126
135
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
127
136
|
|
|
128
137
|
if response.status_code == STATUS_CODE_404:
|
|
129
|
-
|
|
138
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
139
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
140
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
141
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
142
|
+
|
|
130
143
|
_logger.debug(response.text)
|
|
131
144
|
return False
|
|
132
145
|
|
|
@@ -159,7 +172,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
159
172
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
160
173
|
|
|
161
174
|
if response.status_code == STATUS_CODE_404:
|
|
162
|
-
|
|
175
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
176
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
|
|
177
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
178
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
|
|
179
|
+
|
|
163
180
|
_logger.debug(response.text)
|
|
164
181
|
return None
|
|
165
182
|
|
|
@@ -224,7 +241,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
224
241
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
225
242
|
|
|
226
243
|
if response.status_code == STATUS_CODE_404:
|
|
227
|
-
|
|
244
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
245
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
246
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
247
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
248
|
+
|
|
228
249
|
_logger.debug(response.text)
|
|
229
250
|
return False
|
|
230
251
|
|
|
@@ -258,7 +279,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
258
279
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
259
280
|
|
|
260
281
|
if response.status_code == STATUS_CODE_404:
|
|
261
|
-
|
|
282
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
283
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
|
|
284
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
285
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
|
|
286
|
+
|
|
262
287
|
_logger.debug(response.text)
|
|
263
288
|
return False
|
|
264
289
|
|
|
@@ -370,7 +395,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
370
395
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
371
396
|
|
|
372
397
|
if response.status_code == STATUS_CODE_404:
|
|
373
|
-
|
|
398
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
399
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
400
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
401
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
402
|
+
|
|
374
403
|
_logger.debug(response.text)
|
|
375
404
|
return None
|
|
376
405
|
|
|
@@ -405,7 +434,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
405
434
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
406
435
|
|
|
407
436
|
if response.status_code == STATUS_CODE_404:
|
|
408
|
-
|
|
437
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
438
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
439
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
440
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
441
|
+
|
|
409
442
|
_logger.debug(response.text)
|
|
410
443
|
return None
|
|
411
444
|
|
|
@@ -441,7 +474,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
441
474
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
442
475
|
|
|
443
476
|
if response.status_code == STATUS_CODE_404:
|
|
444
|
-
|
|
477
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
478
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
|
|
479
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
480
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
|
|
481
|
+
|
|
445
482
|
_logger.debug(response.text)
|
|
446
483
|
return False
|
|
447
484
|
|
|
@@ -479,7 +516,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
479
516
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
480
517
|
|
|
481
518
|
if response.status_code == STATUS_CODE_404:
|
|
482
|
-
|
|
519
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
520
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
|
|
521
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
522
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
|
|
523
|
+
|
|
483
524
|
_logger.debug(response.text)
|
|
484
525
|
return False
|
|
485
526
|
|
|
@@ -512,7 +553,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
512
553
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
513
554
|
|
|
514
555
|
if response.status_code == STATUS_CODE_404:
|
|
515
|
-
|
|
556
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
557
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
558
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
559
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
|
|
560
|
+
|
|
516
561
|
_logger.debug(response.text)
|
|
517
562
|
return None
|
|
518
563
|
|
|
@@ -548,7 +593,11 @@ class ShellRepoImplementation(BaseModel):
|
|
|
548
593
|
_logger.debug(f"Call REST API url '{response.url}'")
|
|
549
594
|
|
|
550
595
|
if response.status_code == STATUS_CODE_404:
|
|
551
|
-
|
|
596
|
+
if self._client.get_log_intensity() == LogIntensity.High:
|
|
597
|
+
_logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
|
|
598
|
+
elif self._client.get_log_intensity() == LogIntensity.Standard:
|
|
599
|
+
_logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
|
|
600
|
+
|
|
552
601
|
_logger.debug(response.text)
|
|
553
602
|
return None
|
|
554
603
|
|
{aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/wrapper/sdk_wrapper.py
RENAMED
|
@@ -21,6 +21,7 @@ from aas_http_client.classes.wrapper.pagination import (
|
|
|
21
21
|
create_submodel_element_paging_data,
|
|
22
22
|
create_submodel_paging_data,
|
|
23
23
|
)
|
|
24
|
+
from aas_http_client.utilities.constants import LogIntensity
|
|
24
25
|
from aas_http_client.utilities.sdk_tools import convert_to_dict as _to_dict
|
|
25
26
|
from aas_http_client.utilities.sdk_tools import convert_to_object as _to_object
|
|
26
27
|
|
|
@@ -123,6 +124,13 @@ class SdkWrapper:
|
|
|
123
124
|
self._client = client
|
|
124
125
|
self.base_url = client.base_url
|
|
125
126
|
|
|
127
|
+
def set_log_intensity(self, intensity: LogIntensity):
|
|
128
|
+
"""Sets the log intensity level for the client.
|
|
129
|
+
|
|
130
|
+
:param intensity: LogIntensity level to set (Standard or High)
|
|
131
|
+
"""
|
|
132
|
+
self._client.set_log_intensity(intensity)
|
|
133
|
+
|
|
126
134
|
def set_encoded_ids(self, encoded_ids: IdEncoding):
|
|
127
135
|
"""Sets whether to use encoded IDs for API requests.
|
|
128
136
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"""Initialization of the utilities package."""
|
|
2
2
|
|
|
3
3
|
from aas_http_client.utilities import encoder, model_builder, sdk_tools
|
|
4
|
+
from aas_http_client.utilities.constants import LogIntensity
|
|
4
5
|
|
|
5
6
|
__all__ = [
|
|
7
|
+
"LogIntensity",
|
|
6
8
|
"encoder",
|
|
7
9
|
"model_builder",
|
|
8
10
|
"sdk_tools",
|
|
@@ -22,6 +22,7 @@ aas_http_client/classes/wrapper/sdk_wrapper.py
|
|
|
22
22
|
aas_http_client/demo/demo_process.py
|
|
23
23
|
aas_http_client/demo/logging_handler.py
|
|
24
24
|
aas_http_client/utilities/__init__.py
|
|
25
|
+
aas_http_client/utilities/constants.py
|
|
25
26
|
aas_http_client/utilities/encoder.py
|
|
26
27
|
aas_http_client/utilities/http_helper.py
|
|
27
28
|
aas_http_client/utilities/model_builder.py
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "aas-http-client"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.7"
|
|
8
8
|
description = "Flexible Python HTTP client for communication with various types of AAS servers."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/wrapper/attachment.py
RENAMED
|
File without changes
|
{aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client/classes/wrapper/pagination.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aas_http_client-1.2.5 → aas_http_client-1.2.7}/aas_http_client.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|