rucio-clients 34.2.0__tar.gz → 34.3.0__tar.gz
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-clients might be problematic. Click here for more details.
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/PKG-INFO +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/bin/rucio +2 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/bin/rucio-admin +11 -10
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/accountclient.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/baseclient.py +5 -4
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/didclient.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/downloadclient.py +11 -11
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/rseclient.py +5 -5
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/ruleclient.py +2 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/uploadclient.py +6 -5
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/cache.py +3 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/config.py +37 -37
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/constants.py +61 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/didtype.py +23 -20
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/pcache.py +2 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/plugins.py +10 -9
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/policy.py +4 -3
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/schema/__init__.py +11 -7
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/types.py +14 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/utils.py +18 -19
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/bittorrent.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/cache.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/dummy.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/gfal.py +7 -7
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/globus.py +6 -5
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/gsiftp.py +2 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/http_cache.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/mock.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/ngarc.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/posix.py +7 -7
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/protocol.py +13 -12
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/rclone.py +4 -4
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/rfio.py +4 -4
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/srm.py +6 -6
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/ssh.py +6 -6
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/storm.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/webdav.py +2 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/xrootd.py +4 -4
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/vcsversion.py +3 -3
- rucio_clients-34.3.0/pyproject.toml +101 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/requirements.txt +1 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_account.py +3 -3
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_authentication.py +3 -5
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_bad_replica.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_bin_rucio.py +41 -41
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_config.py +2 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_conveyor.py +26 -25
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_conveyor_submitter.py +6 -5
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_credential.py +2 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_dataset_replicas.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_dumper_data_model.py +2 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_identity.py +2 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_import_export.py +6 -5
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_judge_repairer.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_multi_vo.py +6 -5
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_oidc.py +9 -9
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_preparer.py +7 -6
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_reaper.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_replica.py +6 -5
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_replica_recoverer.py +4 -4
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_replica_sorting.py +3 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_request.py +6 -5
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_root_proxy.py +3 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse.py +4 -3
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_expression_parser.py +2 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_lfn2path.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rule.py +8 -7
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_schema_cms.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_scope.py +2 -2
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_subscription.py +4 -3
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_transfer_plugins.py +1 -1
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_upload.py +2 -1
- rucio_clients-34.2.0/pyproject.toml +0 -61
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/AUTHORS.rst +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/ChangeLog +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/LICENSE +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/MANIFEST.in +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/README.rst +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/etc/rse-accounts.cfg.template +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/etc/rucio.cfg.atlas.client.template +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/etc/rucio.cfg.template +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/__init__.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/alembicrevision.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/__init__.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/accountlimitclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/client.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/configclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/credentialclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/diracclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/exportclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/fileclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/importclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/lifetimeclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/lockclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/metaconventionsclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/pingclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/replicaclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/requestclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/scopeclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/subscriptionclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/client/touchclient.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/__init__.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/constraints.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/exception.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/extra.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/logging.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/schema/atlas.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/schema/belleii.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/schema/cms.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/schema/domatpc.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/schema/escape.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/schema/generic.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/schema/generic_multi_vo.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/schema/icecube.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/schema/lsst.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/stomp_utils.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/stopwatch.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/common/test_rucio_server.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/__init__.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/protocols/__init__.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/rse/rsemanager.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio/version.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/lib/rucio_clients.egg-info/SOURCES.txt +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/pylintrc +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/setup.cfg +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/setup.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/setuputil.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_abacus_account.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_abacus_collection_replica.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_abacus_rse.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_account_limits.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_api_external_representation.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_archive.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_auditor.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_auditor_hdfs.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_auditor_srmdumps.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_automatix.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_bb8.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_belleii.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_boolean.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_clients.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_common_types.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_counter.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_curl.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_daemons.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_db.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_did.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_did_meta_plugins.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_didtype.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_download.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_dumper.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_dumper_consistency.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_dumper_path_parsing.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_filter_engine.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_heartbeat.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_hermes.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_impl_upload_download.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_judge_cleaner.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_judge_evaluator.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_judge_injector.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_lifetime.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_message.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_meta_conventions.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_meta_did.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_module_import.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_monitor.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_naming_convention.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_oauthmanager.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_permission.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_pfns.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_ping.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_qos.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_quarantined_replica.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_redirect.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_protocol_gfal2.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_protocol_gfal2_impl.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_protocol_posix.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_protocol_rclone.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_protocol_rsync.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_protocol_srm.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_protocol_ssh.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_protocol_webdav.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_protocol_xrootd.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rse_selector.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_rucio_server.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_throttler.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_tpc.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_trace.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_transfer.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_undertaker.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tests/test_utils.py +0 -0
- {rucio_clients-34.2.0 → rucio_clients-34.3.0}/tools/merge_rucio_configs.py +0 -0
|
@@ -166,7 +166,7 @@ def exception_handler(function):
|
|
|
166
166
|
used_account = '%s (from rucio.cfg)' % config_get('client', 'account')
|
|
167
167
|
except:
|
|
168
168
|
pass
|
|
169
|
-
try: # are we
|
|
169
|
+
try: # are we overridden by the environment?
|
|
170
170
|
used_account = '%s (from RUCIO_ACCOUNT)' % os.environ['RUCIO_ACCOUNT']
|
|
171
171
|
except:
|
|
172
172
|
pass
|
|
@@ -1550,7 +1550,7 @@ def list_rse_attributes(args):
|
|
|
1550
1550
|
"""
|
|
1551
1551
|
client = get_client(args)
|
|
1552
1552
|
attributes = client.list_rse_attributes(rse=args.rse)
|
|
1553
|
-
table = [(k + ':', str(v)) for (k, v) in sorted(attributes.items())] # columns
|
|
1553
|
+
table = [(k + ':', str(v)) for (k, v) in sorted(attributes.items())] # columns have mixed datatypes
|
|
1554
1554
|
print(tabulate(table, tablefmt='plain', disable_numparse=True)) # disabling number parsing
|
|
1555
1555
|
return SUCCESS
|
|
1556
1556
|
|
|
@@ -33,6 +33,7 @@ from tabulate import tabulate
|
|
|
33
33
|
from rucio import version
|
|
34
34
|
from rucio.client import Client
|
|
35
35
|
from rucio.common.config import config_get
|
|
36
|
+
from rucio.common.constants import RseAttr
|
|
36
37
|
from rucio.common.exception import (
|
|
37
38
|
AccessDenied,
|
|
38
39
|
AccountNotFound,
|
|
@@ -385,7 +386,7 @@ def set_limits(args):
|
|
|
385
386
|
try:
|
|
386
387
|
byte_limit = int(limit_input)
|
|
387
388
|
except ValueError:
|
|
388
|
-
logger.error('The limit could not be set. Either you misspelled infinity or your input could not be converted to integer or you used a wrong pattern. Please use a format like 10GB with B,KB,MB,GB,TB,PB as units (not case
|
|
389
|
+
logger.error('The limit could not be set. Either you misspelled infinity or your input could not be converted to integer or you used a wrong pattern. Please use a format like 10GB with B,KB,MB,GB,TB,PB as units (not case sensitive)')
|
|
389
390
|
return FAILURE
|
|
390
391
|
|
|
391
392
|
client.set_account_limit(account=args.account, rse=args.rse, bytes_=byte_limit, locality=locality)
|
|
@@ -1244,7 +1245,7 @@ def list_pfns(args):
|
|
|
1244
1245
|
if not rse_info['deterministic']:
|
|
1245
1246
|
logger.warning('This is a non-deterministic site, so the real PFN might be different from the on suggested')
|
|
1246
1247
|
rse_attr = client.list_rse_attributes(rse)
|
|
1247
|
-
naming_convention = rse_attr.get(
|
|
1248
|
+
naming_convention = rse_attr.get(RseAttr.NAMING_CONVENTION, None)
|
|
1248
1249
|
parents = [did for did in client.list_parent_dids(scope, name)]
|
|
1249
1250
|
if len(parents) > 1:
|
|
1250
1251
|
logger.warning('The file has multiple parents')
|
|
@@ -1383,7 +1384,7 @@ def get_parser():
|
|
|
1383
1384
|
oparser.add_argument('--oidc-refresh-lifetime', dest='oidc_refresh_lifetime', default=None, help='Max lifetime in hours for this an access token will be refreshed by asynchronous Rucio daemon. '
|
|
1384
1385
|
+ 'If not specified, refresh will be stopped after 4 days. This option is effective only if --oidc-scope includes offline_access scope for a refresh token to be granted to Rucio.') # NOQA: W503
|
|
1385
1386
|
oparser.add_argument('--oidc-issuer', dest='oidc_issuer', default=None,
|
|
1386
|
-
help='Defines which Identity Provider is
|
|
1387
|
+
help='Defines which Identity Provider is going to be used. The issuer string must correspond '
|
|
1387
1388
|
+ 'to the keys configured in the /etc/idpsecrets.json auth server configuration file.') # NOQA: W503
|
|
1388
1389
|
|
|
1389
1390
|
# Options for the x509 auth_strategy
|
|
@@ -1432,7 +1433,7 @@ def get_parser():
|
|
|
1432
1433
|
'"""""""""""""\n'
|
|
1433
1434
|
'::\n'
|
|
1434
1435
|
'\n'
|
|
1435
|
-
' $ rucio-admin account list --type \
|
|
1436
|
+
' $ rucio-admin account list --type USER\n'
|
|
1436
1437
|
'\n')
|
|
1437
1438
|
list_account_parser.add_argument('--type', dest='account_type', action='store', help='Account Type (USER, GROUP, SERVICE)')
|
|
1438
1439
|
list_account_parser.add_argument('--id', dest='identity', action='store', help='Identity (e.g. DN)')
|
|
@@ -1708,7 +1709,7 @@ def get_parser():
|
|
|
1708
1709
|
' $ rucio-admin identity delete --account jdoe --type X509 --id \'CN=Joe Doe,CN=707658,CN=jdoe,OU=Users,OU=Organic Units,DC=cern,DC=ch\'\n'
|
|
1709
1710
|
' Deleted identity: CN=Joe Doe,CN=707658,CN=jdoe,OU=Users,OU=Organic Units,DC=cern,DC=ch\n'
|
|
1710
1711
|
'\n'
|
|
1711
|
-
'Note: if the identity was
|
|
1712
|
+
'Note: if the identity was accidentally deleted, use add option.\n'
|
|
1712
1713
|
'\n')
|
|
1713
1714
|
identity_delete_parser.set_defaults(which='identity_delete')
|
|
1714
1715
|
identity_delete_parser.add_argument('--account', dest='account', action='store', help='Account name', required=True)
|
|
@@ -1956,7 +1957,7 @@ def get_parser():
|
|
|
1956
1957
|
' $ rucio-admin rse add-protocol --hostname jdoes.test.org --scheme gsiftp --prefix \'/atlasdatadisk/rucio/\' --port 8443 JDOE_DATADISK\n'
|
|
1957
1958
|
'\n'
|
|
1958
1959
|
'Note: no printed stdout.\n'
|
|
1959
|
-
'Note: examples of optional
|
|
1960
|
+
'Note: examples of optional parameters::\n'
|
|
1960
1961
|
'\n'
|
|
1961
1962
|
' --space-token DATADISK\n'
|
|
1962
1963
|
' --web-service-path \'/srm/managerv2?SFN=\'\n'
|
|
@@ -2110,7 +2111,7 @@ def get_parser():
|
|
|
2110
2111
|
|
|
2111
2112
|
# The config subparser
|
|
2112
2113
|
config_parser = subparsers.add_parser('config',
|
|
2113
|
-
help='Configuration methods. The global configuration of data
|
|
2114
|
+
help='Configuration methods. The global configuration of data management system can by modified.',
|
|
2114
2115
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
2115
2116
|
epilog='''e.g. quotas, daemons, rses''')
|
|
2116
2117
|
config_subparser = config_parser.add_subparsers(dest='config_subcommand', **required_arg)
|
|
@@ -2311,9 +2312,9 @@ def get_parser():
|
|
|
2311
2312
|
declare_bad_file_replicas_parser.add_argument('--inputfile', dest='inputfile', nargs='?', action='store', help='File containing list of bad items')
|
|
2312
2313
|
declare_bad_file_replicas_parser.add_argument('--allow-collection', dest='allow_collection', action='store_true', help='Allow passing a collection DID as bad item')
|
|
2313
2314
|
|
|
2314
|
-
declare_bad_file_replicas_parser.add_argument('--lfns', dest='lfns', nargs='?', action='store', help='File
|
|
2315
|
-
declare_bad_file_replicas_parser.add_argument('--scope', dest='scope', nargs='?', action='store', help='Common scope for bad replicas
|
|
2316
|
-
declare_bad_file_replicas_parser.add_argument('--rse', dest='rse', nargs='?', action='store', help='Common RSE for bad replicas
|
|
2315
|
+
declare_bad_file_replicas_parser.add_argument('--lfns', dest='lfns', nargs='?', action='store', help='File containing list of LFNs for bad replicas. Requires --rse and --scope')
|
|
2316
|
+
declare_bad_file_replicas_parser.add_argument('--scope', dest='scope', nargs='?', action='store', help='Common scope for bad replicas specified with LFN list, ignored without --lfns')
|
|
2317
|
+
declare_bad_file_replicas_parser.add_argument('--rse', dest='rse', nargs='?', action='store', help='Common RSE for bad replicas specified with LFN list, ignored without --lfns')
|
|
2317
2318
|
|
|
2318
2319
|
# The declare-temporary-unavailable command
|
|
2319
2320
|
declare_temporary_unavailable_replicas_parser = rep_subparser.add_parser('declare-temporary-unavailable',
|
|
@@ -112,7 +112,7 @@ class AccountClient(BaseClient):
|
|
|
112
112
|
|
|
113
113
|
:param type: The account type
|
|
114
114
|
:param identity: The identity key name. For example x509 DN, or a username.
|
|
115
|
-
:param filters: A
|
|
115
|
+
:param filters: A dictionary key:account attribute to use for the filtering
|
|
116
116
|
|
|
117
117
|
:return: a list containing account info dictionary for all rucio accounts.
|
|
118
118
|
:raises AccountNotFound: if account doesn't exist.
|
|
@@ -22,12 +22,13 @@ import os
|
|
|
22
22
|
import secrets
|
|
23
23
|
import sys
|
|
24
24
|
import time
|
|
25
|
+
from collections.abc import Generator
|
|
25
26
|
from configparser import NoOptionError, NoSectionError
|
|
26
27
|
from logging import Logger
|
|
27
28
|
from os import environ, fdopen, geteuid, makedirs, path
|
|
28
29
|
from shutil import move
|
|
29
30
|
from tempfile import mkstemp
|
|
30
|
-
from typing import Any,
|
|
31
|
+
from typing import Any, Optional
|
|
31
32
|
from urllib.parse import urlparse
|
|
32
33
|
|
|
33
34
|
import requests
|
|
@@ -235,7 +236,7 @@ class BaseClient:
|
|
|
235
236
|
if self.auth_type == 'oidc':
|
|
236
237
|
if not creds:
|
|
237
238
|
creds = {}
|
|
238
|
-
# if there are
|
|
239
|
+
# if there are default values, check if rucio.cfg does not specify them, otherwise put default
|
|
239
240
|
if 'oidc_refresh_lifetime' not in creds or creds['oidc_refresh_lifetime'] is None:
|
|
240
241
|
creds['oidc_refresh_lifetime'] = config_get('client', 'oidc_refresh_lifetime', False, None)
|
|
241
242
|
if 'oidc_issuer' not in creds or creds['oidc_issuer'] is None:
|
|
@@ -615,7 +616,7 @@ class BaseClient:
|
|
|
615
616
|
|
|
616
617
|
else:
|
|
617
618
|
print("\nAccording to the OAuth2/OIDC standard you should NOT be sharing \n"
|
|
618
|
-
+ "your password with any 3rd party
|
|
619
|
+
+ "your password with any 3rd party application, therefore, \n" # NOQA: W503
|
|
619
620
|
+ "we strongly discourage you from following this --oidc-auto approach.") # NOQA: W503
|
|
620
621
|
print("-------------------------------------------------------------------------")
|
|
621
622
|
auth_res = self._send_request(auth_url, get_token=True)
|
|
@@ -658,7 +659,7 @@ class BaseClient:
|
|
|
658
659
|
|
|
659
660
|
self.auth_token = result.headers['x-rucio-auth-token']
|
|
660
661
|
if self.auth_oidc_refresh_active:
|
|
661
|
-
self.logger.debug("
|
|
662
|
+
self.logger.debug("Resetting the token expiration epoch file content.")
|
|
662
663
|
# reset the token expiration epoch file content
|
|
663
664
|
# at new CLI OIDC authentication
|
|
664
665
|
self.token_exp_epoch = None
|
|
@@ -47,7 +47,7 @@ class DIDClient(BaseClient):
|
|
|
47
47
|
path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), 'dids', 'search'])
|
|
48
48
|
|
|
49
49
|
# stringify dates.
|
|
50
|
-
if isinstance(filters, dict): # backwards
|
|
50
|
+
if isinstance(filters, dict): # backwards compatibility for filters as single {}
|
|
51
51
|
filters = [filters]
|
|
52
52
|
for or_group in filters:
|
|
53
53
|
for key, value in or_group.items():
|
|
@@ -265,7 +265,7 @@ class DownloadClient:
|
|
|
265
265
|
force_scheme - Optional: force a specific scheme to download this item. (Default: None)
|
|
266
266
|
base_dir - Optional: base directory where the downloaded files will be stored. (Default: '.')
|
|
267
267
|
no_subdir - Optional: If true, files are written directly into base_dir. (Default: False)
|
|
268
|
-
nrandom - Optional: if the DID addresses a dataset, nrandom files will be randomly
|
|
268
|
+
nrandom - Optional: if the DID addresses a dataset, nrandom files will be randomly chosen for download from the dataset
|
|
269
269
|
ignore_checksum - Optional: If true, skips the checksum validation between the downloaded file and the rucio catalouge. (Default: False)
|
|
270
270
|
transfer_timeout - Optional: Timeout time for the download protocols. (Default: None)
|
|
271
271
|
transfer_speed_timeout - Optional: Minimum allowed transfer speed (in KBps). Ignored if transfer_timeout set. Otherwise, used to compute default timeout (Default: 500)
|
|
@@ -671,10 +671,10 @@ class DownloadClient:
|
|
|
671
671
|
|
|
672
672
|
# if the file was downloaded with success, it can be linked to pcache
|
|
673
673
|
if pcache:
|
|
674
|
-
logger(logging.INFO, 'File %s is going to be
|
|
674
|
+
logger(logging.INFO, 'File %s is going to be registered into pcache.' % dest_file_path)
|
|
675
675
|
try:
|
|
676
676
|
pcache_state, hardlink_state = pcache.check_and_link(src=pfn, storage_root=storage_prefix, local_src=first_dest_file_path)
|
|
677
|
-
logger(logging.INFO, 'File %s is now
|
|
677
|
+
logger(logging.INFO, 'File %s is now registered into pcache.' % first_dest_file_path)
|
|
678
678
|
except Exception as e:
|
|
679
679
|
logger(logging.WARNING, 'Failed to load file to pcache: %s' % str(e))
|
|
680
680
|
|
|
@@ -741,7 +741,7 @@ class DownloadClient:
|
|
|
741
741
|
rse - Optional: rse name (e.g. 'CERN-PROD_DATADISK') or rse expression from where to download
|
|
742
742
|
base_dir - Optional: base directory where the downloaded files will be stored. (Default: '.')
|
|
743
743
|
no_subdir - Optional: If true, files are written directly into base_dir. (Default: False)
|
|
744
|
-
nrandom - Optional: if the DID addresses a dataset, nrandom files will be randomly
|
|
744
|
+
nrandom - Optional: if the DID addresses a dataset, nrandom files will be randomly chosen for download from the dataset
|
|
745
745
|
ignore_checksum - Optional: If true, skips the checksum validation between the downloaded file and the rucio catalouge. (Default: False)
|
|
746
746
|
check_local_with_filesize_only - Optional: If true, already downloaded files will not be validated by checksum.
|
|
747
747
|
|
|
@@ -798,7 +798,7 @@ class DownloadClient:
|
|
|
798
798
|
|
|
799
799
|
:param rpc_secret: the secret for the RPC proxy
|
|
800
800
|
|
|
801
|
-
:returns: a
|
|
801
|
+
:returns: a tuple with the process and the rpc proxy objects
|
|
802
802
|
|
|
803
803
|
:raises RucioException: if the process or the proxy could not be created
|
|
804
804
|
"""
|
|
@@ -958,7 +958,7 @@ class DownloadClient:
|
|
|
958
958
|
# workaround: only consider first dest file path for aria2c download
|
|
959
959
|
dest_file_path = next(iter(item['dest_file_paths']))
|
|
960
960
|
|
|
961
|
-
# ensure we
|
|
961
|
+
# ensure we didn't miss the active state (e.g. a very fast download)
|
|
962
962
|
start_time = item.setdefault('transferStart', time.time())
|
|
963
963
|
end_time = item.setdefault('transferEnd', time.time())
|
|
964
964
|
|
|
@@ -1093,7 +1093,7 @@ class DownloadClient:
|
|
|
1093
1093
|
self.extraction_tools = [tool for tool in self.extraction_tools if tool.is_useable()]
|
|
1094
1094
|
if len(self.extraction_tools) < 1:
|
|
1095
1095
|
logger(logging.WARNING, 'Archive resolution is enabled but no extraction tool is available. '
|
|
1096
|
-
'Sources whose protocol
|
|
1096
|
+
'Sources whose protocol does not support extraction will not be considered for download.')
|
|
1097
1097
|
|
|
1098
1098
|
# if excluding tapes, we need to list them first
|
|
1099
1099
|
tape_rses = []
|
|
@@ -1110,7 +1110,7 @@ class DownloadClient:
|
|
|
1110
1110
|
for item in input_items:
|
|
1111
1111
|
resolved_dids = list(self._resolve_one_item_dids(item))
|
|
1112
1112
|
if not resolved_dids:
|
|
1113
|
-
logger(logging.WARNING, 'An item
|
|
1113
|
+
logger(logging.WARNING, 'An item did not have any DIDs after resolving the input: %s.' % item.get('did', item))
|
|
1114
1114
|
item['dids'] = resolved_dids
|
|
1115
1115
|
for did in resolved_dids:
|
|
1116
1116
|
did_to_input_items.setdefault(DID(did), []).append(item)
|
|
@@ -1342,7 +1342,7 @@ class DownloadClient:
|
|
|
1342
1342
|
file_item['dest_file_paths'] = list(dest_file_paths)
|
|
1343
1343
|
file_item['temp_file_path'] = '%s.part' % file_item['dest_file_paths'][0]
|
|
1344
1344
|
|
|
1345
|
-
# the file did str
|
|
1345
|
+
# the file did str is not an unique key for this dict because multiple calls of list_replicas
|
|
1346
1346
|
# could result in the same DID multiple times. So we're using the id of the dictionary objects
|
|
1347
1347
|
fiid = id(file_item)
|
|
1348
1348
|
fiid_to_file_item[fiid] = file_item
|
|
@@ -1500,7 +1500,7 @@ class DownloadClient:
|
|
|
1500
1500
|
Splits a given DID string (e.g. 'scope1:name.file') into its scope and name part
|
|
1501
1501
|
(This function is meant to be used as class internal only)
|
|
1502
1502
|
|
|
1503
|
-
:param did_str: the DID string that will be
|
|
1503
|
+
:param did_str: the DID string that will be split
|
|
1504
1504
|
|
|
1505
1505
|
:returns: the scope- and name part of the given DID
|
|
1506
1506
|
|
|
@@ -1538,7 +1538,7 @@ class DownloadClient:
|
|
|
1538
1538
|
:param dest_dir_name: name of the destination directory
|
|
1539
1539
|
:param no_subdir: if no subdirectory should be created
|
|
1540
1540
|
|
|
1541
|
-
:returns: the
|
|
1541
|
+
:returns: the absolute path of the destination directory
|
|
1542
1542
|
"""
|
|
1543
1543
|
# append dest_dir_name, if subdir should be used
|
|
1544
1544
|
if dest_dir_name.startswith('/'):
|
|
@@ -83,7 +83,7 @@ class RSEClient(BaseClient):
|
|
|
83
83
|
Update RSE properties like availability or name.
|
|
84
84
|
|
|
85
85
|
:param rse: the name of the new rse.
|
|
86
|
-
:param parameters: A
|
|
86
|
+
:param parameters: A dictionary with property (name, read, write, delete as keys).
|
|
87
87
|
"""
|
|
88
88
|
path = 'rses/' + rse
|
|
89
89
|
url = build_url(choice(self.list_hosts), path=path)
|
|
@@ -341,7 +341,7 @@ class RSEClient(BaseClient):
|
|
|
341
341
|
|
|
342
342
|
:param rse: the RSE name.
|
|
343
343
|
:param scheme: identifier of the protocol.
|
|
344
|
-
:param data: A dict providing the new values of the protocol
|
|
344
|
+
:param data: A dict providing the new values of the protocol attributes.
|
|
345
345
|
Keys must match column names in database.
|
|
346
346
|
:param hostname: hostname of the protocol.
|
|
347
347
|
:param port: port of the protocol.
|
|
@@ -512,7 +512,7 @@ class RSEClient(BaseClient):
|
|
|
512
512
|
:param rse: The RSE name.
|
|
513
513
|
:param filters: dictionary of attributes by which the results should be filtered.
|
|
514
514
|
|
|
515
|
-
:returns: list of
|
|
515
|
+
:returns: list of dictionaries.
|
|
516
516
|
"""
|
|
517
517
|
path = [self.RSE_BASEURL, rse, 'usage', 'history']
|
|
518
518
|
path = '/'.join(path)
|
|
@@ -593,7 +593,7 @@ class RSEClient(BaseClient):
|
|
|
593
593
|
|
|
594
594
|
:param source: The source.
|
|
595
595
|
:param destination: The destination.
|
|
596
|
-
:param parameters: A
|
|
596
|
+
:param parameters: A dictionary with property.
|
|
597
597
|
"""
|
|
598
598
|
path = [self.RSE_BASEURL, source, 'distances', destination]
|
|
599
599
|
path = '/'.join(path)
|
|
@@ -612,7 +612,7 @@ class RSEClient(BaseClient):
|
|
|
612
612
|
|
|
613
613
|
:param source: The source.
|
|
614
614
|
:param destination: The destination.
|
|
615
|
-
:param parameters: A
|
|
615
|
+
:param parameters: A dictionary with property.
|
|
616
616
|
"""
|
|
617
617
|
path = [self.RSE_BASEURL, source, 'distances', destination]
|
|
618
618
|
path = '/'.join(path)
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
from collections.abc import Sequence
|
|
15
16
|
from json import dumps, loads
|
|
16
17
|
from typing import Any, Optional, Union
|
|
17
18
|
from urllib.parse import quote_plus
|
|
@@ -30,7 +31,7 @@ class RuleClient(BaseClient):
|
|
|
30
31
|
|
|
31
32
|
def add_replication_rule(
|
|
32
33
|
self,
|
|
33
|
-
dids:
|
|
34
|
+
dids: Sequence[dict[str, str]],
|
|
34
35
|
copies: int,
|
|
35
36
|
rse_expression: str,
|
|
36
37
|
priority: int = 3,
|
|
@@ -25,6 +25,7 @@ import time
|
|
|
25
25
|
from rucio import version
|
|
26
26
|
from rucio.client.client import Client
|
|
27
27
|
from rucio.common.config import config_get, config_get_bool, config_get_int
|
|
28
|
+
from rucio.common.constants import RseAttr
|
|
28
29
|
from rucio.common.exception import (
|
|
29
30
|
DataIdentifierAlreadyExists,
|
|
30
31
|
DataIdentifierNotFound,
|
|
@@ -195,8 +196,8 @@ class UploadClient:
|
|
|
195
196
|
rse_attributes = self.client.list_rse_attributes(rse)
|
|
196
197
|
except:
|
|
197
198
|
logger(logging.WARNING, 'Attributes of the RSE: %s not available.' % rse)
|
|
198
|
-
if (self.client_location and 'lan' in rse_settings['domain'] and
|
|
199
|
-
if self.client_location['site'] == rse_attributes[
|
|
199
|
+
if (self.client_location and 'lan' in rse_settings['domain'] and RseAttr.SITE in rse_attributes):
|
|
200
|
+
if self.client_location['site'] == rse_attributes[RseAttr.SITE]:
|
|
200
201
|
domain = 'lan'
|
|
201
202
|
logger(logging.DEBUG, '{} domain is used for the upload'.format(domain))
|
|
202
203
|
|
|
@@ -458,7 +459,7 @@ class UploadClient:
|
|
|
458
459
|
try:
|
|
459
460
|
guid = output.splitlines()[-1].split()[0].replace('-', '').lower()
|
|
460
461
|
except Exception:
|
|
461
|
-
raise RucioException('Error extracting GUID from
|
|
462
|
+
raise RucioException('Error extracting GUID from output of pool_extractFileIdentifier')
|
|
462
463
|
elif guid:
|
|
463
464
|
guid = guid.replace('-', '')
|
|
464
465
|
else:
|
|
@@ -674,7 +675,7 @@ class UploadClient:
|
|
|
674
675
|
raise RSEOperationNotSupported(str(error))
|
|
675
676
|
|
|
676
677
|
# Is stat after that upload allowed?
|
|
677
|
-
skip_upload_stat = rse_attributes.get(
|
|
678
|
+
skip_upload_stat = rse_attributes.get(RseAttr.SKIP_UPLOAD_STAT, False)
|
|
678
679
|
self.logger(logging.DEBUG, 'skip_upload_stat=%s', skip_upload_stat)
|
|
679
680
|
|
|
680
681
|
# Checksum verification, obsolete, see Gabriele changes.
|
|
@@ -740,7 +741,7 @@ class UploadClient:
|
|
|
740
741
|
|
|
741
742
|
def _create_protocol(self, rse_settings, operation, impl=None, force_scheme=None, domain='wan'):
|
|
742
743
|
"""
|
|
743
|
-
|
|
744
|
+
Protocol construction.
|
|
744
745
|
:param rse_settings: rse_settings
|
|
745
746
|
:param operation: activity, e.g. read, write, delete etc.
|
|
746
747
|
:param force_scheme: custom scheme
|
|
@@ -23,6 +23,8 @@ if TYPE_CHECKING:
|
|
|
23
23
|
from collections.abc import Callable
|
|
24
24
|
from typing import Optional
|
|
25
25
|
|
|
26
|
+
from dogpile.cache.region import CacheRegion
|
|
27
|
+
|
|
26
28
|
CACHE_URL = config_get('cache', 'url', False, '127.0.0.1:11211', check_config_table=False)
|
|
27
29
|
|
|
28
30
|
ENABLE_CACHING = True
|
|
@@ -47,7 +49,7 @@ def make_region_memcached(
|
|
|
47
49
|
expiration_time: int,
|
|
48
50
|
function_key_generator: "Optional[Callable]" = None,
|
|
49
51
|
memcached_expire_time: "Optional[int]" = None
|
|
50
|
-
):
|
|
52
|
+
) -> "CacheRegion":
|
|
51
53
|
"""
|
|
52
54
|
Make and configure a dogpile.cache.pymemcache region
|
|
53
55
|
"""
|
|
@@ -18,7 +18,7 @@ import configparser
|
|
|
18
18
|
import json
|
|
19
19
|
import os
|
|
20
20
|
from collections.abc import Callable
|
|
21
|
-
from typing import TYPE_CHECKING, Optional, TypeVar, Union, overload
|
|
21
|
+
from typing import TYPE_CHECKING, Any, Optional, TypeVar, Union, overload
|
|
22
22
|
|
|
23
23
|
from rucio.common import exception
|
|
24
24
|
from rucio.common.exception import ConfigNotFound, DatabaseException
|
|
@@ -30,7 +30,7 @@ if TYPE_CHECKING:
|
|
|
30
30
|
from sqlalchemy.orm import Session
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
def convert_to_any_type(value) -> Union[bool, int, float, str]:
|
|
33
|
+
def convert_to_any_type(value: str) -> Union[bool, int, float, str]:
|
|
34
34
|
if value.lower() in ['true', 'yes', 'on']:
|
|
35
35
|
return True
|
|
36
36
|
elif value.lower() in ['false', 'no', 'off']:
|
|
@@ -45,7 +45,7 @@ def convert_to_any_type(value) -> Union[bool, int, float, str]:
|
|
|
45
45
|
return value
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
def _convert_to_boolean(value):
|
|
48
|
+
def _convert_to_boolean(value: Union[str, bool]) -> bool:
|
|
49
49
|
if isinstance(value, bool):
|
|
50
50
|
return value
|
|
51
51
|
if value.lower() in ['true', 'yes', 'on', '1']:
|
|
@@ -297,7 +297,7 @@ def config_get_int(
|
|
|
297
297
|
def config_get_int(
|
|
298
298
|
section: str,
|
|
299
299
|
option: str,
|
|
300
|
-
raise_exception,
|
|
300
|
+
raise_exception: bool,
|
|
301
301
|
default: _T = ...,
|
|
302
302
|
*,
|
|
303
303
|
check_config_table: bool = ...,
|
|
@@ -309,14 +309,14 @@ def config_get_int(
|
|
|
309
309
|
|
|
310
310
|
|
|
311
311
|
def config_get_int(
|
|
312
|
-
section,
|
|
313
|
-
option,
|
|
314
|
-
raise_exception=True,
|
|
312
|
+
section: str,
|
|
313
|
+
option: str,
|
|
314
|
+
raise_exception: bool = True,
|
|
315
315
|
default=None,
|
|
316
|
-
check_config_table=True,
|
|
317
|
-
session=None,
|
|
318
|
-
use_cache=True,
|
|
319
|
-
expiration_time=900,
|
|
316
|
+
check_config_table: bool = True,
|
|
317
|
+
session: "Optional[Session]" = None,
|
|
318
|
+
use_cache: bool = True,
|
|
319
|
+
expiration_time: int = 900,
|
|
320
320
|
):
|
|
321
321
|
"""
|
|
322
322
|
Return the integer value for a given option in a section
|
|
@@ -395,14 +395,14 @@ def config_get_float(
|
|
|
395
395
|
|
|
396
396
|
|
|
397
397
|
def config_get_float(
|
|
398
|
-
section,
|
|
399
|
-
option,
|
|
400
|
-
raise_exception=True,
|
|
398
|
+
section: str,
|
|
399
|
+
option: str,
|
|
400
|
+
raise_exception: bool = True,
|
|
401
401
|
default=None,
|
|
402
|
-
check_config_table=True,
|
|
403
|
-
session=None,
|
|
404
|
-
use_cache=True,
|
|
405
|
-
expiration_time=900,
|
|
402
|
+
check_config_table: bool = True,
|
|
403
|
+
session: "Optional[Session]" = None,
|
|
404
|
+
use_cache: bool = True,
|
|
405
|
+
expiration_time: int = 900,
|
|
406
406
|
):
|
|
407
407
|
"""
|
|
408
408
|
Return the floating point value for a given option in a section
|
|
@@ -482,14 +482,14 @@ def config_get_bool(
|
|
|
482
482
|
|
|
483
483
|
|
|
484
484
|
def config_get_bool(
|
|
485
|
-
section,
|
|
486
|
-
option,
|
|
487
|
-
raise_exception=True,
|
|
485
|
+
section: str,
|
|
486
|
+
option: str,
|
|
487
|
+
raise_exception: bool = True,
|
|
488
488
|
default=None,
|
|
489
|
-
check_config_table=True,
|
|
490
|
-
session=None,
|
|
491
|
-
use_cache=True,
|
|
492
|
-
expiration_time=900,
|
|
489
|
+
check_config_table: bool = True,
|
|
490
|
+
session: "Optional[Session]" = None,
|
|
491
|
+
use_cache: bool = True,
|
|
492
|
+
expiration_time: int = 900,
|
|
493
493
|
):
|
|
494
494
|
"""
|
|
495
495
|
Return the boolean value for a given option in a section
|
|
@@ -569,14 +569,14 @@ def config_get_list(
|
|
|
569
569
|
|
|
570
570
|
|
|
571
571
|
def config_get_list(
|
|
572
|
-
section,
|
|
573
|
-
option,
|
|
574
|
-
raise_exception=True,
|
|
572
|
+
section: str,
|
|
573
|
+
option: str,
|
|
574
|
+
raise_exception: bool = True,
|
|
575
575
|
default=None,
|
|
576
|
-
check_config_table=True,
|
|
577
|
-
session=None,
|
|
578
|
-
use_cache=True,
|
|
579
|
-
expiration_time=900,
|
|
576
|
+
check_config_table: bool = True,
|
|
577
|
+
session: "Optional[Session]" = None,
|
|
578
|
+
use_cache: bool = True,
|
|
579
|
+
expiration_time: int = 900,
|
|
580
580
|
):
|
|
581
581
|
"""
|
|
582
582
|
Return a list for a given option in a section
|
|
@@ -691,7 +691,7 @@ def config_remove_option(section: str, option: str) -> bool:
|
|
|
691
691
|
return get_config().remove_option(section, option)
|
|
692
692
|
|
|
693
693
|
|
|
694
|
-
def config_set(section: str, option: str, value: str):
|
|
694
|
+
def config_set(section: str, option: str, value: str) -> None:
|
|
695
695
|
"""
|
|
696
696
|
Set a configuration option in a given section.
|
|
697
697
|
|
|
@@ -704,7 +704,7 @@ def config_set(section: str, option: str, value: str):
|
|
|
704
704
|
return get_config().set(section, option, value)
|
|
705
705
|
|
|
706
706
|
|
|
707
|
-
def get_config_dirs():
|
|
707
|
+
def get_config_dirs() -> list[str]:
|
|
708
708
|
"""
|
|
709
709
|
Returns all available configuration directories in order:
|
|
710
710
|
- $RUCIO_HOME/etc/
|
|
@@ -724,7 +724,7 @@ def get_config_dirs():
|
|
|
724
724
|
return configdirs
|
|
725
725
|
|
|
726
726
|
|
|
727
|
-
def get_lfn2pfn_algorithm_default():
|
|
727
|
+
def get_lfn2pfn_algorithm_default() -> str:
|
|
728
728
|
"""Returns the default algorithm name for LFN2PFN translation for this server."""
|
|
729
729
|
default_lfn2pfn = "hash"
|
|
730
730
|
try:
|
|
@@ -734,7 +734,7 @@ def get_lfn2pfn_algorithm_default():
|
|
|
734
734
|
return default_lfn2pfn
|
|
735
735
|
|
|
736
736
|
|
|
737
|
-
def get_rse_credentials(path_to_credentials_file: Optional[Union[str, os.PathLike]] = None):
|
|
737
|
+
def get_rse_credentials(path_to_credentials_file: Optional[Union[str, os.PathLike]] = None) -> dict[str, Any]:
|
|
738
738
|
""" Returns credentials for RSEs. """
|
|
739
739
|
|
|
740
740
|
path = ''
|
|
@@ -765,7 +765,7 @@ def get_config() -> configparser.ConfigParser:
|
|
|
765
765
|
return __CONFIG.parser
|
|
766
766
|
|
|
767
767
|
|
|
768
|
-
def clean_cached_config():
|
|
768
|
+
def clean_cached_config() -> None:
|
|
769
769
|
"""Deletes the cached config singleton instance."""
|
|
770
770
|
global __CONFIG
|
|
771
771
|
__CONFIG = None
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import enum
|
|
16
16
|
from collections import namedtuple
|
|
17
|
+
from typing import Literal, get_args
|
|
17
18
|
|
|
18
19
|
from rucio.common.config import config_get_bool
|
|
19
20
|
|
|
@@ -47,7 +48,8 @@ if config_get_bool('transfers', 'srm_https_compatibility', raise_exception=False
|
|
|
47
48
|
SCHEME_MAP['srm'].append('davs')
|
|
48
49
|
SCHEME_MAP['davs'].append('srm')
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
SUPPORTED_PROTOCOLS_LITERAL = Literal['gsiftp', 'srm', 'root', 'davs', 'http', 'https', 'file', 'storm', 'srm+https', 'scp', 'rsync', 'rclone', 'magnet']
|
|
52
|
+
SUPPORTED_PROTOCOLS = list(get_args(SUPPORTED_PROTOCOLS_LITERAL))
|
|
51
53
|
|
|
52
54
|
FTS_STATE = namedtuple('FTS_STATE', ['SUBMITTED', 'READY', 'ACTIVE', 'FAILED', 'FINISHED', 'FINISHEDDIRTY', 'NOT_USED',
|
|
53
55
|
'CANCELED'])('SUBMITTED', 'READY', 'ACTIVE', 'FAILED', 'FINISHED', 'FINISHEDDIRTY',
|
|
@@ -89,3 +91,61 @@ class HermesService(str, enum.Enum):
|
|
|
89
91
|
ELASTIC = "ELASTIC"
|
|
90
92
|
EMAIL = "EMAIL"
|
|
91
93
|
ACTIVEMQ = "ACTIVEMQ"
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class RseAttr:
|
|
97
|
+
|
|
98
|
+
"""
|
|
99
|
+
List of functional RSE attributes.
|
|
100
|
+
|
|
101
|
+
This class acts as a namespace containing all RSE attributes referenced in
|
|
102
|
+
the Rucio source code. Setting them affects Rucio's behaviour in some way.
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
ARCHIVE_TIMEOUT = 'archive_timeout'
|
|
106
|
+
ASSOCIATED_SITES = 'associated_sites'
|
|
107
|
+
AUTO_APPROVE_BYTES = 'auto_approve_bytes'
|
|
108
|
+
AUTO_APPROVE_FILES = 'auto_approve_files'
|
|
109
|
+
BITTORRENT_TRACKER_ADDR = 'bittorrent_tracker_addr'
|
|
110
|
+
BLOCK_MANUAL_APPROVAL = 'block_manual_approval'
|
|
111
|
+
COUNTRY = 'country'
|
|
112
|
+
DECOMMISSION = 'decommission'
|
|
113
|
+
DEFAULT_ACCOUNT_LIMIT_BYTES = 'default_account_limit_bytes'
|
|
114
|
+
FTS = 'fts'
|
|
115
|
+
GLOBUS_ENDPOINT_ID = 'globus_endpoint_id'
|
|
116
|
+
GREEDYDELETION = 'greedyDeletion'
|
|
117
|
+
IS_OBJECT_STORE = 'is_object_store'
|
|
118
|
+
LFN2PFN_ALGORITHM = 'lfn2pfn_algorithm'
|
|
119
|
+
MAXIMUM_PIN_LIFETIME = 'maximum_pin_lifetime'
|
|
120
|
+
MULTIHOP_TOMBSTONE_DELAY = 'multihop_tombstone_delay'
|
|
121
|
+
NAMING_CONVENTION = 'naming_convention'
|
|
122
|
+
OIDC_BASE_PATH = 'oidc_base_path'
|
|
123
|
+
OIDC_SUPPORT = 'oidc_support'
|
|
124
|
+
PHYSGROUP = 'physgroup'
|
|
125
|
+
QBITTORRENT_MANAGEMENT_ADDRESS = 'qbittorrent_management_address'
|
|
126
|
+
RESTRICTED_READ = 'restricted_read'
|
|
127
|
+
RESTRICTED_WRITE = 'restricted_write'
|
|
128
|
+
RULE_APPROVERS = 'rule_approvers'
|
|
129
|
+
S3_URL_STYLE = 's3_url_style'
|
|
130
|
+
SIGN_URL = 'sign_url'
|
|
131
|
+
SIMULATE_MULTIRANGE = 'simulate_multirange'
|
|
132
|
+
SITE = 'site'
|
|
133
|
+
SKIP_UPLOAD_STAT = 'skip_upload_stat'
|
|
134
|
+
SOURCE_FOR_TOTAL_SPACE = 'source_for_total_space'
|
|
135
|
+
SOURCE_FOR_USED_SPACE = 'source_for_used_space'
|
|
136
|
+
STAGING_BUFFER = 'staging_buffer'
|
|
137
|
+
STAGING_REQUIRED = 'staging_required'
|
|
138
|
+
STRICT_COPY = 'strict_copy'
|
|
139
|
+
TOMBSTONE_DELAY = 'tombstone_delay'
|
|
140
|
+
TYPE = 'type'
|
|
141
|
+
USE_IPV4 = 'use_ipv4'
|
|
142
|
+
VERIFY_CHECKSUM = 'verify_checksum'
|
|
143
|
+
|
|
144
|
+
# The following RSE attributes are exclusively used in the permission layer
|
|
145
|
+
# and are likely VO-specific.
|
|
146
|
+
|
|
147
|
+
BLOCK_MANUAL_APPROVE = 'block_manual_approve'
|
|
148
|
+
CMS_TYPE = 'cms_type'
|
|
149
|
+
DEFAULT_LIMIT_FILES = 'default_limit_files'
|
|
150
|
+
QUOTA_APPROVERS = 'quota_approvers'
|
|
151
|
+
RULE_DELETERS = 'rule_deleters'
|