From 6faf3e6540268914e1853895210ce7441770838e Mon Sep 17 00:00:00 2001 From: Roman Prykhodchenko Date: Wed, 21 Oct 2015 12:44:46 +0200 Subject: [PATCH] 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 --- fuelclient/fuelclient_settings.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/fuelclient/fuelclient_settings.py b/fuelclient/fuelclient_settings.py index 338eb2b..b1561c0 100644 --- a/fuelclient/fuelclient_settings.py +++ b/fuelclient/fuelclient_settings.py @@ -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 /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)