rucio-clients 34.4.2__tar.gz → 34.4.3__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.4.2 → rucio_clients-34.4.3}/PKG-INFO +1 -1
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/accountlimitclient.py +36 -6
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/baseclient.py +16 -7
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/configclient.py +18 -3
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/credentialclient.py +8 -1
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/downloadclient.py +1 -1
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/lifetimeclient.py +20 -2
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/requestclient.py +34 -16
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/uploadclient.py +3 -2
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/pcache.py +114 -91
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/types.py +44 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/utils.py +140 -95
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/vcsversion.py +3 -3
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_transfer_plugins.py +22 -4
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/AUTHORS.rst +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/ChangeLog +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/LICENSE +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/MANIFEST.in +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/README.rst +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/bin/rucio +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/bin/rucio-admin +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/etc/rse-accounts.cfg.template +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/etc/rucio.cfg.atlas.client.template +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/etc/rucio.cfg.template +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/__init__.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/alembicrevision.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/__init__.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/accountclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/client.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/didclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/diracclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/exportclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/fileclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/importclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/lockclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/metaconventionsclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/pingclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/replicaclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/rseclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/ruleclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/scopeclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/subscriptionclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/client/touchclient.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/__init__.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/cache.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/config.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/constants.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/constraints.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/didtype.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/exception.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/extra.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/logging.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/plugins.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/policy.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/schema/__init__.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/schema/atlas.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/schema/belleii.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/schema/domatpc.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/schema/escape.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/schema/generic.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/schema/generic_multi_vo.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/schema/icecube.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/stomp_utils.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/stopwatch.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/common/test_rucio_server.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/__init__.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/__init__.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/bittorrent.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/cache.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/dummy.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/gfal.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/globus.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/gsiftp.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/http_cache.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/mock.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/ngarc.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/posix.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/protocol.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/rclone.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/rfio.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/srm.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/ssh.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/storm.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/webdav.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/protocols/xrootd.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/rse/rsemanager.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio/version.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/lib/rucio_clients.egg-info/SOURCES.txt +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/pylintrc +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/pyproject.toml +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/requirements.txt +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/setup.cfg +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/setup.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/setuputil.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_abacus_account.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_abacus_collection_replica.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_abacus_rse.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_account.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_account_limits.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_api_external_representation.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_archive.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_auditor.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_auditor_hdfs.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_auditor_srmdumps.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_authentication.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_automatix.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_bad_replica.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_bb8.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_belleii.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_bin_rucio.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_boolean.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_clients.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_common_types.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_config.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_conveyor.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_conveyor_submitter.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_counter.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_credential.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_curl.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_daemons.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_dataset_replicas.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_db.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_did.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_did_meta_plugins.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_didtype.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_download.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_dumper.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_dumper_consistency.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_dumper_data_model.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_dumper_path_parsing.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_filter_engine.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_heartbeat.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_hermes.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_identity.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_impl_upload_download.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_import_export.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_judge_cleaner.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_judge_evaluator.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_judge_injector.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_judge_repairer.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_lifetime.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_message.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_meta_conventions.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_meta_did.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_module_import.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_monitor.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_multi_vo.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_naming_convention.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_oauthmanager.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_oidc.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_permission.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_pfns.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_ping.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_preparer.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_qos.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_quarantined_replica.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_reaper.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_redirect.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_replica.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_replica_recoverer.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_replica_sorting.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_request.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_root_proxy.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_expression_parser.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_lfn2path.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_protocol_gfal2.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_protocol_gfal2_impl.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_protocol_posix.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_protocol_rclone.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_protocol_rsync.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_protocol_srm.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_protocol_ssh.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_protocol_webdav.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_protocol_xrootd.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rse_selector.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rucio_server.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_rule.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_scope.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_subscription.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_throttler.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_tpc.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_trace.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_transfer.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_undertaker.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_upload.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tests/test_utils.py +0 -0
- {rucio_clients-34.4.2 → rucio_clients-34.4.3}/tools/merge_rucio_configs.py +0 -0
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
from json import dumps
|
|
16
|
+
from typing import Literal
|
|
16
17
|
from urllib.parse import quote_plus
|
|
17
18
|
|
|
18
19
|
from requests.status_codes import codes
|
|
@@ -27,7 +28,13 @@ class AccountLimitClient(BaseClient):
|
|
|
27
28
|
|
|
28
29
|
ACCOUNTLIMIT_BASEURL = 'accountlimits'
|
|
29
30
|
|
|
30
|
-
def set_account_limit(
|
|
31
|
+
def set_account_limit(
|
|
32
|
+
self,
|
|
33
|
+
account: str,
|
|
34
|
+
rse: str,
|
|
35
|
+
bytes_: int,
|
|
36
|
+
locality: Literal['local', 'global']
|
|
37
|
+
) -> bool:
|
|
31
38
|
"""
|
|
32
39
|
Sets an account limit for a given limit scope.
|
|
33
40
|
|
|
@@ -46,7 +53,12 @@ class AccountLimitClient(BaseClient):
|
|
|
46
53
|
from rucio.common.exception import UnsupportedOperation
|
|
47
54
|
raise UnsupportedOperation('The provided scope (%s) for the account limit was invalid' % locality)
|
|
48
55
|
|
|
49
|
-
def delete_account_limit(
|
|
56
|
+
def delete_account_limit(
|
|
57
|
+
self,
|
|
58
|
+
account: str,
|
|
59
|
+
rse: str,
|
|
60
|
+
locality: Literal['local', 'global']
|
|
61
|
+
) -> bool:
|
|
50
62
|
"""
|
|
51
63
|
Deletes an account limit for a given limit scope.
|
|
52
64
|
|
|
@@ -64,7 +76,12 @@ class AccountLimitClient(BaseClient):
|
|
|
64
76
|
from rucio.common.exception import UnsupportedOperation
|
|
65
77
|
raise UnsupportedOperation('The provided scope (%s) for the account limit was invalid' % locality)
|
|
66
78
|
|
|
67
|
-
def set_local_account_limit(
|
|
79
|
+
def set_local_account_limit(
|
|
80
|
+
self,
|
|
81
|
+
account: str,
|
|
82
|
+
rse: str,
|
|
83
|
+
bytes_: int
|
|
84
|
+
) -> bool:
|
|
68
85
|
"""
|
|
69
86
|
Sends the request to set an account limit for an account.
|
|
70
87
|
|
|
@@ -86,7 +103,11 @@ class AccountLimitClient(BaseClient):
|
|
|
86
103
|
exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
|
|
87
104
|
raise exc_cls(exc_msg)
|
|
88
105
|
|
|
89
|
-
def delete_local_account_limit(
|
|
106
|
+
def delete_local_account_limit(
|
|
107
|
+
self,
|
|
108
|
+
account: str,
|
|
109
|
+
rse: str
|
|
110
|
+
) -> bool:
|
|
90
111
|
"""
|
|
91
112
|
Sends the request to remove an account limit.
|
|
92
113
|
|
|
@@ -108,7 +129,12 @@ class AccountLimitClient(BaseClient):
|
|
|
108
129
|
exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
|
|
109
130
|
raise exc_cls(exc_msg)
|
|
110
131
|
|
|
111
|
-
def set_global_account_limit(
|
|
132
|
+
def set_global_account_limit(
|
|
133
|
+
self,
|
|
134
|
+
account: str,
|
|
135
|
+
rse_expression: str,
|
|
136
|
+
bytes_: int
|
|
137
|
+
) -> bool:
|
|
112
138
|
"""
|
|
113
139
|
Sends the request to set a global account limit for an account.
|
|
114
140
|
|
|
@@ -130,7 +156,11 @@ class AccountLimitClient(BaseClient):
|
|
|
130
156
|
exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
|
|
131
157
|
raise exc_cls(exc_msg)
|
|
132
158
|
|
|
133
|
-
def delete_global_account_limit(
|
|
159
|
+
def delete_global_account_limit(
|
|
160
|
+
self,
|
|
161
|
+
account: str,
|
|
162
|
+
rse_expression: str
|
|
163
|
+
) -> bool:
|
|
134
164
|
"""
|
|
135
165
|
Sends the request to remove a global account limit.
|
|
136
166
|
|
|
@@ -107,8 +107,6 @@ class BaseClient:
|
|
|
107
107
|
:param logger: Logger object to use. If None, use the default LOG created by the module
|
|
108
108
|
"""
|
|
109
109
|
|
|
110
|
-
self.host = rucio_host
|
|
111
|
-
self.auth_host = auth_host
|
|
112
110
|
self.logger = logger
|
|
113
111
|
self.session = Session()
|
|
114
112
|
self.user_agent = "%s/%s" % (user_agent, version.version_string()) # e.g. "rucio-clients/0.2.13"
|
|
@@ -117,9 +115,17 @@ class BaseClient:
|
|
|
117
115
|
if self.script_id == '': # Python interpreter used
|
|
118
116
|
self.script_id = 'python'
|
|
119
117
|
try:
|
|
120
|
-
if
|
|
118
|
+
if rucio_host is not None:
|
|
119
|
+
self.host = rucio_host
|
|
120
|
+
else:
|
|
121
121
|
self.host = config_get('client', 'rucio_host')
|
|
122
|
-
|
|
122
|
+
except (NoOptionError, NoSectionError) as error:
|
|
123
|
+
raise MissingClientParameter('Section client and Option \'%s\' cannot be found in config file' % error.args[0])
|
|
124
|
+
|
|
125
|
+
try:
|
|
126
|
+
if auth_host is not None:
|
|
127
|
+
self.auth_host = auth_host
|
|
128
|
+
else:
|
|
123
129
|
self.auth_host = config_get('client', 'auth_host')
|
|
124
130
|
except (NoOptionError, NoSectionError) as error:
|
|
125
131
|
raise MissingClientParameter('Section client and Option \'%s\' cannot be found in config file' % error.args[0])
|
|
@@ -318,9 +324,12 @@ class BaseClient:
|
|
|
318
324
|
|
|
319
325
|
:return: A rucio exception class and an error string.
|
|
320
326
|
"""
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
327
|
+
if data is not None:
|
|
328
|
+
try:
|
|
329
|
+
data = parse_response(data)
|
|
330
|
+
except ValueError:
|
|
331
|
+
data = {}
|
|
332
|
+
else:
|
|
324
333
|
data = {}
|
|
325
334
|
|
|
326
335
|
exc_cls = 'RucioException'
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
from json import dumps
|
|
16
|
+
from typing import Any, Optional
|
|
16
17
|
|
|
17
18
|
from requests.status_codes import codes
|
|
18
19
|
|
|
@@ -26,7 +27,11 @@ class ConfigClient(BaseClient):
|
|
|
26
27
|
|
|
27
28
|
CONFIG_BASEURL = 'config'
|
|
28
29
|
|
|
29
|
-
def get_config(
|
|
30
|
+
def get_config(
|
|
31
|
+
self,
|
|
32
|
+
section: Optional[str] = None,
|
|
33
|
+
option: Optional[str] = None
|
|
34
|
+
) -> dict[str, Any]:
|
|
30
35
|
"""
|
|
31
36
|
Sends the request to get the matching configuration.
|
|
32
37
|
|
|
@@ -53,7 +58,13 @@ class ConfigClient(BaseClient):
|
|
|
53
58
|
exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
|
|
54
59
|
raise exc_cls(exc_msg)
|
|
55
60
|
|
|
56
|
-
def set_config_option(
|
|
61
|
+
def set_config_option(
|
|
62
|
+
self,
|
|
63
|
+
section: str,
|
|
64
|
+
option: str,
|
|
65
|
+
value: Any,
|
|
66
|
+
use_body_for_params: bool = True
|
|
67
|
+
) -> bool:
|
|
57
68
|
"""
|
|
58
69
|
Sends the request to create or set an option within a section. Missing sections will be created.
|
|
59
70
|
|
|
@@ -90,7 +101,11 @@ class ConfigClient(BaseClient):
|
|
|
90
101
|
exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
|
|
91
102
|
raise exc_cls(exc_msg)
|
|
92
103
|
|
|
93
|
-
def delete_config_option(
|
|
104
|
+
def delete_config_option(
|
|
105
|
+
self,
|
|
106
|
+
section: str,
|
|
107
|
+
option: str
|
|
108
|
+
) -> bool:
|
|
94
109
|
"""
|
|
95
110
|
Sends the request to remove an option from a section
|
|
96
111
|
|
|
@@ -23,7 +23,14 @@ class CredentialClient(BaseClient):
|
|
|
23
23
|
|
|
24
24
|
CREDENTIAL_BASEURL = 'credentials'
|
|
25
25
|
|
|
26
|
-
def get_signed_url(
|
|
26
|
+
def get_signed_url(
|
|
27
|
+
self,
|
|
28
|
+
rse: str,
|
|
29
|
+
service: str,
|
|
30
|
+
operation: str,
|
|
31
|
+
url: str,
|
|
32
|
+
lifetime: int = 3600
|
|
33
|
+
) -> str:
|
|
27
34
|
"""
|
|
28
35
|
Return a signed version of the given URL for the given operation.
|
|
29
36
|
|
|
@@ -1231,7 +1231,7 @@ class DownloadClient:
|
|
|
1231
1231
|
resolve_parents=True,
|
|
1232
1232
|
nrandom=nrandom,
|
|
1233
1233
|
metalink=True)
|
|
1234
|
-
file_items = parse_replicas_from_string(metalink_str)
|
|
1234
|
+
file_items = parse_replicas_from_string(metalink_str) # type: ignore
|
|
1235
1235
|
for file in file_items:
|
|
1236
1236
|
if impl:
|
|
1237
1237
|
file['impl'] = impl
|
|
@@ -13,12 +13,19 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
from json import loads
|
|
16
|
+
from typing import TYPE_CHECKING, Any, Optional
|
|
16
17
|
|
|
17
18
|
from requests.status_codes import codes
|
|
18
19
|
|
|
19
20
|
from rucio.client.baseclient import BaseClient, choice
|
|
20
21
|
from rucio.common.utils import build_url, render_json
|
|
21
22
|
|
|
23
|
+
if TYPE_CHECKING:
|
|
24
|
+
from collections.abc import Iterator, Sequence
|
|
25
|
+
from datetime import datetime
|
|
26
|
+
|
|
27
|
+
from rucio.db.sqla.constants import LifetimeExceptionsState
|
|
28
|
+
|
|
22
29
|
|
|
23
30
|
class LifetimeClient(BaseClient):
|
|
24
31
|
|
|
@@ -26,7 +33,11 @@ class LifetimeClient(BaseClient):
|
|
|
26
33
|
|
|
27
34
|
LIFETIME_BASEURL = 'lifetime_exceptions'
|
|
28
35
|
|
|
29
|
-
def list_exceptions(
|
|
36
|
+
def list_exceptions(
|
|
37
|
+
self,
|
|
38
|
+
exception_id: Optional[str] = None,
|
|
39
|
+
states: Optional['Sequence[LifetimeExceptionsState]'] = None
|
|
40
|
+
) -> 'Iterator[dict[str, Any]]':
|
|
30
41
|
"""
|
|
31
42
|
List exceptions to Lifetime Model.
|
|
32
43
|
|
|
@@ -50,7 +61,14 @@ class LifetimeClient(BaseClient):
|
|
|
50
61
|
exc_cls, exc_msg = self._get_exception(headers=result.headers, status_code=result.status_code)
|
|
51
62
|
raise exc_cls(exc_msg)
|
|
52
63
|
|
|
53
|
-
def add_exception(
|
|
64
|
+
def add_exception(
|
|
65
|
+
self,
|
|
66
|
+
dids: list[dict[str, Any]],
|
|
67
|
+
account: str,
|
|
68
|
+
pattern: str,
|
|
69
|
+
comments: str,
|
|
70
|
+
expires_at: 'datetime'
|
|
71
|
+
) -> dict[str, Any]:
|
|
54
72
|
"""
|
|
55
73
|
Add exceptions to Lifetime Model.
|
|
56
74
|
|
|
@@ -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 typing import TYPE_CHECKING, Any, Optional
|
|
15
16
|
from urllib.parse import quote_plus
|
|
16
17
|
|
|
17
18
|
from requests.status_codes import codes
|
|
@@ -19,16 +20,23 @@ from requests.status_codes import codes
|
|
|
19
20
|
from rucio.client.baseclient import BaseClient, choice
|
|
20
21
|
from rucio.common.utils import build_url
|
|
21
22
|
|
|
23
|
+
if TYPE_CHECKING:
|
|
24
|
+
from collections.abc import Iterator, Sequence
|
|
25
|
+
|
|
22
26
|
|
|
23
27
|
class RequestClient(BaseClient):
|
|
24
28
|
|
|
25
29
|
REQUEST_BASEURL = 'requests'
|
|
26
30
|
|
|
27
|
-
def list_requests(
|
|
31
|
+
def list_requests(
|
|
32
|
+
self,
|
|
33
|
+
src_rse: str,
|
|
34
|
+
dst_rse: str,
|
|
35
|
+
request_states: 'Sequence[str]'
|
|
36
|
+
) -> 'Iterator[dict[str, Any]]':
|
|
28
37
|
"""Return latest request details
|
|
29
38
|
|
|
30
39
|
:return: request information
|
|
31
|
-
:rtype: dict
|
|
32
40
|
"""
|
|
33
41
|
path = '/'.join([self.REQUEST_BASEURL, 'list']) + '?' + '&'.join(['src_rse={}'.format(src_rse), 'dst_rse={}'.format(
|
|
34
42
|
dst_rse), 'request_states={}'.format(request_states)])
|
|
@@ -41,11 +49,17 @@ class RequestClient(BaseClient):
|
|
|
41
49
|
exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
|
|
42
50
|
raise exc_cls(exc_msg)
|
|
43
51
|
|
|
44
|
-
def list_requests_history(
|
|
52
|
+
def list_requests_history(
|
|
53
|
+
self,
|
|
54
|
+
src_rse: str,
|
|
55
|
+
dst_rse: str,
|
|
56
|
+
request_states: 'Sequence[str]',
|
|
57
|
+
offset: int = 0,
|
|
58
|
+
limit: int = 100
|
|
59
|
+
) -> 'Iterator[dict[str, Any]]':
|
|
45
60
|
"""Return historical request details
|
|
46
61
|
|
|
47
62
|
:return: request information
|
|
48
|
-
:rtype: dict
|
|
49
63
|
"""
|
|
50
64
|
path = '/'.join([self.REQUEST_BASEURL, 'history', 'list']) + '?' + '&'.join(['src_rse={}'.format(src_rse), 'dst_rse={}'.format(
|
|
51
65
|
dst_rse), 'request_states={}'.format(request_states), 'offset={}'.format(offset), 'limit={}'.format(limit)])
|
|
@@ -58,21 +72,23 @@ class RequestClient(BaseClient):
|
|
|
58
72
|
exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
|
|
59
73
|
raise exc_cls(exc_msg)
|
|
60
74
|
|
|
61
|
-
def list_request_by_did(
|
|
75
|
+
def list_request_by_did(
|
|
76
|
+
self,
|
|
77
|
+
name: str,
|
|
78
|
+
rse: str,
|
|
79
|
+
scope: Optional[str] = None
|
|
80
|
+
) -> 'Iterator[dict[str, Any]]':
|
|
62
81
|
"""Return latest request details for a DID
|
|
63
82
|
|
|
64
83
|
:param name: DID
|
|
65
|
-
:type name: str
|
|
66
84
|
:param rse: Destination RSE name
|
|
67
|
-
:type rse: str
|
|
68
85
|
:param scope: rucio scope, defaults to None
|
|
69
|
-
:param scope: str, optional
|
|
70
86
|
:raises exc_cls: from BaseClient._get_exception
|
|
71
87
|
:return: request information
|
|
72
|
-
:rtype: dict
|
|
73
88
|
"""
|
|
74
89
|
|
|
75
|
-
|
|
90
|
+
if scope is not None:
|
|
91
|
+
path = '/'.join([self.REQUEST_BASEURL, quote_plus(scope), quote_plus(name), rse])
|
|
76
92
|
url = build_url(choice(self.list_hosts), path=path)
|
|
77
93
|
r = self._send_request(url, type_='GET')
|
|
78
94
|
|
|
@@ -82,21 +98,23 @@ class RequestClient(BaseClient):
|
|
|
82
98
|
exc_cls, exc_msg = self._get_exception(headers=r.headers, status_code=r.status_code, data=r.content)
|
|
83
99
|
raise exc_cls(exc_msg)
|
|
84
100
|
|
|
85
|
-
def list_request_history_by_did(
|
|
101
|
+
def list_request_history_by_did(
|
|
102
|
+
self,
|
|
103
|
+
name: str,
|
|
104
|
+
rse: str,
|
|
105
|
+
scope: Optional[str] = None
|
|
106
|
+
) -> 'Iterator[dict[str, Any]]':
|
|
86
107
|
"""Return latest request details for a DID
|
|
87
108
|
|
|
88
109
|
:param name: DID
|
|
89
|
-
:type name: str
|
|
90
110
|
:param rse: Destination RSE name
|
|
91
|
-
:type rse: str
|
|
92
111
|
:param scope: rucio scope, defaults to None
|
|
93
|
-
:param scope: str, optional
|
|
94
112
|
:raises exc_cls: from BaseClient._get_exception
|
|
95
113
|
:return: request information
|
|
96
|
-
:rtype: dict
|
|
97
114
|
"""
|
|
98
115
|
|
|
99
|
-
|
|
116
|
+
if scope is not None:
|
|
117
|
+
path = '/'.join([self.REQUEST_BASEURL, 'history', quote_plus(scope), quote_plus(name), rse])
|
|
100
118
|
url = build_url(choice(self.list_hosts), path=path)
|
|
101
119
|
r = self._send_request(url, type_='GET')
|
|
102
120
|
|
|
@@ -629,8 +629,9 @@ class UploadClient:
|
|
|
629
629
|
# Auth. mostly for object stores
|
|
630
630
|
if sign_service:
|
|
631
631
|
protocol_read = self._create_protocol(rse_settings, 'read', domain=domain, impl=impl)
|
|
632
|
-
|
|
633
|
-
|
|
632
|
+
if pfn is not None:
|
|
633
|
+
signed_read_pfn = self.client.get_signed_url(rse_settings['rse'], sign_service, 'read', pfn)
|
|
634
|
+
pfn = self.client.get_signed_url(rse_settings['rse'], sign_service, 'write', pfn)
|
|
634
635
|
|
|
635
636
|
# Create a name of tmp file if renaming operation is supported
|
|
636
637
|
pfn_tmp = '%s.rucio.upload' % pfn if protocol_write.renaming else pfn
|