Move global path opts in nova.paths

Move the global path config options (i.e. state_path, pybasedir and
bindir) into a new nova.paths module. A new module may seem like
overkill but some utility methods associated with these options follow
in a later commit.

Moving them to nova.paths means they are no longer globally defined
and it's more obvious which modules require these options.

Change-Id: I381d23f1bbe36dc6967a38a65062b0983e1661aa
This commit is contained in:
Mark McLoughlin
2013-01-04 17:32:36 +00:00
parent 904814e51f
commit 2553b4a221
16 changed files with 53 additions and 28 deletions

View File

@@ -43,21 +43,6 @@ def _get_my_ip():
return "127.0.0.1"
core_opts = [
cfg.StrOpt('pybasedir',
default=os.path.abspath(os.path.join(os.path.dirname(__file__),
'../')),
help='Directory where the nova python module is installed'),
cfg.StrOpt('bindir',
default='$pybasedir/bin',
help='Directory where nova binaries are installed'),
cfg.StrOpt('state_path',
default='$pybasedir',
help="Top-level directory for maintaining nova's state"),
]
cfg.CONF.register_cli_opts(core_opts)
global_opts = [
cfg.StrOpt('my_ip',
default=_get_my_ip(),