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,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
|
|
@@ -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 AccountNotFound, Duplicate, ScopeNotFound
|
|
18
19
|
from rucio.gateway.scope import add_scope, get_scopes, list_scopes
|
|
19
20
|
from rucio.web.rest.flaskapi.authenticated_bp import AuthenticatedBlueprint
|
|
@@ -143,10 +144,10 @@ def blueprint() -> AuthenticatedBlueprint:
|
|
|
143
144
|
bp = AuthenticatedBlueprint('scopes', __name__, url_prefix='/scopes')
|
|
144
145
|
|
|
145
146
|
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=[
|
|
147
|
+
bp.add_url_rule('/', view_func=scope_view, methods=[HTTPMethod.GET.value])
|
|
148
|
+
bp.add_url_rule('/<account>/<scope>', view_func=scope_view, methods=[HTTPMethod.POST.value])
|
|
148
149
|
account_scope_list_view = AccountScopeList.as_view('account_scope_list')
|
|
149
|
-
bp.add_url_rule('/<account>/scopes', view_func=account_scope_list_view, methods=[
|
|
150
|
+
bp.add_url_rule('/<account>/scopes', view_func=account_scope_list_view, methods=[HTTPMethod.GET.value])
|
|
150
151
|
|
|
151
152
|
bp.after_request(response_headers)
|
|
152
153
|
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
|