parsl 2024.11.4__py3-none-any.whl → 2024.11.18__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.
- parsl/channels/base.py +6 -46
- parsl/channels/errors.py +0 -67
- parsl/channels/local/local.py +5 -56
- parsl/dataflow/dflow.py +1 -58
- parsl/executors/taskvine/manager.py +6 -0
- parsl/executors/taskvine/manager_config.py +5 -0
- parsl/monitoring/db_manager.py +6 -6
- parsl/monitoring/monitoring.py +27 -33
- parsl/monitoring/radios.py +1 -3
- parsl/monitoring/router.py +11 -11
- parsl/providers/cluster_provider.py +1 -4
- parsl/providers/condor/condor.py +1 -4
- parsl/providers/grid_engine/grid_engine.py +1 -4
- parsl/providers/lsf/lsf.py +1 -4
- parsl/providers/pbspro/pbspro.py +1 -4
- parsl/providers/slurm/slurm.py +26 -7
- parsl/providers/torque/torque.py +1 -4
- parsl/tests/configs/user_opts.py +0 -7
- parsl/tests/conftest.py +0 -4
- parsl/tests/test_channels/test_local_channel.py +0 -19
- parsl/tests/test_providers/test_local_provider.py +0 -135
- parsl/tests/test_providers/test_pbspro_template.py +2 -1
- parsl/tests/test_providers/test_slurm_template.py +2 -1
- parsl/version.py +1 -1
- {parsl-2024.11.4.dist-info → parsl-2024.11.18.dist-info}/METADATA +2 -8
- {parsl-2024.11.4.dist-info → parsl-2024.11.18.dist-info}/RECORD +34 -45
- {parsl-2024.11.4.dist-info → parsl-2024.11.18.dist-info}/WHEEL +1 -1
- parsl/channels/oauth_ssh/__init__.py +0 -0
- parsl/channels/oauth_ssh/oauth_ssh.py +0 -119
- parsl/channels/ssh/__init__.py +0 -0
- parsl/channels/ssh/ssh.py +0 -295
- parsl/channels/ssh_il/__init__.py +0 -0
- parsl/channels/ssh_il/ssh_il.py +0 -85
- parsl/providers/ad_hoc/__init__.py +0 -0
- parsl/providers/ad_hoc/ad_hoc.py +0 -252
- parsl/tests/configs/local_adhoc.py +0 -18
- parsl/tests/sites/test_local_adhoc.py +0 -62
- parsl/tests/test_channels/test_dfk_close.py +0 -26
- {parsl-2024.11.4.data → parsl-2024.11.18.data}/scripts/exec_parsl_function.py +0 -0
- {parsl-2024.11.4.data → parsl-2024.11.18.data}/scripts/interchange.py +0 -0
- {parsl-2024.11.4.data → parsl-2024.11.18.data}/scripts/parsl_coprocess.py +0 -0
- {parsl-2024.11.4.data → parsl-2024.11.18.data}/scripts/process_worker_pool.py +0 -0
- {parsl-2024.11.4.dist-info → parsl-2024.11.18.dist-info}/LICENSE +0 -0
- {parsl-2024.11.4.dist-info → parsl-2024.11.18.dist-info}/entry_points.txt +0 -0
- {parsl-2024.11.4.dist-info → parsl-2024.11.18.dist-info}/top_level.txt +0 -0
@@ -8,7 +8,7 @@ parsl/multiprocessing.py,sha256=MyaEcEq-Qf860u7V98u-PZrPNdtzOZL_NW6EhIJnmfQ,1937
|
|
8
8
|
parsl/process_loggers.py,sha256=uQ7Gd0W72Jz7rrcYlOMfLsAEhkRltxXJL2MgdduJjEw,1136
|
9
9
|
parsl/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
parsl/utils.py,sha256=rMLKeadEsQ9jGwm4ogqiLIXPS3zOAyfznQJXVkJSY8E,13107
|
11
|
-
parsl/version.py,sha256=
|
11
|
+
parsl/version.py,sha256=QWFxa3haTzr3-mjJsN5_Ug8jmK_2jH7q_8R_8J0nGFw,131
|
12
12
|
parsl/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
parsl/app/app.py,sha256=0gbM4AH2OtFOLsv07I5nglpElcwMSOi-FzdZZfrk7So,8532
|
14
14
|
parsl/app/bash.py,sha256=jm2AvePlCT9DZR7H_4ANDWxatp5dN_22FUlT_gWhZ-g,5528
|
@@ -18,16 +18,10 @@ parsl/app/python.py,sha256=0hrz2BppVOwwNfh5hnoP70Yv56gSRkIoT-fP9XNb4v4,2331
|
|
18
18
|
parsl/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
19
|
parsl/benchmark/perf.py,sha256=kKXefDozWXSJKSNA7qdfUgEoacA2-R9kSZcI2YvZ5uE,3096
|
20
20
|
parsl/channels/__init__.py,sha256=OEZcuNBOxUwmzrHMZOuPvkw4kUxrbJDA99crDk61O90,131
|
21
|
-
parsl/channels/base.py,sha256=
|
22
|
-
parsl/channels/errors.py,sha256=
|
21
|
+
parsl/channels/base.py,sha256=k015EJ96C_nhzfH-pAs4EeEmIi0y_BqkYYl06PDrCeQ,2658
|
22
|
+
parsl/channels/errors.py,sha256=AgyPwYjemBh_KjI3P-gXMgDgbvLZUMC2Wf284S_vQ6c,802
|
23
23
|
parsl/channels/local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
|
-
parsl/channels/local/local.py,sha256=
|
25
|
-
parsl/channels/oauth_ssh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
|
-
parsl/channels/oauth_ssh/oauth_ssh.py,sha256=6pj3LQAX89p5Lc8NL1Llq2_noi8GS8BItCuRtDp-iCA,3823
|
27
|
-
parsl/channels/ssh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
|
-
parsl/channels/ssh/ssh.py,sha256=y21at_99Cjo2YNC110bf5dbNsOvAsUA-843LyOPkJH8,10156
|
29
|
-
parsl/channels/ssh_il/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
|
-
parsl/channels/ssh_il/ssh_il.py,sha256=acOXJyqCmgC2nl7zrO_uEu3GpJZMN2l-Af5XfmNMLRs,2783
|
24
|
+
parsl/channels/local/local.py,sha256=vtj3kuPvDfUxCjW6RcEmdy2PFDJ3Vz56k6V8-xt_0V4,3305
|
31
25
|
parsl/concurrent/__init__.py,sha256=TvIVceJYaJAsxedNBF3Vdo9lEQNHH_j3uxJv0zUjP7w,3288
|
32
26
|
parsl/configs/ASPIRE1.py,sha256=eKnmz0QD3V522emtXMjS6Ppeooe5lzcBgCE6cxunbYY,1718
|
33
27
|
parsl/configs/Azure.py,sha256=CJms3xWmdb-S3CksbHrPF2TfMxJC5I0faqUKCOzVg0k,1268
|
@@ -62,7 +56,7 @@ parsl/data_provider/staging.py,sha256=ZDZuuFg38pjUStegKPcvPsfGp3iMeReMzfU6DSwtJj
|
|
62
56
|
parsl/data_provider/zip.py,sha256=S4kVuH9lxAegRURYbvIUR7EYYBOccyslaqyCrVWUBhw,4497
|
63
57
|
parsl/dataflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
64
58
|
parsl/dataflow/dependency_resolvers.py,sha256=Om8Dgh7a0ZwgXAc6TlhxLSzvxXHDlNNV1aBNiD3JTNY,3325
|
65
|
-
parsl/dataflow/dflow.py,sha256=
|
59
|
+
parsl/dataflow/dflow.py,sha256=_EsavFW9vLnWkqTKuATSg-TGv0Cvnu5xnCLWWZEsXeA,65342
|
66
60
|
parsl/dataflow/errors.py,sha256=9SxVhIJY_53FQx8x4OU8UA8nd7lvUbDllH7KfMXpYaY,2177
|
67
61
|
parsl/dataflow/futures.py,sha256=08LuP-HFiHBIZmeKCjlsazw_WpQ5fwevrU2_WbidkYw,6080
|
68
62
|
parsl/dataflow/memoization.py,sha256=l9uw1Bu50GucBF70M5relpGKFkE4dIM9T3R1KrxW0v0,9583
|
@@ -101,8 +95,8 @@ parsl/executors/taskvine/exec_parsl_function.py,sha256=ftGdJU78lKPPkphSHlEi4rj16
|
|
101
95
|
parsl/executors/taskvine/executor.py,sha256=y1x44p_GRlaOqLr0J92ungU3CuDeull6MW-lEedzu2M,31164
|
102
96
|
parsl/executors/taskvine/factory.py,sha256=rWpEoFphLzqO3HEYyDEbQa14iyvgkdZg7hLZuaY39gQ,2638
|
103
97
|
parsl/executors/taskvine/factory_config.py,sha256=AbE2fN2snrF5ITYrrS4DnGn2XkJHUFr_17DYHDHIwq0,3693
|
104
|
-
parsl/executors/taskvine/manager.py,sha256=
|
105
|
-
parsl/executors/taskvine/manager_config.py,sha256=
|
98
|
+
parsl/executors/taskvine/manager.py,sha256=SUi5mqqMm_rnkBLrZtTQe7RiHqWDn1oOejQscYzfwAU,25797
|
99
|
+
parsl/executors/taskvine/manager_config.py,sha256=Lf3dxcDR5Jo97Odv4JFXfuRLclVX-xQP_QXQnS5OVtk,7643
|
106
100
|
parsl/executors/taskvine/utils.py,sha256=iSrIogeiauL3UNy_9tiZp1cBSNn6fIJkMYQRVi1n_r8,4156
|
107
101
|
parsl/executors/workqueue/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
108
102
|
parsl/executors/workqueue/errors.py,sha256=XO2naYhAsHHyiOBH6hpObg3mPNDmvMoFqErsj0-v7jc,541
|
@@ -121,13 +115,13 @@ parsl/launchers/base.py,sha256=CblcvPTJiu-MNLWaRtFe29SZQ0BpTOlaY8CGcHdlHIE,538
|
|
121
115
|
parsl/launchers/errors.py,sha256=8YMV_CHpBNVa4eXkGE4x5DaFQlZkDCRCHmBktYcY6TA,467
|
122
116
|
parsl/launchers/launchers.py,sha256=cQsNsHuCOL_nQTjPXf0--YsgsDoMoJ77bO1Wt4ncLjs,15134
|
123
117
|
parsl/monitoring/__init__.py,sha256=0ywNz6i0lM1xo_7_BIxhETDGeVd2C_0wwD7qgeaMR4c,83
|
124
|
-
parsl/monitoring/db_manager.py,sha256=
|
118
|
+
parsl/monitoring/db_manager.py,sha256=D8lrngFGxbFhyWVkF8JZRTbGxRYmd3SY6_zu8KV0FJs,33330
|
125
119
|
parsl/monitoring/errors.py,sha256=D6jpYzEzp0d6FmVKGqhvjAxr4ztZfJX2s-aXemH9bBU,148
|
126
120
|
parsl/monitoring/message_type.py,sha256=Khn88afNxcOIciKiCK4GLnn90I5BlRTiOL3zK-P07yQ,401
|
127
|
-
parsl/monitoring/monitoring.py,sha256=
|
128
|
-
parsl/monitoring/radios.py,sha256=
|
121
|
+
parsl/monitoring/monitoring.py,sha256=8uy-7ua3FyTWfGgxGavCzM9_r56gCJ-KLpUysAqFI5Q,12671
|
122
|
+
parsl/monitoring/radios.py,sha256=l-a7GiWRBR3OaeLeHD_gBo2lMrqpjiQjLNaPTCr29ck,6021
|
129
123
|
parsl/monitoring/remote.py,sha256=WfSqQWYPMx3gT6u4T171ngMPzt8ialR1jRSsrD-4O24,13619
|
130
|
-
parsl/monitoring/router.py,sha256=
|
124
|
+
parsl/monitoring/router.py,sha256=VvzzsxLpwSSn0VUZOJtf0uvP9Kcr1znDAR1_MoHdAeU,9208
|
131
125
|
parsl/monitoring/types.py,sha256=oOCrzv-ab-_rv4pb8o58Sdb8G_RGp1aZriRbdf9zBEk,339
|
132
126
|
parsl/monitoring/queries/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
133
127
|
parsl/monitoring/queries/pandas.py,sha256=0Z2r0rjTKCemf0eaDkF1irvVHn5g7KC5SYETvQPRxwU,2232
|
@@ -154,10 +148,8 @@ parsl/monitoring/visualization/templates/workflow.html,sha256=QCSHAPHK_2C3gNcZ3N
|
|
154
148
|
parsl/monitoring/visualization/templates/workflows_summary.html,sha256=7brKKNsxcT4z-l10BKJlgTxQtGL033ZS5jEDdSmsPEE,891
|
155
149
|
parsl/providers/__init__.py,sha256=aUvIDlvYUXFa66YhqqUFyTg6dd4Si3oSmsZUPNw0oOE,991
|
156
150
|
parsl/providers/base.py,sha256=-yAfK8zNc2LCX8GFyRJ4sN5ekL_gqftJ3QHtLSWyrTw,5264
|
157
|
-
parsl/providers/cluster_provider.py,sha256=
|
151
|
+
parsl/providers/cluster_provider.py,sha256=oAvrKW4jsBjouURppDkZms93Lb_IiE1frII_3GH5yiw,4472
|
158
152
|
parsl/providers/errors.py,sha256=_CbCmpguzcA81SC5dPLkDZs1AShzacGKttNhuzNBeiQ,2270
|
159
|
-
parsl/providers/ad_hoc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
160
|
-
parsl/providers/ad_hoc/ad_hoc.py,sha256=NPZRJnVYT7IB2TCLThofcB7g0WZqgT_N0hDs3K86zhE,8466
|
161
153
|
parsl/providers/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
162
154
|
parsl/providers/aws/aws.py,sha256=nS899gamCAhiIY-4zwaEToa7Om73PrAz4dvX5YSEkUQ,28985
|
163
155
|
parsl/providers/aws/template.py,sha256=N7OEpp7YP6CK5RUtLOwFnks7AE2UG5hHXddh8FF0BFs,347
|
@@ -165,12 +157,12 @@ parsl/providers/azure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
165
157
|
parsl/providers/azure/azure.py,sha256=eJKJ7Eeq9iUSAlkTczIDyM-OPyNtwnoZzdUbC0fgvDU,18372
|
166
158
|
parsl/providers/azure/template.py,sha256=JJNW8zr30uYcfK-RqQX2FHZVWrxvYE8E6VbaYuAFEqw,347
|
167
159
|
parsl/providers/condor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
168
|
-
parsl/providers/condor/condor.py,sha256=
|
160
|
+
parsl/providers/condor/condor.py,sha256=2e_64b5N6fjVCHdVXL6NhL6EoPohH-qZE80bhvpNty8,12981
|
169
161
|
parsl/providers/condor/template.py,sha256=Jm2ezWo7ERMNPFvjLLEriaP5n5kD0vQBnikn9kpUTdU,960
|
170
162
|
parsl/providers/googlecloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
171
163
|
parsl/providers/googlecloud/googlecloud.py,sha256=xq269Y6Fj8DZabq5I5HtMhZw-3vNKXgisqalZhuHm8o,8007
|
172
164
|
parsl/providers/grid_engine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
173
|
-
parsl/providers/grid_engine/grid_engine.py,sha256=
|
165
|
+
parsl/providers/grid_engine/grid_engine.py,sha256=7eOMsCu13pLFoAU8MbxACeVg3QliFl8fDojEjGuo0vM,8369
|
174
166
|
parsl/providers/grid_engine/template.py,sha256=a7iViKr8LXcFTPmsf_qQeVK5o_RekOAIlUOF0X1q-2M,273
|
175
167
|
parsl/providers/kubernetes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
176
168
|
parsl/providers/kubernetes/kube.py,sha256=ghOKM1gY1UjzMzWAheKsG15u8oUzRkXUyjtpqjkquIo,14952
|
@@ -178,17 +170,17 @@ parsl/providers/kubernetes/template.py,sha256=VsRz6cmNaII-y4OdMT6sCwzQy95SJX6NMB
|
|
178
170
|
parsl/providers/local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
179
171
|
parsl/providers/local/local.py,sha256=pTEcl9NnjRcL8FHcMeMEtJj1IXiAOxZ2Cih97Q5jDPY,11388
|
180
172
|
parsl/providers/lsf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
181
|
-
parsl/providers/lsf/lsf.py,sha256=
|
173
|
+
parsl/providers/lsf/lsf.py,sha256=ZFYP0jIp-p8q7cXC67Vl77MlO93b-UYKlKaJhYDRDbQ,11306
|
182
174
|
parsl/providers/lsf/template.py,sha256=leQ_TpXv7ePMzbHfLaWvqMR0VORxlp-hjX5JxtkcwwU,269
|
183
175
|
parsl/providers/pbspro/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
184
|
-
parsl/providers/pbspro/pbspro.py,sha256=
|
176
|
+
parsl/providers/pbspro/pbspro.py,sha256=luPUxBA0QMax7tKICsmesESQcOhcGnLi6GUlfGeO5pQ,8598
|
185
177
|
parsl/providers/pbspro/template.py,sha256=y-Dher--t5Eury-c7cAuSZs9FEUXWiruFUI07v81558,315
|
186
178
|
parsl/providers/slurm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
187
|
-
parsl/providers/slurm/slurm.py,sha256=
|
179
|
+
parsl/providers/slurm/slurm.py,sha256=6tnDB2rLNdnY_FGtmNg6tPSdU9dP5DuWBg4GGEMTPYI,16442
|
188
180
|
parsl/providers/slurm/template.py,sha256=KpgBEFMc1ps-38jdrk13xUGx9TCivu-iF90jgQDdiEQ,315
|
189
181
|
parsl/providers/torque/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
190
182
|
parsl/providers/torque/template.py,sha256=4qfc2gmlEhRCAD7erFDOs4prJQ43I8s4E8DSUSVQx3A,358
|
191
|
-
parsl/providers/torque/torque.py,sha256=
|
183
|
+
parsl/providers/torque/torque.py,sha256=RzaoOC5Gql3qxixBM9AzY2oVmtPBD06IGigcPls01-Y,9301
|
192
184
|
parsl/serialize/__init__.py,sha256=-tQNsFsHTfWxZL6iydt08S9t8QP2rk9Q6RKnXYwbkfY,406
|
193
185
|
parsl/serialize/base.py,sha256=5GyJRr3PQohp5Zv9YQUEyes61mfUK7wTctTaXITYpSQ,1082
|
194
186
|
parsl/serialize/concretes.py,sha256=JPWmltkm-XH2S22ugXCYWYmxwukCUEXWYKzPkKXJO60,1911
|
@@ -197,7 +189,7 @@ parsl/serialize/facade.py,sha256=SpKGSpI8PQb3hhxuKRJUYoQoq284t5np9ouTpogKmtU,679
|
|
197
189
|
parsl/serialize/proxystore.py,sha256=o-ha9QAvVhbN8y9S1itk3W0O75eyHYZw2AvB2xu5_Lg,1624
|
198
190
|
parsl/tests/__init__.py,sha256=VTtJzOzz_x6fWNh8IOnsgFqVbdiJShi2AZH21mcmID4,204
|
199
191
|
parsl/tests/callables_helper.py,sha256=ceP1YYsNtrZgKT6MAIvpgdccEjQ_CpFEOnZBGHKGOx0,30
|
200
|
-
parsl/tests/conftest.py,sha256=
|
192
|
+
parsl/tests/conftest.py,sha256=njhszRuR15nZDufKF2S90lgkL8bSnQY4vH7dckx9q24,14851
|
201
193
|
parsl/tests/test_aalst_patterns.py,sha256=lNIxb7nIgh1yX7hR2fr_ck_mxYJxx8ASKK9zHUVqPno,9614
|
202
194
|
parsl/tests/test_callables.py,sha256=97vrIF1_hfDGd81FM1bhR6FemZMWFcALrH6pVHMTCt8,1974
|
203
195
|
parsl/tests/test_curvezmq.py,sha256=yyhlS4vmaZdMitiySoy4l_ih9H1bsPiN-tMdwIh3H20,12431
|
@@ -219,7 +211,6 @@ parsl/tests/configs/htex_local.py,sha256=o7Lxz1nErHpLNcH7vEEy9KyCNiEf6r3gpCrBmdQ
|
|
219
211
|
parsl/tests/configs/htex_local_alternate.py,sha256=JJN4OASr-RXsXuLGVS3ciCrcczf8VVzbuTDWn9Wu0g4,2577
|
220
212
|
parsl/tests/configs/htex_local_intask_staging.py,sha256=E7uZD_AIAbxavkw4VrVXlGG7k42YJZv2qluAO-W0VvI,886
|
221
213
|
parsl/tests/configs/htex_local_rsync_staging.py,sha256=cqTRcHLjqYnOL07Lb8ecTzQuzP-dWDpWdKhgtTwo-fU,940
|
222
|
-
parsl/tests/configs/local_adhoc.py,sha256=jlyDwwIm0uVuyDgKZCb3wa3k0IaqcYT0ErMhu_0N26s,509
|
223
214
|
parsl/tests/configs/local_radical.py,sha256=C70I6ssfaaHEY1MMCC77izpp6sdANALH-P2mDR2msN0,417
|
224
215
|
parsl/tests/configs/local_radical_mpi.py,sha256=5OabeXXJPE0fyiA1AlGcQYoPRjQRk-HNA-xPLTFyAr4,532
|
225
216
|
parsl/tests/configs/local_threads.py,sha256=oEnQSlom_JMLFX9_Ln49JAfOP3nSMbw8gTaDJo_NYfo,202
|
@@ -239,7 +230,7 @@ parsl/tests/configs/petrelkube.py,sha256=uUxrZrD_cF-_t6ytlRA_MUtw8RQbpW0CmNRbw3m
|
|
239
230
|
parsl/tests/configs/slurm_local.py,sha256=jvrNIgNUtjp0OE4HONxa7xSpDa9LQNWtav4BXpF_PY4,821
|
240
231
|
parsl/tests/configs/summit.py,sha256=0LbuTVmc8nl2eGiqAayhV0RCx0pg5kUpYhz9LvTFhDo,1378
|
241
232
|
parsl/tests/configs/taskvine_ex.py,sha256=Nsovxtb59q6ta2opGrl7ufWcavYQtzSPrscLmaLYkUU,472
|
242
|
-
parsl/tests/configs/user_opts.py,sha256=
|
233
|
+
parsl/tests/configs/user_opts.py,sha256=JcEQr1emjyTdmVDddcSGbx9df__0C2m7X3vGNbdKnpo,5858
|
243
234
|
parsl/tests/configs/workqueue_ex.py,sha256=c-vKc1MHmU9IyIyZGuxIPKfg93lKBeNnEoWBKjoIRcg,389
|
244
235
|
parsl/tests/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
245
236
|
parsl/tests/integration/latency.py,sha256=kWYkXsbnVnpwS6rHsdm7a1FsUOJWHhuXDsRPlApw6iE,3289
|
@@ -275,7 +266,6 @@ parsl/tests/sites/test_concurrent.py,sha256=ybHOnIsRyYs2tFPggv2ivRVoqH8Ts4PTEvb4
|
|
275
266
|
parsl/tests/sites/test_dynamic_executor.py,sha256=PGiQVizSlXnYI9C2OoWpiqcUsKE61HPyYu7XQ_QXWjE,1960
|
276
267
|
parsl/tests/sites/test_ec2.py,sha256=G5dCn3255UECY7vp2C0XzTaQpnFkn-qBqQZ0gTmNZEg,1761
|
277
268
|
parsl/tests/sites/test_launchers.py,sha256=dhuL5M2e1V7XXHg89U1ytFqJamWJLp44Gf8ZOw3m6UI,334
|
278
|
-
parsl/tests/sites/test_local_adhoc.py,sha256=Kdgm82pQmle_D_-TBZvW9tjHjFbzR4zHhkyYvOTlKoE,1267
|
279
269
|
parsl/tests/sites/test_worker_info.py,sha256=TKRHUCDUHa_SUHXnnqNp7n1AiN2gpGJrTg_Ls0iyhPk,1360
|
280
270
|
parsl/tests/sites/test_mpi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
281
271
|
parsl/tests/test_bash_apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -293,9 +283,8 @@ parsl/tests/test_bash_apps/test_pipeline.py,sha256=1kQDD8-Dh5H9SKFcKHzN_mSrdxAV_
|
|
293
283
|
parsl/tests/test_bash_apps/test_std_uri.py,sha256=CvAt8BUhNl2pA5chq9YyhkD6eo2IUH6PjWfe3SQ-YRU,3752
|
294
284
|
parsl/tests/test_bash_apps/test_stdout.py,sha256=lNBzCJGst0IhKaSl8CM8-mTJ5eaK7hTlZ8gY-M2TDBU,3244
|
295
285
|
parsl/tests/test_channels/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
296
|
-
parsl/tests/test_channels/test_dfk_close.py,sha256=n7IF3Ud_vejg0VNRnvEgxCLmwMvPVvLbXvJdw-Mz_lw,628
|
297
286
|
parsl/tests/test_channels/test_large_output.py,sha256=PGeNSW_sN5mR7KF1hVL2CPfktydYxo4oNz1wVQ-ENN0,595
|
298
|
-
parsl/tests/test_channels/test_local_channel.py,sha256=
|
287
|
+
parsl/tests/test_channels/test_local_channel.py,sha256=ojMvMbUMFe6OsrrcYYaqytGeKPQjx291O5MTn5X7-Xc,431
|
299
288
|
parsl/tests/test_checkpointing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
300
289
|
parsl/tests/test_checkpointing/test_periodic.py,sha256=nfMgrG7sZ8rkMu6iOHS6lp_iTU4IsOyQLQ2Gur_FMmE,1509
|
301
290
|
parsl/tests/test_checkpointing/test_python_checkpoint_1.py,sha256=k7_Zy4CV9OQt4ORYFCdyX53c4B0YPiwEIi35LhvLB2w,746
|
@@ -360,10 +349,10 @@ parsl/tests/test_mpi_apps/test_mpiex.py,sha256=mlFdHK3A1B6NsEhxTQQX8lhs9qVza36FM
|
|
360
349
|
parsl/tests/test_mpi_apps/test_resource_spec.py,sha256=5k6HM2jtb6sa7jetpI-Tl1nPQiN33VLaM7YT10c307E,3756
|
361
350
|
parsl/tests/test_providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
362
351
|
parsl/tests/test_providers/test_kubernetes_provider.py,sha256=AzCHfNz2HJwjP9BfxKH-XPaTHJCLXFErDMlQ_Ir8qRU,3861
|
363
|
-
parsl/tests/test_providers/test_local_provider.py,sha256=
|
364
|
-
parsl/tests/test_providers/test_pbspro_template.py,sha256
|
352
|
+
parsl/tests/test_providers/test_local_provider.py,sha256=3gTqz49oGWGOc7PfivFFb7Sf1QKvgPHnbX_rpJePbQE,2150
|
353
|
+
parsl/tests/test_providers/test_pbspro_template.py,sha256=003B1rbgZsP1XQC8Iyn08sqMvnZ-xe3E9uBvgdTUD4s,879
|
365
354
|
parsl/tests/test_providers/test_slurm_instantiate.py,sha256=eW3pEZRIzZO1-eKFrBc7N5uoN5otwghgbqut74Kyqoc,500
|
366
|
-
parsl/tests/test_providers/test_slurm_template.py,sha256=
|
355
|
+
parsl/tests/test_providers/test_slurm_template.py,sha256=SL0IK-WopeOjlqk2DAqraP56kGIjSK9YQcedoG1GRKI,925
|
367
356
|
parsl/tests/test_providers/test_submiterror_deprecation.py,sha256=m1L8dV_xrbjQsNv-qdj5vLpsYBxX-C4aJxurqwZymio,502
|
368
357
|
parsl/tests/test_python_apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
369
358
|
parsl/tests/test_python_apps/test_arg_input_types.py,sha256=JXpfHiu8lr9BN6u1OzqFvGwBhxzsGTPMewHx6Wdo-HI,670
|
@@ -459,13 +448,13 @@ parsl/usage_tracking/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
459
448
|
parsl/usage_tracking/api.py,sha256=iaCY58Dc5J4UM7_dJzEEs871P1p1HdxBMtNGyVdzc9g,1821
|
460
449
|
parsl/usage_tracking/levels.py,sha256=xbfzYEsd55KiZJ-mzNgPebvOH4rRHum04hROzEf41tU,291
|
461
450
|
parsl/usage_tracking/usage.py,sha256=tcoZ2OUjsQVakG8Uu9_HFuEdzpSHyt4JarSRcLGnSMw,8918
|
462
|
-
parsl-2024.11.
|
463
|
-
parsl-2024.11.
|
464
|
-
parsl-2024.11.
|
465
|
-
parsl-2024.11.
|
466
|
-
parsl-2024.11.
|
467
|
-
parsl-2024.11.
|
468
|
-
parsl-2024.11.
|
469
|
-
parsl-2024.11.
|
470
|
-
parsl-2024.11.
|
471
|
-
parsl-2024.11.
|
451
|
+
parsl-2024.11.18.data/scripts/exec_parsl_function.py,sha256=RUkJ4JSJAjr7YyRZ58zhMdg8cR5dVV9odUl3AuzNf3k,7802
|
452
|
+
parsl-2024.11.18.data/scripts/interchange.py,sha256=6jsxpVgtruFtE_0nMHAZYVF1gvoALBCkprEbUb_YQgg,30098
|
453
|
+
parsl-2024.11.18.data/scripts/parsl_coprocess.py,sha256=zrVjEqQvFOHxsLufPi00xzMONagjVwLZbavPM7bbjK4,5722
|
454
|
+
parsl-2024.11.18.data/scripts/process_worker_pool.py,sha256=Qed0dgUa6375UgWm5h196V0FBdeTdW6iowG9RYDNG9Y,42920
|
455
|
+
parsl-2024.11.18.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
456
|
+
parsl-2024.11.18.dist-info/METADATA,sha256=xtjfEiUVaXoAAPKqrjCeSEJ6z5eEcfxWjRQgic18iqQ,3848
|
457
|
+
parsl-2024.11.18.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
|
458
|
+
parsl-2024.11.18.dist-info/entry_points.txt,sha256=XqnsWDYoEcLbsMcpnYGKLEnSBmaIe1YoM5YsBdJG2tI,176
|
459
|
+
parsl-2024.11.18.dist-info/top_level.txt,sha256=PIheYoUFQtF2icLsgOykgU-Cjuwr2Oi6On2jo5RYgRM,6
|
460
|
+
parsl-2024.11.18.dist-info/RECORD,,
|
File without changes
|
@@ -1,119 +0,0 @@
|
|
1
|
-
import logging
|
2
|
-
import socket
|
3
|
-
|
4
|
-
from parsl.channels.ssh.ssh import DeprecatedSSHChannel
|
5
|
-
from parsl.errors import OptionalModuleMissing
|
6
|
-
|
7
|
-
try:
|
8
|
-
import paramiko
|
9
|
-
_ssh_enabled = True
|
10
|
-
except (ImportError, NameError, FileNotFoundError):
|
11
|
-
_ssh_enabled = False
|
12
|
-
|
13
|
-
try:
|
14
|
-
from oauth_ssh.oauth_ssh_token import find_access_token
|
15
|
-
from oauth_ssh.ssh_service import SSHService
|
16
|
-
_oauth_ssh_enabled = True
|
17
|
-
except (ImportError, NameError):
|
18
|
-
_oauth_ssh_enabled = False
|
19
|
-
|
20
|
-
|
21
|
-
logger = logging.getLogger(__name__)
|
22
|
-
|
23
|
-
|
24
|
-
class DeprecatedOAuthSSHChannel(DeprecatedSSHChannel):
|
25
|
-
"""SSH persistent channel. This enables remote execution on sites
|
26
|
-
accessible via ssh. This channel uses Globus based OAuth tokens for authentication.
|
27
|
-
"""
|
28
|
-
|
29
|
-
def __init__(self, hostname, username=None, script_dir=None, envs=None, port=22):
|
30
|
-
''' Initialize a persistent connection to the remote system.
|
31
|
-
We should know at this point whether ssh connectivity is possible
|
32
|
-
|
33
|
-
Args:
|
34
|
-
- hostname (String) : Hostname
|
35
|
-
|
36
|
-
KWargs:
|
37
|
-
- username (string) : Username on remote system
|
38
|
-
- script_dir (string) : Full path to a script dir where
|
39
|
-
generated scripts could be sent to.
|
40
|
-
- envs (dict) : A dictionary of env variables to be set when executing commands
|
41
|
-
- port (int) : Port at which the SSHService is running
|
42
|
-
|
43
|
-
Raises:
|
44
|
-
'''
|
45
|
-
if not _ssh_enabled:
|
46
|
-
raise OptionalModuleMissing(['ssh'],
|
47
|
-
"OauthSSHChannel requires the ssh module and config.")
|
48
|
-
|
49
|
-
if not _oauth_ssh_enabled:
|
50
|
-
raise OptionalModuleMissing(['oauth_ssh'],
|
51
|
-
"OauthSSHChannel requires oauth_ssh module and config.")
|
52
|
-
|
53
|
-
self.hostname = hostname
|
54
|
-
self.username = username
|
55
|
-
self.script_dir = script_dir
|
56
|
-
self.port = port
|
57
|
-
self.envs = {}
|
58
|
-
if envs is not None:
|
59
|
-
self.envs = envs
|
60
|
-
|
61
|
-
try:
|
62
|
-
access_token = find_access_token(hostname)
|
63
|
-
except Exception:
|
64
|
-
logger.exception("Failed to find the access token for {}".format(hostname))
|
65
|
-
raise
|
66
|
-
|
67
|
-
try:
|
68
|
-
self.service = SSHService(hostname, port)
|
69
|
-
self.transport = self.service.login(access_token, username)
|
70
|
-
|
71
|
-
except Exception:
|
72
|
-
logger.exception("Caught an exception in the OAuth authentication step with {}".format(hostname))
|
73
|
-
raise
|
74
|
-
|
75
|
-
self.sftp_client = paramiko.SFTPClient.from_transport(self.transport)
|
76
|
-
|
77
|
-
def execute_wait(self, cmd, walltime=60, envs={}):
|
78
|
-
''' Synchronously execute a commandline string on the shell.
|
79
|
-
|
80
|
-
This command does *NOT* honor walltime currently.
|
81
|
-
|
82
|
-
Args:
|
83
|
-
- cmd (string) : Commandline string to execute
|
84
|
-
|
85
|
-
Kwargs:
|
86
|
-
- walltime (int) : walltime in seconds
|
87
|
-
- envs (dict) : Dictionary of env variables
|
88
|
-
|
89
|
-
Returns:
|
90
|
-
- retcode : Return code from the execution, -1 on fail
|
91
|
-
- stdout : stdout string
|
92
|
-
- stderr : stderr string
|
93
|
-
|
94
|
-
Raises:
|
95
|
-
None.
|
96
|
-
'''
|
97
|
-
|
98
|
-
session = self.transport.open_session()
|
99
|
-
session.setblocking(0)
|
100
|
-
|
101
|
-
nbytes = 1024
|
102
|
-
session.exec_command(self.prepend_envs(cmd, envs))
|
103
|
-
session.settimeout(walltime)
|
104
|
-
|
105
|
-
try:
|
106
|
-
# Wait until command is executed
|
107
|
-
exit_status = session.recv_exit_status()
|
108
|
-
|
109
|
-
stdout = session.recv(nbytes).decode('utf-8')
|
110
|
-
stderr = session.recv_stderr(nbytes).decode('utf-8')
|
111
|
-
|
112
|
-
except socket.timeout:
|
113
|
-
logger.exception("Command failed to execute without timeout limit on {}".format(self))
|
114
|
-
raise
|
115
|
-
|
116
|
-
return exit_status, stdout, stderr
|
117
|
-
|
118
|
-
def close(self) -> None:
|
119
|
-
self.transport.close()
|
parsl/channels/ssh/__init__.py
DELETED
File without changes
|
parsl/channels/ssh/ssh.py
DELETED
@@ -1,295 +0,0 @@
|
|
1
|
-
import errno
|
2
|
-
import logging
|
3
|
-
import os
|
4
|
-
|
5
|
-
from parsl.channels.base import Channel
|
6
|
-
from parsl.channels.errors import (
|
7
|
-
AuthException,
|
8
|
-
BadHostKeyException,
|
9
|
-
BadPermsScriptPath,
|
10
|
-
BadScriptPath,
|
11
|
-
FileCopyException,
|
12
|
-
SSHException,
|
13
|
-
)
|
14
|
-
from parsl.errors import OptionalModuleMissing
|
15
|
-
from parsl.utils import RepresentationMixin
|
16
|
-
|
17
|
-
try:
|
18
|
-
import paramiko
|
19
|
-
_ssh_enabled = True
|
20
|
-
except (ImportError, NameError, FileNotFoundError):
|
21
|
-
_ssh_enabled = False
|
22
|
-
|
23
|
-
|
24
|
-
logger = logging.getLogger(__name__)
|
25
|
-
|
26
|
-
|
27
|
-
if _ssh_enabled:
|
28
|
-
class NoAuthSSHClient(paramiko.SSHClient):
|
29
|
-
def _auth(self, username, *args):
|
30
|
-
self._transport.auth_none(username)
|
31
|
-
return
|
32
|
-
|
33
|
-
|
34
|
-
class DeprecatedSSHChannel(Channel, RepresentationMixin):
|
35
|
-
''' SSH persistent channel. This enables remote execution on sites
|
36
|
-
accessible via ssh. It is assumed that the user has setup host keys
|
37
|
-
so as to ssh to the remote host. Which goes to say that the following
|
38
|
-
test on the commandline should work:
|
39
|
-
|
40
|
-
>>> ssh <username>@<hostname>
|
41
|
-
|
42
|
-
'''
|
43
|
-
|
44
|
-
def __init__(self, hostname, username=None, password=None, script_dir=None, envs=None,
|
45
|
-
gssapi_auth=False, skip_auth=False, port=22, key_filename=None, host_keys_filename=None):
|
46
|
-
''' Initialize a persistent connection to the remote system.
|
47
|
-
We should know at this point whether ssh connectivity is possible
|
48
|
-
|
49
|
-
Args:
|
50
|
-
- hostname (String) : Hostname
|
51
|
-
|
52
|
-
KWargs:
|
53
|
-
- username (string) : Username on remote system
|
54
|
-
- password (string) : Password for remote system
|
55
|
-
- port : The port designated for the ssh connection. Default is 22.
|
56
|
-
- script_dir (string) : Full path to a script dir where
|
57
|
-
generated scripts could be sent to.
|
58
|
-
- envs (dict) : A dictionary of environment variables to be set when executing commands
|
59
|
-
- key_filename (string or list): the filename, or list of filenames, of optional private key(s)
|
60
|
-
|
61
|
-
Raises:
|
62
|
-
'''
|
63
|
-
if not _ssh_enabled:
|
64
|
-
raise OptionalModuleMissing(['ssh'],
|
65
|
-
"SSHChannel requires the ssh module and config.")
|
66
|
-
|
67
|
-
self.hostname = hostname
|
68
|
-
self.username = username
|
69
|
-
self.password = password
|
70
|
-
self.port = port
|
71
|
-
self.script_dir = script_dir
|
72
|
-
self.skip_auth = skip_auth
|
73
|
-
self.gssapi_auth = gssapi_auth
|
74
|
-
self.key_filename = key_filename
|
75
|
-
self.host_keys_filename = host_keys_filename
|
76
|
-
|
77
|
-
if self.skip_auth:
|
78
|
-
self.ssh_client = NoAuthSSHClient()
|
79
|
-
else:
|
80
|
-
self.ssh_client = paramiko.SSHClient()
|
81
|
-
self.ssh_client.load_system_host_keys(filename=host_keys_filename)
|
82
|
-
self.ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
83
|
-
self.sftp_client = None
|
84
|
-
|
85
|
-
self.envs = {}
|
86
|
-
if envs is not None:
|
87
|
-
self.envs = envs
|
88
|
-
|
89
|
-
def _is_connected(self):
|
90
|
-
transport = self.ssh_client.get_transport() if self.ssh_client else None
|
91
|
-
return transport and transport.is_active()
|
92
|
-
|
93
|
-
def _connect(self):
|
94
|
-
if not self._is_connected():
|
95
|
-
logger.debug(f"connecting to {self.hostname}:{self.port}")
|
96
|
-
try:
|
97
|
-
self.ssh_client.connect(
|
98
|
-
self.hostname,
|
99
|
-
username=self.username,
|
100
|
-
password=self.password,
|
101
|
-
port=self.port,
|
102
|
-
allow_agent=True,
|
103
|
-
gss_auth=self.gssapi_auth,
|
104
|
-
gss_kex=self.gssapi_auth,
|
105
|
-
key_filename=self.key_filename
|
106
|
-
)
|
107
|
-
transport = self.ssh_client.get_transport()
|
108
|
-
self.sftp_client = paramiko.SFTPClient.from_transport(transport)
|
109
|
-
|
110
|
-
except paramiko.BadHostKeyException as e:
|
111
|
-
raise BadHostKeyException(e, self.hostname)
|
112
|
-
|
113
|
-
except paramiko.AuthenticationException as e:
|
114
|
-
raise AuthException(e, self.hostname)
|
115
|
-
|
116
|
-
except paramiko.SSHException as e:
|
117
|
-
raise SSHException(e, self.hostname)
|
118
|
-
|
119
|
-
except Exception as e:
|
120
|
-
raise SSHException(e, self.hostname)
|
121
|
-
|
122
|
-
def _valid_sftp_client(self):
|
123
|
-
self._connect()
|
124
|
-
return self.sftp_client
|
125
|
-
|
126
|
-
def _valid_ssh_client(self):
|
127
|
-
self._connect()
|
128
|
-
return self.ssh_client
|
129
|
-
|
130
|
-
def prepend_envs(self, cmd, env={}):
|
131
|
-
env.update(self.envs)
|
132
|
-
|
133
|
-
if len(env.keys()) > 0:
|
134
|
-
env_vars = ' '.join(['{}={}'.format(key, value) for key, value in env.items()])
|
135
|
-
return 'env {0} {1}'.format(env_vars, cmd)
|
136
|
-
return cmd
|
137
|
-
|
138
|
-
def execute_wait(self, cmd, walltime=2, envs={}):
|
139
|
-
''' Synchronously execute a commandline string on the shell.
|
140
|
-
|
141
|
-
Args:
|
142
|
-
- cmd (string) : Commandline string to execute
|
143
|
-
- walltime (int) : walltime in seconds
|
144
|
-
|
145
|
-
Kwargs:
|
146
|
-
- envs (dict) : Dictionary of env variables
|
147
|
-
|
148
|
-
Returns:
|
149
|
-
- retcode : Return code from the execution, -1 on fail
|
150
|
-
- stdout : stdout string
|
151
|
-
- stderr : stderr string
|
152
|
-
|
153
|
-
Raises:
|
154
|
-
None.
|
155
|
-
'''
|
156
|
-
|
157
|
-
# Execute the command
|
158
|
-
stdin, stdout, stderr = self._valid_ssh_client().exec_command(
|
159
|
-
self.prepend_envs(cmd, envs), bufsize=-1, timeout=walltime
|
160
|
-
)
|
161
|
-
# Block on exit status from the command
|
162
|
-
exit_status = stdout.channel.recv_exit_status()
|
163
|
-
return exit_status, stdout.read().decode("utf-8"), stderr.read().decode("utf-8")
|
164
|
-
|
165
|
-
def push_file(self, local_source, remote_dir):
|
166
|
-
''' Transport a local file to a directory on a remote machine
|
167
|
-
|
168
|
-
Args:
|
169
|
-
- local_source (string): Path
|
170
|
-
- remote_dir (string): Remote path
|
171
|
-
|
172
|
-
Returns:
|
173
|
-
- str: Path to copied file on remote machine
|
174
|
-
|
175
|
-
Raises:
|
176
|
-
- BadScriptPath : if script path on the remote side is bad
|
177
|
-
- BadPermsScriptPath : You do not have perms to make the channel script dir
|
178
|
-
- FileCopyException : FileCopy failed.
|
179
|
-
|
180
|
-
'''
|
181
|
-
remote_dest = os.path.join(remote_dir, os.path.basename(local_source))
|
182
|
-
|
183
|
-
try:
|
184
|
-
self.makedirs(remote_dir, exist_ok=True)
|
185
|
-
except IOError as e:
|
186
|
-
logger.exception("Pushing {0} to {1} failed".format(local_source, remote_dir))
|
187
|
-
if e.errno == 2:
|
188
|
-
raise BadScriptPath(e, self.hostname)
|
189
|
-
elif e.errno == 13:
|
190
|
-
raise BadPermsScriptPath(e, self.hostname)
|
191
|
-
else:
|
192
|
-
logger.exception("File push failed due to SFTP client failure")
|
193
|
-
raise FileCopyException(e, self.hostname)
|
194
|
-
try:
|
195
|
-
self._valid_sftp_client().put(local_source, remote_dest, confirm=True)
|
196
|
-
# Set perm because some systems require the script to be executable
|
197
|
-
self._valid_sftp_client().chmod(remote_dest, 0o700)
|
198
|
-
except Exception as e:
|
199
|
-
logger.exception("File push from local source {} to remote destination {} failed".format(
|
200
|
-
local_source, remote_dest))
|
201
|
-
raise FileCopyException(e, self.hostname)
|
202
|
-
|
203
|
-
return remote_dest
|
204
|
-
|
205
|
-
def pull_file(self, remote_source, local_dir):
|
206
|
-
''' Transport file on the remote side to a local directory
|
207
|
-
|
208
|
-
Args:
|
209
|
-
- remote_source (string): remote_source
|
210
|
-
- local_dir (string): Local directory to copy to
|
211
|
-
|
212
|
-
|
213
|
-
Returns:
|
214
|
-
- str: Local path to file
|
215
|
-
|
216
|
-
Raises:
|
217
|
-
- FileCopyException : FileCopy failed.
|
218
|
-
'''
|
219
|
-
|
220
|
-
local_dest = os.path.join(local_dir, os.path.basename(remote_source))
|
221
|
-
|
222
|
-
try:
|
223
|
-
os.makedirs(local_dir)
|
224
|
-
except OSError as e:
|
225
|
-
if e.errno != errno.EEXIST:
|
226
|
-
logger.exception("Failed to create local_dir: {0}".format(local_dir))
|
227
|
-
raise BadScriptPath(e, self.hostname)
|
228
|
-
|
229
|
-
try:
|
230
|
-
self._valid_sftp_client().get(remote_source, local_dest)
|
231
|
-
except Exception as e:
|
232
|
-
logger.exception("File pull failed")
|
233
|
-
raise FileCopyException(e, self.hostname)
|
234
|
-
|
235
|
-
return local_dest
|
236
|
-
|
237
|
-
def close(self) -> None:
|
238
|
-
if self._is_connected():
|
239
|
-
transport = self.ssh_client.get_transport()
|
240
|
-
self.ssh_client.close()
|
241
|
-
|
242
|
-
# ssh_client.close calls transport.close, but transport.close does
|
243
|
-
# not always wait for the transport thread to be stopped. See impl
|
244
|
-
# of Transport.close in paramiko and issue
|
245
|
-
# https://github.com/paramiko/paramiko/issues/520
|
246
|
-
logger.debug("Waiting for transport thread to stop")
|
247
|
-
transport.join(30)
|
248
|
-
if transport.is_alive():
|
249
|
-
logger.warning("SSH transport thread did not shut down")
|
250
|
-
else:
|
251
|
-
logger.debug("SSH transport thread stopped")
|
252
|
-
|
253
|
-
def isdir(self, path):
|
254
|
-
"""Return true if the path refers to an existing directory.
|
255
|
-
|
256
|
-
Parameters
|
257
|
-
----------
|
258
|
-
path : str
|
259
|
-
Path of directory on the remote side to check.
|
260
|
-
"""
|
261
|
-
result = True
|
262
|
-
try:
|
263
|
-
self._valid_sftp_client().lstat(path)
|
264
|
-
except FileNotFoundError:
|
265
|
-
result = False
|
266
|
-
|
267
|
-
return result
|
268
|
-
|
269
|
-
def makedirs(self, path, mode=0o700, exist_ok=False):
|
270
|
-
"""Create a directory on the remote side.
|
271
|
-
|
272
|
-
If intermediate directories do not exist, they will be created.
|
273
|
-
|
274
|
-
Parameters
|
275
|
-
----------
|
276
|
-
path : str
|
277
|
-
Path of directory on the remote side to create.
|
278
|
-
mode : int
|
279
|
-
Permissions (posix-style) for the newly-created directory.
|
280
|
-
exist_ok : bool
|
281
|
-
If False, raise an OSError if the target directory already exists.
|
282
|
-
"""
|
283
|
-
if exist_ok is False and self.isdir(path):
|
284
|
-
raise OSError('Target directory {} already exists'.format(path))
|
285
|
-
|
286
|
-
self.execute_wait('mkdir -p {}'.format(path))
|
287
|
-
self._valid_sftp_client().chmod(path, mode)
|
288
|
-
|
289
|
-
@property
|
290
|
-
def script_dir(self):
|
291
|
-
return self._script_dir
|
292
|
-
|
293
|
-
@script_dir.setter
|
294
|
-
def script_dir(self, value):
|
295
|
-
self._script_dir = value
|
File without changes
|