holado 0.6.3__py3-none-any.whl → 0.6.4__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.
- holado/__init__.py +2 -2
- {holado-0.6.3.dist-info → holado-0.6.4.dist-info}/METADATA +42 -1
- {holado-0.6.3.dist-info → holado-0.6.4.dist-info}/RECORD +63 -18
- holado_ais/ais/ais_messages.py +3 -1
- holado_docker/tools/docker_controller/server/grpc/docker_controller_client.py → holado_crypto/__init__.py +15 -20
- holado_crypto/crypto/transport/__init__.py +0 -0
- holado_crypto/crypto/transport/crc.py +40 -0
- holado_docker/tools/docker_controller/server/grpc/docker_controller_server.py → holado_crypto/test/behave/steps/__init__.py +2 -17
- holado_docker/tools/docker_controller/client/rest/docker_controller_client.py +10 -4
- holado_docker/tools/docker_controller/docker_controller_manager.py +5 -3
- holado_docker/tools/docker_controller/server/Dockerfile +9 -7
- holado_docker/tools/docker_controller/server/requirements.txt +1 -2
- holado_docker/tools/docker_controller/server/rest/README +2 -0
- holado_docker/tools/docker_controller/server/rest/api/__init__.py +16 -17
- holado_docker/tools/docker_controller/server/rest/openapi.yaml +20 -3
- holado_docker/tools/docker_controller/server/run_docker_controller_in_docker.sh +6 -6
- holado_docker/tools/docker_viewer/client/rest/docker_viewer_client.py +40 -0
- holado_docker/tools/docker_viewer/docker_viewer_manager.py +44 -0
- holado_docker/tools/docker_viewer/server/Dockerfile +70 -0
- holado_docker/tools/docker_viewer/server/requirements.txt +2 -0
- holado_docker/tools/docker_viewer/server/rest/README +2 -0
- holado_docker/tools/docker_viewer/server/rest/api/__init__.py +40 -0
- holado_docker/tools/docker_viewer/server/rest/initialize_holado.py +72 -0
- holado_docker/tools/docker_viewer/server/rest/openapi.yaml +58 -0
- holado_docker/tools/docker_viewer/server/rest/run.py +28 -0
- holado_docker/tools/docker_viewer/server/run_docker_viewer_in_docker.sh +101 -0
- holado_examples/projects/server_rest/server_rest_example/initialize_holado.py +72 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/db.sqlite3 +0 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/manage.py +22 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/__init__.py +0 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/__init__.py +0 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/admin.py +3 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/apps.py +7 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/migrations/__init__.py +0 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/models.py +3 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/serializers.py +15 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/tests.py +3 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/views.py +24 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/asgi.py +16 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/settings.py +130 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/urls.py +31 -0
- holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/wsgi.py +16 -0
- holado_examples/projects/server_rest/server_rest_example/rest_server.py +37 -0
- holado_examples/scripts/script_custom_initialization.py +16 -0
- holado_examples/scripts/script_minimal_initialization.py +23 -0
- holado_examples/tests/behave/testing_solution/__main__.py +13 -0
- holado_examples/tests/behave/testing_solution/behave_environment.py +35 -0
- holado_examples/tests/behave/testing_solution/environment.py +36 -0
- holado_examples/tests/behave/testing_solution/features/Configuration/Actions/configure_system.feature +10 -0
- holado_examples/tests/behave/testing_solution/features/NonReg/example.feature +26 -0
- holado_examples/tests/behave/testing_solution/initialize_holado.py +62 -0
- holado_examples/tests/behave/testing_solution/logging.conf +102 -0
- holado_examples/tests/behave/testing_solution/requirements.txt +5 -0
- holado_examples/tests/behave/testing_solution/run_test.sh +7 -0
- holado_examples/tests/behave/testing_solution/run_test_nonreg.sh +6 -0
- holado_examples/tests/behave/testing_solution/src/common/tools/path_manager.py +40 -0
- holado_examples/tests/behave/testing_solution/src/config/config_manager.py +30 -0
- holado_examples/tests/behave/testing_solution/src/context/session_context.py +45 -0
- holado_examples/tests/behave/testing_solution/steps/config_steps.py +21 -0
- holado_examples/tests/behave/testing_solution/steps/public_steps.py +10 -0
- holado_rest/api/rest/rest_client.py +13 -5
- holado_docker/tools/docker_controller/server/grpc/proto/generated/docker_controler_pb2.py +0 -52
- holado_docker/tools/docker_controller/server/grpc/proto/generated/docker_controler_pb2_grpc.py +0 -233
- {holado-0.6.3.dist-info → holado-0.6.4.dist-info}/WHEEL +0 -0
- {holado-0.6.3.dist-info → holado-0.6.4.dist-info}/licenses/LICENSE +0 -0
holado/__init__.py
CHANGED
|
@@ -209,8 +209,8 @@ def __import_modules(module_names):
|
|
|
209
209
|
except Exception as exc:
|
|
210
210
|
if Tools.do_log(logger, logging.DEBUG):
|
|
211
211
|
logger.debug(f"Failed to import HolAdo module '{module_name}':\n{Tools.represent_exception(exc)}")
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
if "No module named" not in str(exc):
|
|
213
|
+
logger.warning(f"Failed to import HolAdo module '{module_name}': {str(exc)} (see debug logs for more details)")
|
|
214
214
|
else:
|
|
215
215
|
if Tools.do_log(logger, logging.DEBUG):
|
|
216
216
|
logger.debug(f"Imported HolAdo module '{module_name}'")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: holado
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.4
|
|
4
4
|
Summary: HolAdo framework
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/holado_framework/python
|
|
6
6
|
Project-URL: Issues, https://gitlab.com/holado_framework/python/-/issues
|
|
@@ -20,6 +20,38 @@ Requires-Dist: psutil
|
|
|
20
20
|
Requires-Dist: python-dateutil
|
|
21
21
|
Provides-Extra: ais
|
|
22
22
|
Requires-Dist: pyais; extra == 'ais'
|
|
23
|
+
Provides-Extra: all
|
|
24
|
+
Requires-Dist: boto3; extra == 'all'
|
|
25
|
+
Requires-Dist: certifi; extra == 'all'
|
|
26
|
+
Requires-Dist: connexion[flask,swagger-ui,uvicorn]; extra == 'all'
|
|
27
|
+
Requires-Dist: docker; extra == 'all'
|
|
28
|
+
Requires-Dist: flask; extra == 'all'
|
|
29
|
+
Requires-Dist: flask-cors; extra == 'all'
|
|
30
|
+
Requires-Dist: google; extra == 'all'
|
|
31
|
+
Requires-Dist: google-api-core; extra == 'all'
|
|
32
|
+
Requires-Dist: grpc-requests; extra == 'all'
|
|
33
|
+
Requires-Dist: grpcio; extra == 'all'
|
|
34
|
+
Requires-Dist: grpcio-reflection; extra == 'all'
|
|
35
|
+
Requires-Dist: grpcio-tools; extra == 'all'
|
|
36
|
+
Requires-Dist: minio; extra == 'all'
|
|
37
|
+
Requires-Dist: moto; extra == 'all'
|
|
38
|
+
Requires-Dist: paramiko<4.0.0; extra == 'all'
|
|
39
|
+
Requires-Dist: pika; extra == 'all'
|
|
40
|
+
Requires-Dist: protobuf; extra == 'all'
|
|
41
|
+
Requires-Dist: psycopg; extra == 'all'
|
|
42
|
+
Requires-Dist: psycopg-binary; extra == 'all'
|
|
43
|
+
Requires-Dist: pyais; extra == 'all'
|
|
44
|
+
Requires-Dist: pympler; extra == 'all'
|
|
45
|
+
Requires-Dist: pyopenssl; extra == 'all'
|
|
46
|
+
Requires-Dist: pypika; extra == 'all'
|
|
47
|
+
Requires-Dist: pysftp; extra == 'all'
|
|
48
|
+
Requires-Dist: pyyaml; extra == 'all'
|
|
49
|
+
Requires-Dist: redis; extra == 'all'
|
|
50
|
+
Requires-Dist: redis-om; extra == 'all'
|
|
51
|
+
Requires-Dist: sftpserver; extra == 'all'
|
|
52
|
+
Requires-Dist: sql-metadata; extra == 'all'
|
|
53
|
+
Requires-Dist: truststore; extra == 'all'
|
|
54
|
+
Requires-Dist: zeep; extra == 'all'
|
|
23
55
|
Provides-Extra: api-connexion
|
|
24
56
|
Requires-Dist: connexion[flask,swagger-ui,uvicorn]; extra == 'api-connexion'
|
|
25
57
|
Provides-Extra: db
|
|
@@ -28,8 +60,13 @@ Requires-Dist: sql-metadata; extra == 'db'
|
|
|
28
60
|
Provides-Extra: db-postgresql
|
|
29
61
|
Requires-Dist: psycopg; extra == 'db-postgresql'
|
|
30
62
|
Requires-Dist: psycopg-binary; extra == 'db-postgresql'
|
|
63
|
+
Requires-Dist: pypika; extra == 'db-postgresql'
|
|
64
|
+
Requires-Dist: sql-metadata; extra == 'db-postgresql'
|
|
31
65
|
Provides-Extra: docker
|
|
32
66
|
Requires-Dist: docker; extra == 'docker'
|
|
67
|
+
Provides-Extra: docker-tools
|
|
68
|
+
Requires-Dist: connexion[flask,swagger-ui,uvicorn]; extra == 'docker-tools'
|
|
69
|
+
Requires-Dist: docker; extra == 'docker-tools'
|
|
33
70
|
Provides-Extra: grpc
|
|
34
71
|
Requires-Dist: google; extra == 'grpc'
|
|
35
72
|
Requires-Dist: google-api-core; extra == 'grpc'
|
|
@@ -56,8 +93,12 @@ Requires-Dist: flask-cors; extra == 's3'
|
|
|
56
93
|
Requires-Dist: minio; extra == 's3'
|
|
57
94
|
Requires-Dist: moto; extra == 's3'
|
|
58
95
|
Provides-Extra: sftp
|
|
96
|
+
Requires-Dist: certifi; extra == 'sftp'
|
|
97
|
+
Requires-Dist: paramiko<4.0.0; extra == 'sftp'
|
|
98
|
+
Requires-Dist: pyopenssl; extra == 'sftp'
|
|
59
99
|
Requires-Dist: pysftp; extra == 'sftp'
|
|
60
100
|
Requires-Dist: sftpserver; extra == 'sftp'
|
|
101
|
+
Requires-Dist: truststore; extra == 'sftp'
|
|
61
102
|
Provides-Extra: ssl
|
|
62
103
|
Requires-Dist: certifi; extra == 'ssl'
|
|
63
104
|
Requires-Dist: pyopenssl; extra == 'ssl'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
holado/__init__.py,sha256=
|
|
1
|
+
holado/__init__.py,sha256=ibxjS0XIck0rguf8FT_3HftofWmJqyfWraxjczMzzrw,14895
|
|
2
2
|
holado/holado_config.py,sha256=-HPwBdEcdG1kLfqSq4bH_esXbndVkNX4WW0VSpqoxu4,2459
|
|
3
3
|
holado/common/__init__.py,sha256=ZjXM-FRQgnfzRNXqcvJOGewDHVRR-U5-ugStSs8U2Xs,1525
|
|
4
4
|
holado/common/context/__init__.py,sha256=3jJBLm8myrYF9jbdV1EhIA6BtnlmjX33eeoDpTzwmLA,1604
|
|
@@ -14,7 +14,7 @@ holado/common/tools/gc_manager.py,sha256=TjQg7MisGRhxuiQ22hB3IuqNhnWCVEWpU253-rO
|
|
|
14
14
|
holado_ais/__init__.py,sha256=Mudcgu_7p1hBDBs6LpSz757H4haB0yLHgT70sznG82c,1807
|
|
15
15
|
holado_ais/ais/MaritimeIdentificationDigits.csv,sha256=r-uHt4wOvxlbA26af9e-N3BKbuiMf6ia3PN0ZGfYk2A,8547
|
|
16
16
|
holado_ais/ais/ais_manager.py,sha256=QvN94JoUBbSXT08HABl2FNsAVOM-YCmQO5tN9COg6Rc,6496
|
|
17
|
-
holado_ais/ais/ais_messages.py,sha256
|
|
17
|
+
holado_ais/ais/ais_messages.py,sha256=-kAQCgHwNZpmtMqx4LsGBGuxQTJfj80fUB9U5xxiHNs,15991
|
|
18
18
|
holado_ais/ais/ais_payload.py,sha256=mdOa_4JIbkFLK4_KUmQF5jUt1nLxvZhmIcqK8i-YY6w,1791
|
|
19
19
|
holado_ais/ais/enums.py,sha256=bsqfJVg65fWiJwL_VlSKwKgTY0pLoDcI4T06aEOcQnw,1108
|
|
20
20
|
holado_ais/ais/patch_pyais.py,sha256=M4Fa8GZubXx4auRsk5I1yQPC40IR1p-1iVZIc4PXFfk,49850
|
|
@@ -141,6 +141,10 @@ holado_core/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
|
141
141
|
holado_core/tools/abstracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
142
142
|
holado_core/tools/abstracts/blocking_command_service.py,sha256=_mJ1DkIRMTKKASq2XCDLWQK3K0fbVAeU0IsMHNs9TdI,2796
|
|
143
143
|
holado_core/tools/abstracts/service.py,sha256=07JkHz5bK2WBpAtiH2YmpZnUZY6roaUbHfD4QJ1spD4,2062
|
|
144
|
+
holado_crypto/__init__.py,sha256=KpbIi2cm1BYZgoWf0LuhE0ei3ZCE15UcUtjC1cSA55M,1653
|
|
145
|
+
holado_crypto/crypto/transport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
146
|
+
holado_crypto/crypto/transport/crc.py,sha256=byAZlKO-33BPd0cLN4wUJmgqaZWpIlq17rmD8iv9lJU,1700
|
|
147
|
+
holado_crypto/test/behave/steps/__init__.py,sha256=BHp8TYE_X4lWn4B8A51nXSYaJlczuiDVJLcKMy7p0Lw,1267
|
|
144
148
|
holado_data/__init__.py,sha256=KpbIi2cm1BYZgoWf0LuhE0ei3ZCE15UcUtjC1cSA55M,1653
|
|
145
149
|
holado_data/data/generator/base.py,sha256=axzEsz0A_6Ty0gnZ-ebFskY40dqEb_hX4D2qjrB6b3o,3764
|
|
146
150
|
holado_data/data/generator/generator_manager.py,sha256=V6Vvj2nGEaGeVWLNFnlR38jqFpoXlabaAWVJA93U_sM,1360
|
|
@@ -189,24 +193,65 @@ holado_docker/sdk/docker/docker_client.py,sha256=rh1VLtcefIAZY88FMz7eyh1mFrWn3vV
|
|
|
189
193
|
holado_docker/sdk/docker/docker_service.py,sha256=SvMSIZ7XTCbC7q5rur03lJhJVSHL3uIq1dBQz9oDpkw,3767
|
|
190
194
|
holado_docker/tests/behave/steps/__init__.py,sha256=lrP0btKLA3qQD2wp3zbOp0ug8RmgpaYWCrOAWehcPiI,1298
|
|
191
195
|
holado_docker/tests/behave/steps/tools/docker_controller/client_steps.py,sha256=hgns0Kyl38jJlZsVpMtEWlQKfga815BfJRFS_JhQvWc,4438
|
|
192
|
-
holado_docker/tools/docker_controller/docker_controller_manager.py,sha256=
|
|
193
|
-
holado_docker/tools/docker_controller/client/rest/docker_controller_client.py,sha256=
|
|
194
|
-
holado_docker/tools/docker_controller/server/Dockerfile,sha256=
|
|
195
|
-
holado_docker/tools/docker_controller/server/requirements.txt,sha256=
|
|
196
|
-
holado_docker/tools/docker_controller/server/run_docker_controller_in_docker.sh,sha256=
|
|
196
|
+
holado_docker/tools/docker_controller/docker_controller_manager.py,sha256=q3oac2KIK9wGfMQqGIol65nHUmeuuV0rQ61tfH2APAk,2477
|
|
197
|
+
holado_docker/tools/docker_controller/client/rest/docker_controller_client.py,sha256=SJYonsiyOTdnwg4j-6OjcQTfdu75bm-LFVeQbJMKj_c,2655
|
|
198
|
+
holado_docker/tools/docker_controller/server/Dockerfile,sha256=zuSkj3HYDhvpjOSXmxL4oDqhN7dRB1YTX5Fyur1cuDY,1774
|
|
199
|
+
holado_docker/tools/docker_controller/server/requirements.txt,sha256=0RvLV3t2DyBR2FsbAd1WVEcbsVc6FVUN2horQJU4POo,57
|
|
200
|
+
holado_docker/tools/docker_controller/server/run_docker_controller_in_docker.sh,sha256=G_4D5iqDCRFNtZVLFJu2urslXxo6cbAi7B2CJ9snotw,3230
|
|
197
201
|
holado_docker/tools/docker_controller/server/grpc/README,sha256=cNOly0Lfsfz_qyhTqLGmELOXzAgZbByNUowuYrUnJa0,132
|
|
198
202
|
holado_docker/tools/docker_controller/server/grpc/__init__.py,sha256=QBkE1ydbCvARUimeSY2PvBkZ-Jp0bCv6k_l89a_8zNw,1551
|
|
199
|
-
holado_docker/tools/docker_controller/server/grpc/docker_controller_client.py,sha256=pVSTohQnm_DnSyKNuZpbOBHQ9NtSwd7t7yn2ZBNB-bU,1702
|
|
200
|
-
holado_docker/tools/docker_controller/server/grpc/docker_controller_server.py,sha256=sCl0dUuatG9R-_EVaZBe6HSe6Ew8TqolfScrwQAn8Zo,1535
|
|
201
203
|
holado_docker/tools/docker_controller/server/grpc/proto/compile_proto.py,sha256=NjcStLaAO_zKcSprrcGscq3R_4anh55QeguXLq6SPjo,2191
|
|
202
204
|
holado_docker/tools/docker_controller/server/grpc/proto/definitions/docker_controler.proto,sha256=n9bsXaQfnZX-R5HvfquCVt3QjpFtDJSH6p8gnTjm06k,1650
|
|
203
|
-
holado_docker/tools/docker_controller/server/
|
|
204
|
-
holado_docker/tools/docker_controller/server/grpc/proto/generated/docker_controler_pb2_grpc.py,sha256=r56UidBcB4jjxGWEsTY08_71Iz0E6pI2b5LR46qvoPc,9295
|
|
205
|
+
holado_docker/tools/docker_controller/server/rest/README,sha256=-uqu3drdPXkPkU4ha1IKcXGBHFIBEWH-uiTT74DExwE,167
|
|
205
206
|
holado_docker/tools/docker_controller/server/rest/initialize_holado.py,sha256=UxNphXyjs-xraorzMWjDe6-QYw_Q3mtykyY-ENYZB1o,3464
|
|
206
|
-
holado_docker/tools/docker_controller/server/rest/openapi.yaml,sha256=
|
|
207
|
+
holado_docker/tools/docker_controller/server/rest/openapi.yaml,sha256=aUZYaj6y9vBNl_ETkng4afUkcGovni53JsY55t6PUds,4027
|
|
207
208
|
holado_docker/tools/docker_controller/server/rest/run.py,sha256=8w5Xl7uOnjsYW59cmuUMOUd71fcXQn30k2jVis7cVNs,1748
|
|
208
|
-
holado_docker/tools/docker_controller/server/rest/api/__init__.py,sha256=
|
|
209
|
+
holado_docker/tools/docker_controller/server/rest/api/__init__.py,sha256=FlLRagAiw1LDxnF0CmW7Y6bVXuj8x6volT8-DuHTTVY,2427
|
|
209
210
|
holado_docker/tools/docker_controller/server/rest/api/container.py,sha256=Y0iE3AqdJVbFUTcQNK90ymc2gwQeW0P3yBA5-RpMXvQ,2662
|
|
211
|
+
holado_docker/tools/docker_viewer/docker_viewer_manager.py,sha256=tSLuIUdYjJoZIFUc1k4WnrRTUtjjTAmNTbrDmS-8SjI,2287
|
|
212
|
+
holado_docker/tools/docker_viewer/client/rest/docker_viewer_client.py,sha256=XNBt7QE-Elz9wUT32hdft7vU0ytcY8f-0AvlDZ8NWMo,2005
|
|
213
|
+
holado_docker/tools/docker_viewer/server/Dockerfile,sha256=012m7y_jg1Jh0NoqJSUTnmG9OppX2zlcFe-KhB71cVA,1750
|
|
214
|
+
holado_docker/tools/docker_viewer/server/requirements.txt,sha256=0RvLV3t2DyBR2FsbAd1WVEcbsVc6FVUN2horQJU4POo,57
|
|
215
|
+
holado_docker/tools/docker_viewer/server/run_docker_viewer_in_docker.sh,sha256=qwy4JErJvv09qgzp5yjEI4skVTsfQjHeu8NVxZmAKwU,3138
|
|
216
|
+
holado_docker/tools/docker_viewer/server/rest/README,sha256=1FMg-U_D9pUMBVmZJsirOXHFLTciDL5jB-Yqzp9U6uM,163
|
|
217
|
+
holado_docker/tools/docker_viewer/server/rest/initialize_holado.py,sha256=UxNphXyjs-xraorzMWjDe6-QYw_Q3mtykyY-ENYZB1o,3464
|
|
218
|
+
holado_docker/tools/docker_viewer/server/rest/openapi.yaml,sha256=ZBjVs7Ld1VCdTBk7FgZXEvUACtn6aDdv8cHDE669YZc,1715
|
|
219
|
+
holado_docker/tools/docker_viewer/server/rest/run.py,sha256=8w5Xl7uOnjsYW59cmuUMOUd71fcXQn30k2jVis7cVNs,1748
|
|
220
|
+
holado_docker/tools/docker_viewer/server/rest/api/__init__.py,sha256=FlLRagAiw1LDxnF0CmW7Y6bVXuj8x6volT8-DuHTTVY,2427
|
|
221
|
+
holado_examples/projects/server_rest/server_rest_example/initialize_holado.py,sha256=UxNphXyjs-xraorzMWjDe6-QYw_Q3mtykyY-ENYZB1o,3464
|
|
222
|
+
holado_examples/projects/server_rest/server_rest_example/rest_server.py,sha256=xMLHBwGBdBvT0DYOpGBuvnSXNjEu3cvU9ty_h187QW4,1887
|
|
223
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/db.sqlite3,sha256=LBFAfNepksCk8npTt9QtnG7CVtDKbZM7kmy13wv1Er0,131072
|
|
224
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/manage.py,sha256=tElgH5cQY8xlY1-mVesjaqsqxe6U3Y--2kXfNIUZ5m0,664
|
|
225
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
226
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/asgi.py,sha256=aTxP-NQKwxMWy9eRFU05I0ZzetU-xjblCtJCrnx5ImM,404
|
|
227
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/settings.py,sha256=9Qqw6yM-6ZwZEuL2J_vVtVzl1weWGC0XWhbhJzyEDNo,3324
|
|
228
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/urls.py,sha256=aIgPAcdW65ExAwZoBTlCCm4idITLRh5b4K2lzg1wIJI,1123
|
|
229
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/wsgi.py,sha256=vuHLvl2v-OGGWQUz0fd6ekLrjRrJsAdnmIBFqZazP7k,404
|
|
230
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
231
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/admin.py,sha256=VWlhkFyPcKZz6ThllvIz1NT1yhDC-eBsdDWtpsuuhO0,65
|
|
232
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/apps.py,sha256=OVtOJmZZ1Ir_Zq1SyGnd9RIhZmwtkZOoiXh4B2ingbs,155
|
|
233
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/models.py,sha256=wzz6N5oF4ngNFMn3G0Bf2ZunnZL0eNuQdopNLnNyyL8,59
|
|
234
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/serializers.py,sha256=o_YxFr-tgCjBp8xAHIdPgPxNah5C7v_W4NpUAc2hdEc,392
|
|
235
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/tests.py,sha256=oGgalLR6qiJdN-bHSH1ZLbRNhJHX_MyZtKsaR4jRy_Q,62
|
|
236
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/views.py,sha256=-0ifZNElxXXH3Ixese-l-Jm8zeYHLmzfSJhr_Dt8ZME,745
|
|
237
|
+
holado_examples/projects/server_rest/server_rest_example/rest_api/rest_api/application/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
238
|
+
holado_examples/scripts/script_custom_initialization.py,sha256=yOWo08UwUqpDS2vjzzYvpmJCq6gSE7_0wybu81u2q1Y,741
|
|
239
|
+
holado_examples/scripts/script_minimal_initialization.py,sha256=4cc3osHekltsJ4ZxmwiqiPYnaGP8tWBaMiz7mHHBiI0,889
|
|
240
|
+
holado_examples/tests/behave/testing_solution/__main__.py,sha256=IS48dqsE3gbHNYGS-1sSIkzfTpefZD58BoNPvQVL57M,299
|
|
241
|
+
holado_examples/tests/behave/testing_solution/behave_environment.py,sha256=-DYfSJkBuB2jOpPmYFtNDW-mnBqXWT8vfi5OE-MON80,1044
|
|
242
|
+
holado_examples/tests/behave/testing_solution/environment.py,sha256=SOKZL-pr1rZTKd77ELDd0lbjUIpogWUsCK8jfN6_RWU,964
|
|
243
|
+
holado_examples/tests/behave/testing_solution/initialize_holado.py,sha256=IPYH-GYNiHV5-7ZCCH6CFmPpmACsPrTV74TYz3MRjpA,3102
|
|
244
|
+
holado_examples/tests/behave/testing_solution/logging.conf,sha256=R0yhuVbgQxl7RLA_SLgXvXaYuEzEGD24w8_tiWeiiR0,2687
|
|
245
|
+
holado_examples/tests/behave/testing_solution/requirements.txt,sha256=GEOHLDGhGbwfMoMt9lfY9iCkSTmby36bko3vqi8KioU,33
|
|
246
|
+
holado_examples/tests/behave/testing_solution/run_test.sh,sha256=I_88YYsuI9jWOvUb0FZP6vedYud-baro1LC_VhVDTGo,115
|
|
247
|
+
holado_examples/tests/behave/testing_solution/run_test_nonreg.sh,sha256=dKnDkFyfzOj9V1A_2-FDEGVCFYPAIdmdxL2C0q9SwgI,167
|
|
248
|
+
holado_examples/tests/behave/testing_solution/features/Configuration/Actions/configure_system.feature,sha256=e8Iy0eGU9f1XrpbKE4NGP_PuL6bsR3U7HikChuGxJiY,219
|
|
249
|
+
holado_examples/tests/behave/testing_solution/features/NonReg/example.feature,sha256=AO_q3ubyC4yXg2ZVEY4mJscVfZhuv2itrbt56a7Xe3o,787
|
|
250
|
+
holado_examples/tests/behave/testing_solution/src/common/tools/path_manager.py,sha256=2-3bJIMXLnSD__0FX_rXWv2YGTrAPdAXoTPxz3qjaNY,1209
|
|
251
|
+
holado_examples/tests/behave/testing_solution/src/config/config_manager.py,sha256=WPSrkLX-C5oJ0bANSwzgBKeeSo38CBrgKGdMOp3pHtI,623
|
|
252
|
+
holado_examples/tests/behave/testing_solution/src/context/session_context.py,sha256=mLLCHRK5qEwASMwX5clj0n3FWJP2XEgFCnDek3xz548,1373
|
|
253
|
+
holado_examples/tests/behave/testing_solution/steps/config_steps.py,sha256=pYEGVok31UmJt6msbNPNhiG0GC5M5kp2ZwHKQdck2gI,514
|
|
254
|
+
holado_examples/tests/behave/testing_solution/steps/public_steps.py,sha256=nnxgBjFMpuQ9xVAAxma0lRwLz8VrbTZuF61vRkKKafA,252
|
|
210
255
|
holado_grpc/TODO,sha256=ESjES2-J6-3AJYdt6olcz_YGt4YTxw80CjIt-tjJ0z4,206
|
|
211
256
|
holado_grpc/__init__.py,sha256=SaAz66iSTqMw7oIDrj94rGcO8W7BgS15B78p--OogHc,2266
|
|
212
257
|
holado_grpc/api/rpc/TODO.txt,sha256=uWZT-WtrGuWbiOVU8-6xNiNyx_kKx-htM691zprLjh0,130
|
|
@@ -363,7 +408,7 @@ holado_report/report/reports/feature_report.py,sha256=i0wpk3LQLArVjWDsP9UcNSJzAU
|
|
|
363
408
|
holado_report/report/reports/scenario_report.py,sha256=eMyqw9EzaKMmX3pGFJN1rqAOQ5eqO2ISZdxAfK3XQR4,2945
|
|
364
409
|
holado_rest/__init__.py,sha256=BOeE6t6ejeqRYd44SE4vYJVTNz01BwcVCIWfwRQ5axg,1526
|
|
365
410
|
holado_rest/api/rest/TODO.txt,sha256=Oz8BYPkBEs9OAEgyYLLm7i5tJ1bRE5POBpT3SRFWTi4,29
|
|
366
|
-
holado_rest/api/rest/rest_client.py,sha256=
|
|
411
|
+
holado_rest/api/rest/rest_client.py,sha256=rJipR3_I4c90GR38c-gwOE49Iz6QDbf8KbMFUoobKqQ,7024
|
|
367
412
|
holado_rest/api/rest/rest_manager.py,sha256=lo8zUAXsi86Diw5dego-AOn3vUbwKj5xK7i0atIgwlA,4013
|
|
368
413
|
holado_rest/tests/behave/steps/__init__.py,sha256=lEH5NYkKtpgDV2ZAO1qAGNN4ipwILWMpgvQgnamgYKk,1283
|
|
369
414
|
holado_rest/tests/behave/steps/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -605,7 +650,7 @@ test_holado/tools/django/api_rest/api_rest/api1/serializers.py,sha256=o_YxFr-tgC
|
|
|
605
650
|
test_holado/tools/django/api_rest/api_rest/api1/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
|
606
651
|
test_holado/tools/django/api_rest/api_rest/api1/views.py,sha256=kOt2xT6bxO47_z__5yYR9kcYIWWv4qYzpX0K8Tqonik,758
|
|
607
652
|
test_holado/tools/django/api_rest/api_rest/api1/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
608
|
-
holado-0.6.
|
|
609
|
-
holado-0.6.
|
|
610
|
-
holado-0.6.
|
|
611
|
-
holado-0.6.
|
|
653
|
+
holado-0.6.4.dist-info/METADATA,sha256=toT9iziJs2FKYcZblQEtqqPUtaedZM9FGX83fUHogD8,7885
|
|
654
|
+
holado-0.6.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
655
|
+
holado-0.6.4.dist-info/licenses/LICENSE,sha256=IgGmNlcFHnbp7UWrLJqAFvs_HIgjJDTmjCNRircJLsk,1070
|
|
656
|
+
holado-0.6.4.dist-info/RECORD,,
|
holado_ais/ais/ais_messages.py
CHANGED
|
@@ -40,7 +40,9 @@ except Exception as exc:
|
|
|
40
40
|
if Tools.do_log(logger, logging.DEBUG):
|
|
41
41
|
logger.debug(f"AIS is not available. Initialization failed on error: {exc}")
|
|
42
42
|
with_pyais = False
|
|
43
|
-
|
|
43
|
+
# else:
|
|
44
|
+
# if Tools.do_log(logger, logging.DEBUG):
|
|
45
|
+
# logger.debug(f"AIS is available !")
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
class AISMessages(object):
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
1
2
|
|
|
2
3
|
#################################################
|
|
3
4
|
# HolAdo (Holistic Automation do)
|
|
@@ -11,26 +12,20 @@
|
|
|
11
12
|
# 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
|
#################################################
|
|
13
14
|
|
|
14
|
-
import logging
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
def dependencies():
|
|
17
|
+
"""
|
|
18
|
+
Return None or the list of names of modules it depend on
|
|
19
|
+
"""
|
|
20
|
+
return None
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@property
|
|
25
|
-
def internal_client(self):
|
|
26
|
-
return self.__client
|
|
27
|
-
|
|
28
|
-
def start_container(self, name):
|
|
29
|
-
raise NotImplementedError
|
|
30
|
-
|
|
31
|
-
def stop_container(self, name):
|
|
32
|
-
raise NotImplementedError
|
|
33
|
-
|
|
34
|
-
def restart_container(self, name):
|
|
35
|
-
raise NotImplementedError
|
|
22
|
+
def register():
|
|
23
|
+
"""
|
|
24
|
+
Register the services of this module
|
|
25
|
+
"""
|
|
26
|
+
# from holado.common.context.session_context import SessionContext
|
|
36
27
|
|
|
28
|
+
# from holado_xxx.xxx import XXXManager
|
|
29
|
+
# SessionContext.instance().services.register_service_type("xxx_manager", XXXManager)
|
|
30
|
+
pass
|
|
31
|
+
|
|
File without changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
import logging
|
|
3
|
+
from holado_core.common.tools.tools import Tools
|
|
4
|
+
|
|
5
|
+
logger = logging.getLogger(__name__)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Crc(object):
|
|
9
|
+
|
|
10
|
+
@staticmethod
|
|
11
|
+
def crc(msg_bytes, offset, nb_bits, crc_size, polynomial, init_val, xor_val, reverse=False):
|
|
12
|
+
if Tools.do_log(logger, logging.TRACE): # @UndefinedVariable
|
|
13
|
+
logger.trace(f"Computing CRC for:\n {msg_bytes=}\n {offset=}\n {nb_bits=}\n {crc_size=}\n {polynomial=}\n {init_val=}\n {xor_val=}")
|
|
14
|
+
res = init_val
|
|
15
|
+
|
|
16
|
+
# For each data bit in the data, process bits from left to right (or from right to left if reverse=True)
|
|
17
|
+
if reverse:
|
|
18
|
+
bits_range = range(offset+nb_bits-1, offset-1, -1)
|
|
19
|
+
else:
|
|
20
|
+
bits_range = range(offset, offset+nb_bits)
|
|
21
|
+
for i in bits_range:
|
|
22
|
+
bit = (msg_bytes[i // 8] >> (7 - (i % 8))) & 0x1
|
|
23
|
+
out = (res >> (crc_size - 1)) & 0x1
|
|
24
|
+
res = (res << 1) & (0xFFFFFFFF >> (32 - crc_size))
|
|
25
|
+
# Apply polynomial if the bit about to be shifted out of the crc is different than the processed bit
|
|
26
|
+
if bit ^ out == 1:
|
|
27
|
+
res ^= polynomial
|
|
28
|
+
if Tools.do_log(logger, logging.TRACE): # @UndefinedVariable
|
|
29
|
+
logger.trace(f"Computing CRC: {i=}, {bit=} => {res}")
|
|
30
|
+
|
|
31
|
+
res ^= xor_val
|
|
32
|
+
|
|
33
|
+
# Be careful, for a crc-32, we can't make <<32, this should result to <<0
|
|
34
|
+
res &= 0xFFFFFFFF >> (32 - crc_size)
|
|
35
|
+
|
|
36
|
+
if Tools.do_log(logger, logging.DEBUG):
|
|
37
|
+
logger.debug(f"CRC for:\n {msg_bytes=}\n {offset=}\n {nb_bits=}\n {crc_size=}\n {polynomial=}\n {init_val=}\n {xor_val=}\n => {res}")
|
|
38
|
+
return res
|
|
39
|
+
|
|
40
|
+
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
1
2
|
|
|
2
3
|
#################################################
|
|
3
4
|
# HolAdo (Holistic Automation do)
|
|
@@ -11,21 +12,5 @@
|
|
|
11
12
|
# 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
|
#################################################
|
|
13
14
|
|
|
14
|
-
import logging
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class DockerControllerService(object):
|
|
20
|
-
pass
|
|
21
|
-
|
|
22
|
-
class DockerControllerServer(object):
|
|
23
|
-
|
|
24
|
-
def __init__(self):
|
|
25
|
-
|
|
26
|
-
@property
|
|
27
|
-
def internal_client(self):
|
|
28
|
-
return self.__client
|
|
29
|
-
|
|
30
|
-
def start(self):
|
|
31
|
-
raise NotImplementedError
|
|
16
|
+
# from .xxx import *
|
|
@@ -22,12 +22,18 @@ class DockerControllerClient(RestClient):
|
|
|
22
22
|
def __init__(self, name, url, headers=None):
|
|
23
23
|
super().__init__(name, url, headers)
|
|
24
24
|
|
|
25
|
-
def get_containers_status(self):
|
|
26
|
-
|
|
25
|
+
def get_containers_status(self, all_=False):
|
|
26
|
+
if all_:
|
|
27
|
+
response = self.get("container?all=true")
|
|
28
|
+
else:
|
|
29
|
+
response = self.get("container")
|
|
27
30
|
return self.response_result(response, status_ok=[200,204])
|
|
28
31
|
|
|
29
|
-
def get_container_info(self, name):
|
|
30
|
-
|
|
32
|
+
def get_container_info(self, name, all_=False):
|
|
33
|
+
if all_:
|
|
34
|
+
response = self.get(f"container/{name}?all=true")
|
|
35
|
+
else:
|
|
36
|
+
response = self.get(f"container/{name}")
|
|
31
37
|
return self.response_result(response, status_ok=[200,204])
|
|
32
38
|
|
|
33
39
|
def restart_container(self, name):
|
|
@@ -16,6 +16,7 @@ from holado_core.common.tools.converters.converter import Converter
|
|
|
16
16
|
import os
|
|
17
17
|
from holado_docker.tools.docker_controller.client.rest.docker_controller_client import DockerControllerClient
|
|
18
18
|
from holado_rest.api.rest.rest_manager import RestManager
|
|
19
|
+
from holado.common.handlers.undefined import undefined_argument
|
|
19
20
|
|
|
20
21
|
logger = logging.getLogger(__name__)
|
|
21
22
|
|
|
@@ -23,12 +24,13 @@ logger = logging.getLogger(__name__)
|
|
|
23
24
|
class DockerControllerManager(object):
|
|
24
25
|
|
|
25
26
|
@classmethod
|
|
26
|
-
def new_client(cls, **kwargs):
|
|
27
|
+
def new_client(cls, use_localhost=undefined_argument, **kwargs):
|
|
27
28
|
if 'name' not in kwargs:
|
|
28
29
|
kwargs['name'] = None
|
|
29
30
|
if 'url' not in kwargs:
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
if use_localhost is undefined_argument:
|
|
32
|
+
env_use = os.getenv("HOLADO_USE_LOCALHOST", False)
|
|
33
|
+
use_localhost = Converter.is_boolean(env_use) and Converter.to_boolean(env_use)
|
|
32
34
|
|
|
33
35
|
host = "localhost" if use_localhost else os.getenv("HOLADO_DOCKER_CONTROLLER_NAME", "holado_docker_controller")
|
|
34
36
|
port = os.getenv("HOLADO_DOCKER_CONTROLLER_PORT", 8000)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
### Build
|
|
2
2
|
|
|
3
|
-
FROM python:3.12.9-alpine3.21 AS build
|
|
3
|
+
#FROM python:3.12.9-alpine3.21 AS build
|
|
4
|
+
FROM python:3.12.11-alpine3.22 AS build
|
|
4
5
|
|
|
5
6
|
# Install to build python requirements
|
|
6
7
|
RUN apk update \
|
|
@@ -27,8 +28,8 @@ RUN mkdir /code \
|
|
|
27
28
|
USER appuser
|
|
28
29
|
|
|
29
30
|
# Create python venv and install requirements
|
|
30
|
-
COPY --chown=appuser ./requirements.txt /code/
|
|
31
|
-
WORKDIR /code/
|
|
31
|
+
COPY --chown=appuser ./requirements.txt /code/docker_controller/requirements.txt
|
|
32
|
+
WORKDIR /code/docker_controller
|
|
32
33
|
RUN python -m venv /code/env \
|
|
33
34
|
&& source /code/env/bin/activate \
|
|
34
35
|
&& pip install -r requirements.txt
|
|
@@ -37,7 +38,8 @@ RUN python -m venv /code/env \
|
|
|
37
38
|
|
|
38
39
|
### Runtime
|
|
39
40
|
|
|
40
|
-
FROM python:3.12.9-alpine3.21 AS runtime
|
|
41
|
+
#FROM python:3.12.9-alpine3.21 AS runtime
|
|
42
|
+
FROM python:3.12.11-alpine3.22 AS runtime
|
|
41
43
|
|
|
42
44
|
# Install for python requirements
|
|
43
45
|
#RUN apk update \
|
|
@@ -57,12 +59,12 @@ USER appuser
|
|
|
57
59
|
# Copy /code from build
|
|
58
60
|
COPY --chown=appuser --from=build /code /code
|
|
59
61
|
|
|
60
|
-
# Copy docker
|
|
61
|
-
COPY --chown=appuser ./rest /code/
|
|
62
|
+
# Copy docker controller sources
|
|
63
|
+
COPY --chown=appuser ./rest /code/docker_controller
|
|
62
64
|
|
|
63
65
|
# Activate permanently python venv
|
|
64
66
|
ENV PATH=/code/env/bin:$PATH
|
|
65
67
|
|
|
66
|
-
WORKDIR /code/
|
|
68
|
+
WORKDIR /code/docker_controller
|
|
67
69
|
CMD ["sh", "-c", "uvicorn run:app --host 0.0.0.0 --port $HOLADO_DOCKER_CONTROLLER_PORT"]
|
|
68
70
|
|
|
@@ -12,30 +12,29 @@
|
|
|
12
12
|
|
|
13
13
|
from flask.views import MethodView
|
|
14
14
|
from holado.common.context.session_context import SessionContext
|
|
15
|
+
import logging
|
|
16
|
+
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
|
|
15
20
|
|
|
16
21
|
def _get_session_context():
|
|
17
22
|
return SessionContext.instance()
|
|
18
23
|
|
|
19
24
|
class ContainerView(MethodView):
|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
#
|
|
24
|
-
# def put(self, container_name, body: dict):
|
|
25
|
-
# pass
|
|
26
|
-
#
|
|
27
|
-
# def delete(self, container_name):
|
|
28
|
-
# pass
|
|
29
|
-
|
|
30
|
-
def get(self, name=None, limit=100):
|
|
26
|
+
def get(self, name=None, all_=False, limit=100):
|
|
27
|
+
_get_session_context().docker_client.update_containers(all_=all_)
|
|
31
28
|
if name is not None:
|
|
32
|
-
if not _get_session_context().docker_client.has_container(name):
|
|
33
|
-
|
|
29
|
+
if not _get_session_context().docker_client.has_container(name, in_list=False, all_=all_, reset_if_removed=False):
|
|
30
|
+
if all_:
|
|
31
|
+
return f"Container '{name}' doesn't exist", 406
|
|
32
|
+
else:
|
|
33
|
+
return f"Container '{name}' is not running (try with '?all=true' to get information on existing but not running containers)", 406
|
|
34
34
|
|
|
35
|
-
cont = _get_session_context().docker_client.get_container(name)
|
|
36
|
-
cont.
|
|
37
|
-
res = cont.container.attrs
|
|
35
|
+
cont = _get_session_context().docker_client.get_container(name, all_=all_)
|
|
36
|
+
res = cont.information
|
|
38
37
|
else:
|
|
39
|
-
names = _get_session_context().docker_client.
|
|
40
|
-
res = [{'name':n, 'status':_get_session_context().docker_client.get_container(n).status} for n in names]
|
|
38
|
+
names = _get_session_context().docker_client.get_container_names(in_list=False, all_=all_)
|
|
39
|
+
res = [{'name':n, 'status':_get_session_context().docker_client.get_container(n, all_=all_).status} for n in names]
|
|
41
40
|
return res
|
|
@@ -12,10 +12,16 @@ paths:
|
|
|
12
12
|
/container:
|
|
13
13
|
get:
|
|
14
14
|
description: "List containers and their status"
|
|
15
|
-
parameters:
|
|
15
|
+
parameters:
|
|
16
|
+
- in: "query"
|
|
17
|
+
name: "all"
|
|
18
|
+
description: "if set to 'true', list all containers, not only running ones"
|
|
19
|
+
schema:
|
|
20
|
+
type: "boolean"
|
|
21
|
+
default: false
|
|
16
22
|
responses:
|
|
17
23
|
200:
|
|
18
|
-
description: ""
|
|
24
|
+
description: "List of container names with their status"
|
|
19
25
|
content:
|
|
20
26
|
application/json:
|
|
21
27
|
schema:
|
|
@@ -28,12 +34,19 @@ paths:
|
|
|
28
34
|
parameters:
|
|
29
35
|
- in: "path"
|
|
30
36
|
name: "name"
|
|
37
|
+
description: "Container name"
|
|
31
38
|
required: true
|
|
32
39
|
schema:
|
|
33
40
|
type: "string"
|
|
41
|
+
- in: "query"
|
|
42
|
+
name: "all"
|
|
43
|
+
description: "if set to 'true', search container in all containers, not only running ones"
|
|
44
|
+
schema:
|
|
45
|
+
type: "boolean"
|
|
46
|
+
default: false
|
|
34
47
|
responses:
|
|
35
48
|
200:
|
|
36
|
-
description: ""
|
|
49
|
+
description: "Container information"
|
|
37
50
|
content:
|
|
38
51
|
application/json:
|
|
39
52
|
schema:
|
|
@@ -44,6 +57,7 @@ paths:
|
|
|
44
57
|
parameters:
|
|
45
58
|
- in: "path"
|
|
46
59
|
name: "name"
|
|
60
|
+
description: "Container name"
|
|
47
61
|
required: true
|
|
48
62
|
schema:
|
|
49
63
|
type: "string"
|
|
@@ -66,6 +80,7 @@ paths:
|
|
|
66
80
|
parameters:
|
|
67
81
|
- in: "path"
|
|
68
82
|
name: "name"
|
|
83
|
+
description: "Container name"
|
|
69
84
|
required: true
|
|
70
85
|
schema:
|
|
71
86
|
type: "string"
|
|
@@ -88,6 +103,7 @@ paths:
|
|
|
88
103
|
parameters:
|
|
89
104
|
- in: "path"
|
|
90
105
|
name: "name"
|
|
106
|
+
description: "Container name"
|
|
91
107
|
required: true
|
|
92
108
|
schema:
|
|
93
109
|
type: "string"
|
|
@@ -110,6 +126,7 @@ paths:
|
|
|
110
126
|
parameters:
|
|
111
127
|
- in: "path"
|
|
112
128
|
name: "name"
|
|
129
|
+
description: "Container name"
|
|
113
130
|
required: true
|
|
114
131
|
schema:
|
|
115
132
|
type: "string"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
-
# Script to launch Docker
|
|
3
|
+
# Script to launch Docker Controller as a docker image.
|
|
4
4
|
#
|
|
5
|
-
# Docker
|
|
5
|
+
# Docker Controller exposes a REST API for some docker commands.
|
|
6
6
|
# It is accessible on localhost, and also on a docker network if HOLADO_NETWORK is defined.
|
|
7
7
|
# On all networks, API is accessible on same port (HOLADO_DOCKER_CONTROLLER_PORT or 8000).
|
|
8
8
|
#
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
#
|
|
14
14
|
# Optionally, define in .profile the following variables
|
|
15
15
|
# - HOLADO_DOCKER_CONTROLLER_PORT: REST API port to use (default: 8000)
|
|
16
|
-
# - HOLADO_IMAGE_REGISTRY: docker image registry to use (default: holado/
|
|
17
|
-
# - HOLADO_IMAGE_TAG: docker image tag to use (default:
|
|
16
|
+
# - HOLADO_IMAGE_REGISTRY: docker image registry to use (default: holado/docker_controller)
|
|
17
|
+
# - HOLADO_IMAGE_TAG: docker image tag to use (default: latest)
|
|
18
18
|
# - HOLADO_OUTPUT_BASEDIR: absolute path to base output directory (default: [HOME]/.holado/output)
|
|
19
19
|
# - HOLADO_USE_LOCALHOST: force the container network to 'host'.
|
|
20
20
|
# - HOLADO_NETWORK: specify on which network the docker is run.
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
WORK_DIR="$(pwd)"
|
|
25
25
|
|
|
26
26
|
if [[ -z "$HOLADO_IMAGE_REGISTRY" ]]; then
|
|
27
|
-
HOLADO_IMAGE_REGISTRY=holado/
|
|
27
|
+
HOLADO_IMAGE_REGISTRY=holado/docker_controller
|
|
28
28
|
fi
|
|
29
29
|
if [[ -z "$HOLADO_IMAGE_TAG" ]]; then
|
|
30
|
-
HOLADO_IMAGE_TAG=
|
|
30
|
+
HOLADO_IMAGE_TAG=latest
|
|
31
31
|
fi
|
|
32
32
|
CONTROLLER_IMAGE=${HOLADO_IMAGE_REGISTRY}:${HOLADO_IMAGE_TAG}
|
|
33
33
|
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
import logging
|
|
15
|
+
from holado_rest.api.rest.rest_client import RestClient
|
|
16
|
+
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class DockerViewerClient(RestClient):
|
|
21
|
+
|
|
22
|
+
def __init__(self, name, url, headers=None):
|
|
23
|
+
super().__init__(name, url, headers)
|
|
24
|
+
|
|
25
|
+
def get_containers_status(self, all_=False):
|
|
26
|
+
if all_:
|
|
27
|
+
response = self.get("container?all=true")
|
|
28
|
+
else:
|
|
29
|
+
response = self.get("container")
|
|
30
|
+
return self.response_result(response, status_ok=[200,204])
|
|
31
|
+
|
|
32
|
+
def get_container_info(self, name, all_=False):
|
|
33
|
+
if all_:
|
|
34
|
+
response = self.get(f"container/{name}?all=true")
|
|
35
|
+
else:
|
|
36
|
+
response = self.get(f"container/{name}")
|
|
37
|
+
return self.response_result(response, status_ok=[200,204])
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|