rucio-clients 35.6.0__tar.gz → 36.0.0.post1__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 (215) hide show
  1. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/AUTHORS.rst +1 -0
  2. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/PKG-INFO +3 -1
  3. rucio_clients-36.0.0.post1/bin/rucio +118 -0
  4. rucio_clients-36.0.0.post1/bin/rucio-admin +89 -0
  5. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/etc/rucio.cfg.atlas.client.template +3 -2
  6. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/etc/rucio.cfg.template +2 -1
  7. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/baseclient.py +7 -5
  8. rucio_clients-36.0.0.post1/lib/rucio/client/commands/__init__.py +25 -0
  9. rucio_clients-36.0.0.post1/lib/rucio/client/commands/account.py +219 -0
  10. rucio_clients-36.0.0.post1/lib/rucio/client/commands/command.py +258 -0
  11. rucio_clients-36.0.0.post1/lib/rucio/client/commands/command_base.py +193 -0
  12. rucio_clients-36.0.0.post1/lib/rucio/client/commands/config.py +58 -0
  13. rucio_clients-36.0.0.post1/lib/rucio/client/commands/did.py +202 -0
  14. rucio_clients-36.0.0.post1/lib/rucio/client/commands/download.py +92 -0
  15. rucio_clients-36.0.0.post1/lib/rucio/client/commands/lifetime_exception.py +53 -0
  16. rucio_clients-36.0.0.post1/lib/rucio/client/commands/replica.py +166 -0
  17. rucio_clients-36.0.0.post1/lib/rucio/client/commands/rse.py +268 -0
  18. rucio_clients-36.0.0.post1/lib/rucio/client/commands/rule.py +123 -0
  19. rucio_clients-36.0.0.post1/lib/rucio/client/commands/scope.py +51 -0
  20. rucio_clients-36.0.0.post1/lib/rucio/client/commands/subscription.py +72 -0
  21. rucio_clients-36.0.0.post1/lib/rucio/client/commands/upload.py +62 -0
  22. rucio_clients-36.0.0.post1/lib/rucio/client/commands/utils.py +226 -0
  23. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/downloadclient.py +3 -1
  24. rucio_clients-36.0.0.post1/lib/rucio/client/richclient.py +324 -0
  25. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/rseclient.py +4 -4
  26. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/uploadclient.py +4 -1
  27. rucio_clients-36.0.0.post1/lib/rucio/common/bittorrent.py +234 -0
  28. rucio_clients-36.0.0.post1/lib/rucio/common/cache.py +111 -0
  29. rucio_clients-36.0.0.post1/lib/rucio/common/checksum.py +151 -0
  30. rucio_clients-36.0.0.post1/lib/rucio/common/client.py +122 -0
  31. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/config.py +10 -15
  32. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/constants.py +60 -2
  33. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/didtype.py +72 -24
  34. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/exception.py +23 -5
  35. rucio_clients-35.6.0/tests/test_rucio_server.py → rucio_clients-36.0.0.post1/lib/rucio/common/extra.py +14 -6
  36. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/logging.py +13 -13
  37. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/plugins.py +59 -27
  38. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/schema/__init__.py +51 -9
  39. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/test_rucio_server.py +14 -8
  40. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/types.py +108 -50
  41. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/utils.py +63 -630
  42. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/__init__.py +3 -3
  43. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/bittorrent.py +14 -1
  44. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/gfal.py +1 -1
  45. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/gsiftp.py +15 -0
  46. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/posix.py +1 -1
  47. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/protocol.py +16 -298
  48. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/rclone.py +2 -1
  49. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/rfio.py +9 -0
  50. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/ssh.py +2 -1
  51. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/xrootd.py +2 -1
  52. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/rsemanager.py +11 -8
  53. rucio_clients-36.0.0.post1/lib/rucio/rse/translation.py +273 -0
  54. rucio_clients-36.0.0.post1/lib/rucio/vcsversion.py +11 -0
  55. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/version.py +7 -0
  56. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio_clients.egg-info/SOURCES.txt +22 -7
  57. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/pyproject.toml +21 -1
  58. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/requirements/requirements.client.txt +3 -0
  59. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/setup.py +2 -2
  60. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/setuputil.py +3 -1
  61. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_belleii.py +1 -1
  62. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_bin_rucio.py +103 -102
  63. rucio_clients-36.0.0.post1/tests/test_cli_client_structure.py +673 -0
  64. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_conveyor.py +2 -1
  65. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_download.py +1 -15
  66. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_impl_upload_download.py +29 -45
  67. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_multi_vo.py +0 -2
  68. rucio_clients-36.0.0.post1/tests/test_policy_package.py +60 -0
  69. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_replica_recoverer.py +5 -5
  70. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse.py +4 -4
  71. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_lfn2path.py +1 -1
  72. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_protocol_rclone.py +2 -1
  73. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_protocol_rsync.py +2 -1
  74. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_protocol_ssh.py +2 -1
  75. rucio_clients-36.0.0.post1/tests/test_rucio_server.py +124 -0
  76. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_upload.py +6 -1
  77. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_utils.py +2 -24
  78. rucio_clients-35.6.0/bin/rucio +0 -2542
  79. rucio_clients-35.6.0/bin/rucio-admin +0 -2447
  80. rucio_clients-35.6.0/lib/rucio/common/cache.py +0 -74
  81. rucio_clients-35.6.0/lib/rucio/common/extra.py +0 -36
  82. rucio_clients-35.6.0/lib/rucio/common/schema/atlas.py +0 -413
  83. rucio_clients-35.6.0/lib/rucio/common/schema/belleii.py +0 -408
  84. rucio_clients-35.6.0/lib/rucio/common/schema/domatpc.py +0 -401
  85. rucio_clients-35.6.0/lib/rucio/common/schema/escape.py +0 -426
  86. rucio_clients-35.6.0/lib/rucio/common/schema/icecube.py +0 -406
  87. rucio_clients-35.6.0/lib/rucio/vcsversion.py +0 -11
  88. rucio_clients-35.6.0/tests/test_common_types.py +0 -50
  89. rucio_clients-35.6.0/tests/test_didtype.py +0 -96
  90. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/ChangeLog +0 -0
  91. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/LICENSE +0 -0
  92. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/MANIFEST.in +0 -0
  93. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/README.md +0 -0
  94. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/etc/rse-accounts.cfg.template +0 -0
  95. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/__init__.py +0 -0
  96. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/alembicrevision.py +0 -0
  97. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/__init__.py +0 -0
  98. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/accountclient.py +0 -0
  99. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/accountlimitclient.py +0 -0
  100. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/client.py +0 -0
  101. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/configclient.py +0 -0
  102. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/credentialclient.py +0 -0
  103. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/didclient.py +0 -0
  104. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/diracclient.py +0 -0
  105. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/exportclient.py +0 -0
  106. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/fileclient.py +0 -0
  107. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/importclient.py +0 -0
  108. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/lifetimeclient.py +0 -0
  109. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/lockclient.py +0 -0
  110. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/metaconventionsclient.py +0 -0
  111. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/pingclient.py +0 -0
  112. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/replicaclient.py +0 -0
  113. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/requestclient.py +0 -0
  114. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/ruleclient.py +0 -0
  115. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/scopeclient.py +0 -0
  116. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/subscriptionclient.py +0 -0
  117. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/client/touchclient.py +0 -0
  118. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/__init__.py +0 -0
  119. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/constraints.py +0 -0
  120. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/pcache.py +0 -0
  121. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/policy.py +0 -0
  122. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/schema/generic.py +0 -0
  123. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/schema/generic_multi_vo.py +0 -0
  124. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/stomp_utils.py +0 -0
  125. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/common/stopwatch.py +0 -0
  126. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/__init__.py +0 -0
  127. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/cache.py +0 -0
  128. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/dummy.py +0 -0
  129. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/globus.py +0 -0
  130. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/http_cache.py +0 -0
  131. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/mock.py +0 -0
  132. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/ngarc.py +0 -0
  133. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/srm.py +0 -0
  134. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/storm.py +0 -0
  135. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/lib/rucio/rse/protocols/webdav.py +0 -0
  136. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/pylintrc +0 -0
  137. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/setup.cfg +0 -0
  138. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_abacus_account.py +0 -0
  139. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_abacus_collection_replica.py +0 -0
  140. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_abacus_rse.py +0 -0
  141. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_account.py +0 -0
  142. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_account_limits.py +0 -0
  143. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_archive.py +0 -0
  144. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_auditor.py +0 -0
  145. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_auditor_hdfs.py +0 -0
  146. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_auditor_srmdumps.py +0 -0
  147. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_authentication.py +0 -0
  148. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_automatix.py +0 -0
  149. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_bad_replica.py +0 -0
  150. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_bb8.py +0 -0
  151. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_boolean.py +0 -0
  152. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_clients.py +0 -0
  153. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_config.py +0 -0
  154. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_conveyor_submitter.py +0 -0
  155. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_counter.py +0 -0
  156. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_credential.py +0 -0
  157. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_curl.py +0 -0
  158. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_daemons.py +0 -0
  159. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_dataset_replicas.py +0 -0
  160. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_db.py +0 -0
  161. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_did.py +0 -0
  162. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_did_meta_plugins.py +0 -0
  163. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_dumper.py +0 -0
  164. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_dumper_consistency.py +0 -0
  165. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_dumper_data_model.py +0 -0
  166. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_dumper_path_parsing.py +0 -0
  167. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_filter_engine.py +0 -0
  168. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_gateway_external_representation.py +0 -0
  169. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_heartbeat.py +0 -0
  170. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_hermes.py +0 -0
  171. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_identity.py +0 -0
  172. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_import_export.py +0 -0
  173. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_judge_cleaner.py +0 -0
  174. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_judge_evaluator.py +0 -0
  175. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_judge_injector.py +0 -0
  176. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_judge_repairer.py +0 -0
  177. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_lifetime.py +0 -0
  178. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_message.py +0 -0
  179. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_meta_conventions.py +0 -0
  180. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_meta_did.py +0 -0
  181. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_module_import.py +0 -0
  182. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_monitor.py +0 -0
  183. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_naming_convention.py +0 -0
  184. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_oauthmanager.py +0 -0
  185. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_oidc.py +0 -0
  186. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_permission.py +0 -0
  187. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_pfns.py +0 -0
  188. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_ping.py +0 -0
  189. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_preparer.py +0 -0
  190. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_qos.py +0 -0
  191. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_quarantined_replica.py +0 -0
  192. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_reaper.py +0 -0
  193. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_redirect.py +0 -0
  194. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_replica.py +0 -0
  195. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_replica_sorting.py +0 -0
  196. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_request.py +0 -0
  197. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_root_proxy.py +0 -0
  198. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_expression_parser.py +0 -0
  199. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_protocol_gfal2.py +0 -0
  200. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_protocol_gfal2_impl.py +0 -0
  201. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_protocol_posix.py +0 -0
  202. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_protocol_srm.py +0 -0
  203. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_protocol_webdav.py +0 -0
  204. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_protocol_xrootd.py +0 -0
  205. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rse_selector.py +0 -0
  206. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_rule.py +0 -0
  207. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_scope.py +0 -0
  208. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_subscription.py +0 -0
  209. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_throttler.py +0 -0
  210. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_tpc.py +0 -0
  211. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_trace.py +0 -0
  212. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_transfer.py +0 -0
  213. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_transfer_plugins.py +0 -0
  214. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tests/test_undertaker.py +0 -0
  215. {rucio_clients-35.6.0 → rucio_clients-36.0.0.post1}/tools/merge_rucio_configs.py +0 -0
@@ -67,6 +67,7 @@ Individual contributors to the source code
67
67
  - Aksel Lunde Aase <aksel.lunde.aase@gmail.com>, 2022
68
68
  - Elena Gazzarrini <gazzarrini.elena@gmail.com>, 2022-2023
69
69
  - Maximilian Linhoff, <maximilian.linhoff@tu-dortmund.de>, 2024
70
+ - Eric Banzuzi, <eric.banzuzi@gmail.com>, 2024
70
71
 
71
72
  Organisations employing contributors
72
73
  ------------------------------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rucio-clients
3
- Version: 35.6.0
3
+ Version: 36.0.0.post1
4
4
  Summary: Rucio Client Lite Package
5
5
  Home-page: https://rucio.cern.ch/
6
6
  Author: Rucio
@@ -24,6 +24,8 @@ Requires-Dist: urllib3>=1.26.18
24
24
  Requires-Dist: dogpile-cache>=1.2.2
25
25
  Requires-Dist: tabulate>=0.9.0
26
26
  Requires-Dist: jsonschema>=4.20.0
27
+ Requires-Dist: packaging>=24.1
28
+ Requires-Dist: rich>=13.7.1
27
29
  Provides-Extra: ssh
28
30
  Requires-Dist: paramiko>=3.4.0; extra == "ssh"
29
31
  Provides-Extra: kerberos
@@ -0,0 +1,118 @@
1
+ #!/usr/bin/env python
2
+ # Copyright European Organization for Nuclear Research (CERN) since 2012
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ import argparse
17
+ import sys
18
+ from typing import Optional
19
+
20
+ from rucio.client.commands.bin_legacy.rucio import main as main_legacy
21
+ from rucio.client.commands.command import main
22
+
23
+
24
+ def make_warning():
25
+ base_warning = "\nWARNING: This method is being deprecated."
26
+ new_command = map_legacy_command()
27
+ if new_command is not None:
28
+ warning = f"{base_warning}\nPlease replace your command with `rucio {' '.join(new_command)}`.\n"
29
+ else:
30
+ warning = base_warning + "\nPlease view rucio -h for an updated help menu.\n"
31
+
32
+ return warning
33
+
34
+
35
+ def map_legacy_command() -> Optional[list[str]]:
36
+ try:
37
+ command = [arg for arg in sys.argv if arg[0] != "-" or arg in ("-h", "--version")][1]
38
+ except IndexError:
39
+ command = None
40
+
41
+ new_command = None
42
+ if command not in ("-h", "--version", None):
43
+ command_map = {
44
+ "list-file-replicas": ["replica", "list"],
45
+ "list-dataset-replicas": ["replica", "dataset"],
46
+ "add-dataset": ["did", "add", "--type dataset"],
47
+ "add-container": ["did", "add", "--type container"],
48
+ "attach": ["did", "content", "add"],
49
+ "detach": ["did", "content", "remove"],
50
+ "ls": ["did", "list"],
51
+ "list-dids": ["did", "list"],
52
+ "list-parent-dids": ["did", "show", "--parent"],
53
+ "list-scopes": ["scope", "list"],
54
+ "close": ["did", "update", "--close"],
55
+ "reopen": ["did", "update", "--open"],
56
+ "stat": ["did", "show"],
57
+ "erase": ["did", "remove"],
58
+ "list-content": ["did", "content", "list"],
59
+ "list-content-history": ["did", "content", "history"],
60
+ "upload": ["upload"],
61
+ "get": ["download"],
62
+ "download": ["download"],
63
+ "get-metadata": ["did", "metadata", "list"],
64
+ "set-metadata": ["did", "metadata", "add"],
65
+ "delete-metadata": ["did", "metadata", "remove"],
66
+ "list-rse-usage": ["rse", "show"],
67
+ "list-account-usage": ["account", "usage"],
68
+ "list-account-limits": ["account", "limit", "list"],
69
+ "add-rule": ["rule", "add"],
70
+ "delete-rule": ["rule", "remove"],
71
+ "rule-info": ["rule", "info"],
72
+ "list-rules": ["rule", "list"],
73
+ "list-rules-history": ["rule", "history"],
74
+ "update-rule": ["rule", "update"],
75
+ "move-rule": ["rule", "update", "--move"],
76
+ "list-rses": ["rse", "list"],
77
+ "list-suspicious-replicas": ["replica", "state", "suspicious"],
78
+ "list-rse-attributes": ["rse", "attribute", "list"],
79
+ "touch": ["did", "update", "--touch"],
80
+ "add-lifetime-exception": ["lifetime-exception", "add"],
81
+ }
82
+ try:
83
+ new_command = command_map[command]
84
+ except KeyError:
85
+ pass
86
+
87
+ return new_command
88
+
89
+
90
+ if __name__ == "__main__":
91
+ commands = ("-h", "--help", "--version", "account", "config", "did", "replica", "rse", "rule", "scope", "subscription", "ping", "whoami", "test-server", "lifetime-exception", "upload", "download")
92
+ first_command = [arg for arg in sys.argv if arg[0] != "-" or arg in ("-h", "--help", "--version")][1]
93
+ is_legacy = '--legacy' in sys.argv
94
+
95
+ if (first_command in commands) and not is_legacy:
96
+ main()
97
+
98
+ elif is_legacy:
99
+ warning = make_warning()
100
+ print(warning)
101
+ sys.argv.pop(sys.argv.index('--legacy'))
102
+ main_legacy()
103
+
104
+ else:
105
+ warning = make_warning()
106
+ print(warning)
107
+ try:
108
+ main_legacy()
109
+ # Make a custom warning - show the new help menu when invalid commands are called.
110
+ except argparse.ArgumentError:
111
+ print("Invalid argument(s) - %s " % sys.argv[1:])
112
+ command = map_legacy_command()
113
+ if command is not None:
114
+ sys.argv = ["rucio"] + command + ["-h"]
115
+ else:
116
+ sys.argv = ["rucio", "-h"]
117
+
118
+ main()
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env python
2
+ # Copyright European Organization for Nuclear Research (CERN) since 2012
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ import sys
16
+
17
+ from rucio.client.commands.bin_legacy.rucio_admin import main as main_legacy
18
+
19
+
20
+ def make_warning():
21
+ base_warning = "\nWARNING: This method is being deprecated."
22
+ args = [arg for arg in sys.argv if arg[0] != "-" or arg in ("-h", "--help", "--version")]
23
+ first_command = args[1]
24
+ try:
25
+ second_command = args[2]
26
+ except IndexError:
27
+ second_command = "-h"
28
+
29
+ if first_command not in ("-h", "--version", "--help"):
30
+ command_map = {
31
+ "data": {"-h": "did -h", "import": "did upload", "export": "did download"},
32
+ "account": {
33
+ "-h": "account -h",
34
+ "add": "account add",
35
+ "delete": "account remove",
36
+ "info": "account show",
37
+ "update": "account update",
38
+ "set-limits": "account limit add",
39
+ "get-limits": "account limit list",
40
+ "delete-limits": "account limit remove",
41
+ "ban": "account update --ban True",
42
+ "unban": "account update --ban False",
43
+ "list-attributes": "account attribute list",
44
+ "add-attribute": "account attribute add",
45
+ "delete-attribute": "account attribute remove",
46
+ },
47
+ "identity": {"-h": "account identity -h", "add": "account identity add", "delete": "account identity remove"},
48
+ "rse": {
49
+ "-h": "rse -h",
50
+ "add": "rse add",
51
+ "list": "rse",
52
+ "update": "rse update",
53
+ "info": "rse info",
54
+ "set-attribute": "rse attribute add",
55
+ "delete-attribute": "rse attribute remove",
56
+ "delete-distance": "rse distance remove",
57
+ "get-distance": "rse distance list",
58
+ "get-attribute": "rse attribute list",
59
+ "add-protocol": "rse protocol add",
60
+ "delete-protocol": "rse protocol remove",
61
+ "delete": "rse remove",
62
+ "add-qos-policy": "rse qos add",
63
+ "add-distance": "rse distance add",
64
+ "delete-qos-policy": "rse qos remove",
65
+ "list-qos-policies": "rse qos list",
66
+ "set-limit": "rse limit add",
67
+ "delete-limit": "rse limit remove",
68
+ },
69
+ "scope": {"-h": "scope -h", "add": "scope add", "list": "scope list"},
70
+ "config": {"-h": "config -h", "get": "config list", "set": "config add", "delete": "config remove"},
71
+ "subscription": {"-h": "subscription -h", "add": "subscription add", "list": "subscription", "update": "subscription update", "reevaluate": "subscription touch"},
72
+ "replicas": {"-h": "replica -h", "quarantine": "replica state quarantine", "declare-bad": "replica state bad", "declare-temporary-unavailable": "replica state temp-unavailable", "list-pfns": "replica pfn", "set-tombstone": "replica tombstone"},
73
+ }
74
+ try:
75
+ new_command = command_map[first_command]
76
+ new_command = new_command[second_command]
77
+ except KeyError:
78
+ new_command = "-h"
79
+
80
+ warning = f"{base_warning}\nPlease replace your command with `rucio {new_command}`.\n"
81
+ else:
82
+ warning = base_warning + "\nPlease view rucio -h for an updated help menu.\n"
83
+
84
+ print(warning)
85
+
86
+
87
+ if __name__ == "__main__":
88
+ make_warning()
89
+ main_legacy()
@@ -29,8 +29,9 @@ request_retries = 3
29
29
  auth_type = x509_proxy
30
30
 
31
31
  [policy]
32
- permission = atlas
33
- schema = atlas
32
+ package = atlas_rucio_policy_package
33
+ #permission = atlas
34
+ #schema = atlas
34
35
  lfn2pfn_algorithm_default = hash
35
36
  support = hn-atlas-dist-analysis-help@cern.ch
36
37
  support_rucio = https://github.com/rucio/rucio/issues/
@@ -229,9 +229,10 @@ panda_url = http://bigpanda.cern.ch/jobs/?category=analysis&jobstatus=running
229
229
  window = 604800
230
230
 
231
231
  [policy]
232
- package = ATLASRucioPolicy
232
+ package = atlas_rucio_policy_package
233
233
  permission = atlas
234
234
  schema = atlas
235
+ extract_scope = atlas
235
236
  lfn2pfn_algorithm_default = hash
236
237
  support = hn-atlas-dist-analysis-help@cern.ch
237
238
  support_rucio = https://github.com/rucio/rucio/issues/
@@ -22,13 +22,11 @@ import os
22
22
  import secrets
23
23
  import sys
24
24
  import time
25
- from collections.abc import Generator
26
25
  from configparser import NoOptionError, NoSectionError
27
- from logging import Logger
28
26
  from os import environ, fdopen, geteuid, makedirs, path
29
27
  from shutil import move
30
28
  from tempfile import mkstemp
31
- from typing import Any, Optional
29
+ from typing import TYPE_CHECKING, Any, Optional
32
30
  from urllib.parse import urlparse
33
31
 
34
32
  import requests
@@ -44,6 +42,10 @@ from rucio.common.exception import CannotAuthenticate, ClientProtocolNotSupporte
44
42
  from rucio.common.extra import import_extras
45
43
  from rucio.common.utils import build_url, get_tmp_dir, my_key_generator, parse_response, setup_logger, ssh_sign
46
44
 
45
+ if TYPE_CHECKING:
46
+ from collections.abc import Generator
47
+ from logging import Logger
48
+
47
49
  EXTRA_MODULES = import_extras(['requests_kerberos'])
48
50
 
49
51
  if EXTRA_MODULES['requests_kerberos']:
@@ -90,7 +92,7 @@ class BaseClient:
90
92
  timeout: Optional[int] = 600,
91
93
  user_agent: Optional[str] = 'rucio-clients',
92
94
  vo: Optional[str] = None,
93
- logger: Logger = LOG) -> None:
95
+ logger: 'Logger' = LOG) -> None:
94
96
  """
95
97
  Constructor of the BaseClient.
96
98
  :param rucio_host: The address of the rucio server, if None it is read from the config file.
@@ -364,7 +366,7 @@ class BaseClient:
364
366
  else:
365
367
  return exception.RucioException, "%s: %s" % (exc_cls, exc_msg)
366
368
 
367
- def _load_json_data(self, response: requests.Response) -> Generator[Any, Any, Any]:
369
+ def _load_json_data(self, response: requests.Response) -> 'Generator[Any, Any, Any]':
368
370
  """
369
371
  Helper method to correctly load json data based on the content type of the http response.
370
372
 
@@ -0,0 +1,25 @@
1
+ # Copyright European Organization for Nuclear Research (CERN) since 2012
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ from rucio.client.commands.account import Account # noqa: F401
15
+ from rucio.client.commands.command_base import CommandBase # noqa: F401
16
+ from rucio.client.commands.config import Config # noqa: F401
17
+ from rucio.client.commands.did import DID # noqa: F401
18
+ from rucio.client.commands.download import Download # noqa: F401
19
+ from rucio.client.commands.lifetime_exception import LifetimeException # noqa: F401
20
+ from rucio.client.commands.replica import Replica # noqa: F401
21
+ from rucio.client.commands.rse import RSE # noqa: F401
22
+ from rucio.client.commands.rule import Rule # noqa: F401
23
+ from rucio.client.commands.scope import Scope # noqa: F401
24
+ from rucio.client.commands.subscription import Subscription # noqa: F401
25
+ from rucio.client.commands.upload import Upload # noqa: F401
@@ -0,0 +1,219 @@
1
+ # Copyright European Organization for Nuclear Research (CERN) since 2012
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ from argparse import SUPPRESS
15
+ from typing import TYPE_CHECKING
16
+
17
+ from rucio.client.commands.bin_legacy.rucio import list_account_usage
18
+ from rucio.client.commands.bin_legacy.rucio_admin import (
19
+ add_account,
20
+ add_account_attribute,
21
+ ban_account,
22
+ delete_account,
23
+ delete_account_attribute,
24
+ delete_limits,
25
+ identity_add,
26
+ identity_delete,
27
+ info_account,
28
+ list_account_attributes,
29
+ list_accounts,
30
+ list_identities,
31
+ set_limits,
32
+ unban_account,
33
+ update_account,
34
+ )
35
+ from rucio.client.commands.command_base import CommandBase
36
+
37
+ if TYPE_CHECKING:
38
+ from argparse import ArgumentParser
39
+
40
+ from rucio.client.commands.utils import OperationDict
41
+
42
+
43
+ class Account(CommandBase):
44
+ def module_help(self) -> str:
45
+ return "Methods to add or change accounts for users, groups, and services. Used to assign privileges."
46
+
47
+ def usage_example(self) -> list[str]:
48
+ return [
49
+ "$ rucio account list # List all accounts on the instance",
50
+ "$ rucio account add --account user_jdoe --type USER # Create a new user account",
51
+ "$ rucio account update --account user_jdoe --email jdoe@cern.ch # Update jdoe's email",
52
+ "$ rucio account update --account jdoe --ban True # Ban jdoe",
53
+ "$ rucio account history --account root # Show all the usage history for the account root",
54
+ ]
55
+
56
+ def list_namespace(self, parser: "ArgumentParser") -> None:
57
+ parser.add_argument("--type", dest="account_type", help="Account Type", choices={"USER", "GROUP", "SERVICE"})
58
+ parser.add_argument("-a", "--account", dest="account", help="Account name")
59
+ parser.add_argument("--id", dest="identity", action="store", help="Identity (e.g. DN)")
60
+ parser.add_argument("--filters", dest="filters", action="store", help="Filter arguments in form `key=value,another_key=next_value`")
61
+
62
+ def add_namespace(self, parser: "ArgumentParser") -> None:
63
+ parser.add_argument("--type", dest="accounttype", help="Account Type (USER, GROUP, SERVICE)", required=True)
64
+ parser.add_argument("-a", "--account", dest="account", help="Account name", required=True)
65
+ parser.add_argument("--email", dest="accountemail", help="Add an email address associated with the account")
66
+
67
+ def show_namespace(self, parser: "ArgumentParser") -> None:
68
+ parser.add_argument("-a", "--account", dest="account", help="Account name", required=True)
69
+
70
+ def update_namespace(self, parser: "ArgumentParser") -> None:
71
+ parser.add_argument("-a", "--account", help="Account name", required=True)
72
+ parser.add_argument("--email", help="Account email")
73
+ parser.add_argument("--ban", type=bool, choices=(True, False), help='Ban the account, to disable it. Use --ban False to unban.', default=None)
74
+
75
+ def remove_namespace(self, parser: "ArgumentParser") -> None:
76
+ parser.add_argument("-a", "--account", dest="acnt", action="store", help="Account name", required=True)
77
+
78
+ def _operations(self) -> dict[str, "OperationDict"]:
79
+ return {
80
+ "list": {"call": self.list_, "docs": "List accounts", "namespace": self.list_namespace},
81
+ "add": {"call": self.add, "docs": "Add a new account", "namespace": self.add_namespace},
82
+ "show": {"call": self.show, "docs": "Get all stats on an account, including status, account type, and dates of creation and updates", "namespace": self.show_namespace},
83
+ "remove": {"call": self.remove, "docs": "Delete an account", "namespace": self.remove_namespace},
84
+ "update": {"call": self.update, "docs": "Change the basic account settings", "namespace": self.update_namespace},
85
+ }
86
+
87
+ def implemented_subcommands(self) -> dict[str, type[CommandBase]]:
88
+ return {"attribute": Attribute, "limit": Limit, "identity": Identity}
89
+
90
+ def list_(self):
91
+ list_accounts(self.args, self.client, self.logger, self.console, self.spinner)
92
+
93
+ def add(self):
94
+ add_account(self.args, self.client, self.logger, self.console, self.spinner)
95
+
96
+ def remove(self):
97
+ delete_account(self.args, self.client, self.logger, self.console, self.spinner)
98
+
99
+ def show(self):
100
+ info_account(self.args, self.client, self.logger, self.console, self.spinner)
101
+
102
+ def update(self):
103
+ if self.args.ban is not None:
104
+ if self.args.ban:
105
+ ban_account(self.args, self.client, self.logger, self.console, self.spinner)
106
+ else:
107
+ unban_account(self.args, self.client, self.logger, self.console, self.spinner)
108
+ else:
109
+ # Temp fix to allow specific kwargs
110
+ self.args.key = "email"
111
+ self.args.value = self.args.email
112
+ update_account(self.args, self.client, self.logger, self.console, self.spinner)
113
+
114
+
115
+ class Attribute(Account):
116
+ def module_help(self) -> str:
117
+ return "Add additional key/value pairs associated with an account."
118
+
119
+ def implemented_subcommands(self) -> dict[str, type[CommandBase]]:
120
+ return {}
121
+
122
+ def namespace(self, subparser):
123
+ subparser.add_argument("-a", "--account", help="Account name")
124
+ subparser.add_argument("--key", dest="key", action="store", help="Attribute key")
125
+ subparser.add_argument("--value", dest="value", action="store", help="Attribute value")
126
+
127
+ def usage_example(self) -> list[str]:
128
+ return ["$ rucio account attribute list --account jdoe # Show all attributes for jdoe",
129
+ "$ rucio -v account attribute add --account jdoe --key test_key --value true # Set test_key = true for jdoe"]
130
+
131
+ def _operations(self) -> dict[str, "OperationDict"]:
132
+ return {
133
+ "list": {"call": self.list_, "docs": "List all account attributes"},
134
+ "add": {"call": self.add, "docs": "Add a new attribute to an account or update an existing one"},
135
+ "remove": {"call": self.remove, "docs": "Remove an existing account attribute"},
136
+ }
137
+
138
+ def list_(self):
139
+ list_account_attributes(self.args, self.client, self.logger, self.console, self.spinner)
140
+
141
+ def add(self):
142
+ add_account_attribute(self.args, self.client, self.logger, self.console, self.spinner)
143
+
144
+ def remove(self):
145
+ delete_account_attribute(self.args, self.client, self.logger, self.console, self.spinner)
146
+
147
+
148
+ class Limit(Account):
149
+ def module_help(self) -> str:
150
+ return "Manage storage limits for an account at a given RSE."
151
+
152
+ def namespace(self, parser: "ArgumentParser") -> None:
153
+ parser.add_argument("-a", "--account", dest="account", help="Account name", required=True)
154
+ parser.add_argument("--rses", "--rse-exp", dest='rse', action="store", help="RSE expression")
155
+ parser.add_argument("--bytes", action="store", help='Value can be specified in bytes ("10000"), with a storage unit ("10GB"), or "infinity"')
156
+ parser.add_argument("--locality", nargs="?", default="local", choices=["local", "global"], help="Global or local limit scope")
157
+ parser.add_argument("--human", default=True, help=SUPPRESS)
158
+
159
+ def _operations(self) -> dict[str, "OperationDict"]:
160
+ return {
161
+ "list": {"call": self.list_, "docs": "Show limits and current utilization for an account at a given RSE", "namespace": self.namespace},
162
+ "add": {"call": self.add, "docs": "Add or update limits for an account", "namespace": self.namespace}, # TODO Add and update should become different operations
163
+ "remove": {"call": self.remove, "docs": "Remove all limits for given account/rse/locality", "namespace": self.namespace},
164
+ }
165
+
166
+ def implemented_subcommands(self) -> dict[str, type[CommandBase]]:
167
+ return {}
168
+
169
+ def usage_example(self) -> list[str]:
170
+ return super().usage_example()
171
+
172
+ def list_(self):
173
+ self.args.usage_account = self.args.account
174
+ list_account_usage(self.args, self.client, self.logger, self.console, self.spinner)
175
+
176
+ def add(self):
177
+ set_limits(self.args, self.client, self.logger, self.console, self.spinner)
178
+
179
+ def remove(self):
180
+ delete_limits(self.args, self.client, self.logger, self.console, self.spinner)
181
+
182
+
183
+ class Identity(Account):
184
+ def module_help(self) -> str:
185
+ return "Manage identities on an account."
186
+
187
+ def namespace(self, parser: "ArgumentParser") -> None:
188
+ parser.add_argument("--account", dest="account", action="store", help="Account name", required=True)
189
+ parser.add_argument("--type", dest="authtype", action="store", choices=["X509", "GSS", "USERPASS", "SSH", "SAML", "OIDC"], help="Authentication type")
190
+ parser.add_argument("--id", dest="identity", action="store", help="Identity as a DNs for X509 IDs.")
191
+ parser.add_argument("--email", dest="email", action="store", help="Email address associated with the identity")
192
+ parser.add_argument("--password", dest="password", action="store", help="Password if authtype is USERPASS")
193
+ parser.add_argument("--human", default=True, help=SUPPRESS)
194
+
195
+ def _operations(self) -> dict[str, "OperationDict"]:
196
+ return {
197
+ "list": {"call": self.list_, "docs": "Display existing identities for an account", "namespace": self.namespace},
198
+ "add": {"call": self.add, "docs": "Grant identity access to an account", "namespace": self.namespace},
199
+ "remove": {"call": self.remove, "docs": "Revoke identity access for an account", "namespace": self.namespace},
200
+ }
201
+
202
+ def usage_example(self) -> list[str]:
203
+ return [
204
+ "$ rucio account identity list --account jdoe # List all auth identities for jdoe",
205
+ "$ rucio account identity add --account jdoe --type GSS --email jdoe@cern.ch --id jdoe@fnal.ch # Add a new GSS auth",
206
+ "$ rucio account identity add --account jdoe --type X509 --id 'CN=Joe Doe,CN=707658,CN=jdoe,OU=Users,OU=Organic Units,DC=cern,DC=ch' --email jdoe@cern.ch # Add a new X509 auth",
207
+ ]
208
+
209
+ def implemented_subcommands(self) -> dict[str, type[CommandBase]]:
210
+ return {}
211
+
212
+ def list_(self):
213
+ list_identities(self.args, self.client, self.logger, self.console, self.spinner)
214
+
215
+ def add(self):
216
+ identity_add(self.args, self.client, self.logger, self.console, self.spinner)
217
+
218
+ def remove(self):
219
+ identity_delete(self.args, self.client, self.logger, self.console, self.spinner)