Implemented db config module

Implemented db config module

Partially Implements: blueprint centralise-config-opts. Also moved
basedir_def, bindir_def and state_path_def to watcher.conf.paths

Change-Id: I73d201f6a23bbdb1c6189434b11314a66620e85c
This commit is contained in:
Prudhvi Rao Shedimbi
2016-11-29 23:49:57 +00:00
committed by David TARDIVEL
parent 9e4bf718da
commit 74112dd7cf
6 changed files with 67 additions and 33 deletions

View File

@@ -22,21 +22,6 @@ from watcher import conf
CONF = conf.CONF
def basedir_def(*args):
"""Return an uninterpolated path relative to $pybasedir."""
return os.path.join('$pybasedir', *args)
def bindir_def(*args):
"""Return an uninterpolated path relative to $bindir."""
return os.path.join('$bindir', *args)
def state_path_def(*args):
"""Return an uninterpolated path relative to $state_path."""
return os.path.join('$state_path', *args)
def basedir_rel(*args):
"""Return a path relative to $pybasedir."""
return os.path.join(CONF.pybasedir, *args)