rucio 38.3.0__py3-none-any.whl → 38.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rucio might be problematic. Click here for more details.
- rucio/cli/bin_legacy/rucio.py +12 -7
- rucio/cli/bin_legacy/rucio_admin.py +9 -2
- rucio/cli/did.py +1 -1
- rucio/cli/opendata.py +19 -2
- rucio/cli/replica.py +6 -2
- rucio/cli/rule.py +0 -1
- rucio/cli/scope.py +9 -0
- rucio/cli/utils.py +11 -0
- 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/downloadclient.py +3 -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 +44 -4
- rucio/client/subscriptionclient.py +6 -5
- rucio/common/constants.py +18 -0
- rucio/common/didtype.py +18 -11
- 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/did_meta_plugins/__init__.py +2 -1
- rucio/core/did_meta_plugins/did_column_meta.py +2 -10
- rucio/core/did_meta_plugins/did_meta_plugin_interface.py +39 -25
- rucio/core/did_meta_plugins/elasticsearch_meta.py +3 -11
- rucio/core/did_meta_plugins/json_meta.py +2 -8
- rucio/core/did_meta_plugins/mongo_meta.py +3 -12
- rucio/core/did_meta_plugins/postgres_meta.py +7 -14
- rucio/core/dirac.py +1 -1
- rucio/core/opendata.py +150 -8
- rucio/core/rse.py +6 -2
- rucio/core/rule_grouping.py +3 -3
- rucio/core/scope.py +47 -7
- rucio/daemons/automatix/automatix.py +2 -0
- rucio/db/sqla/models.py +22 -0
- rucio/gateway/account.py +8 -7
- rucio/gateway/did.py +1 -1
- rucio/gateway/dirac.py +1 -1
- rucio/gateway/opendata.py +2 -2
- rucio/gateway/request.py +2 -117
- rucio/gateway/scope.py +35 -3
- 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 +28 -27
- rucio/web/rest/flaskapi/v1/opendata_public.py +12 -11
- 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 +66 -13
- 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.data → rucio-38.5.0.data}/data/rucio/etc/rucio.cfg.template +2 -3
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/rucio_multi_vo.cfg.template +2 -3
- {rucio-38.3.0.dist-info → rucio-38.5.0.dist-info}/METADATA +1 -1
- {rucio-38.3.0.dist-info → rucio-38.5.0.dist-info}/RECORD +149 -149
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/alembic.ini.template +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/alembic_offline.ini.template +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/globus-config.yml.template +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/ldap.cfg.template +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/mail_templates/rule_approval_request.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/mail_templates/rule_approved_admin.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/mail_templates/rule_approved_user.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/mail_templates/rule_denied_admin.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/mail_templates/rule_denied_user.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/mail_templates/rule_ok_notification.tmpl +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/rse-accounts.cfg.template +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/etc/rucio.cfg.atlas.client.template +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/requirements.server.txt +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/tools/bootstrap.py +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/tools/merge_rucio_configs.py +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/data/rucio/tools/reset_database.py +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-abacus-account +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-abacus-collection-replica +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-abacus-rse +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-admin +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-atropos +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-auditor +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-automatix +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-bb8 +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-cache-client +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-cache-consumer +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-conveyor-finisher +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-conveyor-poller +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-conveyor-preparer +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-conveyor-receiver +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-conveyor-stager +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-conveyor-submitter +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-conveyor-throttler +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-dark-reaper +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-dumper +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-follower +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-hermes +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-judge-cleaner +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-judge-evaluator +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-judge-injector +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-judge-repairer +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-kronos +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-minos +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-minos-temporary-expiration +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-necromancer +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-oauth-manager +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-reaper +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-replica-recoverer +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-rse-decommissioner +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-storage-consistency-actions +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-transmogrifier +0 -0
- {rucio-38.3.0.data → rucio-38.5.0.data}/scripts/rucio-undertaker +0 -0
- {rucio-38.3.0.dist-info → rucio-38.5.0.dist-info}/WHEEL +0 -0
- {rucio-38.3.0.dist-info → rucio-38.5.0.dist-info}/licenses/AUTHORS.rst +0 -0
- {rucio-38.3.0.dist-info → rucio-38.5.0.dist-info}/licenses/LICENSE +0 -0
- {rucio-38.3.0.dist-info → rucio-38.5.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
|
|
@@ -48,10 +48,10 @@ class OpenDataView(ErrorHandlingMethodView):
|
|
|
48
48
|
def get(self) -> "Response":
|
|
49
49
|
"""
|
|
50
50
|
---
|
|
51
|
-
summary: List
|
|
52
|
-
description: "Retrieves a list of
|
|
51
|
+
summary: List Open Data DIDs
|
|
52
|
+
description: "Retrieves a list of Open Data DIDs. Supports optional query parameters for pagination and filtering by state."
|
|
53
53
|
tags:
|
|
54
|
-
-
|
|
54
|
+
- Open Data
|
|
55
55
|
parameters:
|
|
56
56
|
- name: limit
|
|
57
57
|
in: query
|
|
@@ -76,7 +76,7 @@ class OpenDataView(ErrorHandlingMethodView):
|
|
|
76
76
|
style: form
|
|
77
77
|
responses:
|
|
78
78
|
200:
|
|
79
|
-
description: "Successful retrieval of the list of
|
|
79
|
+
description: "Successful retrieval of the list of Open Data DIDs."
|
|
80
80
|
content:
|
|
81
81
|
application/json:
|
|
82
82
|
schema:
|
|
@@ -126,10 +126,10 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
126
126
|
def get(self, scope: str, name: str) -> "Response":
|
|
127
127
|
"""
|
|
128
128
|
---
|
|
129
|
-
summary: Get
|
|
130
|
-
description: "Retrieves detailed
|
|
131
|
-
|
|
132
|
-
-
|
|
129
|
+
summary: Get Open Data DID Information
|
|
130
|
+
description: "Retrieves detailed Open Data information for the given scope and name. Supports optional query parameters to control the inclusion of files, metadata, and DOI information."
|
|
131
|
+
tags:
|
|
132
|
+
- Open Data
|
|
133
133
|
parameters:
|
|
134
134
|
- name: scope
|
|
135
135
|
in: path
|
|
@@ -178,7 +178,7 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
178
178
|
style: form
|
|
179
179
|
responses:
|
|
180
180
|
200:
|
|
181
|
-
description: "Successful retrieval of
|
|
181
|
+
description: "Successful retrieval of Open Data DID information."
|
|
182
182
|
content:
|
|
183
183
|
application/json:
|
|
184
184
|
schema:
|
|
@@ -195,10 +195,10 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
195
195
|
def post(self, scope: str, name: str) -> "Response":
|
|
196
196
|
"""
|
|
197
197
|
---
|
|
198
|
-
summary: Register
|
|
199
|
-
description: "Registers an existing DID as
|
|
198
|
+
summary: Register Open Data DID
|
|
199
|
+
description: "Registers an existing DID as Open Data."
|
|
200
200
|
tags:
|
|
201
|
-
-
|
|
201
|
+
- Open Data
|
|
202
202
|
parameters:
|
|
203
203
|
- name: scope
|
|
204
204
|
in: path
|
|
@@ -216,7 +216,7 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
216
216
|
style: simple
|
|
217
217
|
responses:
|
|
218
218
|
201:
|
|
219
|
-
description: "
|
|
219
|
+
description: "Open Data DID successfully registered."
|
|
220
220
|
content:
|
|
221
221
|
application/json:
|
|
222
222
|
schema:
|
|
@@ -229,7 +229,7 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
229
229
|
404:
|
|
230
230
|
description: "Data Identifier not found."
|
|
231
231
|
409:
|
|
232
|
-
description: "Data Identifier already exists in the
|
|
232
|
+
description: "Data Identifier already exists in the Open Data catalog."
|
|
233
233
|
"""
|
|
234
234
|
vo = request.environ.get("vo", DEFAULT_VO)
|
|
235
235
|
try:
|
|
@@ -249,10 +249,10 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
249
249
|
def put(self, scope: str, name: str) -> "Response":
|
|
250
250
|
"""
|
|
251
251
|
---
|
|
252
|
-
summary: Update
|
|
253
|
-
description: "Updates the properties of an existing
|
|
252
|
+
summary: Update Open Data DID
|
|
253
|
+
description: "Updates the properties of an existing Open Data DID."
|
|
254
254
|
tags:
|
|
255
|
-
-
|
|
255
|
+
- Open Data
|
|
256
256
|
parameters:
|
|
257
257
|
- name: scope
|
|
258
258
|
in: path
|
|
@@ -291,7 +291,7 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
291
291
|
example: '10.1234/abcd.efgh'."
|
|
292
292
|
responses:
|
|
293
293
|
200:
|
|
294
|
-
description: "
|
|
294
|
+
description: "Open Data DID successfully updated."
|
|
295
295
|
content:
|
|
296
296
|
application/json:
|
|
297
297
|
schema:
|
|
@@ -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,15 +324,15 @@ 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
|
"""
|
|
331
331
|
---
|
|
332
|
-
summary: Delete
|
|
333
|
-
description: "Deletes an entry in the
|
|
332
|
+
summary: Delete Open Data DID
|
|
333
|
+
description: "Deletes an entry in the Open Data catalog."
|
|
334
334
|
tags:
|
|
335
|
-
-
|
|
335
|
+
- Open Data
|
|
336
336
|
parameters:
|
|
337
337
|
- name: scope
|
|
338
338
|
in: path
|
|
@@ -350,7 +350,7 @@ class OpenDataDIDsView(ErrorHandlingMethodView):
|
|
|
350
350
|
style: simple
|
|
351
351
|
responses:
|
|
352
352
|
204:
|
|
353
|
-
description: "
|
|
353
|
+
description: "Open Data DID successfully deleted. No content is returned."
|
|
354
354
|
400:
|
|
355
355
|
description: "Invalid input: The provided scope/name is not valid."
|
|
356
356
|
401:
|
|
@@ -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
|
|
|
@@ -24,10 +25,10 @@ class OpenDataPublicView(ErrorHandlingMethodView):
|
|
|
24
25
|
def get(self) -> "Response":
|
|
25
26
|
"""
|
|
26
27
|
---
|
|
27
|
-
summary: List
|
|
28
|
-
description: "Retrieves a list of public
|
|
28
|
+
summary: List Open Data DIDs marked as public
|
|
29
|
+
description: "Retrieves a list of public Open Data DIDs. Supports optional query parameters for pagination."
|
|
29
30
|
tags:
|
|
30
|
-
-
|
|
31
|
+
- Open Data Public
|
|
31
32
|
parameters:
|
|
32
33
|
- name: limit
|
|
33
34
|
in: query
|
|
@@ -45,7 +46,7 @@ class OpenDataPublicView(ErrorHandlingMethodView):
|
|
|
45
46
|
style: form
|
|
46
47
|
responses:
|
|
47
48
|
200:
|
|
48
|
-
description: "Successful retrieval of the list of
|
|
49
|
+
description: "Successful retrieval of the list of Open Data DIDs."
|
|
49
50
|
content:
|
|
50
51
|
application/json:
|
|
51
52
|
schema:
|
|
@@ -64,10 +65,10 @@ class OpenDataPublicDIDsView(ErrorHandlingMethodView):
|
|
|
64
65
|
def get(self, scope: str, name: str) -> "Response":
|
|
65
66
|
"""
|
|
66
67
|
---
|
|
67
|
-
summary: Get
|
|
68
|
-
description: "Retrieves detailed
|
|
69
|
-
|
|
70
|
-
-
|
|
68
|
+
summary: Get Open Data DID Information for public Open Data DIDs
|
|
69
|
+
description: "Retrieves detailed Open Data 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."
|
|
70
|
+
tags:
|
|
71
|
+
- Open Data Public
|
|
71
72
|
parameters:
|
|
72
73
|
- name: scope
|
|
73
74
|
in: path
|
|
@@ -109,7 +110,7 @@ class OpenDataPublicDIDsView(ErrorHandlingMethodView):
|
|
|
109
110
|
style: form
|
|
110
111
|
responses:
|
|
111
112
|
200:
|
|
112
|
-
description: "Successful retrieval of
|
|
113
|
+
description: "Successful retrieval of Open Data DID information."
|
|
113
114
|
content:
|
|
114
115
|
application/json:
|
|
115
116
|
schema:
|
|
@@ -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
|