rucio-clients 34.5.0__tar.gz → 34.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rucio-clients might be problematic. Click here for more details.

Files changed (188) hide show
  1. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/PKG-INFO +1 -1
  2. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/bin/rucio +3 -3
  3. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/diracclient.py +10 -1
  4. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/downloadclient.py +10 -4
  5. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/exportclient.py +3 -1
  6. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/fileclient.py +2 -1
  7. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/importclient.py +3 -1
  8. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/lockclient.py +15 -3
  9. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/rseclient.py +127 -43
  10. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/constants.py +6 -1
  11. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/utils.py +0 -5
  12. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/rsemanager.py +4 -3
  13. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/vcsversion.py +3 -3
  14. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_abacus_account.py +5 -3
  15. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_abacus_rse.py +5 -3
  16. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_bin_rucio.py +12 -9
  17. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_conveyor.py +44 -20
  18. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_conveyor_submitter.py +35 -15
  19. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_counter.py +24 -8
  20. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_dataset_replicas.py +202 -32
  21. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_download.py +10 -0
  22. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_heartbeat.py +23 -3
  23. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_import_export.py +5 -2
  24. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_judge_evaluator.py +3 -1
  25. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_judge_injector.py +7 -1
  26. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_judge_repairer.py +38 -9
  27. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_message.py +11 -10
  28. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_meta_conventions.py +15 -4
  29. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_multi_vo.py +12 -10
  30. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_oauthmanager.py +64 -23
  31. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_oidc.py +19 -11
  32. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_reaper.py +26 -12
  33. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse.py +35 -5
  34. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rule.py +15 -8
  35. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/AUTHORS.rst +0 -0
  36. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/ChangeLog +0 -0
  37. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/LICENSE +0 -0
  38. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/MANIFEST.in +0 -0
  39. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/README.rst +0 -0
  40. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/bin/rucio-admin +0 -0
  41. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/etc/rse-accounts.cfg.template +0 -0
  42. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/etc/rucio.cfg.atlas.client.template +0 -0
  43. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/etc/rucio.cfg.template +0 -0
  44. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/__init__.py +0 -0
  45. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/alembicrevision.py +0 -0
  46. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/__init__.py +0 -0
  47. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/accountclient.py +0 -0
  48. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/accountlimitclient.py +0 -0
  49. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/baseclient.py +0 -0
  50. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/client.py +0 -0
  51. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/configclient.py +0 -0
  52. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/credentialclient.py +0 -0
  53. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/didclient.py +0 -0
  54. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/lifetimeclient.py +0 -0
  55. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/metaconventionsclient.py +0 -0
  56. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/pingclient.py +0 -0
  57. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/replicaclient.py +0 -0
  58. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/requestclient.py +0 -0
  59. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/ruleclient.py +0 -0
  60. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/scopeclient.py +0 -0
  61. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/subscriptionclient.py +0 -0
  62. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/touchclient.py +0 -0
  63. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/client/uploadclient.py +0 -0
  64. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/__init__.py +0 -0
  65. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/cache.py +0 -0
  66. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/config.py +0 -0
  67. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/constraints.py +0 -0
  68. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/didtype.py +0 -0
  69. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/exception.py +0 -0
  70. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/extra.py +0 -0
  71. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/logging.py +0 -0
  72. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/pcache.py +0 -0
  73. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/plugins.py +0 -0
  74. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/policy.py +0 -0
  75. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/schema/__init__.py +0 -0
  76. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/schema/atlas.py +0 -0
  77. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/schema/belleii.py +0 -0
  78. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/schema/domatpc.py +0 -0
  79. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/schema/escape.py +0 -0
  80. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/schema/generic.py +0 -0
  81. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/schema/generic_multi_vo.py +0 -0
  82. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/schema/icecube.py +0 -0
  83. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/stomp_utils.py +0 -0
  84. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/stopwatch.py +0 -0
  85. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/test_rucio_server.py +0 -0
  86. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/common/types.py +0 -0
  87. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/__init__.py +0 -0
  88. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/__init__.py +0 -0
  89. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/bittorrent.py +0 -0
  90. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/cache.py +0 -0
  91. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/dummy.py +0 -0
  92. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/gfal.py +0 -0
  93. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/globus.py +0 -0
  94. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/gsiftp.py +0 -0
  95. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/http_cache.py +0 -0
  96. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/mock.py +0 -0
  97. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/ngarc.py +0 -0
  98. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/posix.py +0 -0
  99. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/protocol.py +0 -0
  100. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/rclone.py +0 -0
  101. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/rfio.py +0 -0
  102. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/srm.py +0 -0
  103. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/ssh.py +0 -0
  104. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/storm.py +0 -0
  105. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/webdav.py +0 -0
  106. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/rse/protocols/xrootd.py +0 -0
  107. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio/version.py +0 -0
  108. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/lib/rucio_clients.egg-info/SOURCES.txt +0 -0
  109. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/pylintrc +0 -0
  110. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/pyproject.toml +0 -0
  111. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/requirements.txt +0 -0
  112. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/setup.cfg +0 -0
  113. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/setup.py +0 -0
  114. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/setuputil.py +0 -0
  115. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_abacus_collection_replica.py +0 -0
  116. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_account.py +0 -0
  117. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_account_limits.py +0 -0
  118. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_api_external_representation.py +0 -0
  119. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_archive.py +0 -0
  120. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_auditor.py +0 -0
  121. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_auditor_hdfs.py +0 -0
  122. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_auditor_srmdumps.py +0 -0
  123. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_authentication.py +0 -0
  124. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_automatix.py +0 -0
  125. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_bad_replica.py +0 -0
  126. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_bb8.py +0 -0
  127. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_belleii.py +0 -0
  128. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_boolean.py +0 -0
  129. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_clients.py +0 -0
  130. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_common_types.py +0 -0
  131. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_config.py +0 -0
  132. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_credential.py +0 -0
  133. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_curl.py +0 -0
  134. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_daemons.py +0 -0
  135. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_db.py +0 -0
  136. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_did.py +0 -0
  137. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_did_meta_plugins.py +0 -0
  138. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_didtype.py +0 -0
  139. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_dumper.py +0 -0
  140. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_dumper_consistency.py +0 -0
  141. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_dumper_data_model.py +0 -0
  142. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_dumper_path_parsing.py +0 -0
  143. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_filter_engine.py +0 -0
  144. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_hermes.py +0 -0
  145. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_identity.py +0 -0
  146. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_impl_upload_download.py +0 -0
  147. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_judge_cleaner.py +0 -0
  148. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_lifetime.py +0 -0
  149. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_meta_did.py +0 -0
  150. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_module_import.py +0 -0
  151. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_monitor.py +0 -0
  152. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_naming_convention.py +0 -0
  153. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_permission.py +0 -0
  154. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_pfns.py +0 -0
  155. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_ping.py +0 -0
  156. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_preparer.py +0 -0
  157. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_qos.py +0 -0
  158. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_quarantined_replica.py +0 -0
  159. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_redirect.py +0 -0
  160. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_replica.py +0 -0
  161. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_replica_recoverer.py +0 -0
  162. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_replica_sorting.py +0 -0
  163. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_request.py +0 -0
  164. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_root_proxy.py +0 -0
  165. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_expression_parser.py +0 -0
  166. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_lfn2path.py +0 -0
  167. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_protocol_gfal2.py +0 -0
  168. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_protocol_gfal2_impl.py +0 -0
  169. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_protocol_posix.py +0 -0
  170. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_protocol_rclone.py +0 -0
  171. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_protocol_rsync.py +0 -0
  172. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_protocol_srm.py +0 -0
  173. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_protocol_ssh.py +0 -0
  174. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_protocol_webdav.py +0 -0
  175. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_protocol_xrootd.py +0 -0
  176. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rse_selector.py +0 -0
  177. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_rucio_server.py +0 -0
  178. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_scope.py +0 -0
  179. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_subscription.py +0 -0
  180. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_throttler.py +0 -0
  181. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_tpc.py +0 -0
  182. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_trace.py +0 -0
  183. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_transfer.py +0 -0
  184. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_transfer_plugins.py +0 -0
  185. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_undertaker.py +0 -0
  186. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_upload.py +0 -0
  187. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tests/test_utils.py +0 -0
  188. {rucio_clients-34.5.0 → rucio_clients-34.6.0}/tools/merge_rucio_configs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rucio-clients
3
- Version: 34.5.0
3
+ Version: 34.6.0
4
4
  Summary: Rucio Client Lite Package
5
5
  Home-page: https://rucio.cern.ch/
6
6
  Author: Rucio
@@ -1929,7 +1929,7 @@ To list the missing replica of a dataset of a given RSE-expression::
1929
1929
  list_file_replicas_parser.add_argument('--no-resolve-archives', dest='no_resolve_archives', default=False, action='store_true', help='Do not resolve archives which may contain the files.', required=False)
1930
1930
  list_file_replicas_parser.add_argument('--sort', dest='sort', default=None, action='store', help='Replica sort algorithm. Available options: geoip (default), random', required=False)
1931
1931
  list_file_replicas_parser.add_argument('--rses', dest='rses', default=None, action='store', help='The RSE filter expression. A comprehensive help about RSE expressions\
1932
- can be found in ' + Color.BOLD + 'http://rucio.cern.ch/documentation/rse_expressions/' + Color.END)
1932
+ can be found in ' + Color.BOLD + 'https://rucio.cern.ch/documentation/started/concepts/rse_expressions' + Color.END)
1933
1933
 
1934
1934
  # The list-dataset-replicas command
1935
1935
  list_dataset_replicas_parser = subparsers.add_parser('list-dataset-replicas', help='List the dataset replicas.',
@@ -2431,13 +2431,13 @@ You can filter by account::
2431
2431
  list_rses_parser = subparsers.add_parser('list-rses', help='Show the list of all the registered Rucio Storage Elements (RSEs).')
2432
2432
  list_rses_parser.set_defaults(function=list_rses)
2433
2433
  list_rses_parser.add_argument('--rses', dest='rses', action='store', help='The RSE filter expression. A comprehensive help about RSE expressions \
2434
- can be found in ' + Color.BOLD + 'http://rucio.cern.ch/documentation/rse_expressions/' + Color.END)
2434
+ can be found in ' + Color.BOLD + 'https://rucio.cern.ch/documentation/started/concepts/rse_expressions' + Color.END)
2435
2435
 
2436
2436
  # The list-suspicious-replicas command
2437
2437
  list_suspicious_replicas_parser = subparsers.add_parser('list-suspicious-replicas', help='Show the list of all replicas marked "suspicious".')
2438
2438
  list_suspicious_replicas_parser.set_defaults(function=list_suspicious_replicas)
2439
2439
  list_suspicious_replicas_parser.add_argument('--expression', dest='rse_expression', action='store', help='The RSE filter expression. A comprehensive help about RSE expressions \
2440
- can be found in ' + Color.BOLD + 'http://rucio.cern.ch/documentation/rse_expressions/' + Color.END)
2440
+ can be found in ' + Color.BOLD + 'https://rucio.cern.ch/documentation/started/concepts/rse_expressions' + Color.END)
2441
2441
  list_suspicious_replicas_parser.add_argument('--younger_than', '--younger-than', new_option_string='--younger-than', dest='younger_than', action=StoreAndDeprecateWarningAction, help='List files that have been marked suspicious since the date "younger_than", e.g. 2021-11-29T00:00:00.') # NOQA: E501
2442
2442
  list_suspicious_replicas_parser.add_argument('--nattempts', dest='nattempts', action='store', help='Minimum number of failed attempts to access a suspicious file.')
2443
2443
 
@@ -13,12 +13,16 @@
13
13
  # limitations under the License.
14
14
 
15
15
  from json import dumps
16
+ from typing import TYPE_CHECKING, Any, Literal, Optional
16
17
 
17
18
  from requests.status_codes import codes
18
19
 
19
20
  from rucio.client.baseclient import BaseClient, choice
20
21
  from rucio.common.utils import build_url
21
22
 
23
+ if TYPE_CHECKING:
24
+ from collections.abc import Iterable, Mapping
25
+
22
26
 
23
27
  class DiracClient(BaseClient):
24
28
 
@@ -26,7 +30,12 @@ class DiracClient(BaseClient):
26
30
 
27
31
  DIRAC_BASEURL = 'dirac'
28
32
 
29
- def add_files(self, lfns, ignore_availability=False, parents_metadata=None):
33
+ def add_files(
34
+ self,
35
+ lfns: "Iterable[Mapping[str, Any]]",
36
+ ignore_availability: bool = False,
37
+ parents_metadata: Optional["Mapping[str, Mapping[str, Any]]"] = None
38
+ ) -> Literal[True]:
30
39
  """
31
40
  Bulk add files :
32
41
  - Create the file and replica.
@@ -128,13 +128,19 @@ class DownloadClient:
128
128
  :param logger: Optional: logging.Logger object. If None, default logger will be used.
129
129
  """
130
130
  self.check_pcache = check_pcache
131
- if not logger:
131
+ if logger is None:
132
132
  self.logger = logging.log
133
133
  else:
134
- self.logger = logger.log
134
+ if hasattr(logger, "debug"):
135
+ self.logger = logger.log
136
+ else:
137
+ self.logger = logger
138
+
135
139
  self.tracing = tracing
140
+
136
141
  if not self.tracing:
137
- logger(logging.DEBUG, 'Tracing is turned off.')
142
+ self.logger(logging.DEBUG, 'Tracing is turned off.')
143
+
138
144
  self.is_human_readable = True
139
145
  self.client = client if client else Client()
140
146
  # if token should be used, use only JWT tokens
@@ -152,7 +158,7 @@ class DownloadClient:
152
158
  break
153
159
  if self.is_admin:
154
160
  self.is_tape_excluded = False
155
- logger(logging.DEBUG, 'Admin mode enabled')
161
+ self.logger(logging.DEBUG, 'Admin mode enabled')
156
162
 
157
163
  self.trace_tpl = {}
158
164
  self.trace_tpl['hostname'] = self.client_location['fqdn']
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from typing import Any
16
+
15
17
  from requests.status_codes import codes
16
18
 
17
19
  from rucio.client.baseclient import BaseClient, choice
@@ -23,7 +25,7 @@ class ExportClient(BaseClient):
23
25
 
24
26
  EXPORT_BASEURL = 'export'
25
27
 
26
- def export_data(self, distance=True):
28
+ def export_data(self, distance: bool = True) -> dict[str, Any]:
27
29
  """
28
30
  Export RSE data (RSE, settings, attributes and distance).
29
31
  :param distance: To include the distance.
@@ -13,6 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
  from json import loads
16
+ from typing import Any
16
17
  from urllib.parse import quote_plus
17
18
 
18
19
  from requests.status_codes import codes
@@ -26,7 +27,7 @@ class FileClient(BaseClient):
26
27
 
27
28
  BASEURL = 'files'
28
29
 
29
- def list_file_replicas(self, scope, lfn):
30
+ def list_file_replicas(self, scope: str, lfn: str) -> list[dict[str, Any]]:
30
31
  """
31
32
  List file replicas.
32
33
 
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from typing import Any
16
+
15
17
  from requests.status_codes import codes
16
18
 
17
19
  from rucio.client.baseclient import BaseClient, choice
@@ -23,7 +25,7 @@ class ImportClient(BaseClient):
23
25
 
24
26
  IMPORT_BASEURL = 'import'
25
27
 
26
- def import_data(self, data):
28
+ def import_data(self, data: dict[str, Any]) -> str:
27
29
  """
28
30
  Imports data into Rucio.
29
31
 
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from typing import TYPE_CHECKING, Any
15
16
  from urllib.parse import quote_plus
16
17
 
17
18
  from requests.status_codes import codes
@@ -19,6 +20,9 @@ from requests.status_codes import codes
19
20
  from rucio.client.baseclient import BaseClient, choice
20
21
  from rucio.common.utils import build_url, render_json
21
22
 
23
+ if TYPE_CHECKING:
24
+ from collections.abc import Iterator, Mapping
25
+
22
26
 
23
27
  class LockClient(BaseClient):
24
28
 
@@ -26,7 +30,11 @@ class LockClient(BaseClient):
26
30
 
27
31
  LOCKS_BASEURL = 'locks'
28
32
 
29
- def get_dataset_locks(self, scope, name):
33
+ def get_dataset_locks(
34
+ self,
35
+ scope: str,
36
+ name: str
37
+ ) -> "Iterator[dict[str, Any]]":
30
38
  """
31
39
  Get a dataset locks of the specified dataset.
32
40
 
@@ -46,7 +54,11 @@ class LockClient(BaseClient):
46
54
  status_code=result.status_code)
47
55
  raise exc_cls(exc_msg)
48
56
 
49
- def get_locks_for_dids(self, dids, **filter_args):
57
+ def get_locks_for_dids(
58
+ self,
59
+ dids: list["Mapping[str, Any]"],
60
+ **filter_args: dict[str, Any]
61
+ ) -> list[dict[str, Any]]:
50
62
  """
51
63
  Get list of locks for for all the files found, recursively, in the listed datasets or containers.
52
64
 
@@ -76,7 +88,7 @@ class LockClient(BaseClient):
76
88
  status_code=result.status_code)
77
89
  raise exc_cls(exc_msg)
78
90
 
79
- def get_dataset_locks_by_rse(self, rse):
91
+ def get_dataset_locks_by_rse(self, rse: str) -> "Iterator[dict[str, Any]]":
80
92
  """
81
93
  Get all dataset locks of the specified rse.
82
94
 
@@ -13,6 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
  from json import dumps, loads
16
+ from typing import TYPE_CHECKING, Any, Literal, Optional, Union
16
17
  from urllib.parse import quote
17
18
 
18
19
  from requests.status_codes import codes
@@ -20,13 +21,18 @@ from requests.status_codes import codes
20
21
  from rucio.client.baseclient import BaseClient, choice
21
22
  from rucio.common.utils import build_url
22
23
 
24
+ if TYPE_CHECKING:
25
+ from collections.abc import Iterable, Iterator
26
+
27
+ from rucio.common.constants import RSE_SUPPORTED_PROTOCOL_DOMAINS_LITERAL, RSE_SUPPORTED_PROTOCOL_OPERATIONS_LITERAL, SUPPORTED_PROTOCOLS_LITERAL
28
+
23
29
 
24
30
  class RSEClient(BaseClient):
25
31
  """RSE client class for working with rucio RSEs"""
26
32
 
27
33
  RSE_BASEURL = 'rses'
28
34
 
29
- def get_rse(self, rse):
35
+ def get_rse(self, rse: str) -> dict[str, Any]:
30
36
  """
31
37
  Returns details about the referred RSE.
32
38
 
@@ -41,13 +47,13 @@ class RSEClient(BaseClient):
41
47
 
42
48
  r = self._send_request(url, type_='GET')
43
49
  if r.status_code == codes.ok:
44
- rse = loads(r.text)
45
- return rse
50
+ rse_dict = loads(r.text)
51
+ return rse_dict
46
52
  else:
47
53
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
48
54
  raise exc_cls(exc_msg)
49
55
 
50
- def add_rse(self, rse, **kwargs):
56
+ def add_rse(self, rse: str, **kwargs) -> Literal[True]:
51
57
  """
52
58
  Sends the request to create a new RSE.
53
59
 
@@ -78,7 +84,7 @@ class RSEClient(BaseClient):
78
84
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
79
85
  raise exc_cls(exc_msg)
80
86
 
81
- def update_rse(self, rse, parameters):
87
+ def update_rse(self, rse: str, parameters: dict[str, Any]) -> Literal[True]:
82
88
  """
83
89
  Update RSE properties like availability or name.
84
90
 
@@ -93,7 +99,7 @@ class RSEClient(BaseClient):
93
99
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
94
100
  raise exc_cls(exc_msg)
95
101
 
96
- def delete_rse(self, rse):
102
+ def delete_rse(self, rse: str) -> Literal[True]:
97
103
  """
98
104
  Sends the request to delete a rse.
99
105
 
@@ -109,7 +115,7 @@ class RSEClient(BaseClient):
109
115
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
110
116
  raise exc_cls(exc_msg)
111
117
 
112
- def list_rses(self, rse_expression=None):
118
+ def list_rses(self, rse_expression: Optional[str] = None) -> "Iterator[dict[str, Any]]":
113
119
  """
114
120
  Sends the request to list all rucio locations(RSEs).
115
121
 
@@ -129,7 +135,12 @@ class RSEClient(BaseClient):
129
135
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
130
136
  raise exc_cls(exc_msg)
131
137
 
132
- def add_rse_attribute(self, rse, key, value):
138
+ def add_rse_attribute(
139
+ self,
140
+ rse: str,
141
+ key: str,
142
+ value: Any
143
+ ) -> Literal[True]:
133
144
  """
134
145
  Sends the request to add a RSE attribute.
135
146
 
@@ -151,7 +162,7 @@ class RSEClient(BaseClient):
151
162
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
152
163
  raise exc_cls(exc_msg)
153
164
 
154
- def delete_rse_attribute(self, rse, key):
165
+ def delete_rse_attribute(self, rse: str, key: str) -> Literal[True]:
155
166
  """
156
167
  Sends the request to delete a RSE attribute.
157
168
 
@@ -170,7 +181,7 @@ class RSEClient(BaseClient):
170
181
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
171
182
  raise exc_cls(exc_msg)
172
183
 
173
- def list_rse_attributes(self, rse):
184
+ def list_rse_attributes(self, rse: str) -> dict[str, Any]:
174
185
  """
175
186
  Sends the request to get RSE attributes.
176
187
 
@@ -188,7 +199,7 @@ class RSEClient(BaseClient):
188
199
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
189
200
  raise exc_cls(exc_msg)
190
201
 
191
- def add_protocol(self, rse, params):
202
+ def add_protocol(self, rse: str, params: dict[str, Any]) -> Literal[True]:
192
203
  """
193
204
  Sends the request to create a new protocol for the given RSE.
194
205
 
@@ -223,9 +234,16 @@ class RSEClient(BaseClient):
223
234
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
224
235
  raise exc_cls(exc_msg)
225
236
 
226
- def get_protocols(self, rse, protocol_domain='ALL', operation=None, default=False, scheme=None):
237
+ def get_protocols(
238
+ self,
239
+ rse: str,
240
+ protocol_domain: "RSE_SUPPORTED_PROTOCOL_DOMAINS_LITERAL" = 'ALL',
241
+ operation: Optional["RSE_SUPPORTED_PROTOCOL_OPERATIONS_LITERAL"] = None,
242
+ default: bool = False,
243
+ scheme: Optional['SUPPORTED_PROTOCOLS_LITERAL'] = None
244
+ ) -> Any:
227
245
  """
228
- Returns protocol information. Parameter comibantions are:
246
+ Returns protocol information. Parameter combinations are:
229
247
  (operation OR default) XOR protocol.
230
248
 
231
249
  :param rse: the RSE name.
@@ -235,7 +253,7 @@ class RSEClient(BaseClient):
235
253
  :param default: Indicates if only the default operations should be returned.
236
254
  :param scheme: The identifier of the requested protocol.
237
255
 
238
- :returns: A list with details about each matching protocol.
256
+ :returns: A dict with details about each matching protocol.
239
257
 
240
258
  :raises RSENotFound: if the RSE doesn't exist.
241
259
  :raises RSEProtocolNotSupported: if no matching protocol entry could be found.
@@ -264,7 +282,14 @@ class RSEClient(BaseClient):
264
282
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
265
283
  raise exc_cls(exc_msg)
266
284
 
267
- def lfns2pfns(self, rse, lfns, protocol_domain='ALL', operation=None, scheme=None):
285
+ def lfns2pfns(
286
+ self,
287
+ rse: str,
288
+ lfns: 'Iterable[str]',
289
+ protocol_domain: 'RSE_SUPPORTED_PROTOCOL_DOMAINS_LITERAL' = 'ALL',
290
+ operation: Optional['RSE_SUPPORTED_PROTOCOL_OPERATIONS_LITERAL'] = None,
291
+ scheme: Optional['SUPPORTED_PROTOCOLS_LITERAL'] = None
292
+ ) -> dict[str, str]:
268
293
  """
269
294
  Returns PFNs that should be used at a RSE, corresponding to requested LFNs.
270
295
  The PFNs are generated for the RSE *regardless* of whether a replica exists for the LFN.
@@ -303,7 +328,13 @@ class RSEClient(BaseClient):
303
328
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
304
329
  raise exc_cls(exc_msg)
305
330
 
306
- def delete_protocols(self, rse, scheme, hostname=None, port=None):
331
+ def delete_protocols(
332
+ self,
333
+ rse: str,
334
+ scheme: 'SUPPORTED_PROTOCOLS_LITERAL',
335
+ hostname: Optional[str] = None,
336
+ port: Optional[int] = None
337
+ ) -> Literal[True]:
307
338
  """
308
339
  Deletes matching protocols from RSE. Protocols using the same identifier can be
309
340
  distinguished by hostname and port.
@@ -334,7 +365,13 @@ class RSEClient(BaseClient):
334
365
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
335
366
  raise exc_cls(exc_msg)
336
367
 
337
- def update_protocols(self, rse, scheme, data, hostname=None, port=None):
368
+ def update_protocols(
369
+ self,
370
+ rse: str,
371
+ scheme: 'SUPPORTED_PROTOCOLS_LITERAL',
372
+ data: dict[str, Any],
373
+ hostname: Optional[str] = None,
374
+ port: Optional[int] = None):
338
375
  """
339
376
  Updates matching protocols from RSE. Protocol using the same identifier can be
340
377
  distinguished by hostname and port.
@@ -368,7 +405,14 @@ class RSEClient(BaseClient):
368
405
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
369
406
  raise exc_cls(exc_msg)
370
407
 
371
- def swap_protocols(self, rse, domain, operation, scheme_a, scheme_b):
408
+ def swap_protocols(
409
+ self,
410
+ rse: str,
411
+ domain: 'RSE_SUPPORTED_PROTOCOL_DOMAINS_LITERAL',
412
+ operation: 'RSE_SUPPORTED_PROTOCOL_OPERATIONS_LITERAL',
413
+ scheme_a: 'SUPPORTED_PROTOCOLS_LITERAL',
414
+ scheme_b: 'SUPPORTED_PROTOCOLS_LITERAL'
415
+ ) -> bool:
372
416
  """
373
417
  Swaps the priorities of the provided operation.
374
418
 
@@ -385,22 +429,21 @@ class RSEClient(BaseClient):
385
429
  :raises KeyNotFound: if invalid data was provided for update.
386
430
  :raises AccessDenied: if not authorized.
387
431
  """
388
- protocol_a = protocol_b = None
432
+
389
433
  protocols = self.get_protocols(rse, domain, operation, False, scheme_a)['protocols']
390
- for p in protocols:
391
- if p['scheme'] == scheme_a:
392
- protocol_a = p
393
- if p['scheme'] == scheme_b:
394
- protocol_b = p
395
- if (protocol_a or protocol_b) is None:
434
+ protocol_a = next((p for p in protocols if p['scheme'] == scheme_a), None)
435
+ protocol_b = next((p for p in protocols if p['scheme'] == scheme_b), None)
436
+
437
+ if protocol_a is None or protocol_b is None:
396
438
  return False
439
+
397
440
  priority_a = protocol_a['domains'][domain][operation]
398
441
  priority_b = protocol_b['domains'][domain][operation]
399
442
  self.update_protocols(rse, protocol_a['scheme'], {'domains': {domain: {operation: priority_b}}}, protocol_a['hostname'], protocol_a['port'])
400
443
  self.update_protocols(rse, protocol_b['scheme'], {'domains': {domain: {operation: priority_a}}}, protocol_b['hostname'], protocol_b['port'])
401
444
  return True
402
445
 
403
- def add_qos_policy(self, rse, qos_policy):
446
+ def add_qos_policy(self, rse: str, qos_policy: str) -> Literal[True]:
404
447
  """
405
448
  Add a QoS policy from an RSE.
406
449
 
@@ -422,7 +465,7 @@ class RSEClient(BaseClient):
422
465
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
423
466
  raise exc_cls(exc_msg)
424
467
 
425
- def delete_qos_policy(self, rse, qos_policy):
468
+ def delete_qos_policy(self, rse: str, qos_policy: str) -> Literal[True]:
426
469
  """
427
470
  Delete a QoS policy from an RSE.
428
471
 
@@ -443,7 +486,7 @@ class RSEClient(BaseClient):
443
486
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
444
487
  raise exc_cls(exc_msg)
445
488
 
446
- def list_qos_policies(self, rse):
489
+ def list_qos_policies(self, rse: str) -> list[str]:
447
490
  """
448
491
  List all QoS policies of an RSE.
449
492
 
@@ -463,7 +506,14 @@ class RSEClient(BaseClient):
463
506
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
464
507
  raise exc_cls(exc_msg)
465
508
 
466
- def set_rse_usage(self, rse, source, used, free, files=None):
509
+ def set_rse_usage(
510
+ self,
511
+ rse: str,
512
+ source: str,
513
+ used: int,
514
+ free: int,
515
+ files: Optional[int] = None
516
+ ) -> Literal[True]:
467
517
  """
468
518
  Set RSE usage information.
469
519
 
@@ -473,7 +523,7 @@ class RSEClient(BaseClient):
473
523
  :param free: the free in bytes.
474
524
  :param files: the number of files
475
525
 
476
- :returns: True if successful, otherwise false.
526
+ :returns: True if successful
477
527
  """
478
528
  path = [self.RSE_BASEURL, rse, 'usage']
479
529
  path = '/'.join(path)
@@ -486,7 +536,11 @@ class RSEClient(BaseClient):
486
536
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
487
537
  raise exc_cls(exc_msg)
488
538
 
489
- def get_rse_usage(self, rse, filters=None):
539
+ def get_rse_usage(
540
+ self,
541
+ rse: str,
542
+ filters: Optional[dict[str, Any]] = None
543
+ ) -> "Iterator[dict[str, Any]]":
490
544
  """
491
545
  Get RSE usage information.
492
546
 
@@ -505,7 +559,11 @@ class RSEClient(BaseClient):
505
559
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
506
560
  raise exc_cls(exc_msg)
507
561
 
508
- def list_rse_usage_history(self, rse, filters=None):
562
+ def list_rse_usage_history(
563
+ self,
564
+ rse: str,
565
+ filters: Optional[dict[str, Any]] = None
566
+ ) -> "Iterator[dict[str, Any]]":
509
567
  """
510
568
  List RSE usage history information.
511
569
 
@@ -526,7 +584,12 @@ class RSEClient(BaseClient):
526
584
  data=r.content)
527
585
  raise exc_cls(exc_msg)
528
586
 
529
- def set_rse_limits(self, rse, name, value):
587
+ def set_rse_limits(
588
+ self,
589
+ rse: str,
590
+ name: str,
591
+ value: int
592
+ ) -> Literal[True]:
530
593
  """
531
594
  Set RSE limit information.
532
595
 
@@ -534,7 +597,7 @@ class RSEClient(BaseClient):
534
597
  :param name: The name of the limit.
535
598
  :param value: The feature value.
536
599
 
537
- :returns: True if successful, otherwise false.
600
+ :returns: True if successful
538
601
  """
539
602
  path = [self.RSE_BASEURL, rse, 'limits']
540
603
  path = '/'.join(path)
@@ -547,13 +610,16 @@ class RSEClient(BaseClient):
547
610
  data=r.content)
548
611
  raise exc_cls(exc_msg)
549
612
 
550
- def get_rse_limits(self, rse):
613
+ def get_rse_limits(
614
+ self,
615
+ rse: str
616
+ ) -> "Iterator[dict[str, Union[str, int]]]":
551
617
  """
552
618
  Get RSE limits.
553
619
 
554
620
  :param rse: The RSE name.
555
621
 
556
- :returns: True if successful, otherwise false.
622
+ :returns: An iterator of RSE limits as dicts with 'name' and 'value' as keys.
557
623
  """
558
624
  path = [self.RSE_BASEURL, rse, 'limits']
559
625
  path = '/'.join(path)
@@ -566,14 +632,14 @@ class RSEClient(BaseClient):
566
632
  data=r.content)
567
633
  raise exc_cls(exc_msg)
568
634
 
569
- def delete_rse_limits(self, rse, name):
635
+ def delete_rse_limits(self, rse: str, name: str) -> Literal[True]:
570
636
  """
571
637
  Delete RSE limit information.
572
638
 
573
639
  :param rse: The RSE name.
574
640
  :param name: The name of the limit.
575
641
 
576
- :returns: True if successful, otherwise false.
642
+ :returns: True if successful
577
643
  """
578
644
  path = [self.RSE_BASEURL, rse, 'limits']
579
645
  path = '/'.join(path)
@@ -585,9 +651,14 @@ class RSEClient(BaseClient):
585
651
  status_code=r.status_code,
586
652
  data=r.content)
587
653
 
588
- return exc_cls(exc_msg)
654
+ raise exc_cls(exc_msg)
589
655
 
590
- def add_distance(self, source, destination, parameters):
656
+ def add_distance(
657
+ self,
658
+ source: str,
659
+ destination: str,
660
+ parameters: dict[str, int]
661
+ ) -> Literal[True]:
591
662
  """
592
663
  Add a src-dest distance.
593
664
 
@@ -606,7 +677,12 @@ class RSEClient(BaseClient):
606
677
  data=r.content)
607
678
  raise exc_cls(exc_msg)
608
679
 
609
- def update_distance(self, source, destination, parameters):
680
+ def update_distance(
681
+ self,
682
+ source: str,
683
+ destination: str,
684
+ parameters: dict[str, int]
685
+ ) -> Literal[True]:
610
686
  """
611
687
  Update distances with the given RSE ids.
612
688
 
@@ -625,7 +701,11 @@ class RSEClient(BaseClient):
625
701
  data=r.content)
626
702
  raise exc_cls(exc_msg)
627
703
 
628
- def get_distance(self, source, destination):
704
+ def get_distance(
705
+ self,
706
+ source: str,
707
+ destination: str
708
+ ) -> list[dict[str, Union[str, int]]]:
629
709
  """
630
710
  Get distances between rses.
631
711
 
@@ -643,7 +723,11 @@ class RSEClient(BaseClient):
643
723
  exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
644
724
  raise exc_cls(exc_msg)
645
725
 
646
- def delete_distance(self, source, destination):
726
+ def delete_distance(
727
+ self,
728
+ source: str,
729
+ destination: str
730
+ ) -> Literal[True]:
647
731
  """
648
732
  Delete distances with the given RSE ids.
649
733
 
@@ -49,7 +49,12 @@ if config_get_bool('transfers', 'srm_https_compatibility', raise_exception=False
49
49
  SCHEME_MAP['davs'].append('srm')
50
50
 
51
51
  SUPPORTED_PROTOCOLS_LITERAL = Literal['gsiftp', 'srm', 'root', 'davs', 'http', 'https', 'file', 'storm', 'srm+https', 'scp', 'rsync', 'rclone', 'magnet']
52
- SUPPORTED_PROTOCOLS = list(get_args(SUPPORTED_PROTOCOLS_LITERAL))
52
+ SUPPORTED_PROTOCOLS: list[str] = list(get_args(SUPPORTED_PROTOCOLS_LITERAL))
53
+
54
+ RSE_SUPPORTED_PROTOCOL_DOMAINS_LITERAL = Literal['ALL', 'LAN', 'WAN']
55
+
56
+ RSE_SUPPORTED_PROTOCOL_OPERATIONS_LITERAL = Literal['read', 'write', 'delete', 'third_party_copy_read', 'third_party_copy_write']
57
+ RSE_SUPPORTED_PROTOCOL_OPERATIONS: list[str] = list(get_args(RSE_SUPPORTED_PROTOCOL_OPERATIONS_LITERAL))
53
58
 
54
59
  FTS_STATE = namedtuple('FTS_STATE', ['SUBMITTED', 'READY', 'ACTIVE', 'FAILED', 'FINISHED', 'FINISHEDDIRTY', 'NOT_USED',
55
60
  'CANCELED'])('SUBMITTED', 'READY', 'ACTIVE', 'FAILED', 'FINISHED', 'FINISHEDDIRTY',
@@ -681,11 +681,6 @@ def execute(cmd: str) -> tuple[int, str, str]:
681
681
  return exitcode, out.decode(encoding='utf-8'), err.decode(encoding='utf-8')
682
682
 
683
683
 
684
- def rse_supported_protocol_operations() -> list[str]:
685
- """ Returns a list with operations supported by all RSE protocols."""
686
- return ['read', 'write', 'delete', 'third_party_copy_read', 'third_party_copy_write']
687
-
688
-
689
684
  def rse_supported_protocol_domains() -> list[str]:
690
685
  """ Returns a list with all supported RSE protocol domains."""
691
686
  return ['lan', 'wan']