rucio-clients 35.7.0__py3-none-any.whl → 37.0.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-clients might be problematic. Click here for more details.
- rucio/alembicrevision.py +1 -1
- rucio/cli/__init__.py +14 -0
- rucio/cli/account.py +216 -0
- rucio/cli/bin_legacy/__init__.py +13 -0
- rucio_clients-35.7.0.data/scripts/rucio → rucio/cli/bin_legacy/rucio.py +769 -486
- rucio_clients-35.7.0.data/scripts/rucio-admin → rucio/cli/bin_legacy/rucio_admin.py +476 -423
- rucio/cli/command.py +272 -0
- rucio/cli/config.py +72 -0
- rucio/cli/did.py +191 -0
- rucio/cli/download.py +128 -0
- rucio/cli/lifetime_exception.py +33 -0
- rucio/cli/replica.py +162 -0
- rucio/cli/rse.py +293 -0
- rucio/cli/rule.py +158 -0
- rucio/cli/scope.py +40 -0
- rucio/cli/subscription.py +73 -0
- rucio/cli/upload.py +60 -0
- rucio/cli/utils.py +226 -0
- rucio/client/accountclient.py +0 -1
- rucio/client/baseclient.py +33 -24
- rucio/client/client.py +45 -1
- rucio/client/didclient.py +5 -3
- rucio/client/downloadclient.py +6 -8
- rucio/client/replicaclient.py +0 -2
- rucio/client/richclient.py +317 -0
- rucio/client/rseclient.py +4 -4
- rucio/client/uploadclient.py +26 -12
- rucio/common/bittorrent.py +234 -0
- rucio/common/cache.py +66 -29
- rucio/common/checksum.py +168 -0
- rucio/common/client.py +122 -0
- rucio/common/config.py +22 -35
- rucio/common/constants.py +61 -3
- rucio/common/didtype.py +72 -24
- rucio/common/exception.py +65 -8
- rucio/common/extra.py +5 -10
- rucio/common/logging.py +13 -13
- rucio/common/pcache.py +8 -7
- rucio/common/plugins.py +59 -27
- rucio/common/policy.py +12 -3
- rucio/common/schema/__init__.py +84 -34
- rucio/common/schema/generic.py +0 -17
- rucio/common/schema/generic_multi_vo.py +0 -17
- rucio/common/test_rucio_server.py +12 -6
- rucio/common/types.py +132 -52
- rucio/common/utils.py +93 -643
- rucio/rse/__init__.py +3 -3
- rucio/rse/protocols/bittorrent.py +11 -1
- rucio/rse/protocols/cache.py +0 -11
- rucio/rse/protocols/dummy.py +0 -11
- rucio/rse/protocols/gfal.py +14 -9
- rucio/rse/protocols/globus.py +1 -1
- rucio/rse/protocols/http_cache.py +1 -1
- rucio/rse/protocols/posix.py +2 -2
- rucio/rse/protocols/protocol.py +84 -317
- rucio/rse/protocols/rclone.py +2 -1
- rucio/rse/protocols/rfio.py +10 -1
- rucio/rse/protocols/ssh.py +2 -1
- rucio/rse/protocols/storm.py +2 -13
- rucio/rse/protocols/webdav.py +74 -30
- rucio/rse/protocols/xrootd.py +2 -1
- rucio/rse/rsemanager.py +170 -53
- rucio/rse/translation.py +260 -0
- rucio/vcsversion.py +4 -4
- rucio/version.py +7 -0
- {rucio_clients-35.7.0.data → rucio_clients-37.0.0.data}/data/etc/rucio.cfg.atlas.client.template +3 -2
- {rucio_clients-35.7.0.data → rucio_clients-37.0.0.data}/data/etc/rucio.cfg.template +3 -19
- {rucio_clients-35.7.0.data → rucio_clients-37.0.0.data}/data/requirements.client.txt +11 -7
- rucio_clients-37.0.0.data/scripts/rucio +133 -0
- rucio_clients-37.0.0.data/scripts/rucio-admin +97 -0
- {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0.dist-info}/METADATA +18 -14
- rucio_clients-37.0.0.dist-info/RECORD +104 -0
- {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0.dist-info}/licenses/AUTHORS.rst +3 -0
- rucio/common/schema/atlas.py +0 -413
- rucio/common/schema/belleii.py +0 -408
- rucio/common/schema/domatpc.py +0 -401
- rucio/common/schema/escape.py +0 -426
- rucio/common/schema/icecube.py +0 -406
- rucio/rse/protocols/gsiftp.py +0 -92
- rucio_clients-35.7.0.dist-info/RECORD +0 -88
- {rucio_clients-35.7.0.data → rucio_clients-37.0.0.data}/data/etc/rse-accounts.cfg.template +0 -0
- {rucio_clients-35.7.0.data → rucio_clients-37.0.0.data}/data/rucio_client/merge_rucio_configs.py +0 -0
- {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0.dist-info}/WHEEL +0 -0
- {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0.dist-info}/licenses/LICENSE +0 -0
- {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0.dist-info}/top_level.txt +0 -0
rucio/rse/__init__.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from dogpile.cache import make_region
|
|
16
16
|
|
|
17
|
-
from rucio.common.
|
|
17
|
+
from rucio.common.client import is_client
|
|
18
18
|
from rucio.rse import rsemanager
|
|
19
19
|
|
|
20
20
|
if is_client():
|
|
@@ -77,7 +77,7 @@ if rsemanager.CLIENT_MODE: # pylint:disable=no-member
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
if rsemanager.SERVER_MODE: # pylint:disable=no-member
|
|
80
|
-
from rucio.common.cache import
|
|
80
|
+
from rucio.common.cache import MemcacheRegion
|
|
81
81
|
from rucio.core.rse import get_rse_id, get_rse_protocols
|
|
82
82
|
from rucio.core.vo import map_vo
|
|
83
83
|
|
|
@@ -92,5 +92,5 @@ if rsemanager.SERVER_MODE: # pylint:disable=no-member
|
|
|
92
92
|
|
|
93
93
|
setattr(rsemanager, '__request_rse_info', tmp_rse_info)
|
|
94
94
|
setattr(rsemanager, '__get_signed_url', get_signed_url_server)
|
|
95
|
-
RSE_REGION =
|
|
95
|
+
RSE_REGION = MemcacheRegion(expiration_time=900)
|
|
96
96
|
setattr(rsemanager, 'RSE_REGION', RSE_REGION)
|
|
@@ -19,8 +19,9 @@ import time
|
|
|
19
19
|
from urllib.parse import parse_qs, urlencode, urlparse
|
|
20
20
|
|
|
21
21
|
from rucio.common import exception
|
|
22
|
+
from rucio.common.bittorrent import construct_torrent
|
|
22
23
|
from rucio.common.extra import import_extras
|
|
23
|
-
from rucio.common.utils import
|
|
24
|
+
from rucio.common.utils import resolve_ip
|
|
24
25
|
from rucio.rse import rsemanager
|
|
25
26
|
from rucio.rse.protocols.protocol import RSEProtocol
|
|
26
27
|
|
|
@@ -182,3 +183,12 @@ class Default(RSEProtocol):
|
|
|
182
183
|
time.sleep(0.25)
|
|
183
184
|
finally:
|
|
184
185
|
ses.remove_torrent(handle)
|
|
186
|
+
|
|
187
|
+
def delete(self, path):
|
|
188
|
+
raise NotImplementedError
|
|
189
|
+
|
|
190
|
+
def put(self, source, target, source_dir, transfer_timeout=None):
|
|
191
|
+
raise NotImplementedError
|
|
192
|
+
|
|
193
|
+
def rename(self, path, new_path):
|
|
194
|
+
raise NotImplementedError
|
rucio/rse/protocols/cache.py
CHANGED
|
@@ -49,17 +49,6 @@ class Default(protocol.RSEProtocol):
|
|
|
49
49
|
"""
|
|
50
50
|
return ''.join([self.rse['scheme'], '://%s' % self.rse['hostname'], path])
|
|
51
51
|
|
|
52
|
-
def exists(self, pfn):
|
|
53
|
-
""" Checks if the requested file is known by the referred RSE.
|
|
54
|
-
|
|
55
|
-
:param pfn: Physical file name
|
|
56
|
-
|
|
57
|
-
:returns: True if the file exists, False if it doesn't
|
|
58
|
-
|
|
59
|
-
:raise ServiceUnavailable
|
|
60
|
-
"""
|
|
61
|
-
raise NotImplementedError
|
|
62
|
-
|
|
63
52
|
def connect(self):
|
|
64
53
|
""" Establishes the actual connection to the referred RSE.
|
|
65
54
|
|
rucio/rse/protocols/dummy.py
CHANGED
|
@@ -38,17 +38,6 @@ class Default(protocol.RSEProtocol):
|
|
|
38
38
|
"""
|
|
39
39
|
return ''.join([self.rse['scheme'], '://%s' % self.rse['hostname'], path])
|
|
40
40
|
|
|
41
|
-
def exists(self, pfn):
|
|
42
|
-
""" Checks if the requested file is known by the referred RSE.
|
|
43
|
-
|
|
44
|
-
:param pfn: Physical file name
|
|
45
|
-
|
|
46
|
-
:returns: True if the file exists, False if it doesn't
|
|
47
|
-
|
|
48
|
-
:raise ServiceUnavailable
|
|
49
|
-
"""
|
|
50
|
-
raise NotImplementedError
|
|
51
|
-
|
|
52
41
|
def connect(self):
|
|
53
42
|
""" Establishes the actual connection to the referred RSE.
|
|
54
43
|
|
rucio/rse/protocols/gfal.py
CHANGED
|
@@ -22,13 +22,13 @@ import urllib.parse as urlparse
|
|
|
22
22
|
from threading import Timer
|
|
23
23
|
|
|
24
24
|
from rucio.common import config, exception
|
|
25
|
+
from rucio.common.checksum import GLOBALLY_SUPPORTED_CHECKSUMS, PREFERRED_CHECKSUM
|
|
25
26
|
from rucio.common.constraints import STRING_TYPES
|
|
26
|
-
from rucio.common.utils import GLOBALLY_SUPPORTED_CHECKSUMS, PREFERRED_CHECKSUM
|
|
27
27
|
from rucio.rse.protocols import protocol
|
|
28
28
|
|
|
29
29
|
try:
|
|
30
30
|
import gfal2 # pylint: disable=import-error
|
|
31
|
-
except:
|
|
31
|
+
except Exception:
|
|
32
32
|
if 'RUCIO_CLIENT_MODE' not in os.environ:
|
|
33
33
|
if not config.config_has_section('database'):
|
|
34
34
|
raise exception.MissingDependency('Missing dependency : gfal2')
|
|
@@ -186,6 +186,7 @@ class Default(protocol.RSEProtocol):
|
|
|
186
186
|
self.__ctx.set_opt_string_list("SRM PLUGIN", "TURL_PROTOCOLS", ["gsiftp", "rfio", "gsidcap", "dcap", "kdcap"])
|
|
187
187
|
self.__ctx.set_opt_string("XROOTD PLUGIN", "XRD.WANTPROT", "gsi,unix")
|
|
188
188
|
self.__ctx.set_opt_boolean("XROOTD PLUGIN", "NORMALIZE_PATH", False)
|
|
189
|
+
self.__ctx.set_opt_boolean("HTTP PLUGIN", "RETRIEVE_BEARER_TOKEN", False)
|
|
189
190
|
auth_configured = False
|
|
190
191
|
if self.auth_token:
|
|
191
192
|
self.__ctx.set_opt_string("BEARER", "TOKEN", self.auth_token)
|
|
@@ -343,8 +344,13 @@ class Default(protocol.RSEProtocol):
|
|
|
343
344
|
|
|
344
345
|
:raises SourceNotFound: if the source file was not found on the referred storage.
|
|
345
346
|
"""
|
|
347
|
+
|
|
346
348
|
self.logger(logging.DEBUG, 'checking if file exists {}'.format(path))
|
|
347
349
|
|
|
350
|
+
if path is None:
|
|
351
|
+
# Action not supported
|
|
352
|
+
raise exception.RSEOperationNotSupported()
|
|
353
|
+
|
|
348
354
|
try:
|
|
349
355
|
status = self.__gfal2_exist(path)
|
|
350
356
|
if status:
|
|
@@ -488,12 +494,12 @@ class Default(protocol.RSEProtocol):
|
|
|
488
494
|
|
|
489
495
|
try:
|
|
490
496
|
for path in paths:
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
+
# GFAL does a PROPFIND request before DELETE when the scheme is
|
|
498
|
+
# davs://, which is wasteful.
|
|
499
|
+
path = re.sub('^davs://', 'https://', str(path))
|
|
500
|
+
ret = ctx.unlink(path)
|
|
501
|
+
if ret:
|
|
502
|
+
return ret
|
|
497
503
|
return ret
|
|
498
504
|
except gfal2.GError as error: # pylint: disable=no-member
|
|
499
505
|
if error.code == errno.ENOENT or 'No such file' in str(error):
|
|
@@ -514,7 +520,6 @@ class Default(protocol.RSEProtocol):
|
|
|
514
520
|
try:
|
|
515
521
|
if ctx.stat(str(path)):
|
|
516
522
|
return 0
|
|
517
|
-
return -1
|
|
518
523
|
except gfal2.GError as error: # pylint: disable=no-member
|
|
519
524
|
if error.code == errno.ENOENT or 'No such file' in str(error): # pylint: disable=no-member
|
|
520
525
|
return -1
|
rucio/rse/protocols/globus.py
CHANGED
|
@@ -24,7 +24,7 @@ class Default(ngarc.Default):
|
|
|
24
24
|
|
|
25
25
|
:param props: Properties derived from the RSE Repository
|
|
26
26
|
"""
|
|
27
|
-
super(Default, self).__init__(protocol_attr, rse_settings, logger=logger)
|
|
27
|
+
super(Default, self).__init__(protocol_attr, rse_settings, logger=logger) # type: ignore (logger might be None)
|
|
28
28
|
self.attributes.pop('determinism_type', None)
|
|
29
29
|
self.files = []
|
|
30
30
|
|
rucio/rse/protocols/posix.py
CHANGED
|
@@ -19,7 +19,7 @@ import shutil
|
|
|
19
19
|
from subprocess import call
|
|
20
20
|
|
|
21
21
|
from rucio.common import exception
|
|
22
|
-
from rucio.common.
|
|
22
|
+
from rucio.common.checksum import adler32
|
|
23
23
|
from rucio.rse.protocols import protocol
|
|
24
24
|
|
|
25
25
|
|
|
@@ -181,7 +181,7 @@ class Default(protocol.RSEProtocol):
|
|
|
181
181
|
lfns = [lfns] if isinstance(lfns, dict) else lfns
|
|
182
182
|
for lfn in lfns:
|
|
183
183
|
scope, name = str(lfn['scope']), lfn['name']
|
|
184
|
-
if lfn.get('path'):
|
|
184
|
+
if 'path' in lfn and lfn.get('path'):
|
|
185
185
|
pfns['%s:%s' % (scope, name)] = ''.join([self.attributes['scheme'],
|
|
186
186
|
'://',
|
|
187
187
|
self.attributes['hostname'],
|