Make some config options work

1.Seperate the etcd_group and glance_opt_group from [DEFAULT]
2.Change refrence CONF.common.xx to CONF.xx

Change-Id: I0f95c063941e649ec92faf2328107925ee5e7e2b
Closes-Bug: #1707506
This commit is contained in:
wangzhh 2017-07-30 13:12:00 -04:00
parent 964a00563d
commit e14fbe5d14
3 changed files with 9 additions and 7 deletions

View File

@ -34,14 +34,14 @@ def state_path_def(*args):
def basedir_rel(*args):
"""Return a path relative to $pybasedir."""
return os.path.join(CONF.common.pybasedir, *args)
return os.path.join(CONF.pybasedir, *args)
def bindir_rel(*args):
"""Return a path relative to $bindir."""
return os.path.join(CONF.common.bindir, *args)
return os.path.join(CONF.bindir, *args)
def state_path_rel(*args):
"""Return a path relative to $state_path."""
return os.path.join(CONF.common.state_path, *args)
return os.path.join(CONF.state_path, *args)

View File

@ -41,7 +41,8 @@ etcd_opts = [
etcd_group = cfg.OptGroup(name='etcd', title='Options for etcd connection')
ALL_OPTS = (db_opts + sql_opts + etcd_opts)
DEFAULT_OPTS = (db_opts + sql_opts)
ETCD_OPTS = (etcd_opts)
def register_opts(conf):
@ -52,4 +53,4 @@ def register_opts(conf):
def list_opts():
return {"DEFAULT": ALL_OPTS}
return {"DEFAULT": DEFAULT_OPTS, etcd_group: ETCD_OPTS}

View File

@ -57,7 +57,8 @@ glance_driver_opts = [
glance_opt_group = cfg.OptGroup(name='glance',
title='Glance options for image management')
ALL_OPTS = (glance_driver_opts + image_driver_opts + sandbox_opts)
DEFAULT_OPTS = (image_driver_opts + sandbox_opts)
GLANCE_OPTS = (glance_driver_opts)
def register_opts(conf):
@ -68,4 +69,4 @@ def register_opts(conf):
def list_opts():
return {"DEFAULT": ALL_OPTS}
return {"DEFAULT": DEFAULT_OPTS, glance_opt_group: GLANCE_OPTS}