rucio-clients 35.8.2__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.
Files changed (88) hide show
  1. rucio/__init__.py +17 -0
  2. rucio/alembicrevision.py +15 -0
  3. rucio/client/__init__.py +15 -0
  4. rucio/client/accountclient.py +433 -0
  5. rucio/client/accountlimitclient.py +183 -0
  6. rucio/client/baseclient.py +974 -0
  7. rucio/client/client.py +76 -0
  8. rucio/client/configclient.py +126 -0
  9. rucio/client/credentialclient.py +59 -0
  10. rucio/client/didclient.py +866 -0
  11. rucio/client/diracclient.py +56 -0
  12. rucio/client/downloadclient.py +1785 -0
  13. rucio/client/exportclient.py +44 -0
  14. rucio/client/fileclient.py +50 -0
  15. rucio/client/importclient.py +42 -0
  16. rucio/client/lifetimeclient.py +90 -0
  17. rucio/client/lockclient.py +109 -0
  18. rucio/client/metaconventionsclient.py +140 -0
  19. rucio/client/pingclient.py +44 -0
  20. rucio/client/replicaclient.py +454 -0
  21. rucio/client/requestclient.py +125 -0
  22. rucio/client/rseclient.py +746 -0
  23. rucio/client/ruleclient.py +294 -0
  24. rucio/client/scopeclient.py +90 -0
  25. rucio/client/subscriptionclient.py +173 -0
  26. rucio/client/touchclient.py +82 -0
  27. rucio/client/uploadclient.py +955 -0
  28. rucio/common/__init__.py +13 -0
  29. rucio/common/cache.py +74 -0
  30. rucio/common/config.py +801 -0
  31. rucio/common/constants.py +159 -0
  32. rucio/common/constraints.py +17 -0
  33. rucio/common/didtype.py +189 -0
  34. rucio/common/exception.py +1151 -0
  35. rucio/common/extra.py +36 -0
  36. rucio/common/logging.py +420 -0
  37. rucio/common/pcache.py +1408 -0
  38. rucio/common/plugins.py +153 -0
  39. rucio/common/policy.py +84 -0
  40. rucio/common/schema/__init__.py +150 -0
  41. rucio/common/schema/atlas.py +413 -0
  42. rucio/common/schema/belleii.py +408 -0
  43. rucio/common/schema/domatpc.py +401 -0
  44. rucio/common/schema/escape.py +426 -0
  45. rucio/common/schema/generic.py +433 -0
  46. rucio/common/schema/generic_multi_vo.py +412 -0
  47. rucio/common/schema/icecube.py +406 -0
  48. rucio/common/stomp_utils.py +159 -0
  49. rucio/common/stopwatch.py +55 -0
  50. rucio/common/test_rucio_server.py +148 -0
  51. rucio/common/types.py +403 -0
  52. rucio/common/utils.py +2238 -0
  53. rucio/rse/__init__.py +96 -0
  54. rucio/rse/protocols/__init__.py +13 -0
  55. rucio/rse/protocols/bittorrent.py +184 -0
  56. rucio/rse/protocols/cache.py +122 -0
  57. rucio/rse/protocols/dummy.py +111 -0
  58. rucio/rse/protocols/gfal.py +703 -0
  59. rucio/rse/protocols/globus.py +243 -0
  60. rucio/rse/protocols/gsiftp.py +92 -0
  61. rucio/rse/protocols/http_cache.py +82 -0
  62. rucio/rse/protocols/mock.py +123 -0
  63. rucio/rse/protocols/ngarc.py +209 -0
  64. rucio/rse/protocols/posix.py +250 -0
  65. rucio/rse/protocols/protocol.py +594 -0
  66. rucio/rse/protocols/rclone.py +364 -0
  67. rucio/rse/protocols/rfio.py +136 -0
  68. rucio/rse/protocols/srm.py +338 -0
  69. rucio/rse/protocols/ssh.py +413 -0
  70. rucio/rse/protocols/storm.py +206 -0
  71. rucio/rse/protocols/webdav.py +550 -0
  72. rucio/rse/protocols/xrootd.py +301 -0
  73. rucio/rse/rsemanager.py +764 -0
  74. rucio/vcsversion.py +11 -0
  75. rucio/version.py +38 -0
  76. rucio_clients-35.8.2.data/data/etc/rse-accounts.cfg.template +25 -0
  77. rucio_clients-35.8.2.data/data/etc/rucio.cfg.atlas.client.template +42 -0
  78. rucio_clients-35.8.2.data/data/etc/rucio.cfg.template +257 -0
  79. rucio_clients-35.8.2.data/data/requirements.client.txt +15 -0
  80. rucio_clients-35.8.2.data/data/rucio_client/merge_rucio_configs.py +144 -0
  81. rucio_clients-35.8.2.data/scripts/rucio +2542 -0
  82. rucio_clients-35.8.2.data/scripts/rucio-admin +2447 -0
  83. rucio_clients-35.8.2.dist-info/METADATA +50 -0
  84. rucio_clients-35.8.2.dist-info/RECORD +88 -0
  85. rucio_clients-35.8.2.dist-info/WHEEL +5 -0
  86. rucio_clients-35.8.2.dist-info/licenses/AUTHORS.rst +97 -0
  87. rucio_clients-35.8.2.dist-info/licenses/LICENSE +201 -0
  88. rucio_clients-35.8.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,13 @@
1
+ # Copyright European Organization for Nuclear Research (CERN) since 2012
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
rucio/common/cache.py ADDED
@@ -0,0 +1,74 @@
1
+ # Copyright European Organization for Nuclear Research (CERN) since 2012
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from typing import TYPE_CHECKING
16
+
17
+ from dogpile.cache import make_region
18
+
19
+ from rucio.common.config import config_get
20
+ from rucio.common.utils import is_client
21
+
22
+ if TYPE_CHECKING:
23
+ from collections.abc import Callable
24
+ from typing import Optional
25
+
26
+ from dogpile.cache.region import CacheRegion
27
+
28
+ CACHE_URL = config_get('cache', 'url', False, '127.0.0.1:11211', check_config_table=False)
29
+
30
+ ENABLE_CACHING = True
31
+ _mc_client = None
32
+ try:
33
+ if is_client():
34
+ ENABLE_CACHING = False
35
+ else:
36
+ import pymemcache
37
+ _mc_client = pymemcache.Client(CACHE_URL, connect_timeout=1, timeout=1)
38
+ _mc_client.version()
39
+ except OSError:
40
+ ENABLE_CACHING = False
41
+ except ImportError:
42
+ ENABLE_CACHING = False
43
+ finally:
44
+ if _mc_client:
45
+ _mc_client.close()
46
+
47
+
48
+ def make_region_memcached(
49
+ expiration_time: int,
50
+ function_key_generator: "Optional[Callable]" = None,
51
+ memcached_expire_time: "Optional[int]" = None
52
+ ) -> "CacheRegion":
53
+ """
54
+ Make and configure a dogpile.cache.pymemcache region
55
+ """
56
+ if function_key_generator:
57
+ region = make_region(function_key_generator=function_key_generator)
58
+ else:
59
+ region = make_region()
60
+
61
+ if ENABLE_CACHING:
62
+ region.configure(
63
+ 'dogpile.cache.pymemcache',
64
+ expiration_time=expiration_time,
65
+ arguments={
66
+ 'url': CACHE_URL,
67
+ 'distributed_lock': True,
68
+ 'memcached_expire_time': memcached_expire_time if memcached_expire_time else expiration_time + 60, # must be bigger than expiration_time
69
+ }
70
+ )
71
+ else:
72
+ region.configure('dogpile.cache.null')
73
+
74
+ return region