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.
- rucio/cli/bin_legacy/rucio.py +40 -21
- rucio/cli/rule.py +9 -5
- rucio/client/baseclient.py +4 -3
- rucio/client/downloadclient.py +2 -1
- rucio/client/exportclient.py +45 -4
- rucio/client/pingclient.py +35 -4
- rucio/client/touchclient.py +2 -1
- rucio/client/uploadclient.py +3 -2
- rucio/common/cache.py +1 -2
- rucio/common/client.py +4 -30
- rucio/common/config.py +26 -1
- rucio/common/constants.py +3 -1
- rucio/common/plugins.py +2 -2
- rucio/common/policy.py +3 -2
- rucio/common/schema/__init__.py +4 -3
- rucio/common/types.py +7 -5
- rucio/core/account.py +2 -1
- rucio/core/account_limit.py +3 -2
- rucio/core/did.py +8 -7
- rucio/core/dirac.py +2 -1
- rucio/core/distance.py +2 -1
- rucio/core/exporter.py +3 -2
- rucio/core/importer.py +5 -5
- rucio/core/permission/__init__.py +2 -1
- rucio/core/replica.py +5 -5
- rucio/core/request.py +2 -2
- rucio/core/rse.py +7 -7
- rucio/core/rule.py +8 -8
- rucio/core/transfer.py +2 -2
- rucio/core/vo.py +2 -1
- rucio/daemons/atropos/atropos.py +2 -1
- rucio/daemons/automatix/automatix.py +5 -5
- rucio/daemons/badreplicas/minos.py +3 -2
- rucio/daemons/bb8/bb8.py +2 -1
- rucio/daemons/bb8/nuclei_background_rebalance.py +2 -2
- rucio/daemons/conveyor/common.py +3 -3
- rucio/daemons/conveyor/submitter.py +2 -1
- rucio/daemons/hermes/hermes.py +36 -6
- rucio/daemons/reaper/dark_reaper.py +5 -4
- rucio/daemons/reaper/reaper.py +7 -7
- rucio/daemons/replicarecoverer/suspicious_replica_recoverer.py +3 -3
- rucio/daemons/tracer/kronos.py +3 -2
- rucio/daemons/transmogrifier/transmogrifier.py +70 -68
- rucio/daemons/undertaker/undertaker.py +2 -1
- rucio/db/sqla/models.py +2 -2
- rucio/db/sqla/util.py +3 -2
- rucio/gateway/account.py +13 -12
- rucio/gateway/account_limit.py +90 -116
- rucio/gateway/authentication.py +9 -8
- rucio/gateway/config.py +11 -10
- rucio/gateway/credential.py +2 -1
- rucio/gateway/did.py +32 -32
- rucio/gateway/dirac.py +2 -1
- rucio/gateway/exporter.py +2 -1
- rucio/gateway/heartbeat.py +3 -2
- rucio/gateway/identity.py +4 -3
- rucio/gateway/importer.py +2 -1
- rucio/gateway/lifetime_exception.py +4 -3
- rucio/gateway/lock.py +6 -5
- rucio/gateway/meta_conventions.py +3 -2
- rucio/gateway/permission.py +2 -1
- rucio/gateway/quarantined_replica.py +2 -1
- rucio/gateway/replica.py +18 -18
- rucio/gateway/request.py +10 -10
- rucio/gateway/rse.py +27 -26
- rucio/gateway/rule.py +12 -11
- rucio/gateway/scope.py +4 -3
- rucio/gateway/subscription.py +7 -6
- rucio/gateway/vo.py +5 -4
- rucio/rse/__init__.py +7 -6
- rucio/rse/rsemanager.py +5 -4
- rucio/rse/translation.py +2 -2
- rucio/tests/common.py +2 -1
- rucio/vcsversion.py +3 -3
- rucio/web/rest/flaskapi/v1/accountlimits.py +5 -5
- rucio/web/rest/flaskapi/v1/archives.py +2 -1
- rucio/web/rest/flaskapi/v1/common.py +4 -3
- rucio/web/rest/flaskapi/v1/dids.py +205 -154
- {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/METADATA +1 -1
- {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/RECORD +139 -139
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/alembic.ini.template +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/alembic_offline.ini.template +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/globus-config.yml.template +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/ldap.cfg.template +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_approval_request.tmpl +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_approved_admin.tmpl +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_approved_user.tmpl +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_denied_admin.tmpl +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_denied_user.tmpl +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/mail_templates/rule_ok_notification.tmpl +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/rse-accounts.cfg.template +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/rucio.cfg.atlas.client.template +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/rucio.cfg.template +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/etc/rucio_multi_vo.cfg.template +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/requirements.server.txt +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/tools/bootstrap.py +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/tools/merge_rucio_configs.py +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/data/rucio/tools/reset_database.py +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-abacus-account +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-abacus-collection-replica +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-abacus-rse +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-admin +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-atropos +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-auditor +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-automatix +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-bb8 +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-cache-client +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-cache-consumer +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-finisher +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-poller +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-preparer +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-receiver +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-stager +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-submitter +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-conveyor-throttler +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-dark-reaper +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-dumper +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-follower +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-hermes +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-judge-cleaner +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-judge-evaluator +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-judge-injector +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-judge-repairer +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-kronos +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-minos +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-minos-temporary-expiration +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-necromancer +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-oauth-manager +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-reaper +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-replica-recoverer +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-rse-decommissioner +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-storage-consistency-actions +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-transmogrifier +0 -0
- {rucio-37.6.0.data → rucio-37.7.1.data}/scripts/rucio-undertaker +0 -0
- {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/WHEEL +0 -0
- {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/licenses/AUTHORS.rst +0 -0
- {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/licenses/LICENSE +0 -0
- {rucio-37.6.0.dist-info → rucio-37.7.1.dist-info}/top_level.txt +0 -0
rucio/gateway/config.py
CHANGED
|
@@ -16,6 +16,7 @@ from typing import Any
|
|
|
16
16
|
|
|
17
17
|
from rucio.common import exception
|
|
18
18
|
from rucio.common.config import convert_to_any_type
|
|
19
|
+
from rucio.common.constants import DEFAULT_VO
|
|
19
20
|
from rucio.core import config
|
|
20
21
|
from rucio.db.sqla.constants import DatabaseOperationType
|
|
21
22
|
from rucio.db.sqla.session import db_session
|
|
@@ -29,7 +30,7 @@ ConfigParser compatible interface.
|
|
|
29
30
|
"""
|
|
30
31
|
|
|
31
32
|
|
|
32
|
-
def sections(issuer: str, vo: str =
|
|
33
|
+
def sections(issuer: str, vo: str = DEFAULT_VO) -> list[str]:
|
|
33
34
|
"""
|
|
34
35
|
Return a list of the sections available.
|
|
35
36
|
|
|
@@ -46,7 +47,7 @@ def sections(issuer: str, vo: str = 'def') -> list[str]:
|
|
|
46
47
|
return config.sections(session=session)
|
|
47
48
|
|
|
48
49
|
|
|
49
|
-
def add_section(section: str, issuer: str, vo: str =
|
|
50
|
+
def add_section(section: str, issuer: str, vo: str = DEFAULT_VO) -> None:
|
|
50
51
|
"""
|
|
51
52
|
Add a section to the configuration.
|
|
52
53
|
|
|
@@ -63,7 +64,7 @@ def add_section(section: str, issuer: str, vo: str = 'def') -> None:
|
|
|
63
64
|
return config.add_section(section, session=session)
|
|
64
65
|
|
|
65
66
|
|
|
66
|
-
def has_section(section: str, issuer: str, vo: str =
|
|
67
|
+
def has_section(section: str, issuer: str, vo: str = DEFAULT_VO) -> bool:
|
|
67
68
|
"""
|
|
68
69
|
Indicates whether the named section is present in the configuration.
|
|
69
70
|
|
|
@@ -81,7 +82,7 @@ def has_section(section: str, issuer: str, vo: str = 'def') -> bool:
|
|
|
81
82
|
return config.has_section(section, session=session)
|
|
82
83
|
|
|
83
84
|
|
|
84
|
-
def options(section: str, issuer: str, vo: str =
|
|
85
|
+
def options(section: str, issuer: str, vo: str = DEFAULT_VO) -> list[str]:
|
|
85
86
|
"""
|
|
86
87
|
Returns a list of options available in the specified section.
|
|
87
88
|
|
|
@@ -99,7 +100,7 @@ def options(section: str, issuer: str, vo: str = 'def') -> list[str]:
|
|
|
99
100
|
return config.options(section, session=session)
|
|
100
101
|
|
|
101
102
|
|
|
102
|
-
def has_option(section: str, option: str, issuer: str, vo: str =
|
|
103
|
+
def has_option(section: str, option: str, issuer: str, vo: str = DEFAULT_VO) -> bool:
|
|
103
104
|
"""
|
|
104
105
|
Check if the given section exists and contains the given option.
|
|
105
106
|
|
|
@@ -118,7 +119,7 @@ def has_option(section: str, option: str, issuer: str, vo: str = 'def') -> bool:
|
|
|
118
119
|
return config.has_option(section, option, session=session)
|
|
119
120
|
|
|
120
121
|
|
|
121
|
-
def get(section: str, option: str, issuer: str, vo: str =
|
|
122
|
+
def get(section: str, option: str, issuer: str, vo: str = DEFAULT_VO) -> Any:
|
|
122
123
|
"""
|
|
123
124
|
Get an option value for the named section. Value can be auto-coerced to int, float, and bool; string otherwise.
|
|
124
125
|
|
|
@@ -140,7 +141,7 @@ def get(section: str, option: str, issuer: str, vo: str = 'def') -> Any:
|
|
|
140
141
|
return config.get(section, option, session=session, convert_type_fnc=convert_to_any_type)
|
|
141
142
|
|
|
142
143
|
|
|
143
|
-
def items(section: str, issuer: str, vo: str =
|
|
144
|
+
def items(section: str, issuer: str, vo: str = DEFAULT_VO) -> list[tuple[str, Any]]:
|
|
144
145
|
"""
|
|
145
146
|
Return a list of (option, value) pairs for each option in the given section. Values are auto-coerced as in get().
|
|
146
147
|
|
|
@@ -159,7 +160,7 @@ def items(section: str, issuer: str, vo: str = 'def') -> list[tuple[str, Any]]:
|
|
|
159
160
|
return config.items(section, session=session, convert_type_fnc=convert_to_any_type)
|
|
160
161
|
|
|
161
162
|
|
|
162
|
-
def set(section: str, option: str, value: Any, issuer: str, vo: str =
|
|
163
|
+
def set(section: str, option: str, value: Any, issuer: str, vo: str = DEFAULT_VO) -> None:
|
|
163
164
|
"""
|
|
164
165
|
Set the given option to the specified value.
|
|
165
166
|
|
|
@@ -178,7 +179,7 @@ def set(section: str, option: str, value: Any, issuer: str, vo: str = 'def') ->
|
|
|
178
179
|
return config.set(section, option, value, session=session)
|
|
179
180
|
|
|
180
181
|
|
|
181
|
-
def remove_section(section: str, issuer: str, vo: str =
|
|
182
|
+
def remove_section(section: str, issuer: str, vo: str = DEFAULT_VO) -> bool:
|
|
182
183
|
"""
|
|
183
184
|
Remove the specified option from the specified section.
|
|
184
185
|
|
|
@@ -196,7 +197,7 @@ def remove_section(section: str, issuer: str, vo: str = 'def') -> bool:
|
|
|
196
197
|
return config.remove_section(section, session=session)
|
|
197
198
|
|
|
198
199
|
|
|
199
|
-
def remove_option(section: str, option: str, issuer: str, vo: str =
|
|
200
|
+
def remove_option(section: str, option: str, issuer: str, vo: str = DEFAULT_VO) -> bool:
|
|
200
201
|
"""
|
|
201
202
|
Remove the specified section from the configuration.
|
|
202
203
|
|
rucio/gateway/credential.py
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
from typing import TYPE_CHECKING
|
|
16
16
|
|
|
17
17
|
from rucio.common import exception
|
|
18
|
+
from rucio.common.constants import DEFAULT_VO
|
|
18
19
|
from rucio.core import credential
|
|
19
20
|
from rucio.core.rse import get_rse_id
|
|
20
21
|
from rucio.db.sqla.constants import DatabaseOperationType
|
|
@@ -32,7 +33,7 @@ def get_signed_url(
|
|
|
32
33
|
operation: 'RSE_BASE_SUPPORTED_PROTOCOL_OPERATIONS_LITERAL',
|
|
33
34
|
url: str,
|
|
34
35
|
lifetime: int,
|
|
35
|
-
vo: str =
|
|
36
|
+
vo: str = DEFAULT_VO,
|
|
36
37
|
) -> str:
|
|
37
38
|
"""
|
|
38
39
|
Get a signed URL for a particular service and operation.
|
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,7 +40,7 @@ def list_dids(
|
|
|
40
40
|
offset: Optional[int] = None,
|
|
41
41
|
long: bool = False,
|
|
42
42
|
recursive: bool = False,
|
|
43
|
-
vo: str =
|
|
43
|
+
vo: str = DEFAULT_VO,
|
|
44
44
|
) -> 'Iterator[dict[str, Any]]':
|
|
45
45
|
"""
|
|
46
46
|
List DIDs in a scope.
|
|
@@ -84,7 +84,7 @@ 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 =
|
|
87
|
+
vo: str = DEFAULT_VO,
|
|
88
88
|
) -> None:
|
|
89
89
|
"""
|
|
90
90
|
Add data DID.
|
|
@@ -152,7 +152,7 @@ def add_did(
|
|
|
152
152
|
def add_dids(
|
|
153
153
|
dids: 'Sequence[dict[str, Any]]',
|
|
154
154
|
issuer: str,
|
|
155
|
-
vo: str =
|
|
155
|
+
vo: str = DEFAULT_VO,
|
|
156
156
|
) -> None:
|
|
157
157
|
"""
|
|
158
158
|
Bulk Add DID.
|
|
@@ -190,7 +190,7 @@ def attach_dids(
|
|
|
190
190
|
name: str,
|
|
191
191
|
attachment: dict[str, Any],
|
|
192
192
|
issuer: str,
|
|
193
|
-
vo=
|
|
193
|
+
vo: str = DEFAULT_VO,
|
|
194
194
|
) -> None:
|
|
195
195
|
"""
|
|
196
196
|
Append content to data DID.
|
|
@@ -237,7 +237,7 @@ 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 =
|
|
240
|
+
vo: str = DEFAULT_VO,
|
|
241
241
|
) -> None:
|
|
242
242
|
"""
|
|
243
243
|
Append content to DIDs.
|
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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=
|
|
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 =
|
|
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 =
|
|
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 =
|
|
445
|
+
vo: str = DEFAULT_VO,
|
|
446
446
|
) -> 'Iterator[dict[str, Any]]':
|
|
447
447
|
"""
|
|
448
448
|
List data identifiers in a scope.
|
|
@@ -466,7 +466,7 @@ 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 =
|
|
469
|
+
def get_did(scope: str, name: str, dynamic_depth: Optional[DIDType] = None, vo: str = DEFAULT_VO) -> "dict[str, Any]":
|
|
470
470
|
"""
|
|
471
471
|
Retrieve a single data DID.
|
|
472
472
|
|
|
@@ -493,7 +493,7 @@ def set_metadata(
|
|
|
493
493
|
value: Any,
|
|
494
494
|
issuer: str,
|
|
495
495
|
recursive: bool = False,
|
|
496
|
-
vo: str =
|
|
496
|
+
vo: str = DEFAULT_VO,
|
|
497
497
|
) -> None:
|
|
498
498
|
"""
|
|
499
499
|
Add metadata to data DID.
|
|
@@ -526,7 +526,7 @@ def set_metadata_bulk(
|
|
|
526
526
|
meta: dict[str, Any],
|
|
527
527
|
issuer: str,
|
|
528
528
|
recursive: bool = False,
|
|
529
|
-
vo: str =
|
|
529
|
+
vo: str = DEFAULT_VO,
|
|
530
530
|
) -> None:
|
|
531
531
|
"""
|
|
532
532
|
Add metadata to data DID.
|
|
@@ -557,7 +557,7 @@ def set_dids_metadata_bulk(
|
|
|
557
557
|
dids: 'Iterable[dict[str, Any]]',
|
|
558
558
|
issuer: str,
|
|
559
559
|
recursive: bool = False,
|
|
560
|
-
vo: str =
|
|
560
|
+
vo: str = DEFAULT_VO,
|
|
561
561
|
) -> None:
|
|
562
562
|
"""
|
|
563
563
|
Add metadata to a list of data identifiers.
|
|
@@ -587,7 +587,7 @@ def get_metadata(
|
|
|
587
587
|
scope: str,
|
|
588
588
|
name: str,
|
|
589
589
|
plugin: str = 'DID_COLUMN',
|
|
590
|
-
vo: str =
|
|
590
|
+
vo: str = DEFAULT_VO,
|
|
591
591
|
) -> dict[str, Any]:
|
|
592
592
|
"""
|
|
593
593
|
Get data identifier metadata
|
|
@@ -609,7 +609,7 @@ 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 =
|
|
612
|
+
vo: str = DEFAULT_VO,
|
|
613
613
|
) -> 'Iterator[dict[str, Any]]':
|
|
614
614
|
"""
|
|
615
615
|
Get metadata for a list of DIDs
|
|
@@ -633,7 +633,7 @@ def delete_metadata(
|
|
|
633
633
|
scope: str,
|
|
634
634
|
name: str,
|
|
635
635
|
key: str,
|
|
636
|
-
vo: str =
|
|
636
|
+
vo: str = DEFAULT_VO,
|
|
637
637
|
) -> None:
|
|
638
638
|
"""
|
|
639
639
|
Delete a key from the metadata column
|
|
@@ -653,7 +653,7 @@ def set_status(
|
|
|
653
653
|
scope: str,
|
|
654
654
|
name: str,
|
|
655
655
|
issuer: str,
|
|
656
|
-
vo: str =
|
|
656
|
+
vo: str = DEFAULT_VO,
|
|
657
657
|
**kwargs
|
|
658
658
|
) -> None:
|
|
659
659
|
"""
|
|
@@ -678,7 +678,7 @@ def set_status(
|
|
|
678
678
|
|
|
679
679
|
def get_dataset_by_guid(
|
|
680
680
|
guid: str,
|
|
681
|
-
vo: str =
|
|
681
|
+
vo: str = DEFAULT_VO,
|
|
682
682
|
) -> 'Iterator[dict[str, Any]]':
|
|
683
683
|
"""
|
|
684
684
|
Get the parent datasets for a given GUID.
|
|
@@ -699,7 +699,7 @@ def get_dataset_by_guid(
|
|
|
699
699
|
def list_parent_dids(
|
|
700
700
|
scope: str,
|
|
701
701
|
name: str,
|
|
702
|
-
vo: str =
|
|
702
|
+
vo: str = DEFAULT_VO,
|
|
703
703
|
) -> 'Iterator[dict[str, Any]]':
|
|
704
704
|
"""
|
|
705
705
|
List parent datasets and containers of a DID.
|
|
@@ -725,7 +725,7 @@ def create_did_sample(
|
|
|
725
725
|
output_name: str,
|
|
726
726
|
issuer: str,
|
|
727
727
|
nbfiles: str,
|
|
728
|
-
vo: str =
|
|
728
|
+
vo: str = DEFAULT_VO,
|
|
729
729
|
):
|
|
730
730
|
"""
|
|
731
731
|
Create a sample from an input collection.
|
|
@@ -758,7 +758,7 @@ def create_did_sample(
|
|
|
758
758
|
def resurrect(
|
|
759
759
|
dids: 'Iterable[dict[str, Any]]',
|
|
760
760
|
issuer: str,
|
|
761
|
-
vo: str =
|
|
761
|
+
vo: str = DEFAULT_VO,
|
|
762
762
|
) -> None:
|
|
763
763
|
"""
|
|
764
764
|
Resurrect DIDs.
|
|
@@ -783,7 +783,7 @@ def resurrect(
|
|
|
783
783
|
def list_archive_content(
|
|
784
784
|
scope: str,
|
|
785
785
|
name: str,
|
|
786
|
-
vo: str =
|
|
786
|
+
vo: str = DEFAULT_VO,
|
|
787
787
|
) -> 'Iterator[dict[str, Any]]':
|
|
788
788
|
"""
|
|
789
789
|
List archive contents.
|
|
@@ -805,7 +805,7 @@ def add_did_to_followed(
|
|
|
805
805
|
scope: str,
|
|
806
806
|
name: str,
|
|
807
807
|
account: str,
|
|
808
|
-
vo: str =
|
|
808
|
+
vo: str = DEFAULT_VO
|
|
809
809
|
) -> None:
|
|
810
810
|
"""
|
|
811
811
|
Mark a DID as followed by the given account
|
|
@@ -823,7 +823,7 @@ 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 =
|
|
826
|
+
vo: str = DEFAULT_VO
|
|
827
827
|
) -> None:
|
|
828
828
|
"""
|
|
829
829
|
Bulk mark datasets as followed
|
|
@@ -839,7 +839,7 @@ def add_dids_to_followed(
|
|
|
839
839
|
def get_users_following_did(
|
|
840
840
|
name: str,
|
|
841
841
|
scope: str,
|
|
842
|
-
vo: str =
|
|
842
|
+
vo: str = DEFAULT_VO
|
|
843
843
|
) -> 'Iterator[dict[str, str]]':
|
|
844
844
|
"""
|
|
845
845
|
Return list of users following a DID
|
|
@@ -860,7 +860,7 @@ def remove_did_from_followed(
|
|
|
860
860
|
name: str,
|
|
861
861
|
account: str,
|
|
862
862
|
issuer: str,
|
|
863
|
-
vo: str =
|
|
863
|
+
vo: str = DEFAULT_VO
|
|
864
864
|
) -> None:
|
|
865
865
|
"""
|
|
866
866
|
Mark a DID as not followed
|
|
@@ -885,7 +885,7 @@ def remove_dids_from_followed(
|
|
|
885
885
|
dids: 'Iterable[Mapping[str, Any]]',
|
|
886
886
|
account: str,
|
|
887
887
|
issuer: str,
|
|
888
|
-
vo: str =
|
|
888
|
+
vo: str = DEFAULT_VO
|
|
889
889
|
) -> None:
|
|
890
890
|
"""
|
|
891
891
|
Bulk mark datasets as not followed
|
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 =
|
|
37
|
+
vo: str = DEFAULT_VO,
|
|
37
38
|
) -> None:
|
|
38
39
|
"""
|
|
39
40
|
Bulk add files :
|
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 =
|
|
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
|
|
rucio/gateway/heartbeat.py
CHANGED
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
35
|
+
vo: str = DEFAULT_VO,
|
|
35
36
|
) -> 'Iterator[dict[str, Any]]':
|
|
36
37
|
"""
|
|
37
38
|
List exceptions to Lifetime Model.
|
|
@@ -54,7 +55,7 @@ def add_exception(
|
|
|
54
55
|
pattern: str,
|
|
55
56
|
comments: str,
|
|
56
57
|
expires_at: str,
|
|
57
|
-
vo: str =
|
|
58
|
+
vo: str = DEFAULT_VO,
|
|
58
59
|
) -> dict[str, Any]:
|
|
59
60
|
"""
|
|
60
61
|
Add exceptions to Lifetime Model.
|
|
@@ -94,7 +95,7 @@ def update_exception(
|
|
|
94
95
|
exception_id: str,
|
|
95
96
|
state: 'LifetimeExceptionsState',
|
|
96
97
|
issuer: str,
|
|
97
|
-
vo: str =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
rucio/gateway/permission.py
CHANGED
|
@@ -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 =
|
|
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 =
|
|
35
|
+
vo: str = DEFAULT_VO,
|
|
35
36
|
) -> None:
|
|
36
37
|
"""
|
|
37
38
|
Quarantine replicas.
|