diff --git a/manila/common/config.py b/manila/common/config.py index b5e96b01c8..83cf19831e 100644 --- a/manila/common/config.py +++ b/manila/common/config.py @@ -24,7 +24,6 @@ stepping stone. """ -import os import socket from oslo.config import cfg @@ -65,16 +64,8 @@ core_opts = [ cfg.StrOpt('api_paste_config', default="api-paste.ini", help='File name for the paste.deploy config for manila-api.'), - cfg.StrOpt('pybasedir', - default=os.path.abspath(os.path.join(os.path.dirname(__file__), - '..', - '..')), - help='Directory where the manila python module is installed.'), - cfg.StrOpt('bindir', - default='$pybasedir/bin', - help='Directory where manila binaries are installed.'), cfg.StrOpt('state_path', - default='$pybasedir', + default='/var/lib/manila', help="Top-level directory for maintaining manila's state."), ] debug_opts = [ diff --git a/manila/tests/conf_fixture.py b/manila/tests/conf_fixture.py index 5cdd893568..0d18aee558 100644 --- a/manila/tests/conf_fixture.py +++ b/manila/tests/conf_fixture.py @@ -19,18 +19,22 @@ import os from manila.common import config CONF = config.CONF -_API_PASTE_PATH = os.path.abspath(os.path.join(CONF.state_path, - 'etc/manila/api-paste.ini')) -_POLICY_PATH = os.path.abspath(os.path.join(CONF.state_path, - 'manila/tests/policy.json')) def set_defaults(conf): _safe_set_of_opts(conf, 'verbose', True) + _safe_set_of_opts(conf, 'state_path', os.path.abspath( + os.path.join(os.path.dirname(__file__), + '..', + '..'))) _safe_set_of_opts(conf, 'connection', "sqlite://", group='database') _safe_set_of_opts(conf, 'sqlite_synchronous', False) + _POLICY_PATH = os.path.abspath(os.path.join(CONF.state_path, + 'manila/tests/policy.json')) _safe_set_of_opts(conf, 'policy_file', _POLICY_PATH) _safe_set_of_opts(conf, 'service_instance_user', 'fake_user') + _API_PASTE_PATH = os.path.abspath(os.path.join(CONF.state_path, + 'etc/manila/api-paste.ini')) _safe_set_of_opts(conf, 'api_paste_config', _API_PASTE_PATH) _safe_set_of_opts(conf, 'share_driver', 'manila.tests.fake_driver.FakeShareDriver')