rucio-clients 35.7.0__py3-none-any.whl → 37.0.0rc2__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/alembicrevision.py +1 -1
- rucio/cli/__init__.py +14 -0
- rucio/cli/account.py +216 -0
- rucio/cli/bin_legacy/__init__.py +13 -0
- rucio_clients-35.7.0.data/scripts/rucio → rucio/cli/bin_legacy/rucio.py +769 -486
- rucio_clients-35.7.0.data/scripts/rucio-admin → rucio/cli/bin_legacy/rucio_admin.py +476 -423
- rucio/cli/command.py +272 -0
- rucio/cli/config.py +72 -0
- rucio/cli/did.py +191 -0
- rucio/cli/download.py +128 -0
- rucio/cli/lifetime_exception.py +33 -0
- rucio/cli/replica.py +162 -0
- rucio/cli/rse.py +293 -0
- rucio/cli/rule.py +158 -0
- rucio/cli/scope.py +40 -0
- rucio/cli/subscription.py +73 -0
- rucio/cli/upload.py +60 -0
- rucio/cli/utils.py +226 -0
- rucio/client/accountclient.py +0 -1
- rucio/client/baseclient.py +33 -24
- rucio/client/client.py +45 -1
- rucio/client/didclient.py +5 -3
- rucio/client/downloadclient.py +6 -8
- rucio/client/replicaclient.py +0 -2
- rucio/client/richclient.py +317 -0
- rucio/client/rseclient.py +4 -4
- rucio/client/uploadclient.py +26 -12
- rucio/common/bittorrent.py +234 -0
- rucio/common/cache.py +66 -29
- rucio/common/checksum.py +168 -0
- rucio/common/client.py +122 -0
- rucio/common/config.py +22 -35
- rucio/common/constants.py +61 -3
- rucio/common/didtype.py +72 -24
- rucio/common/exception.py +65 -8
- rucio/common/extra.py +5 -10
- rucio/common/logging.py +13 -13
- rucio/common/pcache.py +8 -7
- rucio/common/plugins.py +59 -27
- rucio/common/policy.py +12 -3
- rucio/common/schema/__init__.py +84 -34
- rucio/common/schema/generic.py +0 -17
- rucio/common/schema/generic_multi_vo.py +0 -17
- rucio/common/stomp_utils.py +383 -119
- rucio/common/test_rucio_server.py +12 -6
- rucio/common/types.py +132 -52
- rucio/common/utils.py +93 -643
- rucio/rse/__init__.py +3 -3
- rucio/rse/protocols/bittorrent.py +11 -1
- rucio/rse/protocols/cache.py +0 -11
- rucio/rse/protocols/dummy.py +0 -11
- rucio/rse/protocols/gfal.py +14 -9
- rucio/rse/protocols/globus.py +1 -1
- rucio/rse/protocols/http_cache.py +1 -1
- rucio/rse/protocols/posix.py +2 -2
- rucio/rse/protocols/protocol.py +84 -317
- rucio/rse/protocols/rclone.py +2 -1
- rucio/rse/protocols/rfio.py +10 -1
- rucio/rse/protocols/ssh.py +2 -1
- rucio/rse/protocols/storm.py +2 -13
- rucio/rse/protocols/webdav.py +74 -30
- rucio/rse/protocols/xrootd.py +2 -1
- rucio/rse/rsemanager.py +170 -53
- rucio/rse/translation.py +260 -0
- rucio/vcsversion.py +4 -4
- rucio/version.py +7 -0
- {rucio_clients-35.7.0.data → rucio_clients-37.0.0rc2.data}/data/etc/rucio.cfg.atlas.client.template +3 -2
- {rucio_clients-35.7.0.data → rucio_clients-37.0.0rc2.data}/data/etc/rucio.cfg.template +3 -19
- {rucio_clients-35.7.0.data → rucio_clients-37.0.0rc2.data}/data/requirements.client.txt +11 -7
- rucio_clients-37.0.0rc2.data/scripts/rucio +133 -0
- rucio_clients-37.0.0rc2.data/scripts/rucio-admin +97 -0
- {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0rc2.dist-info}/METADATA +18 -14
- rucio_clients-37.0.0rc2.dist-info/RECORD +104 -0
- {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0rc2.dist-info}/licenses/AUTHORS.rst +3 -0
- rucio/common/schema/atlas.py +0 -413
- rucio/common/schema/belleii.py +0 -408
- rucio/common/schema/domatpc.py +0 -401
- rucio/common/schema/escape.py +0 -426
- rucio/common/schema/icecube.py +0 -406
- rucio/rse/protocols/gsiftp.py +0 -92
- rucio_clients-35.7.0.dist-info/RECORD +0 -88
- {rucio_clients-35.7.0.data → rucio_clients-37.0.0rc2.data}/data/etc/rse-accounts.cfg.template +0 -0
- {rucio_clients-35.7.0.data → rucio_clients-37.0.0rc2.data}/data/rucio_client/merge_rucio_configs.py +0 -0
- {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0rc2.dist-info}/WHEEL +0 -0
- {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0rc2.dist-info}/licenses/LICENSE +0 -0
- {rucio_clients-35.7.0.dist-info → rucio_clients-37.0.0rc2.dist-info}/top_level.txt +0 -0
rucio/alembicrevision.py
CHANGED
rucio/cli/__init__.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
from rucio.cli import command # noqa: F401
|
rucio/cli/account.py
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
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
|
+
import click
|
|
15
|
+
|
|
16
|
+
from rucio.cli.bin_legacy.rucio import list_account_usage
|
|
17
|
+
from rucio.cli.bin_legacy.rucio_admin import (
|
|
18
|
+
add_account,
|
|
19
|
+
add_account_attribute,
|
|
20
|
+
ban_account,
|
|
21
|
+
delete_account,
|
|
22
|
+
delete_account_attribute,
|
|
23
|
+
delete_limits,
|
|
24
|
+
identity_delete,
|
|
25
|
+
info_account,
|
|
26
|
+
list_account_attributes,
|
|
27
|
+
list_accounts,
|
|
28
|
+
list_identities,
|
|
29
|
+
set_limits,
|
|
30
|
+
unban_account,
|
|
31
|
+
update_account,
|
|
32
|
+
)
|
|
33
|
+
from rucio.cli.bin_legacy.rucio_admin import identity_add as legacy_identity_add
|
|
34
|
+
from rucio.cli.utils import Arguments
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@click.group()
|
|
38
|
+
def account():
|
|
39
|
+
"""Methods to add or change accounts for users, groups, and services. Used to assign privileges"""
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@account.command("add")
|
|
43
|
+
@click.argument("account-name")
|
|
44
|
+
@click.argument("account-type", type=click.Choice(["USER", "GROUP", "SERVICE"]))
|
|
45
|
+
@click.option("--email", type=str, help="Email address associated with the account")
|
|
46
|
+
@click.pass_context
|
|
47
|
+
def add_(ctx, account_type, account_name, email):
|
|
48
|
+
"""Add an account of type [ACCOUNT-TYPE] with the name [ACCOUNT-NAME]
|
|
49
|
+
|
|
50
|
+
\b
|
|
51
|
+
Example:
|
|
52
|
+
$ rucio account add
|
|
53
|
+
"""
|
|
54
|
+
args = Arguments({"account_type": account_type, "account": account_name, "email": email})
|
|
55
|
+
add_account(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@account.command("list")
|
|
59
|
+
@click.option("--type", "type_", type=click.Choice(["USER", "GROUP", "SERVICE"]))
|
|
60
|
+
@click.option("--id", help="Filter by identity (e.g. DN)")
|
|
61
|
+
@click.option("--filter", help="Filter arguments in form `key=value,another_key=next_value`") # TODO Explicit numeration of these possible keys
|
|
62
|
+
@click.pass_context
|
|
63
|
+
def list_(ctx, type_, id, filter):
|
|
64
|
+
"""List all accounts that match given filters"""
|
|
65
|
+
args = Arguments({"account_type": type_, "identity": id, "filters": filter})
|
|
66
|
+
list_accounts(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@account.command("show")
|
|
70
|
+
@click.argument("account-name")
|
|
71
|
+
@click.pass_context
|
|
72
|
+
def show(ctx, account_name):
|
|
73
|
+
"""
|
|
74
|
+
Show info about a single account
|
|
75
|
+
"""
|
|
76
|
+
info_account(Arguments({"account": account_name}), ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@account.command("remove")
|
|
80
|
+
@click.argument("account-name")
|
|
81
|
+
@click.pass_context
|
|
82
|
+
def remove(ctx, account_name):
|
|
83
|
+
"""
|
|
84
|
+
Remove an account
|
|
85
|
+
(WARNING: Permanently disables the account. If you want to temporarily disable, use `account update [account-name] --ban`)
|
|
86
|
+
"""
|
|
87
|
+
delete_account(Arguments({"account": account_name}), ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
@account.command("update")
|
|
91
|
+
@click.argument("account-name")
|
|
92
|
+
@click.option("--email", help="Email address associated with the account")
|
|
93
|
+
@click.option("--ban/--unban", default=None, help="Temporarily disable/enable an account")
|
|
94
|
+
@click.pass_context
|
|
95
|
+
def update(ctx, ban, account_name, email):
|
|
96
|
+
"""Update account settings"""
|
|
97
|
+
args = Arguments({"account": account_name, "key": "email", "value": email})
|
|
98
|
+
if ban is not None:
|
|
99
|
+
if ban:
|
|
100
|
+
ban_account(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
101
|
+
else:
|
|
102
|
+
unban_account(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
103
|
+
else:
|
|
104
|
+
update_account(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@account.group()
|
|
108
|
+
def attribute():
|
|
109
|
+
"""View or modify account attributes"""
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@attribute.command("list")
|
|
113
|
+
@click.argument("account-name")
|
|
114
|
+
@click.pass_context
|
|
115
|
+
def attribute_list(ctx, account_name):
|
|
116
|
+
"List the attributes for a given account"
|
|
117
|
+
list_account_attributes(Arguments({"account": account_name}), ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@attribute.command("add")
|
|
121
|
+
@click.argument("account-name")
|
|
122
|
+
@click.option('--key', help='Attribute key', required=True)
|
|
123
|
+
@click.option('--value', help='Attribute value', required=True)
|
|
124
|
+
@click.pass_context
|
|
125
|
+
def attribute_add(ctx, account_name, key, value):
|
|
126
|
+
"""Add a new attribute [key] to an account"""
|
|
127
|
+
add_account_attribute(Arguments({"account": account_name, "key": key, "value": value}), ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
@attribute.command("remove")
|
|
131
|
+
@click.argument("account-name")
|
|
132
|
+
@click.option("--key", help="Attribute key", required=True)
|
|
133
|
+
@click.pass_context
|
|
134
|
+
def attribute_remove(ctx, account_name, key):
|
|
135
|
+
"""Remove an attribute from an account without reassigning it"""
|
|
136
|
+
delete_account_attribute(Arguments({"account": account_name, "key": key}), ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
@account.group("limit")
|
|
140
|
+
def limit():
|
|
141
|
+
"""View or modify account limits - limit how much data an account can store on an RSE"""
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
@limit.command("list", help="Shows the space used, the quota limit and the quota left for an account for every RSE where the user have quota.")
|
|
145
|
+
@click.argument("account-name")
|
|
146
|
+
@click.option("--rse", "--rse-name", help="Show usage for only for this RSE.")
|
|
147
|
+
@click.pass_context
|
|
148
|
+
def limit_list(ctx, account_name, rse):
|
|
149
|
+
"""List the limits and current usage for an account"""
|
|
150
|
+
args = Arguments({"usage_account": account_name, "rse": rse})
|
|
151
|
+
list_account_usage(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
@limit.command("add")
|
|
155
|
+
@click.argument(
|
|
156
|
+
"account-name",
|
|
157
|
+
)
|
|
158
|
+
@click.option("--rse", "--rse-name", help="Full RSE name", required=True) # TODO Separate RSE (local) and RSE Expression (global)
|
|
159
|
+
@click.option("--bytes", "bytes_", help='Value of the limit; can be specified in bytes ("10000"), with a storage unit ("10GB"), or "infinity"', required=True)
|
|
160
|
+
@click.option("--locality", type=click.Choice(["local", "global"]), help="Global or local limit scope", default="local")
|
|
161
|
+
@click.pass_context
|
|
162
|
+
def limit_add(ctx, account_name, rse, bytes_, locality):
|
|
163
|
+
"""Add a new limit for an account on an RSE. An account can have both local and global limits on the same RSE."""
|
|
164
|
+
args = Arguments({"account": account_name, "rse": rse, "bytes": bytes_, "locality": locality})
|
|
165
|
+
set_limits(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
@limit.command("remove")
|
|
169
|
+
@click.argument(
|
|
170
|
+
"account-name",
|
|
171
|
+
)
|
|
172
|
+
@click.option("--rse", "--rse-name", help="Full RSE name", required=True)
|
|
173
|
+
@click.option("--locality", type=click.Choice(["local", "global"]), help="Global or local limit scope", default="local")
|
|
174
|
+
@click.pass_context
|
|
175
|
+
def limit_remove(ctx, account_name, rse, locality):
|
|
176
|
+
"""Remove existing limits for an account on an RSE"""
|
|
177
|
+
args = Arguments({"account": account_name, "rse": rse, "locality": locality})
|
|
178
|
+
delete_limits(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
@account.group("identity")
|
|
182
|
+
def identity():
|
|
183
|
+
"""Manage identities for an account - used to login"""
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
@identity.command("list")
|
|
187
|
+
@click.argument("account-name", required=True)
|
|
188
|
+
@click.pass_context
|
|
189
|
+
def identity_list(ctx, account_name):
|
|
190
|
+
"""See all the IDs for [account-name]"""
|
|
191
|
+
args = Arguments({"account": account_name})
|
|
192
|
+
list_identities(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
@identity.command("add")
|
|
196
|
+
@click.argument("account-name", required=True)
|
|
197
|
+
@click.option("--type", "type_", type=click.Choice(["X509", "GSS", "USERPASS", "SSH", "SAML", "OIDC"]), help="Authentication type", required=True)
|
|
198
|
+
@click.option("--id", help="Identity", required=True)
|
|
199
|
+
@click.option("--email", help="Email address associated with the identity", required=True)
|
|
200
|
+
@click.option("--password", help="Password if authtype is USERPASS")
|
|
201
|
+
@click.pass_context
|
|
202
|
+
def identity_add(ctx, account_name, type_, id, email, password):
|
|
203
|
+
"""Add a new identity for [account-name]"""
|
|
204
|
+
args = Arguments({"account": account_name, "authtype": type_, "identity": id, "email": email, "password": password})
|
|
205
|
+
legacy_identity_add(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
@identity.command("remove")
|
|
209
|
+
@click.argument("account-name", required=True)
|
|
210
|
+
@click.option("--type", "type_", type=click.Choice(["X509", "GSS", "USERPASS", "SSH", "SAML", "OIDC"]), help="Authentication type", required=True)
|
|
211
|
+
@click.option("--id", help="Identity", required=True)
|
|
212
|
+
@click.pass_context
|
|
213
|
+
def identity_remove(ctx, account_name, type_, id):
|
|
214
|
+
"""Revoke a given ID's access from an account"""
|
|
215
|
+
args = Arguments({"account": account_name, "authtype": type_, "id": id})
|
|
216
|
+
identity_delete(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
@@ -0,0 +1,13 @@
|
|
|
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.
|