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