Remove valence.conf.sample

As oslo-config-generator has been added, no need to maintain the
local copy of sample file, should be generated via
tox -egenconfig, generates the sample file with latest config
options

Change-Id: I6da9bd0454ec1b9980876e3021a331de68204074
Closes-Bug:#1680776
This commit is contained in:
Anusha Ramineni 2017-04-07 15:34:23 +05:30
parent dea13b1036
commit 80fbb7fca4
6 changed files with 20 additions and 102 deletions

View File

@ -0,0 +1,9 @@
To generate the sample valence.conf file, run the following
command from the top level of the valence directory:
tox -egenconfig #Generates etc/valence.conf.sample
If tox is not installed, you may install it as follows:
$ sudo pip install tox

View File

@ -1,3 +0,0 @@
[DEFAULT]
output_file = etc/valence/valence.conf.sample
namespace = valence.conf

3
etc/valence.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
output_file = etc/valence.conf.sample
namespace = valence.conf

View File

@ -1,97 +0,0 @@
[DEFAULT]
[api]
#
# From valence.conf
#
# The port for the valence API server. (port value)
# Minimum value: 0
# Maximum value: 65535
#bind_port = 8181
# The listen IP for the valence API server. (IP address value)
#bind_host = 127.0.0.1
# Enable the integrated stand-alone API to service requests via HTTPS
# instead of HTTP. If there is a front-end service performing HTTPS
# offloading from the service, this option should be False; note, you
# will want to change public API endpoint to represent SSL termination
# URL with 'public_endpoint' option. (boolean value)
#enable_ssl_api = false
# Number of workers for valence-api service. The default will be the
# number of CPUs available. (integer value)
#workers = 4
# The maximum timeout to wait for valence API server to come up.
# (integer value)
#timeout = 1000
# The maximum number of items returned in a single response from a
# collection resource. (integer value)
#max_limit = 1000
# Configuration file for WSGI definition of API. (string value)
#api_paste_config = api-paste.ini
# Enable debug mode for valence-api service. (boolean value)
#debug = false
# The log file location for valence-api service (string value)
#log_file = /var/log/valence/valence.log
# The granularity of Error log outputs. (string value)
#log_level = debug
# The log format. (string value)
#log_format = %(asctime)s %(name)-4s %(levelname)-4s %(message)s
[etcd]
#
# From valence.conf
#
# The port for the etcd server. (port value)
# Minimum value: 0
# Maximum value: 65535
#port = 2379
# The listen IP for the etcd server. (IP address value)
#host = 127.0.0.1
[podm]
#
# From valence.conf
#
# The URL of Redfish API server. (e.g.: http(s)://<IP>:<PORT>/).
# Required. (string value)
#url = <None>
# User account with admin/server-profile access privilege. Although
# this property is not mandatory it's highly recommended to set a
# username. Optional. (string value)
#username = <None>
# User account password. Although this property is not mandatory, it's
# highly recommended to set a password. Optional. (string value)
#password = <None>
# Either a boolean value, a path to a CA_BUNDLE file or directory with
# certificates of trusted CAs. If set to True the driver will verify
# the host certificates; if False the driver will ignore verifying the
# SSL certificate; If it's a path the driver will use the specified
# certificate or one of the certificates in the directory. Defaults to
# True. Optional. (boolean value)
#verify_ca = <None>
# The URL extension that specifies the Redfish API version that
# valence will interact with (string value)
#base_ext = /redfish/v1/

View File

@ -30,13 +30,19 @@ sed "s/\${CHUID}/$CURR_USER/" "$DIR"/doc/source/init/valence.conf > /tmp/valenc
sed -i "s#PYHOME#$PYHOME#" /tmp/valence.conf
mv /tmp/valence.conf /etc/init/valence.conf
# Generate initial sample config file.
echo "Generating sample config file" >> $install_log
pip install tox
tox -egenconfig
# create conf directory for valence if it doesn't exist
if [ ! -d "/etc/valence" ]; then
mkdir /etc/valence
fi
chown "$CURR_USER":"$CURR_USER" /etc/valence
VALENCE_CONF=/etc/valence/valence.conf
cp etc/valence/valence.conf.sample /etc/valence/valence.conf
cp etc/valence.conf.sample /etc/valence/valence.conf
sudo sed -i "s/#debug\s*=.*/debug=true/" $VALENCE_CONF
sudo sed -i "s/#log_level\s*=.*/log_level=debug/" $VALENCE_CONF
sudo sed -i "s/#log_file\s*=.*/log_file=/var/log/valence/valence.log/" $VALENCE_CONF

View File

@ -75,4 +75,4 @@ import-order-style = pep8
[testenv:genconfig]
commands =
oslo-config-generator --config-file etc/os-config-generator/valence.conf --output-file etc/valence/valence.conf.sample
oslo-config-generator --config-file etc/valence.conf --output-file etc/valence.conf.sample