rucio-clients 32.8.6__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 (88) hide show
  1. rucio/__init__.py +18 -0
  2. rucio/alembicrevision.py +16 -0
  3. rucio/client/__init__.py +16 -0
  4. rucio/client/accountclient.py +413 -0
  5. rucio/client/accountlimitclient.py +155 -0
  6. rucio/client/baseclient.py +929 -0
  7. rucio/client/client.py +77 -0
  8. rucio/client/configclient.py +113 -0
  9. rucio/client/credentialclient.py +54 -0
  10. rucio/client/didclient.py +691 -0
  11. rucio/client/diracclient.py +48 -0
  12. rucio/client/downloadclient.py +1674 -0
  13. rucio/client/exportclient.py +44 -0
  14. rucio/client/fileclient.py +51 -0
  15. rucio/client/importclient.py +42 -0
  16. rucio/client/lifetimeclient.py +74 -0
  17. rucio/client/lockclient.py +99 -0
  18. rucio/client/metaclient.py +137 -0
  19. rucio/client/pingclient.py +45 -0
  20. rucio/client/replicaclient.py +444 -0
  21. rucio/client/requestclient.py +109 -0
  22. rucio/client/rseclient.py +664 -0
  23. rucio/client/ruleclient.py +287 -0
  24. rucio/client/scopeclient.py +88 -0
  25. rucio/client/subscriptionclient.py +161 -0
  26. rucio/client/touchclient.py +78 -0
  27. rucio/client/uploadclient.py +871 -0
  28. rucio/common/__init__.py +14 -0
  29. rucio/common/cache.py +74 -0
  30. rucio/common/config.py +796 -0
  31. rucio/common/constants.py +92 -0
  32. rucio/common/constraints.py +18 -0
  33. rucio/common/didtype.py +187 -0
  34. rucio/common/exception.py +1092 -0
  35. rucio/common/extra.py +37 -0
  36. rucio/common/logging.py +404 -0
  37. rucio/common/pcache.py +1387 -0
  38. rucio/common/policy.py +84 -0
  39. rucio/common/schema/__init__.py +143 -0
  40. rucio/common/schema/atlas.py +411 -0
  41. rucio/common/schema/belleii.py +406 -0
  42. rucio/common/schema/cms.py +478 -0
  43. rucio/common/schema/domatpc.py +399 -0
  44. rucio/common/schema/escape.py +424 -0
  45. rucio/common/schema/generic.py +431 -0
  46. rucio/common/schema/generic_multi_vo.py +410 -0
  47. rucio/common/schema/icecube.py +404 -0
  48. rucio/common/schema/lsst.py +423 -0
  49. rucio/common/stomp_utils.py +160 -0
  50. rucio/common/stopwatch.py +56 -0
  51. rucio/common/test_rucio_server.py +148 -0
  52. rucio/common/types.py +158 -0
  53. rucio/common/utils.py +1946 -0
  54. rucio/rse/__init__.py +97 -0
  55. rucio/rse/protocols/__init__.py +14 -0
  56. rucio/rse/protocols/cache.py +123 -0
  57. rucio/rse/protocols/dummy.py +112 -0
  58. rucio/rse/protocols/gfal.py +701 -0
  59. rucio/rse/protocols/globus.py +243 -0
  60. rucio/rse/protocols/gsiftp.py +93 -0
  61. rucio/rse/protocols/http_cache.py +83 -0
  62. rucio/rse/protocols/mock.py +124 -0
  63. rucio/rse/protocols/ngarc.py +210 -0
  64. rucio/rse/protocols/posix.py +251 -0
  65. rucio/rse/protocols/protocol.py +530 -0
  66. rucio/rse/protocols/rclone.py +365 -0
  67. rucio/rse/protocols/rfio.py +137 -0
  68. rucio/rse/protocols/srm.py +339 -0
  69. rucio/rse/protocols/ssh.py +414 -0
  70. rucio/rse/protocols/storm.py +207 -0
  71. rucio/rse/protocols/webdav.py +547 -0
  72. rucio/rse/protocols/xrootd.py +295 -0
  73. rucio/rse/rsemanager.py +752 -0
  74. rucio/vcsversion.py +11 -0
  75. rucio/version.py +46 -0
  76. rucio_clients-32.8.6.data/data/etc/rse-accounts.cfg.template +25 -0
  77. rucio_clients-32.8.6.data/data/etc/rucio.cfg.atlas.client.template +42 -0
  78. rucio_clients-32.8.6.data/data/etc/rucio.cfg.template +257 -0
  79. rucio_clients-32.8.6.data/data/requirements.txt +55 -0
  80. rucio_clients-32.8.6.data/data/rucio_client/merge_rucio_configs.py +147 -0
  81. rucio_clients-32.8.6.data/scripts/rucio +2540 -0
  82. rucio_clients-32.8.6.data/scripts/rucio-admin +2434 -0
  83. rucio_clients-32.8.6.dist-info/METADATA +50 -0
  84. rucio_clients-32.8.6.dist-info/RECORD +88 -0
  85. rucio_clients-32.8.6.dist-info/WHEEL +5 -0
  86. rucio_clients-32.8.6.dist-info/licenses/AUTHORS.rst +94 -0
  87. rucio_clients-32.8.6.dist-info/licenses/LICENSE +201 -0
  88. rucio_clients-32.8.6.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1092 @@
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
+ """
17
+ Exceptions used with Rucio.
18
+
19
+ The base exception class is :class:`. RucioException`.
20
+ Exceptions which are raised are all subclasses of it.
21
+
22
+ """
23
+
24
+ from rucio.common.constraints import AUTHORIZED_VALUE_TYPES
25
+
26
+
27
+ class RucioException(Exception):
28
+ """
29
+ To correctly use this class, inherit from it and define
30
+ a 'message' property. That message will get printf'd
31
+ with the keyword arguments provided to the constructor.
32
+ """
33
+
34
+ def __init__(self, *args, **kwargs):
35
+ super(RucioException, self).__init__(*args, **kwargs)
36
+ self._message = "An unknown exception occurred."
37
+ self.args = args
38
+ self.kwargs = kwargs
39
+ self.error_code = 1
40
+ self._error_string = None
41
+
42
+ def __str__(self):
43
+ try:
44
+ self._error_string = self._message % self.kwargs
45
+ except Exception:
46
+ # at least get the core message out if something happened
47
+ self._error_string = self._message
48
+ if len(self.args) > 0:
49
+ # If there is a non-kwarg parameter, assume it's the error
50
+ # message or reason description and tack it on to the end
51
+ # of the exception message
52
+ # Convert all arguments into their string representations...
53
+ args = ["%s" % arg for arg in self.args if arg]
54
+ self._error_string = (self._error_string + "\nDetails: %s" % '\n'.join(args))
55
+ return self._error_string.strip()
56
+
57
+
58
+ # Please insert new exceptions sorted by error_code, not alphabetically.
59
+
60
+ class AccessDenied(RucioException):
61
+ """
62
+ AccessDenied
63
+ """
64
+ def __init__(self, *args, **kwargs):
65
+ super(AccessDenied, self).__init__(*args, **kwargs)
66
+ self._message = "Access to the requested resource denied."
67
+ self.error_code = 2
68
+
69
+
70
+ class AccountNotFound(RucioException):
71
+ """
72
+ AccountNotFound
73
+ """
74
+ def __init__(self, *args, **kwargs):
75
+ super(AccountNotFound, self).__init__(*args, **kwargs)
76
+ self._message = "Account does not exist."
77
+ self.error_code = 3
78
+
79
+
80
+ class CannotAuthenticate(RucioException):
81
+ """
82
+ CannotAuthenticate
83
+ """
84
+ def __init__(self, *args, **kwargs):
85
+ super(CannotAuthenticate, self).__init__(*args, **kwargs)
86
+ self._message = "Cannot authenticate."
87
+ self.error_code = 4
88
+
89
+
90
+ class ClientParameterMismatch(RucioException):
91
+ """
92
+ RucioException
93
+ """
94
+ def __init__(self, *args, **kwargs):
95
+ super(ClientParameterMismatch, self).__init__(*args, **kwargs)
96
+ self._message = "Client parameters don\'t match."
97
+ self.error_code = 5
98
+
99
+
100
+ class ClientProtocolNotSupported(RucioException):
101
+ """
102
+ RucioException
103
+ """
104
+ def __init__(self, *args, **kwargs):
105
+ super(ClientProtocolNotSupported, self).__init__(*args, **kwargs)
106
+ self._message = "Client protocol not supported."
107
+ self.error_code = 6
108
+
109
+
110
+ class ConfigNotFound(RucioException):
111
+ """
112
+ RucioException
113
+ """
114
+ def __init__(self, *args, **kwargs):
115
+ super(ConfigNotFound, self).__init__(*args, **kwargs)
116
+ self._message = "Configuration not found."
117
+ self.error_code = 7
118
+
119
+
120
+ class ConfigurationError(RucioException):
121
+ """
122
+ RucioException
123
+ """
124
+ def __init__(self, *args, **kwargs):
125
+ super(ConfigurationError, self).__init__(*args, **kwargs)
126
+ self._message = "Error during configuration."
127
+ self.error_code = 8
128
+
129
+
130
+ class CounterNotFound(RucioException):
131
+ """
132
+ RucioException
133
+ """
134
+ def __init__(self, *args, **kwargs):
135
+ super(CounterNotFound, self).__init__(*args, **kwargs)
136
+ self._message = "The requested counter does not exist."
137
+ self.error_code = 9
138
+
139
+
140
+ class DatabaseException(RucioException):
141
+ """
142
+ RucioException
143
+ """
144
+ def __init__(self, *args, **kwargs):
145
+ super(DatabaseException, self).__init__(*args, **kwargs)
146
+ self._message = "Database exception."
147
+ self.error_code = 10
148
+
149
+
150
+ class DataIdentifierAlreadyExists(RucioException):
151
+ """
152
+ RucioException
153
+ """
154
+ def __init__(self, *args, **kwargs):
155
+ super(DataIdentifierAlreadyExists, self).__init__(*args, **kwargs)
156
+ self._message = "Data Identifier Already Exists."
157
+ self.error_code = 11
158
+
159
+
160
+ class DataIdentifierNotFound(RucioException):
161
+ """
162
+ RucioException
163
+ """
164
+ def __init__(self, *args, **kwargs):
165
+ super(DataIdentifierNotFound, self).__init__(*args, **kwargs)
166
+ self._message = "Data identifier not found."
167
+ self.error_code = 12
168
+
169
+
170
+ class DestinationNotAccessible(RucioException):
171
+ """
172
+ RucioException
173
+ """
174
+ def __init__(self, *args, **kwargs):
175
+ super(DestinationNotAccessible, self).__init__(*args, **kwargs)
176
+ self._message = "Access to local destination denied."
177
+ self.error_code = 13
178
+
179
+
180
+ class Duplicate(RucioException):
181
+ """
182
+ RucioException
183
+ """
184
+ def __init__(self, *args, **kwargs):
185
+ super(Duplicate, self).__init__(*args, **kwargs)
186
+ self._message = "An object with the same identifier already exists."
187
+ self.error_code = 14
188
+
189
+
190
+ class DuplicateContent(RucioException):
191
+ """
192
+ RucioException
193
+ """
194
+ def __init__(self, *args, **kwargs):
195
+ super(DuplicateContent, self).__init__(*args, **kwargs)
196
+ self._message = "Data identifier already added to the destination content."
197
+ self.error_code = 15
198
+
199
+
200
+ class DuplicateRule(RucioException):
201
+ """
202
+ RucioException
203
+ """
204
+ def __init__(self, *args, **kwargs):
205
+ super(DuplicateRule, self).__init__(*args, **kwargs)
206
+ self._message = "A duplicate rule for this account, did, rse_expression, copies already exists."
207
+ self.error_code = 16
208
+
209
+
210
+ class ErrorLoadingCredentials(RucioException):
211
+ """
212
+ RucioException
213
+ """
214
+ def __init__(self, *args, **kwargs):
215
+ super(ErrorLoadingCredentials, self).__init__(*args, **kwargs)
216
+ self._message = "Unable to to load user credentials."
217
+ self.error_code = 17
218
+
219
+
220
+ class FileAlreadyExists(RucioException):
221
+ """
222
+ RucioException
223
+ """
224
+ def __init__(self, *args, **kwargs):
225
+ super(FileAlreadyExists, self).__init__(*args, **kwargs)
226
+ self._message = "The file already exists."
227
+ self.error_code = 18
228
+
229
+
230
+ class FileConsistencyMismatch(RucioException):
231
+ """
232
+ RucioException
233
+ """
234
+ def __init__(self, *args, **kwargs):
235
+ super(FileConsistencyMismatch, self).__init__(*args, **kwargs)
236
+ self._message = "Error related to file consistency."
237
+ self.error_code = 19
238
+
239
+
240
+ class FileReplicaAlreadyExists(RucioException):
241
+ """
242
+ RucioException
243
+ """
244
+ def __init__(self, *args, **kwargs):
245
+ super(FileReplicaAlreadyExists, self).__init__(*args, **kwargs)
246
+ self._message = "File name in specified scope already exists"
247
+ self.error_code = 20
248
+
249
+
250
+ class ReplicaNotFound(RucioException):
251
+ """
252
+ RucioException
253
+ """
254
+ def __init__(self, *args, **kwargs):
255
+ super(ReplicaNotFound, self).__init__(*args, **kwargs)
256
+ self._message = "Replica not found"
257
+ self.error_code = 21
258
+
259
+
260
+ class ReplicaUnAvailable(RucioException):
261
+ """
262
+ RucioException
263
+ """
264
+ def __init__(self, *args, **kwargs):
265
+ super(ReplicaUnAvailable, self).__init__(*args, **kwargs)
266
+ self._message = "Replica unavailable"
267
+ self.error_code = 22
268
+
269
+
270
+ class FullStorage(RucioException):
271
+ """
272
+ RucioException
273
+ """
274
+ def __init__(self, *args, **kwargs):
275
+ super(FullStorage, self).__init__(*args, **kwargs)
276
+ self._message = "The Referenced storage is out of disk space."
277
+ self.error_code = 23
278
+
279
+
280
+ class IdentityError(RucioException):
281
+ """
282
+ RucioException
283
+ """
284
+ def __init__(self, *args, **kwargs):
285
+ super(IdentityError, self).__init__(*args, **kwargs)
286
+ self._message = "Identity error."
287
+ self.error_code = 24
288
+
289
+
290
+ class IdentityNotFound(RucioException):
291
+ def __init__(self, *args, **kwargs):
292
+ super(IdentityNotFound, self).__init__(*args, **kwargs)
293
+ self._message = "This identity does not exist."
294
+ self.error_code = 25
295
+
296
+
297
+ class InputValidationError(RucioException):
298
+ """
299
+ RucioException
300
+ """
301
+ def __init__(self, *args, **kwargs):
302
+ super(InputValidationError, self).__init__(*args, **kwargs)
303
+ self._message = "There is an error with one of the input parameters."
304
+ self.error_code = 26
305
+
306
+
307
+ class InsufficientAccountLimit(RucioException):
308
+ """
309
+ RucioException
310
+ """
311
+ def __init__(self, *args, **kwargs):
312
+ super(InsufficientAccountLimit, self).__init__(*args, **kwargs)
313
+ self._message = "There is not enough quota left to fulfil the operation."
314
+ self.error_code = 27
315
+
316
+
317
+ class InsufficientTargetRSEs(RucioException):
318
+ """
319
+ RucioException
320
+ """
321
+ def __init__(self, *args, **kwargs):
322
+ super(InsufficientTargetRSEs, self).__init__(*args, **kwargs)
323
+ self._message = "There are not enough target RSEs to fulfil the request at this time."
324
+ self.error_code = 28
325
+
326
+
327
+ class InvalidMetadata(RucioException):
328
+ """
329
+ RucioException
330
+ """
331
+ def __init__(self, *args, **kwargs):
332
+ super(InvalidMetadata, self).__init__(*args, **kwargs)
333
+ self._message = "Provided metadata is considered invalid."
334
+ self.error_code = 29
335
+
336
+
337
+ class InvalidObject(RucioException):
338
+ """
339
+ RucioException
340
+ """
341
+ def __init__(self, *args, **kwargs):
342
+ super(InvalidObject, self).__init__(*args, **kwargs)
343
+ self._message = "Provided object does not match schema."
344
+ self.error_code = 30
345
+
346
+
347
+ class InvalidReplicationRule(RucioException):
348
+ """
349
+ RucioException
350
+ """
351
+ def __init__(self, *args, **kwargs):
352
+ super(InvalidReplicationRule, self).__init__(*args, **kwargs)
353
+ self._message = "Provided replication rule is considered invalid."
354
+ self.error_code = 31
355
+
356
+
357
+ class InvalidRSEExpression(RucioException):
358
+ """
359
+ RucioException
360
+ """
361
+ def __init__(self, *args, **kwargs):
362
+ super(InvalidRSEExpression, self).__init__(*args, **kwargs)
363
+ self._message = "Provided RSE expression is considered invalid."
364
+ self.error_code = 32
365
+
366
+
367
+ class InvalidRuleWeight(RucioException):
368
+ """
369
+ RucioException
370
+ """
371
+ def __init__(self, *args, **kwargs):
372
+ super(InvalidRuleWeight, self).__init__(*args, **kwargs)
373
+ self._message = "An invalid weight value/type is used for an RSE."
374
+ self.error_code = 33
375
+
376
+
377
+ class InvalidType(RucioException):
378
+ """
379
+ RucioException
380
+ """
381
+ def __init__(self, *args, **kwargs):
382
+ super(InvalidType, self).__init__(*args, **kwargs)
383
+ self._message = "Provided type is considered invalid."
384
+ self.error_code = 34
385
+
386
+
387
+ class InvalidValueForKey(RucioException):
388
+ """
389
+ RucioException
390
+ """
391
+ def __init__(self, *args, **kwargs):
392
+ super(InvalidValueForKey, self).__init__(*args, **kwargs)
393
+ self._message = "Invalid value for the key."
394
+ self.error_code = 35
395
+
396
+
397
+ class InvalidRequest(RucioException):
398
+ """
399
+ RucioException
400
+ """
401
+ def __init__(self, *args, **kwargs):
402
+ super(InvalidRequest, self).__init__(*args, **kwargs)
403
+ self._message = "Request is considered invalid."
404
+ self.error_code = 36
405
+
406
+
407
+ class InvalidPath(RucioException):
408
+ """
409
+ RucioException
410
+ """
411
+ def __init__(self, *args, **kwargs):
412
+ super(InvalidPath, self).__init__(*args, **kwargs)
413
+ self._message = "The path provided is invalid."
414
+ self.error_code = 37
415
+
416
+
417
+ class KeyNotFound(RucioException):
418
+ """
419
+ RucioException
420
+ """
421
+ def __init__(self, *args, **kwargs):
422
+ super(KeyNotFound, self).__init__(*args, **kwargs)
423
+ self._message = "Key does not exist."
424
+ self.error_code = 38
425
+
426
+
427
+ class LifetimeExceptionDuplicate(RucioException):
428
+ """
429
+ RucioException
430
+ """
431
+ def __init__(self, *args, **kwargs):
432
+ super(LifetimeExceptionDuplicate, self).__init__(*args, **kwargs)
433
+ self._message = "An exception already exists."
434
+ self.error_code = 39
435
+
436
+
437
+ class LifetimeExceptionNotFound(RucioException):
438
+ """
439
+ RucioException
440
+ """
441
+ def __init__(self, *args, **kwargs):
442
+ super(LifetimeExceptionNotFound, self).__init__(*args, **kwargs)
443
+ self._message = "Exception does not exist."
444
+ self.error_code = 40
445
+
446
+
447
+ class ManualRuleApprovalBlocked(RucioException):
448
+ """
449
+ RucioException
450
+ """
451
+ def __init__(self, *args, **kwargs):
452
+ super(ManualRuleApprovalBlocked, self).__init__(*args, **kwargs)
453
+ self._message = "Manual rule approval is blocked on this RSE."
454
+ self.error_code = 41
455
+
456
+
457
+ class MissingClientParameter(RucioException):
458
+ """
459
+ RucioException
460
+ """
461
+ def __init__(self, *args, **kwargs):
462
+ super(MissingClientParameter, self).__init__(*args, **kwargs)
463
+ self._message = "Client parameters are missing."
464
+ self.error_code = 42
465
+
466
+
467
+ class MissingDependency(RucioException):
468
+ """
469
+ RucioException
470
+ """
471
+ def __init__(self, *args, **kwargs):
472
+ super(MissingDependency, self).__init__(*args, **kwargs)
473
+ self._message = "One dependency is missing."
474
+ self.error_code = 43
475
+
476
+
477
+ class MissingSourceReplica(RucioException):
478
+ """
479
+ RucioException
480
+ """
481
+ def __init__(self, *args, **kwargs):
482
+ super(MissingSourceReplica, self).__init__(*args, **kwargs)
483
+ self._message = "Source replicas are missing to fulfil the request at this moment."
484
+ self.error_code = 44
485
+
486
+
487
+ class NameTypeError(RucioException):
488
+ """
489
+ RucioException
490
+ """
491
+ def __init__(self, *args, **kwargs):
492
+ super(NameTypeError, self).__init__(*args, **kwargs)
493
+ self._message = "Name is of the wrong type"
494
+ self.error_code = 45
495
+
496
+
497
+ class NoAuthInformation(RucioException):
498
+ """
499
+ RucioException
500
+ """
501
+ def __init__(self, *args, **kwargs):
502
+ super(NoAuthInformation, self).__init__(*args, **kwargs)
503
+ self._message = "No authentication information passed."
504
+ self.error_code = 46
505
+
506
+
507
+ class NoFilesDownloaded(RucioException):
508
+ """
509
+ RucioException
510
+ """
511
+ def __init__(self, *args, **kwargs):
512
+ super(NoFilesDownloaded, self).__init__(*args, **kwargs)
513
+ self._message = "None of the requested files have been downloaded."
514
+ self.error_code = 75
515
+
516
+
517
+ class NotAllFilesDownloaded(RucioException):
518
+ """
519
+ RucioException
520
+ """
521
+ def __init__(self, *args, **kwargs):
522
+ super(NotAllFilesDownloaded, self).__init__(*args, **kwargs)
523
+ self._message = "Not all of the requested files have been downloaded."
524
+ self.error_code = 76
525
+
526
+
527
+ class ReplicationRuleCreationTemporaryFailed(RucioException):
528
+ """
529
+ RucioException
530
+ """
531
+ def __init__(self, *args, **kwargs):
532
+ super(ReplicationRuleCreationTemporaryFailed, self).__init__(*args, **kwargs)
533
+ self._message = "The creation of the replication rule failed at this time. Please try again later."
534
+ self.error_code = 47
535
+
536
+
537
+ class RequestNotFound(RucioException):
538
+ def __init__(self, *args, **kwargs):
539
+ super(RequestNotFound, self).__init__(*args, **kwargs)
540
+ self._message = "A request for this DID and RSE does not exist."
541
+ self.error_code = 48
542
+
543
+
544
+ class RSEAccessDenied(RucioException):
545
+ """
546
+ RucioException
547
+ """
548
+ def __init__(self, *args, **kwargs):
549
+ super(RSEAccessDenied, self).__init__(*args, **kwargs)
550
+ self._message = "Referenced RSE not reachable."
551
+ self.error_code = 49
552
+
553
+
554
+ class RSEWriteBlocked(RucioException):
555
+ """
556
+ RucioException
557
+ """
558
+ def __init__(self, *args, **kwargs):
559
+ super(RSEWriteBlocked, self).__init__(*args, **kwargs)
560
+ self._message = "RSE excluded; not available for writing."
561
+ self.error_code = 50
562
+
563
+
564
+ class RSENotConnected(RucioException):
565
+ """
566
+ RucioException
567
+ """
568
+ def __init__(self, *args, **kwargs):
569
+ super(RSENotConnected, self).__init__(*args, **kwargs)
570
+ self._message = "Connection to RSE not established."
571
+ self.error_code = 51
572
+
573
+
574
+ class RSENotFound(RucioException):
575
+ """
576
+ RucioException
577
+ """
578
+ def __init__(self, *args, **kwargs):
579
+ super(RSENotFound, self).__init__(*args, **kwargs)
580
+ self._message = "RSE does not exist."
581
+ self.error_code = 52
582
+
583
+
584
+ class RSEProtocolNotSupported(RucioException):
585
+ """
586
+ RucioException
587
+ """
588
+ def __init__(self, *args, **kwargs):
589
+ super(RSEProtocolNotSupported, self).__init__(*args, **kwargs)
590
+ self._message = "RSE does not support requested protocol."
591
+ self.error_code = 53
592
+
593
+
594
+ class RSEProtocolPriorityError(RucioException):
595
+ """
596
+ RucioException
597
+ """
598
+ def __init__(self, *args, **kwargs):
599
+ super(RSEProtocolPriorityError, self).__init__(*args, **kwargs)
600
+ self._message = "RSE does not support provided protocol priority for protocol."
601
+ self.error_code = 54
602
+
603
+
604
+ class RSEProtocolDomainNotSupported(RucioException):
605
+ """
606
+ RucioException
607
+ """
608
+ def __init__(self, *args, **kwargs):
609
+ super(RSEProtocolDomainNotSupported, self).__init__(*args, **kwargs)
610
+ self._message = "RSE does not support requested protocol scope."
611
+ self.error_code = 55
612
+
613
+
614
+ class RSEOperationNotSupported(RucioException):
615
+ """
616
+ RucioException
617
+ """
618
+ def __init__(self, *args, **kwargs):
619
+ super(RSEOperationNotSupported, self).__init__(*args, **kwargs)
620
+ self._message = "RSE does not support requested operation."
621
+ self.error_code = 56
622
+
623
+
624
+ class RSEFileNameNotSupported(RucioException):
625
+ """
626
+ RucioException
627
+ """
628
+ def __init__(self, *args, **kwargs):
629
+ super(RSEFileNameNotSupported, self).__init__(*args, **kwargs)
630
+ self._message = "RSE does not support provided filename."
631
+ self.error_code = 57
632
+
633
+
634
+ class RSEOverQuota(RucioException):
635
+ """
636
+ RucioException
637
+ """
638
+ def __init__(self, *args, **kwargs):
639
+ super(RSEOverQuota, self).__init__(*args, **kwargs)
640
+ self._message = "Quota of Referenced RSE is exceeded."
641
+ self.error_code = 58
642
+
643
+
644
+ class ResourceTemporaryUnavailable(RucioException):
645
+ """
646
+ RucioException
647
+ """
648
+ def __init__(self, *args, **kwargs):
649
+ super(ResourceTemporaryUnavailable, self).__init__(*args, **kwargs)
650
+ self._message = "The resource is temporary not available."
651
+ self.error_code = 59
652
+
653
+
654
+ class RuleNotFound(RucioException):
655
+ """
656
+ RucioException
657
+ """
658
+ def __init__(self, *args, **kwargs):
659
+ super(RuleNotFound, self).__init__(*args, **kwargs)
660
+ self._message = "No replication rule found."
661
+ self.error_code = 60
662
+
663
+
664
+ class RuleReplaceFailed(RucioException):
665
+ """
666
+ RucioException
667
+ """
668
+ def __init__(self, *args, **kwargs):
669
+ super(RuleReplaceFailed, self).__init__(*args, **kwargs)
670
+ self._message = "The replace operation for the rule failed."
671
+ self.error_code = 61
672
+
673
+
674
+ class ScratchDiskLifetimeConflict(RucioException):
675
+ """
676
+ RucioException
677
+ """
678
+ def __init__(self, *args, **kwargs):
679
+ super(ScratchDiskLifetimeConflict, self).__init__(*args, **kwargs)
680
+ self._message = "The requested replication rule exceeds the maximum SCRATCHDISK lifetime of 15 days."
681
+ self.error_code = 62
682
+
683
+
684
+ class ServiceUnavailable(RucioException):
685
+ """
686
+ RucioException
687
+ """
688
+ def __init__(self, *args, **kwargs):
689
+ super(ServiceUnavailable, self).__init__(*args, **kwargs)
690
+ self._message = "The requested service is not available at the moment."
691
+ self.error_code = 63
692
+
693
+
694
+ class ScopeAccessDenied(RucioException):
695
+ """
696
+ RucioException
697
+ """
698
+ def __init__(self, *args, **kwargs):
699
+ super(ScopeAccessDenied, self).__init__(*args, **kwargs)
700
+ self._message = "Access to Referenced scope denied."
701
+ self.error_code = 64
702
+
703
+
704
+ class ScopeNotFound(RucioException):
705
+ """
706
+ RucioException
707
+ """
708
+ def __init__(self, *args, **kwargs):
709
+ super(ScopeNotFound, self).__init__(*args, **kwargs)
710
+ self._message = "Scope does not exist."
711
+ self.error_code = 65
712
+
713
+
714
+ class SourceAccessDenied(RucioException):
715
+ """
716
+ RucioException
717
+ """
718
+ def __init__(self, *args, **kwargs):
719
+ super(SourceAccessDenied, self).__init__(*args, **kwargs)
720
+ self._message = "Access to local source file denied."
721
+ self.error_code = 66
722
+
723
+
724
+ class SourceNotFound(RucioException):
725
+ """
726
+ RucioException
727
+ """
728
+ def __init__(self, *args, **kwargs):
729
+ super(SourceNotFound, self).__init__(*args, **kwargs)
730
+ self._message = "Source file not found."
731
+ self.error_code = 67
732
+
733
+
734
+ class StagingAreaRuleRequiresLifetime(RucioException):
735
+ """
736
+ RucioException
737
+ """
738
+ def __init__(self, *args, **kwargs):
739
+ super(StagingAreaRuleRequiresLifetime, self).__init__(*args, **kwargs)
740
+ self._message = "A rule involving a staging area requires a lifetime!"
741
+ self.error_code = 68
742
+
743
+
744
+ class SubscriptionDuplicate(RucioException):
745
+ """
746
+ RucioException
747
+ """
748
+ def __init__(self, *args, **kwargs):
749
+ super(SubscriptionDuplicate, self).__init__(*args, **kwargs)
750
+ self._message = "A subscription with the same identifier already exists."
751
+ self.error_code = 69
752
+
753
+
754
+ class SubscriptionNotFound(RucioException):
755
+ """
756
+ RucioException
757
+ """
758
+ def __init__(self, *args, **kwargs):
759
+ super(SubscriptionNotFound, self).__init__(*args, **kwargs)
760
+ self._message = "Subscription not found."
761
+ self.error_code = 70
762
+
763
+
764
+ class UnsupportedDIDType(RucioException):
765
+ """
766
+ RucioException
767
+ """
768
+ def __init__(self, *args, **kwargs):
769
+ super(UnsupportedDIDType, self).__init__(*args, **kwargs)
770
+ self._message = "Unsupported DID type for this operation. Only DATASET or FILE is allowed."
771
+ self.error_code = 71
772
+
773
+
774
+ class UnsupportedOperation(RucioException):
775
+ """
776
+ RucioException
777
+ """
778
+ def __init__(self, *args, **kwargs):
779
+ super(UnsupportedOperation, self).__init__(*args, **kwargs)
780
+ self._message = "The resource doesn't support the requested operation."
781
+ self.error_code = 72
782
+
783
+
784
+ class UnsupportedStatus(RucioException):
785
+ """
786
+ RucioException
787
+ """
788
+ def __init__(self, *args, **kwargs):
789
+ super(UnsupportedStatus, self).__init__(*args, **kwargs)
790
+ self._message = "Unsupported data identifier status."
791
+ self.error_code = 73
792
+
793
+
794
+ class UnsupportedValueType(RucioException):
795
+ """
796
+ RucioException
797
+ """
798
+ def __init__(self, *args, **kwargs):
799
+ super(UnsupportedValueType, self).__init__(*args, **kwargs)
800
+ self._message = "Unsupported type for the value. List of supported types: %s." % str(AUTHORIZED_VALUE_TYPES)
801
+ self.error_code = 74
802
+
803
+
804
+ class MissingModuleException(RucioException):
805
+ """
806
+ RucioException
807
+ """
808
+ def __init__(self, *args, **kwargs):
809
+ super(MissingModuleException, self).__init__(*args, **kwargs)
810
+ self._message = "The module is not installed."
811
+ self.error_code = 77
812
+
813
+
814
+ class ServerConnectionException(RucioException):
815
+ """
816
+ RucioException
817
+ """
818
+ def __init__(self, *args, **kwargs):
819
+ super(ServerConnectionException, self).__init__(*args, **kwargs)
820
+ self._message = "Cannot connect to the Rucio server."
821
+ self.error_code = 78
822
+
823
+
824
+ class NoFilesUploaded(RucioException):
825
+ """
826
+ RucioException
827
+ """
828
+ def __init__(self, *args, **kwargs):
829
+ super(NoFilesUploaded, self).__init__(*args, **kwargs)
830
+ self._message = "None of the given files have been uploaded."
831
+ self.error_code = 79
832
+
833
+
834
+ class NotAllFilesUploaded(RucioException):
835
+ """
836
+ RucioException
837
+ """
838
+ def __init__(self, *args, **kwargs):
839
+ super(NotAllFilesUploaded, self).__init__(*args, **kwargs)
840
+ self._message = "Not all of the given files have been uploaded."
841
+ self.error_code = 80
842
+
843
+
844
+ class RSEChecksumUnavailable(RucioException):
845
+ """
846
+ Cannot retrieve checksum from RSE
847
+ """
848
+ def __init__(self, *args, **kwargs):
849
+ super(RSEChecksumUnavailable, self).__init__(*args, **kwargs)
850
+ self._message = "RSE checksum unavailable."
851
+ self.error_code = 81
852
+
853
+
854
+ class UndefinedPolicy(RucioException):
855
+ """
856
+ Cannot find a defined policy in the Rucio config
857
+ """
858
+ def __init__(self, *args, **kwargs):
859
+ super(UndefinedPolicy, self).__init__(*args, **kwargs)
860
+ self._message = "No policy is defined."
861
+ self.error_code = 82
862
+
863
+
864
+ class TransferToolTimeout(RucioException):
865
+ """
866
+ Timeout from the transfer tool
867
+ """
868
+ def __init__(self, *args, **kwargs):
869
+ super(TransferToolTimeout, self).__init__(*args, **kwargs)
870
+ self._message = "Timeout from the transfer tool."
871
+ self.error_code = 83
872
+
873
+
874
+ class TransferToolWrongAnswer(RucioException):
875
+ """
876
+ Wrong answer returned by the transfer tool
877
+ """
878
+ def __init__(self, *args, **kwargs):
879
+ super(TransferToolWrongAnswer, self).__init__(*args, **kwargs)
880
+ self._message = "Wrong answer returned by the transfer tool."
881
+ self.error_code = 84
882
+
883
+
884
+ class RSEAttributeNotFound(RucioException):
885
+ """
886
+ RSE attribute not found.
887
+ """
888
+ def __init__(self, *args, **kwargs):
889
+ super(RSEAttributeNotFound, self).__init__(*args, **kwargs)
890
+ self._message = "RSE attribute not found."
891
+ self.error_code = 85
892
+
893
+
894
+ class UnsupportedKeyType(RucioException):
895
+ """
896
+ RucioException
897
+ """
898
+ def __init__(self, *args, **kwargs):
899
+ super(UnsupportedKeyType, self).__init__(*args, **kwargs)
900
+ self._message = "Unsupported type for the key."
901
+ self.error_code = 86
902
+
903
+
904
+ class MetalinkJsonParsingError(RucioException):
905
+ """
906
+ Failed to parse input with metalink and json
907
+ """
908
+ def __init__(self, data, metalink_err, json_err, *args, **kwargs):
909
+ super(MetalinkJsonParsingError, self).__init__(*args, **kwargs)
910
+ self._message = 'Failed parsing of %s. MetalinkError: %s. JsonError: %s' % (data, metalink_err, json_err)
911
+ self.error_code = 87
912
+
913
+
914
+ class ReplicaIsLocked(RucioException):
915
+ """
916
+ Replica has one or more locks.
917
+ """
918
+ def __init__(self, *args, **kwargs):
919
+ super(ReplicaIsLocked, self).__init__(*args, **kwargs)
920
+ self._message = 'Replica is locked'
921
+ self.error_code = 88
922
+
923
+
924
+ class UnsupportedRequestedContentType(RucioException):
925
+ """
926
+ The requested content type is not supported by the API endpoint.
927
+ """
928
+ def __init__(self, *args, **kwargs):
929
+ super(UnsupportedRequestedContentType, self).__init__(*args, **kwargs)
930
+ self._message = 'The requested content type is not supported.'
931
+ self.error_code = 89
932
+
933
+
934
+ class DuplicateFileTransferSubmission(RucioException):
935
+ """
936
+ A transfer for the same file is already submitted to the Transfer Tool.
937
+ """
938
+ def __init__(self, *args, **kwargs):
939
+ super(DuplicateFileTransferSubmission, self).__init__(*args, **kwargs)
940
+ self._message = 'One or more files are already submitted to the transfer tool'
941
+ self.error_code = 90
942
+
943
+
944
+ class DIDError(RucioException):
945
+ """
946
+ An operation related to DID type went wrong
947
+ """
948
+ def __init__(self, *args, **kwargs):
949
+ super(DIDError, self).__init__(*args, **kwargs)
950
+ self._message = 'Error using DID type'
951
+ self.error_code = 91
952
+
953
+
954
+ class NoDistance(RucioException):
955
+ """
956
+ No distance can be found between 2 RSEs
957
+ """
958
+ def __init__(self, *args, **kwargs):
959
+ super(NoDistance, self).__init__(*args, **kwargs)
960
+ self._message = 'Cannot found a distance between 2 RSEs'
961
+ self.error_code = 92
962
+
963
+
964
+ class PolicyPackageNotFound(RucioException):
965
+ """
966
+ The policy package specified in the config file cannot be loaded.
967
+ """
968
+ def __init__(self, *args, **kwargs):
969
+ super(PolicyPackageNotFound, self).__init__(*args, **kwargs)
970
+ self._message = 'The specified policy package cannot be loaded'
971
+ self.error_code = 93
972
+
973
+
974
+ class CannotAuthorize(RucioException):
975
+ """
976
+ Failed to authorize an operation.
977
+ """
978
+ def __init__(self, *args, **kwargs):
979
+ super(CannotAuthorize, self).__init__(*args, **kwargs)
980
+ self._message = 'Can not authorize operation.'
981
+ self.error_code = 94
982
+
983
+
984
+ class SubscriptionWrongParameter(RucioException):
985
+ """
986
+ RucioException
987
+ """
988
+ def __init__(self, *args, **kwargs):
989
+ super(SubscriptionWrongParameter, self).__init__(*args, **kwargs)
990
+ self._message = "Subscription wrong parameters"
991
+ self.error_code = 95
992
+
993
+
994
+ class VONotFound(RucioException):
995
+ """
996
+ Requested VO does not exist.
997
+ """
998
+ def __init__(self, *args, **kwargs):
999
+ super(VONotFound, self).__init__(*args, **kwargs)
1000
+ self._message = 'The requested VO does not exist'
1001
+ self.error_code = 96
1002
+
1003
+
1004
+ class UnsupportedAccountName(RucioException):
1005
+ """
1006
+ Requested account name is not supported for users.
1007
+ """
1008
+ def __init__(self, *args, **kwargs):
1009
+ super(UnsupportedAccountName, self).__init__(*args, **kwargs)
1010
+ self._message = 'The requested account name cannot be used'
1011
+ self.error_code = 97
1012
+
1013
+
1014
+ class DuplicateCriteriaInDIDFilter(RucioException):
1015
+ """
1016
+ Duplicate criteria found in DID filter.
1017
+ """
1018
+ def __init__(self, *args, **kwargs):
1019
+ super(DuplicateCriteriaInDIDFilter, self).__init__(*args, **kwargs)
1020
+ self._message = 'Duplicate criteria for key/operator in filter expression: {}'.format(args[0])
1021
+ self.error_code = 98
1022
+
1023
+
1024
+ class DIDFilterSyntaxError(RucioException):
1025
+ """
1026
+ DID filter is not parsable.
1027
+ """
1028
+ def __init__(self, *args, **kwargs):
1029
+ super(DIDFilterSyntaxError, self).__init__(*args, **kwargs)
1030
+ self._message = 'Syntax error in filter expression.'
1031
+ self.error_code = 99
1032
+
1033
+
1034
+ class InvalidAlgorithmName(RucioException):
1035
+ """
1036
+ The given algorithm name is not valid for the VO.
1037
+ """
1038
+ def __init__(self, algorithm, vo, *args, **kwargs):
1039
+ super(InvalidAlgorithmName, self).__init__(*args, **kwargs)
1040
+ self.message = 'Algorithm name %s is not valid for VO %s' % (algorithm, vo)
1041
+ self.error_code = 100
1042
+
1043
+
1044
+ class FilterEngineGenericError(RucioException):
1045
+ """
1046
+ Generic Filter Engine error.
1047
+ """
1048
+ def __init__(self, *args, **kwargs):
1049
+ super(FilterEngineGenericError, self).__init__(*args, **kwargs)
1050
+ self._message = 'Generic filter engine error.'
1051
+ self.error_code = 101
1052
+
1053
+
1054
+ class MetadataSchemaMismatchError(RucioException):
1055
+ """
1056
+ External table does not match expected table schema.
1057
+ """
1058
+ def __init__(self, *args, **kwargs):
1059
+ super(MetadataSchemaMismatchError, self).__init__(*args, **kwargs)
1060
+ self._message = 'The external table does not match the expected table schema.'
1061
+ self.error_code = 102
1062
+
1063
+
1064
+ class PolicyPackageVersionError(RucioException):
1065
+ """
1066
+ Policy package is not compatible with this version of Rucio.
1067
+ """
1068
+ def __init__(self, package, *args, **kwargs):
1069
+ super(PolicyPackageVersionError, self).__init__(*args, **kwargs)
1070
+ self._message = 'Policy package %s is not compatible with this Rucio version' % package
1071
+ self.error_code = 103
1072
+
1073
+
1074
+ class InvalidSourceReplicaExpression(RucioException):
1075
+ """
1076
+ Source Replica Expression Considered Invalid
1077
+ """
1078
+
1079
+ def __init__(self, *args, **kwargs):
1080
+ super(InvalidSourceReplicaExpression, self).__init__(*args, **kwargs)
1081
+ self._message = 'Provided Source Replica expression is considered invalid.'
1082
+ self.error_code = 104
1083
+
1084
+
1085
+ class DeprecationError(RucioException):
1086
+ """
1087
+ Function has been deprecated.
1088
+ """
1089
+ def __init__(self, *args, **kwargs):
1090
+ super(DeprecationError, self).__init__(*args, **kwargs)
1091
+ self._message = 'Command or function has been deprecated.'
1092
+ self.error_code = 105