holado 0.5.2__py3-none-any.whl → 0.6.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.
- {holado-0.5.2.dist-info → holado-0.6.0.dist-info}/METADATA +4 -2
- {holado-0.5.2.dist-info → holado-0.6.0.dist-info}/RECORD +41 -25
- holado_db/tools/db/clients/base/db_client.py +3 -2
- holado_docker/sdk/docker/docker_client.py +64 -22
- holado_docker/tests/behave/steps/__init__.py +1 -1
- holado_docker/tests/behave/steps/tools/docker_controller/client_steps.py +94 -0
- holado_docker/tools/docker_controller/client/rest/docker_controller_client.py +48 -0
- holado_docker/tools/docker_controller/docker_controller_manager.py +44 -0
- holado_docker/tools/docker_controller/server/Dockerfile +68 -0
- holado_docker/tools/docker_controller/server/grpc/README +2 -0
- holado_docker/tools/{docker_controler/docker_controler_client.py → docker_controller/server/grpc/docker_controller_client.py} +1 -1
- holado_docker/tools/{docker_controler/docker_controler_server.py → docker_controller/server/grpc/docker_controller_server.py} +3 -3
- holado_docker/tools/docker_controller/server/requirements.txt +3 -0
- holado_docker/tools/docker_controller/server/rest/api/__init__.py +41 -0
- holado_docker/tools/docker_controller/server/rest/api/container.py +55 -0
- holado_docker/tools/docker_controller/server/rest/initialize_holado.py +72 -0
- holado_docker/tools/docker_controller/server/rest/openapi.yaml +134 -0
- holado_docker/tools/docker_controller/server/rest/run.py +28 -0
- holado_docker/tools/docker_controller/server/run_docker_controller_in_docker.sh +101 -0
- holado_grpc/TODO +8 -0
- holado_helper/docker/run_holado_test_nonreg_in_docker.sh +2 -2
- holado_helper/docker/run_terminal_in_docker-with_docker_control.sh +1 -1
- holado_helper/docker/run_terminal_in_docker.sh +1 -1
- holado_python/standard_library/ssl/resources/certificates/tcpbin.crt +16 -16
- holado_python/standard_library/ssl/resources/certificates/tcpbin.key +26 -26
- holado_rest/api/rest/rest_client.py +2 -1
- holado_rest/api/rest/rest_manager.py +9 -3
- holado_rest/tests/behave/steps/private/api/rest_steps.py +0 -1
- holado_swagger/swagger_hub/mockserver/mockserver_manager.py +3 -2
- holado_test/tests/behave/steps/scenario/scenario_steps.py +14 -1
- test_holado/features/Test/test_docker_controller.feature +13 -0
- test_holado/features/Test/test_parameter.feature +15 -0
- test_holado/tools/connexion/api_rest/openapi.yaml +16 -0
- holado_docker/tests/behave/steps/tools/docker_steps.py → test_holado/tools/connexion/api_rest/run.py +5 -19
- {holado-0.5.2.dist-info → holado-0.6.0.dist-info}/WHEEL +0 -0
- {holado-0.5.2.dist-info → holado-0.6.0.dist-info}/licenses/LICENSE +0 -0
- /holado_docker/tools/{docker_controler → docker_controller/server/grpc}/__init__.py +0 -0
- /holado_docker/tools/{docker_controler → docker_controller/server/grpc}/proto/compile_proto.py +0 -0
- /holado_docker/tools/{docker_controler → docker_controller/server/grpc}/proto/definitions/docker_controler.proto +0 -0
- /holado_docker/tools/{docker_controler → docker_controller/server/grpc}/proto/generated/docker_controler_pb2.py +0 -0
- /holado_docker/tools/{docker_controler → docker_controller/server/grpc}/proto/generated/docker_controler_pb2_grpc.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: holado
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
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,8 @@ Requires-Dist: psutil
|
|
|
20
20
|
Requires-Dist: python-dateutil
|
|
21
21
|
Provides-Extra: ais
|
|
22
22
|
Requires-Dist: pyais; extra == 'ais'
|
|
23
|
+
Provides-Extra: api-connexion
|
|
24
|
+
Requires-Dist: connexion[flask,swagger-ui,uvicorn]; extra == 'api-connexion'
|
|
23
25
|
Provides-Extra: db
|
|
24
26
|
Requires-Dist: pypika; extra == 'db'
|
|
25
27
|
Requires-Dist: sql-metadata; extra == 'db'
|
|
@@ -58,8 +60,8 @@ Requires-Dist: pysftp; extra == 'sftp'
|
|
|
58
60
|
Requires-Dist: sftpserver; extra == 'sftp'
|
|
59
61
|
Provides-Extra: ssl
|
|
60
62
|
Requires-Dist: certifi; extra == 'ssl'
|
|
61
|
-
Requires-Dist: pip-system-certs; extra == 'ssl'
|
|
62
63
|
Requires-Dist: pyopenssl; extra == 'ssl'
|
|
64
|
+
Requires-Dist: truststore; extra == 'ssl'
|
|
63
65
|
Provides-Extra: ws-suds
|
|
64
66
|
Requires-Dist: suds; extra == 'ws-suds'
|
|
65
67
|
Provides-Extra: ws-zeep
|
|
@@ -155,7 +155,7 @@ holado_db/tests/behave/steps/tools/db/postgresql_client_steps.py,sha256=HtO-NSlT
|
|
|
155
155
|
holado_db/tests/behave/steps/tools/db/sqlite_client_steps.py,sha256=6B8GGBJxxG6Z49cGCPykm8BP7nQQZWUrWpw0XgaYGaE,2930
|
|
156
156
|
holado_db/tools/db/db_manager.py,sha256=0llXc6YhXfLr6oNfncPNjh4_ZInIm8XYywutQYvvLso,5400
|
|
157
157
|
holado_db/tools/db/clients/base/db_audit.py,sha256=eJ1r_0YUhvq50JngpWAdyEeVHWjAD4YCvWCJsLc1zmc,4368
|
|
158
|
-
holado_db/tools/db/clients/base/db_client.py,sha256=
|
|
158
|
+
holado_db/tools/db/clients/base/db_client.py,sha256=rkWd3Mau3VRPn-TMd_EVxzn8WFhY9skHsBx0I3EQlCs,15290
|
|
159
159
|
holado_db/tools/db/clients/postgresql/postgresql_audit.py,sha256=yoy4-Yt4lZHJw7xAcuTj2Thg4aTDCYJBt-6HzQeEE80,3939
|
|
160
160
|
holado_db/tools/db/clients/postgresql/postgresql_client.py,sha256=40UOniOJS-2Jrl-lxCSPTn32JGmblO-WqRFQYV40srk,4246
|
|
161
161
|
holado_db/tools/db/clients/sqlite/sqlite_audit.py,sha256=cK7hBE7aKCFOX5xnT-QnYD_1loQPgPP9Gf6qTT1XuI4,3966
|
|
@@ -185,17 +185,29 @@ holado_django/server/django_projects/rest_api/rest_api/application/migrations/__
|
|
|
185
185
|
holado_django/tests/behave/steps/__init__.py,sha256=1x7ID0w53eDe1P-n4Y5XOnLOTg_bta54gZE2YI0-IHo,1281
|
|
186
186
|
holado_django/tests/behave/steps/django_server_steps.py,sha256=XAnKDUXJxsZ4L7-PYatjevh2BT3qdKIg5sXXG5Y3QFQ,3819
|
|
187
187
|
holado_docker/__init__.py,sha256=CtGYR7aEkaCdAHPDAsu_ErjpVtYE0yz9wbgbfRUwS8s,1574
|
|
188
|
-
holado_docker/sdk/docker/docker_client.py,sha256=
|
|
188
|
+
holado_docker/sdk/docker/docker_client.py,sha256=ME_ugypTREAIpG-fmEurIpsqq7e7GYHOHO2Y4Yhvn1Q,12610
|
|
189
189
|
holado_docker/sdk/docker/docker_service.py,sha256=SvMSIZ7XTCbC7q5rur03lJhJVSHL3uIq1dBQz9oDpkw,3767
|
|
190
|
-
holado_docker/tests/behave/steps/__init__.py,sha256=
|
|
191
|
-
holado_docker/tests/behave/steps/tools/
|
|
192
|
-
holado_docker/tools/
|
|
193
|
-
holado_docker/tools/
|
|
194
|
-
holado_docker/tools/
|
|
195
|
-
holado_docker/tools/
|
|
196
|
-
holado_docker/tools/
|
|
197
|
-
holado_docker/tools/
|
|
198
|
-
holado_docker/tools/
|
|
190
|
+
holado_docker/tests/behave/steps/__init__.py,sha256=lrP0btKLA3qQD2wp3zbOp0ug8RmgpaYWCrOAWehcPiI,1298
|
|
191
|
+
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=BBWJQYZpi1o5N7dcfwBRLIkX1GcQwZkRtryOKLbF76w,2319
|
|
193
|
+
holado_docker/tools/docker_controller/client/rest/docker_controller_client.py,sha256=dO_4xN30DHW5-Sre-DyG8Ls6EPW6goCzqvYqBnjBmUo,2445
|
|
194
|
+
holado_docker/tools/docker_controller/server/Dockerfile,sha256=LbhPj2xyXuCrPfkz7oX07gNsI2Qhae8us3m2mMx82GA,1685
|
|
195
|
+
holado_docker/tools/docker_controller/server/requirements.txt,sha256=CmvD0uEQrXrOqQycdI8kBqLHtI7cMGJJdqVGxxgwzwo,83
|
|
196
|
+
holado_docker/tools/docker_controller/server/run_docker_controller_in_docker.sh,sha256=sX9z31yL41kht6jprFKgDk1fI3uo-lQSaHAtTiUAUa4,3222
|
|
197
|
+
holado_docker/tools/docker_controller/server/grpc/README,sha256=cNOly0Lfsfz_qyhTqLGmELOXzAgZbByNUowuYrUnJa0,132
|
|
198
|
+
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
|
+
holado_docker/tools/docker_controller/server/grpc/proto/compile_proto.py,sha256=NjcStLaAO_zKcSprrcGscq3R_4anh55QeguXLq6SPjo,2191
|
|
202
|
+
holado_docker/tools/docker_controller/server/grpc/proto/definitions/docker_controler.proto,sha256=n9bsXaQfnZX-R5HvfquCVt3QjpFtDJSH6p8gnTjm06k,1650
|
|
203
|
+
holado_docker/tools/docker_controller/server/grpc/proto/generated/docker_controler_pb2.py,sha256=To_s6iI7FQZW9qx22CT-tj04AQAvQ1rq4pGjA4uM__c,3354
|
|
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/initialize_holado.py,sha256=UxNphXyjs-xraorzMWjDe6-QYw_Q3mtykyY-ENYZB1o,3464
|
|
206
|
+
holado_docker/tools/docker_controller/server/rest/openapi.yaml,sha256=q9c4em-bRvBBUjasrE5wJjVG4cgUStQcvc0nLn_l4SU,3347
|
|
207
|
+
holado_docker/tools/docker_controller/server/rest/run.py,sha256=8w5Xl7uOnjsYW59cmuUMOUd71fcXQn30k2jVis7cVNs,1748
|
|
208
|
+
holado_docker/tools/docker_controller/server/rest/api/__init__.py,sha256=Ge8OOw3BMpULc4R5BAoaOrJ4kaAhyJR0sLMtfJl4ebE,2218
|
|
209
|
+
holado_docker/tools/docker_controller/server/rest/api/container.py,sha256=Y0iE3AqdJVbFUTcQNK90ymc2gwQeW0P3yBA5-RpMXvQ,2662
|
|
210
|
+
holado_grpc/TODO,sha256=ESjES2-J6-3AJYdt6olcz_YGt4YTxw80CjIt-tjJ0z4,206
|
|
199
211
|
holado_grpc/__init__.py,sha256=SaAz66iSTqMw7oIDrj94rGcO8W7BgS15B78p--OogHc,2266
|
|
200
212
|
holado_grpc/api/rpc/TODO.txt,sha256=uWZT-WtrGuWbiOVU8-6xNiNyx_kKx-htM691zprLjh0,130
|
|
201
213
|
holado_grpc/api/rpc/grpc_client.py,sha256=sCsNzwHY8QAXvcqMd-Wt-gXy3VKrsqVbB8ncBf_EcRA,8990
|
|
@@ -213,9 +225,9 @@ holado_helper/debug/README.txt,sha256=kpsK1Ii5-t5pJCL9ChcEbZYyYTKt34fjKdiMC5DGOj
|
|
|
213
225
|
holado_helper/debug/memory/memory_profiler.py,sha256=Qu05N3uzntqm5S5XJMPdG9X0EFdagZS5poNQJPgZ-Iw,4659
|
|
214
226
|
holado_helper/docker/init_user.sh,sha256=vac-OUgsbSTIuO7MK4mpbtRZNGqHbNJGNm3Hk3W3FWQ,913
|
|
215
227
|
holado_helper/docker/logging.conf,sha256=PKFEwVhQriaaHZMnU3t5I9fGxuM1HFxUBRJ0NZVH-KE,1186
|
|
216
|
-
holado_helper/docker/run_holado_test_nonreg_in_docker.sh,sha256=
|
|
217
|
-
holado_helper/docker/run_terminal_in_docker-with_docker_control.sh,sha256=
|
|
218
|
-
holado_helper/docker/run_terminal_in_docker.sh,sha256=
|
|
228
|
+
holado_helper/docker/run_holado_test_nonreg_in_docker.sh,sha256=Wwt1LJ87YgCAhaV7l6iATfhAfLH3awrYsxq71X7Ih68,4696
|
|
229
|
+
holado_helper/docker/run_terminal_in_docker-with_docker_control.sh,sha256=0N-5sHaQuTiX7TadOjh6nktv-viNXeyZtnh0YixW9kM,3525
|
|
230
|
+
holado_helper/docker/run_terminal_in_docker.sh,sha256=_2qqNArGKAyxh9gLg4Y-wkVS3bEzglm2KKNaIbqIImM,3397
|
|
219
231
|
holado_helper/holado_module_template/__init__.py,sha256=KpbIi2cm1BYZgoWf0LuhE0ei3ZCE15UcUtjC1cSA55M,1653
|
|
220
232
|
holado_helper/holado_module_template/tests/behave/steps/__init__.py,sha256=BHp8TYE_X4lWn4B8A51nXSYaJlczuiDVJLcKMy7p0Lw,1267
|
|
221
233
|
holado_helper/holado_module_template/tests/behave/steps/private/__init__.py,sha256=BHp8TYE_X4lWn4B8A51nXSYaJlczuiDVJLcKMy7p0Lw,1267
|
|
@@ -305,8 +317,8 @@ holado_python/standard_library/ssl/resources/certificates/NOTES.txt,sha256=GlPGG
|
|
|
305
317
|
holado_python/standard_library/ssl/resources/certificates/localhost.crt,sha256=iLmZpDuOQVawUlbZkb72g2-uv1c4SAmRJOrm4Th5anY,1123
|
|
306
318
|
holado_python/standard_library/ssl/resources/certificates/localhost.key,sha256=lP2NCvB9mr2E5sk8whA8FyQRcyU6H7sdWkJeKz80Hyc,1704
|
|
307
319
|
holado_python/standard_library/ssl/resources/certificates/rootCACert.pem,sha256=ECQDZ8OHRfqpZHCu6JRLMUjiONaPIhKZQF0-kidVrWQ,1424
|
|
308
|
-
holado_python/standard_library/ssl/resources/certificates/tcpbin.crt,sha256=
|
|
309
|
-
holado_python/standard_library/ssl/resources/certificates/tcpbin.key,sha256=
|
|
320
|
+
holado_python/standard_library/ssl/resources/certificates/tcpbin.crt,sha256=7EPyVjJZ1rQIK76bcRubh9OWCRQXK354d5__L3cP27Y,1237
|
|
321
|
+
holado_python/standard_library/ssl/resources/certificates/tcpbin.key,sha256=nSbpEaanV4pvfhNhyx5kcSbRQWw-rEqRMSxz1ZkPICk,1704
|
|
310
322
|
holado_python/tests/behave/steps/__init__.py,sha256=TWEk-kBTTDHi9I4nuu48nufmNMdZ9FHAhPZv0A_cWzc,1661
|
|
311
323
|
holado_python/tests/behave/steps/convert_steps.py,sha256=bZqRvJVp_u6fSPpdu4ne9NwVyZmui7R-AVdO2-H-I1A,2728
|
|
312
324
|
holado_python/tests/behave/steps/iterable_steps.py,sha256=f4vGIWBH8Qnjq69Q-ZBluYyctQ8SKauazTc41dsktZA,4041
|
|
@@ -351,14 +363,14 @@ holado_report/report/reports/feature_report.py,sha256=i0wpk3LQLArVjWDsP9UcNSJzAU
|
|
|
351
363
|
holado_report/report/reports/scenario_report.py,sha256=eMyqw9EzaKMmX3pGFJN1rqAOQ5eqO2ISZdxAfK3XQR4,2945
|
|
352
364
|
holado_rest/__init__.py,sha256=BOeE6t6ejeqRYd44SE4vYJVTNz01BwcVCIWfwRQ5axg,1526
|
|
353
365
|
holado_rest/api/rest/TODO.txt,sha256=Oz8BYPkBEs9OAEgyYLLm7i5tJ1bRE5POBpT3SRFWTi4,29
|
|
354
|
-
holado_rest/api/rest/rest_client.py,sha256=
|
|
355
|
-
holado_rest/api/rest/rest_manager.py,sha256=
|
|
366
|
+
holado_rest/api/rest/rest_client.py,sha256=I3-aQrivFSQAbPiTSJA3wwCWPdynu2z3FqNTobqjPQY,6626
|
|
367
|
+
holado_rest/api/rest/rest_manager.py,sha256=lo8zUAXsi86Diw5dego-AOn3vUbwKj5xK7i0atIgwlA,4013
|
|
356
368
|
holado_rest/tests/behave/steps/__init__.py,sha256=lEH5NYkKtpgDV2ZAO1qAGNN4ipwILWMpgvQgnamgYKk,1283
|
|
357
369
|
holado_rest/tests/behave/steps/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
358
370
|
holado_rest/tests/behave/steps/api/rest_client_steps.py,sha256=naN0YcRVQyM--RhV0jPhnlsjZS6luijwGvVC5lM0XCY,9749
|
|
359
371
|
holado_rest/tests/behave/steps/private/__init__.py,sha256=TGsd7qLZpPQRxphFzgepFa22NhHSoZgxAWSIqwvA4L8,1276
|
|
360
372
|
holado_rest/tests/behave/steps/private/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
361
|
-
holado_rest/tests/behave/steps/private/api/rest_steps.py,sha256=
|
|
373
|
+
holado_rest/tests/behave/steps/private/api/rest_steps.py,sha256=acQ2K676fB7tHycwYmCPzL7E8JcQkit_aBhNggZZVgw,3264
|
|
362
374
|
holado_s3/__init__.py,sha256=Gl285tg-QaPE-3etWwZql9sH26G7EnVoQn97B0NMvOI,1248
|
|
363
375
|
holado_s3/tests/behave/steps/__init__.py,sha256=q64qGCCey5QivEezEXq9LjABSBnjavTpq03PpaMSLkY,1320
|
|
364
376
|
holado_s3/tests/behave/steps/private/__init__.py,sha256=JmVFxoOewwdE3uAgX4u2Y3tLWL_GdYW3h2ZawNdpn38,1276
|
|
@@ -414,7 +426,7 @@ holado_sftp/tools/sftp/sftp_client.py,sha256=ExpIQoImZt9KpHuGLuZmxZetvuzK426-DQ6
|
|
|
414
426
|
holado_sftp/tools/sftp/sftp_server.py,sha256=N_Ym3Rm8w_QS6E0id543LZXfQ7G38DeKjVwCRH2irKA,1969
|
|
415
427
|
holado_swagger/__init__.py,sha256=VSOq3mr1SaTEnceP_4kwYBYAMTuyVE9_61wOdKKasis,1664
|
|
416
428
|
holado_swagger/swagger_hub/mockserver/mockserver_client.py,sha256=L7P8aNi5Zuh2xRURbTLkMKeS3XcMENdgvb5BbOb3La0,4067
|
|
417
|
-
holado_swagger/swagger_hub/mockserver/mockserver_manager.py,sha256=
|
|
429
|
+
holado_swagger/swagger_hub/mockserver/mockserver_manager.py,sha256=eN843He06PLrEvT6M6UoT4xX_4Ks9GEd_3i-xJrGblw,1631
|
|
418
430
|
holado_swagger/tests/behave/steps/__init__.py,sha256=joCT_nKaotXBBMNTXxOBcmr98gjmjDkY1Zbu5lCL8B4,1290
|
|
419
431
|
holado_swagger/tests/behave/steps/swagger_hub/mockserver_steps.py,sha256=_M5WyF35qBjvDnXbohhMA9kV3D1H1aRnTBQ1iOtmxHA,3749
|
|
420
432
|
holado_system/system/global_system.py,sha256=ZuC7Hbs3EMm2QQ6CRLYKMOS7ACcpi1N9vRuDhQT2jS8,8253
|
|
@@ -445,7 +457,7 @@ holado_test/scenario/step_tools.py,sha256=eovzeSDmkfyrRjGga-bVW9VcoLRCdGjN1z8xlB
|
|
|
445
457
|
holado_test/scenario/tester_tools.py,sha256=Tv035FyXPjQ46Ep8KuPOjOvzJFvxnbv9EsrSihUzAwg,2479
|
|
446
458
|
holado_test/tests/behave/steps/__init__.py,sha256=rdqrp-UN7vRplIqORx4sXyKwMUkptRizyLWudsmYehM,1362
|
|
447
459
|
holado_test/tests/behave/steps/scenario/exception_steps.py,sha256=ZIE92Dz7a6O_c0jAP_0dj6Hc0tnW6YRgNKd4_aBpeR0,4054
|
|
448
|
-
holado_test/tests/behave/steps/scenario/scenario_steps.py,sha256=
|
|
460
|
+
holado_test/tests/behave/steps/scenario/scenario_steps.py,sha256=RfM5Lh4sduKeYSD1NzUxtQ8705O7nausoz_gnpAJQB0,4616
|
|
449
461
|
holado_test/tests/behave/steps/scenario/tester_steps.py,sha256=zEm36-su8jrqe0uv8ai4xN97j3_p2jmcPv_-jRRu688,2997
|
|
450
462
|
holado_value/__init__.py,sha256=60VyLyWux76dFwn03uH4Fz3R6itf6fqKu0pQUdvwblU,1561
|
|
451
463
|
holado_value/common/tables/value_table.py,sha256=fJgb-HWdlMwHOAx5CS38sPiVrjGelEiQBbG9HuHqe-A,1726
|
|
@@ -542,6 +554,8 @@ test_holado/features/NonReg/tools/sFTP.feature,sha256=LWhkOSlvCGN90qx3zXSlZrgWZs
|
|
|
542
554
|
test_holado/features/NonReg/tools/S3/boto3_client.feature,sha256=mAGMcyQRSy3VSAzkGUKIGM00F_OD8hfXZv1JYWztpqU,3384
|
|
543
555
|
test_holado/features/NonReg/tools/S3/minio_client.feature,sha256=c2i36-ehegxQbBBKR57Y5TTmdJK6fV4tGI6ksvHtyA8,3778
|
|
544
556
|
test_holado/features/Test/logger.feature,sha256=Ptiq79z3P2aMNJYRSRuMvhArc_4P3Ey6Rv1RolGRIBw,531
|
|
557
|
+
test_holado/features/Test/test_docker_controller.feature,sha256=OSD_ttaeoe9tyxQmQtadFlF6wjImsnfNukSx_dhuLaI,348
|
|
558
|
+
test_holado/features/Test/test_parameter.feature,sha256=Yu5RycNfqUWN2O7F5u52lGEydhALeG5NmSZnyifGbK4,378
|
|
545
559
|
test_holado/resources/proto/definitions/protobuf/custom_types/field_types.proto,sha256=d2QU_j-qKB6pdvUKQCGv-gSgBOPW6QcBaKrQMqZ_kNM,398
|
|
546
560
|
test_holado/resources/proto/definitions/protobuf/protobuf.dev/tutorial/addressbook.proto,sha256=rxzTe354X-R2UeKi6i7mjcTavPvQctLRPPrWYYsWZBU,1362
|
|
547
561
|
test_holado/resources/proto/generated/protobuf/custom_types/field_types_pb2.py,sha256=IHOGkbVtdFHC2QsVh5Nmm56sOoGDRO7ILwT3jtY6bOw,1965
|
|
@@ -551,6 +565,8 @@ test_holado/resources/scripts/update_resources_proto_generated.py,sha256=iIei5g9
|
|
|
551
565
|
test_holado/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
552
566
|
test_holado/steps/private_steps.py,sha256=nhypmhPUbSAvOq-98kFOlc7uddKi5Qkoz_Mqxq4Djl0,1330
|
|
553
567
|
test_holado/steps/public_steps.py,sha256=qKBNrNQNQqH6E3Y7L4yqs-6XEWbeTN-M4c1Lp5Nf3to,1324
|
|
568
|
+
test_holado/tools/connexion/api_rest/openapi.yaml,sha256=J4xDXap6VZfn5arbnvToBGf5V-3eXDGPm2FXMCsEkrE,280
|
|
569
|
+
test_holado/tools/connexion/api_rest/run.py,sha256=1r8h-niiJ69leYu9-yM_2QKzgDRpr0nJKxBgnvqn4U8,1350
|
|
554
570
|
test_holado/tools/django/README.txt,sha256=yJhso4V-Sn0Ok6QTfn5I27g9KCXK6-dGkIQOy5kgo5U,74
|
|
555
571
|
test_holado/tools/django/api_grpc/db.sqlite3,sha256=4k0iEt66XiVaWNgdAjqkq2lAnB6i4t7dcsN2UVV8n_I,131072
|
|
556
572
|
test_holado/tools/django/api_grpc/manage.py,sha256=90Y2fhWHRk1_8vnRBv_t6_q_Dn3dTp9fUYoDp5fOHmc,980
|
|
@@ -589,7 +605,7 @@ test_holado/tools/django/api_rest/api_rest/api1/serializers.py,sha256=o_YxFr-tgC
|
|
|
589
605
|
test_holado/tools/django/api_rest/api_rest/api1/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
|
590
606
|
test_holado/tools/django/api_rest/api_rest/api1/views.py,sha256=kOt2xT6bxO47_z__5yYR9kcYIWWv4qYzpX0K8Tqonik,758
|
|
591
607
|
test_holado/tools/django/api_rest/api_rest/api1/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
592
|
-
holado-0.
|
|
593
|
-
holado-0.
|
|
594
|
-
holado-0.
|
|
595
|
-
holado-0.
|
|
608
|
+
holado-0.6.0.dist-info/METADATA,sha256=2D7nfgsZFztMf6a_wQ4VQn252_so4YzqOd9Di_4qpl0,6166
|
|
609
|
+
holado-0.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
610
|
+
holado-0.6.0.dist-info/licenses/LICENSE,sha256=IgGmNlcFHnbp7UWrLJqAFvs_HIgjJDTmjCNRircJLsk,1070
|
|
611
|
+
holado-0.6.0.dist-info/RECORD,,
|
|
@@ -22,8 +22,6 @@ from holado_core.common.tools.tools import Tools
|
|
|
22
22
|
from holado_core.common.tables.table import Table
|
|
23
23
|
from holado_db.tools.db.query.base.query_builder import QueryBuilder
|
|
24
24
|
from holado_data.data.generator.base import BaseGenerator
|
|
25
|
-
from sql_metadata.keywords_lists import QueryType
|
|
26
|
-
import sql_metadata
|
|
27
25
|
from holado_python.standard_library.typing import Typing
|
|
28
26
|
import pypika.queries
|
|
29
27
|
|
|
@@ -223,6 +221,9 @@ class DBClient(object):
|
|
|
223
221
|
return res
|
|
224
222
|
|
|
225
223
|
def is_query_type(self, sql_or_query, query_type):
|
|
224
|
+
from sql_metadata.keywords_lists import QueryType
|
|
225
|
+
import sql_metadata
|
|
226
|
+
|
|
226
227
|
if isinstance(sql_or_query, pypika.queries.QueryBuilder):
|
|
227
228
|
sql = self.query_builder.to_sql(sql_or_query)
|
|
228
229
|
else:
|
|
@@ -43,39 +43,61 @@ class DockerClient(object):
|
|
|
43
43
|
def client(self):
|
|
44
44
|
return self.__client
|
|
45
45
|
|
|
46
|
-
def has_container(self, name, in_list =
|
|
46
|
+
def has_container(self, name, in_list=True, reset_if_removed=True):
|
|
47
47
|
# Note: Even if name exists in __containers, it is possible that the container has been removed
|
|
48
48
|
if in_list:
|
|
49
49
|
c = self.__get_container_from_list(name)
|
|
50
50
|
res = c is not None
|
|
51
|
+
|
|
52
|
+
if reset_if_removed and not res and name in self.__containers:
|
|
53
|
+
del self.__containers[name]
|
|
51
54
|
else:
|
|
52
55
|
res = name in self.__containers
|
|
56
|
+
|
|
57
|
+
if reset_if_removed and res:
|
|
58
|
+
if self.__containers[name].status == "removed":
|
|
59
|
+
del self.__containers[name]
|
|
60
|
+
res = False
|
|
53
61
|
return res
|
|
54
62
|
|
|
55
|
-
def get_container(self, name):
|
|
63
|
+
def get_container(self, name, reset_if_removed=True):
|
|
64
|
+
# Reset container if removed
|
|
65
|
+
if reset_if_removed and name in self.__containers:
|
|
66
|
+
if self.__containers[name].status == "removed":
|
|
67
|
+
del self.__containers[name]
|
|
68
|
+
|
|
69
|
+
# Get container from list if needed
|
|
56
70
|
if name not in self.__containers:
|
|
57
71
|
c = self.__get_container_from_list(name)
|
|
58
72
|
if c:
|
|
59
73
|
self.__containers[name] = DockerContainer(self, c)
|
|
74
|
+
|
|
60
75
|
return self.__containers.get(name)
|
|
61
76
|
|
|
62
77
|
def get_all_container_names(self):
|
|
63
|
-
|
|
78
|
+
res = []
|
|
79
|
+
for c in self.__client.containers.list(all=True):
|
|
64
80
|
try:
|
|
65
|
-
|
|
81
|
+
c_name = c.name
|
|
66
82
|
except docker.errors.NotFound:
|
|
67
|
-
|
|
83
|
+
# Container 'c' doesn't exist anymore
|
|
84
|
+
continue
|
|
85
|
+
|
|
86
|
+
res.append(c_name)
|
|
87
|
+
return res
|
|
68
88
|
|
|
69
89
|
def __get_container_from_list(self, name):
|
|
70
90
|
res = None
|
|
71
|
-
for
|
|
91
|
+
for c in self.__client.containers.list(all=True):
|
|
72
92
|
try:
|
|
73
|
-
|
|
74
|
-
if c.name == name:
|
|
75
|
-
res = c
|
|
76
|
-
break
|
|
93
|
+
c_name = c.name
|
|
77
94
|
except docker.errors.NotFound:
|
|
78
|
-
|
|
95
|
+
# Container 'c' doesn't exist anymore
|
|
96
|
+
continue
|
|
97
|
+
|
|
98
|
+
if c_name == name:
|
|
99
|
+
res = c
|
|
100
|
+
break
|
|
79
101
|
return res
|
|
80
102
|
|
|
81
103
|
def has_volume(self, name, in_list = False):
|
|
@@ -133,17 +155,35 @@ class DockerClient(object):
|
|
|
133
155
|
time.sleep(1)
|
|
134
156
|
if container.status == "running":
|
|
135
157
|
break
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
logger.debug(f"Run docker container '{name}' with image '{image}' and arguments {kwargs}{', and wait running status' if wait_running else ''}")
|
|
158
|
+
if container.status != "running":
|
|
159
|
+
raise TechnicalException("Failed to run container of name '{}' (status: {})".format(name, container.status))
|
|
160
|
+
if Tools.do_log(logger, logging.DEBUG):
|
|
161
|
+
logger.debug(f"Run docker container '{name}' with image '{image}' and arguments {kwargs}{', and wait running status' if wait_running else ''}")
|
|
141
162
|
|
|
142
163
|
# Set properties
|
|
143
164
|
container.auto_stop = auto_stop
|
|
144
165
|
|
|
145
166
|
return container
|
|
146
167
|
|
|
168
|
+
def restart_container(self, name, wait_running=True, **kwargs):
|
|
169
|
+
if Tools.do_log(logger, logging.DEBUG):
|
|
170
|
+
logger.debug(f"Restarting docker container '{name}' with arguments {kwargs}{', and waiting running status' if wait_running else ''}")
|
|
171
|
+
container = self.get_container(name)
|
|
172
|
+
if not container:
|
|
173
|
+
raise FunctionalException("Container of name '{}' doesn't exist")
|
|
174
|
+
|
|
175
|
+
container.restart(**kwargs)
|
|
176
|
+
|
|
177
|
+
if wait_running:
|
|
178
|
+
for _ in range(120):
|
|
179
|
+
time.sleep(1)
|
|
180
|
+
if container.status == "running":
|
|
181
|
+
break
|
|
182
|
+
if container.status != "running":
|
|
183
|
+
raise TechnicalException("Failed to restart container of name '{}' (status: {})".format(name, container.status))
|
|
184
|
+
if Tools.do_log(logger, logging.DEBUG):
|
|
185
|
+
logger.debug(f"Restarted docker container '{name}' with arguments {kwargs}{', and waited running status' if wait_running else ''}")
|
|
186
|
+
|
|
147
187
|
def start_container(self, name, wait_running=True, **kwargs):
|
|
148
188
|
if Tools.do_log(logger, logging.DEBUG):
|
|
149
189
|
logger.debug(f"Starting docker container '{name}' with arguments {kwargs}{', and waiting running status' if wait_running else ''}")
|
|
@@ -158,11 +198,10 @@ class DockerClient(object):
|
|
|
158
198
|
time.sleep(1)
|
|
159
199
|
if container.status == "running":
|
|
160
200
|
break
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
logger.debug(f"Started docker container '{name}' with arguments {kwargs}{', and waited running status' if wait_running else ''}")
|
|
201
|
+
if container.status != "running":
|
|
202
|
+
raise TechnicalException("Failed to start container of name '{}' (status: {})".format(name, container.status))
|
|
203
|
+
if Tools.do_log(logger, logging.DEBUG):
|
|
204
|
+
logger.debug(f"Started docker container '{name}' with arguments {kwargs}{', and waited running status' if wait_running else ''}")
|
|
166
205
|
|
|
167
206
|
def stop_container(self, name):
|
|
168
207
|
if Tools.do_log(logger, logging.DEBUG):
|
|
@@ -215,7 +254,7 @@ class DockerContainer(DeleteableObject):
|
|
|
215
254
|
|
|
216
255
|
@property
|
|
217
256
|
def container(self):
|
|
218
|
-
self.__container
|
|
257
|
+
return self.__container
|
|
219
258
|
|
|
220
259
|
@property
|
|
221
260
|
def status(self):
|
|
@@ -233,6 +272,9 @@ class DockerContainer(DeleteableObject):
|
|
|
233
272
|
def auto_stop(self, auto_stop):
|
|
234
273
|
self.__auto_stop = auto_stop
|
|
235
274
|
|
|
275
|
+
def restart(self, **kwargs):
|
|
276
|
+
return self.__container.restart(**kwargs)
|
|
277
|
+
|
|
236
278
|
def start(self, **kwargs):
|
|
237
279
|
return self.__container.start(**kwargs)
|
|
238
280
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
#################################################
|
|
4
|
+
# HolAdo (Holistic Automation do)
|
|
5
|
+
#
|
|
6
|
+
# (C) Copyright 2021-2025 by Eric Klumpp
|
|
7
|
+
#
|
|
8
|
+
# 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:
|
|
9
|
+
#
|
|
10
|
+
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
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.
|
|
13
|
+
#################################################
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from holado.common.context.session_context import SessionContext
|
|
17
|
+
from holado_test.behave.behave import * # @UnusedWildImport
|
|
18
|
+
import logging
|
|
19
|
+
from holado_test.scenario.step_tools import StepTools
|
|
20
|
+
from holado_test.behave.scenario.behave_step_tools import BehaveStepTools
|
|
21
|
+
from holado_value.common.tables.converters.value_table_converter import ValueTableConverter
|
|
22
|
+
from holado_docker.tools.docker_controller.docker_controller_manager import DockerControllerManager
|
|
23
|
+
|
|
24
|
+
logger = logging.getLogger(__name__)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def __get_scenario_context():
|
|
28
|
+
return SessionContext.instance().get_scenario_context()
|
|
29
|
+
|
|
30
|
+
def __get_variable_manager():
|
|
31
|
+
return __get_scenario_context().get_variable_manager()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@Given(r"(?P<var_name>{Variable}) = new Docker Controller client")
|
|
35
|
+
def step_impl(context, var_name):
|
|
36
|
+
var_name = StepTools.evaluate_variable_name(var_name)
|
|
37
|
+
table = BehaveStepTools.get_step_table(context)
|
|
38
|
+
if table is not None:
|
|
39
|
+
kwargs = ValueTableConverter.convert_name_value_table_2_dict(table)
|
|
40
|
+
else:
|
|
41
|
+
kwargs = {}
|
|
42
|
+
|
|
43
|
+
res = DockerControllerManager.new_client(**kwargs)
|
|
44
|
+
|
|
45
|
+
__get_variable_manager().register_variable(var_name, res)
|
|
46
|
+
|
|
47
|
+
@Step(r"(?P<var_name>{Variable}) = list containers \(Docker Controller client: (?P<var_client>{Variable})\)")
|
|
48
|
+
def step_impl(context, var_name, var_client):
|
|
49
|
+
var_name = StepTools.evaluate_variable_name(var_name)
|
|
50
|
+
client = StepTools.evaluate_variable_value(var_client)
|
|
51
|
+
|
|
52
|
+
res = client.get_containers_status()
|
|
53
|
+
|
|
54
|
+
__get_variable_manager().register_variable(var_name, res)
|
|
55
|
+
|
|
56
|
+
@Step(r"(?P<var_name>{Variable}) = get information on container (?P<name>{Str}) \(Docker Controller client: (?P<var_client>{Variable})\)")
|
|
57
|
+
def step_impl(context, var_name, name, var_client):
|
|
58
|
+
var_name = StepTools.evaluate_variable_name(var_name)
|
|
59
|
+
name = StepTools.evaluate_scenario_parameter(name)
|
|
60
|
+
client = StepTools.evaluate_variable_value(var_client)
|
|
61
|
+
|
|
62
|
+
res = client.get_container_info(name)
|
|
63
|
+
|
|
64
|
+
__get_variable_manager().register_variable(var_name, res)
|
|
65
|
+
|
|
66
|
+
@Step(r"restart container (?P<name>{Str}) \(Docker Controller client: (?P<var_client>{Variable})\)")
|
|
67
|
+
def step_impl(context, name, var_client):
|
|
68
|
+
name = StepTools.evaluate_scenario_parameter(name)
|
|
69
|
+
client = StepTools.evaluate_variable_value(var_client)
|
|
70
|
+
|
|
71
|
+
client.restart_container(name)
|
|
72
|
+
|
|
73
|
+
@Step(r"start container (?P<name>{Str}) \(Docker Controller client: (?P<var_client>{Variable})\)")
|
|
74
|
+
def step_impl(context, name, var_client):
|
|
75
|
+
name = StepTools.evaluate_scenario_parameter(name)
|
|
76
|
+
client = StepTools.evaluate_variable_value(var_client)
|
|
77
|
+
|
|
78
|
+
client.start_container(name)
|
|
79
|
+
|
|
80
|
+
@Step(r"stop container (?P<name>{Str}) \(Docker Controller client: (?P<var_client>{Variable})\)")
|
|
81
|
+
def step_impl(context, name, var_client):
|
|
82
|
+
name = StepTools.evaluate_scenario_parameter(name)
|
|
83
|
+
client = StepTools.evaluate_variable_value(var_client)
|
|
84
|
+
|
|
85
|
+
client.stop_container(name)
|
|
86
|
+
|
|
87
|
+
@Step(r"wait container (?P<name>{Str}) \(Docker Controller client: (?P<var_client>{Variable})\)")
|
|
88
|
+
def step_impl(context, name, var_client):
|
|
89
|
+
name = StepTools.evaluate_scenario_parameter(name)
|
|
90
|
+
client = StepTools.evaluate_variable_value(var_client)
|
|
91
|
+
|
|
92
|
+
client.wait_container(name)
|
|
93
|
+
|
|
94
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
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 DockerControllerClient(RestClient):
|
|
21
|
+
|
|
22
|
+
def __init__(self, name, url, headers=None):
|
|
23
|
+
super().__init__(name, url, headers)
|
|
24
|
+
|
|
25
|
+
def get_containers_status(self):
|
|
26
|
+
response = self.get("container")
|
|
27
|
+
return self.response_result(response, status_ok=[200,204])
|
|
28
|
+
|
|
29
|
+
def get_container_info(self, name):
|
|
30
|
+
response = self.get(f"container/{name}")
|
|
31
|
+
return self.response_result(response, status_ok=[200,204])
|
|
32
|
+
|
|
33
|
+
def restart_container(self, name):
|
|
34
|
+
response = self.put(f"container/{name}/restart")
|
|
35
|
+
return self.response_result(response, status_ok=[200,204])
|
|
36
|
+
|
|
37
|
+
def start_container(self, name):
|
|
38
|
+
response = self.put(f"container/{name}/start")
|
|
39
|
+
return self.response_result(response, status_ok=[200,204])
|
|
40
|
+
|
|
41
|
+
def stop_container(self, name):
|
|
42
|
+
response = self.put(f"container/{name}/stop")
|
|
43
|
+
return self.response_result(response, status_ok=[200,204])
|
|
44
|
+
|
|
45
|
+
def wait_container(self, name):
|
|
46
|
+
response = self.put(f"container/{name}/wait")
|
|
47
|
+
return self.response_result(response, status_ok=[200,204])
|
|
48
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
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_core.common.tools.converters.converter import Converter
|
|
16
|
+
import os
|
|
17
|
+
from holado_docker.tools.docker_controller.client.rest.docker_controller_client import DockerControllerClient
|
|
18
|
+
from holado_rest.api.rest.rest_manager import RestManager
|
|
19
|
+
|
|
20
|
+
logger = logging.getLogger(__name__)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class DockerControllerManager(object):
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def new_client(cls, **kwargs):
|
|
27
|
+
if 'name' not in kwargs:
|
|
28
|
+
kwargs['name'] = None
|
|
29
|
+
if 'url' not in kwargs:
|
|
30
|
+
env_use = os.getenv("HOLADO_USE_LOCALHOST", False)
|
|
31
|
+
use_localhost = Converter.is_boolean(env_use) and Converter.to_boolean(env_use)
|
|
32
|
+
|
|
33
|
+
host = "localhost" if use_localhost else os.getenv("HOLADO_DOCKER_CONTROLLER_NAME", "holado_docker_controller")
|
|
34
|
+
port = os.getenv("HOLADO_DOCKER_CONTROLLER_PORT", 8000)
|
|
35
|
+
kwargs['url'] = f"http://{host}:{port}"
|
|
36
|
+
|
|
37
|
+
manager = RestManager(default_client_class=DockerControllerClient)
|
|
38
|
+
res = manager.new_client(**kwargs)
|
|
39
|
+
|
|
40
|
+
return res
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
### Build
|
|
2
|
+
|
|
3
|
+
FROM python:3.12.9-alpine3.21 AS build
|
|
4
|
+
|
|
5
|
+
# Install to build python requirements
|
|
6
|
+
RUN apk update \
|
|
7
|
+
&& apk --no-cache --update add build-base \
|
|
8
|
+
&& apk --update add alpine-sdk \
|
|
9
|
+
&& apk add libffi-dev \
|
|
10
|
+
&& apk add postgresql-dev gcc python3-dev musl-dev \
|
|
11
|
+
&& apk add protobuf-dev
|
|
12
|
+
|
|
13
|
+
# Add tools
|
|
14
|
+
RUN apk --no-cache add bash \
|
|
15
|
+
&& apk --no-cache add nano \
|
|
16
|
+
&& apk --no-cache add curl
|
|
17
|
+
|
|
18
|
+
# Create user
|
|
19
|
+
RUN addgroup appuser \
|
|
20
|
+
&& adduser -G appuser -s /bin/bash -D appuser
|
|
21
|
+
|
|
22
|
+
# Create /code folder
|
|
23
|
+
RUN mkdir /code \
|
|
24
|
+
&& chown -R appuser:appuser /code
|
|
25
|
+
|
|
26
|
+
# Switch to user appuser
|
|
27
|
+
USER appuser
|
|
28
|
+
|
|
29
|
+
# Create python venv and install requirements
|
|
30
|
+
COPY --chown=appuser ./requirements.txt /code/docker_controler/requirements.txt
|
|
31
|
+
WORKDIR /code/docker_controler
|
|
32
|
+
RUN python -m venv /code/env \
|
|
33
|
+
&& source /code/env/bin/activate \
|
|
34
|
+
&& pip install -r requirements.txt
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Runtime
|
|
39
|
+
|
|
40
|
+
FROM python:3.12.9-alpine3.21 AS runtime
|
|
41
|
+
|
|
42
|
+
# Install for python requirements
|
|
43
|
+
#RUN apk update \
|
|
44
|
+
# && apk --no-cache add libstdc++ \
|
|
45
|
+
# && apk --no-cache add postgresql-dev gcc python3-dev musl-dev
|
|
46
|
+
|
|
47
|
+
# Add tools
|
|
48
|
+
RUN apk --no-cache add bash \
|
|
49
|
+
&& apk --no-cache add nano \
|
|
50
|
+
&& apk --no-cache add curl
|
|
51
|
+
|
|
52
|
+
# Create and switch to user appuser as in build
|
|
53
|
+
RUN addgroup appuser \
|
|
54
|
+
&& adduser -G appuser -s /bin/bash -D appuser
|
|
55
|
+
USER appuser
|
|
56
|
+
|
|
57
|
+
# Copy /code from build
|
|
58
|
+
COPY --chown=appuser --from=build /code /code
|
|
59
|
+
|
|
60
|
+
# Copy docker controler sources
|
|
61
|
+
COPY --chown=appuser ./rest /code/docker_controler
|
|
62
|
+
|
|
63
|
+
# Activate permanently python venv
|
|
64
|
+
ENV PATH=/code/env/bin:$PATH
|
|
65
|
+
|
|
66
|
+
WORKDIR /code/docker_controler
|
|
67
|
+
CMD ["sh", "-c", "uvicorn run:app --host 0.0.0.0 --port $HOLADO_DOCKER_CONTROLLER_PORT"]
|
|
68
|
+
|
|
@@ -16,10 +16,10 @@ import logging
|
|
|
16
16
|
logger = logging.getLogger(__name__)
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class
|
|
19
|
+
class DockerControllerService(object):
|
|
20
|
+
pass
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
class DockerControlerServer(object):
|
|
22
|
+
class DockerControllerServer(object):
|
|
23
23
|
|
|
24
24
|
def __init__(self):
|
|
25
25
|
|