Deprecate unused [DEFAULT] bindir
This option was added long ago but has never been used. Deprecate it so that we can drop it completely during next cycle. Also drop the paths module which is not actually used. Change-Id: Ie7871e42c2fcec78f73ba880071603f6fec11e1e Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -163,12 +163,6 @@ function create_watcher_conf {
|
||||
configure_keystone_authtoken_middleware $WATCHER_CONF watcher
|
||||
configure_keystone_authtoken_middleware $WATCHER_CONF watcher "watcher_clients_auth"
|
||||
|
||||
if is_fedora; then
|
||||
# watcher defaults to /usr/local/bin, but fedora and suse pip like to
|
||||
# install things in /usr/bin
|
||||
iniset $WATCHER_CONF DEFAULT bindir "/usr/bin"
|
||||
fi
|
||||
|
||||
if [ -n "$WATCHER_STATE_PATH" ]; then
|
||||
iniset $WATCHER_CONF DEFAULT state_path "$WATCHER_STATE_PATH"
|
||||
iniset $WATCHER_CONF oslo_concurrency lock_path "$WATCHER_STATE_PATH"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``[DEFAULT] bindir`` option has been deprecated. This option has had
|
||||
no effect.
|
||||
@@ -1,37 +0,0 @@
|
||||
# Copyright 2010 United States Government as represented by the
|
||||
# Administrator of the National Aeronautics and Space Administration.
|
||||
# All Rights Reserved.
|
||||
# Copyright 2012 Red Hat, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
|
||||
from watcher import conf
|
||||
|
||||
CONF = conf.CONF
|
||||
|
||||
|
||||
def basedir_rel(*args):
|
||||
"""Return a path relative to $pybasedir."""
|
||||
return os.path.join(CONF.pybasedir, *args)
|
||||
|
||||
|
||||
def bindir_rel(*args):
|
||||
"""Return a path relative to $bindir."""
|
||||
return os.path.join(CONF.bindir, *args)
|
||||
|
||||
|
||||
def state_path_rel(*args):
|
||||
"""Return a path relative to $state_path."""
|
||||
return os.path.join(CONF.state_path, *args)
|
||||
@@ -26,7 +26,9 @@ PATH_OPTS = [
|
||||
help='Directory where the watcher python module is installed.'),
|
||||
cfg.StrOpt('bindir',
|
||||
default='$pybasedir/bin',
|
||||
help='Directory where watcher binaries are installed.'),
|
||||
help='Directory where watcher binaries are installed.',
|
||||
deprecated_for_removal=True,
|
||||
deprecated_reason='This option has no effect'),
|
||||
cfg.StrOpt('state_path',
|
||||
default='$pybasedir',
|
||||
help="Top-level directory for maintaining watcher's state."),
|
||||
@@ -38,11 +40,6 @@ def basedir_def(*args):
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user