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/vo.py
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
from typing import Any, Optional
|
|
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 identity
|
|
@@ -24,7 +25,7 @@ from rucio.db.sqla.session import db_session
|
|
|
24
25
|
from rucio.gateway.permission import has_permission
|
|
25
26
|
|
|
26
27
|
|
|
27
|
-
def add_vo(new_vo: str, issuer: str, description: Optional[str] = None, email: Optional[str] = None, vo: str =
|
|
28
|
+
def add_vo(new_vo: str, issuer: str, description: Optional[str] = None, email: Optional[str] = None, vo: str = DEFAULT_VO) -> None:
|
|
28
29
|
'''
|
|
29
30
|
Add a new VO.
|
|
30
31
|
|
|
@@ -48,7 +49,7 @@ def add_vo(new_vo: str, issuer: str, description: Optional[str] = None, email: O
|
|
|
48
49
|
vo_core.add_vo(vo=new_vo, description=description, email=email, session=session)
|
|
49
50
|
|
|
50
51
|
|
|
51
|
-
def list_vos(issuer: str, vo: str =
|
|
52
|
+
def list_vos(issuer: str, vo: str = DEFAULT_VO) -> list[dict[str, Any]]:
|
|
52
53
|
'''
|
|
53
54
|
List the VOs.
|
|
54
55
|
|
|
@@ -73,7 +74,7 @@ def recover_vo_root_identity(
|
|
|
73
74
|
issuer: str,
|
|
74
75
|
default: bool = False,
|
|
75
76
|
password: Optional[str] = None,
|
|
76
|
-
vo: str =
|
|
77
|
+
vo: str = DEFAULT_VO,
|
|
77
78
|
) -> None:
|
|
78
79
|
"""
|
|
79
80
|
Adds a membership association between identity and the root account for given VO.
|
|
@@ -101,7 +102,7 @@ def recover_vo_root_identity(
|
|
|
101
102
|
email=email, account=account, password=password, session=session)
|
|
102
103
|
|
|
103
104
|
|
|
104
|
-
def update_vo(updated_vo: str, parameters: dict[str, Any], issuer: str, vo: str =
|
|
105
|
+
def update_vo(updated_vo: str, parameters: dict[str, Any], issuer: str, vo: str = DEFAULT_VO) -> None:
|
|
105
106
|
"""
|
|
106
107
|
Update VO properties (email, description).
|
|
107
108
|
|
rucio/rse/__init__.py
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
from dogpile.cache import make_region
|
|
16
16
|
|
|
17
|
-
from rucio.common.
|
|
17
|
+
from rucio.common.config import is_client
|
|
18
|
+
from rucio.common.constants import DEFAULT_VO
|
|
18
19
|
from rucio.rse import rsemanager
|
|
19
20
|
|
|
20
21
|
if is_client():
|
|
@@ -25,7 +26,7 @@ else:
|
|
|
25
26
|
setattr(rsemanager, 'SERVER_MODE', True)
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
def get_rse_client(rse, vo=
|
|
29
|
+
def get_rse_client(rse, vo=DEFAULT_VO, **kwarg):
|
|
29
30
|
'''
|
|
30
31
|
get_rse_client
|
|
31
32
|
'''
|
|
@@ -34,7 +35,7 @@ def get_rse_client(rse, vo='def', **kwarg):
|
|
|
34
35
|
return client.get_rse(rse)
|
|
35
36
|
|
|
36
37
|
|
|
37
|
-
def get_signed_url_client(rse, service, op, url, vo=
|
|
38
|
+
def get_signed_url_client(rse, service, op, url, vo=DEFAULT_VO):
|
|
38
39
|
'''
|
|
39
40
|
get_signed_url_client
|
|
40
41
|
'''
|
|
@@ -42,7 +43,7 @@ def get_signed_url_client(rse, service, op, url, vo='def'):
|
|
|
42
43
|
return CredentialClient(vo=vo).get_signed_url(rse, service, op, url)
|
|
43
44
|
|
|
44
45
|
|
|
45
|
-
def get_signed_url_server(rse, service, op, url, vo=
|
|
46
|
+
def get_signed_url_server(rse, service, op, url, vo=DEFAULT_VO):
|
|
46
47
|
'''
|
|
47
48
|
get_signed_url_server
|
|
48
49
|
'''
|
|
@@ -57,7 +58,7 @@ def rse_key_generator(namespace, fn, **kwargs):
|
|
|
57
58
|
'''
|
|
58
59
|
Key generator for RSE
|
|
59
60
|
'''
|
|
60
|
-
def generate_key(rse, vo=
|
|
61
|
+
def generate_key(rse, vo=DEFAULT_VO, session=None):
|
|
61
62
|
'''
|
|
62
63
|
generate_key
|
|
63
64
|
'''
|
|
@@ -81,7 +82,7 @@ if rsemanager.SERVER_MODE: # pylint:disable=no-member
|
|
|
81
82
|
from rucio.core.rse import get_rse_id, get_rse_protocols
|
|
82
83
|
from rucio.core.vo import map_vo
|
|
83
84
|
|
|
84
|
-
def tmp_rse_info(rse=None, vo=
|
|
85
|
+
def tmp_rse_info(rse=None, vo=DEFAULT_VO, rse_id=None, session=None):
|
|
85
86
|
if rse_id is None:
|
|
86
87
|
# This can be called directly by client tools if they're co-located on a server
|
|
87
88
|
# i.e. running rucio cli on a server and during the test suite.
|
rucio/rse/rsemanager.py
CHANGED
|
@@ -22,6 +22,7 @@ from urllib.parse import urlparse
|
|
|
22
22
|
from rucio.common import constants, exception, types, utils
|
|
23
23
|
from rucio.common.checksum import GLOBALLY_SUPPORTED_CHECKSUMS
|
|
24
24
|
from rucio.common.config import config_get_int
|
|
25
|
+
from rucio.common.constants import DEFAULT_VO
|
|
25
26
|
from rucio.common.constraints import STRING_TYPES
|
|
26
27
|
from rucio.common.logging import formatted_logger
|
|
27
28
|
from rucio.common.utils import get_transfer_schemas, make_valid_did
|
|
@@ -34,7 +35,7 @@ if TYPE_CHECKING:
|
|
|
34
35
|
from rucio.rse.protocols.protocol import RSEProtocol
|
|
35
36
|
|
|
36
37
|
|
|
37
|
-
def get_scope_protocol(vo: str =
|
|
38
|
+
def get_scope_protocol(vo: str = DEFAULT_VO) -> 'Callable':
|
|
38
39
|
"""
|
|
39
40
|
Returns the callable protocol to translate the pfn to a name/scope pair
|
|
40
41
|
|
|
@@ -48,7 +49,7 @@ def get_scope_protocol(vo: str = 'def') -> 'Callable':
|
|
|
48
49
|
|
|
49
50
|
def get_rse_info(
|
|
50
51
|
rse: Optional[str] = None,
|
|
51
|
-
vo: str =
|
|
52
|
+
vo: str = DEFAULT_VO,
|
|
52
53
|
rse_id: Optional[str] = None,
|
|
53
54
|
session: Optional["Session"] = None
|
|
54
55
|
) -> types.RSESettingsDict:
|
|
@@ -306,7 +307,7 @@ def exists(
|
|
|
306
307
|
scheme: Optional[str] = None,
|
|
307
308
|
impl: Optional[str] = None,
|
|
308
309
|
auth_token: Optional[str] = None,
|
|
309
|
-
vo: str =
|
|
310
|
+
vo: str = DEFAULT_VO,
|
|
310
311
|
logger: types.LoggerFunction = logging.log
|
|
311
312
|
) -> Union[bool, list[Union[bool, dict[dict[str, str], bool]]]]:
|
|
312
313
|
"""
|
|
@@ -381,7 +382,7 @@ def upload(
|
|
|
381
382
|
delete_existing: bool = False,
|
|
382
383
|
sign_service: Optional[str] = None,
|
|
383
384
|
auth_token: Optional[str] = None,
|
|
384
|
-
vo: str =
|
|
385
|
+
vo: str = DEFAULT_VO,
|
|
385
386
|
logger: types.LoggerFunction = logging.log,
|
|
386
387
|
impl: Optional[str] = None
|
|
387
388
|
) -> dict[Union[int, str], Union[bool, str, dict[str, Union[Literal[True], Exception]]]]:
|
rucio/rse/translation.py
CHANGED
|
@@ -18,7 +18,7 @@ from configparser import NoOptionError, NoSectionError
|
|
|
18
18
|
from typing import TYPE_CHECKING, Any, Optional
|
|
19
19
|
|
|
20
20
|
from rucio.common import config
|
|
21
|
-
from rucio.common.constants import RseAttr
|
|
21
|
+
from rucio.common.constants import DEFAULT_VO, RseAttr
|
|
22
22
|
from rucio.common.exception import ConfigNotFound
|
|
23
23
|
from rucio.common.plugins import PolicyPackageAlgorithms
|
|
24
24
|
|
|
@@ -35,7 +35,7 @@ class RSEDeterministicScopeTranslation(PolicyPackageAlgorithms):
|
|
|
35
35
|
|
|
36
36
|
_algorithm_type = "pfn2lfn"
|
|
37
37
|
|
|
38
|
-
def __init__(self, vo: str =
|
|
38
|
+
def __init__(self, vo: str = DEFAULT_VO):
|
|
39
39
|
super().__init__()
|
|
40
40
|
|
|
41
41
|
logger = logging.getLogger(__name__)
|
rucio/tests/common.py
CHANGED
|
@@ -28,6 +28,7 @@ import pytest
|
|
|
28
28
|
import requests
|
|
29
29
|
|
|
30
30
|
from rucio.common.config import config_get, config_get_bool, get_config_dirs
|
|
31
|
+
from rucio.common.constants import DEFAULT_VO
|
|
31
32
|
from rucio.common.utils import execute
|
|
32
33
|
from rucio.common.utils import generate_uuid as uuid
|
|
33
34
|
|
|
@@ -77,7 +78,7 @@ def get_long_vo() -> str:
|
|
|
77
78
|
Don't map the name to a short version.
|
|
78
79
|
:returns: VO name string.
|
|
79
80
|
"""
|
|
80
|
-
vo_name =
|
|
81
|
+
vo_name = DEFAULT_VO
|
|
81
82
|
if config_get_bool('common', 'multi_vo', raise_exception=False, default=False):
|
|
82
83
|
vo = config_get('client', 'vo', raise_exception=False, default=None)
|
|
83
84
|
if vo is not None:
|
rucio/vcsversion.py
CHANGED
|
@@ -4,8 +4,8 @@ This file is automatically generated; Do not edit it. :)
|
|
|
4
4
|
'''
|
|
5
5
|
VERSION_INFO = {
|
|
6
6
|
'final': True,
|
|
7
|
-
'version': '37.
|
|
7
|
+
'version': '37.7.1',
|
|
8
8
|
'branch_nick': 'release-37',
|
|
9
|
-
'revision_id': '
|
|
10
|
-
'revno':
|
|
9
|
+
'revision_id': '87b1cc805709f99515d5f513e8a22af3042eca51',
|
|
10
|
+
'revno': 13828
|
|
11
11
|
}
|
|
@@ -72,7 +72,7 @@ class LocalAccountLimit(ErrorHandlingMethodView):
|
|
|
72
72
|
parameters = json_parameters()
|
|
73
73
|
bytes_param = param_get(parameters, 'bytes')
|
|
74
74
|
try:
|
|
75
|
-
set_local_account_limit(account=account, rse=rse, bytes_=bytes_param, issuer=request.environ
|
|
75
|
+
set_local_account_limit(account=account, rse=rse, bytes_=bytes_param, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
76
76
|
except AccessDenied as error:
|
|
77
77
|
return generate_http_error_flask(401, error)
|
|
78
78
|
except (RSENotFound, AccountNotFound) as error:
|
|
@@ -108,7 +108,7 @@ class LocalAccountLimit(ErrorHandlingMethodView):
|
|
|
108
108
|
description: "No RSE or account found for the given id."
|
|
109
109
|
"""
|
|
110
110
|
try:
|
|
111
|
-
delete_local_account_limit(account=account, rse=rse, issuer=request.environ
|
|
111
|
+
delete_local_account_limit(account=account, rse=rse, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
112
112
|
except AccessDenied as error:
|
|
113
113
|
return generate_http_error_flask(401, error)
|
|
114
114
|
except (AccountNotFound, RSENotFound) as error:
|
|
@@ -168,8 +168,8 @@ class GlobalAccountLimit(ErrorHandlingMethodView):
|
|
|
168
168
|
account=account,
|
|
169
169
|
rse_expression=rse_expression,
|
|
170
170
|
bytes_=bytes_param,
|
|
171
|
-
issuer=request.environ
|
|
172
|
-
vo=request.environ
|
|
171
|
+
issuer=request.environ['issuer'],
|
|
172
|
+
vo=request.environ['vo'],
|
|
173
173
|
)
|
|
174
174
|
except AccessDenied as error:
|
|
175
175
|
return generate_http_error_flask(401, error)
|
|
@@ -206,7 +206,7 @@ class GlobalAccountLimit(ErrorHandlingMethodView):
|
|
|
206
206
|
description: "No RSE or account found for the given id."
|
|
207
207
|
"""
|
|
208
208
|
try:
|
|
209
|
-
delete_global_account_limit(account=account, rse_expression=rse_expression, issuer=request.environ
|
|
209
|
+
delete_global_account_limit(account=account, rse_expression=rse_expression, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
210
210
|
except AccessDenied as error:
|
|
211
211
|
return generate_http_error_flask(401, error)
|
|
212
212
|
except (AccountNotFound, RSENotFound) as error:
|
|
@@ -17,6 +17,7 @@ from typing import TYPE_CHECKING
|
|
|
17
17
|
|
|
18
18
|
from flask import Flask, Response, request
|
|
19
19
|
|
|
20
|
+
from rucio.common.constants import DEFAULT_VO
|
|
20
21
|
from rucio.gateway.did import list_archive_content
|
|
21
22
|
from rucio.web.rest.flaskapi.authenticated_bp import AuthenticatedBlueprint
|
|
22
23
|
from rucio.web.rest.flaskapi.v1.common import ErrorHandlingMethodView, check_accept_header_wrapper_flask, generate_http_error_flask, parse_scope_name, response_headers, try_stream
|
|
@@ -80,7 +81,7 @@ class Archive(ErrorHandlingMethodView):
|
|
|
80
81
|
for file in list_archive_content(scope=scope, name=name, vo=vo):
|
|
81
82
|
yield dumps(file) + '\n'
|
|
82
83
|
|
|
83
|
-
return try_stream(generate(vo=request.environ.get('vo',
|
|
84
|
+
return try_stream(generate(vo=request.environ.get('vo', DEFAULT_VO)))
|
|
84
85
|
except ValueError as error:
|
|
85
86
|
return generate_http_error_flask(400, error)
|
|
86
87
|
|
|
@@ -30,6 +30,7 @@ from werkzeug.exceptions import HTTPException
|
|
|
30
30
|
from werkzeug.wrappers import Request, Response
|
|
31
31
|
|
|
32
32
|
from rucio.common import config
|
|
33
|
+
from rucio.common.constants import DEFAULT_VO
|
|
33
34
|
from rucio.common.exception import CannotAuthenticate, DatabaseException, IdentityError, RucioException, UnsupportedRequestedContentType
|
|
34
35
|
from rucio.common.schema import get_schema_value
|
|
35
36
|
from rucio.common.utils import generate_uuid, render_json
|
|
@@ -161,7 +162,7 @@ def request_auth_env() -> Optional['ResponseReturnValue']:
|
|
|
161
162
|
logging.exception('Internal error in validate_auth_token')
|
|
162
163
|
return 'Internal Error', 500
|
|
163
164
|
|
|
164
|
-
flask.request.environ['vo'] = auth.get('vo',
|
|
165
|
+
flask.request.environ['vo'] = auth.get('vo', DEFAULT_VO)
|
|
165
166
|
flask.request.environ['issuer'] = auth.get('account')
|
|
166
167
|
flask.request.environ['identity'] = auth.get('identity')
|
|
167
168
|
flask.request.environ['request_id'] = generate_uuid()
|
|
@@ -232,7 +233,7 @@ def parse_scope_name(scope_name: str, vo: Optional[str]) -> tuple[str, ...]:
|
|
|
232
233
|
return scope, name
|
|
233
234
|
|
|
234
235
|
if not vo:
|
|
235
|
-
vo =
|
|
236
|
+
vo = DEFAULT_VO
|
|
236
237
|
|
|
237
238
|
# The ':' in DID is replaced by '/', also an '/' is added. Why?
|
|
238
239
|
pattern = get_schema_value('SCOPE_NAME_REGEXP', vo)
|
|
@@ -413,7 +414,7 @@ def extract_vo(headers: Headers) -> str:
|
|
|
413
414
|
:returns: a string containing the short VO name.
|
|
414
415
|
"""
|
|
415
416
|
try:
|
|
416
|
-
return map_vo(headers.get('X-Rucio-VO', default=
|
|
417
|
+
return map_vo(headers.get('X-Rucio-VO', default=DEFAULT_VO))
|
|
417
418
|
except RucioException as err:
|
|
418
419
|
# VO Name doesn't match allowed spec
|
|
419
420
|
flask.abort(generate_http_error_flask(status_code=400, exc=err))
|