Update code and opts in conf/paths.py for placement

Most of the options in paths.py are not used by placement, so they
are removed. Those that remain are used, mostly by tests, so the
descriptions associated with opts are updated accordingly.

The irrelevance of the removed opts was discovered while doing
the database configuration cleanup that follows in change
Iecf5006b32ca7bc2d46b7a59e78b4941a2e98122 .

Change-Id: I91361ea31c015542be52f905d75d2ca53c61103f
This commit is contained in:
Chris Dent 2018-09-09 06:55:37 -06:00
parent 7231b45681
commit fb6c99feec
1 changed files with 7 additions and 37 deletions

View File

@ -16,21 +16,20 @@
# under the License.
import os
import sys
from oslo_config import cfg
ALL_OPTS = [
cfg.StrOpt('pybasedir',
default=os.path.abspath(os.path.join(os.path.dirname(__file__),
'../../')),
sample_default='<Path>',
help="""
The directory where the Nova python modules are installed.
The directory where the Placement python modules are installed.
This directory is used to store template files for networking and remote
console access. It is also the default path for other config options which
need to persist Nova internal data. It is very unlikely that you need to
This is the default path for other config options which need to persist
Placement internal data. It is very unlikely that you need to
change this option from its default value.
Possible values:
@ -41,32 +40,13 @@ Related options:
* ``state_path``
"""),
cfg.StrOpt('bindir',
default=os.path.join(sys.prefix, 'local', 'bin'),
help="""
The directory where the Nova binaries are installed.
This option is only relevant if the networking capabilities from Nova are
used (see services below). Nova's networking capabilities are targeted to
be fully replaced by Neutron in the future. It is very unlikely that you need
to change this option from its default value.
Possible values:
* The full path to a directory.
"""),
cfg.StrOpt('state_path',
default='$pybasedir',
help="""
The top-level directory for maintaining Nova's state.
The top-level directory for maintaining state used in Placement.
This directory is used to store Nova's internal state. It is used by a
variety of other config options which derive from this. In some scenarios
(for example migrations) it makes sense to use a storage location which is
shared between multiple compute hosts (for example via NFS). Unless the
option ``instances_path`` gets overwritten, this directory can grow very
large.
This directory is used to store Placement's internal state. It is used by some
tests that have behaviors carried over from Nova.
Possible values:
@ -75,16 +55,6 @@ Possible values:
]
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)