rucio 37.5.0__py3-none-any.whl → 37.7.0__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (202) hide show
  1. rucio/cli/bin_legacy/rucio.py +41 -22
  2. rucio/cli/bin_legacy/rucio_admin.py +1 -1
  3. rucio/cli/did.py +2 -2
  4. rucio/cli/rse.py +2 -3
  5. rucio/cli/rule.py +9 -5
  6. rucio/cli/subscription.py +1 -1
  7. rucio/client/baseclient.py +9 -4
  8. rucio/client/didclient.py +16 -16
  9. rucio/client/downloadclient.py +16 -15
  10. rucio/client/exportclient.py +45 -4
  11. rucio/client/lockclient.py +3 -3
  12. rucio/client/pingclient.py +35 -4
  13. rucio/client/replicaclient.py +2 -2
  14. rucio/client/touchclient.py +3 -2
  15. rucio/client/uploadclient.py +728 -183
  16. rucio/common/cache.py +1 -2
  17. rucio/common/client.py +4 -30
  18. rucio/common/config.py +27 -3
  19. rucio/common/constants.py +5 -1
  20. rucio/common/didtype.py +2 -2
  21. rucio/common/dumper/__init__.py +1 -1
  22. rucio/common/pcache.py +20 -25
  23. rucio/common/plugins.py +12 -19
  24. rucio/common/policy.py +3 -2
  25. rucio/common/schema/__init__.py +11 -8
  26. rucio/common/types.py +7 -5
  27. rucio/common/utils.py +1 -1
  28. rucio/core/account.py +2 -1
  29. rucio/core/account_limit.py +3 -2
  30. rucio/core/authentication.py +1 -1
  31. rucio/core/credential.py +1 -1
  32. rucio/core/did.py +62 -61
  33. rucio/core/did_meta_plugins/__init__.py +10 -10
  34. rucio/core/did_meta_plugins/did_column_meta.py +9 -9
  35. rucio/core/did_meta_plugins/did_meta_plugin_interface.py +3 -3
  36. rucio/core/did_meta_plugins/elasticsearch_meta.py +7 -7
  37. rucio/core/did_meta_plugins/json_meta.py +2 -2
  38. rucio/core/did_meta_plugins/mongo_meta.py +9 -9
  39. rucio/core/did_meta_plugins/postgres_meta.py +7 -7
  40. rucio/core/dirac.py +3 -2
  41. rucio/core/distance.py +2 -1
  42. rucio/core/exporter.py +3 -2
  43. rucio/core/importer.py +5 -5
  44. rucio/core/lifetime_exception.py +2 -2
  45. rucio/core/lock.py +7 -7
  46. rucio/core/meta_conventions.py +2 -2
  47. rucio/core/monitor.py +1 -1
  48. rucio/core/naming_convention.py +1 -1
  49. rucio/core/nongrid_trace.py +2 -2
  50. rucio/core/oidc.py +2 -2
  51. rucio/core/permission/__init__.py +9 -6
  52. rucio/core/permission/generic.py +2 -2
  53. rucio/core/permission/generic_multi_vo.py +2 -2
  54. rucio/core/replica.py +22 -22
  55. rucio/core/request.py +2 -2
  56. rucio/core/rse.py +7 -7
  57. rucio/core/rule.py +38 -38
  58. rucio/core/rule_grouping.py +2 -3
  59. rucio/core/scope.py +1 -1
  60. rucio/core/trace.py +2 -2
  61. rucio/core/transfer.py +2 -2
  62. rucio/core/vo.py +2 -1
  63. rucio/daemons/atropos/atropos.py +2 -1
  64. rucio/daemons/auditor/__init__.py +1 -1
  65. rucio/daemons/automatix/automatix.py +5 -5
  66. rucio/daemons/badreplicas/minos.py +12 -5
  67. rucio/daemons/badreplicas/minos_temporary_expiration.py +5 -2
  68. rucio/daemons/badreplicas/necromancer.py +9 -3
  69. rucio/daemons/bb8/bb8.py +2 -1
  70. rucio/daemons/bb8/common.py +1 -1
  71. rucio/daemons/bb8/nuclei_background_rebalance.py +3 -3
  72. rucio/daemons/bb8/t2_background_rebalance.py +1 -1
  73. rucio/daemons/cache/consumer.py +1 -1
  74. rucio/daemons/conveyor/common.py +3 -3
  75. rucio/daemons/conveyor/finisher.py +13 -4
  76. rucio/daemons/conveyor/poller.py +5 -2
  77. rucio/daemons/conveyor/receiver.py +1 -1
  78. rucio/daemons/conveyor/submitter.py +2 -1
  79. rucio/daemons/follower/follower.py +1 -1
  80. rucio/daemons/hermes/hermes.py +29 -8
  81. rucio/daemons/judge/cleaner.py +2 -2
  82. rucio/daemons/judge/evaluator.py +7 -7
  83. rucio/daemons/judge/injector.py +2 -2
  84. rucio/daemons/judge/repairer.py +2 -2
  85. rucio/daemons/reaper/dark_reaper.py +5 -4
  86. rucio/daemons/reaper/reaper.py +7 -7
  87. rucio/daemons/replicarecoverer/suspicious_replica_recoverer.py +4 -4
  88. rucio/daemons/storage/consistency/actions.py +3 -3
  89. rucio/daemons/tracer/kronos.py +3 -2
  90. rucio/daemons/transmogrifier/transmogrifier.py +71 -69
  91. rucio/daemons/undertaker/undertaker.py +8 -7
  92. rucio/db/sqla/constants.py +4 -3
  93. rucio/db/sqla/migrate_repo/versions/3082b8cef557_add_naming_convention_table_and_closed_.py +1 -1
  94. rucio/db/sqla/migrate_repo/versions/4df2c5ddabc0_remove_temporary_dids.py +1 -1
  95. rucio/db/sqla/migrate_repo/versions/c129ccdb2d5_add_lumiblocknr_to_dids.py +1 -1
  96. rucio/db/sqla/models.py +3 -3
  97. rucio/db/sqla/session.py +7 -7
  98. rucio/db/sqla/util.py +3 -2
  99. rucio/gateway/account.py +77 -101
  100. rucio/gateway/account_limit.py +90 -116
  101. rucio/gateway/authentication.py +9 -8
  102. rucio/gateway/config.py +11 -10
  103. rucio/gateway/credential.py +2 -1
  104. rucio/gateway/did.py +58 -58
  105. rucio/gateway/dirac.py +3 -2
  106. rucio/gateway/exporter.py +2 -1
  107. rucio/gateway/heartbeat.py +3 -2
  108. rucio/gateway/identity.py +4 -3
  109. rucio/gateway/importer.py +2 -1
  110. rucio/gateway/lifetime_exception.py +5 -4
  111. rucio/gateway/lock.py +6 -5
  112. rucio/gateway/meta_conventions.py +3 -2
  113. rucio/gateway/permission.py +2 -1
  114. rucio/gateway/quarantined_replica.py +2 -1
  115. rucio/gateway/replica.py +20 -20
  116. rucio/gateway/request.py +10 -10
  117. rucio/gateway/rse.py +27 -26
  118. rucio/gateway/rule.py +12 -11
  119. rucio/gateway/scope.py +4 -3
  120. rucio/gateway/subscription.py +7 -6
  121. rucio/gateway/vo.py +5 -4
  122. rucio/rse/__init__.py +7 -6
  123. rucio/rse/protocols/ngarc.py +2 -2
  124. rucio/rse/protocols/srm.py +1 -1
  125. rucio/rse/protocols/webdav.py +8 -1
  126. rucio/rse/rsemanager.py +5 -4
  127. rucio/rse/translation.py +2 -2
  128. rucio/tests/common.py +6 -5
  129. rucio/vcsversion.py +3 -3
  130. rucio/web/rest/flaskapi/v1/accountlimits.py +5 -5
  131. rucio/web/rest/flaskapi/v1/accounts.py +20 -20
  132. rucio/web/rest/flaskapi/v1/archives.py +4 -3
  133. rucio/web/rest/flaskapi/v1/common.py +5 -4
  134. rucio/web/rest/flaskapi/v1/dids.py +382 -331
  135. rucio/web/rest/flaskapi/v1/lifetime_exceptions.py +5 -5
  136. rucio/web/rest/flaskapi/v1/locks.py +13 -13
  137. rucio/web/rest/flaskapi/v1/main.py +1 -0
  138. rucio/web/rest/flaskapi/v1/redirect.py +2 -2
  139. rucio/web/rest/flaskapi/v1/replicas.py +16 -16
  140. rucio/web/rest/flaskapi/v1/requests.py +16 -16
  141. rucio/web/rest/flaskapi/v1/subscriptions.py +7 -7
  142. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-abacus-account +8 -1
  143. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-abacus-rse +8 -1
  144. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-auditor +1 -1
  145. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-conveyor-throttler +7 -1
  146. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-follower +1 -1
  147. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-judge-cleaner +9 -1
  148. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-necromancer +7 -1
  149. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-replica-recoverer +31 -9
  150. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-undertaker +8 -2
  151. {rucio-37.5.0.dist-info → rucio-37.7.0.dist-info}/METADATA +1 -1
  152. {rucio-37.5.0.dist-info → rucio-37.7.0.dist-info}/RECORD +202 -202
  153. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/alembic.ini.template +0 -0
  154. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/alembic_offline.ini.template +0 -0
  155. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/globus-config.yml.template +0 -0
  156. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/ldap.cfg.template +0 -0
  157. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/mail_templates/rule_approval_request.tmpl +0 -0
  158. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/mail_templates/rule_approved_admin.tmpl +0 -0
  159. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/mail_templates/rule_approved_user.tmpl +0 -0
  160. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/mail_templates/rule_denied_admin.tmpl +0 -0
  161. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/mail_templates/rule_denied_user.tmpl +0 -0
  162. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/mail_templates/rule_ok_notification.tmpl +0 -0
  163. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/rse-accounts.cfg.template +0 -0
  164. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/rucio.cfg.atlas.client.template +0 -0
  165. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/rucio.cfg.template +0 -0
  166. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/etc/rucio_multi_vo.cfg.template +0 -0
  167. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/requirements.server.txt +0 -0
  168. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/tools/bootstrap.py +0 -0
  169. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/tools/merge_rucio_configs.py +0 -0
  170. {rucio-37.5.0.data → rucio-37.7.0.data}/data/rucio/tools/reset_database.py +0 -0
  171. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio +0 -0
  172. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-abacus-collection-replica +0 -0
  173. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-admin +0 -0
  174. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-atropos +0 -0
  175. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-automatix +0 -0
  176. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-bb8 +0 -0
  177. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-cache-client +0 -0
  178. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-cache-consumer +0 -0
  179. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-conveyor-finisher +0 -0
  180. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-conveyor-poller +0 -0
  181. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-conveyor-preparer +0 -0
  182. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-conveyor-receiver +0 -0
  183. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-conveyor-stager +0 -0
  184. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-conveyor-submitter +0 -0
  185. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-dark-reaper +0 -0
  186. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-dumper +0 -0
  187. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-hermes +0 -0
  188. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-judge-evaluator +0 -0
  189. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-judge-injector +0 -0
  190. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-judge-repairer +0 -0
  191. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-kronos +0 -0
  192. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-minos +0 -0
  193. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-minos-temporary-expiration +0 -0
  194. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-oauth-manager +0 -0
  195. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-reaper +0 -0
  196. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-rse-decommissioner +0 -0
  197. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-storage-consistency-actions +0 -0
  198. {rucio-37.5.0.data → rucio-37.7.0.data}/scripts/rucio-transmogrifier +0 -0
  199. {rucio-37.5.0.dist-info → rucio-37.7.0.dist-info}/WHEEL +0 -0
  200. {rucio-37.5.0.dist-info → rucio-37.7.0.dist-info}/licenses/AUTHORS.rst +0 -0
  201. {rucio-37.5.0.dist-info → rucio-37.7.0.dist-info}/licenses/LICENSE +0 -0
  202. {rucio-37.5.0.dist-info → rucio-37.7.0.dist-info}/top_level.txt +0 -0
rucio/gateway/did.py CHANGED
@@ -16,7 +16,7 @@ from copy import deepcopy
16
16
  from typing import TYPE_CHECKING, Any, Optional
17
17
 
18
18
  import rucio.gateway.permission
19
- from rucio.common.constants import RESERVED_KEYS
19
+ from rucio.common.constants import DEFAULT_VO, RESERVED_KEYS
20
20
  from rucio.common.exception import AccessDenied, InvalidObject, RucioException
21
21
  from rucio.common.schema import validate_schema
22
22
  from rucio.common.types import InternalAccount, InternalScope
@@ -40,14 +40,14 @@ def list_dids(
40
40
  offset: Optional[int] = None,
41
41
  long: bool = False,
42
42
  recursive: bool = False,
43
- vo: str = 'def',
43
+ vo: str = DEFAULT_VO,
44
44
  ) -> 'Iterator[dict[str, Any]]':
45
45
  """
46
- List dids in a scope.
46
+ List DIDs in a scope.
47
47
 
48
48
  :param scope: The scope name.
49
49
  :param filters: Filter arguments in form supported by the filter engine.
50
- :param did_type: The type of the did: all(container, dataset, file), collection(dataset or container), dataset, container
50
+ :param did_type: The type of the DID: all(container, dataset, file), collection(dataset or container), dataset, container
51
51
  :param ignore_case: Ignore case distinctions.
52
52
  :param limit: The maximum number of DIDs returned.
53
53
  :param offset: Offset number.
@@ -84,10 +84,10 @@ def add_did(
84
84
  lifetime: Optional[str] = None,
85
85
  dids: Optional['Sequence[dict[str, Any]]'] = None,
86
86
  rse: Optional[str] = None,
87
- vo: str = 'def',
87
+ vo: str = DEFAULT_VO,
88
88
  ) -> None:
89
89
  """
90
- Add data did.
90
+ Add data DID.
91
91
 
92
92
  :param scope: The scope name.
93
93
  :param name: The data identifier name.
@@ -96,7 +96,7 @@ def add_did(
96
96
  :param account: The account owner. If None, then issuer is selected as owner.
97
97
  :param statuses: Dictionary with statuses, e.g.g {'monotonic':True}.
98
98
  :meta: Meta-data associated with the data identifier is represented using key/value pairs in a dictionary.
99
- :rules: Replication rules associated with the data did. A list of dictionaries, e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].
99
+ :rules: Replication rules associated with the data DID. A list of dictionaries, e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].
100
100
  :param lifetime: DID's lifetime (in seconds).
101
101
  :param dids: The content.
102
102
  :param rse: The RSE name when registering replicas.
@@ -152,12 +152,12 @@ def add_did(
152
152
  def add_dids(
153
153
  dids: 'Sequence[dict[str, Any]]',
154
154
  issuer: str,
155
- vo: str = 'def',
155
+ vo: str = DEFAULT_VO,
156
156
  ) -> None:
157
157
  """
158
- Bulk Add did.
158
+ Bulk Add DID.
159
159
 
160
- :param dids: A list of dids.
160
+ :param dids: A list of DIDs.
161
161
  :param issuer: The issuer account.
162
162
  :param vo: The VO to act on.
163
163
  """
@@ -190,10 +190,10 @@ def attach_dids(
190
190
  name: str,
191
191
  attachment: dict[str, Any],
192
192
  issuer: str,
193
- vo='def',
193
+ vo: str = DEFAULT_VO,
194
194
  ) -> None:
195
195
  """
196
- Append content to data did.
196
+ Append content to data DID.
197
197
 
198
198
  :param attachment: The attachment.
199
199
  :param issuer: The issuer account.
@@ -237,10 +237,10 @@ def attach_dids_to_dids(
237
237
  attachments: 'Sequence[dict[str, Any]]',
238
238
  issuer: str,
239
239
  ignore_duplicate: bool = False,
240
- vo: str = 'def',
240
+ vo: str = DEFAULT_VO,
241
241
  ) -> None:
242
242
  """
243
- Append content to dids.
243
+ Append content to DIDs.
244
244
 
245
245
  :param attachments: The contents.
246
246
  :param issuer: The issuer account.
@@ -279,7 +279,7 @@ def detach_dids(
279
279
  name: str,
280
280
  dids: 'Sequence[dict[str, Any]]',
281
281
  issuer: str,
282
- vo: str = 'def',
282
+ vo: str = DEFAULT_VO,
283
283
  ) -> None:
284
284
  """
285
285
  Detach data identifier
@@ -309,7 +309,7 @@ def list_new_dids(
309
309
  thread: Optional[int] = None,
310
310
  total_threads: Optional[int] = None,
311
311
  chunk_size: int = 1000,
312
- vo: str = 'def',
312
+ vo: str = DEFAULT_VO,
313
313
  ) -> 'Iterator[dict[str, Any]]':
314
314
  """
315
315
  List recent identifiers.
@@ -333,7 +333,7 @@ def list_new_dids(
333
333
  def set_new_dids(
334
334
  dids: 'Sequence[dict[str, Any]]',
335
335
  new_flag: bool = True,
336
- vo: str = 'def',
336
+ vo: str = DEFAULT_VO,
337
337
  ) -> bool:
338
338
  """
339
339
  Set/reset the flag new
@@ -353,7 +353,7 @@ def set_new_dids(
353
353
  def list_content(
354
354
  scope: str,
355
355
  name: str,
356
- vo: str = 'def',
356
+ vo: str = DEFAULT_VO,
357
357
  ) -> 'Iterator[dict[str, Any]]':
358
358
  """
359
359
  List data identifier contents.
@@ -374,7 +374,7 @@ def list_content(
374
374
  def list_content_history(
375
375
  scope: str,
376
376
  name: str,
377
- vo='def',
377
+ vo: str = DEFAULT_VO,
378
378
  ) -> 'Iterator[dict[str, Any]]':
379
379
  """
380
380
  List data identifier contents history.
@@ -396,7 +396,7 @@ def list_content_history(
396
396
  def bulk_list_files(
397
397
  dids: 'Iterable[dict[str, Any]]',
398
398
  long: bool = False,
399
- vo: str = 'def',
399
+ vo: str = DEFAULT_VO,
400
400
  ) -> 'Iterator[dict[str, Any]]':
401
401
  """
402
402
  List file contents of a list of data identifiers.
@@ -418,7 +418,7 @@ def list_files(
418
418
  scope: str,
419
419
  name: str,
420
420
  long: bool,
421
- vo: str = 'def',
421
+ vo: str = DEFAULT_VO,
422
422
  ) -> 'Iterator[dict[str, Any]]':
423
423
  """
424
424
  List data identifier file contents.
@@ -442,7 +442,7 @@ def scope_list(
442
442
  scope: str,
443
443
  name: Optional[str] = None,
444
444
  recursive: bool = False,
445
- vo: str = 'def',
445
+ vo: str = DEFAULT_VO,
446
446
  ) -> 'Iterator[dict[str, Any]]':
447
447
  """
448
448
  List data identifiers in a scope.
@@ -466,17 +466,17 @@ def scope_list(
466
466
  yield ret_did
467
467
 
468
468
 
469
- def get_did(scope: str, name: str, dynamic_depth: Optional[DIDType] = None, vo: str = 'def') -> "dict[str, Any]":
469
+ def get_did(scope: str, name: str, dynamic_depth: Optional[DIDType] = None, vo: str = DEFAULT_VO) -> "dict[str, Any]":
470
470
  """
471
- Retrieve a single data did.
471
+ Retrieve a single data DID.
472
472
 
473
473
  :param scope: The scope name.
474
474
  :param name: The data identifier name.
475
475
  :param dynamic_depth: the DID type to use as source for estimation of this DIDs length/bytes.
476
- If set to None, or to a value which doesn't make sense (ex: requesting depth = CONTAINER for a did of type DATASET)
476
+ If set to None, or to a value which doesn't make sense (ex: requesting depth = CONTAINER for a DID of type DATASET)
477
477
  will not compute the size dynamically.
478
478
  :param vo: The VO to act on.
479
- :return did: Dictionary containing {'name', 'scope', 'type'}, Exception otherwise
479
+ :return DID: Dictionary containing {'name', 'scope', 'type'}, Exception otherwise
480
480
  """
481
481
 
482
482
  internal_scope = InternalScope(scope, vo=vo)
@@ -493,10 +493,10 @@ def set_metadata(
493
493
  value: Any,
494
494
  issuer: str,
495
495
  recursive: bool = False,
496
- vo: str = 'def',
496
+ vo: str = DEFAULT_VO,
497
497
  ) -> None:
498
498
  """
499
- Add metadata to data did.
499
+ Add metadata to data DID.
500
500
 
501
501
  :param scope: The scope name.
502
502
  :param name: The data identifier name.
@@ -526,10 +526,10 @@ def set_metadata_bulk(
526
526
  meta: dict[str, Any],
527
527
  issuer: str,
528
528
  recursive: bool = False,
529
- vo: str = 'def',
529
+ vo: str = DEFAULT_VO,
530
530
  ) -> None:
531
531
  """
532
- Add metadata to data did.
532
+ Add metadata to data DID.
533
533
 
534
534
  :param scope: The scope name.
535
535
  :param name: The data identifier name.
@@ -557,13 +557,13 @@ def set_dids_metadata_bulk(
557
557
  dids: 'Iterable[dict[str, Any]]',
558
558
  issuer: str,
559
559
  recursive: bool = False,
560
- vo: str = 'def',
560
+ vo: str = DEFAULT_VO,
561
561
  ) -> None:
562
562
  """
563
563
  Add metadata to a list of data identifiers.
564
564
 
565
565
  :param issuer: The issuer account.
566
- :param dids: A list of dids including metadata.
566
+ :param dids: A list of DIDs including metadata.
567
567
  :param recursive: Option to propagate the metadata update to content.
568
568
  :param vo: The VO to act on.
569
569
  """
@@ -587,7 +587,7 @@ def get_metadata(
587
587
  scope: str,
588
588
  name: str,
589
589
  plugin: str = 'DID_COLUMN',
590
- vo: str = 'def',
590
+ vo: str = DEFAULT_VO,
591
591
  ) -> dict[str, Any]:
592
592
  """
593
593
  Get data identifier metadata
@@ -609,11 +609,11 @@ def get_metadata_bulk(
609
609
  dids: 'Iterable[dict[str, Any]]',
610
610
  inherit: bool = False,
611
611
  plugin: str = 'DID_COLUMN',
612
- vo: str = 'def',
612
+ vo: str = DEFAULT_VO,
613
613
  ) -> 'Iterator[dict[str, Any]]':
614
614
  """
615
- Get metadata for a list of dids
616
- :param dids: A list of dids.
615
+ Get metadata for a list of DIDs
616
+ :param dids: A list of DIDs.
617
617
  :param inherit: A boolean. If set to true, the metadata of the parent are concatenated.
618
618
  :param plugin: The metadata plugin to query, 'ALL' for all available plugins
619
619
  :param vo: The VO to act on.
@@ -633,13 +633,13 @@ def delete_metadata(
633
633
  scope: str,
634
634
  name: str,
635
635
  key: str,
636
- vo: str = 'def',
636
+ vo: str = DEFAULT_VO,
637
637
  ) -> None:
638
638
  """
639
639
  Delete a key from the metadata column
640
640
 
641
- :param scope: the scope of did
642
- :param name: the name of the did
641
+ :param scope: the scope of DID
642
+ :param name: the name of the DID
643
643
  :param key: the key to be deleted
644
644
  :param vo: The VO to act on.
645
645
  """
@@ -653,7 +653,7 @@ def set_status(
653
653
  scope: str,
654
654
  name: str,
655
655
  issuer: str,
656
- vo: str = 'def',
656
+ vo: str = DEFAULT_VO,
657
657
  **kwargs
658
658
  ) -> None:
659
659
  """
@@ -678,14 +678,14 @@ def set_status(
678
678
 
679
679
  def get_dataset_by_guid(
680
680
  guid: str,
681
- vo: str = 'def',
681
+ vo: str = DEFAULT_VO,
682
682
  ) -> 'Iterator[dict[str, Any]]':
683
683
  """
684
684
  Get the parent datasets for a given GUID.
685
685
  :param guid: The GUID.
686
686
  :param vo: The VO to act on.
687
687
 
688
- :returns: A did
688
+ :returns: A DID
689
689
  """
690
690
  with db_session(DatabaseOperationType.READ) as session:
691
691
  dids = did.get_dataset_by_guid(guid=guid, session=session)
@@ -699,10 +699,10 @@ def get_dataset_by_guid(
699
699
  def list_parent_dids(
700
700
  scope: str,
701
701
  name: str,
702
- vo: str = 'def',
702
+ vo: str = DEFAULT_VO,
703
703
  ) -> 'Iterator[dict[str, Any]]':
704
704
  """
705
- List parent datasets and containers of a did.
705
+ List parent datasets and containers of a DID.
706
706
 
707
707
  :param scope: The scope.
708
708
  :param name: The name.
@@ -725,7 +725,7 @@ def create_did_sample(
725
725
  output_name: str,
726
726
  issuer: str,
727
727
  nbfiles: str,
728
- vo: str = 'def',
728
+ vo: str = DEFAULT_VO,
729
729
  ):
730
730
  """
731
731
  Create a sample from an input collection.
@@ -758,12 +758,12 @@ def create_did_sample(
758
758
  def resurrect(
759
759
  dids: 'Iterable[dict[str, Any]]',
760
760
  issuer: str,
761
- vo: str = 'def',
761
+ vo: str = DEFAULT_VO,
762
762
  ) -> None:
763
763
  """
764
764
  Resurrect DIDs.
765
765
 
766
- :param dids: A list of dids.
766
+ :param dids: A list of DIDs.
767
767
  :param issuer: The issuer account.
768
768
  :param vo: The VO to act on.
769
769
  """
@@ -783,7 +783,7 @@ def resurrect(
783
783
  def list_archive_content(
784
784
  scope: str,
785
785
  name: str,
786
- vo: str = 'def',
786
+ vo: str = DEFAULT_VO,
787
787
  ) -> 'Iterator[dict[str, Any]]':
788
788
  """
789
789
  List archive contents.
@@ -805,10 +805,10 @@ def add_did_to_followed(
805
805
  scope: str,
806
806
  name: str,
807
807
  account: str,
808
- vo: str = 'def'
808
+ vo: str = DEFAULT_VO
809
809
  ) -> None:
810
810
  """
811
- Mark a did as followed by the given account
811
+ Mark a DID as followed by the given account
812
812
 
813
813
  :param scope: The scope name.
814
814
  :param name: The data identifier name.
@@ -823,12 +823,12 @@ def add_did_to_followed(
823
823
  def add_dids_to_followed(
824
824
  dids: 'Iterable[Mapping[str, Any]]',
825
825
  account: str,
826
- vo: str = 'def'
826
+ vo: str = DEFAULT_VO
827
827
  ) -> None:
828
828
  """
829
829
  Bulk mark datasets as followed
830
830
 
831
- :param dids: A list of dids.
831
+ :param dids: A list of DIDs.
832
832
  :param account: The account owner.
833
833
  """
834
834
  internal_account = InternalAccount(account, vo=vo)
@@ -839,10 +839,10 @@ def add_dids_to_followed(
839
839
  def get_users_following_did(
840
840
  name: str,
841
841
  scope: str,
842
- vo: str = 'def'
842
+ vo: str = DEFAULT_VO
843
843
  ) -> 'Iterator[dict[str, str]]':
844
844
  """
845
- Return list of users following a did
845
+ Return list of users following a DID
846
846
 
847
847
  :param scope: The scope name.
848
848
  :param name: The data identifier name.
@@ -860,10 +860,10 @@ def remove_did_from_followed(
860
860
  name: str,
861
861
  account: str,
862
862
  issuer: str,
863
- vo: str = 'def'
863
+ vo: str = DEFAULT_VO
864
864
  ) -> None:
865
865
  """
866
- Mark a did as not followed
866
+ Mark a DID as not followed
867
867
 
868
868
  :param scope: The scope name.
869
869
  :param name: The data identifier name.
@@ -885,12 +885,12 @@ def remove_dids_from_followed(
885
885
  dids: 'Iterable[Mapping[str, Any]]',
886
886
  account: str,
887
887
  issuer: str,
888
- vo: str = 'def'
888
+ vo: str = DEFAULT_VO
889
889
  ) -> None:
890
890
  """
891
891
  Bulk mark datasets as not followed
892
892
 
893
- :param dids: A list of dids.
893
+ :param dids: A list of DIDs.
894
894
  :param account: The account owner.
895
895
  """
896
896
  kwargs = {'dids': dids, 'issuer': issuer}
rucio/gateway/dirac.py CHANGED
@@ -14,6 +14,7 @@
14
14
 
15
15
  from typing import TYPE_CHECKING, Any, Optional
16
16
 
17
+ from rucio.common.constants import DEFAULT_VO
17
18
  from rucio.common.exception import AccessDenied
18
19
  from rucio.common.types import InternalScope
19
20
  from rucio.common.utils import extract_scope
@@ -33,7 +34,7 @@ def add_files(
33
34
  issuer: str,
34
35
  ignore_availability: bool,
35
36
  parents_metadata: Optional[dict[str, Any]] = None,
36
- vo: str = 'def',
37
+ vo: str = DEFAULT_VO,
37
38
  ) -> None:
38
39
  """
39
40
  Bulk add files :
@@ -63,7 +64,7 @@ def add_files(
63
64
  rses[rse] = rse_id
64
65
  lfn['rse_id'] = rses[rse]
65
66
 
66
- # Check if the issuer can add dids and use skip_availabitlity
67
+ # Check if the issuer can add DIDs and use skip_availabitlity
67
68
  for rse in rses:
68
69
  rse_id = rses[rse]
69
70
  kwargs = {'rse': rse, 'rse_id': rse_id}
rucio/gateway/exporter.py CHANGED
@@ -15,6 +15,7 @@
15
15
  from typing import Any
16
16
 
17
17
  from rucio.common import exception
18
+ from rucio.common.constants import DEFAULT_VO
18
19
  from rucio.core import exporter
19
20
  from rucio.core.rse import get_rse_name
20
21
  from rucio.db.sqla.constants import DatabaseOperationType
@@ -22,7 +23,7 @@ from rucio.db.sqla.session import db_session
22
23
  from rucio.gateway import permission
23
24
 
24
25
 
25
- def export_data(issuer: str, distance: bool = True, vo: str = 'def') -> dict[str, Any]:
26
+ def export_data(issuer: str, distance: bool = True, vo: str = DEFAULT_VO) -> dict[str, Any]:
26
27
  """
27
28
  Export data from Rucio.
28
29
 
@@ -15,6 +15,7 @@
15
15
  from typing import TYPE_CHECKING, Optional
16
16
 
17
17
  from rucio.common import exception
18
+ from rucio.common.constants import DEFAULT_VO
18
19
  from rucio.core import heartbeat
19
20
  from rucio.db.sqla.constants import DatabaseOperationType
20
21
  from rucio.db.sqla.session import db_session
@@ -24,7 +25,7 @@ if TYPE_CHECKING:
24
25
  from threading import Thread
25
26
 
26
27
 
27
- def list_heartbeats(issuer: str, vo: str = 'def') -> list["heartbeat.HeartbeatDict"]:
28
+ def list_heartbeats(issuer: str, vo: str = DEFAULT_VO) -> list["heartbeat.HeartbeatDict"]:
28
29
  """
29
30
  Return a list of tuples of all heartbeats.
30
31
 
@@ -49,7 +50,7 @@ def create_heartbeat(
49
50
  payload: Optional[str],
50
51
  issuer: str,
51
52
  thread: Optional["Thread"] = None,
52
- vo: str = 'def',
53
+ vo: str = DEFAULT_VO,
53
54
  ) -> None:
54
55
  """
55
56
  Creates a heartbeat.
rucio/gateway/identity.py CHANGED
@@ -19,6 +19,7 @@ Interface for identity abstraction layer
19
19
  from typing import TYPE_CHECKING, Optional
20
20
 
21
21
  from rucio.common import exception
22
+ from rucio.common.constants import DEFAULT_VO
22
23
  from rucio.common.types import InternalAccount
23
24
  from rucio.core import identity
24
25
  from rucio.db.sqla.constants import DatabaseOperationType, IdentityType
@@ -53,7 +54,7 @@ def del_identity(
53
54
  identity_key: str,
54
55
  id_type: str,
55
56
  issuer: str,
56
- vo: str = 'def',
57
+ vo: str = DEFAULT_VO,
57
58
  ) -> None:
58
59
  """
59
60
  Deletes a user identity.
@@ -81,7 +82,7 @@ def add_account_identity(
81
82
  issuer: str,
82
83
  default: bool = False,
83
84
  password: Optional[str] = None,
84
- vo: str = 'def',
85
+ vo: str = DEFAULT_VO,
85
86
  ) -> None:
86
87
  """
87
88
  Adds a membership association between identity and account.
@@ -124,7 +125,7 @@ def del_account_identity(
124
125
  id_type: str,
125
126
  account: str,
126
127
  issuer: str,
127
- vo: str = 'def',
128
+ vo: str = DEFAULT_VO,
128
129
  ) -> None:
129
130
  """
130
131
  Removes a membership association between identity and account.
rucio/gateway/importer.py CHANGED
@@ -15,6 +15,7 @@
15
15
  from typing import Any
16
16
 
17
17
  from rucio.common import exception
18
+ from rucio.common.constants import DEFAULT_VO
18
19
  from rucio.common.schema import validate_schema
19
20
  from rucio.common.types import InternalAccount
20
21
  from rucio.core import importer
@@ -23,7 +24,7 @@ from rucio.db.sqla.session import db_session
23
24
  from rucio.gateway import permission
24
25
 
25
26
 
26
- def import_data(data: dict[str, Any], issuer: str, vo: str = 'def') -> None:
27
+ def import_data(data: dict[str, Any], issuer: str, vo: str = DEFAULT_VO) -> None:
27
28
  """
28
29
  Import data to add/update/delete records in Rucio.
29
30
 
@@ -15,6 +15,7 @@
15
15
  from typing import TYPE_CHECKING, Any, Optional
16
16
 
17
17
  from rucio.common import exception
18
+ from rucio.common.constants import DEFAULT_VO
18
19
  from rucio.common.types import InternalAccount, InternalScope
19
20
  from rucio.common.utils import gateway_update_return_dict
20
21
  from rucio.core import lifetime_exception
@@ -31,7 +32,7 @@ if TYPE_CHECKING:
31
32
  def list_exceptions(
32
33
  exception_id: Optional[str] = None,
33
34
  states: Optional["Iterable[LifetimeExceptionsState]"] = None,
34
- vo: str = 'def',
35
+ vo: str = DEFAULT_VO,
35
36
  ) -> 'Iterator[dict[str, Any]]':
36
37
  """
37
38
  List exceptions to Lifetime Model.
@@ -54,12 +55,12 @@ def add_exception(
54
55
  pattern: str,
55
56
  comments: str,
56
57
  expires_at: str,
57
- vo: str = 'def',
58
+ vo: str = DEFAULT_VO,
58
59
  ) -> dict[str, Any]:
59
60
  """
60
61
  Add exceptions to Lifetime Model.
61
62
 
62
- :param dids: The list of dids
63
+ :param dids: The list of DIDs
63
64
  :param account: The account of the requester.
64
65
  :param pattern: The account.
65
66
  :param comments: The comments associated to the exception.
@@ -94,7 +95,7 @@ def update_exception(
94
95
  exception_id: str,
95
96
  state: 'LifetimeExceptionsState',
96
97
  issuer: str,
97
- vo: str = 'def',
98
+ vo: str = DEFAULT_VO,
98
99
  ) -> None:
99
100
  """
100
101
  Update exceptions state to Lifetime Model.
rucio/gateway/lock.py CHANGED
@@ -15,6 +15,7 @@
15
15
  import logging
16
16
  from typing import TYPE_CHECKING, Any
17
17
 
18
+ from rucio.common.constants import DEFAULT_VO
18
19
  from rucio.common.types import InternalScope
19
20
  from rucio.common.utils import gateway_update_return_dict
20
21
  from rucio.core import lock
@@ -33,7 +34,7 @@ LOGGER.setLevel(logging.DEBUG)
33
34
  def get_dataset_locks(
34
35
  scope: str,
35
36
  name: str,
36
- vo: str = 'def',
37
+ vo: str = DEFAULT_VO,
37
38
  ) -> 'Iterator[dict[str, Any]]':
38
39
  """
39
40
  Get the dataset locks of a dataset.
@@ -55,7 +56,7 @@ def get_dataset_locks(
55
56
 
56
57
  def get_dataset_locks_bulk(
57
58
  dids: 'Iterable[dict[str, Any]]',
58
- vo: str = 'def',
59
+ vo: str = DEFAULT_VO,
59
60
  ) -> 'Iterator[dict[str, Any]]':
60
61
  """
61
62
  Get the dataset locks for multiple datasets or containers.
@@ -68,7 +69,7 @@ def get_dataset_locks_bulk(
68
69
  """
69
70
 
70
71
  if vo is None:
71
- vo = "def"
72
+ vo = DEFAULT_VO
72
73
 
73
74
  dids_converted = []
74
75
  for did_in in dids:
@@ -100,7 +101,7 @@ def get_dataset_locks_bulk(
100
101
 
101
102
  def get_dataset_locks_by_rse(
102
103
  rse: str,
103
- vo: str = 'def',
104
+ vo: str = DEFAULT_VO,
104
105
  ) -> 'Iterator[dict[str, Any]]':
105
106
  """
106
107
  Get the dataset locks of an RSE.
@@ -120,7 +121,7 @@ def get_dataset_locks_by_rse(
120
121
 
121
122
  def get_replica_locks_for_rule_id(
122
123
  rule_id: str,
123
- vo: str = 'def',
124
+ vo: str = DEFAULT_VO,
124
125
  ) -> 'Iterator[dict[str, Any]]':
125
126
  """
126
127
  Get the replica locks for a rule_id.
@@ -14,6 +14,7 @@
14
14
 
15
15
  from typing import TYPE_CHECKING, Optional, Union
16
16
 
17
+ from rucio.common.constants import DEFAULT_VO
17
18
  from rucio.common.exception import AccessDenied
18
19
  from rucio.core import meta_conventions
19
20
  from rucio.db.sqla.constants import DatabaseOperationType
@@ -53,7 +54,7 @@ def add_key(
53
54
  issuer: "InternalAccount",
54
55
  value_type: Optional[str] = None,
55
56
  value_regexp: Optional[str] = None,
56
- vo: str = 'def',
57
+ vo: str = DEFAULT_VO,
57
58
  ) -> None:
58
59
  """
59
60
  Add an allowed key for DID metadata (update the DID Metadata Conventions table with a new key).
@@ -73,7 +74,7 @@ def add_key(
73
74
  return meta_conventions.add_key(key=key, key_type=key_type, value_type=value_type, value_regexp=value_regexp, session=session)
74
75
 
75
76
 
76
- def add_value(key: str, value: str, issuer: "InternalAccount", vo: str = 'def') -> None:
77
+ def add_value(key: str, value: str, issuer: "InternalAccount", vo: str = DEFAULT_VO) -> None:
77
78
  """
78
79
  Add an allowed value for DID metadata (update a key in DID Metadata Conventions table).
79
80
 
@@ -15,6 +15,7 @@
15
15
  from copy import deepcopy
16
16
  from typing import TYPE_CHECKING, Any
17
17
 
18
+ from rucio.common.constants import DEFAULT_VO
18
19
  from rucio.common.exception import RSENotFound
19
20
  from rucio.common.types import InternalAccount, InternalScope
20
21
  from rucio.core import permission
@@ -28,7 +29,7 @@ if TYPE_CHECKING:
28
29
 
29
30
 
30
31
  @read_session
31
- def has_permission(issuer: str, action: str, kwargs: dict[str, Any], vo: str = 'def', *, session: "Session") -> 'PermissionResult':
32
+ def has_permission(issuer: str, action: str, kwargs: dict[str, Any], vo: str = DEFAULT_VO, *, session: "Session") -> 'PermissionResult':
32
33
  """
33
34
  Checks if an account has the specified permission to
34
35
  execute an action with parameters.
@@ -15,6 +15,7 @@
15
15
  from typing import TYPE_CHECKING, Any, Optional
16
16
 
17
17
  from rucio.common import exception
18
+ from rucio.common.constants import DEFAULT_VO
18
19
  from rucio.common.types import InternalScope
19
20
  from rucio.core.quarantined_replica import add_quarantined_replicas
20
21
  from rucio.core.rse import get_rse_id
@@ -31,7 +32,7 @@ def quarantine_file_replicas(
31
32
  issuer: str,
32
33
  rse: Optional[str] = None,
33
34
  rse_id: Optional[str] = None,
34
- vo: str = 'def',
35
+ vo: str = DEFAULT_VO,
35
36
  ) -> None:
36
37
  """
37
38
  Quarantine replicas.