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
|
|
|
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
|
|
@@ -18,7 +18,7 @@ from typing import TYPE_CHECKING, Union, cast
|
|
|
18
18
|
import flask
|
|
19
19
|
from flask import Flask, Response
|
|
20
20
|
|
|
21
|
-
from rucio.common.constants import TransferLimitDirection
|
|
21
|
+
from rucio.common.constants import HTTPMethod, TransferLimitDirection
|
|
22
22
|
from rucio.common.exception import AccessDenied, RequestNotFound
|
|
23
23
|
from rucio.common.utils import APIEncoder, render_json
|
|
24
24
|
from rucio.core.rse import get_rses_with_attribute_value
|
|
@@ -1170,17 +1170,17 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
1170
1170
|
bp = AuthenticatedBlueprint('requests', __name__, url_prefix='/requests')
|
|
1171
1171
|
|
|
1172
1172
|
request_get_view = RequestGet.as_view('request_get')
|
|
1173
|
-
bp.add_url_rule('/<path:scope_name>/<rse>', view_func=request_get_view, methods=[
|
|
1173
|
+
bp.add_url_rule('/<path:scope_name>/<rse>', view_func=request_get_view, methods=[HTTPMethod.GET.value])
|
|
1174
1174
|
request_history_get_view = RequestHistoryGet.as_view('request_history_get')
|
|
1175
|
-
bp.add_url_rule('/history/<path:scope_name>/<rse>', view_func=request_history_get_view, methods=[
|
|
1175
|
+
bp.add_url_rule('/history/<path:scope_name>/<rse>', view_func=request_history_get_view, methods=[HTTPMethod.GET.value])
|
|
1176
1176
|
request_list_view = RequestList.as_view('request_list')
|
|
1177
|
-
bp.add_url_rule('/list', view_func=request_list_view, methods=[
|
|
1177
|
+
bp.add_url_rule('/list', view_func=request_list_view, methods=[HTTPMethod.GET.value])
|
|
1178
1178
|
request_history_list_view = RequestHistoryList.as_view('request_history_list')
|
|
1179
|
-
bp.add_url_rule('/history/list', view_func=request_history_list_view, methods=[
|
|
1179
|
+
bp.add_url_rule('/history/list', view_func=request_history_list_view, methods=[HTTPMethod.GET.value])
|
|
1180
1180
|
request_metrics_view = RequestMetricsGet.as_view('request_metrics_get')
|
|
1181
|
-
bp.add_url_rule('/metrics', view_func=request_metrics_view, methods=[
|
|
1181
|
+
bp.add_url_rule('/metrics', view_func=request_metrics_view, methods=[HTTPMethod.GET.value])
|
|
1182
1182
|
transfer_limits_view = TransferLimits.as_view('transfer_limits_get')
|
|
1183
|
-
bp.add_url_rule('/transfer_limits', view_func=transfer_limits_view, methods=[
|
|
1183
|
+
bp.add_url_rule('/transfer_limits', view_func=transfer_limits_view, methods=[HTTPMethod.GET.value, HTTPMethod.PUT.value, HTTPMethod.DELETE.value])
|
|
1184
1184
|
|
|
1185
1185
|
bp.after_request(response_headers)
|
|
1186
1186
|
return bp
|
|
@@ -17,6 +17,7 @@ from typing import TYPE_CHECKING
|
|
|
17
17
|
|
|
18
18
|
from flask import Flask, Response, jsonify, request
|
|
19
19
|
|
|
20
|
+
from rucio.common.constants import HTTPMethod
|
|
20
21
|
from rucio.common.exception import (
|
|
21
22
|
AccessDenied,
|
|
22
23
|
CounterNotFound,
|
|
@@ -2211,33 +2212,39 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
2211
2212
|
bp = AuthenticatedBlueprint('rses', __name__, url_prefix='/rses')
|
|
2212
2213
|
|
|
2213
2214
|
attributes_view = Attributes.as_view('attributes')
|
|
2214
|
-
bp.add_url_rule('/<rse>/attr/<key>', view_func=attributes_view, methods=[
|
|
2215
|
-
bp.add_url_rule('/<rse>/attr/', view_func=attributes_view, methods=[
|
|
2215
|
+
bp.add_url_rule('/<rse>/attr/<key>', view_func=attributes_view, methods=[HTTPMethod.POST.value, HTTPMethod.DELETE.value])
|
|
2216
|
+
bp.add_url_rule('/<rse>/attr/', view_func=attributes_view, methods=[HTTPMethod.GET.value])
|
|
2216
2217
|
distance_view = Distance.as_view('distance')
|
|
2217
|
-
bp.add_url_rule('/<source>/distances/<destination>', view_func=distance_view,
|
|
2218
|
+
bp.add_url_rule('/<source>/distances/<destination>', view_func=distance_view,
|
|
2219
|
+
methods=[HTTPMethod.GET.value, HTTPMethod.POST.value, HTTPMethod.PUT.value, HTTPMethod.DELETE.value])
|
|
2218
2220
|
protocol_view = Protocol.as_view('protocol')
|
|
2219
|
-
bp.add_url_rule('/<rse>/protocols/<scheme>/<hostname>/<port>', view_func=protocol_view,
|
|
2220
|
-
|
|
2221
|
-
bp.add_url_rule('/<rse>/protocols/<scheme>', view_func=protocol_view,
|
|
2221
|
+
bp.add_url_rule('/<rse>/protocols/<scheme>/<hostname>/<port>', view_func=protocol_view,
|
|
2222
|
+
methods=[HTTPMethod.DELETE.value, HTTPMethod.PUT.value])
|
|
2223
|
+
bp.add_url_rule('/<rse>/protocols/<scheme>/<hostname>', view_func=protocol_view,
|
|
2224
|
+
methods=[HTTPMethod.DELETE.value, HTTPMethod.PUT.value])
|
|
2225
|
+
bp.add_url_rule('/<rse>/protocols/<scheme>', view_func=protocol_view,
|
|
2226
|
+
methods=[HTTPMethod.GET.value, HTTPMethod.POST.value, HTTPMethod.DELETE.value, HTTPMethod.PUT.value])
|
|
2222
2227
|
protocol_list_view = ProtocolList.as_view('protocol_list')
|
|
2223
|
-
bp.add_url_rule('/<rse>/protocols', view_func=protocol_list_view, methods=[
|
|
2228
|
+
bp.add_url_rule('/<rse>/protocols', view_func=protocol_list_view, methods=[HTTPMethod.GET.value])
|
|
2224
2229
|
lfns2pfns_view = LFNS2PFNS.as_view('lfns2pfns')
|
|
2225
|
-
bp.add_url_rule('/<rse>/lfns2pfns', view_func=lfns2pfns_view, methods=[
|
|
2230
|
+
bp.add_url_rule('/<rse>/lfns2pfns', view_func=lfns2pfns_view, methods=[HTTPMethod.GET.value])
|
|
2226
2231
|
rse_account_usage_limit_view = RSEAccountUsageLimit.as_view('rse_account_usage_limit')
|
|
2227
|
-
bp.add_url_rule('/<rse>/accounts/usage', view_func=rse_account_usage_limit_view, methods=[
|
|
2232
|
+
bp.add_url_rule('/<rse>/accounts/usage', view_func=rse_account_usage_limit_view, methods=[HTTPMethod.GET.value])
|
|
2228
2233
|
usage_view = Usage.as_view('usage')
|
|
2229
|
-
bp.add_url_rule('/<rse>/usage', view_func=usage_view, methods=[
|
|
2234
|
+
bp.add_url_rule('/<rse>/usage', view_func=usage_view, methods=[HTTPMethod.GET.value, HTTPMethod.PUT.value])
|
|
2230
2235
|
usage_history_view = UsageHistory.as_view('usage_history')
|
|
2231
|
-
bp.add_url_rule('/<rse>/usage/history', view_func=usage_history_view, methods=[
|
|
2236
|
+
bp.add_url_rule('/<rse>/usage/history', view_func=usage_history_view, methods=[HTTPMethod.GET.value])
|
|
2232
2237
|
limits_view = Limits.as_view('limits')
|
|
2233
|
-
bp.add_url_rule('/<rse>/limits', view_func=limits_view, methods=[
|
|
2238
|
+
bp.add_url_rule('/<rse>/limits', view_func=limits_view, methods=[HTTPMethod.GET.value, HTTPMethod.PUT.value, HTTPMethod.DELETE.value])
|
|
2234
2239
|
qos_policy_view = QoSPolicy.as_view('qos_policy')
|
|
2235
|
-
bp.add_url_rule('/<rse>/qos_policy', view_func=qos_policy_view, methods=[
|
|
2236
|
-
bp.add_url_rule('/<rse>/qos_policy/<policy>', view_func=qos_policy_view,
|
|
2240
|
+
bp.add_url_rule('/<rse>/qos_policy', view_func=qos_policy_view, methods=[HTTPMethod.GET.value])
|
|
2241
|
+
bp.add_url_rule('/<rse>/qos_policy/<policy>', view_func=qos_policy_view,
|
|
2242
|
+
methods=[HTTPMethod.POST.value, HTTPMethod.DELETE.value])
|
|
2237
2243
|
rse_view = RSE.as_view('rse')
|
|
2238
|
-
bp.add_url_rule('/<rse>', view_func=rse_view,
|
|
2244
|
+
bp.add_url_rule('/<rse>', view_func=rse_view,
|
|
2245
|
+
methods=[HTTPMethod.GET.value, HTTPMethod.DELETE.value, HTTPMethod.PUT.value, HTTPMethod.POST.value])
|
|
2239
2246
|
rses_view = RSEs.as_view('rses')
|
|
2240
|
-
bp.add_url_rule('/', view_func=rses_view, methods=[
|
|
2247
|
+
bp.add_url_rule('/', view_func=rses_view, methods=[HTTPMethod.GET.value])
|
|
2241
2248
|
|
|
2242
2249
|
bp.after_request(response_headers)
|
|
2243
2250
|
return bp
|
|
@@ -17,6 +17,7 @@ from typing import Any
|
|
|
17
17
|
|
|
18
18
|
from flask import Flask, Response, request
|
|
19
19
|
|
|
20
|
+
from rucio.common.constants import HTTPMethod
|
|
20
21
|
from rucio.common.exception import (
|
|
21
22
|
AccessDenied,
|
|
22
23
|
AccountNotFound,
|
|
@@ -827,21 +828,21 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
827
828
|
bp = AuthenticatedBlueprint('rules', __name__, url_prefix='/rules')
|
|
828
829
|
|
|
829
830
|
rule_view = Rule.as_view('rule')
|
|
830
|
-
bp.add_url_rule('/<rule_id>', view_func=rule_view, methods=[
|
|
831
|
+
bp.add_url_rule('/<rule_id>', view_func=rule_view, methods=[HTTPMethod.GET.value, HTTPMethod.PUT.value, HTTPMethod.DELETE.value])
|
|
831
832
|
all_rule_view = AllRule.as_view('all_rule')
|
|
832
|
-
bp.add_url_rule('/', view_func=all_rule_view, methods=[
|
|
833
|
+
bp.add_url_rule('/', view_func=all_rule_view, methods=[HTTPMethod.GET.value, HTTPMethod.POST.value])
|
|
833
834
|
replica_locks_view = ReplicaLocks.as_view('replica_locks')
|
|
834
|
-
bp.add_url_rule('/<rule_id>/locks', view_func=replica_locks_view, methods=[
|
|
835
|
+
bp.add_url_rule('/<rule_id>/locks', view_func=replica_locks_view, methods=[HTTPMethod.GET.value])
|
|
835
836
|
reduce_rule_view = ReduceRule.as_view('reduce_rule')
|
|
836
|
-
bp.add_url_rule('/<rule_id>/reduce', view_func=reduce_rule_view, methods=[
|
|
837
|
+
bp.add_url_rule('/<rule_id>/reduce', view_func=reduce_rule_view, methods=[HTTPMethod.POST.value])
|
|
837
838
|
move_rule_view = MoveRule.as_view('move_rule')
|
|
838
|
-
bp.add_url_rule('/<rule_id>/move', view_func=move_rule_view, methods=[
|
|
839
|
+
bp.add_url_rule('/<rule_id>/move', view_func=move_rule_view, methods=[HTTPMethod.POST.value])
|
|
839
840
|
rule_history_view = RuleHistory.as_view('rule_history')
|
|
840
|
-
bp.add_url_rule('/<rule_id>/history', view_func=rule_history_view, methods=[
|
|
841
|
+
bp.add_url_rule('/<rule_id>/history', view_func=rule_history_view, methods=[HTTPMethod.GET.value])
|
|
841
842
|
rule_history_full_view = RuleHistoryFull.as_view('rule_history_full')
|
|
842
|
-
bp.add_url_rule('/<path:scope_name>/history', view_func=rule_history_full_view, methods=[
|
|
843
|
+
bp.add_url_rule('/<path:scope_name>/history', view_func=rule_history_full_view, methods=[HTTPMethod.GET.value])
|
|
843
844
|
rule_analysis_view = RuleAnalysis.as_view('rule_analysis')
|
|
844
|
-
bp.add_url_rule('/<rule_id>/analysis', view_func=rule_analysis_view, methods=[
|
|
845
|
+
bp.add_url_rule('/<rule_id>/analysis', view_func=rule_analysis_view, methods=[HTTPMethod.GET.value])
|
|
845
846
|
|
|
846
847
|
bp.after_request(response_headers)
|
|
847
848
|
return bp
|
|
@@ -12,10 +12,12 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
from flask import Flask, jsonify, request
|
|
16
15
|
|
|
17
|
-
from
|
|
18
|
-
|
|
16
|
+
from flask import Flask, Response, jsonify, request
|
|
17
|
+
|
|
18
|
+
from rucio.common.constants import HTTPMethod
|
|
19
|
+
from rucio.common.exception import AccountNotFound, Duplicate, ScopeNotFound, VONotFound
|
|
20
|
+
from rucio.gateway.scope import add_scope, get_scopes, list_scopes, update_scope
|
|
19
21
|
from rucio.web.rest.flaskapi.authenticated_bp import AuthenticatedBlueprint
|
|
20
22
|
from rucio.web.rest.flaskapi.v1.common import ErrorHandlingMethodView, check_accept_header_wrapper_flask, generate_http_error_flask, response_headers
|
|
21
23
|
|
|
@@ -23,7 +25,7 @@ from rucio.web.rest.flaskapi.v1.common import ErrorHandlingMethodView, check_acc
|
|
|
23
25
|
class Scope(ErrorHandlingMethodView):
|
|
24
26
|
|
|
25
27
|
@check_accept_header_wrapper_flask(['application/json'])
|
|
26
|
-
def get(self):
|
|
28
|
+
def get(self) -> Response:
|
|
27
29
|
"""
|
|
28
30
|
---
|
|
29
31
|
summary: List Scopes
|
|
@@ -39,16 +41,27 @@ class Scope(ErrorHandlingMethodView):
|
|
|
39
41
|
description: "All scopes."
|
|
40
42
|
type: array
|
|
41
43
|
items:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
type: object
|
|
45
|
+
properties:
|
|
46
|
+
scope:
|
|
47
|
+
description: "A scope."
|
|
48
|
+
type: string
|
|
49
|
+
account:
|
|
50
|
+
description: "The owner account."
|
|
51
|
+
type: string
|
|
52
|
+
|
|
44
53
|
401:
|
|
45
54
|
description: "Invalid Auth Token"
|
|
46
55
|
406:
|
|
47
56
|
description: "Not acceptable"
|
|
48
57
|
"""
|
|
49
|
-
|
|
58
|
+
scopes = list_scopes(vo=request.environ['vo'])
|
|
59
|
+
res = []
|
|
60
|
+
for dictionary in scopes:
|
|
61
|
+
res.append(dictionary)
|
|
62
|
+
return jsonify(res)
|
|
50
63
|
|
|
51
|
-
def post(self, account, scope):
|
|
64
|
+
def post(self, account: str, scope: str) -> Response:
|
|
52
65
|
"""
|
|
53
66
|
---
|
|
54
67
|
summary: Add Scope
|
|
@@ -90,13 +103,53 @@ class Scope(ErrorHandlingMethodView):
|
|
|
90
103
|
except AccountNotFound as error:
|
|
91
104
|
return generate_http_error_flask(404, error)
|
|
92
105
|
|
|
93
|
-
return 'Created', 201
|
|
106
|
+
return Response('Created', 201)
|
|
107
|
+
|
|
108
|
+
def put(self, account: str, scope: str) -> Response:
|
|
109
|
+
"""
|
|
110
|
+
---
|
|
111
|
+
summary: Change ownership of a scope.
|
|
112
|
+
description: "Changes ownership of a scope.."
|
|
113
|
+
tags:
|
|
114
|
+
- Scopes
|
|
115
|
+
parameters:
|
|
116
|
+
- name: account
|
|
117
|
+
in: path
|
|
118
|
+
description: "The new owner account"
|
|
119
|
+
schema:
|
|
120
|
+
type: string
|
|
121
|
+
style: simple
|
|
122
|
+
- name: scope
|
|
123
|
+
in: path
|
|
124
|
+
description: "The name of the scope."
|
|
125
|
+
schema:
|
|
126
|
+
type: string
|
|
127
|
+
style: simple
|
|
128
|
+
responses:
|
|
129
|
+
201:
|
|
130
|
+
description: "OK"
|
|
131
|
+
content:
|
|
132
|
+
application/json:
|
|
133
|
+
schema:
|
|
134
|
+
type: string
|
|
135
|
+
enum: ['']
|
|
136
|
+
401:
|
|
137
|
+
description: "Invalid Auth Token"
|
|
138
|
+
403:
|
|
139
|
+
description: "Scope or already exists"
|
|
140
|
+
"""
|
|
141
|
+
try:
|
|
142
|
+
update_scope(scope=scope, account=account, issuer=request.environ['issuer'], vo=request.environ['vo'])
|
|
143
|
+
except (ScopeNotFound, AccountNotFound, VONotFound) as error:
|
|
144
|
+
return generate_http_error_flask(404, error)
|
|
145
|
+
|
|
146
|
+
return Response("", 200)
|
|
94
147
|
|
|
95
148
|
|
|
96
149
|
class AccountScopeList(ErrorHandlingMethodView):
|
|
97
150
|
|
|
98
151
|
@check_accept_header_wrapper_flask(['application/json'])
|
|
99
|
-
def get(self, account):
|
|
152
|
+
def get(self, account: str) -> Response:
|
|
100
153
|
"""
|
|
101
154
|
---
|
|
102
155
|
summary: List Account Scopes
|
|
@@ -143,10 +196,10 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
143
196
|
bp = AuthenticatedBlueprint('scopes', __name__, url_prefix='/scopes')
|
|
144
197
|
|
|
145
198
|
scope_view = Scope.as_view('scope')
|
|
146
|
-
bp.add_url_rule('/', view_func=scope_view, methods=[
|
|
147
|
-
bp.add_url_rule('/<account>/<scope>', view_func=scope_view, methods=[
|
|
199
|
+
bp.add_url_rule('/', view_func=scope_view, methods=[HTTPMethod.GET.value])
|
|
200
|
+
bp.add_url_rule('/<account>/<scope>', view_func=scope_view, methods=[HTTPMethod.POST.value, HTTPMethod.PUT.value])
|
|
148
201
|
account_scope_list_view = AccountScopeList.as_view('account_scope_list')
|
|
149
|
-
bp.add_url_rule('/<account>/scopes', view_func=account_scope_list_view, methods=[
|
|
202
|
+
bp.add_url_rule('/<account>/scopes', view_func=account_scope_list_view, methods=[HTTPMethod.GET.value])
|
|
150
203
|
|
|
151
204
|
bp.after_request(response_headers)
|
|
152
205
|
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, RuleNotFound, SubscriptionDuplicate, SubscriptionNotFound
|
|
20
21
|
from rucio.common.utils import APIEncoder, render_json
|
|
21
22
|
from rucio.gateway.rule import list_replication_rules
|
|
@@ -623,18 +624,18 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
623
624
|
bp = AuthenticatedBlueprint('subscriptions', __name__, url_prefix='/subscriptions')
|
|
624
625
|
|
|
625
626
|
subscription_id_view = SubscriptionId.as_view('subscription_id')
|
|
626
|
-
bp.add_url_rule('/id/<subscription_id>', view_func=subscription_id_view, methods=[
|
|
627
|
+
bp.add_url_rule('/id/<subscription_id>', view_func=subscription_id_view, methods=[HTTPMethod.GET.value])
|
|
627
628
|
states_view = States.as_view('states')
|
|
628
|
-
bp.add_url_rule('/<account>/<name>/rules/states', view_func=states_view, methods=[
|
|
629
|
-
bp.add_url_rule('/<account>/rules/states', view_func=states_view, methods=[
|
|
629
|
+
bp.add_url_rule('/<account>/<name>/rules/states', view_func=states_view, methods=[HTTPMethod.GET.value])
|
|
630
|
+
bp.add_url_rule('/<account>/rules/states', view_func=states_view, methods=[HTTPMethod.GET.value])
|
|
630
631
|
rules_view = Rules.as_view('rules')
|
|
631
|
-
bp.add_url_rule('/<account>/<name>/rules', view_func=rules_view, methods=[
|
|
632
|
+
bp.add_url_rule('/<account>/<name>/rules', view_func=rules_view, methods=[HTTPMethod.GET.value])
|
|
632
633
|
subscription_view = Subscription.as_view('subscription')
|
|
633
|
-
bp.add_url_rule('/<account>/<name>', view_func=subscription_view, methods=[
|
|
634
|
-
bp.add_url_rule('/<account>', view_func=subscription_view, methods=[
|
|
635
|
-
bp.add_url_rule('/', view_func=subscription_view, methods=[
|
|
634
|
+
bp.add_url_rule('/<account>/<name>', view_func=subscription_view, methods=[HTTPMethod.GET.value, HTTPMethod.POST.value, HTTPMethod.PUT.value])
|
|
635
|
+
bp.add_url_rule('/<account>', view_func=subscription_view, methods=[HTTPMethod.GET.value])
|
|
636
|
+
bp.add_url_rule('/', view_func=subscription_view, methods=[HTTPMethod.GET.value])
|
|
636
637
|
subscription_name_view = SubscriptionName.as_view('subscription_name')
|
|
637
|
-
bp.add_url_rule('/name/<name>', view_func=subscription_name_view, methods=[
|
|
638
|
+
bp.add_url_rule('/name/<name>', view_func=subscription_name_view, methods=[HTTPMethod.GET.value])
|
|
638
639
|
|
|
639
640
|
bp.after_request(response_headers)
|
|
640
641
|
return bp
|
|
@@ -18,6 +18,7 @@ from typing import TYPE_CHECKING
|
|
|
18
18
|
from flask import Blueprint, Flask, Response, request
|
|
19
19
|
from werkzeug.datastructures import Headers
|
|
20
20
|
|
|
21
|
+
from rucio.common.constants import HTTPMethod
|
|
21
22
|
from rucio.gateway.trace import trace
|
|
22
23
|
from rucio.web.rest.flaskapi.v1.common import ErrorHandlingMethodView, generate_http_error_flask, response_headers
|
|
23
24
|
|
|
@@ -122,7 +123,7 @@ def blueprint() -> Blueprint:
|
|
|
122
123
|
bp = Blueprint('traces', __name__, url_prefix='/traces')
|
|
123
124
|
|
|
124
125
|
trace_view = Trace.as_view('trace')
|
|
125
|
-
bp.add_url_rule('/', view_func=trace_view, methods=[
|
|
126
|
+
bp.add_url_rule('/', view_func=trace_view, methods=[HTTPMethod.POST.value])
|
|
126
127
|
|
|
127
128
|
bp.after_request(response_headers)
|
|
128
129
|
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 AccessDenied, AccountNotFound, Duplicate, UnsupportedOperation, VONotFound
|
|
18
19
|
from rucio.common.utils import render_json
|
|
19
20
|
from rucio.gateway.vo import add_vo, list_vos, recover_vo_root_identity, update_vo
|
|
@@ -259,11 +260,11 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
259
260
|
bp = AuthenticatedBlueprint('vos', __name__, url_prefix='/vos')
|
|
260
261
|
|
|
261
262
|
recover_view = RecoverVO.as_view('recover')
|
|
262
|
-
bp.add_url_rule('/<vo>/recover', view_func=recover_view, methods=[
|
|
263
|
+
bp.add_url_rule('/<vo>/recover', view_func=recover_view, methods=[HTTPMethod.POST.value])
|
|
263
264
|
vo_view = VO.as_view('vo')
|
|
264
|
-
bp.add_url_rule('/<vo>', view_func=vo_view, methods=[
|
|
265
|
+
bp.add_url_rule('/<vo>', view_func=vo_view, methods=[HTTPMethod.PUT.value, HTTPMethod.POST.value])
|
|
265
266
|
vos_view = VOs.as_view('vos')
|
|
266
|
-
bp.add_url_rule('/', view_func=vos_view, methods=[
|
|
267
|
+
bp.add_url_rule('/', view_func=vos_view, methods=[HTTPMethod.GET.value])
|
|
267
268
|
|
|
268
269
|
bp.after_request(response_headers)
|
|
269
270
|
return bp
|
|
@@ -121,8 +121,8 @@ usercert = /opt/rucio/tools/x509up
|
|
|
121
121
|
|
|
122
122
|
[messaging-fts3]
|
|
123
123
|
port = 61123
|
|
124
|
-
ssl_key_file = /
|
|
125
|
-
ssl_cert_file = /
|
|
124
|
+
ssl_key_file = /etc/grid-security/hostkey.pem
|
|
125
|
+
ssl_cert_file = /etc/grid-security/hostcert.pem
|
|
126
126
|
destination = /topic/transfer.fts_monitoring_queue_state
|
|
127
127
|
brokers = dashb-test-mb.cern.ch
|
|
128
128
|
voname = atlas
|
|
@@ -199,7 +199,6 @@ account = cache_mb
|
|
|
199
199
|
cacert = /opt/rucio/etc/web/ca.crt
|
|
200
200
|
#cacert = /etc/pki/tls/certs/CERN-bundle.pem
|
|
201
201
|
usercert = /opt/rucio/etc/web/usercert.pem
|
|
202
|
-
#usercert = /home/mario/.ssh/usercert_with_key.pem
|
|
203
202
|
|
|
204
203
|
[nagios]
|
|
205
204
|
proxy = /opt/rucio/etc/ddmadmin.proxy.nagios
|
|
@@ -102,8 +102,8 @@ usercert = /opt/rucio/tools/x509up
|
|
|
102
102
|
|
|
103
103
|
[messaging-fts3]
|
|
104
104
|
port = 61123
|
|
105
|
-
ssl_key_file = /
|
|
106
|
-
ssl_cert_file = /
|
|
105
|
+
ssl_key_file = /etc/grid-security/hostkey.pem
|
|
106
|
+
ssl_cert_file = /etc/grid-security/hostcert.pem
|
|
107
107
|
destination = /topic/transfer.fts_monitoring_queue_state
|
|
108
108
|
brokers = dashb-test-mb.cern.ch
|
|
109
109
|
voname = atlas
|
|
@@ -179,7 +179,6 @@ account = cache_mb
|
|
|
179
179
|
cacert = /opt/rucio/etc/web/ca.crt
|
|
180
180
|
#cacert = /etc/pki/tls/certs/CERN-bundle.pem
|
|
181
181
|
usercert = /opt/rucio/etc/web/usercert.pem
|
|
182
|
-
#usercert = /home/mario/.ssh/usercert_with_key.pem
|
|
183
182
|
|
|
184
183
|
[nagios]
|
|
185
184
|
proxy = /opt/rucio/etc/ddmadmin.proxy.nagios
|