holado 0.10.1__py3-none-any.whl → 0.11.0__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.

Potentially problematic release.


This version of holado might be problematic. Click here for more details.

Files changed (61) hide show
  1. holado/common/context/session_context.py +1 -1
  2. {holado-0.10.1.dist-info → holado-0.11.0.dist-info}/METADATA +1 -1
  3. {holado-0.10.1.dist-info → holado-0.11.0.dist-info}/RECORD +33 -59
  4. holado_core/common/tools/path_manager.py +2 -2
  5. holado_docker/tests/behave/steps/__init__.py +1 -1
  6. holado_python/standard_library/ssl/resources/certificates/tcpbin.crt +16 -16
  7. holado_python/standard_library/ssl/resources/certificates/tcpbin.key +26 -26
  8. holado_report/campaign/campaign_manager.py +2 -2
  9. holado_report/report/builders/failure_report_builder.py +1 -1
  10. holado_report/report/builders/short_scenario_failed_report_builder.py +1 -1
  11. holado_report/report/builders/summary_scenario_by_category_report_builder.py +87 -0
  12. holado_report/report/builders/summary_scenario_failed_report_builder.py +1 -1
  13. holado_report/report/builders/summary_scenario_report_builder.py +1 -1
  14. holado_report/report/report_manager.py +40 -10
  15. holado_test/__init__.py +1 -1
  16. holado_test/{test_server → tools/test_server}/server/Dockerfile +6 -16
  17. holado_test/{test_server → tools/test_server}/server/core/server_context.py +1 -1
  18. holado_test/{test_server → tools/test_server}/server/rest/run.py +1 -1
  19. test_holado/features/Test/test_host_controller.feature +13 -0
  20. test_holado/logging.conf +1 -1
  21. holado_docker/tests/behave/steps/tools/docker_controller/client_steps.py +0 -97
  22. holado_docker/tools/docker_controller/client/rest/docker_controller_client.py +0 -143
  23. holado_docker/tools/docker_controller/server/Dockerfile +0 -70
  24. holado_docker/tools/docker_controller/server/grpc/README +0 -2
  25. holado_docker/tools/docker_controller/server/grpc/__init__.py +0 -26
  26. holado_docker/tools/docker_controller/server/grpc/proto/compile_proto.py +0 -60
  27. holado_docker/tools/docker_controller/server/grpc/proto/definitions/docker_controler.proto +0 -63
  28. holado_docker/tools/docker_controller/server/requirements.txt +0 -2
  29. holado_docker/tools/docker_controller/server/rest/README +0 -2
  30. holado_docker/tools/docker_controller/server/rest/api/__init__.py +0 -40
  31. holado_docker/tools/docker_controller/server/rest/api/config.py +0 -57
  32. holado_docker/tools/docker_controller/server/rest/api/container.py +0 -55
  33. holado_docker/tools/docker_controller/server/rest/api/os.py +0 -47
  34. holado_docker/tools/docker_controller/server/rest/openapi.yaml +0 -265
  35. holado_docker/tools/docker_controller/server/rest/run.py +0 -31
  36. holado_docker/tools/docker_controller/server/run_docker_controller_in_docker.sh +0 -102
  37. holado_docker/tools/docker_viewer/client/rest/docker_viewer_client.py +0 -40
  38. holado_docker/tools/docker_viewer/docker_viewer_manager.py +0 -44
  39. holado_docker/tools/docker_viewer/server/Dockerfile +0 -70
  40. holado_docker/tools/docker_viewer/server/requirements.txt +0 -2
  41. holado_docker/tools/docker_viewer/server/rest/README +0 -2
  42. holado_docker/tools/docker_viewer/server/rest/api/__init__.py +0 -40
  43. holado_docker/tools/docker_viewer/server/rest/initialize_holado.py +0 -72
  44. holado_docker/tools/docker_viewer/server/rest/openapi.yaml +0 -58
  45. holado_docker/tools/docker_viewer/server/rest/run.py +0 -31
  46. holado_docker/tools/docker_viewer/server/run_docker_viewer_in_docker.sh +0 -101
  47. holado_test/test_server/server/rest/initialize_holado.py +0 -72
  48. test_holado/features/Test/test_docker_controller.feature +0 -13
  49. {holado-0.10.1.dist-info → holado-0.11.0.dist-info}/WHEEL +0 -0
  50. {holado-0.10.1.dist-info → holado-0.11.0.dist-info}/licenses/LICENSE +0 -0
  51. /holado_test/{test_server → tools/test_server}/client/rest/test_server_client.py +0 -0
  52. /holado_test/{test_server → tools/test_server}/server/core/server_manager.py +0 -0
  53. /holado_test/{test_server → tools/test_server}/server/requirements.txt +0 -0
  54. /holado_test/{test_server → tools/test_server}/server/rest/README +0 -0
  55. /holado_test/{test_server → tools/test_server}/server/rest/api/__init__.py +0 -0
  56. /holado_test/{test_server → tools/test_server}/server/rest/api/campaign/__init__.py +0 -0
  57. /holado_test/{test_server → tools/test_server}/server/rest/api/campaign/scenario.py +0 -0
  58. {holado_docker/tools/docker_controller → holado_test/tools/test_server}/server/rest/initialize_holado.py +0 -0
  59. /holado_test/{test_server → tools/test_server}/server/rest/logging.conf +0 -0
  60. /holado_test/{test_server → tools/test_server}/server/rest/openapi.yaml +0 -0
  61. /holado_test/{test_server → tools/test_server}/server/run_test_server_in_docker.sh +0 -0
@@ -1,72 +0,0 @@
1
-
2
- #################################################
3
- # HolAdo (Holistic Automation do)
4
- #
5
- # (C) Copyright 2021-2025 by Eric Klumpp
6
- #
7
- # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
- #
9
- # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
-
11
- # The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software.
12
- #################################################
13
-
14
-
15
- #################################################
16
- # GOAL: Tools when using a clone of HolAdo project.
17
- #
18
- # This file contains methods usefull to initialize environments using a clone of HolAdo project.
19
- #
20
- # USAGE:
21
- # - Copy this file in projects using HolAdo.
22
- # - Define environment variable HOLADO_PATH with path to cloned HolAdo project.
23
- # If HOLADO_PATH is defined, sources of cloned HolAdo project are used, else installed holado package is used.
24
- #################################################
25
-
26
-
27
-
28
- import os
29
- import sys
30
-
31
-
32
- def insert_sys_path(path, index=0):
33
- """Insert a path in sys.path if it doesn't already exists.
34
- """
35
- if path not in sys.path:
36
- sys.path.insert(index, path)
37
-
38
- def insert_sys_paths(list_paths, index=0):
39
- """Insert a list of path in sys.path if it doesn't already exists.
40
- """
41
- if list_paths:
42
- for path in list_paths:
43
- insert_sys_path(path, index=index)
44
-
45
- def insert_holado_source_paths(with_test_behave=True):
46
- """Insert in sys.path all HolAdo source paths.
47
- If environment variable HOLADO_PATH is defined with path to HolAdo project, following paths are inserted in sys.path:
48
- - HOLADO_PATH/src: path to holado modules sources
49
- - HOLADO_PATH/tests/behave (if with_test_behave==True): path to holado test sources, needed by testing solutions
50
- """
51
- holado_path = os.getenv('HOLADO_PATH')
52
- if holado_path is None:
53
- try:
54
- import holado # @UnusedImport
55
- except Exception as exc:
56
- if "No module named" in str(exc):
57
- raise Exception(f"If environment variable HOLADO_PATH is not defined with path to HolAdo project, 'holado' python package must be installed")
58
- else:
59
- raise exc
60
- else:
61
- # holado is installed, and all sources are already accessible
62
- pass
63
- else:
64
- print(f"Using HolAdo project installed in '{holado_path}'")
65
- # import traceback
66
- # print("".join(traceback.format_list(traceback.extract_stack())))
67
- # insert_sys_path(holado_path)
68
- insert_sys_path(os.path.join(holado_path, "src"))
69
- if with_test_behave:
70
- insert_sys_path(os.path.join(holado_path, "tests", "behave"))
71
-
72
-
@@ -1,58 +0,0 @@
1
- openapi: "3.0.0"
2
- info:
3
- version: "1"
4
- title: "Docker Viewer API"
5
- description: |
6
- API to process some docker actions from anywhere on the network.
7
- In a microservice architecture, the docker viewer can be run in a docker with special privileges,
8
- whereas all other microservices have user privileges.
9
- For example, it is usefull to monitor containers statuses from any terminal on the network.
10
- paths:
11
- /container:
12
- get:
13
- description: "List containers and their status"
14
- parameters:
15
- - in: "query"
16
- name: "all"
17
- description: "if set to 'true', list all containers, not only running ones"
18
- schema:
19
- type: "boolean"
20
- default: false
21
- responses:
22
- 200:
23
- description: "List of container names with their status"
24
- content:
25
- application/json:
26
- schema:
27
- type: "array"
28
- items:
29
- type: "string"
30
- /container/{name}:
31
- get:
32
- description: "Display all information of a container"
33
- parameters:
34
- - in: "path"
35
- name: "name"
36
- description: "Container name"
37
- required: true
38
- schema:
39
- type: "string"
40
- - in: "query"
41
- name: "all"
42
- description: "if set to 'true', search container in all containers, not only running ones"
43
- schema:
44
- type: "boolean"
45
- default: false
46
- responses:
47
- 200:
48
- description: "Container information"
49
- content:
50
- application/json:
51
- schema:
52
- type: "string"
53
- components:
54
- securitySchemes: {}
55
- schemas:
56
- DockerControler:
57
- properties: {}
58
-
@@ -1,31 +0,0 @@
1
- #################################################
2
- # HolAdo (Holistic Automation do)
3
- #
4
- # (C) Copyright 2021-2025 by Eric Klumpp
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7
- #
8
- # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9
-
10
- # The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software.
11
- #################################################
12
-
13
- import connexion
14
- from connexion.resolver import MethodViewResolver
15
-
16
- # For debug with HolAdo sources, insert HolAdo source paths
17
- from initialize_holado import insert_holado_source_paths # @UnresolvedImport
18
- insert_holado_source_paths(with_test_behave=False)
19
-
20
- # Initialize HolAdo
21
- from holado import initialize
22
- initialize(TSessionContext=None, use_holado_logger=True, logging_config_file_path=None,
23
- log_level=None, log_time_in_utc=None, log_on_console=True, log_in_file=False,
24
- config_kwargs={'application_group':'docker_viewer'},
25
- garbage_collector_periodicity=None)
26
-
27
-
28
- app = connexion.FlaskApp(__name__, pythonic_params=True)
29
- app.add_api('openapi.yaml',
30
- resolver=MethodViewResolver('api'), resolver_error=501,
31
- pythonic_params=True)
@@ -1,101 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Script to launch Docker Viewer as a docker image.
4
- #
5
- # Docker Viewer exposes a REST API for some docker commands.
6
- # It is accessible on localhost, and also on a docker network if HOLADO_NETWORK is defined.
7
- # On all networks, API is accessible on same port (HOLADO_DOCKER_VIEWER_PORT or 8000).
8
- #
9
- # REST API specification is in file rest/openapi.yaml.
10
- #
11
- # REQUIREMENTS:
12
- # Have access to any HolAdo registry.
13
- #
14
- # Optionally, define in .profile the following variables
15
- # - HOLADO_DOCKER_VIEWER_PORT: REST API port to use (default: 8000)
16
- # - HOLADO_IMAGE_REGISTRY: docker image registry to use (default: holado/docker_viewer)
17
- # - HOLADO_IMAGE_TAG: docker image tag to use (default: latest)
18
- # - HOLADO_OUTPUT_BASEDIR: absolute path to base output directory (default: [HOME]/.holado/output)
19
- # - HOLADO_USE_LOCALHOST: force the container network to 'host'.
20
- # - HOLADO_NETWORK: specify on which network the docker is run.
21
- #
22
-
23
-
24
- WORK_DIR="$(pwd)"
25
-
26
- if [[ -z "$HOLADO_IMAGE_REGISTRY" ]]; then
27
- HOLADO_IMAGE_REGISTRY=holado/docker_viewer
28
- fi
29
- if [[ -z "$HOLADO_IMAGE_TAG" ]]; then
30
- HOLADO_IMAGE_TAG=latest
31
- fi
32
- VIEWER_IMAGE=${HOLADO_IMAGE_REGISTRY}:${HOLADO_IMAGE_TAG}
33
-
34
- # Update docker image
35
- echo "Updating docker image ${VIEWER_IMAGE}..."
36
- docker pull ${VIEWER_IMAGE}
37
-
38
- # Define test output directory
39
- if [[ ! -z "$HOLADO_OUTPUT_BASEDIR" ]]; then
40
- OUTPUT_DIR=${HOLADO_OUTPUT_BASEDIR}
41
- else
42
- OUTPUT_DIR=${HOME}/.holado/output
43
- fi
44
- echo "Output directory: $OUTPUT_DIR"
45
-
46
- # Define test resources directory
47
- if [[ ! -z "$HOLADO_LOCAL_RESOURCES_BASEDIR" ]]; then
48
- RESOURCES_DIR=${HOLADO_LOCAL_RESOURCES_BASEDIR}
49
- else
50
- RESOURCES_DIR=${HOME}/.holado/resources
51
- fi
52
- echo "Resources directory: $RESOURCES_DIR"
53
-
54
- # Make dirs
55
- if [ ! -d ${OUTPUT_DIR} ]; then
56
- echo "Create output directory: ${OUTPUT_DIR}"
57
- mkdir -p ${OUTPUT_DIR}
58
- fi
59
- if [ ! -d ${RESOURCES_DIR} ]; then
60
- echo "Create resources directory: ${RESOURCES_DIR}"
61
- mkdir -p ${RESOURCES_DIR}
62
- fi
63
-
64
- # Define container network
65
- if [ "$HOLADO_USE_LOCALHOST" = True ]; then
66
- NETWORK_DEF_COMMAND="--network=host"
67
- else
68
- if [[ ! -z "$HOLADO_NETWORK" ]]; then
69
- NETWORK_DEF_COMMAND="--network $HOLADO_NETWORK"
70
- else
71
- NETWORK_DEF_COMMAND=""
72
- fi
73
- fi
74
-
75
- # Define port to use
76
- if [[ -z "$HOLADO_DOCKER_VIEWER_PORT" ]]; then
77
- HOLADO_DOCKER_VIEWER_PORT=8000
78
- fi
79
-
80
-
81
- # Docker run
82
- if [[ -z "$HOLADO_DOCKER_VIEWER_NAME" ]]; then
83
- HOLADO_DOCKER_VIEWER_NAME=holado_docker_VIEWER
84
- fi
85
-
86
- echo
87
- echo "Running Docker VIEWER (docker name: ${HOLADO_DOCKER_VIEWER_NAME})..."
88
- echo " port: ${HOLADO_DOCKER_VIEWER_PORT}"
89
- #echo " NETWORK_DEF_COMMAND=${NETWORK_DEF_COMMAND}"
90
- echo
91
- docker run --rm --user root --name ${HOLADO_DOCKER_VIEWER_NAME} \
92
- --privileged -v /var/run/docker.sock:/var/run/docker.sock \
93
- -v "${OUTPUT_DIR}":/output \
94
- -v "${RESOURCES_DIR}":/resources \
95
- -e HOLADO_OUTPUT_BASEDIR=/output \
96
- -e HOLADO_LOCAL_RESOURCES_BASEDIR=/resources \
97
- -e HOLADO_DOCKER_VIEWER_PORT=${HOLADO_DOCKER_VIEWER_PORT} \
98
- ${NETWORK_DEF_COMMAND} \
99
- -p ${HOLADO_DOCKER_VIEWER_PORT}:${HOLADO_DOCKER_VIEWER_PORT} \
100
- ${VIEWER_IMAGE}
101
-
@@ -1,72 +0,0 @@
1
-
2
- #################################################
3
- # HolAdo (Holistic Automation do)
4
- #
5
- # (C) Copyright 2021-2025 by Eric Klumpp
6
- #
7
- # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
- #
9
- # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
-
11
- # The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software.
12
- #################################################
13
-
14
-
15
- #################################################
16
- # GOAL: Tools when using a clone of HolAdo project.
17
- #
18
- # This file contains methods usefull to initialize environments using a clone of HolAdo project.
19
- #
20
- # USAGE:
21
- # - Copy this file in projects using HolAdo.
22
- # - Define environment variable HOLADO_PATH with path to cloned HolAdo project.
23
- # If HOLADO_PATH is defined, sources of cloned HolAdo project are used, else installed holado package is used.
24
- #################################################
25
-
26
-
27
-
28
- import os
29
- import sys
30
-
31
-
32
- def insert_sys_path(path, index=0):
33
- """Insert a path in sys.path if it doesn't already exists.
34
- """
35
- if path not in sys.path:
36
- sys.path.insert(index, path)
37
-
38
- def insert_sys_paths(list_paths, index=0):
39
- """Insert a list of path in sys.path if it doesn't already exists.
40
- """
41
- if list_paths:
42
- for path in list_paths:
43
- insert_sys_path(path, index=index)
44
-
45
- def insert_holado_source_paths(with_test_behave=True):
46
- """Insert in sys.path all HolAdo source paths.
47
- If environment variable HOLADO_PATH is defined with path to HolAdo project, following paths are inserted in sys.path:
48
- - HOLADO_PATH/src: path to holado modules sources
49
- - HOLADO_PATH/tests/behave (if with_test_behave==True): path to holado test sources, needed by testing solutions
50
- """
51
- holado_path = os.getenv('HOLADO_PATH')
52
- if holado_path is None:
53
- try:
54
- import holado # @UnusedImport
55
- except Exception as exc:
56
- if "No module named" in str(exc):
57
- raise Exception(f"If environment variable HOLADO_PATH is not defined with path to HolAdo project, 'holado' python package must be installed")
58
- else:
59
- raise exc
60
- else:
61
- # holado is installed, and all sources are already accessible
62
- pass
63
- else:
64
- print(f"Using HolAdo project installed in '{holado_path}'")
65
- # import traceback
66
- # print("".join(traceback.format_list(traceback.extract_stack())))
67
- # insert_sys_path(holado_path)
68
- insert_sys_path(os.path.join(holado_path, "src"))
69
- if with_test_behave:
70
- insert_sys_path(os.path.join(holado_path, "tests", "behave"))
71
-
72
-
@@ -1,13 +0,0 @@
1
- @testing_solution
2
- @docker_controller
3
- Feature: Test Docker Controller client
4
-
5
- Scenario: List containers
6
-
7
- Given CLIENT = new Docker Controller client
8
- | Name | Value |
9
- | 'url' | 'http://localhost:8000' |
10
-
11
- Given RESULT = list containers (Docker Controller client: CLIENT)
12
-
13
-