Repository: rucio/rucio

Issue:
remove unused file from common
Motivation
----------
lib/rucio/common/client.py is probably unused and can be removed

Modification
------------



Discussion:

Resolving patch:
diff --git a/lib/rucio/common/client.py b/lib/rucio/common/client.py
deleted file mode 100644
--- a/lib/rucio/common/client.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright European Organization for Nuclear Research (CERN)
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# You may not use this file except in compliance with the License.
-# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
-#
-# Authors:
-# - Vincent Garonne, <vincent.garonne@cern.ch>, 2012
-
-import httplib
-
-
-class BaseClient(object):
-
-    """A base client class"""
-
-    DEFAULT_PORT = 80
-
-    OK_RESPONSE_CODES = (
-        httplib.OK,
-        httplib.CREATED,
-        httplib.ACCEPTED,
-        httplib.NO_CONTENT,
-    )
-
-    def __init__(self, host, port=None, use_ssl=False, auth_tok=None, creds=None):
-        """
-        Creates a new client to some service.
-
-        :param host: The host where service resides
-        :param port: The port where service resides
-        :param use_ssl: Should we use HTTPS?
-        :param auth_tok: The auth token to pass to the server
-        :param creds: The credentials to pass to the auth plugin
-        """
-        self.host = host
-        self.port = port or self.DEFAULT_PORT
-        self.use_ssl = use_ssl
-        self.auth_tok = auth_tok
-        self.creds = creds or {}
-        self.connection = None
diff --git a/lib/rucio/common/constants.py b/lib/rucio/common/constants.py
--- a/lib/rucio/common/constants.py
+++ b/lib/rucio/common/constants.py
@@ -6,7 +6,7 @@
 #
 # Authors:
 # - Vincent Garonne, <vincent.garonne@cern.ch>, 2013
-# - Cedric Serfon, <cedric.serfon@cern.ch>, 2015
+# - Cedric Serfon, <cedric.serfon@cern.ch>, 2015-2018
 # - Mario Lassnig, <mario.lassnig@cern.ch>, 2018
 
 """
@@ -23,8 +23,9 @@
 KEY_TYPES = ['ALL', 'COLLECTION', 'FILE', 'DERIVED']
 # all(container, dataset, file), collection(dataset or container), file, derived(compute from file for collection)
 
-SCHEME_MAP = {'srm': ['srm', 'gsiftp', 's3'],
-              'gsiftp': ['srm', 'gsiftp', 's3'],
-              'https': ['https', 'davs'],
-              'davs': ['https', 'davs'],
-              's3': ['https', 'davs', 'gsiftp', 'srm']}
+SCHEME_MAP = {'srm': ['srm', 'gsiftp'],
+              'gsiftp': ['srm', 'gsiftp'],
+              'https': ['https', 'davs', 's3'],
+              'davs': ['https', 'davs', 's3'],
+              'root': ['root'],
+              's3': ['https', 'davs', 's3']}


Test patch:
diff --git a/tools/bootstrap_tests.py b/tools/bootstrap_tests.py
--- a/tools/bootstrap_tests.py
+++ b/tools/bootstrap_tests.py
@@ -50,7 +50,7 @@
                                 ('/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=barisits/CN=692443/CN=Martin Barisits', 'x509', 'martin.barisits@cern.ch'),
                                 ('/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=tbeerman/CN=722011/CN=Thomas Beermann', 'x509', 'thomas.beermann@cern.ch'),
                                 ('/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=ruciobuildbot/CN=692443/CN=Robot: Rucio build bot', 'x509', 'rucio.build.bot@cern.ch'),
-                                ('CN=Stefan Prenner,CN=822876,CN=sprenner,OU=Users,OU=Organic Units,DC=cern,DC=ch', 'x509', 'stefan.prenner@cern.ch'),
+                                ('/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=sprenner/CN=822876/CN=Stefan Prenner', 'x509', 'stefan.prenner@cern.ch'),
                                 ('/CN=docker client', 'x509', 'dummy@cern.ch'),
                                 ('mlassnig@CERN.CH', 'GSS', 'mario.lassnig@cern.ch')]