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.

Files changed (85) hide show
  1. rucio/alembicrevision.py +1 -1
  2. rucio/cli/__init__.py +14 -0
  3. rucio/cli/account.py +216 -0
  4. rucio/cli/bin_legacy/__init__.py +13 -0
  5. rucio_clients-35.7.0.data/scripts/rucio → rucio/cli/bin_legacy/rucio.py +769 -486
  6. rucio_clients-35.7.0.data/scripts/rucio-admin → rucio/cli/bin_legacy/rucio_admin.py +476 -423
  7. rucio/cli/command.py +272 -0
  8. rucio/cli/config.py +72 -0
  9. rucio/cli/did.py +191 -0
  10. rucio/cli/download.py +128 -0
  11. rucio/cli/lifetime_exception.py +33 -0
  12. rucio/cli/replica.py +162 -0
  13. rucio/cli/rse.py +293 -0
  14. rucio/cli/rule.py +158 -0
  15. rucio/cli/scope.py +40 -0
  16. rucio/cli/subscription.py +73 -0
  17. rucio/cli/upload.py +60 -0
  18. rucio/cli/utils.py +226 -0
  19. rucio/client/accountclient.py +0 -1
  20. rucio/client/baseclient.py +33 -24
  21. rucio/client/client.py +45 -1
  22. rucio/client/didclient.py +5 -3
  23. rucio/client/downloadclient.py +6 -8
  24. rucio/client/replicaclient.py +0 -2
  25. rucio/client/richclient.py +317 -0
  26. rucio/client/rseclient.py +4 -4
  27. rucio/client/uploadclient.py +26 -12
  28. rucio/common/bittorrent.py +234 -0
  29. rucio/common/cache.py +66 -29
  30. rucio/common/checksum.py +168 -0
  31. rucio/common/client.py +122 -0
  32. rucio/common/config.py +22 -35
  33. rucio/common/constants.py +61 -3
  34. rucio/common/didtype.py +72 -24
  35. rucio/common/exception.py +65 -8
  36. rucio/common/extra.py +5 -10
  37. rucio/common/logging.py +13 -13
  38. rucio/common/pcache.py +8 -7
  39. rucio/common/plugins.py +59 -27
  40. rucio/common/policy.py +12 -3
  41. rucio/common/schema/__init__.py +84 -34
  42. rucio/common/schema/generic.py +0 -17
  43. rucio/common/schema/generic_multi_vo.py +0 -17
  44. rucio/common/test_rucio_server.py +12 -6
  45. rucio/common/types.py +132 -52
  46. rucio/common/utils.py +93 -643
  47. rucio/rse/__init__.py +3 -3
  48. rucio/rse/protocols/bittorrent.py +11 -1
  49. rucio/rse/protocols/cache.py +0 -11
  50. rucio/rse/protocols/dummy.py +0 -11
  51. rucio/rse/protocols/gfal.py +14 -9
  52. rucio/rse/protocols/globus.py +1 -1
  53. rucio/rse/protocols/http_cache.py +1 -1
  54. rucio/rse/protocols/posix.py +2 -2
  55. rucio/rse/protocols/protocol.py +84 -317
  56. rucio/rse/protocols/rclone.py +2 -1
  57. rucio/rse/protocols/rfio.py +10 -1
  58. rucio/rse/protocols/ssh.py +2 -1
  59. rucio/rse/protocols/storm.py +2 -13
  60. rucio/rse/protocols/webdav.py +74 -30
  61. rucio/rse/protocols/xrootd.py +2 -1
  62. rucio/rse/rsemanager.py +170 -53
  63. rucio/rse/translation.py +260 -0
  64. rucio/vcsversion.py +4 -4
  65. rucio/version.py +7 -0
  66. {rucio_clients-35.7.0.data → rucio_clients-37.0.0.data}/data/etc/rucio.cfg.atlas.client.template +3 -2
  67. {rucio_clients-35.7.0.data → rucio_clients-37.0.0.data}/data/etc/rucio.cfg.template +3 -19
  68. {rucio_clients-35.7.0.data → rucio_clients-37.0.0.data}/data/requirements.client.txt +11 -7
  69. rucio_clients-37.0.0.data/scripts/rucio +133 -0
  70. rucio_clients-37.0.0.data/scripts/rucio-admin +97 -0
  71. {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0.dist-info}/METADATA +18 -14
  72. rucio_clients-37.0.0.dist-info/RECORD +104 -0
  73. {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0.dist-info}/licenses/AUTHORS.rst +3 -0
  74. rucio/common/schema/atlas.py +0 -413
  75. rucio/common/schema/belleii.py +0 -408
  76. rucio/common/schema/domatpc.py +0 -401
  77. rucio/common/schema/escape.py +0 -426
  78. rucio/common/schema/icecube.py +0 -406
  79. rucio/rse/protocols/gsiftp.py +0 -92
  80. rucio_clients-35.7.0.dist-info/RECORD +0 -88
  81. {rucio_clients-35.7.0.data → rucio_clients-37.0.0.data}/data/etc/rse-accounts.cfg.template +0 -0
  82. {rucio_clients-35.7.0.data → rucio_clients-37.0.0.data}/data/rucio_client/merge_rucio_configs.py +0 -0
  83. {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0.dist-info}/WHEEL +0 -0
  84. {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0.dist-info}/licenses/LICENSE +0 -0
  85. {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0.dist-info}/top_level.txt +0 -0
@@ -1,406 +0,0 @@
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 jsonschema import ValidationError, validate
16
-
17
- from rucio.common.exception import InvalidObject
18
-
19
- ACCOUNT_LENGTH = 25
20
-
21
- ACCOUNT = {"description": "Account name",
22
- "type": "string",
23
- "maxLength": ACCOUNT_LENGTH,
24
- "pattern": "^[a-z0-9-_]+$"}
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"]}
45
-
46
- SCOPE_LENGTH = 25
47
-
48
- SCOPE = {"description": "Scope name",
49
- "type": "string",
50
- "maxLength": SCOPE_LENGTH,
51
- "pattern": "^[a-zA-Z_\\-.0-9]+$"}
52
-
53
- R_SCOPE = {"description": "Scope name",
54
- "type": "string",
55
- "pattern": "\\w"}
56
-
57
-
58
- NAME_LENGTH = 500
59
-
60
- NAME = {"description": "IceCube Data Identifier name",
61
- "type": "string",
62
- "maxLength": NAME_LENGTH,
63
- "pattern": r"^\/[A-Za-z0-9][A-Za-z0-9\\.\\-\\_\/\#]*$"}
64
-
65
- # read name
66
- R_NAME = NAME
67
-
68
- LOCKED = {"description": "Rule locked status",
69
- "type": ["boolean", "null"]}
70
-
71
- ASK_APPROVAL = {"description": "Rule approval request",
72
- "type": ["boolean", "null"]}
73
-
74
- ASYNCHRONOUS = {"description": "Asynchronous rule creation",
75
- "type": ["boolean", "null"]}
76
-
77
- DELAY_INJECTION = {"description": "Time (in seconds) to wait before starting applying the rule. Implies asynchronous rule creation.",
78
- "type": ["integer", "null"]}
79
-
80
- PURGE_REPLICAS = {"description": "Rule purge replica status",
81
- "type": "boolean"}
82
-
83
- IGNORE_AVAILABILITY = {"description": "Rule ignore availability status",
84
- "type": "boolean"}
85
-
86
- RSE = {"description": "RSE name",
87
- "type": "string",
88
- "pattern": "^([A-Z0-9]+([_-][A-Z0-9]+)*)$"}
89
-
90
- RSE_ATTRIBUTE = {"description": "RSE attribute",
91
- "type": "string",
92
- "pattern": r'([A-Za-z0-9\._-]+[=<>][A-Za-z0-9_-]+)'}
93
-
94
- DEFAULT_RSE_ATTRIBUTE = {"description": "Default RSE attribute",
95
- "type": "string",
96
- "pattern": r'([A-Z0-9]+([_-][A-Z0-9]+)*)'}
97
-
98
- REPLICA_STATE = {"description": "Replica state",
99
- "type": "string",
100
- "enum": ["AVAILABLE", "UNAVAILABLE", "COPYING", "BEING_DELETED", "BAD", "SOURCE", "A", "U", "C", "B", "D", "S"]}
101
-
102
- DATE = {"description": "Date",
103
- "type": "string",
104
- "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)'}
105
-
106
- DID_TYPE = {"description": "DID type",
107
- "type": "string",
108
- "enum": ["DATASET", "CONTAINER", "FILE", "F"]}
109
-
110
- GROUPING = {"description": "Rule grouping",
111
- "type": ["string", "null"],
112
- "enum": ["DATASET", "NONE", "ALL", None]}
113
-
114
- NOTIFY = {"description": "Rule notification setting",
115
- "type": ["string", "null"],
116
- "enum": ["Y", "C", "N", "P", None]}
117
-
118
- COMMENT = {"description": "Rule comment",
119
- "type": ["string", "null"],
120
- "maxLength": 250}
121
-
122
- METADATA = {"description": "Rule wfms metadata",
123
- "type": ["string", "null"],
124
- "maxLength": 3999}
125
-
126
- BYTES = {"description": "Size in bytes",
127
- "type": "integer"}
128
-
129
- ADLER32 = {"description": "adler32",
130
- "type": "string",
131
- "pattern": "^[a-fA-F\\d]{8}$"}
132
-
133
- WEIGHT = {"description": "Rule weight",
134
- "type": ["string", "null"]}
135
-
136
- MD5 = {"description": "md5",
137
- "type": "string",
138
- "pattern": "^[a-fA-F\\d]{32}$"}
139
-
140
- UUID = {"description": "Universally Unique Identifier (UUID)",
141
- "type": "string",
142
- "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}$'}
143
-
144
- META = {"description": "Data Identifier(DID) metadata",
145
- "type": "object",
146
- "properties": {"guid": UUID},
147
- "additionalProperties": True}
148
-
149
- PFN = {"description": "Physical File Name", "type": "string"}
150
-
151
- COPIES = {"description": "Number of replica copies", "type": "integer"}
152
-
153
- RSE_EXPRESSION = {"description": "RSE expression", "type": "string"}
154
-
155
- SOURCE_REPLICA_EXPRESSION = {"description": "RSE expression", "type": ["string", "null"]}
156
-
157
- LIFETIME = {"description": "Lifetime", "type": "number"}
158
-
159
- RULE_LIFETIME = {"description": "Rule lifetime", "type": ["number", "null"]}
160
-
161
- SUBSCRIPTION_ID = {"description": "Rule Subscription id", "type": ["string", "null"]}
162
-
163
- PRIORITY = {"description": "Priority of the transfers",
164
- "type": "integer"}
165
-
166
- SPLIT_CONTAINER = {"description": "Rule split container mode",
167
- "type": ["boolean", "null"]}
168
-
169
- RULE = {"description": "Replication rule",
170
- "type": "object",
171
- "properties": {"dids": {"type": "array"},
172
- "account": ACCOUNT,
173
- "copies": COPIES,
174
- "rse_expression": RSE_EXPRESSION,
175
- "grouping": GROUPING,
176
- "weight": WEIGHT,
177
- "lifetime": RULE_LIFETIME,
178
- "locked": LOCKED,
179
- "subscription_id": SUBSCRIPTION_ID,
180
- "source_replica_expression": SOURCE_REPLICA_EXPRESSION,
181
- "activity": ACTIVITY,
182
- "notify": NOTIFY,
183
- "purge_replicas": PURGE_REPLICAS,
184
- "ignore_availability": IGNORE_AVAILABILITY,
185
- "comment": COMMENT,
186
- "ask_approval": ASK_APPROVAL,
187
- "asynchronous": ASYNCHRONOUS,
188
- "delay_injection": DELAY_INJECTION,
189
- "priority": PRIORITY,
190
- 'split_container': SPLIT_CONTAINER,
191
- 'meta': METADATA},
192
- "required": ["dids", "copies", "rse_expression"],
193
- "additionalProperties": False}
194
-
195
- RULES = {"description": "Array of replication rules",
196
- "type": "array",
197
- "items": RULE,
198
- "minItems": 1,
199
- "maxItems": 1000}
200
-
201
- COLLECTION_TYPE = {"description": "Dataset or container type",
202
- "type": "string",
203
- "enum": ["DATASET", "CONTAINER"]}
204
-
205
- COLLECTION = {"description": "Dataset or container",
206
- "type": "object",
207
- "properties": {"scope": SCOPE,
208
- "name": NAME,
209
- "type": COLLECTION_TYPE,
210
- "meta": META,
211
- "rules": RULES},
212
- "required": ["scope", "name", "type"],
213
- "additionalProperties": False}
214
-
215
- COLLECTIONS = {"description": "Array of datasets or containers",
216
- "type": "array",
217
- "items": COLLECTION,
218
- "minItems": 1,
219
- "maxItems": 1000}
220
-
221
- DID = {"description": "Data Identifier(DID)",
222
- "type": "object",
223
- "properties": {"scope": SCOPE,
224
- "name": NAME,
225
- "type": DID_TYPE,
226
- "meta": META,
227
- "rules": RULES,
228
- "bytes": BYTES,
229
- "adler32": ADLER32,
230
- "md5": MD5,
231
- "state": REPLICA_STATE,
232
- "pfn": PFN},
233
- "required": ["scope", "name"],
234
- "additionalProperties": False}
235
-
236
- DID_FILTERS = {"description": "Array to filter DIDs by metadata",
237
- "type": "array",
238
- "additionalProperties": True}
239
-
240
- R_DID = {"description": "Data Identifier(DID)",
241
- "type": "object",
242
- "properties": {"scope": R_SCOPE,
243
- "name": R_NAME,
244
- "type": DID_TYPE,
245
- "meta": META,
246
- "rules": RULES,
247
- "bytes": BYTES,
248
- "adler32": ADLER32,
249
- "md5": MD5,
250
- "state": REPLICA_STATE,
251
- "pfn": PFN},
252
- "required": ["scope", "name"],
253
- "additionalProperties": False}
254
-
255
- DIDS = {"description": "Array of Data Identifiers(DIDs)",
256
- "type": "array",
257
- "items": DID,
258
- "minItems": 1,
259
- "maxItems": 1000}
260
-
261
- R_DIDS = {"description": "Array of Data Identifiers(DIDs)",
262
- "type": "array",
263
- "items": R_DID,
264
- "minItems": 1,
265
- "maxItems": 1000}
266
-
267
- ATTACHMENT = {"description": "Attachement",
268
- "type": "object",
269
- "properties": {"scope": SCOPE,
270
- "name": NAME,
271
- "rse": {"description": "RSE name",
272
- "type": ["string", "null"],
273
- "pattern": "^([A-Z0-9]+([_-][A-Z0-9]+)*)$"},
274
- "dids": DIDS},
275
- "required": ["dids"],
276
- "additionalProperties": False}
277
-
278
- ATTACHMENTS = {"description": "Array of attachments",
279
- "type": "array",
280
- "items": ATTACHMENT,
281
- "minItems": 1,
282
- "maxItems": 1000}
283
-
284
- SUBSCRIPTION_FILTER = {"type": "object",
285
- "properties": {"datatype": {"type": "array"},
286
- "prod_step": {"type": "array"},
287
- "stream_name": {"type": "array"},
288
- "project": {"type": "array"},
289
- "scope": {"type": "array"},
290
- "pattern": {"type": "string"},
291
- "excluded_pattern": {"type": "string"},
292
- "group": {"type": "string"},
293
- "provenance": {"type": "string"},
294
- "account": ACCOUNTS,
295
- "grouping": {"type": "string"},
296
- "split_rule": {"type": "boolean"}}}
297
-
298
- ADD_REPLICA_FILE = {"description": "add replica file",
299
- "type": "object",
300
- "properties": {"scope": SCOPE,
301
- "name": NAME,
302
- "bytes": BYTES,
303
- "adler32": ADLER32},
304
- "required": ["scope", "name", "bytes", "adler32"]}
305
-
306
- ADD_REPLICA_FILES = {"description": "add replica files",
307
- "type": "array",
308
- "items": ADD_REPLICA_FILE,
309
- "minItems": 1,
310
- "maxItems": 1000}
311
-
312
- CACHE_ADD_REPLICAS = {"description": "rucio cache add replicas",
313
- "type": "object",
314
- "properties": {"files": ADD_REPLICA_FILES,
315
- "rse": RSE,
316
- "lifetime": LIFETIME,
317
- "operation": {"enum": ["add_replicas"]}},
318
- "required": ['files', 'rse', 'lifetime', 'operation']}
319
-
320
- DELETE_REPLICA_FILE = {"description": "delete replica file",
321
- "type": "object",
322
- "properties": {"scope": SCOPE,
323
- "name": NAME},
324
- "required": ["scope", "name"]}
325
-
326
- DELETE_REPLICA_FILES = {"description": "delete replica files",
327
- "type": "array",
328
- "items": DELETE_REPLICA_FILE,
329
- "minItems": 1,
330
- "maxItems": 1000}
331
-
332
- CACHE_DELETE_REPLICAS = {"description": "rucio cache delete replicas",
333
- "type": "object",
334
- "properties": {"files": DELETE_REPLICA_FILES,
335
- "rse": RSE,
336
- "operation": {"enum": ["delete_replicas"]}},
337
- "required": ['files', 'rse', 'operation']}
338
-
339
- MESSAGE_OPERATION = {"type": "object",
340
- "properties": {'operation': {"enum": ["add_replicas", "delete_replicas"]}}}
341
-
342
- ACCOUNT_ATTRIBUTE = {"description": "Account attribute",
343
- "type": "string",
344
- "pattern": r'^[a-zA-Z0-9-_\\/\\.]{1,30}$'}
345
-
346
- SCOPE_NAME_REGEXP = '/([^/]*)(?=/)(.*)'
347
-
348
- DISTANCE = {"description": "RSE distance",
349
- "type": "object",
350
- "properties": {
351
- "src_rse_id": {"type": "string"},
352
- "dest_rse_id": {"type": "string"},
353
- "ranking": {"type": "integer"}
354
- },
355
- "required": ["src_rse_id", "dest_rse_id", "ranking"],
356
- "additionalProperties": True}
357
-
358
- IMPORT = {"description": "import data into rucio.",
359
- "type": "object",
360
- "properties": {
361
- "rses": {
362
- "type": "object"
363
- },
364
- "distances": {
365
- "type": "object"
366
- }
367
- }}
368
-
369
- SCHEMAS = {'account': ACCOUNT,
370
- 'account_type': ACCOUNT_TYPE,
371
- 'activity': ACTIVITY,
372
- 'name': NAME,
373
- 'r_name': R_NAME,
374
- 'rse': RSE,
375
- 'rse_attribute': RSE_ATTRIBUTE,
376
- 'scope': SCOPE,
377
- 'r_scope': R_SCOPE,
378
- 'did': DID,
379
- 'did_filters': DID_FILTERS,
380
- 'r_did': R_DID,
381
- 'dids': DIDS,
382
- 'rule': RULE,
383
- 'r_dids': R_DIDS,
384
- 'collection': COLLECTION,
385
- 'collections': COLLECTIONS,
386
- 'attachment': ATTACHMENT,
387
- 'attachments': ATTACHMENTS,
388
- 'subscription_filter': SUBSCRIPTION_FILTER,
389
- 'cache_add_replicas': CACHE_ADD_REPLICAS,
390
- 'cache_delete_replicas': CACHE_DELETE_REPLICAS,
391
- 'account_attribute': ACCOUNT_ATTRIBUTE,
392
- 'import': IMPORT}
393
-
394
-
395
- def validate_schema(name, obj):
396
- """
397
- Validate object against json schema
398
-
399
- :param name: The json schema name.
400
- :param obj: The object to validate.
401
- """
402
- try:
403
- if obj:
404
- validate(obj, SCHEMAS.get(name, {}))
405
- except ValidationError as error: # NOQA, pylint: disable=W0612
406
- raise InvalidObject(f'Problem validating {name}: {error}')
@@ -1,92 +0,0 @@
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
- import json
16
- import os
17
-
18
- import requests
19
-
20
- from rucio.common import exception
21
- from rucio.rse.protocols import protocol
22
-
23
-
24
- class Default(protocol.RSEProtocol):
25
- """ Implementing access to RSEs using gsiftp."""
26
-
27
- def __init__(self, protocol_attr, rse_settings, logger=None):
28
- """ Initializes the object with information about the referred RSE.
29
-
30
- :param props: Properties derived from the RSE Repository
31
- """
32
- super(Default, self).__init__(protocol_attr, rse_settings, logger=logger)
33
-
34
- def connect(self):
35
- """
36
- Establishes the actual connection to the referred RSE.
37
- If we decide to use gfal, init should be done here.
38
-
39
- :raises RSEAccessDenied
40
- """
41
- pass
42
-
43
- def close(self):
44
- """
45
- Closes the connection to RSE.
46
- """
47
- pass
48
-
49
- def get_space_usage(self):
50
- """
51
- Get RSE space usage information.
52
-
53
- :returns: a list with dict containing 'totalsize' and 'unusedsize'
54
-
55
- :raises ServiceUnavailable: if some generic error occurred in the library.
56
- """
57
- rse_name = self.rse['rse']
58
- dest = '/tmp/rucio-gsiftp-site-size_' + rse_name
59
- space_usage_url = ''
60
- # url of space usage json, would be nicer to have it in rse_settings
61
- agis = requests.get('http://atlas-agis-api.cern.ch/request/ddmendpoint/query/list/?json').json()
62
- agis_token = ''
63
- for res in agis:
64
- if rse_name == res['name']:
65
- agis_token = res['token']
66
- space_usage_url = res['space_usage_url']
67
-
68
- import gfal2 # pylint: disable=import-error
69
- gfal2.set_verbose(gfal2.verbose_level.normal) # pylint: disable=no-member
70
- try:
71
- if os.path.exists(dest):
72
- os.remove(dest)
73
- ctx = gfal2.creat_context() # pylint: disable=no-member
74
- ctx.set_opt_string_list("SRM PLUGIN", "TURL_PROTOCOLS", ["gsiftp", "rfio", "gsidcap", "dcap", "kdcap"])
75
- params = ctx.transfer_parameters()
76
- params.timeout = 3600
77
- ret = ctx.filecopy(params, str(space_usage_url), str('file://' + dest))
78
-
79
- if ret == 0:
80
- data_file = open(dest)
81
- data = json.load(data_file)
82
- data_file.close()
83
- if agis_token not in list(data.keys()):
84
- print('ERROR: space usage json has different token as key')
85
- else:
86
- totalsize = int(data[agis_token]['total_space'])
87
- used = int(data[agis_token]['used_space'])
88
- unusedsize = totalsize - used
89
- return totalsize, unusedsize
90
- except Exception as error:
91
- print(error)
92
- raise exception.ServiceUnavailable(error)
@@ -1,88 +0,0 @@
1
- rucio/__init__.py,sha256=Y7cPPlHVQPFyN8bSPFC0W3WViEdONr5g_qwBub5rufE,660
2
- rucio/alembicrevision.py,sha256=cvH9DsDzl7pCXmg1g_sfQ5rDJttSk8ULj0ojSdrbFzg,690
3
- rucio/vcsversion.py,sha256=Ya7cpg9CNCurcxUH7LYbF_73bDFX2egl-MulaGP8Y2Y,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=7C8AUpt_vZOrl93NQKdoKlfDxZY0BInhWse3py2IlBw,49562
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=kQtT1tpvzAWbqQumaXtSbXo2a9RTqXpssk_NO0Y_4lg,82532
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.7.0.data/data/requirements.client.txt,sha256=2oEOW5KSXnf5ApEtzQkiwPHswyQrj02D3BwxXfy0V94,1418
77
- rucio_clients-35.7.0.data/data/etc/rse-accounts.cfg.template,sha256=IfDnXVxBPUrMnTMbJnd3P7eYHgY1C4Kfz7xKskJs-FI,543
78
- rucio_clients-35.7.0.data/data/etc/rucio.cfg.atlas.client.template,sha256=O24QKo-0OX4Clj7Bp2Bv9W-b0NtLkyYg3jNNpz_alr0,1311
79
- rucio_clients-35.7.0.data/data/etc/rucio.cfg.template,sha256=z1s8B-_C-gKsPM8ZtCOZDTKLd0Emj8IYgLBz4B9dCw4,8534
80
- rucio_clients-35.7.0.data/data/rucio_client/merge_rucio_configs.py,sha256=u62K1EcCGydM5nZA30zhlqWo4EX5N87b_MDkx5YfzVI,6163
81
- rucio_clients-35.7.0.data/scripts/rucio,sha256=Bv77AQpk6EuHk1A4c91IgWdMZ1AzIBVvXA_9dZ0_PWk,128577
82
- rucio_clients-35.7.0.data/scripts/rucio-admin,sha256=OzbgXHRdrHcxN1LIjMIfPU5GcaVPu3OzPZpcfyMONmU,133614
83
- rucio_clients-35.7.0.dist-info/licenses/AUTHORS.rst,sha256=aakReWi6XP3cIus05aE6qvfMOGJozW42LaRbfJV_QJY,4586
84
- rucio_clients-35.7.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
85
- rucio_clients-35.7.0.dist-info/METADATA,sha256=ayBU95qn-FKiUiO8aM-vmF-SqNGo9rNxU6JTzUq-tdk,1738
86
- rucio_clients-35.7.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
87
- rucio_clients-35.7.0.dist-info/top_level.txt,sha256=lJM8plwW0ePPICkwFnpYzfdqHnSv6JZr1OD4JEysPgM,6
88
- rucio_clients-35.7.0.dist-info/RECORD,,