rucio 38.2.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.

Files changed (142) hide show
  1. rucio/cli/bin_legacy/rucio.py +26 -23
  2. rucio/cli/command.py +36 -26
  3. rucio/cli/config.py +22 -7
  4. rucio/cli/did.py +2 -2
  5. rucio/cli/download.py +1 -1
  6. rucio/cli/opendata.py +78 -10
  7. rucio/cli/utils.py +13 -1
  8. rucio/client/accountclient.py +20 -19
  9. rucio/client/accountlimitclient.py +5 -4
  10. rucio/client/baseclient.py +25 -25
  11. rucio/client/configclient.py +29 -5
  12. rucio/client/credentialclient.py +2 -1
  13. rucio/client/didclient.py +33 -32
  14. rucio/client/diracclient.py +2 -1
  15. rucio/client/exportclient.py +2 -1
  16. rucio/client/importclient.py +2 -1
  17. rucio/client/lifetimeclient.py +3 -2
  18. rucio/client/lockclient.py +4 -3
  19. rucio/client/metaconventionsclient.py +5 -4
  20. rucio/client/opendataclient.py +8 -7
  21. rucio/client/pingclient.py +2 -1
  22. rucio/client/replicaclient.py +27 -26
  23. rucio/client/requestclient.py +8 -8
  24. rucio/client/richclient.py +6 -0
  25. rucio/client/rseclient.py +31 -28
  26. rucio/client/ruleclient.py +13 -12
  27. rucio/client/scopeclient.py +4 -3
  28. rucio/client/subscriptionclient.py +6 -5
  29. rucio/common/constants.py +23 -0
  30. rucio/common/exception.py +30 -0
  31. rucio/common/plugins.py +33 -15
  32. rucio/common/utils.py +3 -3
  33. rucio/core/config.py +8 -6
  34. rucio/core/credential.py +19 -26
  35. rucio/core/did.py +1 -1
  36. rucio/core/did_meta_plugins/did_column_meta.py +226 -69
  37. rucio/core/opendata.py +150 -8
  38. rucio/core/replica.py +3 -4
  39. rucio/core/request.py +1 -1
  40. rucio/core/rule.py +6 -3
  41. rucio/core/rule_grouping.py +5 -5
  42. rucio/gateway/account.py +8 -7
  43. rucio/gateway/config.py +2 -37
  44. rucio/gateway/opendata.py +2 -2
  45. rucio/gateway/request.py +2 -117
  46. rucio/gateway/rule.py +2 -2
  47. rucio/rse/protocols/webdav.py +5 -2
  48. rucio/rse/translation.py +3 -3
  49. rucio/transfertool/fts3.py +0 -19
  50. rucio/transfertool/fts3_plugins.py +3 -3
  51. rucio/vcsversion.py +3 -3
  52. rucio/web/rest/flaskapi/v1/accountlimits.py +4 -3
  53. rucio/web/rest/flaskapi/v1/accounts.py +26 -25
  54. rucio/web/rest/flaskapi/v1/archives.py +2 -2
  55. rucio/web/rest/flaskapi/v1/auth.py +15 -14
  56. rucio/web/rest/flaskapi/v1/common.py +4 -4
  57. rucio/web/rest/flaskapi/v1/config.py +57 -17
  58. rucio/web/rest/flaskapi/v1/credentials.py +3 -3
  59. rucio/web/rest/flaskapi/v1/dids.py +25 -24
  60. rucio/web/rest/flaskapi/v1/dirac.py +3 -2
  61. rucio/web/rest/flaskapi/v1/export.py +4 -2
  62. rucio/web/rest/flaskapi/v1/heartbeats.py +2 -1
  63. rucio/web/rest/flaskapi/v1/identities.py +5 -4
  64. rucio/web/rest/flaskapi/v1/import.py +3 -2
  65. rucio/web/rest/flaskapi/v1/lifetime_exceptions.py +3 -2
  66. rucio/web/rest/flaskapi/v1/locks.py +4 -3
  67. rucio/web/rest/flaskapi/v1/meta_conventions.py +4 -3
  68. rucio/web/rest/flaskapi/v1/metrics.py +2 -1
  69. rucio/web/rest/flaskapi/v1/nongrid_traces.py +2 -1
  70. rucio/web/rest/flaskapi/v1/opendata.py +7 -6
  71. rucio/web/rest/flaskapi/v1/opendata_public.py +6 -5
  72. rucio/web/rest/flaskapi/v1/ping.py +3 -2
  73. rucio/web/rest/flaskapi/v1/redirect.py +4 -3
  74. rucio/web/rest/flaskapi/v1/replicas.py +31 -31
  75. rucio/web/rest/flaskapi/v1/requests.py +7 -7
  76. rucio/web/rest/flaskapi/v1/rses.py +23 -16
  77. rucio/web/rest/flaskapi/v1/rules.py +9 -8
  78. rucio/web/rest/flaskapi/v1/scopes.py +4 -3
  79. rucio/web/rest/flaskapi/v1/subscriptions.py +9 -8
  80. rucio/web/rest/flaskapi/v1/traces.py +2 -1
  81. rucio/web/rest/flaskapi/v1/vos.py +4 -3
  82. {rucio-38.2.0.dist-info → rucio-38.4.0.dist-info}/METADATA +1 -1
  83. {rucio-38.2.0.dist-info → rucio-38.4.0.dist-info}/RECORD +142 -142
  84. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/alembic.ini.template +0 -0
  85. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/alembic_offline.ini.template +0 -0
  86. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/globus-config.yml.template +0 -0
  87. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/ldap.cfg.template +0 -0
  88. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_approval_request.tmpl +0 -0
  89. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_approved_admin.tmpl +0 -0
  90. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_approved_user.tmpl +0 -0
  91. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_denied_admin.tmpl +0 -0
  92. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_denied_user.tmpl +0 -0
  93. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/mail_templates/rule_ok_notification.tmpl +0 -0
  94. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/rse-accounts.cfg.template +0 -0
  95. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/rucio.cfg.atlas.client.template +0 -0
  96. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/rucio.cfg.template +0 -0
  97. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/etc/rucio_multi_vo.cfg.template +0 -0
  98. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/requirements.server.txt +0 -0
  99. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/tools/bootstrap.py +0 -0
  100. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/tools/merge_rucio_configs.py +0 -0
  101. {rucio-38.2.0.data → rucio-38.4.0.data}/data/rucio/tools/reset_database.py +0 -0
  102. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio +0 -0
  103. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-abacus-account +0 -0
  104. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-abacus-collection-replica +0 -0
  105. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-abacus-rse +0 -0
  106. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-admin +0 -0
  107. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-atropos +0 -0
  108. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-auditor +0 -0
  109. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-automatix +0 -0
  110. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-bb8 +0 -0
  111. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-cache-client +0 -0
  112. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-cache-consumer +0 -0
  113. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-finisher +0 -0
  114. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-poller +0 -0
  115. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-preparer +0 -0
  116. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-receiver +0 -0
  117. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-stager +0 -0
  118. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-submitter +0 -0
  119. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-conveyor-throttler +0 -0
  120. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-dark-reaper +0 -0
  121. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-dumper +0 -0
  122. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-follower +0 -0
  123. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-hermes +0 -0
  124. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-judge-cleaner +0 -0
  125. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-judge-evaluator +0 -0
  126. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-judge-injector +0 -0
  127. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-judge-repairer +0 -0
  128. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-kronos +0 -0
  129. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-minos +0 -0
  130. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-minos-temporary-expiration +0 -0
  131. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-necromancer +0 -0
  132. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-oauth-manager +0 -0
  133. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-reaper +0 -0
  134. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-replica-recoverer +0 -0
  135. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-rse-decommissioner +0 -0
  136. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-storage-consistency-actions +0 -0
  137. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-transmogrifier +0 -0
  138. {rucio-38.2.0.data → rucio-38.4.0.data}/scripts/rucio-undertaker +0 -0
  139. {rucio-38.2.0.dist-info → rucio-38.4.0.dist-info}/WHEEL +0 -0
  140. {rucio-38.2.0.dist-info → rucio-38.4.0.dist-info}/licenses/AUTHORS.rst +0 -0
  141. {rucio-38.2.0.dist-info → rucio-38.4.0.dist-info}/licenses/LICENSE +0 -0
  142. {rucio-38.2.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=['get', ])
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=['get', ])
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=['get', ])
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=['get', ])
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=['get', ])
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=['get', 'put', 'delete'])
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=['post', 'delete'])
2215
- bp.add_url_rule('/<rse>/attr/', view_func=attributes_view, methods=['get', ])
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, methods=['get', 'post', 'put', 'delete'])
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, methods=['delete', 'put'])
2220
- bp.add_url_rule('/<rse>/protocols/<scheme>/<hostname>', view_func=protocol_view, methods=['delete', 'put'])
2221
- bp.add_url_rule('/<rse>/protocols/<scheme>', view_func=protocol_view, methods=['get', 'post', 'delete', 'put'])
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=['get', ])
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=['get', ])
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=['get', ])
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=['get', 'put'])
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=['get', ])
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=['get', 'put', 'delete'])
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=['get', ])
2236
- bp.add_url_rule('/<rse>/qos_policy/<policy>', view_func=qos_policy_view, methods=['post', 'delete'])
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, methods=['get', 'delete', 'put', 'post'])
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=['get', ])
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=['get', 'put', 'delete'])
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=['get', 'post'])
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=['get', ])
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=['post', ])
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=['post', ])
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=['get', ])
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=['get', ])
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=['get', ])
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=['get', ])
147
- bp.add_url_rule('/<account>/<scope>', view_func=scope_view, methods=['post', ])
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=['get', ])
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=['get', ])
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=['get', ])
629
- bp.add_url_rule('/<account>/rules/states', view_func=states_view, methods=['get', ])
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=['get', ])
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=['get', 'post', 'put'])
634
- bp.add_url_rule('/<account>', view_func=subscription_view, methods=['get', ])
635
- bp.add_url_rule('/', view_func=subscription_view, methods=['get', ])
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=['get', ])
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=['post', ])
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=['post', ])
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=['put', 'post'])
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=['get', ])
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rucio
3
- Version: 38.2.0
3
+ Version: 38.4.0
4
4
  Summary: Rucio Package
5
5
  Home-page: https://rucio.cern.ch/
6
6
  Author: Rucio