Repository: rucio/rucio

Issue:
Misleading documentation for list_dids()
Motivation
----------

> `:param filters: A dictionary of key/value pairs like {'name': 'file_name','rse-expression': 'tier0'}.`

`rse-expression` is not a valid filter. Also applies to `list_dids_extended()`.

Modification
------------

Replace with a valid example.



Discussion:

Resolving patch:
diff --git a/lib/rucio/client/didclient.py b/lib/rucio/client/didclient.py
--- a/lib/rucio/client/didclient.py
+++ b/lib/rucio/client/didclient.py
@@ -1,4 +1,5 @@
-# Copyright 2013-2018 CERN for the benefit of the ATLAS collaboration.
+# -*- coding: utf-8 -*-
+# Copyright 2013-2020 CERN
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,21 +14,22 @@
 # limitations under the License.
 #
 # Authors:
-# - Vincent Garonne <vgaronne@gmail.com>, 2013-2018
+# - Vincent Garonne <vincent.garonne@cern.ch>, 2013-2018
 # - Ralph Vigne <ralph.vigne@cern.ch>, 2013-2015
-# - Mario Lassnig <mario.lassnig@cern.ch>, 2013-2018
-# - Martin Barisits <martin.barisits@cern.ch>, 2013-2018
+# - Mario Lassnig <mario.lassnig@cern.ch>, 2013-2020
+# - Martin Barisits <martin.barisits@cern.ch>, 2013-2020
 # - Yun-Pin Sun <winter0128@gmail.com>, 2013
 # - Thomas Beermann <thomas.beermann@cern.ch>, 2013
 # - Cedric Serfon <cedric.serfon@cern.ch>, 2014-2020
-# - Joaquin Bogado <jbogado@linti.unlp.edu.ar>, 2014-2018
+# - Joaquín Bogado <jbogado@linti.unlp.edu.ar>, 2014-2018
 # - Brian Bockelman <bbockelm@cse.unl.edu>, 2018
-# - Eric Vaandering <ericvaandering@gmail.com>, 2018
-# - Asket Agarwal <asket.agarwal96@gmail.com>, 2018
+# - Eric Vaandering <ewv@fnal.gov>, 2018-2020
+# - asket <asket.agarwal96@gmail.com>, 2018
 # - Hannes Hansen <hannes.jakob.hansen@cern.ch>, 2018
 # - Andrew Lister <andrew.lister@stfc.ac.uk>, 2019
-#
-# PY3K COMPATIBLE
+# - Eli Chadwick <eli.chadwick@stfc.ac.uk>, 2020
+# - Aristeidis Fkiaras <aristeidis.fkiaras@cern.ch>, 2020
+# - Alan Malta Rodrigues <alan.malta@cern.ch>, 2020
 
 from __future__ import print_function
 
@@ -61,7 +63,7 @@ def list_dids(self, scope, filters, type='collection', long=False, recursive=Fal
         List all data identifiers in a scope which match a given pattern.
 
         :param scope: The scope name.
-        :param filters: A dictionary of key/value pairs like {'name': 'file_name','rse-expression': 'tier0'}.
+        :param filters: A dictionary of key/value pairs like {'type': 'dataset', 'scope': 'test'}.
         :param type: The type of the did: 'all'(container, dataset or file)|'collection'(dataset or container)|'dataset'|'container'|'file'
         :param long: Long format option to display more information for each DID.
         :param recursive: Recursively list DIDs content.
@@ -93,7 +95,7 @@ def list_dids_extended(self, scope, filters, type='collection', long=False, recu
         List all data identifiers in a scope which match a given pattern. Extended version that goes through plugin mechanism.
 
         :param scope: The scope name.
-        :param filters: A dictionary of key/value pairs like {'name': 'file_name','rse-expression': 'tier0'}.
+        :param filters: A dictionary of key/value pairs like {'type': 'dataset', 'scope': 'test'}.
         :param type: The type of the did: 'all'(container, dataset or file)|'collection'(dataset or container)|'dataset'|'container'|'file'
         :param long: Long format option to display more information for each DID.
         :param recursive: Recursively list DIDs content.


Test patch: