rucio 38.3.0__py3-none-any.whl → 38.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/did.py +1 -1
- rucio/cli/opendata.py +19 -2
- rucio/client/accountclient.py +20 -19
- rucio/client/accountlimitclient.py +5 -4
- rucio/client/baseclient.py +25 -25
- rucio/client/configclient.py +7 -6
- rucio/client/credentialclient.py +2 -1
- rucio/client/didclient.py +33 -32
- rucio/client/diracclient.py +2 -1
- rucio/client/exportclient.py +2 -1
- rucio/client/importclient.py +2 -1
- rucio/client/lifetimeclient.py +3 -2
- rucio/client/lockclient.py +4 -3
- rucio/client/metaconventionsclient.py +5 -4
- rucio/client/opendataclient.py +8 -7
- rucio/client/pingclient.py +2 -1
- rucio/client/replicaclient.py +27 -26
- rucio/client/requestclient.py +8 -8
- rucio/client/rseclient.py +31 -28
- rucio/client/ruleclient.py +13 -12
- rucio/client/scopeclient.py +4 -3
- rucio/client/subscriptionclient.py +6 -5
- rucio/common/constants.py +18 -0
- rucio/common/exception.py +20 -0
- rucio/common/plugins.py +9 -7
- rucio/core/credential.py +19 -26
- rucio/core/did.py +1 -1
- rucio/core/opendata.py +150 -8
- rucio/core/rule_grouping.py +3 -3
- rucio/gateway/account.py +8 -7
- rucio/gateway/opendata.py +2 -2
- rucio/gateway/request.py +2 -117
- rucio/rse/protocols/webdav.py +5 -2
- rucio/transfertool/fts3.py +0 -19
- rucio/vcsversion.py +3 -3
- rucio/web/rest/flaskapi/v1/accountlimits.py +4 -3
- rucio/web/rest/flaskapi/v1/accounts.py +26 -25
- rucio/web/rest/flaskapi/v1/archives.py +2 -2
- rucio/web/rest/flaskapi/v1/auth.py +15 -14
- rucio/web/rest/flaskapi/v1/common.py +4 -4
- rucio/web/rest/flaskapi/v1/config.py +6 -4
- rucio/web/rest/flaskapi/v1/credentials.py +3 -3
- rucio/web/rest/flaskapi/v1/dids.py +25 -24
- rucio/web/rest/flaskapi/v1/dirac.py +3 -2
- rucio/web/rest/flaskapi/v1/export.py +4 -2
- rucio/web/rest/flaskapi/v1/heartbeats.py +2 -1
- rucio/web/rest/flaskapi/v1/identities.py +5 -4
- rucio/web/rest/flaskapi/v1/import.py +3 -2
- rucio/web/rest/flaskapi/v1/lifetime_exceptions.py +3 -2
- rucio/web/rest/flaskapi/v1/locks.py +4 -3
- rucio/web/rest/flaskapi/v1/meta_conventions.py +4 -3
- rucio/web/rest/flaskapi/v1/metrics.py +2 -1
- rucio/web/rest/flaskapi/v1/nongrid_traces.py +2 -1
- rucio/web/rest/flaskapi/v1/opendata.py +7 -6
- rucio/web/rest/flaskapi/v1/opendata_public.py +6 -5
- rucio/web/rest/flaskapi/v1/ping.py +3 -2
- rucio/web/rest/flaskapi/v1/redirect.py +4 -3
- rucio/web/rest/flaskapi/v1/replicas.py +31 -31
- rucio/web/rest/flaskapi/v1/requests.py +7 -7
- rucio/web/rest/flaskapi/v1/rses.py +23 -16
- rucio/web/rest/flaskapi/v1/rules.py +9 -8
- rucio/web/rest/flaskapi/v1/scopes.py +4 -3
- rucio/web/rest/flaskapi/v1/subscriptions.py +9 -8
- rucio/web/rest/flaskapi/v1/traces.py +2 -1
- rucio/web/rest/flaskapi/v1/vos.py +4 -3
- {rucio-38.3.0.dist-info → rucio-38.4.0.dist-info}/METADATA +1 -1
- {rucio-38.3.0.dist-info → rucio-38.4.0.dist-info}/RECORD +126 -126
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/alembic.ini.template +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/alembic_offline.ini.template +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/globus-config.yml.template +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/ldap.cfg.template +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_approval_request.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_approved_admin.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_approved_user.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_denied_admin.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_denied_user.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_ok_notification.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/rse-accounts.cfg.template +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/rucio.cfg.atlas.client.template +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/rucio.cfg.template +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/etc/rucio_multi_vo.cfg.template +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/requirements.server.txt +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/tools/bootstrap.py +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/tools/merge_rucio_configs.py +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/data/rucio/tools/reset_database.py +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-abacus-account +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-abacus-collection-replica +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-abacus-rse +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-admin +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-atropos +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-auditor +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-automatix +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-bb8 +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-cache-client +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-cache-consumer +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-finisher +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-poller +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-preparer +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-receiver +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-stager +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-submitter +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-throttler +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-dark-reaper +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-dumper +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-follower +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-hermes +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-judge-cleaner +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-judge-evaluator +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-judge-injector +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-judge-repairer +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-kronos +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-minos +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-minos-temporary-expiration +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-necromancer +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-oauth-manager +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-reaper +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-replica-recoverer +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-rse-decommissioner +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-storage-consistency-actions +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-transmogrifier +0 -0
- {rucio-38.3.0.data → rucio-38.4.0.data}/scripts/rucio-undertaker +0 -0
- {rucio-38.3.0.dist-info → rucio-38.4.0.dist-info}/WHEEL +0 -0
- {rucio-38.3.0.dist-info → rucio-38.4.0.dist-info}/licenses/AUTHORS.rst +0 -0
- {rucio-38.3.0.dist-info → rucio-38.4.0.dist-info}/licenses/LICENSE +0 -0
- {rucio-38.3.0.dist-info → rucio-38.4.0.dist-info}/top_level.txt +0 -0
|
@@ -18,6 +18,7 @@ from typing import TYPE_CHECKING, Any, Optional, cast
|
|
|
18
18
|
|
|
19
19
|
from flask import Flask, Response, request
|
|
20
20
|
|
|
21
|
+
from rucio.common.constants import HTTPMethod
|
|
21
22
|
from rucio.common.exception import (
|
|
22
23
|
AccessDenied,
|
|
23
24
|
DatabaseException,
|
|
@@ -1838,7 +1839,7 @@ class BulkDIDsMeta(ErrorHandlingMethodView):
|
|
|
1838
1839
|
# 0. Extract & validate the mode argument
|
|
1839
1840
|
mode_opt = class_kwargs.pop("mode", None)
|
|
1840
1841
|
if mode_opt not in (cls.MODE_SET, cls.MODE_GET):
|
|
1841
|
-
raise ValueError("BulkDIDsMeta.as_view() needs mode='set' or mode=
|
|
1842
|
+
raise ValueError("BulkDIDsMeta.as_view() needs mode='set' or mode=HTTPMethod.GET.value")
|
|
1842
1843
|
|
|
1843
1844
|
# Tell the type checker that `mode_opt` is definitely str here
|
|
1844
1845
|
mode = cast('str', mode_opt)
|
|
@@ -2532,12 +2533,12 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
2532
2533
|
bp.add_url_rule(
|
|
2533
2534
|
'/<path:scope_name>/status',
|
|
2534
2535
|
view_func=dids_view,
|
|
2535
|
-
methods=[
|
|
2536
|
+
methods=[HTTPMethod.PUT.value, HTTPMethod.GET.value],
|
|
2536
2537
|
)
|
|
2537
2538
|
bp.add_url_rule(
|
|
2538
2539
|
'/<path:scope_name>',
|
|
2539
2540
|
view_func=dids_view,
|
|
2540
|
-
methods=[
|
|
2541
|
+
methods=[HTTPMethod.GET.value, HTTPMethod.POST.value],
|
|
2541
2542
|
)
|
|
2542
2543
|
|
|
2543
2544
|
meta_view = Meta.as_view('meta')
|
|
@@ -2545,126 +2546,126 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
2545
2546
|
'/<path:scope_name>/meta',
|
|
2546
2547
|
defaults={'key': None},
|
|
2547
2548
|
view_func=meta_view,
|
|
2548
|
-
methods=[
|
|
2549
|
+
methods=[HTTPMethod.GET.value, HTTPMethod.POST.value, HTTPMethod.DELETE.value],
|
|
2549
2550
|
)
|
|
2550
2551
|
bp.add_url_rule(
|
|
2551
2552
|
'/<path:scope_name>/meta/<key>',
|
|
2552
2553
|
view_func=meta_view,
|
|
2553
|
-
methods=[
|
|
2554
|
+
methods=[HTTPMethod.POST.value],
|
|
2554
2555
|
)
|
|
2555
2556
|
|
|
2556
2557
|
bp.add_url_rule(
|
|
2557
2558
|
"/bulkdidsmeta",
|
|
2558
2559
|
view_func=BulkDIDsMeta.as_view("bulkdidsmeta", mode=BulkDIDsMeta.MODE_SET),
|
|
2559
|
-
methods=[
|
|
2560
|
+
methods=[HTTPMethod.POST.value],
|
|
2560
2561
|
)
|
|
2561
2562
|
|
|
2562
2563
|
bp.add_url_rule(
|
|
2563
2564
|
"/bulkmeta",
|
|
2564
2565
|
view_func=BulkDIDsMeta.as_view("bulkmeta", mode=BulkDIDsMeta.MODE_GET),
|
|
2565
|
-
methods=[
|
|
2566
|
+
methods=[HTTPMethod.POST.value],
|
|
2566
2567
|
)
|
|
2567
2568
|
|
|
2568
2569
|
bp.add_url_rule(
|
|
2569
2570
|
'/<path:scope_name>/dids',
|
|
2570
2571
|
view_func=Attachment.as_view('attachment'),
|
|
2571
|
-
methods=[
|
|
2572
|
+
methods=[HTTPMethod.GET.value, HTTPMethod.POST.value, HTTPMethod.DELETE.value],
|
|
2572
2573
|
)
|
|
2573
2574
|
|
|
2574
2575
|
bp.add_url_rule(
|
|
2575
2576
|
'/new',
|
|
2576
2577
|
view_func=NewDIDs.as_view('new_dids'),
|
|
2577
|
-
methods=[
|
|
2578
|
+
methods=[HTTPMethod.GET.value],
|
|
2578
2579
|
)
|
|
2579
2580
|
|
|
2580
2581
|
bp.add_url_rule(
|
|
2581
2582
|
'',
|
|
2582
2583
|
view_func=BulkDIDS.as_view('bulkdids'),
|
|
2583
|
-
methods=[
|
|
2584
|
+
methods=[HTTPMethod.POST.value],
|
|
2584
2585
|
)
|
|
2585
2586
|
|
|
2586
2587
|
bp.add_url_rule(
|
|
2587
2588
|
'/<path:scope_name>/dids/history',
|
|
2588
2589
|
view_func=AttachmentHistory.as_view('attachment_history'),
|
|
2589
|
-
methods=[
|
|
2590
|
+
methods=[HTTPMethod.GET.value],
|
|
2590
2591
|
)
|
|
2591
2592
|
|
|
2592
2593
|
bp.add_url_rule(
|
|
2593
2594
|
'/attachments',
|
|
2594
2595
|
view_func=Attachments.as_view('attachments'),
|
|
2595
|
-
methods=[
|
|
2596
|
+
methods=[HTTPMethod.POST.value],
|
|
2596
2597
|
)
|
|
2597
2598
|
|
|
2598
2599
|
bp.add_url_rule(
|
|
2599
2600
|
'/<scope>/dids/search',
|
|
2600
2601
|
view_func=Search.as_view('search'),
|
|
2601
|
-
methods=[
|
|
2602
|
+
methods=[HTTPMethod.GET.value],
|
|
2602
2603
|
)
|
|
2603
2604
|
|
|
2604
2605
|
bp.add_url_rule(
|
|
2605
2606
|
'/<scope>/',
|
|
2606
2607
|
view_func=Scope.as_view('scope'),
|
|
2607
|
-
methods=[
|
|
2608
|
+
methods=[HTTPMethod.GET.value],
|
|
2608
2609
|
)
|
|
2609
2610
|
|
|
2610
2611
|
bp.add_url_rule(
|
|
2611
2612
|
'/<guid>/guid',
|
|
2612
2613
|
view_func=GUIDLookup.as_view('guid_lookup'),
|
|
2613
|
-
methods=[
|
|
2614
|
+
methods=[HTTPMethod.GET.value],
|
|
2614
2615
|
)
|
|
2615
2616
|
|
|
2616
2617
|
bp.add_url_rule(
|
|
2617
2618
|
'/<path:scope_name>/files',
|
|
2618
2619
|
view_func=Files.as_view('files'),
|
|
2619
|
-
methods=[
|
|
2620
|
+
methods=[HTTPMethod.GET.value],
|
|
2620
2621
|
)
|
|
2621
2622
|
|
|
2622
2623
|
bp.add_url_rule(
|
|
2623
2624
|
'/bulkfiles',
|
|
2624
2625
|
view_func=BulkFiles.as_view('bulkfiles'),
|
|
2625
|
-
methods=[
|
|
2626
|
+
methods=[HTTPMethod.POST.value],
|
|
2626
2627
|
)
|
|
2627
2628
|
|
|
2628
2629
|
bp.add_url_rule(
|
|
2629
2630
|
'/<path:scope_name>/rules',
|
|
2630
2631
|
view_func=Rules.as_view('rules'),
|
|
2631
|
-
methods=[
|
|
2632
|
+
methods=[HTTPMethod.GET.value],
|
|
2632
2633
|
)
|
|
2633
2634
|
|
|
2634
2635
|
bp.add_url_rule(
|
|
2635
2636
|
'/<path:scope_name>/parents',
|
|
2636
2637
|
view_func=Parents.as_view('parents'),
|
|
2637
|
-
methods=[
|
|
2638
|
+
methods=[HTTPMethod.GET.value],
|
|
2638
2639
|
)
|
|
2639
2640
|
|
|
2640
2641
|
bp.add_url_rule(
|
|
2641
2642
|
'/<path:scope_name>/associated_rules',
|
|
2642
2643
|
view_func=AssociatedRules.as_view('associated_rules'),
|
|
2643
|
-
methods=[
|
|
2644
|
+
methods=[HTTPMethod.GET.value],
|
|
2644
2645
|
)
|
|
2645
2646
|
|
|
2646
2647
|
bp.add_url_rule(
|
|
2647
2648
|
'/<path:scope_name>/follow',
|
|
2648
2649
|
view_func=Follow.as_view('follow'),
|
|
2649
|
-
methods=[
|
|
2650
|
+
methods=[HTTPMethod.GET.value, HTTPMethod.POST.value, HTTPMethod.DELETE.value],
|
|
2650
2651
|
)
|
|
2651
2652
|
|
|
2652
2653
|
bp.add_url_rule(
|
|
2653
2654
|
'/<input_scope>/<input_name>/<output_scope>/<output_name>/<nbfiles>/sample',
|
|
2654
2655
|
view_func=SampleLegacy.as_view('sample'),
|
|
2655
|
-
methods=[
|
|
2656
|
+
methods=[HTTPMethod.POST.value],
|
|
2656
2657
|
)
|
|
2657
2658
|
|
|
2658
2659
|
bp.add_url_rule(
|
|
2659
2660
|
'/sample',
|
|
2660
2661
|
view_func=Sample.as_view('sample_new'),
|
|
2661
|
-
methods=[
|
|
2662
|
+
methods=[HTTPMethod.POST.value],
|
|
2662
2663
|
)
|
|
2663
2664
|
|
|
2664
2665
|
bp.add_url_rule(
|
|
2665
2666
|
'/resurrect',
|
|
2666
2667
|
view_func=Resurrect.as_view('resurrect'),
|
|
2667
|
-
methods=[
|
|
2668
|
+
methods=[HTTPMethod.POST.value],
|
|
2668
2669
|
)
|
|
2669
2670
|
|
|
2670
2671
|
bp.after_request(response_headers)
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from flask import Flask, request
|
|
16
16
|
|
|
17
|
+
from rucio.common.constants import HTTPMethod
|
|
17
18
|
from rucio.common.exception import AccessDenied, DatabaseException, DataIdentifierAlreadyExists, Duplicate, InvalidPath, ResourceTemporaryUnavailable, RSENotFound, UnsupportedOperation
|
|
18
19
|
from rucio.common.utils import parse_response
|
|
19
20
|
from rucio.gateway.dirac import add_files
|
|
@@ -102,8 +103,8 @@ def blueprint(with_doc=False):
|
|
|
102
103
|
bp = AuthenticatedBlueprint('dirac', __name__, url_prefix='/dirac')
|
|
103
104
|
|
|
104
105
|
add_file_view = AddFiles.as_view('addfiles')
|
|
105
|
-
bp.add_url_rule('/addfiles', view_func=add_file_view, methods=[
|
|
106
|
-
bp.add_url_rule('/addfiles/', view_func=add_file_view, methods=[
|
|
106
|
+
bp.add_url_rule('/addfiles', view_func=add_file_view, methods=[HTTPMethod.POST.value])
|
|
107
|
+
bp.add_url_rule('/addfiles/', view_func=add_file_view, methods=[HTTPMethod.POST.value])
|
|
107
108
|
|
|
108
109
|
bp.after_request(response_headers)
|
|
109
110
|
return bp
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from flask import Flask, Response, request
|
|
16
16
|
|
|
17
|
+
from rucio.common.constants import HTTPMethod
|
|
17
18
|
from rucio.common.utils import render_json
|
|
18
19
|
from rucio.gateway.exporter import export_data
|
|
19
20
|
from rucio.web.rest.flaskapi.authenticated_bp import AuthenticatedBlueprint
|
|
@@ -61,8 +62,9 @@ def blueprint(with_doc=False):
|
|
|
61
62
|
export_view = Export.as_view('scope')
|
|
62
63
|
if not with_doc:
|
|
63
64
|
# rule without trailing slash needs to be added before rule with trailing slash
|
|
64
|
-
bp.add_url_rule('', view_func=export_view, methods=[
|
|
65
|
-
|
|
65
|
+
bp.add_url_rule('', view_func=export_view, methods=[HTTPMethod.GET.value])
|
|
66
|
+
|
|
67
|
+
bp.add_url_rule('/', view_func=export_view, methods=[HTTPMethod.GET.value])
|
|
66
68
|
|
|
67
69
|
bp.after_request(response_headers)
|
|
68
70
|
return bp
|
|
@@ -16,6 +16,7 @@ import json
|
|
|
16
16
|
|
|
17
17
|
from flask import Flask, Response, request
|
|
18
18
|
|
|
19
|
+
from rucio.common.constants import HTTPMethod
|
|
19
20
|
from rucio.common.exception import AccessDenied, KeyNotFound, UnsupportedKeyType, UnsupportedValueType
|
|
20
21
|
from rucio.common.utils import APIEncoder
|
|
21
22
|
from rucio.gateway.heartbeat import create_heartbeat, list_heartbeats
|
|
@@ -114,7 +115,7 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
114
115
|
bp = AuthenticatedBlueprint('heartbeats', __name__, url_prefix='/heartbeats')
|
|
115
116
|
|
|
116
117
|
heartbeat_view = Heartbeat.as_view('heartbeat')
|
|
117
|
-
bp.add_url_rule('', view_func=heartbeat_view, methods=[
|
|
118
|
+
bp.add_url_rule('', view_func=heartbeat_view, methods=[HTTPMethod.GET.value, HTTPMethod.POST.value])
|
|
118
119
|
|
|
119
120
|
bp.after_request(response_headers)
|
|
120
121
|
return bp
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from flask import Flask, jsonify, request
|
|
16
16
|
|
|
17
|
+
from rucio.common.constants import HTTPMethod
|
|
17
18
|
from rucio.gateway.identity import add_account_identity, add_identity, list_accounts_for_identity
|
|
18
19
|
from rucio.web.rest.flaskapi.authenticated_bp import AuthenticatedBlueprint
|
|
19
20
|
from rucio.web.rest.flaskapi.v1.common import ErrorHandlingMethodView, check_accept_header_wrapper_flask, generate_http_error_flask, response_headers
|
|
@@ -266,13 +267,13 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
266
267
|
bp = AuthenticatedBlueprint('identities', __name__, url_prefix='/identities')
|
|
267
268
|
|
|
268
269
|
userpass_view = UserPass.as_view('userpass')
|
|
269
|
-
bp.add_url_rule('/<account>/userpass', view_func=userpass_view, methods=[
|
|
270
|
+
bp.add_url_rule('/<account>/userpass', view_func=userpass_view, methods=[HTTPMethod.PUT.value])
|
|
270
271
|
x509_view = X509.as_view('x509')
|
|
271
|
-
bp.add_url_rule('/<account>/x509', view_func=x509_view, methods=[
|
|
272
|
+
bp.add_url_rule('/<account>/x509', view_func=x509_view, methods=[HTTPMethod.PUT.value])
|
|
272
273
|
gss_view = GSS.as_view('gss')
|
|
273
|
-
bp.add_url_rule('/<account>/gss', view_func=gss_view, methods=[
|
|
274
|
+
bp.add_url_rule('/<account>/gss', view_func=gss_view, methods=[HTTPMethod.PUT.value])
|
|
274
275
|
accounts_view = Accounts.as_view('accounts')
|
|
275
|
-
bp.add_url_rule('/<identity_key>/<type>/accounts', view_func=accounts_view, methods=[
|
|
276
|
+
bp.add_url_rule('/<identity_key>/<type>/accounts', view_func=accounts_view, methods=[HTTPMethod.GET.value])
|
|
276
277
|
|
|
277
278
|
bp.after_request(response_headers)
|
|
278
279
|
return bp
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from flask import Flask, request
|
|
16
16
|
|
|
17
|
+
from rucio.common.constants import HTTPMethod
|
|
17
18
|
from rucio.common.utils import parse_response
|
|
18
19
|
from rucio.gateway.importer import import_data
|
|
19
20
|
from rucio.web.rest.flaskapi.authenticated_bp import AuthenticatedBlueprint
|
|
@@ -118,8 +119,8 @@ def blueprint(with_doc=False):
|
|
|
118
119
|
import_view = Import.as_view('scope')
|
|
119
120
|
if not with_doc:
|
|
120
121
|
# rule without trailing slash needs to be added before rule with trailing slash
|
|
121
|
-
bp.add_url_rule('', view_func=import_view, methods=[
|
|
122
|
-
bp.add_url_rule('/', view_func=import_view, methods=[
|
|
122
|
+
bp.add_url_rule('', view_func=import_view, methods=[HTTPMethod.POST.value])
|
|
123
|
+
bp.add_url_rule('/', view_func=import_view, methods=[HTTPMethod.POST.value])
|
|
123
124
|
|
|
124
125
|
bp.after_request(response_headers)
|
|
125
126
|
return bp
|
|
@@ -16,6 +16,7 @@ from json import dumps
|
|
|
16
16
|
|
|
17
17
|
from flask import Flask, Response, request
|
|
18
18
|
|
|
19
|
+
from rucio.common.constants import HTTPMethod
|
|
19
20
|
from rucio.common.exception import AccessDenied, InvalidObject, LifetimeExceptionDuplicate, LifetimeExceptionNotFound, UnsupportedOperation
|
|
20
21
|
from rucio.common.utils import APIEncoder
|
|
21
22
|
from rucio.gateway.lifetime_exception import add_exception, list_exceptions, update_exception
|
|
@@ -297,9 +298,9 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
297
298
|
bp = AuthenticatedBlueprint('lifetime_exceptions', __name__, url_prefix='/lifetime_exceptions')
|
|
298
299
|
|
|
299
300
|
lifetime_exception_view = LifetimeException.as_view('lifetime_exception')
|
|
300
|
-
bp.add_url_rule('/', view_func=lifetime_exception_view, methods=[
|
|
301
|
+
bp.add_url_rule('/', view_func=lifetime_exception_view, methods=[HTTPMethod.GET.value, HTTPMethod.POST.value])
|
|
301
302
|
lifetime_exception_id_view = LifetimeExceptionId.as_view('lifetime_exception_id')
|
|
302
|
-
bp.add_url_rule('/<exception_id>', view_func=lifetime_exception_id_view, methods=[
|
|
303
|
+
bp.add_url_rule('/<exception_id>', view_func=lifetime_exception_id_view, methods=[HTTPMethod.GET.value, HTTPMethod.PUT.value])
|
|
303
304
|
|
|
304
305
|
bp.after_request(response_headers)
|
|
305
306
|
return bp
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from flask import Flask, request
|
|
16
16
|
|
|
17
|
+
from rucio.common.constants import HTTPMethod
|
|
17
18
|
from rucio.common.exception import RSENotFound
|
|
18
19
|
from rucio.common.utils import render_json
|
|
19
20
|
from rucio.gateway.lock import get_dataset_locks, get_dataset_locks_bulk, get_dataset_locks_by_rse
|
|
@@ -339,13 +340,13 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
339
340
|
bp = AuthenticatedBlueprint('locks', __name__, url_prefix='/locks')
|
|
340
341
|
|
|
341
342
|
lock_by_rse_view = LockByRSE.as_view('lock_by_rse')
|
|
342
|
-
bp.add_url_rule('/<rse>', view_func=lock_by_rse_view, methods=[
|
|
343
|
+
bp.add_url_rule('/<rse>', view_func=lock_by_rse_view, methods=[HTTPMethod.GET.value])
|
|
343
344
|
|
|
344
345
|
lock_by_scope_name_view = LocksByScopeName.as_view('locks_by_scope_name')
|
|
345
|
-
bp.add_url_rule('/<path:scope_name>', view_func=lock_by_scope_name_view, methods=[
|
|
346
|
+
bp.add_url_rule('/<path:scope_name>', view_func=lock_by_scope_name_view, methods=[HTTPMethod.GET.value])
|
|
346
347
|
|
|
347
348
|
locks_for_dids_view = DatasetLocksForDids.as_view('locks_for_dids')
|
|
348
|
-
bp.add_url_rule('/bulk_locks_for_dids', view_func=locks_for_dids_view, methods=[
|
|
349
|
+
bp.add_url_rule('/bulk_locks_for_dids', view_func=locks_for_dids_view, methods=[HTTPMethod.POST.value])
|
|
349
350
|
|
|
350
351
|
bp.after_request(response_headers)
|
|
351
352
|
return bp
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from flask import Flask, jsonify, request
|
|
16
16
|
|
|
17
|
+
from rucio.common.constants import HTTPMethod
|
|
17
18
|
from rucio.common.exception import Duplicate, InvalidValueForKey, KeyNotFound, UnsupportedKeyType, UnsupportedValueType
|
|
18
19
|
from rucio.gateway.meta_conventions import add_key, add_value, list_keys, list_values
|
|
19
20
|
from rucio.web.rest.flaskapi.authenticated_bp import AuthenticatedBlueprint
|
|
@@ -208,10 +209,10 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
208
209
|
bp = AuthenticatedBlueprint('meta_conventions', __name__, url_prefix='/meta_conventions')
|
|
209
210
|
|
|
210
211
|
meta_view = MetaConventions.as_view('meta_conventions')
|
|
211
|
-
bp.add_url_rule('/', view_func=meta_view, methods=[
|
|
212
|
-
bp.add_url_rule('/<key>', view_func=meta_view, methods=[
|
|
212
|
+
bp.add_url_rule('/', view_func=meta_view, methods=[HTTPMethod.GET.value])
|
|
213
|
+
bp.add_url_rule('/<key>', view_func=meta_view, methods=[HTTPMethod.POST.value])
|
|
213
214
|
values_view = Values.as_view('values')
|
|
214
|
-
bp.add_url_rule('/<key>/', view_func=values_view, methods=[
|
|
215
|
+
bp.add_url_rule('/<key>/', view_func=values_view, methods=[HTTPMethod.GET.value, HTTPMethod.POST.value])
|
|
215
216
|
|
|
216
217
|
bp.after_request(response_headers)
|
|
217
218
|
return bp
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from flask import Blueprint, Flask
|
|
16
16
|
|
|
17
|
+
from rucio.common.constants import HTTPMethod
|
|
17
18
|
from rucio.core.monitor import generate_prometheus_metrics
|
|
18
19
|
from rucio.web.rest.flaskapi.v1.common import ErrorHandlingMethodView
|
|
19
20
|
|
|
@@ -26,7 +27,7 @@ class Metrics(ErrorHandlingMethodView):
|
|
|
26
27
|
def blueprint(standalone=False):
|
|
27
28
|
bp = Blueprint('metrics', __name__, url_prefix='/' if standalone else '/metrics')
|
|
28
29
|
metrics_view = Metrics.as_view('metrics')
|
|
29
|
-
bp.add_url_rule('/', view_func=metrics_view, methods=[
|
|
30
|
+
bp.add_url_rule('/', view_func=metrics_view, methods=[HTTPMethod.GET.value])
|
|
30
31
|
return bp
|
|
31
32
|
|
|
32
33
|
|
|
@@ -18,6 +18,7 @@ from typing import TYPE_CHECKING
|
|
|
18
18
|
from flask import Blueprint, Flask, request
|
|
19
19
|
from werkzeug.datastructures import Headers
|
|
20
20
|
|
|
21
|
+
from rucio.common.constants import HTTPMethod
|
|
21
22
|
from rucio.core.nongrid_trace import trace
|
|
22
23
|
from rucio.web.rest.flaskapi.v1.common import ErrorHandlingMethodView, json_parameters, response_headers
|
|
23
24
|
|
|
@@ -84,7 +85,7 @@ def blueprint() -> Blueprint:
|
|
|
84
85
|
bp = Blueprint('nongrid_traces', __name__, url_prefix='/nongrid_traces')
|
|
85
86
|
|
|
86
87
|
xaod_trace_view = XAODTrace.as_view('xaod_trace')
|
|
87
|
-
bp.add_url_rule('/', view_func=xaod_trace_view, methods=[
|
|
88
|
+
bp.add_url_rule('/', view_func=xaod_trace_view, methods=[HTTPMethod.POST.value])
|
|
88
89
|
|
|
89
90
|
bp.after_request(response_headers)
|
|
90
91
|
return bp
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from flask import Blueprint, Flask, Response, request
|
|
16
16
|
|
|
17
|
-
from rucio.common.constants import DEFAULT_VO
|
|
17
|
+
from rucio.common.constants import DEFAULT_VO, HTTPMethod
|
|
18
18
|
from rucio.common.exception import AccessDenied, DataIdentifierNotFound, OpenDataDataIdentifierAlreadyExists, OpenDataDataIdentifierNotFound
|
|
19
19
|
from rucio.common.utils import render_json
|
|
20
20
|
from rucio.core.opendata import validate_opendata_did_state
|
|
@@ -128,7 +128,7 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
128
128
|
---
|
|
129
129
|
summary: Get Opendata DID Information
|
|
130
130
|
description: "Retrieves detailed Opendata information for the given scope and name. Supports optional query parameters to control the inclusion of files, metadata, and DOI information."
|
|
131
|
-
|
|
131
|
+
tags:
|
|
132
132
|
- Opendata
|
|
133
133
|
parameters:
|
|
134
134
|
- name: scope
|
|
@@ -310,7 +310,7 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
310
310
|
state = param_get(parameters, 'state', default=None)
|
|
311
311
|
meta = param_get(parameters, 'meta', default=None)
|
|
312
312
|
doi = param_get(parameters, 'doi', default=None)
|
|
313
|
-
opendata.update_opendata_did(scope=scope,
|
|
313
|
+
result = opendata.update_opendata_did(scope=scope,
|
|
314
314
|
name=name,
|
|
315
315
|
state=state,
|
|
316
316
|
meta=meta,
|
|
@@ -324,7 +324,7 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
324
324
|
except Exception as error:
|
|
325
325
|
return generate_http_error_flask(400, error)
|
|
326
326
|
|
|
327
|
-
return Response(status=200, mimetype='application/json')
|
|
327
|
+
return Response(status=200, mimetype='application/json', response=render_json(**result))
|
|
328
328
|
|
|
329
329
|
def delete(self, scope: str, name: str) -> "Response":
|
|
330
330
|
"""
|
|
@@ -374,10 +374,11 @@ def blueprint() -> "Blueprint":
|
|
|
374
374
|
bp = AuthenticatedBlueprint("opendata", __name__, url_prefix="/opendata")
|
|
375
375
|
|
|
376
376
|
opendata_view = OpenDataView.as_view("opendata")
|
|
377
|
-
bp.add_url_rule("/dids", view_func=opendata_view, methods=[
|
|
377
|
+
bp.add_url_rule("/dids", view_func=opendata_view, methods=[HTTPMethod.GET.value])
|
|
378
378
|
|
|
379
379
|
opendata_did_view = OpenDataDIDsView.as_view("opendata_did")
|
|
380
|
-
bp.add_url_rule("/dids/<scope>/<name>", view_func=opendata_did_view,
|
|
380
|
+
bp.add_url_rule("/dids/<scope>/<name>", view_func=opendata_did_view,
|
|
381
|
+
methods=[HTTPMethod.GET.value, HTTPMethod.POST.value, HTTPMethod.PUT.value, HTTPMethod.DELETE.value])
|
|
381
382
|
|
|
382
383
|
bp.after_request(response_headers)
|
|
383
384
|
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from flask import Blueprint, Flask, Response
|
|
16
16
|
|
|
17
|
+
from rucio.common.constants import HTTPMethod
|
|
17
18
|
from rucio.web.rest.flaskapi.v1.common import ErrorHandlingMethodView, check_accept_header_wrapper_flask, response_headers
|
|
18
19
|
from rucio.web.rest.flaskapi.v1.opendata import OpenDataDIDsView, OpenDataView
|
|
19
20
|
|
|
@@ -27,7 +28,7 @@ class OpenDataPublicView(ErrorHandlingMethodView):
|
|
|
27
28
|
summary: List Opendata DIDs marked as public
|
|
28
29
|
description: "Retrieves a list of public Opendata Data Identifiers (DIDs). Supports optional query parameters for pagination."
|
|
29
30
|
tags:
|
|
30
|
-
- Opendata
|
|
31
|
+
- Opendata Public
|
|
31
32
|
parameters:
|
|
32
33
|
- name: limit
|
|
33
34
|
in: query
|
|
@@ -66,8 +67,8 @@ class OpenDataPublicDIDsView(ErrorHandlingMethodView):
|
|
|
66
67
|
---
|
|
67
68
|
summary: Get Opendata DID Information for public Opendata DIDs
|
|
68
69
|
description: "Retrieves detailed Opendata information for the given scope and name. Only works for public opendata DIDs. Supports optional query parameters to control the inclusion of files, metadata, and DOI information."
|
|
69
|
-
|
|
70
|
-
- Opendata
|
|
70
|
+
tags:
|
|
71
|
+
- Opendata Public
|
|
71
72
|
parameters:
|
|
72
73
|
- name: scope
|
|
73
74
|
in: path
|
|
@@ -129,10 +130,10 @@ def blueprint() -> "Blueprint":
|
|
|
129
130
|
bp = Blueprint("opendata_public", __name__, url_prefix="/opendata/public")
|
|
130
131
|
|
|
131
132
|
opendata_public_view = OpenDataPublicView.as_view("opendata")
|
|
132
|
-
bp.add_url_rule("/dids", view_func=opendata_public_view, methods=[
|
|
133
|
+
bp.add_url_rule("/dids", view_func=opendata_public_view, methods=[HTTPMethod.GET.value])
|
|
133
134
|
|
|
134
135
|
opendata_private_did_view = OpenDataPublicDIDsView.as_view("opendata_did")
|
|
135
|
-
bp.add_url_rule("/dids/<scope>/<name>", view_func=opendata_private_did_view, methods=[
|
|
136
|
+
bp.add_url_rule("/dids/<scope>/<name>", view_func=opendata_private_did_view, methods=[HTTPMethod.GET.value])
|
|
136
137
|
|
|
137
138
|
bp.after_request(response_headers)
|
|
138
139
|
|
|
@@ -18,6 +18,7 @@ from flask import Blueprint, Flask, jsonify, request
|
|
|
18
18
|
from werkzeug.datastructures import Headers
|
|
19
19
|
|
|
20
20
|
from rucio import version
|
|
21
|
+
from rucio.common.constants import HTTPMethod
|
|
21
22
|
from rucio.web.rest.flaskapi.v1.common import ErrorHandlingMethodView, check_accept_header_wrapper_flask, response_headers
|
|
22
23
|
|
|
23
24
|
if TYPE_CHECKING:
|
|
@@ -74,8 +75,8 @@ def blueprint(standalone=False, with_doc=False):
|
|
|
74
75
|
ping_view = Ping.as_view('ping')
|
|
75
76
|
if not with_doc:
|
|
76
77
|
# rule without trailing slash needs to be added before rule with trailing slash
|
|
77
|
-
bp.add_url_rule('', view_func=ping_view, methods=[
|
|
78
|
-
bp.add_url_rule('/', view_func=ping_view, methods=[
|
|
78
|
+
bp.add_url_rule('', view_func=ping_view, methods=[HTTPMethod.GET.value])
|
|
79
|
+
bp.add_url_rule('/', view_func=ping_view, methods=[HTTPMethod.GET.value])
|
|
79
80
|
|
|
80
81
|
bp.after_request(response_headers)
|
|
81
82
|
return bp
|
|
@@ -18,6 +18,7 @@ from typing import TYPE_CHECKING
|
|
|
18
18
|
from flask import Blueprint, Flask, redirect, request
|
|
19
19
|
from werkzeug.datastructures import Headers
|
|
20
20
|
|
|
21
|
+
from rucio.common.constants import HTTPMethod
|
|
21
22
|
from rucio.common.exception import DataIdentifierNotFound, ReplicaNotFound, SortingAlgorithmNotSupported
|
|
22
23
|
from rucio.core.replica_sorter import site_selector, sort_replicas
|
|
23
24
|
from rucio.gateway.replica import list_replicas
|
|
@@ -350,11 +351,11 @@ def blueprint(with_doc=False):
|
|
|
350
351
|
bp = Blueprint('redirect', __name__, url_prefix='/redirect')
|
|
351
352
|
|
|
352
353
|
metalink_redirector_view = MetaLinkRedirector.as_view('metalink_redirector')
|
|
353
|
-
bp.add_url_rule('/<path:scope_name>/metalink', view_func=metalink_redirector_view, methods=[
|
|
354
|
+
bp.add_url_rule('/<path:scope_name>/metalink', view_func=metalink_redirector_view, methods=[HTTPMethod.GET.value])
|
|
354
355
|
header_redirector_view = HeaderRedirector.as_view('header_redirector')
|
|
355
|
-
bp.add_url_rule('/<path:scope_name>', view_func=header_redirector_view, methods=[
|
|
356
|
+
bp.add_url_rule('/<path:scope_name>', view_func=header_redirector_view, methods=[HTTPMethod.GET.value])
|
|
356
357
|
if not with_doc:
|
|
357
|
-
bp.add_url_rule('/<path:scope_name>/', view_func=header_redirector_view, methods=[
|
|
358
|
+
bp.add_url_rule('/<path:scope_name>/', view_func=header_redirector_view, methods=[HTTPMethod.GET.value])
|
|
358
359
|
|
|
359
360
|
return bp
|
|
360
361
|
|
|
@@ -22,7 +22,7 @@ from xml.sax.saxutils import escape
|
|
|
22
22
|
from flask import Flask, Response, request
|
|
23
23
|
|
|
24
24
|
from rucio.common.config import config_get, config_get_int
|
|
25
|
-
from rucio.common.constants import SUPPORTED_PROTOCOLS
|
|
25
|
+
from rucio.common.constants import SUPPORTED_PROTOCOLS, HTTPMethod
|
|
26
26
|
from rucio.common.exception import (
|
|
27
27
|
AccessDenied,
|
|
28
28
|
DataIdentifierAlreadyExists,
|
|
@@ -1832,57 +1832,57 @@ def blueprint(with_doc=False):
|
|
|
1832
1832
|
bp = AuthenticatedBlueprint('replicas', __name__, url_prefix='/replicas')
|
|
1833
1833
|
|
|
1834
1834
|
list_replicas_view = ListReplicas.as_view('list_replicas')
|
|
1835
|
-
bp.add_url_rule('/list', view_func=list_replicas_view, methods=[
|
|
1835
|
+
bp.add_url_rule('/list', view_func=list_replicas_view, methods=[HTTPMethod.POST.value])
|
|
1836
1836
|
replicas_view = Replicas.as_view('replicas')
|
|
1837
1837
|
if not with_doc:
|
|
1838
1838
|
# rule without trailing slash needs to be added before rule with trailing slash
|
|
1839
|
-
bp.add_url_rule('', view_func=replicas_view, methods=[
|
|
1840
|
-
bp.add_url_rule('/', view_func=replicas_view, methods=[
|
|
1839
|
+
bp.add_url_rule('', view_func=replicas_view, methods=[HTTPMethod.POST.value, HTTPMethod.PUT.value, HTTPMethod.DELETE.value])
|
|
1840
|
+
bp.add_url_rule('/', view_func=replicas_view, methods=[HTTPMethod.POST.value, HTTPMethod.PUT.value, HTTPMethod.DELETE.value])
|
|
1841
1841
|
suspicious_replicas_view = SuspiciousReplicas.as_view('suspicious_replicas')
|
|
1842
|
-
bp.add_url_rule('/suspicious', view_func=suspicious_replicas_view, methods=[
|
|
1842
|
+
bp.add_url_rule('/suspicious', view_func=suspicious_replicas_view, methods=[HTTPMethod.GET.value, HTTPMethod.POST.value])
|
|
1843
1843
|
bad_replicas_states_view = BadReplicasStates.as_view('bad_replicas_states')
|
|
1844
|
-
bp.add_url_rule('/bad/states', view_func=bad_replicas_states_view, methods=[
|
|
1844
|
+
bp.add_url_rule('/bad/states', view_func=bad_replicas_states_view, methods=[HTTPMethod.GET.value])
|
|
1845
1845
|
bad_replicas_summary_view = BadReplicasSummary.as_view('bad_replicas_summary')
|
|
1846
|
-
bp.add_url_rule('/bad/summary', view_func=bad_replicas_summary_view, methods=[
|
|
1846
|
+
bp.add_url_rule('/bad/summary', view_func=bad_replicas_summary_view, methods=[HTTPMethod.GET.value])
|
|
1847
1847
|
bad_replicas_pfn_view = BadPFNs.as_view('add_bad_pfns')
|
|
1848
|
-
bp.add_url_rule('/bad/pfns', view_func=bad_replicas_pfn_view, methods=[
|
|
1848
|
+
bp.add_url_rule('/bad/pfns', view_func=bad_replicas_pfn_view, methods=[HTTPMethod.POST.value])
|
|
1849
1849
|
bad_replicas_dids_view = BadDIDs.as_view('add_bad_dids')
|
|
1850
|
-
bp.add_url_rule('/bad/dids', view_func=bad_replicas_dids_view, methods=[
|
|
1850
|
+
bp.add_url_rule('/bad/dids', view_func=bad_replicas_dids_view, methods=[HTTPMethod.POST.value])
|
|
1851
1851
|
replicas_rse_view = ReplicasRSE.as_view('replicas_rse')
|
|
1852
|
-
bp.add_url_rule('/rse/<rse>', view_func=replicas_rse_view, methods=[
|
|
1852
|
+
bp.add_url_rule('/rse/<rse>', view_func=replicas_rse_view, methods=[HTTPMethod.GET.value])
|
|
1853
1853
|
|
|
1854
1854
|
bad_replicas_view = BadReplicas.as_view('bad_replicas')
|
|
1855
|
-
bp.add_url_rule('/bad', view_func=bad_replicas_view, methods=[
|
|
1855
|
+
bp.add_url_rule('/bad', view_func=bad_replicas_view, methods=[HTTPMethod.POST.value])
|
|
1856
1856
|
|
|
1857
1857
|
quarantine_replicas_view = QuarantineReplicas.as_view('quarantine_replicas')
|
|
1858
|
-
bp.add_url_rule('/quarantine', view_func=quarantine_replicas_view, methods=[
|
|
1858
|
+
bp.add_url_rule('/quarantine', view_func=quarantine_replicas_view, methods=[HTTPMethod.POST.value])
|
|
1859
1859
|
|
|
1860
1860
|
replicas_dids_view = ReplicasDIDs.as_view('replicas_dids')
|
|
1861
|
-
bp.add_url_rule('/dids', view_func=replicas_dids_view, methods=[
|
|
1861
|
+
bp.add_url_rule('/dids', view_func=replicas_dids_view, methods=[HTTPMethod.POST.value])
|
|
1862
1862
|
dataset_replicas_view = DatasetReplicas.as_view('dataset_replicas')
|
|
1863
|
-
bp.add_url_rule('/<path:scope_name>/datasets', view_func=dataset_replicas_view, methods=[
|
|
1863
|
+
bp.add_url_rule('/<path:scope_name>/datasets', view_func=dataset_replicas_view, methods=[HTTPMethod.GET.value])
|
|
1864
1864
|
dataset_replicas_bulk_view = DatasetReplicasBulk.as_view('dataset_replicas_bulk')
|
|
1865
|
-
bp.add_url_rule('/datasets_bulk', view_func=dataset_replicas_bulk_view, methods=[
|
|
1865
|
+
bp.add_url_rule('/datasets_bulk', view_func=dataset_replicas_bulk_view, methods=[HTTPMethod.POST.value])
|
|
1866
1866
|
dataset_replicas_vp_view = DatasetReplicasVP.as_view('dataset_replicas_vp')
|
|
1867
|
-
bp.add_url_rule('/<path:scope_name>', view_func=replicas_view, methods=[
|
|
1867
|
+
bp.add_url_rule('/<path:scope_name>', view_func=replicas_view, methods=[HTTPMethod.GET.value])
|
|
1868
1868
|
set_tombstone_view = Tombstone.as_view('set_tombstone')
|
|
1869
|
-
bp.add_url_rule('/tombstone', view_func=set_tombstone_view, methods=[
|
|
1869
|
+
bp.add_url_rule('/tombstone', view_func=set_tombstone_view, methods=[HTTPMethod.POST.value])
|
|
1870
1870
|
|
|
1871
1871
|
if not with_doc:
|
|
1872
|
-
bp.add_url_rule('/list/', view_func=list_replicas_view, methods=[
|
|
1873
|
-
bp.add_url_rule('/suspicious/', view_func=suspicious_replicas_view, methods=[
|
|
1874
|
-
bp.add_url_rule('/bad/states/', view_func=bad_replicas_states_view, methods=[
|
|
1875
|
-
bp.add_url_rule('/bad/summary/', view_func=bad_replicas_summary_view, methods=[
|
|
1876
|
-
bp.add_url_rule('/bad/pfns/', view_func=bad_replicas_pfn_view, methods=[
|
|
1877
|
-
bp.add_url_rule('/bad/dids/', view_func=bad_replicas_dids_view, methods=[
|
|
1878
|
-
bp.add_url_rule('/rse/<rse>/', view_func=replicas_rse_view, methods=[
|
|
1879
|
-
bp.add_url_rule('/bad/', view_func=bad_replicas_view, methods=[
|
|
1880
|
-
bp.add_url_rule('/dids/', view_func=replicas_dids_view, methods=[
|
|
1881
|
-
bp.add_url_rule('/datasets_bulk/', view_func=dataset_replicas_bulk_view, methods=[
|
|
1882
|
-
bp.add_url_rule('/<path:scope_name>/datasets_vp', view_func=dataset_replicas_vp_view, methods=[
|
|
1883
|
-
bp.add_url_rule('/<path:scope_name>/', view_func=replicas_view, methods=[
|
|
1884
|
-
bp.add_url_rule('/tombstone/', view_func=set_tombstone_view, methods=[
|
|
1885
|
-
bp.add_url_rule('/quarantine/', view_func=quarantine_replicas_view, methods=[
|
|
1872
|
+
bp.add_url_rule('/list/', view_func=list_replicas_view, methods=[HTTPMethod.POST.value])
|
|
1873
|
+
bp.add_url_rule('/suspicious/', view_func=suspicious_replicas_view, methods=[HTTPMethod.GET.value, HTTPMethod.POST.value])
|
|
1874
|
+
bp.add_url_rule('/bad/states/', view_func=bad_replicas_states_view, methods=[HTTPMethod.GET.value])
|
|
1875
|
+
bp.add_url_rule('/bad/summary/', view_func=bad_replicas_summary_view, methods=[HTTPMethod.GET.value])
|
|
1876
|
+
bp.add_url_rule('/bad/pfns/', view_func=bad_replicas_pfn_view, methods=[HTTPMethod.POST.value])
|
|
1877
|
+
bp.add_url_rule('/bad/dids/', view_func=bad_replicas_dids_view, methods=[HTTPMethod.POST.value])
|
|
1878
|
+
bp.add_url_rule('/rse/<rse>/', view_func=replicas_rse_view, methods=[HTTPMethod.GET.value])
|
|
1879
|
+
bp.add_url_rule('/bad/', view_func=bad_replicas_view, methods=[HTTPMethod.POST.value])
|
|
1880
|
+
bp.add_url_rule('/dids/', view_func=replicas_dids_view, methods=[HTTPMethod.POST.value])
|
|
1881
|
+
bp.add_url_rule('/datasets_bulk/', view_func=dataset_replicas_bulk_view, methods=[HTTPMethod.POST.value])
|
|
1882
|
+
bp.add_url_rule('/<path:scope_name>/datasets_vp', view_func=dataset_replicas_vp_view, methods=[HTTPMethod.GET.value])
|
|
1883
|
+
bp.add_url_rule('/<path:scope_name>/', view_func=replicas_view, methods=[HTTPMethod.GET.value])
|
|
1884
|
+
bp.add_url_rule('/tombstone/', view_func=set_tombstone_view, methods=[HTTPMethod.POST.value])
|
|
1885
|
+
bp.add_url_rule('/quarantine/', view_func=quarantine_replicas_view, methods=[HTTPMethod.POST.value])
|
|
1886
1886
|
|
|
1887
1887
|
bp.after_request(response_headers)
|
|
1888
1888
|
return bp
|