rucio-clients 32.8.6__py3-none-any.whl → 35.8.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/__init__.py +0 -1
- rucio/alembicrevision.py +1 -2
- rucio/client/__init__.py +0 -1
- rucio/client/accountclient.py +45 -25
- rucio/client/accountlimitclient.py +37 -9
- rucio/client/baseclient.py +199 -154
- rucio/client/client.py +2 -3
- rucio/client/configclient.py +19 -6
- rucio/client/credentialclient.py +9 -4
- rucio/client/didclient.py +238 -63
- rucio/client/diracclient.py +13 -5
- rucio/client/downloadclient.py +162 -51
- rucio/client/exportclient.py +4 -4
- rucio/client/fileclient.py +3 -4
- rucio/client/importclient.py +4 -4
- rucio/client/lifetimeclient.py +21 -5
- rucio/client/lockclient.py +18 -8
- rucio/client/{metaclient.py → metaconventionsclient.py} +18 -15
- rucio/client/pingclient.py +0 -1
- rucio/client/replicaclient.py +15 -5
- rucio/client/requestclient.py +35 -19
- rucio/client/rseclient.py +133 -51
- rucio/client/ruleclient.py +29 -22
- rucio/client/scopeclient.py +8 -6
- rucio/client/subscriptionclient.py +47 -35
- rucio/client/touchclient.py +8 -4
- rucio/client/uploadclient.py +166 -82
- rucio/common/__init__.py +0 -1
- rucio/common/cache.py +4 -4
- rucio/common/config.py +52 -47
- rucio/common/constants.py +69 -2
- rucio/common/constraints.py +0 -1
- rucio/common/didtype.py +24 -22
- rucio/common/exception.py +281 -222
- rucio/common/extra.py +0 -1
- rucio/common/logging.py +54 -38
- rucio/common/pcache.py +122 -101
- rucio/common/plugins.py +153 -0
- rucio/common/policy.py +4 -4
- rucio/common/schema/__init__.py +17 -10
- rucio/common/schema/atlas.py +7 -5
- rucio/common/schema/belleii.py +7 -5
- rucio/common/schema/domatpc.py +7 -5
- rucio/common/schema/escape.py +7 -5
- rucio/common/schema/generic.py +8 -6
- rucio/common/schema/generic_multi_vo.py +7 -5
- rucio/common/schema/icecube.py +7 -5
- rucio/common/stomp_utils.py +0 -1
- rucio/common/stopwatch.py +0 -1
- rucio/common/test_rucio_server.py +2 -2
- rucio/common/types.py +262 -17
- rucio/common/utils.py +743 -451
- rucio/rse/__init__.py +3 -4
- rucio/rse/protocols/__init__.py +0 -1
- rucio/rse/protocols/bittorrent.py +184 -0
- rucio/rse/protocols/cache.py +1 -2
- rucio/rse/protocols/dummy.py +1 -2
- rucio/rse/protocols/gfal.py +12 -10
- rucio/rse/protocols/globus.py +7 -7
- rucio/rse/protocols/gsiftp.py +2 -3
- rucio/rse/protocols/http_cache.py +1 -2
- rucio/rse/protocols/mock.py +1 -2
- rucio/rse/protocols/ngarc.py +1 -2
- rucio/rse/protocols/posix.py +12 -13
- rucio/rse/protocols/protocol.py +116 -52
- rucio/rse/protocols/rclone.py +6 -7
- rucio/rse/protocols/rfio.py +4 -5
- rucio/rse/protocols/srm.py +9 -10
- rucio/rse/protocols/ssh.py +8 -9
- rucio/rse/protocols/storm.py +2 -3
- rucio/rse/protocols/webdav.py +17 -14
- rucio/rse/protocols/xrootd.py +23 -17
- rucio/rse/rsemanager.py +19 -7
- rucio/vcsversion.py +4 -4
- rucio/version.py +5 -13
- rucio_clients-35.8.0.data/data/requirements.client.txt +15 -0
- {rucio_clients-32.8.6.data → rucio_clients-35.8.0.data}/data/rucio_client/merge_rucio_configs.py +2 -5
- {rucio_clients-32.8.6.data → rucio_clients-35.8.0.data}/scripts/rucio +87 -85
- {rucio_clients-32.8.6.data → rucio_clients-35.8.0.data}/scripts/rucio-admin +45 -32
- {rucio_clients-32.8.6.dist-info → rucio_clients-35.8.0.dist-info}/METADATA +13 -13
- rucio_clients-35.8.0.dist-info/RECORD +88 -0
- {rucio_clients-32.8.6.dist-info → rucio_clients-35.8.0.dist-info}/WHEEL +1 -1
- {rucio_clients-32.8.6.dist-info → rucio_clients-35.8.0.dist-info}/licenses/AUTHORS.rst +3 -0
- rucio/common/schema/cms.py +0 -478
- rucio/common/schema/lsst.py +0 -423
- rucio_clients-32.8.6.data/data/requirements.txt +0 -55
- rucio_clients-32.8.6.dist-info/RECORD +0 -88
- {rucio_clients-32.8.6.data → rucio_clients-35.8.0.data}/data/etc/rse-accounts.cfg.template +0 -0
- {rucio_clients-32.8.6.data → rucio_clients-35.8.0.data}/data/etc/rucio.cfg.atlas.client.template +0 -0
- {rucio_clients-32.8.6.data → rucio_clients-35.8.0.data}/data/etc/rucio.cfg.template +0 -0
- {rucio_clients-32.8.6.dist-info → rucio_clients-35.8.0.dist-info}/licenses/LICENSE +0 -0
- {rucio_clients-32.8.6.dist-info → rucio_clients-35.8.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
rucio/__init__.py,sha256=Y7cPPlHVQPFyN8bSPFC0W3WViEdONr5g_qwBub5rufE,660
|
|
2
|
+
rucio/alembicrevision.py,sha256=cvH9DsDzl7pCXmg1g_sfQ5rDJttSk8ULj0ojSdrbFzg,690
|
|
3
|
+
rucio/vcsversion.py,sha256=zzrA-6E4IBjgM3BSyQvFv8WjBTgHTNsyoVcsVuBOUsA,248
|
|
4
|
+
rucio/version.py,sha256=k9Jc0DNwCHLS1rwtNo3qOJX0WFkL-kexdtBCKFabQ4A,1325
|
|
5
|
+
rucio/client/__init__.py,sha256=0-jkSlrJf-eqbN4swA5a07eaWd6_6JXPQPLXMs4A3iI,660
|
|
6
|
+
rucio/client/accountclient.py,sha256=o8qUg-NZc_PwLk_lMevaBEdM0LdvaJ4_qGmNqgd2dkI,17370
|
|
7
|
+
rucio/client/accountlimitclient.py,sha256=RcA9ZjUz3uhpYlBROi9j97_0Fxd9TlmDaWv_3I14s_g,6479
|
|
8
|
+
rucio/client/baseclient.py,sha256=stDjxUGdctu8GvTZu-I2cNIvNRMawvFYCb5KjwUGhBc,49233
|
|
9
|
+
rucio/client/client.py,sha256=LtvhwdXEBvBmQUbkZP7iwun4Ttd-Qnv2VPzj-PNY8L4,3079
|
|
10
|
+
rucio/client/configclient.py,sha256=sCnzWOnGSYWktYud-OUnc8qVaDMiSq9I7N4uuqcTz0Y,4685
|
|
11
|
+
rucio/client/credentialclient.py,sha256=MCnuL966HPJwgxNEnk597SO7xwPEhnAIdEOeH75SOUU,2101
|
|
12
|
+
rucio/client/didclient.py,sha256=80caRhYLAObPZR7o7FvlaJil4su0snZFmv53Un3ZU5A,32588
|
|
13
|
+
rucio/client/diracclient.py,sha256=40XTub2kwdV4LMFOcJkly-y_622wkGlR6vefTvbULRk,2397
|
|
14
|
+
rucio/client/downloadclient.py,sha256=oFoz_P4IMmHLq1z0eBGpxfn-wGDlNQ4hs02gEfJoQWc,89417
|
|
15
|
+
rucio/client/exportclient.py,sha256=DJFJkBPYUmLTgHv6B5DAElIMhkpPl0Sz6OpTNM7WA50,1625
|
|
16
|
+
rucio/client/fileclient.py,sha256=NICwXZdIKIySYMIiiqz9nR8sQTiLjcWdk0RzAQaOD0U,1667
|
|
17
|
+
rucio/client/importclient.py,sha256=YMFZH79svGbl-riRSx4jeNGq7TVPiT57A_rcVT8qAGk,1516
|
|
18
|
+
rucio/client/lifetimeclient.py,sha256=JHeuOE81Nj7N_iwqDfpJzZwat6nMgSA_jNUEqaqzEU4,3322
|
|
19
|
+
rucio/client/lockclient.py,sha256=Fc-BVQV_nAHM8YmxN1UFqHutEl-E8uxnSlsjH7Uxjj4,4276
|
|
20
|
+
rucio/client/metaconventionsclient.py,sha256=1Wwh3y45zhr9X05MYGq5Gph85vIUKvWDJjRYvQpCSLw,5195
|
|
21
|
+
rucio/client/pingclient.py,sha256=rwb02jpKJnEioZ-lQRf04Drp_sRtXC36WsubNKtEvpg,1390
|
|
22
|
+
rucio/client/replicaclient.py,sha256=XQzwCVqvdAT-BaNW5o7KrF_7UGzInxC174RkqV6GWC8,19518
|
|
23
|
+
rucio/client/requestclient.py,sha256=L4meNVrb9jOuQjhALtBMgW0HKioMGfYlph4zEdjpreM,4615
|
|
24
|
+
rucio/client/rseclient.py,sha256=71iCLmgyUw3B5TMca0J8Gg8SW4hnPTcgANXWhpccJ8E,29695
|
|
25
|
+
rucio/client/ruleclient.py,sha256=lppOYILWLOPBIcq8Qv-8lp9iTVjLGUMYFto3PYrGwYY,13137
|
|
26
|
+
rucio/client/scopeclient.py,sha256=CfJyM86I8BKfXLnbUOD_KjxuqMD5B0I8AQLiuNKTjag,3238
|
|
27
|
+
rucio/client/subscriptionclient.py,sha256=GgSFlube82Xv87GQ58ouWthjxsbLalWcXQywrNmh_M4,8207
|
|
28
|
+
rucio/client/touchclient.py,sha256=i_cvIAbwH9MLF2hE1o_I5w2M9jACykEFGdyypHmyBlA,2759
|
|
29
|
+
rucio/client/uploadclient.py,sha256=1VqI-0Rzmr_gGgs030DNGuxxy2NGwxDCrVL8yo3mnss,49564
|
|
30
|
+
rucio/common/__init__.py,sha256=Q91iipvMQ0VzNMuYcYQfDujZ0vL-hrB4Kmd0YrgtHGQ,618
|
|
31
|
+
rucio/common/cache.py,sha256=cnCHNz3VOYLmKbg1RkG-n_rqb-VnuRa_b7y3aXSkqNI,2301
|
|
32
|
+
rucio/common/config.py,sha256=mgHqLhso6bXqLVrkW5OwQp-WX3Pyc4Wt3Ir5CrL8dGU,24764
|
|
33
|
+
rucio/common/constants.py,sha256=RWRl3bYGV9PJYOkxCxwOLRmW2LzLmUs2oaw5v0uJ3JI,5997
|
|
34
|
+
rucio/common/constraints.py,sha256=MrdiAwKyoaZGfspUWX_53XS2790nXMSMg1JYmTO_ciQ,726
|
|
35
|
+
rucio/common/didtype.py,sha256=t08FaxLXx4G3FqjIZQp4zhZt7rPugW0qApNrZImXxes,6545
|
|
36
|
+
rucio/common/exception.py,sha256=OUPJB-9GtWlFlSvm7Z8YTVQE4SFp_EuzrCPSKvDhEwM,32446
|
|
37
|
+
rucio/common/extra.py,sha256=G1jZYovcYOPXhZTxJFGeNFoCREmKUIxXkuaIE1fO9pw,1398
|
|
38
|
+
rucio/common/logging.py,sha256=YsNDES5md8KxzC3sITH-Za0nJzr2Q-qmfvvRvnnIMCw,15818
|
|
39
|
+
rucio/common/pcache.py,sha256=0UefrcSNcEXK7FAAhyg0s2felnAhSIFNZ0UZTRiEjlo,47008
|
|
40
|
+
rucio/common/plugins.py,sha256=rH7_MOkckt_OWCg6El83ytOXetv26_sP-Zs8AAn_vDU,6286
|
|
41
|
+
rucio/common/policy.py,sha256=DvUV0YBuICgz3TiVEY1TQxoXGXdYcwtVTwdq3kKMQ1E,3085
|
|
42
|
+
rucio/common/stomp_utils.py,sha256=3GTiRTJ0roe5OX_wgkVwOJYAIhGgYbhiROHc2M8LQT8,5414
|
|
43
|
+
rucio/common/stopwatch.py,sha256=_9zxoLjr8A0wUDJsljK4vZNDCI-dIOgpcxXiCNVJcHU,1641
|
|
44
|
+
rucio/common/test_rucio_server.py,sha256=r35Pm1DMAHMMhQUG1GMV3Se8LSAZb3_xHBWU-poILNU,4935
|
|
45
|
+
rucio/common/types.py,sha256=1tbj6DJhjIovvHQVP1xUjqdXCX8Mg2eEZ3sXDDwXlro,9996
|
|
46
|
+
rucio/common/utils.py,sha256=1NKhpJybKMOSlAYkoIaumgEP6kp8kwQkdLAaOjiZaJk,82568
|
|
47
|
+
rucio/common/schema/__init__.py,sha256=xLZXejC8vl8fco-wW6srBDw2WApCmo1qn01Nm2N0MC8,5510
|
|
48
|
+
rucio/common/schema/atlas.py,sha256=VR6iUVIiK7V6c67iuZZVYlz8vMFBWJTzOHqqdPmRPJQ,15638
|
|
49
|
+
rucio/common/schema/belleii.py,sha256=1dlgVdx3GfWf9jhkA4EyjYchpekiTpiEjPvyw58GU6o,15455
|
|
50
|
+
rucio/common/schema/domatpc.py,sha256=SNk4sr0r16YJINYLjNKRtvRGweJJUwRU0V-egmWFp-s,15036
|
|
51
|
+
rucio/common/schema/escape.py,sha256=GSURW12MB6Orknj1MYeH1lVJCiPbFgpFLXQa_ojLmAE,15975
|
|
52
|
+
rucio/common/schema/generic.py,sha256=Ri7KxalttiYbBKSkM68ifynJwGu6pDmhSw-AWrLPK78,16289
|
|
53
|
+
rucio/common/schema/generic_multi_vo.py,sha256=pHX0xGiCuR5llKteUITCbM2g2NC8kkqXk0Q1SEaSpwI,15513
|
|
54
|
+
rucio/common/schema/icecube.py,sha256=LOg72FVMclYLTFlYHksr6S31HzPf8JoYpQaEeBsaFzY,15326
|
|
55
|
+
rucio/rse/__init__.py,sha256=s04kzZtmEX0XMbkHO_-fW89W1ciPPLtQo1mHpylqA5I,3303
|
|
56
|
+
rucio/rse/rsemanager.py,sha256=KNHRZlT49aSPTffFObdTmeBkz9DTA_cBbpAjZ7mI_Qo,37692
|
|
57
|
+
rucio/rse/protocols/__init__.py,sha256=Q91iipvMQ0VzNMuYcYQfDujZ0vL-hrB4Kmd0YrgtHGQ,618
|
|
58
|
+
rucio/rse/protocols/bittorrent.py,sha256=GWmOda5PFdkET_j2pXZESin3w9jMyC4AO3jBqyMW4-w,7199
|
|
59
|
+
rucio/rse/protocols/cache.py,sha256=eFFHGiOBOuCGAjXA-_oAfkuUe8JDn2vcdogDtWoflfE,4603
|
|
60
|
+
rucio/rse/protocols/dummy.py,sha256=T_StCBkoZEdBpEYcRuDSsriSwKK27fxQ49hE6S28HKg,4225
|
|
61
|
+
rucio/rse/protocols/gfal.py,sha256=9Q3qdEruxb4G4RbqJHDHbsM3o37Iz4UBbbnN0dWtXcs,29100
|
|
62
|
+
rucio/rse/protocols/globus.py,sha256=NqCGiv7voqj0fZG4nLLuDocL8hZIjpr3BEGZcCMQP5k,9730
|
|
63
|
+
rucio/rse/protocols/gsiftp.py,sha256=AescAZ0rjtmNwP_6zSYBqBHPdwLHPwcGenSKn4xrlOM,3411
|
|
64
|
+
rucio/rse/protocols/http_cache.py,sha256=WYIl6tsuZJ--EvJNdVbaP8rbaqc1TQQAu0IrglBCkOQ,2975
|
|
65
|
+
rucio/rse/protocols/mock.py,sha256=yZDK_xgC7aV9sXrbVsWOliQPS8i0SpsSFigDGy32NOk,4495
|
|
66
|
+
rucio/rse/protocols/ngarc.py,sha256=zrYMtuqRKMcK_ukXu11NZSoTYfgmiwJqyctMU1YVCl8,7224
|
|
67
|
+
rucio/rse/protocols/posix.py,sha256=CjY1zDh3yM89PsLO9KYLQkEEHaBDGA81fGFzFO3sn7o,10414
|
|
68
|
+
rucio/rse/protocols/protocol.py,sha256=2l4ltnzzvqRtw_56u5tIGWtcS2uE_BXz5UDgn5v3-Ws,24911
|
|
69
|
+
rucio/rse/protocols/rclone.py,sha256=M82Qz_cqcDRvk3_TqxcuWTDB7KWUdykxR-KMMN0chZ0,15260
|
|
70
|
+
rucio/rse/protocols/rfio.py,sha256=PB3wW36_Eos7q1-DEX3WsektFeulnbf4OCB8ZPnY4fo,5501
|
|
71
|
+
rucio/rse/protocols/srm.py,sha256=GLij-YCb4uyTijXtFvjktdrOvzMaMVd93ujdbSf5pQ8,14689
|
|
72
|
+
rucio/rse/protocols/ssh.py,sha256=lQ2j_DEKtivoyQqhQhLqpeVvbGD_iF1kvtlAdRm7F-U,17473
|
|
73
|
+
rucio/rse/protocols/storm.py,sha256=1eR1gQe2VcNx_hMJUxA4XXvX0WWgqDd6oI_DkKW4r8Q,8141
|
|
74
|
+
rucio/rse/protocols/webdav.py,sha256=rPmcTB-yjnFJ322J8peliX8EU-696TCg-nG4iV8mTNM,22448
|
|
75
|
+
rucio/rse/protocols/xrootd.py,sha256=0nxVjw_Ab7tauoHsoIV_0A2jGlURZoPYu9dilsgwGpA,12571
|
|
76
|
+
rucio_clients-35.8.0.data/data/requirements.client.txt,sha256=2oEOW5KSXnf5ApEtzQkiwPHswyQrj02D3BwxXfy0V94,1418
|
|
77
|
+
rucio_clients-35.8.0.data/data/etc/rse-accounts.cfg.template,sha256=IfDnXVxBPUrMnTMbJnd3P7eYHgY1C4Kfz7xKskJs-FI,543
|
|
78
|
+
rucio_clients-35.8.0.data/data/etc/rucio.cfg.atlas.client.template,sha256=O24QKo-0OX4Clj7Bp2Bv9W-b0NtLkyYg3jNNpz_alr0,1311
|
|
79
|
+
rucio_clients-35.8.0.data/data/etc/rucio.cfg.template,sha256=z1s8B-_C-gKsPM8ZtCOZDTKLd0Emj8IYgLBz4B9dCw4,8534
|
|
80
|
+
rucio_clients-35.8.0.data/data/rucio_client/merge_rucio_configs.py,sha256=u62K1EcCGydM5nZA30zhlqWo4EX5N87b_MDkx5YfzVI,6163
|
|
81
|
+
rucio_clients-35.8.0.data/scripts/rucio,sha256=Bv77AQpk6EuHk1A4c91IgWdMZ1AzIBVvXA_9dZ0_PWk,128577
|
|
82
|
+
rucio_clients-35.8.0.data/scripts/rucio-admin,sha256=OzbgXHRdrHcxN1LIjMIfPU5GcaVPu3OzPZpcfyMONmU,133614
|
|
83
|
+
rucio_clients-35.8.0.dist-info/licenses/AUTHORS.rst,sha256=aakReWi6XP3cIus05aE6qvfMOGJozW42LaRbfJV_QJY,4586
|
|
84
|
+
rucio_clients-35.8.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
85
|
+
rucio_clients-35.8.0.dist-info/METADATA,sha256=M1iC2kUeLpRhAfb2loQWeu8SSjzlivkFc0n8a28aGbk,1738
|
|
86
|
+
rucio_clients-35.8.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
87
|
+
rucio_clients-35.8.0.dist-info/top_level.txt,sha256=lJM8plwW0ePPICkwFnpYzfdqHnSv6JZr1OD4JEysPgM,6
|
|
88
|
+
rucio_clients-35.8.0.dist-info/RECORD,,
|
|
@@ -65,6 +65,8 @@ Individual contributors to the source code
|
|
|
65
65
|
- Stefan Piperov <stefan.piperov@cern.ch>, 2021
|
|
66
66
|
- Jensen Zhang <hack@jensen-zhang.site>, 2022
|
|
67
67
|
- Aksel Lunde Aase <aksel.lunde.aase@gmail.com>, 2022
|
|
68
|
+
- Elena Gazzarrini <gazzarrini.elena@gmail.com>, 2022-2023
|
|
69
|
+
- Maximilian Linhoff, <maximilian.linhoff@tu-dortmund.de>, 2024
|
|
68
70
|
|
|
69
71
|
Organisations employing contributors
|
|
70
72
|
------------------------------------
|
|
@@ -92,3 +94,4 @@ Organisations employing contributors
|
|
|
92
94
|
- Imperial College London (UK)
|
|
93
95
|
- University of Chicago (USA)
|
|
94
96
|
- Purdue University (USA)
|
|
97
|
+
- TU Dortmund University (Germany)
|
rucio/common/schema/cms.py
DELETED
|
@@ -1,478 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Copyright European Organization for Nuclear Research (CERN) since 2012
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
|
|
16
|
-
from jsonschema import validate, ValidationError
|
|
17
|
-
|
|
18
|
-
from rucio.common.exception import InvalidObject
|
|
19
|
-
|
|
20
|
-
ACCOUNT_LENGTH = 25
|
|
21
|
-
|
|
22
|
-
ACCOUNT = {"description": "Account name",
|
|
23
|
-
"type": "string",
|
|
24
|
-
"pattern": "^[a-z0-9-_]{1,%s}$" % ACCOUNT_LENGTH}
|
|
25
|
-
|
|
26
|
-
ACCOUNTS = {"description": "Array of accounts",
|
|
27
|
-
"type": "array",
|
|
28
|
-
"items": ACCOUNT,
|
|
29
|
-
"minItems": 0,
|
|
30
|
-
"maxItems": 1000}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
ACCOUNT_TYPE = {"description": "Account type",
|
|
34
|
-
"type": "string",
|
|
35
|
-
"enum": ["USER", "GROUP", "SERVICE"]}
|
|
36
|
-
|
|
37
|
-
ACTIVITY = {"description": "Activity name",
|
|
38
|
-
"type": "string",
|
|
39
|
-
"enum": ["Data Brokering", "Data Consolidation", "Data rebalancing",
|
|
40
|
-
"Debug", "Express", "Functional Test", "Group Subscriptions",
|
|
41
|
-
"Production Input", "Production Output",
|
|
42
|
-
"Analysis Input", "Analysis Output", "Staging",
|
|
43
|
-
"T0 Export", "T0 Tape", "Upload/Download (Job)",
|
|
44
|
-
"Upload/Download (User)", "User Subscriptions", "Data Challenge"]}
|
|
45
|
-
|
|
46
|
-
SCOPE_LENGTH = 25
|
|
47
|
-
|
|
48
|
-
SCOPE = {"description": "Scope name",
|
|
49
|
-
"type": "string",
|
|
50
|
-
"pattern": r"^(cms)|(logs)|(user\.[a-z0-9-_]{1,%s})$" % (SCOPE_LENGTH - len('user.'))}
|
|
51
|
-
|
|
52
|
-
R_SCOPE = {"description": "Scope name",
|
|
53
|
-
"type": "string",
|
|
54
|
-
"pattern": "\\w"}
|
|
55
|
-
|
|
56
|
-
CMS_LFN_LENGTH = 500
|
|
57
|
-
CMS_DATASET_CORE = r'/[a-zA-Z0-9\-_]{1,99}/[a-zA-Z0-9\.\-_]{1,199}/[A-Z\-]{1,50}'
|
|
58
|
-
CMS_BLOCK_PART = r'[a-zA-Z0-9\.\-_]{1,100}'
|
|
59
|
-
|
|
60
|
-
CMS_DATASET = r'^%s$' % CMS_DATASET_CORE
|
|
61
|
-
CMS_BLOCK = r'^%s#%s$' % (CMS_DATASET_CORE, CMS_BLOCK_PART) # Valid dataset name and block separated by #
|
|
62
|
-
CMS_LFN = r'^\/store\/[A-Za-z0-9][A-Za-z0-9\.\-\_\/]{1,%s}$' % (CMS_LFN_LENGTH - len('/store/'))
|
|
63
|
-
|
|
64
|
-
CMS_BLOCK_LENGTH = 100 + 200 + 51 + 101
|
|
65
|
-
|
|
66
|
-
NAME = {"description": "Data Identifier name",
|
|
67
|
-
"type": "string",
|
|
68
|
-
"pattern": r"%s|%s|%s" % (CMS_DATASET, CMS_BLOCK, CMS_LFN)}
|
|
69
|
-
|
|
70
|
-
NAME_LENGTH = max(CMS_LFN_LENGTH, CMS_BLOCK_LENGTH)
|
|
71
|
-
|
|
72
|
-
# read name
|
|
73
|
-
R_NAME = NAME
|
|
74
|
-
|
|
75
|
-
LOCKED = {"description": "Rule locked status",
|
|
76
|
-
"type": ["boolean", "null"]}
|
|
77
|
-
|
|
78
|
-
ASK_APPROVAL = {"description": "Rule approval request",
|
|
79
|
-
"type": ["boolean", "null"]}
|
|
80
|
-
|
|
81
|
-
ASYNCHRONOUS = {"description": "Asynchronous rule creation",
|
|
82
|
-
"type": ["boolean", "null"]}
|
|
83
|
-
|
|
84
|
-
DELAY_INJECTION = {"description": "Time (in seconds) to wait before starting applying the rule. Implies asynchronous rule creation.",
|
|
85
|
-
"type": ["integer", "null"]}
|
|
86
|
-
|
|
87
|
-
PURGE_REPLICAS = {"description": "Rule purge replica status",
|
|
88
|
-
"type": "boolean"}
|
|
89
|
-
|
|
90
|
-
IGNORE_AVAILABILITY = {"description": "Rule ignore availability status",
|
|
91
|
-
"type": "boolean"}
|
|
92
|
-
|
|
93
|
-
RSE = {"description": "RSE name",
|
|
94
|
-
"type": "string",
|
|
95
|
-
"pattern": "^T[0-3]_[A-Z]{2}((_[A-Za-z0-9]+)+)$"}
|
|
96
|
-
|
|
97
|
-
RSE_ATTRIBUTE = {"description": "RSE attribute",
|
|
98
|
-
"type": "string",
|
|
99
|
-
"pattern": r'([A-Za-z0-9\._-]+[=<>][A-Za-z0-9_-]+)'}
|
|
100
|
-
|
|
101
|
-
DEFAULT_RSE_ATTRIBUTE = {"description": "Default RSE attribute",
|
|
102
|
-
"type": "string",
|
|
103
|
-
"pattern": r'([A-Z0-9]+([_-][A-Za-z0-9]+)*)'}
|
|
104
|
-
|
|
105
|
-
REPLICA_STATE = {"description": "Replica state",
|
|
106
|
-
"type": "string",
|
|
107
|
-
"enum": ["AVAILABLE", "UNAVAILABLE", "COPYING", "BEING_DELETED", "BAD", "SOURCE", "A", "U", "C", "B", "D", "S"]}
|
|
108
|
-
|
|
109
|
-
DATE = {"description": "Date",
|
|
110
|
-
"type": "string",
|
|
111
|
-
"pattern": r'((Mon)|(Tue)|(Wed)|(Thu)|(Fri)|(Sat)|(Sun))[,]\s\d{2}\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s(0\d|1\d|2[0-3])(\:)(0\d|1\d|2\d|3\d|4\d|5\d)(\:)(0\d|1\d|2\d|3\d|4\d|5\d)\s(UTC)'}
|
|
112
|
-
|
|
113
|
-
DID_TYPE = {"description": "DID type",
|
|
114
|
-
"type": "string",
|
|
115
|
-
"enum": ["DATASET", "CONTAINER", "FILE", "F"]}
|
|
116
|
-
|
|
117
|
-
GROUPING = {"description": "Rule grouping",
|
|
118
|
-
"type": ["string", "null"],
|
|
119
|
-
"enum": ["DATASET", "NONE", "ALL", None]}
|
|
120
|
-
|
|
121
|
-
NOTIFY = {"description": "Rule notification setting",
|
|
122
|
-
"type": ["string", "null"],
|
|
123
|
-
"enum": ["Y", "C", "N", "P", None]}
|
|
124
|
-
|
|
125
|
-
COMMENT = {"description": "Rule comment",
|
|
126
|
-
"type": ["string", "null"],
|
|
127
|
-
"maxLength": 250}
|
|
128
|
-
|
|
129
|
-
METADATA = {"description": "Rule wfms metadata",
|
|
130
|
-
"type": ["string", "null"],
|
|
131
|
-
"maxLength": 3999}
|
|
132
|
-
|
|
133
|
-
BYTES = {"description": "Size in bytes",
|
|
134
|
-
"type": "integer"}
|
|
135
|
-
|
|
136
|
-
ADLER32 = {"description": "adler32",
|
|
137
|
-
"type": "string",
|
|
138
|
-
"pattern": "^[a-fA-F\\d]{8}$"}
|
|
139
|
-
|
|
140
|
-
WEIGHT = {"description": "Rule weight",
|
|
141
|
-
"type": ["string", "null"]}
|
|
142
|
-
|
|
143
|
-
MD5 = {"description": "md5",
|
|
144
|
-
"type": "string",
|
|
145
|
-
"pattern": "^[a-fA-F\\d]{32}$"}
|
|
146
|
-
|
|
147
|
-
UUID = {"description": "Universally Unique Identifier (UUID)",
|
|
148
|
-
"type": "string",
|
|
149
|
-
"pattern": '^(\\{){0,1}[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}(\\}){0,1}$'}
|
|
150
|
-
|
|
151
|
-
META = {"description": "Data Identifier(DID) metadata",
|
|
152
|
-
"type": "object",
|
|
153
|
-
"properties": {"guid": UUID},
|
|
154
|
-
"additionalProperties": True}
|
|
155
|
-
|
|
156
|
-
PFN = {"description": "Physical File Name", "type": "string"}
|
|
157
|
-
|
|
158
|
-
COPIES = {"description": "Number of replica copies", "type": "integer"}
|
|
159
|
-
|
|
160
|
-
RSE_EXPRESSION = {"description": "RSE expression", "type": "string"}
|
|
161
|
-
|
|
162
|
-
SOURCE_REPLICA_EXPRESSION = {"description": "RSE expression", "type": ["string", "null"]}
|
|
163
|
-
|
|
164
|
-
LIFETIME = {"description": "Lifetime", "type": "number"}
|
|
165
|
-
|
|
166
|
-
RULE_LIFETIME = {"description": "Rule lifetime", "type": ["number", "null"]}
|
|
167
|
-
|
|
168
|
-
SUBSCRIPTION_ID = {"description": "Rule Subscription id", "type": ["string", "null"]}
|
|
169
|
-
|
|
170
|
-
PRIORITY = {"description": "Priority of the transfers",
|
|
171
|
-
"type": "integer"}
|
|
172
|
-
|
|
173
|
-
SPLIT_CONTAINER = {"description": "Rule split container mode",
|
|
174
|
-
"type": ["boolean", "null"]}
|
|
175
|
-
|
|
176
|
-
RULE = {"description": "Replication rule",
|
|
177
|
-
"type": "object",
|
|
178
|
-
"properties": {"dids": {"type": "array"},
|
|
179
|
-
"account": ACCOUNT,
|
|
180
|
-
"copies": COPIES,
|
|
181
|
-
"rse_expression": RSE_EXPRESSION,
|
|
182
|
-
"grouping": GROUPING,
|
|
183
|
-
"weight": WEIGHT,
|
|
184
|
-
"lifetime": RULE_LIFETIME,
|
|
185
|
-
"locked": LOCKED,
|
|
186
|
-
"subscription_id": SUBSCRIPTION_ID,
|
|
187
|
-
"source_replica_expression": SOURCE_REPLICA_EXPRESSION,
|
|
188
|
-
"activity": ACTIVITY,
|
|
189
|
-
"notify": NOTIFY,
|
|
190
|
-
"purge_replicas": PURGE_REPLICAS,
|
|
191
|
-
"ignore_availability": IGNORE_AVAILABILITY,
|
|
192
|
-
"comment": COMMENT,
|
|
193
|
-
"ask_approval": ASK_APPROVAL,
|
|
194
|
-
"asynchronous": ASYNCHRONOUS,
|
|
195
|
-
"delay_injection": DELAY_INJECTION,
|
|
196
|
-
"priority": PRIORITY,
|
|
197
|
-
'split_container': SPLIT_CONTAINER,
|
|
198
|
-
'meta': METADATA},
|
|
199
|
-
"required": ["dids", "copies", "rse_expression"],
|
|
200
|
-
"additionalProperties": False}
|
|
201
|
-
|
|
202
|
-
RULES = {"description": "Array of replication rules",
|
|
203
|
-
"type": "array",
|
|
204
|
-
"items": RULE,
|
|
205
|
-
"minItems": 1,
|
|
206
|
-
"maxItems": 1000}
|
|
207
|
-
|
|
208
|
-
COLLECTION_TYPE = {"description": "Dataset or container type",
|
|
209
|
-
"type": "string",
|
|
210
|
-
"enum": ["DATASET", "CONTAINER"]}
|
|
211
|
-
|
|
212
|
-
COLLECTION = {"description": "Dataset or container",
|
|
213
|
-
"type": "object",
|
|
214
|
-
"properties": {"scope": SCOPE,
|
|
215
|
-
"name": NAME,
|
|
216
|
-
"type": COLLECTION_TYPE,
|
|
217
|
-
"meta": META,
|
|
218
|
-
"rules": RULES},
|
|
219
|
-
"required": ["scope", "name", "type"],
|
|
220
|
-
"additionalProperties": False}
|
|
221
|
-
|
|
222
|
-
COLLECTIONS = {"description": "Array of datasets or containers",
|
|
223
|
-
"type": "array",
|
|
224
|
-
"items": COLLECTION,
|
|
225
|
-
"minItems": 1,
|
|
226
|
-
"maxItems": 1000}
|
|
227
|
-
|
|
228
|
-
# No else if in JSON Schema
|
|
229
|
-
# if type == container
|
|
230
|
-
# must match CMS dataset/container guidelines
|
|
231
|
-
# else if type == dataset
|
|
232
|
-
# must match CMS block guidelines
|
|
233
|
-
# else if type == file
|
|
234
|
-
# must match CMS LFN guidelines
|
|
235
|
-
# CMS scope must not be in /store/user
|
|
236
|
-
# user.jdoe scope must be in /store/user/rucio
|
|
237
|
-
# (making sure it's in /store/user/rucio/jdoe seems to be impossible in JSON Schema, handled outside)
|
|
238
|
-
DID = {"description": "Data Identifier(DID)",
|
|
239
|
-
"type": "object",
|
|
240
|
-
"properties": {"scope": SCOPE,
|
|
241
|
-
"name": NAME,
|
|
242
|
-
"type": DID_TYPE,
|
|
243
|
-
"meta": META,
|
|
244
|
-
"rules": RULES,
|
|
245
|
-
"bytes": BYTES,
|
|
246
|
-
"adler32": ADLER32,
|
|
247
|
-
"md5": MD5,
|
|
248
|
-
"state": REPLICA_STATE,
|
|
249
|
-
"pfn": PFN},
|
|
250
|
-
"allOf": [
|
|
251
|
-
{"if": {"properties": {"type": {"const": "CONTAINER"}}},
|
|
252
|
-
"then": {"properties": {"name": {"pattern": CMS_DATASET}}}},
|
|
253
|
-
{"if": {"properties": {"type": {"const": "DATASET"}}},
|
|
254
|
-
"then": {"properties": {"name": {"pattern": CMS_BLOCK}}}},
|
|
255
|
-
{"if": {"properties": {"type": {"const": "FILE"}}},
|
|
256
|
-
"then": {"properties": {"name": {"pattern": CMS_LFN}}}},
|
|
257
|
-
{"if": {"properties": {"type": {"const": "F"}}},
|
|
258
|
-
"then": {"properties": {"name": {"pattern": CMS_LFN}}}},
|
|
259
|
-
],
|
|
260
|
-
"required": ["scope", "name", "type"],
|
|
261
|
-
"additionalProperties": False}
|
|
262
|
-
|
|
263
|
-
DID_FILTERS = {"description": "Array to filter DIDs by metadata",
|
|
264
|
-
"type": "array",
|
|
265
|
-
"additionalProperties": True}
|
|
266
|
-
|
|
267
|
-
R_DID = {"description": "Data Identifier(DID)",
|
|
268
|
-
"type": "object",
|
|
269
|
-
"properties": {"scope": R_SCOPE,
|
|
270
|
-
"name": R_NAME,
|
|
271
|
-
"type": DID_TYPE,
|
|
272
|
-
"meta": META,
|
|
273
|
-
"rules": RULES,
|
|
274
|
-
"bytes": BYTES,
|
|
275
|
-
"adler32": ADLER32,
|
|
276
|
-
"md5": MD5,
|
|
277
|
-
"state": REPLICA_STATE,
|
|
278
|
-
"pfn": PFN},
|
|
279
|
-
"required": ["scope", "name"],
|
|
280
|
-
"additionalProperties": False}
|
|
281
|
-
|
|
282
|
-
DIDS = {"description": "Array of Data Identifiers(DIDs)",
|
|
283
|
-
"type": "array",
|
|
284
|
-
"items": DID,
|
|
285
|
-
"minItems": 1,
|
|
286
|
-
"maxItems": 3000} # Was 1000
|
|
287
|
-
|
|
288
|
-
R_DIDS = {"description": "Array of Data Identifiers(DIDs)",
|
|
289
|
-
"type": "array",
|
|
290
|
-
"items": R_DID,
|
|
291
|
-
"minItems": 1,
|
|
292
|
-
"maxItems": 30000}
|
|
293
|
-
|
|
294
|
-
ATTACHMENT = {"description": "Attachement",
|
|
295
|
-
"type": "object",
|
|
296
|
-
"properties": {"scope": SCOPE,
|
|
297
|
-
"name": NAME,
|
|
298
|
-
"rse": {"description": "RSE name",
|
|
299
|
-
"type": ["string", "null"],
|
|
300
|
-
"pattern": "^T[0-3]_[A-Z]{2}((_[A-Za-z0-9]+)+)$"},
|
|
301
|
-
"dids": R_DIDS}, # Loosen up, we're not creating these DIDs
|
|
302
|
-
"required": ["dids"],
|
|
303
|
-
"additionalProperties": False}
|
|
304
|
-
|
|
305
|
-
ATTACHMENTS = {"description": "Array of attachments",
|
|
306
|
-
"type": "array",
|
|
307
|
-
"items": ATTACHMENT,
|
|
308
|
-
"minItems": 1,
|
|
309
|
-
"maxItems": 3000} # Was 1000
|
|
310
|
-
|
|
311
|
-
SUBSCRIPTION_FILTER = {"type": "object",
|
|
312
|
-
"properties": {"datatype": {"type": "array"},
|
|
313
|
-
"prod_step": {"type": "array"},
|
|
314
|
-
"stream_name": {"type": "array"},
|
|
315
|
-
"project": {"type": "array"},
|
|
316
|
-
"scope": {"type": "array"},
|
|
317
|
-
"pattern": {"type": "string"},
|
|
318
|
-
"excluded_pattern": {"type": "string"},
|
|
319
|
-
"group": {"type": "string"},
|
|
320
|
-
"provenance": {"type": "string"},
|
|
321
|
-
"account": ACCOUNTS,
|
|
322
|
-
"grouping": {"type": "string"},
|
|
323
|
-
"split_rule": {"type": "boolean"}}}
|
|
324
|
-
|
|
325
|
-
ADD_REPLICA_FILE = {"description": "add replica file",
|
|
326
|
-
"type": "object",
|
|
327
|
-
"properties": {"scope": SCOPE,
|
|
328
|
-
"name": NAME,
|
|
329
|
-
"bytes": BYTES,
|
|
330
|
-
"adler32": ADLER32},
|
|
331
|
-
"required": ["scope", "name", "bytes", "adler32"]}
|
|
332
|
-
|
|
333
|
-
ADD_REPLICA_FILES = {"description": "add replica files",
|
|
334
|
-
"type": "array",
|
|
335
|
-
"items": ADD_REPLICA_FILE,
|
|
336
|
-
"minItems": 1,
|
|
337
|
-
"maxItems": 1000}
|
|
338
|
-
|
|
339
|
-
CACHE_ADD_REPLICAS = {"description": "rucio cache add replicas",
|
|
340
|
-
"type": "object",
|
|
341
|
-
"properties": {"files": ADD_REPLICA_FILES,
|
|
342
|
-
"rse": RSE,
|
|
343
|
-
"lifetime": LIFETIME,
|
|
344
|
-
"operation": {"enum": ["add_replicas"]}},
|
|
345
|
-
"required": ['files', 'rse', 'lifetime', 'operation']}
|
|
346
|
-
|
|
347
|
-
DELETE_REPLICA_FILE = {"description": "delete replica file",
|
|
348
|
-
"type": "object",
|
|
349
|
-
"properties": {"scope": SCOPE,
|
|
350
|
-
"name": NAME},
|
|
351
|
-
"required": ["scope", "name"]}
|
|
352
|
-
|
|
353
|
-
DELETE_REPLICA_FILES = {"description": "delete replica files",
|
|
354
|
-
"type": "array",
|
|
355
|
-
"items": DELETE_REPLICA_FILE,
|
|
356
|
-
"minItems": 1,
|
|
357
|
-
"maxItems": 1000}
|
|
358
|
-
|
|
359
|
-
CACHE_DELETE_REPLICAS = {"description": "rucio cache delete replicas",
|
|
360
|
-
"type": "object",
|
|
361
|
-
"properties": {"files": DELETE_REPLICA_FILES,
|
|
362
|
-
"rse": RSE,
|
|
363
|
-
"operation": {"enum": ["delete_replicas"]}},
|
|
364
|
-
"required": ['files', 'rse', 'operation']}
|
|
365
|
-
|
|
366
|
-
MESSAGE_OPERATION = {"type": "object",
|
|
367
|
-
"properties": {'operation': {"enum": ["add_replicas", "delete_replicas"]}}}
|
|
368
|
-
|
|
369
|
-
ACCOUNT_ATTRIBUTE = {"description": "Account attribute",
|
|
370
|
-
"type": "string",
|
|
371
|
-
"pattern": r'^[a-zA-Z0-9-_\\/\\.]{1,30}$'}
|
|
372
|
-
|
|
373
|
-
SCOPE_NAME_REGEXP = '/([^/]*)(?=/)(.*)'
|
|
374
|
-
|
|
375
|
-
DISTANCE = {"description": "RSE distance",
|
|
376
|
-
"type": "object",
|
|
377
|
-
"properties": {
|
|
378
|
-
"src_rse_id": {"type": "string"},
|
|
379
|
-
"dest_rse_id": {"type": "string"},
|
|
380
|
-
"ranking": {"type": "integer"}
|
|
381
|
-
},
|
|
382
|
-
"required": ["src_rse_id", "dest_rse_id", "ranking"],
|
|
383
|
-
"additionalProperties": True}
|
|
384
|
-
|
|
385
|
-
IMPORT = {"description": "import data into rucio.",
|
|
386
|
-
"type": "object",
|
|
387
|
-
"properties": {
|
|
388
|
-
"rses": {
|
|
389
|
-
"type": "object"
|
|
390
|
-
},
|
|
391
|
-
"distances": {
|
|
392
|
-
"type": "object"
|
|
393
|
-
}
|
|
394
|
-
}}
|
|
395
|
-
|
|
396
|
-
SCHEMAS = {'account': ACCOUNT,
|
|
397
|
-
'account_type': ACCOUNT_TYPE,
|
|
398
|
-
'activity': ACTIVITY,
|
|
399
|
-
'name': NAME,
|
|
400
|
-
'r_name': R_NAME,
|
|
401
|
-
'rse': RSE,
|
|
402
|
-
'rse_attribute': RSE_ATTRIBUTE,
|
|
403
|
-
'scope': SCOPE,
|
|
404
|
-
'r_scope': R_SCOPE,
|
|
405
|
-
'did': DID,
|
|
406
|
-
'did_filters': DID_FILTERS,
|
|
407
|
-
'r_did': R_DID,
|
|
408
|
-
'dids': DIDS,
|
|
409
|
-
'rule': RULE,
|
|
410
|
-
'r_dids': R_DIDS,
|
|
411
|
-
'collection': COLLECTION,
|
|
412
|
-
'collections': COLLECTIONS,
|
|
413
|
-
'attachment': ATTACHMENT,
|
|
414
|
-
'attachments': ATTACHMENTS,
|
|
415
|
-
'subscription_filter': SUBSCRIPTION_FILTER,
|
|
416
|
-
'cache_add_replicas': CACHE_ADD_REPLICAS,
|
|
417
|
-
'cache_delete_replicas': CACHE_DELETE_REPLICAS,
|
|
418
|
-
'account_attribute': ACCOUNT_ATTRIBUTE,
|
|
419
|
-
'import': IMPORT}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
def validate_schema(name, obj):
|
|
423
|
-
"""
|
|
424
|
-
Validate object against json schema
|
|
425
|
-
|
|
426
|
-
:param name: The json schema name.
|
|
427
|
-
:param obj: The object to validate.
|
|
428
|
-
"""
|
|
429
|
-
try:
|
|
430
|
-
if obj:
|
|
431
|
-
validate(obj, SCHEMAS.get(name, {}))
|
|
432
|
-
except ValidationError as error: # NOQA, pylint: disable=W0612
|
|
433
|
-
raise InvalidObject(f'Problem validating {name}: {error}')
|
|
434
|
-
|
|
435
|
-
# Apply some extra constraints to CMS DIDs
|
|
436
|
-
if name.lower() in ['did']:
|
|
437
|
-
validate_cms_did(obj)
|
|
438
|
-
elif name.lower() in ['dids']:
|
|
439
|
-
for did in obj:
|
|
440
|
-
validate_cms_did(did)
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
def validate_cms_did(obj):
|
|
444
|
-
"""
|
|
445
|
-
Special checking for DIDs
|
|
446
|
-
Most of the checking is done with JSON schema, but this check
|
|
447
|
-
makes sure user LFNs are in the correct /store/user/rucio/USERNAME namespace
|
|
448
|
-
makes sure group LFNs are in the correct /store/group/rucio/GROUPNAME namespace
|
|
449
|
-
"""
|
|
450
|
-
if not obj:
|
|
451
|
-
return
|
|
452
|
-
|
|
453
|
-
did_type = obj['type']
|
|
454
|
-
lfn = obj['name']
|
|
455
|
-
scope = obj['scope']
|
|
456
|
-
|
|
457
|
-
if did_type != "FILE":
|
|
458
|
-
return
|
|
459
|
-
|
|
460
|
-
verify_scope_lfn_match(lfn, scope, "user")
|
|
461
|
-
verify_scope_lfn_match(lfn, scope, "group")
|
|
462
|
-
|
|
463
|
-
if scope == 'logs':
|
|
464
|
-
if not lfn.startswith('/store/logs/'):
|
|
465
|
-
raise InvalidObject(f'Problem with LFN {lfn}: Logs must start with /store/logs')
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
def verify_scope_lfn_match(lfn, scope, scope_type):
|
|
469
|
-
if lfn.startswith(f'/store/{scope_type}') and not lfn.startswith(f'/store/{scope_type}/rucio/'):
|
|
470
|
-
raise InvalidObject(f"Problem with LFN {lfn} : Legacy {scope_type} files are not managed with Rucio")
|
|
471
|
-
|
|
472
|
-
if lfn.startswith(f'/store/{scope_type}/rucio') and not scope.startswith(f'{scope_type}.'):
|
|
473
|
-
raise InvalidObject(f"Problem with LFN {lfn}: Only {scope_type} scopes allowed in /store/{scope_type}/rucio")
|
|
474
|
-
|
|
475
|
-
if scope.startswith(f'{scope_type}.'):
|
|
476
|
-
_, account = scope.split('.', 1)
|
|
477
|
-
if not lfn.startswith(f'/store/{scope_type}/rucio/{account}/'):
|
|
478
|
-
raise InvalidObject(f"Problem with LFN {lfn} : Not allowed for {scope_type} {account}")
|