atk-common 1.10.0__tar.gz → 1.11.0__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.
- {atk_common-1.10.0 → atk_common-1.11.0}/PKG-INFO +1 -1
- {atk_common-1.10.0 → atk_common-1.11.0}/setup.py +1 -1
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/enums/__init__.py +0 -2
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/error_utils.py +2 -2
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/http_utils.py +3 -3
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common.egg-info/PKG-INFO +1 -1
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common.egg-info/SOURCES.txt +0 -1
- atk_common-1.10.0/src/atk_common/enums/http_status_enum.py +0 -8
- {atk_common-1.10.0 → atk_common-1.11.0}/README.md +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/license.txt +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/pyproject.toml +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/setup.cfg +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/__init__.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/datetime_utils.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/db_utils.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/docker_utils.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/enums/api_error_type_enum.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/enums/command_status_enum.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/enums/response_status_enum.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/enums/speed_control_status_enum.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/env_utils.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/log_utils.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/mq_utils.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/rabbitmq_consumer.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common/response_utils.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common.egg-info/dependency_links.txt +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common.egg-info/requires.txt +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/atk_common.egg-info/top_level.txt +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/src/shared_python_atk_enforcement/__init__.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/tests/test_docker_utils.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/tests/test_error_utils.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/tests/test_http_utils.py +0 -0
- {atk_common-1.10.0 → atk_common-1.11.0}/tests/test_log_utils.py +0 -0
@@ -36,7 +36,7 @@ setup(
|
|
36
36
|
# For a discussion on single-sourcing the version across setup.py and the
|
37
37
|
# project code, see
|
38
38
|
# https://packaging.python.org/guides/single-sourcing-package-version/
|
39
|
-
version="1.
|
39
|
+
version="1.11.0", # Required
|
40
40
|
# This is a one-line description or tagline of what your project does. This
|
41
41
|
# corresponds to the "Summary" metadata field:
|
42
42
|
# https://packaging.python.org/specifications/core-metadata/#summary
|
@@ -3,12 +3,10 @@ from atk_common.enums.command_status_enum import CommandStatusType
|
|
3
3
|
from atk_common.enums.speed_control_status_enum import SpeedControlStatusType
|
4
4
|
from atk_common.enums.api_error_type_enum import ApiErrorType
|
5
5
|
from atk_common.enums.response_status_enum import ResponseStatus
|
6
|
-
from atk_common.enums.http_status_enum import HttpStatus
|
7
6
|
|
8
7
|
__all__ = [
|
9
8
|
'CommandStatusType',
|
10
9
|
'SpeedControlStatusType',
|
11
10
|
'ApiErrorType',
|
12
11
|
'ResponseStatus',
|
13
|
-
'HttpStatus',
|
14
12
|
]
|
@@ -1,8 +1,8 @@
|
|
1
|
+
from http import HTTPStatus
|
1
2
|
from datetime import datetime
|
2
3
|
import json
|
3
4
|
from atk_common.datetime_utils import get_utc_date_time
|
4
5
|
from atk_common.enums.api_error_type_enum import ApiErrorType
|
5
|
-
from atk_common.enums.http_status_enum import HttpStatus
|
6
6
|
from atk_common.http_utils import is_http_status_internal
|
7
7
|
from atk_common.log_utils import add_log_item
|
8
8
|
from atk_common.response_utils import create_save_resp
|
@@ -38,7 +38,7 @@ def get_error_entity(app, error, method, error_type, status_code, container_info
|
|
38
38
|
if app is not None:
|
39
39
|
return app.response_class(
|
40
40
|
response=json.dumps(data),
|
41
|
-
status=
|
41
|
+
status=HTTPStatus.INTERNAL_SERVER_ERROR,
|
42
42
|
mimetype='application/json'
|
43
43
|
)
|
44
44
|
return None
|
@@ -1,14 +1,14 @@
|
|
1
|
+
from http import HTTPStatus
|
1
2
|
import json
|
2
3
|
from atk_common.datetime_utils import get_utc_date_time
|
3
4
|
from atk_common.docker_utils import get_current_container_info
|
4
|
-
from atk_common.enums.http_status_enum import HttpStatus
|
5
5
|
from atk_common.env_utils import get_env_value
|
6
6
|
|
7
7
|
def is_http_status_ok(status_code):
|
8
|
-
return status_code >=
|
8
|
+
return status_code >= HTTPStatus.OK.value and status_code < HTTPStatus.MULTIPLE_CHOICES.value
|
9
9
|
|
10
10
|
def is_http_status_internal(status_code):
|
11
|
-
return status_code >=
|
11
|
+
return status_code >= HTTPStatus.INTERNAL_SERVER_ERROR.value
|
12
12
|
|
13
13
|
def get_test_response(docker_container_data, component):
|
14
14
|
data = {}
|
@@ -22,7 +22,6 @@ src/atk_common.egg-info/top_level.txt
|
|
22
22
|
src/atk_common/enums/__init__.py
|
23
23
|
src/atk_common/enums/api_error_type_enum.py
|
24
24
|
src/atk_common/enums/command_status_enum.py
|
25
|
-
src/atk_common/enums/http_status_enum.py
|
26
25
|
src/atk_common/enums/response_status_enum.py
|
27
26
|
src/atk_common/enums/speed_control_status_enum.py
|
28
27
|
src/shared_python_atk_enforcement/__init__.py
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|