aas-http-client 1.2.7__tar.gz → 1.2.8__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.
Files changed (37) hide show
  1. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/PKG-INFO +1 -1
  2. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/client/aas_client.py +1 -1
  3. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/client/implementations/experimental_implementation.py +16 -16
  4. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/client/implementations/shell_implementation.py +24 -24
  5. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/client/implementations/shell_registry_implementation.py +41 -8
  6. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/client/implementations/sm_implementation.py +61 -12
  7. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/client/implementations/sm_registry_implementation.py +16 -3
  8. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/utilities/constants.py +2 -2
  9. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client.egg-info/PKG-INFO +1 -1
  10. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/pyproject.toml +1 -1
  11. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/LICENSE +0 -0
  12. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/README.md +0 -0
  13. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/__init__.py +0 -0
  14. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/Configuration/config_classes.py +0 -0
  15. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/client/implementations/__init__.py +0 -0
  16. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/client/implementations/authentication.py +0 -0
  17. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/wrapper/attachment.py +0 -0
  18. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/wrapper/pagination.py +0 -0
  19. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/classes/wrapper/sdk_wrapper.py +0 -0
  20. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/demo/demo_process.py +0 -0
  21. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/demo/logging_handler.py +0 -0
  22. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/utilities/__init__.py +0 -0
  23. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/utilities/encoder.py +0 -0
  24. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/utilities/http_helper.py +0 -0
  25. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/utilities/model_builder.py +0 -0
  26. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/utilities/sdk_tools.py +0 -0
  27. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client/utilities/version_check.py +0 -0
  28. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client.egg-info/SOURCES.txt +0 -0
  29. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client.egg-info/dependency_links.txt +0 -0
  30. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client.egg-info/requires.txt +0 -0
  31. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/aas_http_client.egg-info/top_level.txt +0 -0
  32. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/setup.cfg +0 -0
  33. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/tests/test_client.py +0 -0
  34. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/tests/test_client_reg.py +0 -0
  35. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/tests/test_sdk_tools.py +0 -0
  36. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/tests/test_utils.py +0 -0
  37. {aas_http_client-1.2.7 → aas_http_client-1.2.8}/tests/test_wrapper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aas-http-client
3
- Version: 1.2.7
3
+ Version: 1.2.8
4
4
  Summary: Flexible Python HTTP client for communication with various types of AAS servers.
5
5
  Author-email: Daniel Klein <daniel.klein@em.ag>
6
6
  License: MIT License
@@ -76,7 +76,7 @@ class AasHttpClient(BaseModel):
76
76
  experimental: ExperimentalImplementation | None = Field(default=None)
77
77
  submodel_registry: SubmodelRegistryImplementation | None = Field(default=None)
78
78
  _cached_token: TokenData | None = PrivateAttr(default=None)
79
- _log_intensity: LogIntensity = PrivateAttr(default=LogIntensity.High)
79
+ _log_intensity: LogIntensity = PrivateAttr(default=LogIntensity.HIGH)
80
80
 
81
81
  def initialize(self):
82
82
  """Initialize the AasHttpClient with the given URL, username and password."""
@@ -52,9 +52,9 @@ class ExperimentalImplementation(BaseModel):
52
52
  _logger.debug(f"Call REST API url '{response.url}'")
53
53
 
54
54
  if response.status_code == STATUS_CODE_404:
55
- if self._client.get_log_intensity() == LogIntensity.High:
55
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
56
56
  _logger.warning("Concept descriptions not found.")
57
- elif self._client.get_log_intensity() == LogIntensity.Standard:
57
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
58
58
  _logger.debug("Concept descriptions not found.")
59
59
 
60
60
  _logger.debug(response.text)
@@ -86,9 +86,9 @@ class ExperimentalImplementation(BaseModel):
86
86
  _logger.debug(f"Call REST API url '{response.url}'")
87
87
 
88
88
  if response.status_code == STATUS_CODE_404:
89
- if self._client.get_log_intensity() == LogIntensity.High:
89
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
90
90
  _logger.warning(f"Concept description with id '{concept_description_identifier}' not found.")
91
- elif self._client.get_log_intensity() == LogIntensity.Standard:
91
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
92
92
  _logger.debug(f"Concept description with id '{concept_description_identifier}' not found.")
93
93
 
94
94
  _logger.debug(response.text)
@@ -120,9 +120,9 @@ class ExperimentalImplementation(BaseModel):
120
120
  _logger.debug(f"Call REST API url '{response.url}'")
121
121
 
122
122
  if response.status_code == STATUS_CODE_404:
123
- if self._client.get_log_intensity() == LogIntensity.High:
123
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
124
124
  _logger.warning("Concept descriptions endpoint not found.")
125
- elif self._client.get_log_intensity() == LogIntensity.Standard:
125
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
126
126
  _logger.debug("Concept descriptions endpoint not found.")
127
127
 
128
128
  _logger.debug(response.text)
@@ -154,9 +154,9 @@ class ExperimentalImplementation(BaseModel):
154
154
  _logger.debug(f"Call REST API url '{response.url}'")
155
155
 
156
156
  if response.status_code == STATUS_CODE_404:
157
- if self._client.get_log_intensity() == LogIntensity.High:
157
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
158
158
  _logger.warning(f"Concept description with id '{concept_description_identifier}' not found.")
159
- elif self._client.get_log_intensity() == LogIntensity.Standard:
159
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
160
160
  _logger.debug(f"Concept description with id '{concept_description_identifier}' not found.")
161
161
 
162
162
  _logger.debug(response.text)
@@ -192,11 +192,11 @@ class ExperimentalImplementation(BaseModel):
192
192
  _logger.debug(f"Call REST API url '{response.url}'")
193
193
 
194
194
  if response.status_code == STATUS_CODE_404:
195
- if self._client.get_log_intensity() == LogIntensity.High:
195
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
196
196
  _logger.warning(
197
197
  f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' or file content not found."
198
198
  )
199
- elif self._client.get_log_intensity() == LogIntensity.Standard:
199
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
200
200
  _logger.debug(
201
201
  f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' or file content not found."
202
202
  )
@@ -244,9 +244,9 @@ class ExperimentalImplementation(BaseModel):
244
244
  _logger.debug(f"Call REST API url '{response.url}'")
245
245
 
246
246
  if response.status_code == STATUS_CODE_404:
247
- if self._client.get_log_intensity() == LogIntensity.High:
247
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
248
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:
249
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
250
250
  _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
251
251
 
252
252
  _logger.debug(response.text)
@@ -293,9 +293,9 @@ class ExperimentalImplementation(BaseModel):
293
293
  _logger.debug(f"Call REST API url '{response.url}'")
294
294
 
295
295
  if response.status_code == STATUS_CODE_404:
296
- if self._client.get_log_intensity() == LogIntensity.High:
296
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
297
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:
298
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
299
299
  _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
300
300
 
301
301
  _logger.debug(response.text)
@@ -332,9 +332,9 @@ class ExperimentalImplementation(BaseModel):
332
332
  _logger.debug(f"Call REST API url '{response.url}'")
333
333
 
334
334
  if response.status_code == 404:
335
- if self._client.get_log_intensity() == LogIntensity.High:
335
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
336
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:
337
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
338
338
  _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
339
339
 
340
340
  return False
@@ -59,9 +59,9 @@ class ShellRepoImplementation(BaseModel):
59
59
  _logger.debug(f"Call REST API url '{response.url}'")
60
60
 
61
61
  if response.status_code == STATUS_CODE_404:
62
- if self._client.get_log_intensity() == LogIntensity.High:
62
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
63
63
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
64
- elif self._client.get_log_intensity() == LogIntensity.Standard:
64
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
65
65
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
66
66
 
67
67
  _logger.debug(response.text)
@@ -98,9 +98,9 @@ class ShellRepoImplementation(BaseModel):
98
98
  _logger.debug(f"Call REST API url '{response.url}'")
99
99
 
100
100
  if response.status_code == STATUS_CODE_404: #
101
- if self._client.get_log_intensity() == LogIntensity.High:
101
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
102
102
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
103
- elif self._client.get_log_intensity() == LogIntensity.Standard:
103
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
104
104
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
105
105
 
106
106
  _logger.debug(response.text)
@@ -135,9 +135,9 @@ class ShellRepoImplementation(BaseModel):
135
135
  _logger.debug(f"Call REST API url '{response.url}'")
136
136
 
137
137
  if response.status_code == STATUS_CODE_404:
138
- if self._client.get_log_intensity() == LogIntensity.High:
138
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
139
139
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
140
- elif self._client.get_log_intensity() == LogIntensity.Standard:
140
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
141
141
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
142
142
 
143
143
  _logger.debug(response.text)
@@ -172,9 +172,9 @@ class ShellRepoImplementation(BaseModel):
172
172
  _logger.debug(f"Call REST API url '{response.url}'")
173
173
 
174
174
  if response.status_code == STATUS_CODE_404:
175
- if self._client.get_log_intensity() == LogIntensity.High:
175
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
176
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:
177
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
178
178
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
179
179
 
180
180
  _logger.debug(response.text)
@@ -241,9 +241,9 @@ class ShellRepoImplementation(BaseModel):
241
241
  _logger.debug(f"Call REST API url '{response.url}'")
242
242
 
243
243
  if response.status_code == STATUS_CODE_404:
244
- if self._client.get_log_intensity() == LogIntensity.High:
244
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
245
245
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
246
- elif self._client.get_log_intensity() == LogIntensity.Standard:
246
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
247
247
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
248
248
 
249
249
  _logger.debug(response.text)
@@ -279,9 +279,9 @@ class ShellRepoImplementation(BaseModel):
279
279
  _logger.debug(f"Call REST API url '{response.url}'")
280
280
 
281
281
  if response.status_code == STATUS_CODE_404:
282
- if self._client.get_log_intensity() == LogIntensity.High:
282
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
283
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:
284
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
285
285
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
286
286
 
287
287
  _logger.debug(response.text)
@@ -395,9 +395,9 @@ class ShellRepoImplementation(BaseModel):
395
395
  _logger.debug(f"Call REST API url '{response.url}'")
396
396
 
397
397
  if response.status_code == STATUS_CODE_404:
398
- if self._client.get_log_intensity() == LogIntensity.High:
398
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
399
399
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
400
- elif self._client.get_log_intensity() == LogIntensity.Standard:
400
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
401
401
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
402
402
 
403
403
  _logger.debug(response.text)
@@ -434,9 +434,9 @@ class ShellRepoImplementation(BaseModel):
434
434
  _logger.debug(f"Call REST API url '{response.url}'")
435
435
 
436
436
  if response.status_code == STATUS_CODE_404:
437
- if self._client.get_log_intensity() == LogIntensity.High:
437
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
438
438
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
439
- elif self._client.get_log_intensity() == LogIntensity.Standard:
439
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
440
440
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
441
441
 
442
442
  _logger.debug(response.text)
@@ -474,9 +474,9 @@ class ShellRepoImplementation(BaseModel):
474
474
  _logger.debug(f"Call REST API url '{response.url}'")
475
475
 
476
476
  if response.status_code == STATUS_CODE_404:
477
- if self._client.get_log_intensity() == LogIntensity.High:
477
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
478
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:
479
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
480
480
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
481
481
 
482
482
  _logger.debug(response.text)
@@ -516,9 +516,9 @@ class ShellRepoImplementation(BaseModel):
516
516
  _logger.debug(f"Call REST API url '{response.url}'")
517
517
 
518
518
  if response.status_code == STATUS_CODE_404:
519
- if self._client.get_log_intensity() == LogIntensity.High:
519
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
520
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:
521
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
522
522
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
523
523
 
524
524
  _logger.debug(response.text)
@@ -553,9 +553,9 @@ class ShellRepoImplementation(BaseModel):
553
553
  _logger.debug(f"Call REST API url '{response.url}'")
554
554
 
555
555
  if response.status_code == STATUS_CODE_404:
556
- if self._client.get_log_intensity() == LogIntensity.High:
556
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
557
557
  _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
558
- elif self._client.get_log_intensity() == LogIntensity.Standard:
558
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
559
559
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
560
560
 
561
561
  _logger.debug(response.text)
@@ -593,9 +593,9 @@ class ShellRepoImplementation(BaseModel):
593
593
  _logger.debug(f"Call REST API url '{response.url}'")
594
594
 
595
595
  if response.status_code == STATUS_CODE_404:
596
- if self._client.get_log_intensity() == LogIntensity.High:
596
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
597
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:
598
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
599
599
  _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
600
600
 
601
601
  _logger.debug(response.text)
@@ -10,6 +10,7 @@ from pydantic import BaseModel
10
10
  if TYPE_CHECKING:
11
11
  from aas_http_client.classes.client.aas_client import AasHttpClient
12
12
 
13
+ from aas_http_client.utilities.constants import LogIntensity
13
14
  from aas_http_client.utilities.encoder import encode_base_64
14
15
  from aas_http_client.utilities.http_helper import (
15
16
  STATUS_CODE_200,
@@ -56,7 +57,11 @@ class ShellRegistryImplementation(BaseModel):
56
57
  _logger.debug(f"Call REST API url '{response.url}'")
57
58
 
58
59
  if response.status_code == STATUS_CODE_404:
59
- _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
60
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
61
+ _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
62
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
63
+ _logger.debug(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
64
+
60
65
  _logger.debug(response.text)
61
66
  return None
62
67
 
@@ -91,7 +96,11 @@ class ShellRegistryImplementation(BaseModel):
91
96
  _logger.debug(f"Call REST API url '{response.url}'")
92
97
 
93
98
  if response.status_code == STATUS_CODE_404:
94
- _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
99
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
100
+ _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
101
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
102
+ _logger.debug(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
103
+
95
104
  _logger.debug(response.text)
96
105
  return False
97
106
 
@@ -124,7 +133,11 @@ class ShellRegistryImplementation(BaseModel):
124
133
  _logger.debug(f"Call REST API url '{response.url}'")
125
134
 
126
135
  if response.status_code == STATUS_CODE_404:
127
- _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
136
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
137
+ _logger.warning(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
138
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
139
+ _logger.debug(f"Asset Administration Shell Descriptor with id '{aas_identifier}' not found.")
140
+
128
141
  _logger.debug(response.text)
129
142
  return False
130
143
 
@@ -159,7 +172,11 @@ class ShellRegistryImplementation(BaseModel):
159
172
  _logger.debug(f"Call REST API url '{response.url}'")
160
173
 
161
174
  if response.status_code == STATUS_CODE_404:
162
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
175
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
176
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
177
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
178
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
179
+
163
180
  _logger.debug(response.text)
164
181
  return None
165
182
 
@@ -196,7 +213,11 @@ class ShellRegistryImplementation(BaseModel):
196
213
  _logger.debug(f"Call REST API url '{response.url}'")
197
214
 
198
215
  if response.status_code == STATUS_CODE_404:
199
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
216
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
217
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
218
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
219
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
220
+
200
221
  _logger.debug(response.text)
201
222
  return False
202
223
 
@@ -231,7 +252,11 @@ class ShellRegistryImplementation(BaseModel):
231
252
  _logger.debug(f"Call REST API url '{response.url}'")
232
253
 
233
254
  if response.status_code == STATUS_CODE_404:
234
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
255
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
256
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
257
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
258
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' or submodel with id '{submodel_identifier}' not found.")
259
+
235
260
  _logger.debug(response.text)
236
261
  return False
237
262
 
@@ -355,7 +380,11 @@ class ShellRegistryImplementation(BaseModel):
355
380
  _logger.debug(f"Call REST API url '{response.url}'")
356
381
 
357
382
  if response.status_code == STATUS_CODE_404:
358
- _logger.warning(f"Shell Descriptor with id '{aas_identifier}' not found.")
383
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
384
+ _logger.warning(f"Shell Descriptor with id '{aas_identifier}' not found.")
385
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
386
+ _logger.debug(f"Shell Descriptor with id '{aas_identifier}' not found.")
387
+
359
388
  _logger.debug(response.text)
360
389
  return None
361
390
 
@@ -390,7 +419,11 @@ class ShellRegistryImplementation(BaseModel):
390
419
  _logger.debug(f"Call REST API url '{response.url}'")
391
420
 
392
421
  if response.status_code == STATUS_CODE_404:
393
- _logger.warning(f"Shell Descriptor with id '{aas_identifier}' not found.")
422
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
423
+ _logger.warning(f"Shell Descriptor with id '{aas_identifier}' not found.")
424
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
425
+ _logger.debug(f"Shell Descriptor with id '{aas_identifier}' not found.")
426
+
394
427
  _logger.debug(response.text)
395
428
  return None
396
429
 
@@ -10,6 +10,7 @@ from pydantic import BaseModel
10
10
  if TYPE_CHECKING:
11
11
  from aas_http_client.classes.client.aas_client import AasHttpClient
12
12
 
13
+ from aas_http_client.utilities.constants import LogIntensity
13
14
  from aas_http_client.utilities.encoder import encode_base_64
14
15
  from aas_http_client.utilities.http_helper import (
15
16
  STATUS_CODE_200,
@@ -64,7 +65,11 @@ class SubmodelRepoImplementation(BaseModel):
64
65
  _logger.debug(f"Call REST API url '{response.url}'")
65
66
 
66
67
  if response.status_code == STATUS_CODE_404:
67
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
68
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
69
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
70
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
71
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
72
+
68
73
  _logger.debug(response.text)
69
74
  return None
70
75
 
@@ -99,7 +104,11 @@ class SubmodelRepoImplementation(BaseModel):
99
104
  _logger.debug(f"Call REST API url '{response.url}'")
100
105
 
101
106
  if response.status_code == STATUS_CODE_404:
102
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
107
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
108
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
109
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
110
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
111
+
103
112
  _logger.debug(response.text)
104
113
  return False
105
114
 
@@ -132,7 +141,11 @@ class SubmodelRepoImplementation(BaseModel):
132
141
  _logger.debug(f"Call REST API url '{response.url}'")
133
142
 
134
143
  if response.status_code == STATUS_CODE_404:
135
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
144
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
145
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
146
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
147
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
148
+
136
149
  _logger.debug(response.text)
137
150
  return False
138
151
 
@@ -176,7 +189,11 @@ class SubmodelRepoImplementation(BaseModel):
176
189
  _logger.debug(f"Call REST API url '{response.url}'")
177
190
 
178
191
  if response.status_code == STATUS_CODE_404:
179
- _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
192
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
193
+ _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
194
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
195
+ _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
196
+
180
197
  _logger.debug(response.text)
181
198
  return None
182
199
 
@@ -217,7 +234,11 @@ class SubmodelRepoImplementation(BaseModel):
217
234
  _logger.debug(f"Call REST API url '{response.url}'")
218
235
 
219
236
  if response.status_code == STATUS_CODE_404:
220
- _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
237
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
238
+ _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
239
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
240
+ _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
241
+
221
242
  _logger.debug(response.text)
222
243
  return False
223
244
 
@@ -262,7 +283,11 @@ class SubmodelRepoImplementation(BaseModel):
262
283
  _logger.debug(f"Call REST API url '{response.url}'")
263
284
 
264
285
  if response.status_code == STATUS_CODE_404:
265
- _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
286
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
287
+ _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
288
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
289
+ _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
290
+
266
291
  _logger.debug(response.text)
267
292
  return None
268
293
 
@@ -296,7 +321,11 @@ class SubmodelRepoImplementation(BaseModel):
296
321
  _logger.debug(f"Call REST API url '{response.url}'")
297
322
 
298
323
  if response.status_code == STATUS_CODE_404:
299
- _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
324
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
325
+ _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
326
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
327
+ _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
328
+
300
329
  _logger.debug(response.text)
301
330
  return False
302
331
 
@@ -548,7 +577,11 @@ class SubmodelRepoImplementation(BaseModel):
548
577
  _logger.debug(f"Call REST API url '{response.url}'")
549
578
 
550
579
  if response.status_code == STATUS_CODE_404:
551
- _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
580
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
581
+ _logger.warning(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
582
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
583
+ _logger.debug(f"Submodel with id '{submodel_identifier}' or Submodel element with IDShort path '{id_short_path}' not found.")
584
+
552
585
  _logger.debug(response.text)
553
586
  return False
554
587
 
@@ -589,7 +622,11 @@ class SubmodelRepoImplementation(BaseModel):
589
622
  _logger.debug(f"Call REST API url '{response.url}'")
590
623
 
591
624
  if response.status_code == STATUS_CODE_404:
592
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
625
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
626
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
627
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
628
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
629
+
593
630
  _logger.debug(response.text)
594
631
  return None
595
632
 
@@ -629,7 +666,11 @@ class SubmodelRepoImplementation(BaseModel):
629
666
  _logger.debug(f"Call REST API url '{response.url}'")
630
667
 
631
668
  if response.status_code == STATUS_CODE_404:
632
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
669
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
670
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
671
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
672
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
673
+
633
674
  _logger.debug(response.text)
634
675
  return False
635
676
 
@@ -667,7 +708,11 @@ class SubmodelRepoImplementation(BaseModel):
667
708
  _logger.debug(f"Call REST API url '{response.url}'")
668
709
 
669
710
  if response.status_code == STATUS_CODE_404:
670
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
711
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
712
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
713
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
714
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
715
+
671
716
  _logger.debug(response.text)
672
717
  return None
673
718
 
@@ -703,7 +748,11 @@ class SubmodelRepoImplementation(BaseModel):
703
748
  _logger.debug(f"Call REST API url '{response.url}'")
704
749
 
705
750
  if response.status_code == STATUS_CODE_404:
706
- _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
751
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
752
+ _logger.warning(f"Submodel with id '{submodel_identifier}' not found.")
753
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
754
+ _logger.debug(f"Submodel with id '{submodel_identifier}' not found.")
755
+
707
756
  _logger.debug(response.text)
708
757
  return False
709
758
 
@@ -11,6 +11,7 @@ if TYPE_CHECKING:
11
11
  from aas_http_client.classes.client.aas_client import AasHttpClient
12
12
 
13
13
 
14
+ from aas_http_client.utilities.constants import LogIntensity
14
15
  from aas_http_client.utilities.encoder import encode_base_64
15
16
  from aas_http_client.utilities.http_helper import (
16
17
  STATUS_CODE_200,
@@ -57,7 +58,11 @@ class SubmodelRegistryImplementation(BaseModel):
57
58
  _logger.debug(f"Call REST API url '{response.url}'")
58
59
 
59
60
  if response.status_code == STATUS_CODE_404:
60
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
61
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
62
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
63
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
64
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
65
+
61
66
  _logger.debug(response.text)
62
67
  return None
63
68
 
@@ -92,7 +97,11 @@ class SubmodelRegistryImplementation(BaseModel):
92
97
  _logger.debug(f"Call REST API url '{response.url}'")
93
98
 
94
99
  if response.status_code == STATUS_CODE_404:
95
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
100
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
101
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
102
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
103
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
104
+
96
105
  _logger.debug(response.text)
97
106
  return False
98
107
 
@@ -125,7 +134,11 @@ class SubmodelRegistryImplementation(BaseModel):
125
134
  _logger.debug(f"Call REST API url '{response.url}'")
126
135
 
127
136
  if response.status_code == STATUS_CODE_404:
128
- _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
137
+ if self._client.get_log_intensity() == LogIntensity.HIGH:
138
+ _logger.warning(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
139
+ elif self._client.get_log_intensity() == LogIntensity.STANDARD:
140
+ _logger.debug(f"Submodel Descriptor with id '{submodel_identifier}' not found.")
141
+
129
142
  _logger.debug(response.text)
130
143
  return False
131
144
 
@@ -4,5 +4,5 @@ from enum import Enum
4
4
  class LogIntensity(Enum):
5
5
  """Log intensity levels for the AAS HTTP client. Higher levels produce more detailed logs (e.g. for item not found). Standard level only logs critical errors and warnings."""
6
6
 
7
- Standard = 1
8
- High = 2
7
+ STANDARD = 1
8
+ HIGH = 2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aas-http-client
3
- Version: 1.2.7
3
+ Version: 1.2.8
4
4
  Summary: Flexible Python HTTP client for communication with various types of AAS servers.
5
5
  Author-email: Daniel Klein <daniel.klein@em.ag>
6
6
  License: MIT License
@@ -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"
7
+ version = "1.2.8"
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