Don't use /etc/fuel/client.yaml

This patch removes usage of the old default
settings file. Users must use user-side configuration
file that is generated to $XDG_CONFIG_COME.

Related-Bug: #1458361
Change-Id: Ie2defd31c7ddc205fec3f0fcc864990098e37fb1
This commit is contained in:
Roman Prykhodchenko
2015-10-21 12:44:46 +02:00
parent a3b4d6b395
commit 6faf3e6540

View File

@@ -30,16 +30,16 @@ _SETTINGS = None
class FuelClientSettings(object):
"""Represents a model of Fuel Clients settings
Default settigs file are distributed with the source code in
the <DIST_DIR>/fuelclient_settings.yaml. Those settings can be
overriden by /etc/fuel/client/config.yaml file.
Default settings are saved to $XDG_CONFIG_HOME/fuel/fuel_client.yaml on
the first run. If $XDG_CONFIG_HOME is not set, ~/.config/ directory is
used by default.
User-specific settings may be stored in any YAML-formatted file
the path to which should be supplied via the FUELCLIENT_CUSTOM_SETTINGS
environment variable. Custom settins override the default ones.
Custom settings may be stored in any YAML-formatted file the path to
which should be supplied via the $FUELCLIENT_CUSTOM_SETTINGS environment
variable. Custom settings override default ones.
Top level values may also be set as environment variables, e.g.
export SERVER_PORT=8080.
export SERVER_PORT=8080. These values have the highest priority.
"""
def __init__(self):
@@ -64,13 +64,6 @@ class FuelClientSettings(object):
self._add_file_if_exists(default_settings, settings_files)
self._add_file_if_exists(user_settings, settings_files)
# NOTE(romcheg): this file is kept temporarily to
# keep master branch stable.
# As soon as puppet manifests utilize new config
# generation, this line should be removed
self._add_file_if_exists('/etc/fuel/client/config.yaml',
settings_files)
# Add a custom settings file specified by user
self._add_file_if_exists(custom_settings, settings_files)