No longer need to set CALAMARI_CONFIG when running.
Signed-off-by: John Spray <john.spray@redhat.com>
+++ /dev/null
-
-[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
+++ /dev/null
-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)
# Django settings for calamari project.
-
-from calamari_rest.config import CalamariConfig
-config = CalamariConfig()
-
DEBUG = False
TEMPLATE_DEBUG = DEBUG
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