]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: remove unused CalamariConfig
authorJohn Spray <john.spray@redhat.com>
Thu, 30 Jun 2016 23:12:47 +0000 (00:12 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 29 Sep 2016 16:26:57 +0000 (17:26 +0100)
No longer need to set CALAMARI_CONFIG when running.

Signed-off-by: John Spray <john.spray@redhat.com>
src/pybind/mgr/calamari.conf [deleted file]
src/pybind/mgr/calamari_rest/config.py [deleted file]
src/pybind/mgr/calamari_rest/settings.py
src/pybind/mgr/calamari_rest/views/rpc_view.py

diff --git a/src/pybind/mgr/calamari.conf b/src/pybind/mgr/calamari.conf
deleted file mode 100644 (file)
index 563aca8..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-
-[cthulhu]
-
-plugin_path = 
-salt_config_path = 
-alembic_config_path = 
-db_path = 
-log_path = /tmp/cthulhu.log
-log_level = DEBUG
-rpc_url = 
-crush_host_type = host
-crush_osd_type = osd
-cluster_map_retention = 3600
-db_log_level = WARN
-favorite_timeout_factor = 3
-server_timeout_factor = 3
-cluster_contact_threshold = 60
-emit_events_to_salt_event_bus = False
-event_tag_prefix = calamari/
-
-[calamari_web]
-
-log_path = /Users/john/git/calamari/dev/calamari.log
-log_level = DEBUG
-db_engine = django.db.backends.postgresql_psycopg2
-db_name = calamari
-db_user = calamari
-db_password = 27HbZwr*g
-db_host = localhost
-secret_key_path = /Users/john/git/calamari/dev/secret.key
-username = john
-static_root = /Users/john/git/calamari/webapp/content/
-
-[graphite]
-
-root = /Users/john/git/calamari/env
-storage_path = /Users/john/git/calamari/env/storage
-
-[testing]
-
-calamari_control = embedded
-ceph_control = embedded
-external_cluster_path = /Users/john/git/calamari/cluster.yaml
diff --git a/src/pybind/mgr/calamari_rest/config.py b/src/pybind/mgr/calamari_rest/config.py
deleted file mode 100644 (file)
index 159ced7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-import os
-import ConfigParser
-
-try:
-    import alembic
-except ImportError:
-    alembic = None
-else:
-    import alembic.config
-
-
-class ConfigNotFound(Exception):
-    pass
-
-
-DEFAULT_CONFIG_PATH = "/etc/calamari/calamari.conf"
-CONFIG_PATH_VAR = "CALAMARI_CONFIG"
-
-
-class CalamariConfig(ConfigParser.SafeConfigParser):
-    def __init__(self):
-        ConfigParser.SafeConfigParser.__init__(self)
-
-        try:
-            self.path = os.environ[CONFIG_PATH_VAR]
-        except KeyError:
-            self.path = DEFAULT_CONFIG_PATH
-
-        if not os.path.exists(self.path):
-            raise ConfigNotFound("Configuration not found at %s" % self.path)
-
-        self.read(self.path)
-
-
-if alembic is not None:
-    class AlembicConfig(alembic.config.Config):
-        def __init__(self):
-            path = CalamariConfig().get('cthulhu', 'alembic_config_path')
-            super(AlembicConfig, self).__init__(path)
index 54c94f91bb7b0acbf56a7a6131a7876530d8a45b..4d555d59866fc4bbc250f16751483b00a757792c 100644 (file)
@@ -1,9 +1,5 @@
 # Django settings for calamari project.
 
-
-from calamari_rest.config import CalamariConfig
-config = CalamariConfig()
-
 DEBUG = False
 TEMPLATE_DEBUG = DEBUG
 
index 7399bbbaa37968be9fef0c6fefe34b22650ce650..937400cd3fb77ecd7ec2c668f3f365308be2df80 100644 (file)
@@ -14,11 +14,8 @@ from rest_framework.views import APIView
 
 from rest_framework.response import Response
 
-from calamari_rest.config import CalamariConfig
-
 from calamari_rest.types import OsdMap, SYNC_OBJECT_STR_TYPE, OSD, OSD_MAP, POOL, CLUSTER, CRUSH_RULE, ServiceId,\
     NotFound, SERVER
-config = CalamariConfig()
 
 from rest import global_instance as rest_plugin