rucio 37.6.0__py3-none-any.whl → 37.7.1__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 (139) hide show
  1. rucio/cli/bin_legacy/rucio.py +40 -21
  2. rucio/cli/rule.py +9 -5
  3. rucio/client/baseclient.py +4 -3
  4. rucio/client/downloadclient.py +2 -1
  5. rucio/client/exportclient.py +45 -4
  6. rucio/client/pingclient.py +35 -4
  7. rucio/client/touchclient.py +2 -1
  8. rucio/client/uploadclient.py +3 -2
  9. rucio/common/cache.py +1 -2
  10. rucio/common/client.py +4 -30
  11. rucio/common/config.py +26 -1
  12. rucio/common/constants.py +3 -1
  13. rucio/common/plugins.py +2 -2
  14. rucio/common/policy.py +3 -2
  15. rucio/common/schema/__init__.py +4 -3
  16. rucio/common/types.py +7 -5
  17. rucio/core/account.py +2 -1
  18. rucio/core/account_limit.py +3 -2
  19. rucio/core/did.py +8 -7
  20. rucio/core/dirac.py +2 -1
  21. rucio/core/distance.py +2 -1
  22. rucio/core/exporter.py +3 -2
  23. rucio/core/importer.py +5 -5
  24. rucio/core/permission/__init__.py +2 -1
  25. rucio/core/replica.py +5 -5
  26. rucio/core/request.py +2 -2
  27. rucio/core/rse.py +7 -7
  28. rucio/core/rule.py +8 -8
  29. rucio/core/transfer.py +2 -2
  30. rucio/core/vo.py +2 -1
  31. rucio/daemons/atropos/atropos.py +2 -1
  32. rucio/daemons/automatix/automatix.py +5 -5
  33. rucio/daemons/badreplicas/minos.py +3 -2
  34. rucio/daemons/bb8/bb8.py +2 -1
  35. rucio/daemons/bb8/nuclei_background_rebalance.py +2 -2
  36. rucio/daemons/conveyor/common.py +3 -3
  37. rucio/daemons/conveyor/submitter.py +2 -1
  38. rucio/daemons/hermes/hermes.py +36 -6
  39. rucio/daemons/reaper/dark_reaper.py +5 -4
  40. rucio/daemons/reaper/reaper.py +7 -7
  41. rucio/daemons/replicarecoverer/suspicious_replica_recoverer.py +3 -3
  42. rucio/daemons/tracer/kronos.py +3 -2
  43. rucio/daemons/transmogrifier/transmogrifier.py +70 -68
  44. rucio/daemons/undertaker/undertaker.py +2 -1
  45. rucio/db/sqla/models.py +2 -2
  46. rucio/db/sqla/util.py +3 -2
  47. rucio/gateway/account.py +13 -12
  48. rucio/gateway/account_limit.py +90 -116
  49. rucio/gateway/authentication.py +9 -8
  50. rucio/gateway/config.py +11 -10
  51. rucio/gateway/credential.py +2 -1
  52. rucio/gateway/did.py +32 -32
  53. rucio/gateway/dirac.py +2 -1
  54. rucio/gateway/exporter.py +2 -1
  55. rucio/gateway/heartbeat.py +3 -2
  56. rucio/gateway/identity.py +4 -3
  57. rucio/gateway/importer.py +2 -1
  58. rucio/gateway/lifetime_exception.py +4 -3
  59. rucio/gateway/lock.py +6 -5
  60. rucio/gateway/meta_conventions.py +3 -2
  61. rucio/gateway/permission.py +2 -1
  62. rucio/gateway/quarantined_replica.py +2 -1
  63. rucio/gateway/replica.py +18 -18
  64. rucio/gateway/request.py +10 -10
  65. rucio/gateway/rse.py +27 -26
  66. rucio/gateway/rule.py +12 -11
  67. rucio/gateway/scope.py +4 -3
  68. rucio/gateway/subscription.py +7 -6
  69. rucio/gateway/vo.py +5 -4
  70. rucio/rse/__init__.py +7 -6
  71. rucio/rse/rsemanager.py +5 -4
  72. rucio/rse/translation.py +2 -2
  73. rucio/tests/common.py +2 -1
  74. rucio/vcsversion.py +3 -3
  75. rucio/web/rest/flaskapi/v1/accountlimits.py +5 -5
  76. rucio/web/rest/flaskapi/v1/archives.py +2 -1
  77. rucio/web/rest/flaskapi/v1/common.py +4 -3
  78. rucio/web/rest/flaskapi/v1/dids.py +205 -154
  79. {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/METADATA +1 -1
  80. {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/RECORD +139 -139
  81. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/alembic.ini.template +0 -0
  82. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/alembic_offline.ini.template +0 -0
  83. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/globus-config.yml.template +0 -0
  84. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/ldap.cfg.template +0 -0
  85. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_approval_request.tmpl +0 -0
  86. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_approved_admin.tmpl +0 -0
  87. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_approved_user.tmpl +0 -0
  88. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_denied_admin.tmpl +0 -0
  89. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_denied_user.tmpl +0 -0
  90. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_ok_notification.tmpl +0 -0
  91. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/rse-accounts.cfg.template +0 -0
  92. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/rucio.cfg.atlas.client.template +0 -0
  93. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/rucio.cfg.template +0 -0
  94. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/rucio_multi_vo.cfg.template +0 -0
  95. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/requirements.server.txt +0 -0
  96. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/tools/bootstrap.py +0 -0
  97. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/tools/merge_rucio_configs.py +0 -0
  98. {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/tools/reset_database.py +0 -0
  99. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio +0 -0
  100. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-abacus-account +0 -0
  101. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-abacus-collection-replica +0 -0
  102. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-abacus-rse +0 -0
  103. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-admin +0 -0
  104. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-atropos +0 -0
  105. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-auditor +0 -0
  106. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-automatix +0 -0
  107. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-bb8 +0 -0
  108. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-cache-client +0 -0
  109. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-cache-consumer +0 -0
  110. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-finisher +0 -0
  111. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-poller +0 -0
  112. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-preparer +0 -0
  113. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-receiver +0 -0
  114. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-stager +0 -0
  115. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-submitter +0 -0
  116. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-throttler +0 -0
  117. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-dark-reaper +0 -0
  118. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-dumper +0 -0
  119. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-follower +0 -0
  120. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-hermes +0 -0
  121. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-judge-cleaner +0 -0
  122. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-judge-evaluator +0 -0
  123. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-judge-injector +0 -0
  124. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-judge-repairer +0 -0
  125. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-kronos +0 -0
  126. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-minos +0 -0
  127. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-minos-temporary-expiration +0 -0
  128. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-necromancer +0 -0
  129. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-oauth-manager +0 -0
  130. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-reaper +0 -0
  131. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-replica-recoverer +0 -0
  132. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-rse-decommissioner +0 -0
  133. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-storage-consistency-actions +0 -0
  134. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-transmogrifier +0 -0
  135. {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-undertaker +0 -0
  136. {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/WHEEL +0 -0
  137. {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/licenses/AUTHORS.rst +0 -0
  138. {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/licenses/LICENSE +0 -0
  139. {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/top_level.txt +0 -0
rucio/gateway/replica.py CHANGED
@@ -16,7 +16,7 @@ import datetime
16
16
  from typing import TYPE_CHECKING, Any, Literal, Optional, Union, cast
17
17
 
18
18
  from rucio.common import exception
19
- from rucio.common.constants import SuspiciousAvailability
19
+ from rucio.common.constants import DEFAULT_VO, SuspiciousAvailability
20
20
  from rucio.common.schema import validate_schema
21
21
  from rucio.common.types import InternalAccount, InternalScope, IPDict
22
22
  from rucio.common.utils import gateway_update_return_dict, invert_dict
@@ -34,7 +34,7 @@ def get_bad_replicas_summary(
34
34
  rse_expression: Optional[str] = None,
35
35
  from_date: Optional[datetime.datetime] = None,
36
36
  to_date: Optional[datetime.date] = None,
37
- vo: str = 'def'
37
+ vo: str = DEFAULT_VO
38
38
  ) -> list[dict[str, Any]]:
39
39
  """
40
40
  List the bad file replicas summary. Method used by the rucio-ui.
@@ -55,7 +55,7 @@ def list_bad_replicas_status(
55
55
  older_than: Optional[datetime.datetime] = None,
56
56
  limit: Optional[int] = None,
57
57
  list_pfns: bool = False,
58
- vo: str = 'def'):
58
+ vo: str = DEFAULT_VO):
59
59
  """
60
60
  List the bad file replicas history states. Method used by the rucio-ui.
61
61
  :param state: The state of the file (SUSPICIOUS or BAD).
@@ -80,7 +80,7 @@ def declare_bad_file_replicas(
80
80
  replicas: Union[list[str], list[dict[str, Any]]],
81
81
  reason: str,
82
82
  issuer: str,
83
- vo: str = 'def',
83
+ vo: str = DEFAULT_VO,
84
84
  force: bool = False
85
85
  ) -> dict[str, Any]:
86
86
  """
@@ -172,7 +172,7 @@ def declare_suspicious_file_replicas(
172
172
  pfns: list[Union[str, dict[str, Any]]],
173
173
  reason: str,
174
174
  issuer: str,
175
- vo: str = 'def'
175
+ vo: str = DEFAULT_VO
176
176
  ) -> dict[str, list[str]]:
177
177
  """
178
178
  Declare a list of bad replicas.
@@ -206,7 +206,7 @@ def declare_suspicious_file_replicas(
206
206
  def get_did_from_pfns(
207
207
  pfns: "Iterable[str]",
208
208
  rse: str,
209
- vo: str = 'def'
209
+ vo: str = DEFAULT_VO
210
210
  ) -> 'Iterator[dict[str, dict[str, Any]]]':
211
211
  """
212
212
  Get the DIDs associated to a PFN on one given RSE
@@ -242,7 +242,7 @@ def list_replicas(
242
242
  nrandom: Optional[int] = None,
243
243
  updated_after: Optional[datetime.datetime] = None,
244
244
  issuer: Optional[str] = None,
245
- vo: str = 'def'
245
+ vo: str = DEFAULT_VO
246
246
  ) -> 'Iterator[dict[str, Any]]':
247
247
  """
248
248
  List file replicas for a list of data identifiers.
@@ -302,7 +302,7 @@ def add_replicas(
302
302
  files: "Iterable[dict[str, Any]]",
303
303
  issuer: str,
304
304
  ignore_availability: bool = False,
305
- vo: str = 'def'
305
+ vo: str = DEFAULT_VO
306
306
  ) -> None:
307
307
  """
308
308
  Bulk add file replicas.
@@ -341,7 +341,7 @@ def delete_replicas(
341
341
  files: "Iterable[dict[str, Any]]",
342
342
  issuer: str,
343
343
  ignore_availability: bool = False,
344
- vo: str = 'def'
344
+ vo: str = DEFAULT_VO
345
345
  ) -> None:
346
346
  """
347
347
  Bulk delete file replicas.
@@ -374,7 +374,7 @@ def update_replicas_states(
374
374
  rse: str,
375
375
  files: "Iterable[dict[str, Any]]",
376
376
  issuer: str,
377
- vo: str = 'def'
377
+ vo: str = DEFAULT_VO
378
378
  ) -> None:
379
379
  """
380
380
  Update File replica information and state.
@@ -408,7 +408,7 @@ def list_dataset_replicas(
408
408
  scope: str,
409
409
  name: str,
410
410
  deep: bool = False,
411
- vo: str = 'def'
411
+ vo: str = DEFAULT_VO
412
412
  ) -> "Iterator[dict[str, Any]]":
413
413
  """
414
414
  :param scope: The scope of the dataset.
@@ -431,7 +431,7 @@ def list_dataset_replicas(
431
431
 
432
432
  def list_dataset_replicas_bulk(
433
433
  dids: 'Iterable[dict[str, Any]]',
434
- vo: str = 'def'
434
+ vo: str = DEFAULT_VO
435
435
  ) -> 'Iterator[dict[str, Any]]':
436
436
  """
437
437
  :param dids: The list of DID dictionaries with scope and name.
@@ -464,7 +464,7 @@ def list_dataset_replicas_vp(
464
464
  scope: str,
465
465
  name: str,
466
466
  deep: bool = False,
467
- vo: str = 'def'
467
+ vo: str = DEFAULT_VO
468
468
  ) -> 'Iterator[dict[str, Any]]':
469
469
  """
470
470
  :param scope: The scope of the dataset.
@@ -484,7 +484,7 @@ def list_dataset_replicas_vp(
484
484
  yield gateway_update_return_dict(r, session=session)
485
485
 
486
486
 
487
- def list_datasets_per_rse(rse: str, filters: Optional[dict[str, Any]] = None, limit: Optional[int] = None, vo: str = 'def') -> 'Iterator[dict[str, Any]]':
487
+ def list_datasets_per_rse(rse: str, filters: Optional[dict[str, Any]] = None, limit: Optional[int] = None, vo: str = DEFAULT_VO) -> 'Iterator[dict[str, Any]]':
488
488
  """
489
489
  :param scope: The scope of the dataset.
490
490
  :param name: The name of the dataset.
@@ -511,7 +511,7 @@ def add_bad_pfns(
511
511
  state: BadFilesStatus,
512
512
  reason: Optional[str] = None,
513
513
  expires_at: Optional[datetime.datetime] = None,
514
- vo: str = 'def'
514
+ vo: str = DEFAULT_VO
515
515
  ) -> Literal[True]:
516
516
  """
517
517
  Add bad PFNs.
@@ -547,7 +547,7 @@ def add_bad_dids(
547
547
  state: BadFilesStatus,
548
548
  reason: Optional[str] = None,
549
549
  expires_at: Optional[datetime.datetime] = None,
550
- vo: str = 'def'
550
+ vo: str = DEFAULT_VO
551
551
  ) -> list[str]:
552
552
  """
553
553
  Add bad replica entries for DIDs.
@@ -579,7 +579,7 @@ def get_suspicious_files(
579
579
  rse_expression: Optional[str],
580
580
  younger_than: Optional[datetime.datetime] = None,
581
581
  nattempts: Optional[int] = None,
582
- vo: str = 'def'
582
+ vo: str = DEFAULT_VO
583
583
  ) -> list[dict[str, Any]]:
584
584
  """
585
585
  List the list of suspicious files on a list of RSEs
@@ -600,7 +600,7 @@ def set_tombstone(
600
600
  scope: str,
601
601
  name: str,
602
602
  issuer: str,
603
- vo: str = 'def'
603
+ vo: str = DEFAULT_VO
604
604
  ) -> None:
605
605
  """
606
606
  Sets a tombstone on one replica.
rucio/gateway/request.py CHANGED
@@ -19,7 +19,7 @@ Interface for the requests abstraction layer
19
19
  from typing import TYPE_CHECKING, Any, Optional
20
20
 
21
21
  from rucio.common import exception
22
- from rucio.common.constants import TransferLimitDirection
22
+ from rucio.common.constants import DEFAULT_VO, TransferLimitDirection
23
23
  from rucio.common.types import InternalAccount, InternalScope, RequestGatewayDict
24
24
  from rucio.common.utils import gateway_update_return_dict
25
25
  from rucio.core import request
@@ -37,7 +37,7 @@ if TYPE_CHECKING:
37
37
  def queue_requests(
38
38
  requests: "Iterable[RequestGatewayDict]",
39
39
  issuer: str,
40
- vo: str = 'def',
40
+ vo: str = DEFAULT_VO,
41
41
  ) -> list[dict[str, Any]]:
42
42
  """
43
43
  Submit transfer or deletion requests on destination RSEs for data identifiers.
@@ -67,7 +67,7 @@ def cancel_request(
67
67
  request_id: str,
68
68
  issuer: str,
69
69
  account: str,
70
- vo: str = 'def',
70
+ vo: str = DEFAULT_VO,
71
71
  ) -> None:
72
72
  """
73
73
  Cancel a request.
@@ -94,7 +94,7 @@ def cancel_request_did(
94
94
  request_type: str,
95
95
  issuer: str,
96
96
  account: str,
97
- vo: str = 'def',
97
+ vo: str = DEFAULT_VO,
98
98
  ) -> dict[str, Any]:
99
99
  """
100
100
  Cancel a request based on a DID and request type.
@@ -125,7 +125,7 @@ def get_next(
125
125
  state: "RequestState",
126
126
  issuer: str,
127
127
  account: str,
128
- vo: str = 'def',
128
+ vo: str = DEFAULT_VO,
129
129
  ) -> list[dict[str, Any]]:
130
130
  """
131
131
  Retrieve the next request matching the request type and state.
@@ -154,7 +154,7 @@ def get_request_by_did(
154
154
  name: str,
155
155
  rse: str,
156
156
  issuer: str,
157
- vo: str = 'def',
157
+ vo: str = DEFAULT_VO,
158
158
  ) -> dict[str, Any]:
159
159
  """
160
160
  Retrieve a request by its DID for a destination RSE.
@@ -185,7 +185,7 @@ def get_request_history_by_did(
185
185
  name: str,
186
186
  rse: str,
187
187
  issuer: str,
188
- vo: str = 'def',
188
+ vo: str = DEFAULT_VO,
189
189
  ) -> dict[str, Any]:
190
190
  """
191
191
  Retrieve a historical request by its DID for a destination RSE.
@@ -216,7 +216,7 @@ def list_requests(
216
216
  dst_rses: "Iterable[str]",
217
217
  states: "Sequence[RequestState]",
218
218
  issuer: str,
219
- vo: str = 'def',
219
+ vo: str = DEFAULT_VO,
220
220
  ) -> "Iterator[dict[str, Any]]":
221
221
  """
222
222
  List all requests in a specific state from a source RSE to a destination RSE.
@@ -245,7 +245,7 @@ def list_requests_history(
245
245
  dst_rses: "Iterable[str]",
246
246
  states: "Sequence[RequestState]",
247
247
  issuer: str,
248
- vo: str = 'def',
248
+ vo: str = DEFAULT_VO,
249
249
  offset: Optional[int] = None,
250
250
  limit: Optional[int] = None,
251
251
  ) -> "Iterator[dict[str, Any]]":
@@ -278,7 +278,7 @@ def get_request_metrics(
278
278
  activity: Optional[str],
279
279
  group_by_rse_attribute: Optional[str],
280
280
  issuer: str,
281
- vo: str = 'def',
281
+ vo: str = DEFAULT_VO,
282
282
  ) -> dict[str, Any]:
283
283
  """
284
284
  Get statistics of requests in a specific state grouped by source RSE, destination RSE, and activity.
rucio/gateway/rse.py CHANGED
@@ -15,6 +15,7 @@
15
15
  from typing import TYPE_CHECKING, 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.utils import gateway_update_return_dict
20
21
  from rucio.core import distance as distance_module
@@ -31,7 +32,7 @@ if TYPE_CHECKING:
31
32
  def add_rse(
32
33
  rse,
33
34
  issuer,
34
- vo='def',
35
+ vo=DEFAULT_VO,
35
36
  deterministic=True,
36
37
  volatile=False,
37
38
  city=None,
@@ -86,7 +87,7 @@ def add_rse(
86
87
  availability_write=availability_write, availability_delete=availability_delete, session=session)
87
88
 
88
89
 
89
- def get_rse(rse, vo='def'):
90
+ def get_rse(rse, vo=DEFAULT_VO):
90
91
  """
91
92
  Provides details about the specified RSE.
92
93
 
@@ -103,7 +104,7 @@ def get_rse(rse, vo='def'):
103
104
  return rse_module.get_rse_protocols(rse_id=rse_id, session=session)
104
105
 
105
106
 
106
- def del_rse(rse, issuer, vo='def'):
107
+ def del_rse(rse, issuer, vo=DEFAULT_VO):
107
108
  """
108
109
  Disables an RSE with the provided RSE name.
109
110
 
@@ -123,7 +124,7 @@ def del_rse(rse, issuer, vo='def'):
123
124
  return rse_module.del_rse(rse_id, session=session)
124
125
 
125
126
 
126
- def list_rses(filters: "Optional[dict[str, Any]]" = None, vo: str = 'def') -> list[dict[str, Any]]:
127
+ def list_rses(filters: "Optional[dict[str, Any]]" = None, vo: str = DEFAULT_VO) -> list[dict[str, Any]]:
127
128
  """
128
129
  Lists all RSEs.
129
130
 
@@ -140,7 +141,7 @@ def list_rses(filters: "Optional[dict[str, Any]]" = None, vo: str = 'def') -> li
140
141
  return rse_module.list_rses(filters=filters, session=session)
141
142
 
142
143
 
143
- def del_rse_attribute(rse, key, issuer, vo='def'):
144
+ def del_rse_attribute(rse, key, issuer, vo=DEFAULT_VO):
144
145
  """
145
146
  Delete a RSE attribute.
146
147
 
@@ -162,7 +163,7 @@ def del_rse_attribute(rse, key, issuer, vo='def'):
162
163
  return rse_module.del_rse_attribute(rse_id=rse_id, key=key, session=session)
163
164
 
164
165
 
165
- def add_rse_attribute(rse, key, value, issuer, vo='def'):
166
+ def add_rse_attribute(rse, key, value, issuer, vo=DEFAULT_VO):
166
167
  """ Adds a RSE attribute.
167
168
 
168
169
  :param rse: the rse name.
@@ -184,7 +185,7 @@ def add_rse_attribute(rse, key, value, issuer, vo='def'):
184
185
  return rse_module.add_rse_attribute(rse_id=rse_id, key=key, value=value, session=session)
185
186
 
186
187
 
187
- def list_rse_attributes(rse, vo='def'):
188
+ def list_rse_attributes(rse, vo=DEFAULT_VO):
188
189
  """
189
190
  List RSE attributes for a RSE_MODULE.
190
191
 
@@ -224,7 +225,7 @@ def get_rses_with_attribute(key):
224
225
  return rse_module.get_rses_with_attribute(key=key, session=session)
225
226
 
226
227
 
227
- def add_protocol(rse, issuer, vo='def', **data):
228
+ def add_protocol(rse, issuer, vo=DEFAULT_VO, **data):
228
229
  """
229
230
  Creates a new protocol entry for an existing RSE.
230
231
 
@@ -243,7 +244,7 @@ def add_protocol(rse, issuer, vo='def', **data):
243
244
  rse_module.add_protocol(rse_id, data['data'], session=session)
244
245
 
245
246
 
246
- def get_rse_protocols(rse, issuer, vo='def'):
247
+ def get_rse_protocols(rse, issuer, vo=DEFAULT_VO):
247
248
  """
248
249
  Returns all matching protocols (including detailed information) for the given RSE.
249
250
 
@@ -258,7 +259,7 @@ def get_rse_protocols(rse, issuer, vo='def'):
258
259
  return rse_module.get_rse_protocols(rse_id, session=session)
259
260
 
260
261
 
261
- def del_protocols(rse, scheme, issuer, vo='def', hostname=None, port=None):
262
+ def del_protocols(rse, scheme, issuer, vo=DEFAULT_VO, hostname=None, port=None):
262
263
  """
263
264
  Deletes all matching protocol entries for the given RSE..
264
265
 
@@ -280,7 +281,7 @@ def del_protocols(rse, scheme, issuer, vo='def', hostname=None, port=None):
280
281
  rse_module.del_protocols(rse_id=rse_id, scheme=scheme, hostname=hostname, port=port, session=session)
281
282
 
282
283
 
283
- def update_protocols(rse, scheme, data, issuer, vo='def', hostname=None, port=None):
284
+ def update_protocols(rse, scheme, data, issuer, vo=DEFAULT_VO, hostname=None, port=None):
284
285
  """
285
286
  Updates all provided attributes for all matching protocol entries of the given RSE..
286
287
 
@@ -301,7 +302,7 @@ def update_protocols(rse, scheme, data, issuer, vo='def', hostname=None, port=No
301
302
  rse_module.update_protocols(rse_id=rse_id, scheme=scheme, hostname=hostname, port=port, data=data, session=session)
302
303
 
303
304
 
304
- def set_rse_usage(rse, source, used, free, issuer, files=None, vo='def'):
305
+ def set_rse_usage(rse, source, used, free, issuer, files=None, vo=DEFAULT_VO):
305
306
  """
306
307
  Set RSE usage information.
307
308
 
@@ -326,7 +327,7 @@ def set_rse_usage(rse, source, used, free, issuer, files=None, vo='def'):
326
327
  return rse_module.set_rse_usage(rse_id=rse_id, source=source, used=used, free=free, files=files, session=session)
327
328
 
328
329
 
329
- def get_rse_usage(rse, issuer, source=None, per_account=False, vo='def'):
330
+ def get_rse_usage(rse, issuer, source=None, per_account=False, vo=DEFAULT_VO):
330
331
  """
331
332
  get RSE usage information.
332
333
 
@@ -349,7 +350,7 @@ def get_rse_usage(rse, issuer, source=None, per_account=False, vo='def'):
349
350
  return [gateway_update_return_dict(u, session=session) for u in usages]
350
351
 
351
352
 
352
- def list_rse_usage_history(rse, issuer, source=None, vo='def'):
353
+ def list_rse_usage_history(rse, issuer, source=None, vo=DEFAULT_VO):
353
354
  """
354
355
  List RSE usage history information.
355
356
 
@@ -366,7 +367,7 @@ def list_rse_usage_history(rse, issuer, source=None, vo='def'):
366
367
  yield gateway_update_return_dict(u, session=session)
367
368
 
368
369
 
369
- def set_rse_limits(rse, name, value, issuer, vo='def'):
370
+ def set_rse_limits(rse, name, value, issuer, vo=DEFAULT_VO):
370
371
  """
371
372
  Set RSE limits.
372
373
 
@@ -388,7 +389,7 @@ def set_rse_limits(rse, name, value, issuer, vo='def'):
388
389
  return rse_module.set_rse_limits(rse_id=rse_id, name=name, value=value, session=session)
389
390
 
390
391
 
391
- def delete_rse_limits(rse, name, issuer, vo='def'):
392
+ def delete_rse_limits(rse, name, issuer, vo=DEFAULT_VO):
392
393
  """
393
394
  Set RSE limits.
394
395
 
@@ -409,7 +410,7 @@ def delete_rse_limits(rse, name, issuer, vo='def'):
409
410
  return rse_module.delete_rse_limits(rse_id=rse_id, name=name, session=session)
410
411
 
411
412
 
412
- def get_rse_limits(rse, issuer, vo='def'):
413
+ def get_rse_limits(rse, issuer, vo=DEFAULT_VO):
413
414
  """
414
415
  Get RSE limits.
415
416
 
@@ -424,7 +425,7 @@ def get_rse_limits(rse, issuer, vo='def'):
424
425
  return rse_module.get_rse_limits(rse_id=rse_id, session=session)
425
426
 
426
427
 
427
- def parse_rse_expression(rse_expression, vo='def'):
428
+ def parse_rse_expression(rse_expression, vo=DEFAULT_VO):
428
429
  """
429
430
  Parse an RSE expression and return the list of RSEs.
430
431
 
@@ -439,7 +440,7 @@ def parse_rse_expression(rse_expression, vo='def'):
439
440
  return [rse['rse'] for rse in rses]
440
441
 
441
442
 
442
- def update_rse(rse, parameters, issuer, vo='def'):
443
+ def update_rse(rse, parameters, issuer, vo=DEFAULT_VO):
443
444
  """
444
445
  Update RSE properties like availability or name.
445
446
 
@@ -459,7 +460,7 @@ def update_rse(rse, parameters, issuer, vo='def'):
459
460
  return rse_module.update_rse(rse_id=rse_id, parameters=parameters, session=session)
460
461
 
461
462
 
462
- def add_distance(source, destination, issuer, vo='def', distance=None):
463
+ def add_distance(source, destination, issuer, vo=DEFAULT_VO, distance=None):
463
464
  """
464
465
  Add a src-dest distance.
465
466
 
@@ -483,7 +484,7 @@ def add_distance(source, destination, issuer, vo='def', distance=None):
483
484
  raise exception.Duplicate('Distance from %s to %s already exists!' % (source, destination))
484
485
 
485
486
 
486
- def update_distance(source, destination, distance, issuer, vo='def'):
487
+ def update_distance(source, destination, distance, issuer, vo=DEFAULT_VO):
487
488
  """
488
489
  Update distances with the given RSE ids.
489
490
 
@@ -504,7 +505,7 @@ def update_distance(source, destination, distance, issuer, vo='def'):
504
505
  distance=distance, session=session)
505
506
 
506
507
 
507
- def get_distance(source, destination, issuer, vo='def'):
508
+ def get_distance(source, destination, issuer, vo=DEFAULT_VO):
508
509
  """
509
510
  Get distances between rses.
510
511
 
@@ -523,7 +524,7 @@ def get_distance(source, destination, issuer, vo='def'):
523
524
  return [gateway_update_return_dict(d, session=session) for d in distances]
524
525
 
525
526
 
526
- def delete_distance(source, destination, issuer, vo='def'):
527
+ def delete_distance(source, destination, issuer, vo=DEFAULT_VO):
527
528
  """
528
529
  Delete distances with the given RSE ids.
529
530
 
@@ -544,7 +545,7 @@ def delete_distance(source, destination, issuer, vo='def'):
544
545
  session=session)
545
546
 
546
547
 
547
- def add_qos_policy(rse, qos_policy, issuer, vo='def'):
548
+ def add_qos_policy(rse, qos_policy, issuer, vo=DEFAULT_VO):
548
549
  """
549
550
  Add a QoS policy from an RSE.
550
551
 
@@ -567,7 +568,7 @@ def add_qos_policy(rse, qos_policy, issuer, vo='def'):
567
568
  return rse_module.add_qos_policy(rse_id, qos_policy, session=session)
568
569
 
569
570
 
570
- def delete_qos_policy(rse, qos_policy, issuer, vo='def'):
571
+ def delete_qos_policy(rse, qos_policy, issuer, vo=DEFAULT_VO):
571
572
  """
572
573
  Delete a QoS policy from an RSE.
573
574
 
@@ -589,7 +590,7 @@ def delete_qos_policy(rse, qos_policy, issuer, vo='def'):
589
590
  return rse_module.delete_qos_policy(rse_id, qos_policy, session=session)
590
591
 
591
592
 
592
- def list_qos_policies(rse, issuer, vo='def'):
593
+ def list_qos_policies(rse, issuer, vo=DEFAULT_VO):
593
594
  """
594
595
  List all QoS policies of an RSE.
595
596
 
rucio/gateway/rule.py CHANGED
@@ -15,6 +15,7 @@
15
15
  from typing import TYPE_CHECKING, Any, Literal, Optional
16
16
 
17
17
  from rucio.common.config import config_get_bool
18
+ from rucio.common.constants import DEFAULT_VO
18
19
  from rucio.common.exception import AccessDenied
19
20
  from rucio.common.schema import validate_schema
20
21
  from rucio.common.types import InternalAccount, InternalScope
@@ -61,7 +62,7 @@ def add_replication_rule(
61
62
  split_container: bool,
62
63
  meta: Optional[dict[str, Any]],
63
64
  issuer: str,
64
- vo: str = 'def',
65
+ vo: str = DEFAULT_VO,
65
66
  ) -> list[str]:
66
67
  """
67
68
  Adds a replication rule.
@@ -139,7 +140,7 @@ def add_replication_rule(
139
140
  session=session)
140
141
 
141
142
 
142
- def get_replication_rule(rule_id: str, issuer: str, vo: str = 'def') -> dict[str, Any]:
143
+ def get_replication_rule(rule_id: str, issuer: str, vo: str = DEFAULT_VO) -> dict[str, Any]:
143
144
  """
144
145
  Get replication rule by it's id.
145
146
 
@@ -159,7 +160,7 @@ def get_replication_rule(rule_id: str, issuer: str, vo: str = 'def') -> dict[str
159
160
 
160
161
  def list_replication_rules(
161
162
  filters: Optional[dict[str, Any]] = None,
162
- vo: str = 'def',
163
+ vo: str = DEFAULT_VO,
163
164
  ) -> "Iterator[dict[str, Any]]":
164
165
  """
165
166
  Lists replication rules based on a filter.
@@ -191,7 +192,7 @@ def list_replication_rules(
191
192
  def list_replication_rule_history(
192
193
  rule_id: str,
193
194
  issuer: str,
194
- vo: str = 'def',
195
+ vo: str = DEFAULT_VO,
195
196
  ) -> "Iterator[dict[str, Any]]":
196
197
  """
197
198
  Lists replication rule history..
@@ -212,7 +213,7 @@ def list_replication_rule_history(
212
213
  def list_replication_rule_full_history(
213
214
  scope: str,
214
215
  name: str,
215
- vo: str = 'def',
216
+ vo: str = DEFAULT_VO,
216
217
  ) -> "Iterator[dict[str, Any]]":
217
218
  """
218
219
  List the rule history of a DID.
@@ -231,7 +232,7 @@ def list_replication_rule_full_history(
231
232
  def list_associated_replication_rules_for_file(
232
233
  scope: str,
233
234
  name: str,
234
- vo: str = 'def',
235
+ vo: str = DEFAULT_VO,
235
236
  ) -> "Iterator[dict[str, Any]]":
236
237
  """
237
238
  Lists associated replication rules by file.
@@ -251,7 +252,7 @@ def delete_replication_rule(
251
252
  rule_id: str,
252
253
  purge_replicas: Optional[bool],
253
254
  issuer: str,
254
- vo: str = 'def',
255
+ vo: str = DEFAULT_VO,
255
256
  ) -> None:
256
257
  """
257
258
  Deletes a replication rule and all associated locks.
@@ -278,7 +279,7 @@ def update_replication_rule(
278
279
  rule_id: str,
279
280
  options: dict[str, Any],
280
281
  issuer: str,
281
- vo: str = 'def',
282
+ vo: str = DEFAULT_VO,
282
283
  ) -> None:
283
284
  """
284
285
  Update lock state of a replication rule.
@@ -319,7 +320,7 @@ def reduce_replication_rule(
319
320
  copies: int,
320
321
  exclude_expression: Optional[str],
321
322
  issuer: str,
322
- vo: str = 'def',
323
+ vo: str = DEFAULT_VO,
323
324
  ) -> str:
324
325
  """
325
326
  Reduce the number of copies for a rule by atomically replacing the rule.
@@ -347,7 +348,7 @@ def reduce_replication_rule(
347
348
  def examine_replication_rule(
348
349
  rule_id: str,
349
350
  issuer: str,
350
- vo: str = 'def',
351
+ vo: str = DEFAULT_VO,
351
352
  ) -> dict[str, Any]:
352
353
  """
353
354
  Examine a replication rule.
@@ -374,7 +375,7 @@ def move_replication_rule(
374
375
  rse_expression: str,
375
376
  override: dict[str, Any],
376
377
  issuer: str,
377
- vo: str = 'def',
378
+ vo: str = DEFAULT_VO,
378
379
  ) -> str:
379
380
  """
380
381
  Move a replication rule to another RSE and, once done, delete the original one.
rucio/gateway/scope.py CHANGED
@@ -15,6 +15,7 @@
15
15
  from typing import Any, Optional
16
16
 
17
17
  import rucio.gateway.permission
18
+ from rucio.common.constants import DEFAULT_VO
18
19
  from rucio.common.exception import AccessDenied
19
20
  from rucio.common.schema import validate_schema
20
21
  from rucio.common.types import InternalAccount, InternalScope
@@ -23,7 +24,7 @@ from rucio.db.sqla.constants import DatabaseOperationType
23
24
  from rucio.db.sqla.session import db_session
24
25
 
25
26
 
26
- def list_scopes(filter_: Optional[dict[str, Any]] = None, vo: str = 'def') -> list[str]:
27
+ def list_scopes(filter_: Optional[dict[str, Any]] = None, vo: str = DEFAULT_VO) -> list[str]:
27
28
  """
28
29
  Lists all scopes.
29
30
 
@@ -48,7 +49,7 @@ def add_scope(
48
49
  scope: str,
49
50
  account: str,
50
51
  issuer: str,
51
- vo: str = 'def',
52
+ vo: str = DEFAULT_VO,
52
53
  ) -> None:
53
54
  """
54
55
  Creates a scope for an account.
@@ -76,7 +77,7 @@ def add_scope(
76
77
 
77
78
  def get_scopes(
78
79
  account: str,
79
- vo: str = 'def',
80
+ vo: str = DEFAULT_VO,
80
81
  ) -> list[str]:
81
82
  """
82
83
  Gets a list of all scopes for an account.
@@ -16,6 +16,7 @@ from collections import namedtuple
16
16
  from json import dumps, loads
17
17
  from typing import TYPE_CHECKING, Any, Literal, Optional, Union
18
18
 
19
+ from rucio.common.constants import DEFAULT_VO
19
20
  from rucio.common.exception import AccessDenied, InvalidObject
20
21
  from rucio.common.schema import validate_schema
21
22
  from rucio.common.types import InternalAccount, InternalScope
@@ -42,7 +43,7 @@ def add_subscription(
42
43
  dry_run: bool,
43
44
  issuer: str,
44
45
  priority: Optional[int] = None,
45
- vo: str = 'def',
46
+ vo: str = DEFAULT_VO,
46
47
  ) -> str:
47
48
  """
48
49
  Adds a new subscription which will be verified against every new added file and dataset
@@ -102,7 +103,7 @@ def update_subscription(
102
103
  account: str,
103
104
  issuer: str,
104
105
  metadata: Optional[dict[str, Any]] = None,
105
- vo: str = 'def',
106
+ vo: str = DEFAULT_VO,
106
107
  ) -> None:
107
108
  """
108
109
  Updates a subscription
@@ -155,7 +156,7 @@ def list_subscriptions(
155
156
  name: Optional[str] = None,
156
157
  account: Optional[str] = None,
157
158
  state: Optional[str] = None,
158
- vo: str = 'def',
159
+ vo: str = DEFAULT_VO,
159
160
  ) -> 'Iterator[dict[str, Any]]':
160
161
  """
161
162
  Returns a dictionary with the subscription information :
@@ -194,7 +195,7 @@ def list_subscriptions(
194
195
  def list_subscription_rule_states(
195
196
  name: Optional[str] = None,
196
197
  account: Optional[str] = None,
197
- vo: str = 'def',
198
+ vo: str = DEFAULT_VO,
198
199
  ) -> 'Iterator[SubscriptionRuleState]':
199
200
  """Returns a list of with the number of rules per state for a subscription.
200
201
 
@@ -220,7 +221,7 @@ def list_subscription_rule_states(
220
221
 
221
222
  def delete_subscription(
222
223
  subscription_id: str,
223
- vo: str = 'def',
224
+ vo: str = DEFAULT_VO,
224
225
  ) -> None:
225
226
  """
226
227
  Deletes a subscription
@@ -234,7 +235,7 @@ def delete_subscription(
234
235
 
235
236
  def get_subscription_by_id(
236
237
  subscription_id: str,
237
- vo: str = 'def',
238
+ vo: str = DEFAULT_VO,
238
239
  ) -> dict[str, Any]:
239
240
  """
240
241
  Get a specific subscription by id.