rucio-clients 37.3.0__py3-none-any.whl → 37.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rucio-clients might be problematic. Click here for more details.
- rucio/cli/rule.py +1 -1
- rucio/client/accountclient.py +205 -60
- rucio/client/accountlimitclient.py +84 -25
- rucio/client/baseclient.py +85 -48
- rucio/client/client.py +49 -41
- rucio/client/configclient.py +36 -13
- rucio/client/credentialclient.py +16 -6
- rucio/client/didclient.py +321 -133
- rucio/client/diracclient.py +13 -6
- rucio/client/downloadclient.py +435 -165
- rucio/client/exportclient.py +8 -2
- rucio/client/fileclient.py +10 -3
- rucio/client/importclient.py +4 -1
- rucio/client/lifetimeclient.py +48 -31
- rucio/client/lockclient.py +22 -7
- rucio/client/metaconventionsclient.py +59 -21
- rucio/client/pingclient.py +3 -1
- rucio/client/replicaclient.py +213 -96
- rucio/client/requestclient.py +124 -16
- rucio/client/rseclient.py +385 -160
- rucio/client/ruleclient.py +147 -51
- rucio/client/scopeclient.py +35 -10
- rucio/client/subscriptionclient.py +60 -27
- rucio/client/touchclient.py +16 -7
- rucio/common/constants.py +14 -17
- rucio/common/utils.py +18 -2
- rucio/rse/rsemanager.py +2 -2
- rucio/vcsversion.py +3 -3
- {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/data/etc/rucio.cfg.template +0 -1
- {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/METADATA +1 -1
- {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/RECORD +41 -41
- {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/WHEEL +1 -1
- {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/data/etc/rse-accounts.cfg.template +0 -0
- {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/data/etc/rucio.cfg.atlas.client.template +0 -0
- {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/data/requirements.client.txt +0 -0
- {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/data/rucio_client/merge_rucio_configs.py +0 -0
- {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/scripts/rucio +0 -0
- {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/scripts/rucio-admin +0 -0
- {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/licenses/AUTHORS.rst +0 -0
- {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/licenses/LICENSE +0 -0
- {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/top_level.txt +0 -0
rucio/client/exportclient.py
CHANGED
|
@@ -28,9 +28,15 @@ class ExportClient(BaseClient):
|
|
|
28
28
|
def export_data(self, distance: bool = True) -> dict[str, Any]:
|
|
29
29
|
"""
|
|
30
30
|
Export RSE data (RSE, settings, attributes and distance).
|
|
31
|
-
|
|
31
|
+
Parameters
|
|
32
|
+
----------
|
|
33
|
+
distance :
|
|
34
|
+
To include the distance. Default is True.
|
|
32
35
|
|
|
33
|
-
|
|
36
|
+
Returns
|
|
37
|
+
-------
|
|
38
|
+
|
|
39
|
+
A dict containing data
|
|
34
40
|
"""
|
|
35
41
|
payload = {'distance': distance}
|
|
36
42
|
path = '/'.join([self.EXPORT_BASEURL])
|
rucio/client/fileclient.py
CHANGED
|
@@ -31,10 +31,17 @@ class FileClient(BaseClient):
|
|
|
31
31
|
"""
|
|
32
32
|
List file replicas.
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
Parameters
|
|
35
|
+
----------
|
|
36
|
+
scope :
|
|
37
|
+
The scope of the file.
|
|
38
|
+
lfn :
|
|
39
|
+
The LFN
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
Returns
|
|
42
|
+
-------
|
|
43
|
+
|
|
44
|
+
List of replicas.
|
|
38
45
|
"""
|
|
39
46
|
path = '/'.join([self.BASEURL, quote_plus(scope), quote_plus(lfn), 'rses'])
|
|
40
47
|
url = build_url(choice(self.list_hosts), path=path)
|
rucio/client/importclient.py
CHANGED
|
@@ -29,7 +29,10 @@ class ImportClient(BaseClient):
|
|
|
29
29
|
"""
|
|
30
30
|
Imports data into Rucio.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Parameters
|
|
33
|
+
----------
|
|
34
|
+
data :
|
|
35
|
+
A dict containing data to be imported into Rucio.
|
|
33
36
|
"""
|
|
34
37
|
path = '/'.join([self.IMPORT_BASEURL])
|
|
35
38
|
url = build_url(choice(self.list_hosts), path=path)
|
rucio/client/lifetimeclient.py
CHANGED
|
@@ -45,26 +45,32 @@ class LifetimeClient(BaseClient):
|
|
|
45
45
|
(files, datasets, containers, or archives) that need to be kept longer than usual. These exceptions
|
|
46
46
|
can be filtered by their ID or approval state (this feature is not available yet).
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
Parameters
|
|
49
|
+
----------
|
|
50
|
+
exception_id :
|
|
51
|
+
The unique identifier of a specific exception. If provided, returns only that exception.
|
|
52
|
+
states :
|
|
53
|
+
Filter exceptions by their states. Possible values are:
|
|
54
|
+
* `A` (APPROVED): Exception was approved
|
|
55
|
+
* `R` (REJECTED): Exception was rejected
|
|
56
|
+
* `W` (WAITING): Exception is waiting for approval by an admin (or other authorized account)
|
|
57
|
+
|
|
58
|
+
Returns
|
|
59
|
+
-------
|
|
53
60
|
|
|
54
|
-
:returns:
|
|
55
61
|
An iterator of dictionaries containing the exception details:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
* `id`: The unique identifier of the exception
|
|
63
|
+
* `scope`: The scope of the data identifier
|
|
64
|
+
* `name`: The name of the data identifier
|
|
65
|
+
* `did_type`: Type of the data identifier:
|
|
66
|
+
`F` (file), `D` (dataset), `C` (container), `A` (archive),
|
|
67
|
+
`X` (deleted file), `Y` (deleted dataset), `Z` (deleted container)
|
|
68
|
+
* `account`: The account that requested the exception
|
|
69
|
+
* `pattern`: Pattern used for matching data identifiers
|
|
70
|
+
* `comments`: User provided comments explaining the exception
|
|
71
|
+
* `state`: Current state of the exception
|
|
72
|
+
* `created_at`: When the exception was created (returned as timestamp string)
|
|
73
|
+
* `expires_at`: When the exception expires (returned as timestamp string)
|
|
68
74
|
"""
|
|
69
75
|
|
|
70
76
|
path = self.LIFETIME_BASEURL + '/'
|
|
@@ -98,19 +104,30 @@ class LifetimeClient(BaseClient):
|
|
|
98
104
|
maximum extension periods. The request includes details about which DIDs should have extended
|
|
99
105
|
lifetimes, who is requesting it, and why it's needed.
|
|
100
106
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
Parameters
|
|
108
|
+
----------
|
|
109
|
+
dids :
|
|
110
|
+
List of dictionaries containing the data identifiers to be excepted.
|
|
111
|
+
Each dictionary must contain:
|
|
112
|
+
* **scope** : The scope of the data identifier
|
|
113
|
+
* **name** : The name of the data identifier
|
|
114
|
+
account :
|
|
115
|
+
The account requesting the exception
|
|
116
|
+
pattern :
|
|
117
|
+
Associated pattern for the exception request
|
|
118
|
+
comments :
|
|
119
|
+
Justification for why the exception is needed (e.g. "Needed for my XYZ analysis..")
|
|
120
|
+
expires_at :
|
|
121
|
+
When the exception should expire (datetime object)
|
|
122
|
+
|
|
123
|
+
Returns
|
|
124
|
+
-------
|
|
125
|
+
|
|
126
|
+
A dictionary containing:
|
|
127
|
+
* **exceptions** : Dictionary mapping exception IDs to lists of DIDs that were successfully added
|
|
128
|
+
* **unknown** : List of DIDs that could not be found
|
|
129
|
+
* **not_affected** : List of DIDs that did not qualify for an exception
|
|
130
|
+
|
|
114
131
|
"""
|
|
115
132
|
|
|
116
133
|
path = self.LIFETIME_BASEURL + '/'
|
rucio/client/lockclient.py
CHANGED
|
@@ -38,8 +38,13 @@ class LockClient(BaseClient):
|
|
|
38
38
|
"""
|
|
39
39
|
Get a dataset locks of the specified dataset.
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
Parameters
|
|
42
|
+
----------
|
|
43
|
+
scope :
|
|
44
|
+
The scope of the did of the locks to list.
|
|
45
|
+
name :
|
|
46
|
+
The name of the did of the locks to list.
|
|
47
|
+
|
|
43
48
|
"""
|
|
44
49
|
|
|
45
50
|
path = '/'.join([self.LOCKS_BASEURL, quote_plus(scope), quote_plus(name)])
|
|
@@ -62,10 +67,17 @@ class LockClient(BaseClient):
|
|
|
62
67
|
"""
|
|
63
68
|
Get list of locks for for all the files found, recursively, in the listed datasets or containers.
|
|
64
69
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
Parameters
|
|
71
|
+
----------
|
|
72
|
+
dids :
|
|
73
|
+
list of dictionaries {"scope":..., "name":..., "type":...}
|
|
74
|
+
type can be either "dataset" or "container"
|
|
75
|
+
type is optional, but if specified, improves the query performance
|
|
76
|
+
|
|
77
|
+
Returns
|
|
78
|
+
-------
|
|
79
|
+
|
|
80
|
+
list of dictionaries with lock info
|
|
69
81
|
"""
|
|
70
82
|
|
|
71
83
|
# convert did list to list of dictionaries
|
|
@@ -92,7 +104,10 @@ class LockClient(BaseClient):
|
|
|
92
104
|
"""
|
|
93
105
|
Get all dataset locks of the specified rse.
|
|
94
106
|
|
|
95
|
-
|
|
107
|
+
Parameters
|
|
108
|
+
----------
|
|
109
|
+
rse :
|
|
110
|
+
The rse of the locks to list
|
|
96
111
|
"""
|
|
97
112
|
|
|
98
113
|
path = '/'.join([self.LOCKS_BASEURL, rse])
|
|
@@ -35,13 +35,26 @@ class MetaConventionClient(BaseClient):
|
|
|
35
35
|
"""
|
|
36
36
|
Sends the request to add an allowed key for DID metadata (update the DID Metadata Conventions table with a new key).
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
:
|
|
44
|
-
|
|
38
|
+
Parameters
|
|
39
|
+
----------
|
|
40
|
+
key :
|
|
41
|
+
The name for the new key.
|
|
42
|
+
|
|
43
|
+
key_type :
|
|
44
|
+
The type of the key: all(container, dataset, file), collection(dataset or container), file, derived(compute from file for collection).
|
|
45
|
+
value_type :
|
|
46
|
+
The type of the value, if defined.
|
|
47
|
+
value_regexp :
|
|
48
|
+
The regular expression that values should match, if defined.
|
|
49
|
+
|
|
50
|
+
Returns
|
|
51
|
+
-------
|
|
52
|
+
True if key was created successfully.
|
|
53
|
+
|
|
54
|
+
Raises
|
|
55
|
+
-------
|
|
56
|
+
Duplicate
|
|
57
|
+
If key already exists..
|
|
45
58
|
"""
|
|
46
59
|
|
|
47
60
|
path = '/'.join([self.META_BASEURL, quote_plus(key)])
|
|
@@ -62,7 +75,9 @@ class MetaConventionClient(BaseClient):
|
|
|
62
75
|
"""
|
|
63
76
|
Sends the request to list all keys for DID Metadata Conventions.
|
|
64
77
|
|
|
65
|
-
|
|
78
|
+
Returns
|
|
79
|
+
-------
|
|
80
|
+
A list containing the names of all keys.
|
|
66
81
|
"""
|
|
67
82
|
path = self.META_BASEURL + '/'
|
|
68
83
|
url = build_url(choice(self.list_hosts), path=path)
|
|
@@ -77,9 +92,10 @@ class MetaConventionClient(BaseClient):
|
|
|
77
92
|
def list_values(self, key: str) -> Optional[list[str]]:
|
|
78
93
|
"""
|
|
79
94
|
Sends the request to lists all allowed values for a DID key (all values for a key in DID Metadata Conventions).
|
|
80
|
-
.
|
|
81
95
|
|
|
82
|
-
|
|
96
|
+
Returns
|
|
97
|
+
-------
|
|
98
|
+
A list containing the names of all values for a key
|
|
83
99
|
"""
|
|
84
100
|
path = '/'.join([self.META_BASEURL, quote_plus(key)]) + '/'
|
|
85
101
|
url = build_url(choice(self.list_hosts), path=path)
|
|
@@ -95,11 +111,21 @@ class MetaConventionClient(BaseClient):
|
|
|
95
111
|
"""
|
|
96
112
|
Sends the request to add a value for a key in DID Metadata Convention.
|
|
97
113
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
114
|
+
Parameters
|
|
115
|
+
----------
|
|
116
|
+
key :
|
|
117
|
+
The name for key.
|
|
118
|
+
value :
|
|
119
|
+
The value to be added.
|
|
120
|
+
|
|
121
|
+
Returns
|
|
122
|
+
-------
|
|
123
|
+
True if value was created successfully.
|
|
124
|
+
|
|
125
|
+
Raises
|
|
126
|
+
-------
|
|
127
|
+
Duplicate
|
|
128
|
+
If value already exists.
|
|
103
129
|
"""
|
|
104
130
|
|
|
105
131
|
path = '/'.join([self.META_BASEURL, quote_plus(key)]) + '/'
|
|
@@ -116,8 +142,12 @@ class MetaConventionClient(BaseClient):
|
|
|
116
142
|
"""
|
|
117
143
|
Delete a key in the DID Metadata Conventions table.
|
|
118
144
|
|
|
119
|
-
|
|
120
|
-
|
|
145
|
+
Parameters
|
|
146
|
+
---------
|
|
147
|
+
key :
|
|
148
|
+
The name for the key
|
|
149
|
+
value :
|
|
150
|
+
The value
|
|
121
151
|
"""
|
|
122
152
|
pass
|
|
123
153
|
|
|
@@ -125,7 +155,10 @@ class MetaConventionClient(BaseClient):
|
|
|
125
155
|
"""
|
|
126
156
|
Delete an allowed key.
|
|
127
157
|
|
|
128
|
-
|
|
158
|
+
Parameters
|
|
159
|
+
----------
|
|
160
|
+
key :
|
|
161
|
+
The name for the key.
|
|
129
162
|
"""
|
|
130
163
|
pass
|
|
131
164
|
|
|
@@ -133,8 +166,13 @@ class MetaConventionClient(BaseClient):
|
|
|
133
166
|
"""
|
|
134
167
|
Update a key.
|
|
135
168
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
169
|
+
Parameters
|
|
170
|
+
----------
|
|
171
|
+
key :
|
|
172
|
+
The name for the key.
|
|
173
|
+
type_ :
|
|
174
|
+
The type of the value, if defined.
|
|
175
|
+
regexp :
|
|
176
|
+
The regular expression that values should match, if defined.
|
|
139
177
|
"""
|
|
140
178
|
pass
|