rucio 37.2.0__py3-none-any.whl → 37.4.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 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 +123 -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/plugins.py +1 -1
- rucio/core/did.py +2 -3
- rucio/core/permission/generic.py +37 -1
- rucio/core/replica.py +6 -6
- rucio/core/rule.py +5 -3
- rucio/daemons/judge/evaluator.py +1 -1
- rucio/db/sqla/util.py +1 -1
- rucio/gateway/authentication.py +58 -88
- rucio/gateway/config.py +63 -75
- rucio/gateway/did.py +245 -329
- rucio/gateway/dirac.py +33 -34
- rucio/gateway/exporter.py +27 -30
- rucio/gateway/importer.py +12 -14
- rucio/gateway/lifetime_exception.py +16 -24
- rucio/gateway/lock.py +27 -40
- rucio/gateway/replica.py +334 -249
- rucio/gateway/request.py +176 -103
- rucio/gateway/rse.py +191 -218
- rucio/gateway/rule.py +115 -146
- rucio/gateway/scope.py +18 -25
- rucio/gateway/subscription.py +90 -108
- rucio/gateway/trace.py +48 -0
- rucio/vcsversion.py +3 -3
- rucio/web/rest/flaskapi/v1/accounts.py +2 -2
- rucio/web/rest/flaskapi/v1/auth.py +15 -0
- rucio/web/rest/flaskapi/v1/common.py +3 -0
- rucio/web/rest/flaskapi/v1/config.py +7 -7
- rucio/web/rest/flaskapi/v1/dids.py +55 -55
- rucio/web/rest/flaskapi/v1/dirac.py +2 -2
- rucio/web/rest/flaskapi/v1/export.py +1 -1
- rucio/web/rest/flaskapi/v1/import.py +1 -1
- rucio/web/rest/flaskapi/v1/lifetime_exceptions.py +5 -5
- rucio/web/rest/flaskapi/v1/locks.py +4 -4
- rucio/web/rest/flaskapi/v1/main.py +17 -10
- rucio/web/rest/flaskapi/v1/redirect.py +1 -1
- rucio/web/rest/flaskapi/v1/replicas.py +30 -29
- rucio/web/rest/flaskapi/v1/requests.py +211 -20
- rucio/web/rest/flaskapi/v1/rses.py +37 -37
- rucio/web/rest/flaskapi/v1/rules.py +15 -15
- rucio/web/rest/flaskapi/v1/scopes.py +3 -3
- rucio/web/rest/flaskapi/v1/subscriptions.py +9 -9
- rucio/web/rest/flaskapi/v1/traces.py +75 -77
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/rucio.cfg.template +0 -1
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/rucio_multi_vo.cfg.template +0 -1
- {rucio-37.2.0.dist-info → rucio-37.4.0.dist-info}/METADATA +1 -1
- {rucio-37.2.0.dist-info → rucio-37.4.0.dist-info}/RECORD +127 -126
- {rucio-37.2.0.dist-info → rucio-37.4.0.dist-info}/WHEEL +1 -1
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/alembic.ini.template +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/alembic_offline.ini.template +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/globus-config.yml.template +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/ldap.cfg.template +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/mail_templates/rule_approval_request.tmpl +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/mail_templates/rule_approved_admin.tmpl +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/mail_templates/rule_approved_user.tmpl +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/mail_templates/rule_denied_admin.tmpl +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/mail_templates/rule_denied_user.tmpl +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/mail_templates/rule_ok_notification.tmpl +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/rse-accounts.cfg.template +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/etc/rucio.cfg.atlas.client.template +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/requirements.server.txt +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/tools/bootstrap.py +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/tools/merge_rucio_configs.py +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/data/rucio/tools/reset_database.py +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-abacus-account +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-abacus-collection-replica +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-abacus-rse +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-admin +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-atropos +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-auditor +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-automatix +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-bb8 +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-cache-client +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-cache-consumer +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-conveyor-finisher +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-conveyor-poller +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-conveyor-preparer +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-conveyor-receiver +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-conveyor-stager +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-conveyor-submitter +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-conveyor-throttler +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-dark-reaper +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-dumper +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-follower +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-hermes +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-judge-cleaner +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-judge-evaluator +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-judge-injector +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-judge-repairer +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-kronos +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-minos +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-minos-temporary-expiration +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-necromancer +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-oauth-manager +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-reaper +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-replica-recoverer +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-rse-decommissioner +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-storage-consistency-actions +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-transmogrifier +0 -0
- {rucio-37.2.0.data → rucio-37.4.0.data}/scripts/rucio-undertaker +0 -0
- {rucio-37.2.0.dist-info → rucio-37.4.0.dist-info}/licenses/AUTHORS.rst +0 -0
- {rucio-37.2.0.dist-info → rucio-37.4.0.dist-info}/licenses/LICENSE +0 -0
- {rucio-37.2.0.dist-info → rucio-37.4.0.dist-info}/top_level.txt +0 -0
|
@@ -178,7 +178,7 @@ class RSEs(ErrorHandlingMethodView):
|
|
|
178
178
|
for rse in parse_rse_expression(expression, vo=vo):
|
|
179
179
|
yield render_json(rse=rse) + '\n'
|
|
180
180
|
|
|
181
|
-
return try_stream(generate(vo=request.environ
|
|
181
|
+
return try_stream(generate(vo=request.environ['vo']))
|
|
182
182
|
except (InvalidRSEExpression, InvalidObject) as error:
|
|
183
183
|
return generate_http_error_flask(400, error)
|
|
184
184
|
else:
|
|
@@ -187,7 +187,7 @@ class RSEs(ErrorHandlingMethodView):
|
|
|
187
187
|
rse['availability'] = Availability(rse['availability_read'], rse['availability_write'], rse['availability_delete']).integer
|
|
188
188
|
yield render_json(**rse) + '\n'
|
|
189
189
|
|
|
190
|
-
return try_stream(generate(vo=request.environ
|
|
190
|
+
return try_stream(generate(vo=request.environ['vo']))
|
|
191
191
|
|
|
192
192
|
|
|
193
193
|
class RSE(ErrorHandlingMethodView):
|
|
@@ -316,8 +316,8 @@ class RSE(ErrorHandlingMethodView):
|
|
|
316
316
|
for keyword in kwargs.keys():
|
|
317
317
|
kwargs[keyword] = param_get(parameters, keyword, default=kwargs[keyword])
|
|
318
318
|
|
|
319
|
-
kwargs['issuer'] = request.environ
|
|
320
|
-
kwargs['vo'] = request.environ
|
|
319
|
+
kwargs['issuer'] = request.environ['issuer']
|
|
320
|
+
kwargs['vo'] = request.environ['vo']
|
|
321
321
|
try:
|
|
322
322
|
add_rse(rse, **kwargs)
|
|
323
323
|
except InvalidObject as error:
|
|
@@ -408,8 +408,8 @@ class RSE(ErrorHandlingMethodView):
|
|
|
408
408
|
"""
|
|
409
409
|
kwargs = {
|
|
410
410
|
'parameters': json_parameters(optional=True),
|
|
411
|
-
'issuer': request.environ
|
|
412
|
-
'vo': request.environ
|
|
411
|
+
'issuer': request.environ['issuer'],
|
|
412
|
+
'vo': request.environ['vo'],
|
|
413
413
|
}
|
|
414
414
|
try:
|
|
415
415
|
update_rse(rse, **kwargs)
|
|
@@ -508,7 +508,7 @@ class RSE(ErrorHandlingMethodView):
|
|
|
508
508
|
description: Not acceptable
|
|
509
509
|
"""
|
|
510
510
|
try:
|
|
511
|
-
rse = get_rse(rse=rse, vo=request.environ
|
|
511
|
+
rse = get_rse(rse=rse, vo=request.environ['vo'])
|
|
512
512
|
rse['availability'] = Availability(rse['availability_read'], rse['availability_write'], rse['availability_delete']).integer
|
|
513
513
|
return Response(render_json(**rse), content_type="application/json")
|
|
514
514
|
except RSENotFound as error:
|
|
@@ -537,7 +537,7 @@ class RSE(ErrorHandlingMethodView):
|
|
|
537
537
|
description: RSE not found
|
|
538
538
|
"""
|
|
539
539
|
try:
|
|
540
|
-
del_rse(rse=rse, issuer=request.environ
|
|
540
|
+
del_rse(rse=rse, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
541
541
|
except (RSENotFound, RSEOperationNotSupported, CounterNotFound) as error:
|
|
542
542
|
return generate_http_error_flask(404, error)
|
|
543
543
|
except AccessDenied as error:
|
|
@@ -600,7 +600,7 @@ class Attributes(ErrorHandlingMethodView):
|
|
|
600
600
|
parameters = json_parameters()
|
|
601
601
|
value = param_get(parameters, 'value')
|
|
602
602
|
try:
|
|
603
|
-
add_rse_attribute(rse=rse, key=key, value=value, issuer=request.environ
|
|
603
|
+
add_rse_attribute(rse=rse, key=key, value=value, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
604
604
|
except AccessDenied as error:
|
|
605
605
|
return generate_http_error_flask(401, error)
|
|
606
606
|
except Duplicate as error:
|
|
@@ -643,7 +643,7 @@ class Attributes(ErrorHandlingMethodView):
|
|
|
643
643
|
description: Not acceptable
|
|
644
644
|
"""
|
|
645
645
|
try:
|
|
646
|
-
rse_attr = list_rse_attributes(rse, vo=request.environ
|
|
646
|
+
rse_attr = list_rse_attributes(rse, vo=request.environ['vo'])
|
|
647
647
|
except AccessDenied as error:
|
|
648
648
|
return generate_http_error_flask(401, error)
|
|
649
649
|
except RSENotFound as error:
|
|
@@ -680,7 +680,7 @@ class Attributes(ErrorHandlingMethodView):
|
|
|
680
680
|
description: RSE or RSE attribute not found
|
|
681
681
|
"""
|
|
682
682
|
try:
|
|
683
|
-
del_rse_attribute(rse=rse, key=key, issuer=request.environ
|
|
683
|
+
del_rse_attribute(rse=rse, key=key, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
684
684
|
except AccessDenied as error:
|
|
685
685
|
return generate_http_error_flask(401, error)
|
|
686
686
|
except (RSENotFound, RSEAttributeNotFound) as error:
|
|
@@ -831,7 +831,7 @@ class ProtocolList(ErrorHandlingMethodView):
|
|
|
831
831
|
description: Not acceptable
|
|
832
832
|
"""
|
|
833
833
|
try:
|
|
834
|
-
p_list = get_rse_protocols(rse, issuer=request.environ
|
|
834
|
+
p_list = get_rse_protocols(rse, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
835
835
|
except (RSEOperationNotSupported, RSENotFound, RSEProtocolNotSupported, RSEProtocolDomainNotSupported) as error:
|
|
836
836
|
return generate_http_error_flask(404, error)
|
|
837
837
|
|
|
@@ -909,7 +909,7 @@ class LFNS2PFNS(ErrorHandlingMethodView):
|
|
|
909
909
|
operation = request.args.get('operation', default='write')
|
|
910
910
|
|
|
911
911
|
try:
|
|
912
|
-
rse_settings = get_rse_protocols(rse, issuer=request.environ
|
|
912
|
+
rse_settings = get_rse_protocols(rse, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
913
913
|
except (RSENotFound, RSEProtocolNotSupported, RSEProtocolDomainNotSupported) as error:
|
|
914
914
|
return generate_http_error_flask(404, error)
|
|
915
915
|
|
|
@@ -1009,7 +1009,7 @@ class Protocol(ErrorHandlingMethodView):
|
|
|
1009
1009
|
parameters['scheme'] = scheme
|
|
1010
1010
|
|
|
1011
1011
|
try:
|
|
1012
|
-
add_protocol(rse, issuer=request.environ
|
|
1012
|
+
add_protocol(rse, issuer=request.environ['issuer'], vo=request.environ['vo'], data=parameters)
|
|
1013
1013
|
except (RSENotFound, RSEProtocolDomainNotSupported) as error:
|
|
1014
1014
|
return generate_http_error_flask(404, error)
|
|
1015
1015
|
except AccessDenied as error:
|
|
@@ -1167,7 +1167,7 @@ class Protocol(ErrorHandlingMethodView):
|
|
|
1167
1167
|
description: Not acceptable
|
|
1168
1168
|
"""
|
|
1169
1169
|
try:
|
|
1170
|
-
p_list = get_rse_protocols(rse, issuer=request.environ
|
|
1170
|
+
p_list = get_rse_protocols(rse, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
1171
1171
|
except (RSENotFound, RSEProtocolNotSupported, RSEProtocolDomainNotSupported) as error:
|
|
1172
1172
|
return generate_http_error_flask(404, error)
|
|
1173
1173
|
|
|
@@ -1334,8 +1334,8 @@ class Protocol(ErrorHandlingMethodView):
|
|
|
1334
1334
|
try:
|
|
1335
1335
|
update_protocols(
|
|
1336
1336
|
rse,
|
|
1337
|
-
issuer=request.environ
|
|
1338
|
-
vo=request.environ
|
|
1337
|
+
issuer=request.environ['issuer'],
|
|
1338
|
+
vo=request.environ['vo'],
|
|
1339
1339
|
scheme=scheme,
|
|
1340
1340
|
hostname=hostname,
|
|
1341
1341
|
port=int(port) if port else None,
|
|
@@ -1395,8 +1395,8 @@ class Protocol(ErrorHandlingMethodView):
|
|
|
1395
1395
|
try:
|
|
1396
1396
|
del_protocols(
|
|
1397
1397
|
rse,
|
|
1398
|
-
issuer=request.environ
|
|
1399
|
-
vo=request.environ
|
|
1398
|
+
issuer=request.environ['issuer'],
|
|
1399
|
+
vo=request.environ['vo'],
|
|
1400
1400
|
scheme=scheme,
|
|
1401
1401
|
hostname=hostname,
|
|
1402
1402
|
port=int(port) if port else None
|
|
@@ -1485,10 +1485,10 @@ class Usage(ErrorHandlingMethodView):
|
|
|
1485
1485
|
|
|
1486
1486
|
return try_stream(
|
|
1487
1487
|
generate(
|
|
1488
|
-
issuer=request.environ
|
|
1488
|
+
issuer=request.environ['issuer'],
|
|
1489
1489
|
source=request.args.get('source'),
|
|
1490
1490
|
per_account=per_account,
|
|
1491
|
-
vo=request.environ
|
|
1491
|
+
vo=request.environ['vo'],
|
|
1492
1492
|
)
|
|
1493
1493
|
)
|
|
1494
1494
|
except RSENotFound as error:
|
|
@@ -1544,7 +1544,7 @@ class Usage(ErrorHandlingMethodView):
|
|
|
1544
1544
|
kwargs[keyword] = param_get(parameters, keyword, default=kwargs[keyword])
|
|
1545
1545
|
|
|
1546
1546
|
try:
|
|
1547
|
-
set_rse_usage(rse=rse, issuer=request.environ
|
|
1547
|
+
set_rse_usage(rse=rse, issuer=request.environ['issuer'], vo=request.environ['vo'], **kwargs)
|
|
1548
1548
|
except AccessDenied as error:
|
|
1549
1549
|
return generate_http_error_flask(401, error)
|
|
1550
1550
|
except RSENotFound as error:
|
|
@@ -1615,7 +1615,7 @@ class UsageHistory(ErrorHandlingMethodView):
|
|
|
1615
1615
|
for usage in list_rse_usage_history(rse=rse, issuer=issuer, source=source, vo=vo):
|
|
1616
1616
|
yield render_json(**usage) + '\n'
|
|
1617
1617
|
|
|
1618
|
-
return try_stream(generate(issuer=request.environ
|
|
1618
|
+
return try_stream(generate(issuer=request.environ['issuer'], source=request.args.get('source'), vo=request.environ['vo']))
|
|
1619
1619
|
except RSENotFound as error:
|
|
1620
1620
|
return generate_http_error_flask(404, error)
|
|
1621
1621
|
|
|
@@ -1658,7 +1658,7 @@ class Limits(ErrorHandlingMethodView):
|
|
|
1658
1658
|
description: Not acceptable
|
|
1659
1659
|
"""
|
|
1660
1660
|
try:
|
|
1661
|
-
limits = get_rse_limits(rse=rse, issuer=request.environ
|
|
1661
|
+
limits = get_rse_limits(rse=rse, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
1662
1662
|
return Response(render_json(**limits), content_type="application/json")
|
|
1663
1663
|
except RSENotFound as error:
|
|
1664
1664
|
return generate_http_error_flask(404, error)
|
|
@@ -1705,7 +1705,7 @@ class Limits(ErrorHandlingMethodView):
|
|
|
1705
1705
|
kwargs[keyword] = param_get(parameters, keyword, default=kwargs[keyword])
|
|
1706
1706
|
|
|
1707
1707
|
try:
|
|
1708
|
-
set_rse_limits(rse=rse, issuer=request.environ
|
|
1708
|
+
set_rse_limits(rse=rse, issuer=request.environ['issuer'], vo=request.environ['vo'], **kwargs)
|
|
1709
1709
|
except AccessDenied as error:
|
|
1710
1710
|
return generate_http_error_flask(401, error)
|
|
1711
1711
|
except RSENotFound as error:
|
|
@@ -1752,7 +1752,7 @@ class Limits(ErrorHandlingMethodView):
|
|
|
1752
1752
|
name = param_get(parameters, 'name')
|
|
1753
1753
|
|
|
1754
1754
|
try:
|
|
1755
|
-
delete_rse_limits(rse=rse, name=name, issuer=request.environ
|
|
1755
|
+
delete_rse_limits(rse=rse, name=name, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
1756
1756
|
except AccessDenied as error:
|
|
1757
1757
|
return generate_http_error_flask(401, error)
|
|
1758
1758
|
except RSENotFound as error:
|
|
@@ -1820,7 +1820,7 @@ class RSEAccountUsageLimit(ErrorHandlingMethodView):
|
|
|
1820
1820
|
for usage in get_rse_account_usage(rse=rse, vo=vo):
|
|
1821
1821
|
yield render_json(**usage) + '\n'
|
|
1822
1822
|
|
|
1823
|
-
return try_stream(generate(vo=request.environ
|
|
1823
|
+
return try_stream(generate(vo=request.environ['vo']), content_type='application/json')
|
|
1824
1824
|
except RSENotFound as error:
|
|
1825
1825
|
return generate_http_error_flask(404, error)
|
|
1826
1826
|
|
|
@@ -1882,7 +1882,7 @@ class Distance(ErrorHandlingMethodView):
|
|
|
1882
1882
|
description: Not acceptable
|
|
1883
1883
|
"""
|
|
1884
1884
|
try:
|
|
1885
|
-
distance = get_distance(source=source, destination=destination, issuer=request.environ
|
|
1885
|
+
distance = get_distance(source=source, destination=destination, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
1886
1886
|
return Response(dumps(distance, cls=APIEncoder), content_type="application/json")
|
|
1887
1887
|
except RSENotFound as error:
|
|
1888
1888
|
return generate_http_error_flask(404, error)
|
|
@@ -1946,8 +1946,8 @@ class Distance(ErrorHandlingMethodView):
|
|
|
1946
1946
|
source=source,
|
|
1947
1947
|
destination=destination,
|
|
1948
1948
|
distance=distance,
|
|
1949
|
-
issuer=request.environ
|
|
1950
|
-
vo=request.environ
|
|
1949
|
+
issuer=request.environ['issuer'],
|
|
1950
|
+
vo=request.environ['vo'],
|
|
1951
1951
|
)
|
|
1952
1952
|
except AccessDenied as error:
|
|
1953
1953
|
return generate_http_error_flask(401, error)
|
|
@@ -2017,8 +2017,8 @@ class Distance(ErrorHandlingMethodView):
|
|
|
2017
2017
|
source=source,
|
|
2018
2018
|
destination=destination,
|
|
2019
2019
|
distance=distance,
|
|
2020
|
-
issuer=request.environ
|
|
2021
|
-
vo=request.environ
|
|
2020
|
+
issuer=request.environ['issuer'],
|
|
2021
|
+
vo=request.environ['vo'],
|
|
2022
2022
|
)
|
|
2023
2023
|
except AccessDenied as error:
|
|
2024
2024
|
return generate_http_error_flask(401, error)
|
|
@@ -2066,8 +2066,8 @@ class Distance(ErrorHandlingMethodView):
|
|
|
2066
2066
|
delete_distance(
|
|
2067
2067
|
source=source,
|
|
2068
2068
|
destination=destination,
|
|
2069
|
-
issuer=request.environ
|
|
2070
|
-
vo=request.environ
|
|
2069
|
+
issuer=request.environ['issuer'],
|
|
2070
|
+
vo=request.environ['vo']
|
|
2071
2071
|
)
|
|
2072
2072
|
except AccessDenied as error:
|
|
2073
2073
|
return generate_http_error_flask(401, error)
|
|
@@ -2117,7 +2117,7 @@ class QoSPolicy(ErrorHandlingMethodView):
|
|
|
2117
2117
|
description: Not acceptable
|
|
2118
2118
|
"""
|
|
2119
2119
|
try:
|
|
2120
|
-
add_qos_policy(rse=rse, qos_policy=policy, issuer=request.environ
|
|
2120
|
+
add_qos_policy(rse=rse, qos_policy=policy, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
2121
2121
|
except RSENotFound as error:
|
|
2122
2122
|
return generate_http_error_flask(404, error)
|
|
2123
2123
|
|
|
@@ -2155,7 +2155,7 @@ class QoSPolicy(ErrorHandlingMethodView):
|
|
|
2155
2155
|
description: Not acceptable
|
|
2156
2156
|
"""
|
|
2157
2157
|
try:
|
|
2158
|
-
delete_qos_policy(rse=rse, qos_policy=policy, issuer=request.environ
|
|
2158
|
+
delete_qos_policy(rse=rse, qos_policy=policy, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
2159
2159
|
except RSENotFound as error:
|
|
2160
2160
|
return generate_http_error_flask(404, error)
|
|
2161
2161
|
|
|
@@ -2201,7 +2201,7 @@ class QoSPolicy(ErrorHandlingMethodView):
|
|
|
2201
2201
|
description: Not acceptable
|
|
2202
2202
|
"""
|
|
2203
2203
|
try:
|
|
2204
|
-
qos_policies = list_qos_policies(rse=rse, issuer=request.environ
|
|
2204
|
+
qos_policies = list_qos_policies(rse=rse, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
2205
2205
|
return Response(dumps(qos_policies, cls=APIEncoder), content_type='application/json')
|
|
2206
2206
|
except RSENotFound as error:
|
|
2207
2207
|
return generate_http_error_flask(404, error)
|
|
@@ -92,7 +92,7 @@ class Rule(ErrorHandlingMethodView):
|
|
|
92
92
|
return generate_http_error_flask(501, "NotImplemented", exc_msg="estimate_ttc is not implemented!")
|
|
93
93
|
|
|
94
94
|
try:
|
|
95
|
-
rule = get_replication_rule(rule_id, issuer=request.environ
|
|
95
|
+
rule = get_replication_rule(rule_id, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
96
96
|
except RuleNotFound as error:
|
|
97
97
|
return generate_http_error_flask(404, error)
|
|
98
98
|
|
|
@@ -177,7 +177,7 @@ class Rule(ErrorHandlingMethodView):
|
|
|
177
177
|
parameters = json_parameters()
|
|
178
178
|
options: dict[str, Any] = param_get(parameters, 'options')
|
|
179
179
|
try:
|
|
180
|
-
update_replication_rule(rule_id=rule_id, options=options, issuer=request.environ
|
|
180
|
+
update_replication_rule(rule_id=rule_id, options=options, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
181
181
|
except AccessDenied as error:
|
|
182
182
|
return generate_http_error_flask(401, error)
|
|
183
183
|
except (RuleNotFound, AccountNotFound) as error:
|
|
@@ -212,7 +212,7 @@ class Rule(ErrorHandlingMethodView):
|
|
|
212
212
|
parameters = json_parameters()
|
|
213
213
|
purge_replicas = param_get(parameters, 'purge_replicas', default=None)
|
|
214
214
|
try:
|
|
215
|
-
delete_replication_rule(rule_id=rule_id, purge_replicas=purge_replicas, issuer=request.environ
|
|
215
|
+
delete_replication_rule(rule_id=rule_id, purge_replicas=purge_replicas, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
216
216
|
except (AccessDenied, UnsupportedOperation) as error:
|
|
217
217
|
return generate_http_error_flask(401, error)
|
|
218
218
|
except RuleNotFound as error:
|
|
@@ -250,7 +250,7 @@ class AllRule(ErrorHandlingMethodView):
|
|
|
250
250
|
for rule in list_replication_rules(filters=filters, vo=vo):
|
|
251
251
|
yield dumps(rule, cls=APIEncoder) + '\n'
|
|
252
252
|
|
|
253
|
-
return try_stream(generate(filters=dict(request.args.items(multi=False)), vo=request.environ
|
|
253
|
+
return try_stream(generate(filters=dict(request.args.items(multi=False)), vo=request.environ['vo']))
|
|
254
254
|
except RuleNotFound as error:
|
|
255
255
|
return generate_http_error_flask(404, error)
|
|
256
256
|
|
|
@@ -397,8 +397,8 @@ class AllRule(ErrorHandlingMethodView):
|
|
|
397
397
|
priority=param_get(parameters, 'priority', default=3),
|
|
398
398
|
split_container=param_get(parameters, 'split_container', default=False),
|
|
399
399
|
meta=param_get(parameters, 'meta', default=None),
|
|
400
|
-
issuer=request.environ
|
|
401
|
-
vo=request.environ
|
|
400
|
+
issuer=request.environ['issuer'],
|
|
401
|
+
vo=request.environ['vo'],
|
|
402
402
|
)
|
|
403
403
|
except (
|
|
404
404
|
InvalidReplicationRule,
|
|
@@ -477,7 +477,7 @@ class ReplicaLocks(ErrorHandlingMethodView):
|
|
|
477
477
|
for lock in get_replica_locks_for_rule_id(rule_id, vo=vo):
|
|
478
478
|
yield render_json(**lock) + '\n'
|
|
479
479
|
|
|
480
|
-
return try_stream(generate(vo=request.environ
|
|
480
|
+
return try_stream(generate(vo=request.environ['vo']))
|
|
481
481
|
|
|
482
482
|
|
|
483
483
|
class ReduceRule(ErrorHandlingMethodView):
|
|
@@ -531,8 +531,8 @@ class ReduceRule(ErrorHandlingMethodView):
|
|
|
531
531
|
rule_ids = reduce_replication_rule(rule_id=rule_id,
|
|
532
532
|
copies=copies,
|
|
533
533
|
exclude_expression=exclude_expression,
|
|
534
|
-
issuer=request.environ
|
|
535
|
-
vo=request.environ
|
|
534
|
+
issuer=request.environ['issuer'],
|
|
535
|
+
vo=request.environ['vo'])
|
|
536
536
|
# TODO: Add all other error cases here
|
|
537
537
|
except RuleReplaceFailed as error:
|
|
538
538
|
return generate_http_error_flask(409, error)
|
|
@@ -612,8 +612,8 @@ class MoveRule(ErrorHandlingMethodView):
|
|
|
612
612
|
rule_ids = move_replication_rule(rule_id=rule_id,
|
|
613
613
|
rse_expression=rse_expression,
|
|
614
614
|
override=override,
|
|
615
|
-
issuer=request.environ
|
|
616
|
-
vo=request.environ
|
|
615
|
+
issuer=request.environ['issuer'],
|
|
616
|
+
vo=request.environ['vo'])
|
|
617
617
|
except RuleReplaceFailed as error:
|
|
618
618
|
return generate_http_error_flask(409, error)
|
|
619
619
|
except RuleNotFound as error:
|
|
@@ -676,7 +676,7 @@ class RuleHistory(ErrorHandlingMethodView):
|
|
|
676
676
|
for history in list_replication_rule_history(rule_id, issuer=issuer, vo=vo):
|
|
677
677
|
yield render_json(**history) + '\n'
|
|
678
678
|
|
|
679
|
-
return try_stream(generate(issuer=request.environ
|
|
679
|
+
return try_stream(generate(issuer=request.environ['issuer'], vo=request.environ['vo']))
|
|
680
680
|
|
|
681
681
|
|
|
682
682
|
class RuleHistoryFull(ErrorHandlingMethodView):
|
|
@@ -740,13 +740,13 @@ class RuleHistoryFull(ErrorHandlingMethodView):
|
|
|
740
740
|
description: Not acceptable.
|
|
741
741
|
"""
|
|
742
742
|
try:
|
|
743
|
-
scope, name = parse_scope_name(scope_name, request.environ
|
|
743
|
+
scope, name = parse_scope_name(scope_name, request.environ['vo'])
|
|
744
744
|
|
|
745
745
|
def generate(vo):
|
|
746
746
|
for history in list_replication_rule_full_history(scope, name, vo=vo):
|
|
747
747
|
yield render_json(**history) + '\n'
|
|
748
748
|
|
|
749
|
-
return try_stream(generate(vo=request.environ
|
|
749
|
+
return try_stream(generate(vo=request.environ['vo']))
|
|
750
750
|
except ValueError as error:
|
|
751
751
|
return generate_http_error_flask(400, error)
|
|
752
752
|
|
|
@@ -819,7 +819,7 @@ class RuleAnalysis(ErrorHandlingMethodView):
|
|
|
819
819
|
406:
|
|
820
820
|
description: Not acceptable.
|
|
821
821
|
"""
|
|
822
|
-
analysis = examine_replication_rule(rule_id, issuer=request.environ
|
|
822
|
+
analysis = examine_replication_rule(rule_id, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
823
823
|
return Response(render_json(**analysis), content_type='application/json')
|
|
824
824
|
|
|
825
825
|
|
|
@@ -46,7 +46,7 @@ class Scope(ErrorHandlingMethodView):
|
|
|
46
46
|
406:
|
|
47
47
|
description: Not acceptable
|
|
48
48
|
"""
|
|
49
|
-
return jsonify(list_scopes(vo=request.environ
|
|
49
|
+
return jsonify(list_scopes(vo=request.environ['vo']))
|
|
50
50
|
|
|
51
51
|
def post(self, account, scope):
|
|
52
52
|
"""
|
|
@@ -84,7 +84,7 @@ class Scope(ErrorHandlingMethodView):
|
|
|
84
84
|
description: Scope already exists
|
|
85
85
|
"""
|
|
86
86
|
try:
|
|
87
|
-
add_scope(scope, account, issuer=request.environ
|
|
87
|
+
add_scope(scope, account, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
88
88
|
except Duplicate as error:
|
|
89
89
|
return generate_http_error_flask(409, error)
|
|
90
90
|
except AccountNotFound as error:
|
|
@@ -129,7 +129,7 @@ class AccountScopeList(ErrorHandlingMethodView):
|
|
|
129
129
|
description: Not acceptable
|
|
130
130
|
"""
|
|
131
131
|
try:
|
|
132
|
-
scopes = get_scopes(account, vo=request.environ
|
|
132
|
+
scopes = get_scopes(account, vo=request.environ['vo'])
|
|
133
133
|
except AccountNotFound as error:
|
|
134
134
|
return generate_http_error_flask(404, error)
|
|
135
135
|
|
|
@@ -112,7 +112,7 @@ class Subscription(ErrorHandlingMethodView):
|
|
|
112
112
|
for subscription in list_subscriptions(name=name, account=account, vo=vo):
|
|
113
113
|
yield render_json(**subscription) + '\n'
|
|
114
114
|
|
|
115
|
-
return try_stream(generate(vo=request.environ
|
|
115
|
+
return try_stream(generate(vo=request.environ['vo']))
|
|
116
116
|
except SubscriptionNotFound as error:
|
|
117
117
|
return generate_http_error_flask(404, error)
|
|
118
118
|
|
|
@@ -193,7 +193,7 @@ class Subscription(ErrorHandlingMethodView):
|
|
|
193
193
|
metadata[keyword] = param_get(options, keyword, default=metadata[keyword])
|
|
194
194
|
|
|
195
195
|
try:
|
|
196
|
-
update_subscription(name=name, account=account, metadata=metadata, issuer=request.environ
|
|
196
|
+
update_subscription(name=name, account=account, metadata=metadata, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
197
197
|
except (InvalidObject, TypeError) as error:
|
|
198
198
|
return generate_http_error_flask(400, InvalidObject.__name__, error.args[0])
|
|
199
199
|
except AccessDenied as error:
|
|
@@ -306,8 +306,8 @@ class Subscription(ErrorHandlingMethodView):
|
|
|
306
306
|
retroactive=retroactive,
|
|
307
307
|
dry_run=dry_run,
|
|
308
308
|
priority=priority,
|
|
309
|
-
issuer=request.environ
|
|
310
|
-
vo=request.environ
|
|
309
|
+
issuer=request.environ['issuer'],
|
|
310
|
+
vo=request.environ['vo'],
|
|
311
311
|
)
|
|
312
312
|
except (InvalidObject, TypeError) as error:
|
|
313
313
|
return generate_http_error_flask(400, InvalidObject.__name__, error.args[0])
|
|
@@ -400,7 +400,7 @@ class SubscriptionName(ErrorHandlingMethodView):
|
|
|
400
400
|
for subscription in list_subscriptions(name=name, vo=vo):
|
|
401
401
|
yield render_json(**subscription) + '\n'
|
|
402
402
|
|
|
403
|
-
return try_stream(generate(vo=request.environ
|
|
403
|
+
return try_stream(generate(vo=request.environ['vo']))
|
|
404
404
|
except SubscriptionNotFound as error:
|
|
405
405
|
return generate_http_error_flask(404, error)
|
|
406
406
|
|
|
@@ -454,7 +454,7 @@ class Rules(ErrorHandlingMethodView):
|
|
|
454
454
|
"""
|
|
455
455
|
state = request.args.get('state', default=None)
|
|
456
456
|
try:
|
|
457
|
-
subscriptions = [subscription['id'] for subscription in list_subscriptions(name=name, account=account, vo=request.environ
|
|
457
|
+
subscriptions = [subscription['id'] for subscription in list_subscriptions(name=name, account=account, vo=request.environ['vo'])]
|
|
458
458
|
|
|
459
459
|
def generate(vo):
|
|
460
460
|
if len(subscriptions) > 0:
|
|
@@ -465,7 +465,7 @@ class Rules(ErrorHandlingMethodView):
|
|
|
465
465
|
for rule in list_replication_rules({'subscription_id': subscriptions[0]}, vo=vo):
|
|
466
466
|
yield render_json(**rule) + '\n'
|
|
467
467
|
|
|
468
|
-
return try_stream(generate(vo=request.environ
|
|
468
|
+
return try_stream(generate(vo=request.environ['vo']))
|
|
469
469
|
except (RuleNotFound, SubscriptionNotFound) as error:
|
|
470
470
|
return generate_http_error_flask(404, error)
|
|
471
471
|
|
|
@@ -529,7 +529,7 @@ class States(ErrorHandlingMethodView):
|
|
|
529
529
|
for row in list_subscription_rule_states(name=name, account=account, vo=vo):
|
|
530
530
|
yield dumps(row, cls=APIEncoder) + '\n'
|
|
531
531
|
|
|
532
|
-
return try_stream(generate(vo=request.environ
|
|
532
|
+
return try_stream(generate(vo=request.environ['vo']))
|
|
533
533
|
|
|
534
534
|
|
|
535
535
|
class SubscriptionId(ErrorHandlingMethodView):
|
|
@@ -607,7 +607,7 @@ class SubscriptionId(ErrorHandlingMethodView):
|
|
|
607
607
|
description: Not acceptable
|
|
608
608
|
"""
|
|
609
609
|
try:
|
|
610
|
-
subscription = get_subscription_by_id(subscription_id, vo=request.environ
|
|
610
|
+
subscription = get_subscription_by_id(subscription_id, vo=request.environ['vo'])
|
|
611
611
|
except SubscriptionNotFound as error:
|
|
612
612
|
return generate_http_error_flask(404, error)
|
|
613
613
|
|