Repository: rucio/rucio

Issue:
Remove <operation>_protocol entries in rse_settings
Motivation
----------
Since the introduction of domains this information is not used anymore and deprecated; It was left in the rse_settings but is now reason for confusion. These keys should be removed from the rse_settings.


Discussion:

Resolving patch:
diff --git a/lib/rucio/core/rse.py b/lib/rucio/core/rse.py
--- a/lib/rucio/core/rse.py
+++ b/lib/rucio/core/rse.py
@@ -751,9 +751,6 @@ def get_rse_protocols(rse, schemes=None, session=None):
             'volatile': _rse.volatile,
             'staging_area': _rse.staging_area}
 
-    for op in utils.rse_supported_protocol_operations():
-        info['%s_protocol' % op] = 1  # 1 indicates the default protocol
-
     query = None
     terms = [models.RSEProtocols.rse_id == _rse.id]
     if schemes:
diff --git a/lib/rucio/rse/rsemanager.py b/lib/rucio/rse/rsemanager.py
--- a/lib/rucio/rse/rsemanager.py
+++ b/lib/rucio/rse/rsemanager.py
@@ -24,8 +24,6 @@
 from rucio.common import exception, utils, constants
 from rucio.common.utils import make_valid_did
 
-DEFAULT_PROTOCOL = 1
-
 
 def get_rse_info(rse, session=None):
     """ Returns all protocol related RSE attributes.
@@ -41,11 +39,6 @@ def get_rse_info(rse, session=None):
                     volatile          ...     boolean indictaing if the RSE is volatile
                     deteministic      ...     boolean indicating of the nameing of the files follows the defined determinism
                     domain            ...     indictaing the domain that should be assumed for transfers. Values are 'ALL', 'LAN', or 'WAN'
-                    delete_protocol   ...     the protocol to be used for deletion, if rsemanager.DEFAULT_PROTOCOL, the default of the site will be selected automatically
-                    write_protocol    ...     the protocol to be used for write, if rsemanager.DEFAULT_PROTOCOL, the default of the site will be selected automatically
-                    read_protocol     ...     the protocol to be used for read, if rsemanager.DEFAULT_PROTOCOL, the default of the site will be selected automatically
-                    third_party_copy  ...     the protocol to be used for third_party_copy, if rsemanager.DEFAULT_PROTOCOL, the default of the site will be selected automatically
-
                     protocols       ...     all supported protocol in form of a list of dict objects with the followig structure
                         scheme              ...     protocol scheme e.g. http, srm, ...
                         hostname            ...     hostname of the site


Test patch:
diff --git a/lib/rucio/tests/test_rse.py b/lib/rucio/tests/test_rse.py
--- a/lib/rucio/tests/test_rse.py
+++ b/lib/rucio/tests/test_rse.py
@@ -1198,7 +1198,6 @@ def test_rsemgr_possible_protocols(self):
                         'availability_read': True,
                         'availability_write': True,
                         'credentials': None,
-                        'delete_protocol': 1,
                         'deterministic': True,
                         'domain': ['lan', 'wan'],
                         'protocols': [{'domains': {'lan': {'delete': 2, 'read': 0, 'write': 0},
@@ -1226,12 +1225,10 @@ def test_rsemgr_possible_protocols(self):
                                        'port': 8443,
                                        'prefix': u'/castor/ads.rl.ac.uk/prod/atlas/stripInput/atlasdatadisk/rucio/',
                                        'scheme': u'srm'}],
-                        'read_protocol': 1,
                         'rse': u'MOCK',
                         'rse_type': 'DISK',
                         'staging_area': False,
-                        'volatile': False,
-                        'write_protocol': 1}
+                        'volatile': False}
         assert_equal(len(mgr._get_possible_protocols(rse_settings, 'read')), 3)
 
     def test_add_distance(self):