rucio-clients 38.2.0__tar.gz → 38.4.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-38.2.0 → rucio_clients-38.4.0}/PKG-INFO +1 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/bin_legacy/rucio.py +26 -23
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/command.py +36 -26
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/config.py +22 -7
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/did.py +2 -2
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/download.py +1 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/opendata.py +78 -10
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/utils.py +13 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/accountclient.py +20 -19
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/accountlimitclient.py +5 -4
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/baseclient.py +25 -25
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/configclient.py +29 -5
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/credentialclient.py +2 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/didclient.py +33 -32
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/diracclient.py +2 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/exportclient.py +2 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/importclient.py +2 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/lifetimeclient.py +3 -2
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/lockclient.py +4 -3
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/metaconventionsclient.py +5 -4
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/opendataclient.py +8 -7
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/pingclient.py +2 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/replicaclient.py +27 -26
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/requestclient.py +8 -8
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/richclient.py +6 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/rseclient.py +31 -28
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/ruleclient.py +13 -12
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/scopeclient.py +4 -3
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/subscriptionclient.py +6 -5
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/constants.py +23 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/exception.py +30 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/plugins.py +33 -15
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/utils.py +3 -3
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/webdav.py +5 -2
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/translation.py +3 -3
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/vcsversion.py +3 -3
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/pyproject.toml +1 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_account.py +15 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_bin_rucio.py +8 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_cli_client_structure.py +81 -11
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_clients.py +2 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_config.py +20 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_did.py +7 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_gateway_external_representation.py +8 -11
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_judge_evaluator.py +2 -1
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_opendata.py +109 -11
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_policy_package.py +21 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/AUTHORS.rst +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/ChangeLog +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/LICENSE +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/MANIFEST.in +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/README.md +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/bin/rucio +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/bin/rucio-admin +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/etc/rse-accounts.cfg.template +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/etc/rucio.cfg.atlas.client.template +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/etc/rucio.cfg.template +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/__init__.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/alembicrevision.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/__init__.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/account.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/bin_legacy/__init__.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/bin_legacy/rucio_admin.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/lifetime_exception.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/replica.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/rse.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/rule.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/scope.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/subscription.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/cli/upload.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/__init__.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/client.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/downloadclient.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/touchclient.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/client/uploadclient.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/__init__.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/bittorrent.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/cache.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/checksum.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/client.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/config.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/constraints.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/didtype.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/extra.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/logging.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/pcache.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/policy.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/schema/__init__.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/schema/generic.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/schema/generic_multi_vo.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/stomp_utils.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/stopwatch.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/test_rucio_server.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/common/types.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/__init__.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/__init__.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/bittorrent.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/cache.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/dummy.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/gfal.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/globus.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/http_cache.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/mock.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/ngarc.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/posix.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/protocol.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/rclone.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/rfio.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/srm.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/ssh.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/storm.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/protocols/xrootd.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/rse/rsemanager.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio/version.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/lib/rucio_clients.egg-info/SOURCES.txt +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/requirements/requirements.client.txt +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/setup.cfg +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/setup.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/setuputil.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_abacus_account.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_abacus_collection_replica.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_abacus_rse.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_account_limits.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_archive.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_auditor.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_auditor_hdfs.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_auditor_srmdumps.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_authentication.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_automatix.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_bad_replica.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_bb8.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_belleii.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_boolean.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_conveyor.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_conveyor_submitter.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_counter.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_credential.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_curl.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_daemons.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_dataset_replicas.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_db.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_did_meta_plugins.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_download.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_dumper.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_filter_engine.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_heartbeat.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_hermes.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_identity.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_impl_upload_download.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_import_export.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_judge_cleaner.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_judge_injector.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_judge_repairer.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_lifetime.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_message.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_meta_conventions.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_meta_did.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_module_import.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_monitor.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_multi_vo.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_naming_convention.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_oauthmanager.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_oidc.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_permission.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_pfns.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_ping.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_preparer.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_qos.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_quarantined_replica.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_reaper.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_redirect.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_replica.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_replica_recoverer.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_replica_sorting.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_request.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_root_proxy.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_expression_parser.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_lfn2path.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_protocol_gfal2.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_protocol_gfal2_impl.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_protocol_posix.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_protocol_rclone.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_protocol_rsync.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_protocol_srm.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_protocol_ssh.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_protocol_webdav.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_protocol_xrootd.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rse_selector.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rucio_server.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_rule.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_scope.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_subscription.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_throttler.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_tpc.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_trace.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_transfer.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_transfer_plugins.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_undertaker.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_upload.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tests/test_utils.py +0 -0
- {rucio_clients-38.2.0 → rucio_clients-38.4.0}/tools/merge_rucio_configs.py +0 -0
|
@@ -449,7 +449,6 @@ def list_dids(args, client, logger, console, spinner):
|
|
|
449
449
|
"""
|
|
450
450
|
|
|
451
451
|
filters = {}
|
|
452
|
-
type_ = 'collection'
|
|
453
452
|
table_data = []
|
|
454
453
|
|
|
455
454
|
try:
|
|
@@ -482,19 +481,17 @@ def list_dids(args, client, logger, console, spinner):
|
|
|
482
481
|
else:
|
|
483
482
|
table_data.append([f"{did['scope']}:{did['name']}", did['did_type']])
|
|
484
483
|
|
|
485
|
-
if
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
else:
|
|
489
|
-
table = generate_table(table_data, headers=['SCOPE:NAME', '[DID TYPE]'], col_alignments=['left', 'left'])
|
|
490
|
-
spinner.stop()
|
|
491
|
-
print_output(table, console=console, no_pager=args.no_pager)
|
|
484
|
+
if args.short:
|
|
485
|
+
for did, _ in table_data:
|
|
486
|
+
print(did)
|
|
492
487
|
else:
|
|
493
|
-
if
|
|
494
|
-
|
|
495
|
-
|
|
488
|
+
if cli_config == 'rich':
|
|
489
|
+
table = generate_table(table_data, headers=['SCOPE:NAME', '[DID TYPE]'], col_alignments=['left', 'left'])
|
|
490
|
+
spinner.stop()
|
|
491
|
+
print_output(table, console=console, no_pager=args.no_pager)
|
|
496
492
|
else:
|
|
497
493
|
print(tabulate(table_data, tablefmt=tablefmt, headers=['SCOPE:NAME', '[DID TYPE]']))
|
|
494
|
+
|
|
498
495
|
return SUCCESS
|
|
499
496
|
|
|
500
497
|
|
|
@@ -657,19 +654,17 @@ def list_content(args, client, logger, console, spinner):
|
|
|
657
654
|
else:
|
|
658
655
|
table_data.append([f"{content['scope']}:{content['name']}", content['type'].upper()])
|
|
659
656
|
|
|
660
|
-
if
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
else:
|
|
664
|
-
table = generate_table(table_data, headers=['SCOPE:NAME', '[DID TYPE]'], col_alignments=['left', 'left'])
|
|
665
|
-
spinner.stop()
|
|
666
|
-
print_output(table, console=console, no_pager=args.no_pager)
|
|
657
|
+
if args.short:
|
|
658
|
+
for did, dummy in table_data:
|
|
659
|
+
print(did)
|
|
667
660
|
else:
|
|
668
|
-
if
|
|
669
|
-
|
|
670
|
-
|
|
661
|
+
if cli_config == 'rich':
|
|
662
|
+
table = generate_table(table_data, headers=['SCOPE:NAME', '[DID TYPE]'], col_alignments=['left', 'left'])
|
|
663
|
+
spinner.stop()
|
|
664
|
+
print_output(table, console=console, no_pager=args.no_pager)
|
|
671
665
|
else:
|
|
672
666
|
print(tabulate(table_data, tablefmt=tablefmt, headers=['SCOPE:NAME', '[DID TYPE]']))
|
|
667
|
+
|
|
673
668
|
return SUCCESS
|
|
674
669
|
|
|
675
670
|
|
|
@@ -1011,6 +1006,8 @@ def download(args, client, logger, console, spinner):
|
|
|
1011
1006
|
items = []
|
|
1012
1007
|
if args.dids:
|
|
1013
1008
|
for did in args.dids:
|
|
1009
|
+
if args.scope:
|
|
1010
|
+
did = f"{args.scope}:{did}"
|
|
1014
1011
|
item = {'did': did}
|
|
1015
1012
|
item.update(item_defaults)
|
|
1016
1013
|
items.append(item)
|
|
@@ -1043,9 +1040,15 @@ def download(args, client, logger, console, spinner):
|
|
|
1043
1040
|
item_defaults['did'] = did_str
|
|
1044
1041
|
if args.rses is None:
|
|
1045
1042
|
logger.warning("No RSE was given, selecting one.")
|
|
1043
|
+
if not args.scope:
|
|
1044
|
+
scope = did_str.split(':')[0]
|
|
1045
|
+
did = did_str.split(':')[-1]
|
|
1046
|
+
else:
|
|
1047
|
+
scope = args.scope
|
|
1048
|
+
did = did_str.split(':')[-1]
|
|
1046
1049
|
|
|
1047
1050
|
replicas = client.list_replicas(
|
|
1048
|
-
[{"scope":
|
|
1051
|
+
[{"scope": scope, "name": did}],
|
|
1049
1052
|
schemes=args.protocol,
|
|
1050
1053
|
ignore_availability=False,
|
|
1051
1054
|
client_location=detect_client_location(),
|
|
@@ -2473,7 +2476,7 @@ You can filter by key/value, e.g.::
|
|
|
2473
2476
|
selected_parser.add_argument('--trace_taskid', '--trace-taskid', new_option_string='--trace-taskid', dest='trace_taskid', action=StoreAndDeprecateWarningAction, default=os.environ.get('RUCIO_TRACE_TASKID', None), help=argparse.SUPPRESS)
|
|
2474
2477
|
selected_parser.add_argument('--trace_usrdn', '--trace-usrdn', new_option_string='--trace-usrdn', dest='trace_usrdn', action=StoreAndDeprecateWarningAction, default=os.environ.get('RUCIO_TRACE_USRDN', None), help=argparse.SUPPRESS)
|
|
2475
2478
|
selected_parser.add_argument('--filter', dest='filter', action='store', help='Filter files by key-value pairs like guid=2e2232aafac8324db452070304f8d745.')
|
|
2476
|
-
selected_parser.add_argument('--scope', dest='scope', action='store', help='Scope
|
|
2479
|
+
selected_parser.add_argument('--scope', dest='scope', action='store', help='Scope to use as a filter or to use with DID names.')
|
|
2477
2480
|
selected_parser.add_argument('--metalink', dest='metalink_file', action='store', help='Path to a metalink file.')
|
|
2478
2481
|
selected_parser.add_argument('--deactivate-file-download-exceptions', dest='deactivate_file_download_exceptions', action='store_true', help='Does not raise NoFilesDownloaded, NotAllFilesDownloaded or incorrect number of output queue files Exception.') # NOQA: E501
|
|
2479
2482
|
selected_parser.add_argument('--replica-selection', dest='sort', action='store', help='Select the best replica using a replica sorting algorithm provided by replica sorter (e.g., random, geoip).')
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
import importlib
|
|
15
15
|
import signal
|
|
16
|
+
import sys
|
|
16
17
|
import time
|
|
17
18
|
|
|
18
19
|
import click
|
|
@@ -61,6 +62,16 @@ class LazyGroup(click.Group):
|
|
|
61
62
|
raise ValueError(f"Lazy loading of {import_path} failed by returning " "a non-command object")
|
|
62
63
|
return cmd_object
|
|
63
64
|
|
|
65
|
+
@exception_handler
|
|
66
|
+
def _invoke_with_handler(self, ctx: click.Context):
|
|
67
|
+
return super().invoke(ctx)
|
|
68
|
+
|
|
69
|
+
def invoke(self, ctx: click.Context):
|
|
70
|
+
result = self._invoke_with_handler(ctx)
|
|
71
|
+
if result not in (None, 0):
|
|
72
|
+
sys.exit(1 if result != 2 else 2)
|
|
73
|
+
return result
|
|
74
|
+
|
|
64
75
|
|
|
65
76
|
@click.group(
|
|
66
77
|
cls=LazyGroup,
|
|
@@ -87,7 +98,7 @@ class LazyGroup(click.Group):
|
|
|
87
98
|
@click.option("--ca-certificate", help="CA certificate to verify peer against (SSL)")
|
|
88
99
|
@click.option("--certificate", help="Client certificate file")
|
|
89
100
|
@click.option("--client-key", help="Client key for x509 Authentication")
|
|
90
|
-
@click.option("--config", help="The Rucio configuration file to use")
|
|
101
|
+
@click.option("--config", help="The Rucio configuration file to use", envvar="RUCIO_CONFIG")
|
|
91
102
|
@click.option("-H", "--host", help="The Rucio API host")
|
|
92
103
|
# oidc auth
|
|
93
104
|
@click.option("--oidc-user", help="OIDC username")
|
|
@@ -146,33 +157,32 @@ class LazyGroup(click.Group):
|
|
|
146
157
|
@click.version_option(version.version_string(), message="%(prog)s %(version)s")
|
|
147
158
|
# Hidden options at the end
|
|
148
159
|
@click.option("--no-pager", is_flag=True, default=False, hidden=True)
|
|
149
|
-
@exception_handler
|
|
150
160
|
@click.pass_context
|
|
151
161
|
def main(
|
|
152
|
-
ctx,
|
|
153
|
-
config,
|
|
154
|
-
verbose,
|
|
155
|
-
host,
|
|
156
|
-
auth_host,
|
|
157
|
-
issuer,
|
|
158
|
-
auth_strategy,
|
|
159
|
-
timeout,
|
|
160
|
-
user_agent,
|
|
161
|
-
vo,
|
|
162
|
-
no_pager,
|
|
163
|
-
user,
|
|
164
|
-
password,
|
|
165
|
-
oidc_user,
|
|
166
|
-
oidc_password,
|
|
167
|
-
oidc_scope,
|
|
168
|
-
oidc_audience,
|
|
169
|
-
oidc_auto,
|
|
170
|
-
oidc_polling,
|
|
171
|
-
oidc_refresh_lifetime,
|
|
172
|
-
oidc_issuer,
|
|
173
|
-
certificate,
|
|
174
|
-
client_key,
|
|
175
|
-
ca_certificate,
|
|
162
|
+
ctx: click.Context,
|
|
163
|
+
config: str,
|
|
164
|
+
verbose: bool,
|
|
165
|
+
host: str,
|
|
166
|
+
auth_host: str,
|
|
167
|
+
issuer: str,
|
|
168
|
+
auth_strategy: str,
|
|
169
|
+
timeout: float,
|
|
170
|
+
user_agent: str,
|
|
171
|
+
vo: str,
|
|
172
|
+
no_pager: bool,
|
|
173
|
+
user: str,
|
|
174
|
+
password: str,
|
|
175
|
+
oidc_user: str,
|
|
176
|
+
oidc_password: str,
|
|
177
|
+
oidc_scope: str,
|
|
178
|
+
oidc_audience: str,
|
|
179
|
+
oidc_auto: str,
|
|
180
|
+
oidc_polling: str,
|
|
181
|
+
oidc_refresh_lifetime: str,
|
|
182
|
+
oidc_issuer: str,
|
|
183
|
+
certificate: str,
|
|
184
|
+
client_key: str,
|
|
185
|
+
ca_certificate: str,
|
|
176
186
|
):
|
|
177
187
|
ctx.ensure_object(Arguments)
|
|
178
188
|
ctx.obj.start_time = time.time()
|
|
@@ -27,18 +27,17 @@ def config():
|
|
|
27
27
|
@click.option("-s", "--section", help="Filter by sections")
|
|
28
28
|
@click.option("-k", "--key", help="Show key's value, section required.")
|
|
29
29
|
@click.pass_context
|
|
30
|
-
def list_(ctx, section, key):
|
|
30
|
+
def list_(ctx: click.Context, section: str, key: str):
|
|
31
31
|
"""List the sections or content of sections in the rucio.cfg"""
|
|
32
32
|
get_config(Arguments({"no_pager": ctx.obj.no_pager, "section": section, "key": key}), ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
# TODO Change to only add new fields and cannot modify an existing field
|
|
36
35
|
@config.command("add")
|
|
37
36
|
@click.option("-s", "--section", help="Section name", required=True)
|
|
38
37
|
@click.option('--key', help='Attribute key', required=True)
|
|
39
38
|
@click.option('--value', help='Attribute value', required=True)
|
|
40
39
|
@click.pass_context
|
|
41
|
-
def add_(ctx, section, key, value):
|
|
40
|
+
def add_(ctx: click.Context, section: str, key: str, value: str):
|
|
42
41
|
"""
|
|
43
42
|
Add a new key/value to a section.
|
|
44
43
|
|
|
@@ -46,6 +45,12 @@ def add_(ctx, section, key, value):
|
|
|
46
45
|
Example, Add a key to an existing section:
|
|
47
46
|
$ rucio config add --section my-section --key key --value value
|
|
48
47
|
"""
|
|
48
|
+
has_option = ctx.obj.client.get_config().get(section, {}).get(key) is not None
|
|
49
|
+
if has_option:
|
|
50
|
+
msg = f"Config already has field {section}: {key}, please use \n\
|
|
51
|
+
rucio config update --section {section} --key {key} --value {value}"
|
|
52
|
+
raise ValueError(msg)
|
|
53
|
+
|
|
49
54
|
args = Arguments({"no_pager": ctx.obj.no_pager, "section": section, "option": key, "value": value})
|
|
50
55
|
set_config_option(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
51
56
|
|
|
@@ -54,7 +59,7 @@ def add_(ctx, section, key, value):
|
|
|
54
59
|
@click.option("-s", "--section", help="Section", required=True)
|
|
55
60
|
@click.option("-k", "--key", help="Key in section", required=True)
|
|
56
61
|
@click.pass_context
|
|
57
|
-
def remove(ctx, section, key):
|
|
62
|
+
def remove(ctx: click.Context, section: str, key: str):
|
|
58
63
|
"""Remove the section.key from the config."""
|
|
59
64
|
args = Arguments({"no_pager": ctx.obj.no_pager, "section": section, "option": key})
|
|
60
65
|
delete_config_option(args, ctx.obj.client, ctx.obj.logger, ctx.obj.console, ctx.obj.spinner)
|
|
@@ -66,7 +71,17 @@ def show(ctx):
|
|
|
66
71
|
"""Show a single sections options"""
|
|
67
72
|
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
@config.command("update")
|
|
75
|
+
@click.option("-s", "--section", required=True)
|
|
76
|
+
@click.option("-k", "--key", help='Attribute key', required=True)
|
|
77
|
+
@click.option("-v", "--value", help='Attribute value', required=True)
|
|
78
|
+
@click.pass_context
|
|
79
|
+
def update(ctx: click.Context, section: str, key: str, value: str):
|
|
71
80
|
"""Modify an existing command"""
|
|
72
|
-
|
|
81
|
+
has_option = ctx.obj.client.get_config().get(section, {}).get(key) is not None
|
|
82
|
+
if has_option:
|
|
83
|
+
ctx.obj.client.set_config_option(section, key, value)
|
|
84
|
+
else:
|
|
85
|
+
msg = f"{section} {key} not present. Please use \n\
|
|
86
|
+
rucio config add --section {section} --key {key} --value {value}"
|
|
87
|
+
raise ValueError(msg)
|
|
@@ -34,8 +34,8 @@ def did():
|
|
|
34
34
|
are used: ";" represents the logical OR operator; "," represents the logical AND operator',
|
|
35
35
|
""",
|
|
36
36
|
) # TODO Shorten this help and make supplying this easier
|
|
37
|
-
@click.option("--short", is_flag=True, default=False, help="
|
|
38
|
-
@click.argument("did-pattern", nargs=-1)
|
|
37
|
+
@click.option("--short", is_flag=True, default=False, help="Just dump the list of DIDs.")
|
|
38
|
+
@click.argument("did-pattern", nargs=-1, required=True)
|
|
39
39
|
@click.option("--parent", default=False, is_flag=True, help="List the parents of the DID - must use a full DID scope and name")
|
|
40
40
|
@click.pass_context
|
|
41
41
|
def list_(ctx, did_pattern, recursive, filter_, short, parent):
|
|
@@ -52,7 +52,7 @@ from rucio.common.config import config_get_float
|
|
|
52
52
|
@click.option("--trace-taskid", default=os.environ.get("RUCIO_TRACE_TASKID", None), hidden=True)
|
|
53
53
|
@click.option("--trace-usrdn", default=os.environ.get("RUCIO_TRACE_USRDN", None), hidden=True)
|
|
54
54
|
@click.option("--filter", help="Filter files by key-value pairs like guid=2e2232aafac8324db452070304f8d745.")
|
|
55
|
-
@click.option("--scope", help="Scope
|
|
55
|
+
@click.option("--scope", help="Scope to use as a filter or to use with DID names.")
|
|
56
56
|
@click.option("--metalink", help="Path to a metalink file.")
|
|
57
57
|
@click.option("--no-show-download-exceptions", default=False, is_flag=True, help="Does not raise NoFilesDownloaded, NotAllFilesDownloaded or incorrect number of output queue files Exception.") # NOQA: E501
|
|
58
58
|
@click.option("--replica-selection", help="Select the best replica using a replica sorting algorithm provided by replica sorter (e.g., random, geoip).")
|
|
@@ -16,8 +16,11 @@ import json
|
|
|
16
16
|
from typing import TYPE_CHECKING, Optional
|
|
17
17
|
|
|
18
18
|
import click
|
|
19
|
+
from rich.text import Text
|
|
20
|
+
from tabulate import tabulate
|
|
19
21
|
|
|
20
22
|
from rucio.cli.utils import JSONType
|
|
23
|
+
from rucio.client.richclient import CLITheme, generate_table, get_cli_config, print_output
|
|
21
24
|
from rucio.common.constants import OPENDATA_DID_STATE_LITERAL_LIST
|
|
22
25
|
from rucio.common.utils import extract_scope
|
|
23
26
|
|
|
@@ -26,6 +29,8 @@ if TYPE_CHECKING:
|
|
|
26
29
|
|
|
27
30
|
from rucio.common.constants import OPENDATA_DID_STATE_LITERAL
|
|
28
31
|
|
|
32
|
+
cli_config = get_cli_config()
|
|
33
|
+
|
|
29
34
|
|
|
30
35
|
def is_valid_json(s: str) -> bool:
|
|
31
36
|
try:
|
|
@@ -50,15 +55,42 @@ def opendata_did() -> None:
|
|
|
50
55
|
help="Filter on Opendata state")
|
|
51
56
|
@click.option("--public", required=False, is_flag=True, default=False,
|
|
52
57
|
help="Perform request against the public endpoint")
|
|
58
|
+
@click.option("--short", is_flag=True, default=False, help="Dump the list of Opendata DIDs")
|
|
53
59
|
@click.pass_context
|
|
54
|
-
def list_opendata_dids(ctx: "Context", state: Optional["OPENDATA_DID_STATE_LITERAL"], public: bool
|
|
60
|
+
def list_opendata_dids(ctx: "Context", state: Optional["OPENDATA_DID_STATE_LITERAL"], public: bool,
|
|
61
|
+
short: bool) -> None:
|
|
55
62
|
"""
|
|
56
63
|
List Opendata DIDs, optionally filtered by state and public/private access
|
|
57
64
|
"""
|
|
58
65
|
|
|
59
66
|
client = ctx.obj.client
|
|
60
|
-
|
|
61
|
-
|
|
67
|
+
spinner = ctx.obj.spinner
|
|
68
|
+
|
|
69
|
+
dids_list = client.list_opendata_dids(state=state, public=public)
|
|
70
|
+
|
|
71
|
+
table_data = []
|
|
72
|
+
|
|
73
|
+
if cli_config == 'rich':
|
|
74
|
+
spinner.update(status='Fetching Opendata DIDs')
|
|
75
|
+
spinner.start()
|
|
76
|
+
|
|
77
|
+
for did in dids_list["dids"]:
|
|
78
|
+
if cli_config == 'rich':
|
|
79
|
+
table_data.append([f"{did['scope']}:{did['name']}",
|
|
80
|
+
Text(did['state'], style=CLITheme.OPENDATA_DID_STATE.get(did['state'], 'default'))])
|
|
81
|
+
else:
|
|
82
|
+
table_data.append([f"{did['scope']}:{did['name']}", did['state']])
|
|
83
|
+
|
|
84
|
+
if short:
|
|
85
|
+
for did, _ in table_data:
|
|
86
|
+
print(did)
|
|
87
|
+
else:
|
|
88
|
+
if cli_config == 'rich':
|
|
89
|
+
table = generate_table(table_data, headers=['SCOPE:NAME', '[STATE]'], col_alignments=['left', 'left'])
|
|
90
|
+
spinner.stop()
|
|
91
|
+
print_output(table, console=ctx.obj.console, no_pager=ctx.obj.no_pager)
|
|
92
|
+
else:
|
|
93
|
+
print(tabulate(table_data, tablefmt="psql", headers=['SCOPE:NAME', '[STATE]']))
|
|
62
94
|
|
|
63
95
|
|
|
64
96
|
@opendata_did.command("add")
|
|
@@ -101,12 +133,31 @@ def get_opendata_did(ctx: "Context", did: str, files: bool, meta: bool, public:
|
|
|
101
133
|
"""
|
|
102
134
|
|
|
103
135
|
client = ctx.obj.client
|
|
136
|
+
spinner = ctx.obj.spinner
|
|
137
|
+
console = ctx.obj.console
|
|
138
|
+
|
|
104
139
|
scope, name = extract_scope(did)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
140
|
+
info = client.get_opendata_did(scope=scope, name=name, public=public,
|
|
141
|
+
include_files=files, include_metadata=meta,
|
|
142
|
+
include_doi=True)
|
|
143
|
+
|
|
144
|
+
output = []
|
|
145
|
+
if cli_config == 'rich':
|
|
146
|
+
spinner.update(status='Fetching Opendata DID stats')
|
|
147
|
+
spinner.start()
|
|
148
|
+
keyword_styles = {**CLITheme.BOOLEAN, **CLITheme.OPENDATA_DID_STATE}
|
|
149
|
+
|
|
150
|
+
table_data = [(k, Text(str(v), style=keyword_styles.get(str(v), 'default'))) for (k, v) in
|
|
151
|
+
sorted(info.items())]
|
|
152
|
+
table = generate_table(table_data, row_styles=['none'], col_alignments=['left', 'left'])
|
|
153
|
+
output.append(table)
|
|
154
|
+
else:
|
|
155
|
+
table = [(k + ':', str(v)) for (k, v) in sorted(info.items())]
|
|
156
|
+
print(tabulate(table, tablefmt='plain', disable_numparse=True))
|
|
157
|
+
|
|
158
|
+
if cli_config == 'rich':
|
|
159
|
+
spinner.stop()
|
|
160
|
+
print_output(*output, console=console, no_pager=ctx.obj.no_pager)
|
|
110
161
|
|
|
111
162
|
|
|
112
163
|
@opendata_did.command("update")
|
|
@@ -124,9 +175,26 @@ def update_opendata_did(ctx: "Context", did: str, meta: Optional[str],
|
|
|
124
175
|
Update an existing Opendata DID in the Opendata catalog.
|
|
125
176
|
"""
|
|
126
177
|
|
|
127
|
-
client = ctx.obj.client
|
|
128
178
|
if not any([meta, state, doi]):
|
|
129
179
|
raise ValueError("At least one of --meta, --state, or --doi must be provided.")
|
|
130
180
|
|
|
181
|
+
client = ctx.obj.client
|
|
182
|
+
spinner = ctx.obj.spinner
|
|
183
|
+
console = ctx.obj.console
|
|
184
|
+
|
|
131
185
|
scope, name = extract_scope(did)
|
|
132
|
-
client.update_opendata_did(scope=scope, name=name, meta=meta, state=state, doi=doi)
|
|
186
|
+
info = client.update_opendata_did(scope=scope, name=name, meta=meta, state=state, doi=doi)
|
|
187
|
+
|
|
188
|
+
if cli_config == 'rich':
|
|
189
|
+
spinner.update(status='Fetching Opendata DID stats')
|
|
190
|
+
spinner.start()
|
|
191
|
+
keyword_styles = {**CLITheme.BOOLEAN, **CLITheme.OPENDATA_DID_STATE}
|
|
192
|
+
|
|
193
|
+
table_data = [(k, Text(str(v), style=keyword_styles.get(str(v), 'default'))) for (k, v) in
|
|
194
|
+
sorted(info.items())]
|
|
195
|
+
table = generate_table(table_data, row_styles=['none'], col_alignments=['left', 'left'])
|
|
196
|
+
spinner.stop()
|
|
197
|
+
print_output(table, console=console, no_pager=ctx.obj.no_pager)
|
|
198
|
+
else:
|
|
199
|
+
table = [(k + ':', str(v)) for (k, v) in sorted(info.items())]
|
|
200
|
+
print(tabulate(table, tablefmt='plain', disable_numparse=True))
|
|
@@ -57,7 +57,19 @@ def exception_handler(function):
|
|
|
57
57
|
def new_funct(*args, **kwargs):
|
|
58
58
|
try:
|
|
59
59
|
return function(*args, **kwargs)
|
|
60
|
-
except
|
|
60
|
+
except click.exceptions.Exit as error:
|
|
61
|
+
# Exit is evoked every time click ends a program without running anything
|
|
62
|
+
# This error is raised when the help menu is called
|
|
63
|
+
logger.debug("Exited click context")
|
|
64
|
+
if ("-h" not in sys.argv) or ("--help" not in sys.argv):
|
|
65
|
+
return error.exit_code
|
|
66
|
+
return SUCCESS
|
|
67
|
+
except click.MissingParameter as error:
|
|
68
|
+
error.show()
|
|
69
|
+
msg = f"{error}. Please check the command help (-h/--help)."
|
|
70
|
+
logger.error(msg)
|
|
71
|
+
return 2 # Always return an error 2 for an incorrect specification
|
|
72
|
+
except (InputValidationError, click.exceptions.UsageError) as error:
|
|
61
73
|
logger.error(error)
|
|
62
74
|
logger.debug("This means that one you provided an invalid combination of parameters, or incorrect types. Please check the command help (-h/--help).")
|
|
63
75
|
return FAILURE
|
|
@@ -19,6 +19,7 @@ from urllib.parse import quote_plus
|
|
|
19
19
|
from requests.status_codes import codes
|
|
20
20
|
|
|
21
21
|
from rucio.client.baseclient import BaseClient, choice
|
|
22
|
+
from rucio.common.constants import HTTPMethod
|
|
22
23
|
from rucio.common.utils import build_url
|
|
23
24
|
|
|
24
25
|
if TYPE_CHECKING:
|
|
@@ -59,7 +60,7 @@ class AccountClient(BaseClient):
|
|
|
59
60
|
path = '/'.join([self.ACCOUNTS_BASEURL, account])
|
|
60
61
|
url = build_url(choice(self.list_hosts), path=path)
|
|
61
62
|
|
|
62
|
-
res = self._send_request(url,
|
|
63
|
+
res = self._send_request(url, method=HTTPMethod.POST, data=data)
|
|
63
64
|
if res.status_code == codes.created:
|
|
64
65
|
return True
|
|
65
66
|
exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
|
|
@@ -88,7 +89,7 @@ class AccountClient(BaseClient):
|
|
|
88
89
|
path = '/'.join([self.ACCOUNTS_BASEURL, account])
|
|
89
90
|
url = build_url(choice(self.list_hosts), path=path)
|
|
90
91
|
|
|
91
|
-
res = self._send_request(url,
|
|
92
|
+
res = self._send_request(url, method=HTTPMethod.DELETE)
|
|
92
93
|
|
|
93
94
|
if res.status_code == codes.ok:
|
|
94
95
|
return True
|
|
@@ -118,7 +119,7 @@ class AccountClient(BaseClient):
|
|
|
118
119
|
path = '/'.join([self.ACCOUNTS_BASEURL, account])
|
|
119
120
|
url = build_url(choice(self.list_hosts), path=path)
|
|
120
121
|
|
|
121
|
-
res = self._send_request(url)
|
|
122
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
122
123
|
if res.status_code == codes.ok:
|
|
123
124
|
acc = self._load_json_data(res)
|
|
124
125
|
return next(acc)
|
|
@@ -152,7 +153,7 @@ class AccountClient(BaseClient):
|
|
|
152
153
|
path = '/'.join([self.ACCOUNTS_BASEURL, account])
|
|
153
154
|
url = build_url(choice(self.list_hosts), path=path)
|
|
154
155
|
|
|
155
|
-
res = self._send_request(url,
|
|
156
|
+
res = self._send_request(url, method=HTTPMethod.PUT, data=data)
|
|
156
157
|
|
|
157
158
|
if res.status_code == codes.ok:
|
|
158
159
|
return True
|
|
@@ -199,7 +200,7 @@ class AccountClient(BaseClient):
|
|
|
199
200
|
for key in filters:
|
|
200
201
|
params[key] = filters[key]
|
|
201
202
|
|
|
202
|
-
res = self._send_request(url, params=params)
|
|
203
|
+
res = self._send_request(url, method=HTTPMethod.GET, params=params)
|
|
203
204
|
|
|
204
205
|
if res.status_code == codes.ok:
|
|
205
206
|
accounts = self._load_json_data(res)
|
|
@@ -263,7 +264,7 @@ class AccountClient(BaseClient):
|
|
|
263
264
|
|
|
264
265
|
url = build_url(choice(self.list_hosts), path=path)
|
|
265
266
|
|
|
266
|
-
res = self._send_request(url,
|
|
267
|
+
res = self._send_request(url, method=HTTPMethod.POST, data=data)
|
|
267
268
|
|
|
268
269
|
if res.status_code == codes.created:
|
|
269
270
|
return True
|
|
@@ -300,7 +301,7 @@ class AccountClient(BaseClient):
|
|
|
300
301
|
|
|
301
302
|
url = build_url(choice(self.list_hosts), path=path)
|
|
302
303
|
|
|
303
|
-
res = self._send_request(url,
|
|
304
|
+
res = self._send_request(url, method=HTTPMethod.DELETE, data=data)
|
|
304
305
|
|
|
305
306
|
if res.status_code == codes.ok:
|
|
306
307
|
return True
|
|
@@ -319,7 +320,7 @@ class AccountClient(BaseClient):
|
|
|
319
320
|
"""
|
|
320
321
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'identities'])
|
|
321
322
|
url = build_url(choice(self.list_hosts), path=path)
|
|
322
|
-
res = self._send_request(url)
|
|
323
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
323
324
|
if res.status_code == codes.ok:
|
|
324
325
|
identities = self._load_json_data(res)
|
|
325
326
|
return identities
|
|
@@ -340,7 +341,7 @@ class AccountClient(BaseClient):
|
|
|
340
341
|
|
|
341
342
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'rules'])
|
|
342
343
|
url = build_url(choice(self.list_hosts), path=path)
|
|
343
|
-
res = self._send_request(url,
|
|
344
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
344
345
|
if res.status_code == codes.ok:
|
|
345
346
|
return self._load_json_data(res)
|
|
346
347
|
else:
|
|
@@ -385,7 +386,7 @@ class AccountClient(BaseClient):
|
|
|
385
386
|
|
|
386
387
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'limits', 'global', quote_plus(rse_expression)])
|
|
387
388
|
url = build_url(choice(self.list_hosts), path=path)
|
|
388
|
-
res = self._send_request(url,
|
|
389
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
389
390
|
if res.status_code == codes.ok:
|
|
390
391
|
return next(self._load_json_data(res))
|
|
391
392
|
exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
|
|
@@ -403,7 +404,7 @@ class AccountClient(BaseClient):
|
|
|
403
404
|
|
|
404
405
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'limits', 'global'])
|
|
405
406
|
url = build_url(choice(self.list_hosts), path=path)
|
|
406
|
-
res = self._send_request(url,
|
|
407
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
407
408
|
if res.status_code == codes.ok:
|
|
408
409
|
return next(self._load_json_data(res))
|
|
409
410
|
exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
|
|
@@ -421,7 +422,7 @@ class AccountClient(BaseClient):
|
|
|
421
422
|
|
|
422
423
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'limits', 'local'])
|
|
423
424
|
url = build_url(choice(self.list_hosts), path=path)
|
|
424
|
-
res = self._send_request(url,
|
|
425
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
425
426
|
if res.status_code == codes.ok:
|
|
426
427
|
return next(self._load_json_data(res))
|
|
427
428
|
exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
|
|
@@ -441,7 +442,7 @@ class AccountClient(BaseClient):
|
|
|
441
442
|
|
|
442
443
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'limits', 'local', rse])
|
|
443
444
|
url = build_url(choice(self.list_hosts), path=path)
|
|
444
|
-
res = self._send_request(url,
|
|
445
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
445
446
|
if res.status_code == codes.ok:
|
|
446
447
|
return next(self._load_json_data(res))
|
|
447
448
|
exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
|
|
@@ -463,7 +464,7 @@ class AccountClient(BaseClient):
|
|
|
463
464
|
else:
|
|
464
465
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'usage', 'local'])
|
|
465
466
|
url = build_url(choice(self.list_hosts), path=path)
|
|
466
|
-
res = self._send_request(url,
|
|
467
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
467
468
|
if res.status_code == codes.ok:
|
|
468
469
|
return self._load_json_data(res)
|
|
469
470
|
else:
|
|
@@ -486,7 +487,7 @@ class AccountClient(BaseClient):
|
|
|
486
487
|
else:
|
|
487
488
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'usage', 'global'])
|
|
488
489
|
url = build_url(choice(self.list_hosts), path=path)
|
|
489
|
-
res = self._send_request(url,
|
|
490
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
490
491
|
if res.status_code == codes.ok:
|
|
491
492
|
return self._load_json_data(res)
|
|
492
493
|
else:
|
|
@@ -506,7 +507,7 @@ class AccountClient(BaseClient):
|
|
|
506
507
|
"""
|
|
507
508
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'usage/history', rse])
|
|
508
509
|
url = build_url(choice(self.list_hosts), path=path)
|
|
509
|
-
res = self._send_request(url,
|
|
510
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
510
511
|
if res.status_code == codes.ok:
|
|
511
512
|
return next(self._load_json_data(res))
|
|
512
513
|
else:
|
|
@@ -524,7 +525,7 @@ class AccountClient(BaseClient):
|
|
|
524
525
|
"""
|
|
525
526
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'attr/'])
|
|
526
527
|
url = build_url(choice(self.list_hosts), path=path)
|
|
527
|
-
res = self._send_request(url,
|
|
528
|
+
res = self._send_request(url, method=HTTPMethod.GET)
|
|
528
529
|
if res.status_code == codes.ok:
|
|
529
530
|
return self._load_json_data(res)
|
|
530
531
|
else:
|
|
@@ -548,7 +549,7 @@ class AccountClient(BaseClient):
|
|
|
548
549
|
data = dumps({'key': key, 'value': value})
|
|
549
550
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'attr', key])
|
|
550
551
|
url = build_url(choice(self.list_hosts), path=path)
|
|
551
|
-
res = self._send_request(url,
|
|
552
|
+
res = self._send_request(url, method=HTTPMethod.POST, data=data)
|
|
552
553
|
if res.status_code == codes.created:
|
|
553
554
|
return True
|
|
554
555
|
else:
|
|
@@ -569,7 +570,7 @@ class AccountClient(BaseClient):
|
|
|
569
570
|
|
|
570
571
|
path = '/'.join([self.ACCOUNTS_BASEURL, account, 'attr', key])
|
|
571
572
|
url = build_url(choice(self.list_hosts), path=path)
|
|
572
|
-
res = self._send_request(url,
|
|
573
|
+
res = self._send_request(url, method=HTTPMethod.DELETE, data=None)
|
|
573
574
|
if res.status_code == codes.ok:
|
|
574
575
|
return True
|
|
575
576
|
else:
|
|
@@ -19,6 +19,7 @@ from urllib.parse import quote_plus
|
|
|
19
19
|
from requests.status_codes import codes
|
|
20
20
|
|
|
21
21
|
from rucio.client.baseclient import BaseClient, choice
|
|
22
|
+
from rucio.common.constants import HTTPMethod
|
|
22
23
|
from rucio.common.utils import build_url
|
|
23
24
|
|
|
24
25
|
|
|
@@ -123,7 +124,7 @@ class AccountLimitClient(BaseClient):
|
|
|
123
124
|
path = '/'.join([self.ACCOUNTLIMIT_BASEURL, 'local', account, rse])
|
|
124
125
|
url = build_url(choice(self.list_hosts), path=path)
|
|
125
126
|
|
|
126
|
-
r = self._send_request(url,
|
|
127
|
+
r = self._send_request(url, method=HTTPMethod.POST, data=data)
|
|
127
128
|
|
|
128
129
|
if r.status_code == codes.created:
|
|
129
130
|
return True
|
|
@@ -160,7 +161,7 @@ class AccountLimitClient(BaseClient):
|
|
|
160
161
|
path = '/'.join([self.ACCOUNTLIMIT_BASEURL, 'local', account, rse])
|
|
161
162
|
url = build_url(choice(self.list_hosts), path=path)
|
|
162
163
|
|
|
163
|
-
r = self._send_request(url,
|
|
164
|
+
r = self._send_request(url, method=HTTPMethod.DELETE)
|
|
164
165
|
|
|
165
166
|
if r.status_code == codes.ok:
|
|
166
167
|
return True
|
|
@@ -196,7 +197,7 @@ class AccountLimitClient(BaseClient):
|
|
|
196
197
|
path = '/'.join([self.ACCOUNTLIMIT_BASEURL, 'global', account, quote_plus(rse_expression)])
|
|
197
198
|
url = build_url(choice(self.list_hosts), path=path)
|
|
198
199
|
|
|
199
|
-
r = self._send_request(url,
|
|
200
|
+
r = self._send_request(url, method=HTTPMethod.POST, data=data)
|
|
200
201
|
|
|
201
202
|
if r.status_code == codes.created:
|
|
202
203
|
return True
|
|
@@ -233,7 +234,7 @@ class AccountLimitClient(BaseClient):
|
|
|
233
234
|
path = '/'.join([self.ACCOUNTLIMIT_BASEURL, 'global', account, quote_plus(rse_expression)])
|
|
234
235
|
url = build_url(choice(self.list_hosts), path=path)
|
|
235
236
|
|
|
236
|
-
r = self._send_request(url,
|
|
237
|
+
r = self._send_request(url, method=HTTPMethod.DELETE)
|
|
237
238
|
|
|
238
239
|
if r.status_code == codes.ok:
|
|
239
240
|
return True
|